@dudadev/partner-api
Advanced tools
Comparing version 2.1.2 to 2.2.0
@@ -12,13 +12,14 @@ "use strict"; | ||
*/ | ||
const Accounts_1 = __importDefault(require("./lib/accounts/Accounts")); | ||
const Apps_1 = __importDefault(require("./lib/apps/Apps")); | ||
const Collections_1 = __importDefault(require("./lib/collections/Collections")); | ||
const Content_1 = __importDefault(require("./lib/content/Content")); | ||
const Ecomm_1 = __importDefault(require("./lib/ecomm/Ecomm")); | ||
const Other_1 = __importDefault(require("./lib/other/Other")); | ||
const Content_1 = __importDefault(require("./lib/content/Content")); | ||
const Pages_1 = __importDefault(require("./lib/pages/Pages")); | ||
const Plans_1 = __importDefault(require("./lib/plans/Plans")); | ||
const Reporting_1 = __importDefault(require("./lib/reporting/Reporting")); | ||
const Accounts_1 = __importDefault(require("./lib/accounts/Accounts")); | ||
const Collections_1 = __importDefault(require("./lib/collections/Collections")); | ||
const Plans_1 = __importDefault(require("./lib/plans/Plans")); | ||
const Urlrules_1 = __importDefault(require("./lib/urlrules/Urlrules")); | ||
const Pages_1 = __importDefault(require("./lib/pages/Pages")); | ||
const Sites_1 = __importDefault(require("./lib/sites/Sites")); | ||
const Templates_1 = __importDefault(require("./lib/templates/Templates")); | ||
const Urlrules_1 = __importDefault(require("./lib/urlrules/Urlrules")); | ||
const base_1 = require("./lib/base"); | ||
@@ -33,13 +34,14 @@ const envs = { | ||
// new:resource::type | ||
accounts; | ||
appstore; | ||
collections; | ||
content; | ||
ecomm; | ||
other; | ||
content; | ||
pages; | ||
plans; | ||
reporting; | ||
accounts; | ||
collections; | ||
plans; | ||
urlRules; | ||
pages; | ||
sites; | ||
templates; | ||
urlRules; | ||
constructor(opts) { | ||
@@ -52,12 +54,13 @@ const config = new base_1.Config({ | ||
this.appstore = new Apps_1.default(config); | ||
this.other = new Other_1.default(config); | ||
this.content = new Content_1.default(config); | ||
this.reporting = new Reporting_1.default(config); | ||
this.accounts = new Accounts_1.default(config); | ||
this.collections = new Collections_1.default(config); | ||
this.content = new Content_1.default(config); | ||
this.ecomm = new Ecomm_1.default(config); | ||
this.other = new Other_1.default(config); | ||
this.pages = new Pages_1.default(config); | ||
this.plans = new Plans_1.default(config); | ||
this.urlRules = new Urlrules_1.default(config); | ||
this.pages = new Pages_1.default(config); | ||
this.reporting = new Reporting_1.default(config); | ||
this.sites = new Sites_1.default(config); | ||
this.templates = new Templates_1.default(config); | ||
this.urlRules = new Urlrules_1.default(config); | ||
} | ||
@@ -64,0 +67,0 @@ } |
@@ -8,4 +8,6 @@ "use strict"; | ||
const base_1 = __importDefault(require("../base")); | ||
const Theme_1 = __importDefault(require("./Theme")); | ||
const APIEndpoint_1 = require("../APIEndpoint"); | ||
class Sites extends base_1.default { | ||
theme = new Theme_1.default(this.config); | ||
get = (0, APIEndpoint_1.APIEndpoint)({ | ||
@@ -12,0 +14,0 @@ method: 'get', |
@@ -0,12 +1,13 @@ | ||
import Accounts from './lib/accounts/Accounts'; | ||
import Apps from './lib/apps/Apps'; | ||
import Collections from './lib/collections/Collections'; | ||
import Content from './lib/content/Content'; | ||
import Ecomm from './lib/ecomm/Ecomm'; | ||
import Other from './lib/other/Other'; | ||
import Content from './lib/content/Content'; | ||
import Pages from './lib/pages/Pages'; | ||
import Plans from './lib/plans/Plans'; | ||
import Reporting from './lib/reporting/Reporting'; | ||
import Accounts from './lib/accounts/Accounts'; | ||
import Collections from './lib/collections/Collections'; | ||
import Plans from './lib/plans/Plans'; | ||
import Urlrules from './lib/urlrules/Urlrules'; | ||
import Pages from './lib/pages/Pages'; | ||
import Sites from './lib/sites/Sites'; | ||
import Templates from './lib/templates/Templates'; | ||
import Urlrules from './lib/urlrules/Urlrules'; | ||
import { Config } from './lib/base'; | ||
@@ -22,13 +23,14 @@ interface DudaConfig extends Config { | ||
}; | ||
accounts: Accounts; | ||
appstore: Apps; | ||
collections: Collections; | ||
content: Content; | ||
ecomm: Ecomm; | ||
other: Other; | ||
content: Content; | ||
pages: Pages; | ||
plans: Plans; | ||
reporting: Reporting; | ||
accounts: Accounts; | ||
collections: Collections; | ||
plans: Plans; | ||
urlRules: Urlrules; | ||
pages: Pages; | ||
sites: Sites; | ||
templates: Templates; | ||
urlRules: Urlrules; | ||
constructor(opts: DudaConfig); | ||
@@ -35,0 +37,0 @@ } |
import { RequestOptions } from './http'; | ||
import { Parameters, HeaderOptions } from './helpers'; | ||
interface APIEndpointDefinition<Opts, Return> { | ||
method: 'get' | 'put' | 'post' | 'delete'; | ||
method: 'get' | 'put' | 'post' | 'patch' | 'delete'; | ||
path: string; | ||
@@ -6,0 +6,0 @@ defaults?: { |
import * as Types from './types'; | ||
import Resource from '../base'; | ||
import Theme from './Theme'; | ||
declare class Sites extends Resource { | ||
theme: Theme; | ||
get: { | ||
@@ -5,0 +7,0 @@ (cb: (err: any, res: Types.Site) => any): void; |
@@ -51,2 +51,7 @@ export interface Site { | ||
} | ||
export declare type SiteThemeColor = { | ||
id: string; | ||
value: string; | ||
label: string; | ||
}; | ||
export interface SiteNamedPayload { | ||
@@ -58,2 +63,6 @@ site_name: string; | ||
} | ||
export interface UpdateSiteThemePayload { | ||
site_name: string; | ||
colors: Array<SiteThemeColor>; | ||
} | ||
export declare type GetSiteResponse = Site; | ||
@@ -68,2 +77,5 @@ export declare type CreateSiteResponse = SiteNamedResponse; | ||
export declare type SwitchTemplateResponse = void; | ||
export declare type SiteThemeResponse = { | ||
colors: Array<SiteThemeColor>; | ||
}; | ||
export interface PublishSitePayload extends SiteNamedPayload { | ||
@@ -75,2 +87,6 @@ } | ||
} | ||
export interface GetSiteThemeResponse extends SiteThemeResponse { | ||
} | ||
export interface UpdateSiteThemeResponse extends SiteThemeResponse { | ||
} | ||
export interface DuplicateSitePayload extends SiteNamedPayload { | ||
@@ -164,2 +180,5 @@ new_default_domain_prefix: string; | ||
} | ||
export declare type GetSiteThemePayload = { | ||
site_name: string; | ||
}; | ||
export {}; |
{ | ||
"name": "@dudadev/partner-api", | ||
"version": "2.1.2", | ||
"version": "2.2.0", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "dist", |
@@ -6,13 +6,14 @@ /* eslint-disable | ||
*/ | ||
import Accounts from './lib/accounts/Accounts'; | ||
import Apps from './lib/apps/Apps'; | ||
import Collections from './lib/collections/Collections'; | ||
import Content from './lib/content/Content'; | ||
import Ecomm from './lib/ecomm/Ecomm'; | ||
import Other from './lib/other/Other'; | ||
import Content from './lib/content/Content'; | ||
import Pages from './lib/pages/Pages'; | ||
import Plans from './lib/plans/Plans'; | ||
import Reporting from './lib/reporting/Reporting'; | ||
import Accounts from './lib/accounts/Accounts'; | ||
import Collections from './lib/collections/Collections'; | ||
import Plans from './lib/plans/Plans'; | ||
import Urlrules from './lib/urlrules/Urlrules'; | ||
import Pages from './lib/pages/Pages'; | ||
import Sites from './lib/sites/Sites'; | ||
import Templates from './lib/templates/Templates'; | ||
import Urlrules from './lib/urlrules/Urlrules'; | ||
import { Config } from './lib/base'; | ||
@@ -35,20 +36,20 @@ | ||
accounts: Accounts; | ||
appstore: Apps; | ||
other: Other; | ||
collections: Collections; | ||
content: Content; | ||
reporting: Reporting; | ||
ecomm: Ecomm; | ||
accounts: Accounts; | ||
other: Other; | ||
collections: Collections; | ||
pages: Pages; | ||
plans: Plans; | ||
urlRules: Urlrules; | ||
reporting: Reporting; | ||
pages: Pages; | ||
sites: Sites; | ||
@@ -58,2 +59,4 @@ | ||
urlRules: Urlrules; | ||
constructor(opts: DudaConfig) { | ||
@@ -67,12 +70,13 @@ const config = new Config({ | ||
this.appstore = new Apps(config); | ||
this.other = new Other(config); | ||
this.content = new Content(config); | ||
this.reporting = new Reporting(config); | ||
this.accounts = new Accounts(config); | ||
this.collections = new Collections(config); | ||
this.content = new Content(config); | ||
this.ecomm = new Ecomm(config); | ||
this.other = new Other(config); | ||
this.pages = new Pages(config); | ||
this.plans = new Plans(config); | ||
this.urlRules = new Urlrules(config); | ||
this.pages = new Pages(config); | ||
this.reporting = new Reporting(config); | ||
this.sites = new Sites(config); | ||
this.templates = new Templates(config); | ||
this.urlRules = new Urlrules(config); | ||
} | ||
@@ -79,0 +83,0 @@ } |
@@ -20,3 +20,3 @@ /* eslint-disable no-redeclare, default-param-last */ | ||
interface APIEndpointDefinition<Opts, Return> { | ||
method: 'get' | 'put' | 'post' | 'delete'; | ||
method: 'get' | 'put' | 'post' | 'patch' | 'delete'; | ||
@@ -23,0 +23,0 @@ path: string; |
import * as Types from './types'; | ||
import Resource from '../base'; | ||
import Theme from './Theme'; | ||
@@ -7,2 +8,4 @@ import { APIEndpoint } from '../APIEndpoint'; | ||
class Sites extends Resource { | ||
theme = new Theme(this.config); | ||
get = APIEndpoint<Types.GetSiteByNamePayload, Types.GetSiteResponse>({ | ||
@@ -9,0 +12,0 @@ method: 'get', |
@@ -52,2 +52,8 @@ export interface Site { | ||
export type SiteThemeColor = { | ||
id: string, | ||
value: string, | ||
label: string, | ||
} | ||
export interface SiteNamedPayload { | ||
@@ -61,2 +67,7 @@ site_name: string; | ||
export interface UpdateSiteThemePayload { | ||
site_name: string, | ||
colors: Array<SiteThemeColor>, | ||
} | ||
export type GetSiteResponse = Site; | ||
@@ -73,2 +84,6 @@ export type CreateSiteResponse = SiteNamedResponse; | ||
export type SiteThemeResponse = { | ||
colors: Array<SiteThemeColor>, | ||
} | ||
export interface PublishSitePayload extends SiteNamedPayload { | ||
@@ -83,2 +98,8 @@ } | ||
export interface GetSiteThemeResponse extends SiteThemeResponse { | ||
} | ||
export interface UpdateSiteThemeResponse extends SiteThemeResponse { | ||
} | ||
export interface DuplicateSitePayload extends SiteNamedPayload { | ||
@@ -180,1 +201,5 @@ new_default_domain_prefix: string, | ||
} | ||
export type GetSiteThemePayload = { | ||
site_name: string | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
352253
261
8605