@gofynd/fdk-client-javascript 1.4.3 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -10
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +48 -48
- package/sdk/application/Cart/CartApplicationClient.js +48 -48
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +69 -69
- package/sdk/application/Catalog/CatalogApplicationClient.js +69 -69
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -4
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -6
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -32
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +32 -32
- package/sdk/application/Content/ContentApplicationClient.d.ts +45 -45
- package/sdk/application/Content/ContentApplicationClient.js +45 -45
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +5 -5
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +5 -5
- package/sdk/application/Lead/LeadApplicationClient.d.ts +9 -9
- package/sdk/application/Lead/LeadApplicationClient.js +9 -9
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -22
- package/sdk/application/Logistic/LogisticApplicationClient.js +22 -22
- package/sdk/application/Order/OrderApplicationClient.d.ts +14 -25
- package/sdk/application/Order/OrderApplicationClient.js +14 -94
- package/sdk/application/Order/OrderApplicationValidator.d.ts +1 -15
- package/sdk/application/Order/OrderApplicationValidator.js +0 -13
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +71 -71
- package/sdk/application/Payment/PaymentApplicationClient.js +71 -71
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +1 -1
- package/sdk/application/Share/ShareApplicationClient.d.ts +1 -1
- package/sdk/application/Share/ShareApplicationClient.js +1 -1
- package/sdk/application/Share/ShareApplicationModel.d.ts +2 -0
- package/sdk/application/Share/ShareApplicationModel.js +2 -0
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.js +8 -8
- package/sdk/application/User/UserApplicationClient.d.ts +74 -74
- package/sdk/application/User/UserApplicationClient.js +74 -74
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +5 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +5 -5
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +13 -13
- package/sdk/platform/Billing/BillingPlatformClient.js +13 -13
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +102 -102
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +102 -102
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +132 -131
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +132 -131
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +130 -130
- package/sdk/platform/Catalog/CatalogPlatformClient.js +130 -130
- package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -2
- package/sdk/platform/Common/CommonPlatformClient.js +2 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +118 -118
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +118 -118
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +22 -22
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +22 -22
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +34 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +35 -5
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +4 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +41 -41
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +41 -41
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +26 -26
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +26 -26
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +93 -93
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +93 -93
- package/sdk/platform/Content/ContentPlatformClient.d.ts +29 -29
- package/sdk/platform/Content/ContentPlatformClient.js +29 -29
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +18 -18
- package/sdk/platform/Discount/DiscountPlatformClient.js +18 -18
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -17
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +18 -17
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +2 -2
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +4 -4
- package/sdk/platform/Finance/FinancePlatformClient.js +4 -4
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +12 -12
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +15 -15
- package/sdk/platform/Lead/LeadPlatformClient.js +15 -15
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +10 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +95 -106
- package/sdk/platform/Order/OrderPlatformClient.js +95 -190
- package/sdk/platform/Order/OrderPlatformModel.d.ts +10 -0
- package/sdk/platform/Order/OrderPlatformModel.js +4 -0
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +1 -33
- package/sdk/platform/Order/OrderPlatformValidator.js +0 -20
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +4 -4
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +77 -77
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +77 -77
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +2 -2
- package/sdk/platform/Payment/PaymentPlatformClient.js +2 -2
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +7 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +3 -0
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +7 -7
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +7 -7
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +40 -40
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +40 -40
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +51 -50
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +51 -50
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationClient.js +1 -1
- package/sdk/platform/Share/SharePlatformModel.d.ts +2 -0
- package/sdk/platform/Share/SharePlatformModel.js +2 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +34 -104
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +34 -591
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +1 -100
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -92
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +6 -6
- package/sdk/platform/Theme/ThemePlatformClient.js +6 -6
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -35
- package/sdk/platform/User/UserPlatformApplicationClient.js +35 -35
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +7 -6
- package/sdk/platform/Webhook/WebhookPlatformClient.js +7 -6
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +0 -152
- package/sdk/platform/Inventory/InventoryPlatformClient.js +0 -1017
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +0 -1355
- package/sdk/platform/Inventory/InventoryPlatformModel.js +0 -1544
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +0 -171
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +0 -159
|
@@ -23,8 +23,8 @@ class Theme {
|
|
|
23
23
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
24
24
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
25
25
|
* @name addThemeToApplication
|
|
26
|
-
* @summary:
|
|
27
|
-
* @description: Include a theme in an application
|
|
26
|
+
* @summary: Create theme in sales channel
|
|
27
|
+
* @description: Include a theme in an application drafts from theme collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/addThemeToApplication/).
|
|
28
28
|
*/
|
|
29
29
|
async addThemeToApplication(
|
|
30
30
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -96,93 +96,14 @@ class Theme {
|
|
|
96
96
|
return response;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
/**
|
|
100
|
-
* @param {ThemePlatformApplicationValidator.AddToThemeLibraryParam} arg - Arg object
|
|
101
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
102
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
103
|
-
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
104
|
-
* @name addToThemeLibrary
|
|
105
|
-
* @summary: Add to theme library
|
|
106
|
-
* @description: Store and add a theme to the platform's library. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/addToThemeLibrary/).
|
|
107
|
-
*/
|
|
108
|
-
async addToThemeLibrary(
|
|
109
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
110
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
111
|
-
) {
|
|
112
|
-
const {
|
|
113
|
-
error,
|
|
114
|
-
} = ThemePlatformApplicationValidator.addToThemeLibrary().validate(
|
|
115
|
-
{
|
|
116
|
-
body,
|
|
117
|
-
},
|
|
118
|
-
{ abortEarly: false, allowUnknown: true }
|
|
119
|
-
);
|
|
120
|
-
if (error) {
|
|
121
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// Showing warrnings if extra unknown parameters are found
|
|
125
|
-
const {
|
|
126
|
-
error: warrning,
|
|
127
|
-
} = ThemePlatformApplicationValidator.addToThemeLibrary().validate(
|
|
128
|
-
{
|
|
129
|
-
body,
|
|
130
|
-
},
|
|
131
|
-
{ abortEarly: false, allowUnknown: false }
|
|
132
|
-
);
|
|
133
|
-
if (warrning) {
|
|
134
|
-
Logger({
|
|
135
|
-
level: "WARN",
|
|
136
|
-
message: `Parameter Validation warrnings for platform > Theme > addToThemeLibrary \n ${warrning}`,
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const query_params = {};
|
|
141
|
-
|
|
142
|
-
const response = await PlatformAPIClient.execute(
|
|
143
|
-
this.config,
|
|
144
|
-
"post",
|
|
145
|
-
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
|
|
146
|
-
query_params,
|
|
147
|
-
body,
|
|
148
|
-
requestHeaders,
|
|
149
|
-
{ responseHeaders }
|
|
150
|
-
);
|
|
151
|
-
|
|
152
|
-
let responseData = response;
|
|
153
|
-
if (responseHeaders) {
|
|
154
|
-
responseData = response[0];
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
const {
|
|
158
|
-
error: res_error,
|
|
159
|
-
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
160
|
-
abortEarly: false,
|
|
161
|
-
allowUnknown: true,
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
if (res_error) {
|
|
165
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
166
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
167
|
-
} else {
|
|
168
|
-
Logger({
|
|
169
|
-
level: "WARN",
|
|
170
|
-
message: `Response Validation Warnings for platform > Theme > addToThemeLibrary \n ${res_error}`,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return response;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
99
|
/**
|
|
179
100
|
* @param {ThemePlatformApplicationValidator.ApplyThemeParam} arg - Arg object
|
|
180
101
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
181
102
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
182
103
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
183
104
|
* @name applyTheme
|
|
184
|
-
* @summary: Apply theme
|
|
185
|
-
* @description:
|
|
105
|
+
* @summary: Apply a theme
|
|
106
|
+
* @description: Change current applied theme with new draft theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/applyTheme/).
|
|
186
107
|
*/
|
|
187
108
|
async applyTheme(
|
|
188
109
|
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -252,91 +173,14 @@ class Theme {
|
|
|
252
173
|
return response;
|
|
253
174
|
}
|
|
254
175
|
|
|
255
|
-
/**
|
|
256
|
-
* @param {ThemePlatformApplicationValidator.ArchiveThemeParam} arg - Arg object
|
|
257
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
258
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
259
|
-
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
260
|
-
* @name archiveTheme
|
|
261
|
-
* @summary: Archive theme
|
|
262
|
-
* @description: Store a theme in an archive. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/archiveTheme/).
|
|
263
|
-
*/
|
|
264
|
-
async archiveTheme(
|
|
265
|
-
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
266
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
267
|
-
) {
|
|
268
|
-
const { error } = ThemePlatformApplicationValidator.archiveTheme().validate(
|
|
269
|
-
{
|
|
270
|
-
themeId,
|
|
271
|
-
},
|
|
272
|
-
{ abortEarly: false, allowUnknown: true }
|
|
273
|
-
);
|
|
274
|
-
if (error) {
|
|
275
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
// Showing warrnings if extra unknown parameters are found
|
|
279
|
-
const {
|
|
280
|
-
error: warrning,
|
|
281
|
-
} = ThemePlatformApplicationValidator.archiveTheme().validate(
|
|
282
|
-
{
|
|
283
|
-
themeId,
|
|
284
|
-
},
|
|
285
|
-
{ abortEarly: false, allowUnknown: false }
|
|
286
|
-
);
|
|
287
|
-
if (warrning) {
|
|
288
|
-
Logger({
|
|
289
|
-
level: "WARN",
|
|
290
|
-
message: `Parameter Validation warrnings for platform > Theme > archiveTheme \n ${warrning}`,
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
const query_params = {};
|
|
295
|
-
|
|
296
|
-
const response = await PlatformAPIClient.execute(
|
|
297
|
-
this.config,
|
|
298
|
-
"put",
|
|
299
|
-
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/archive`,
|
|
300
|
-
query_params,
|
|
301
|
-
undefined,
|
|
302
|
-
requestHeaders,
|
|
303
|
-
{ responseHeaders }
|
|
304
|
-
);
|
|
305
|
-
|
|
306
|
-
let responseData = response;
|
|
307
|
-
if (responseHeaders) {
|
|
308
|
-
responseData = response[0];
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
const {
|
|
312
|
-
error: res_error,
|
|
313
|
-
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
314
|
-
abortEarly: false,
|
|
315
|
-
allowUnknown: true,
|
|
316
|
-
});
|
|
317
|
-
|
|
318
|
-
if (res_error) {
|
|
319
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
320
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
321
|
-
} else {
|
|
322
|
-
Logger({
|
|
323
|
-
level: "WARN",
|
|
324
|
-
message: `Response Validation Warnings for platform > Theme > archiveTheme \n ${res_error}`,
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
return response;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
176
|
/**
|
|
333
177
|
* @param {ThemePlatformApplicationValidator.CreatePageParam} arg - Arg object
|
|
334
178
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
335
179
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
336
180
|
* @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
|
|
337
181
|
* @name createPage
|
|
338
|
-
* @summary: Create page
|
|
339
|
-
* @description: Generate and add a new page to the
|
|
182
|
+
* @summary: Create theme page
|
|
183
|
+
* @description: Generate and add a new page to the selected theme of the Platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/createPage/).
|
|
340
184
|
*/
|
|
341
185
|
async createPage(
|
|
342
186
|
{ themeId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -414,8 +258,8 @@ class Theme {
|
|
|
414
258
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
415
259
|
* @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
|
|
416
260
|
* @name deletePage
|
|
417
|
-
* @summary: Delete page
|
|
418
|
-
* @description: Remove a page from the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/deletePage/).
|
|
261
|
+
* @summary: Delete a page
|
|
262
|
+
* @description: Remove a page from a theme of the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/deletePage/).
|
|
419
263
|
*/
|
|
420
264
|
async deletePage(
|
|
421
265
|
{ themeId, pageValue, requestHeaders } = { requestHeaders: {} },
|
|
@@ -494,7 +338,7 @@ class Theme {
|
|
|
494
338
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
495
339
|
* @name deleteTheme
|
|
496
340
|
* @summary: Delete theme
|
|
497
|
-
* @description: Remove a theme from
|
|
341
|
+
* @description: Remove a theme from theme drafts of a sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/deleteTheme/).
|
|
498
342
|
*/
|
|
499
343
|
async deleteTheme(
|
|
500
344
|
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -570,8 +414,8 @@ class Theme {
|
|
|
570
414
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
571
415
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
572
416
|
* @name duplicateTheme
|
|
573
|
-
* @summary: Duplicate theme
|
|
574
|
-
* @description: Create a copy of an existing theme
|
|
417
|
+
* @summary: Duplicate a theme
|
|
418
|
+
* @description: Create a new copy of an existing theme by theme Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/duplicateTheme/).
|
|
575
419
|
*/
|
|
576
420
|
async duplicateTheme(
|
|
577
421
|
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -649,7 +493,7 @@ class Theme {
|
|
|
649
493
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
650
494
|
* @returns {Promise<ThemePlatformModel.AllAvailablePageSchema>} - Success response
|
|
651
495
|
* @name getAllPages
|
|
652
|
-
* @summary:
|
|
496
|
+
* @summary: List pages of a theme
|
|
653
497
|
* @description: Retrieve a list of all available pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getAllPages/).
|
|
654
498
|
*/
|
|
655
499
|
async getAllPages(
|
|
@@ -728,8 +572,8 @@ class Theme {
|
|
|
728
572
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
729
573
|
* @returns {Promise<ThemePlatformModel.ThemesSchema[]>} - Success response
|
|
730
574
|
* @name getApplicationThemes
|
|
731
|
-
* @summary:
|
|
732
|
-
* @description: Retrieve themes
|
|
575
|
+
* @summary: List sales channel themes
|
|
576
|
+
* @description: Retrieve all draft themes added to sales channel from theme collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getApplicationThemes/).
|
|
733
577
|
*/
|
|
734
578
|
async getApplicationThemes(
|
|
735
579
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -802,8 +646,8 @@ class Theme {
|
|
|
802
646
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
803
647
|
* @returns {Promise<Object>} - Success response
|
|
804
648
|
* @name getApplicationThemesCount
|
|
805
|
-
* @summary: Get
|
|
806
|
-
* @description:
|
|
649
|
+
* @summary: Get sales channel themes count
|
|
650
|
+
* @description: Retrieve count of all draft themes added to sales channel from theme collection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getApplicationThemesCount/).
|
|
807
651
|
*/
|
|
808
652
|
async getApplicationThemesCount(
|
|
809
653
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -876,7 +720,7 @@ class Theme {
|
|
|
876
720
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
877
721
|
* @name getAppliedTheme
|
|
878
722
|
* @summary: Get applied theme
|
|
879
|
-
* @description: Retrieve the currently applied theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getAppliedTheme/).
|
|
723
|
+
* @description: Retrieve the currently applied theme of a sales channel using application Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getAppliedTheme/).
|
|
880
724
|
*/
|
|
881
725
|
async getAppliedTheme(
|
|
882
726
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -950,8 +794,8 @@ class Theme {
|
|
|
950
794
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
951
795
|
* @returns {Promise<ThemePlatformModel.FontsSchema>} - Success response
|
|
952
796
|
* @name getFonts
|
|
953
|
-
* @summary:
|
|
954
|
-
* @description: Retrieve a list of available fonts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getFonts/).
|
|
797
|
+
* @summary: List theme fonts
|
|
798
|
+
* @description: Retrieve a list of available fonts that can be used by themes in the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getFonts/).
|
|
955
799
|
*/
|
|
956
800
|
async getFonts(
|
|
957
801
|
{ requestHeaders } = { requestHeaders: {} },
|
|
@@ -1023,8 +867,8 @@ class Theme {
|
|
|
1023
867
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1024
868
|
* @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
|
|
1025
869
|
* @name getPage
|
|
1026
|
-
* @summary: Get page
|
|
1027
|
-
* @description: Retrieve detailed information about a specific page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getPage/).
|
|
870
|
+
* @summary: Get a page
|
|
871
|
+
* @description: Retrieve detailed information about a specific page of a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getPage/).
|
|
1028
872
|
*/
|
|
1029
873
|
async getPage(
|
|
1030
874
|
{ themeId, pageValue, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1096,97 +940,14 @@ class Theme {
|
|
|
1096
940
|
return response;
|
|
1097
941
|
}
|
|
1098
942
|
|
|
1099
|
-
/**
|
|
1100
|
-
* @param {ThemePlatformApplicationValidator.GetPublicThemesParam} arg - Arg object
|
|
1101
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1102
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1103
|
-
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
1104
|
-
* @name getPublicThemes
|
|
1105
|
-
* @summary: Get public themes
|
|
1106
|
-
* @description: Retrieve themes that are publicly accessible. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getPublicThemes/).
|
|
1107
|
-
*/
|
|
1108
|
-
async getPublicThemes(
|
|
1109
|
-
{ pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
1110
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1111
|
-
) {
|
|
1112
|
-
const {
|
|
1113
|
-
error,
|
|
1114
|
-
} = ThemePlatformApplicationValidator.getPublicThemes().validate(
|
|
1115
|
-
{
|
|
1116
|
-
pageSize,
|
|
1117
|
-
pageNo,
|
|
1118
|
-
},
|
|
1119
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1120
|
-
);
|
|
1121
|
-
if (error) {
|
|
1122
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1126
|
-
const {
|
|
1127
|
-
error: warrning,
|
|
1128
|
-
} = ThemePlatformApplicationValidator.getPublicThemes().validate(
|
|
1129
|
-
{
|
|
1130
|
-
pageSize,
|
|
1131
|
-
pageNo,
|
|
1132
|
-
},
|
|
1133
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1134
|
-
);
|
|
1135
|
-
if (warrning) {
|
|
1136
|
-
Logger({
|
|
1137
|
-
level: "WARN",
|
|
1138
|
-
message: `Parameter Validation warrnings for platform > Theme > getPublicThemes \n ${warrning}`,
|
|
1139
|
-
});
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
const query_params = {};
|
|
1143
|
-
query_params["page_size"] = pageSize;
|
|
1144
|
-
query_params["page_no"] = pageNo;
|
|
1145
|
-
|
|
1146
|
-
const response = await PlatformAPIClient.execute(
|
|
1147
|
-
this.config,
|
|
1148
|
-
"get",
|
|
1149
|
-
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/list/public`,
|
|
1150
|
-
query_params,
|
|
1151
|
-
undefined,
|
|
1152
|
-
requestHeaders,
|
|
1153
|
-
{ responseHeaders }
|
|
1154
|
-
);
|
|
1155
|
-
|
|
1156
|
-
let responseData = response;
|
|
1157
|
-
if (responseHeaders) {
|
|
1158
|
-
responseData = response[0];
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
const {
|
|
1162
|
-
error: res_error,
|
|
1163
|
-
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
1164
|
-
abortEarly: false,
|
|
1165
|
-
allowUnknown: true,
|
|
1166
|
-
});
|
|
1167
|
-
|
|
1168
|
-
if (res_error) {
|
|
1169
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1170
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1171
|
-
} else {
|
|
1172
|
-
Logger({
|
|
1173
|
-
level: "WARN",
|
|
1174
|
-
message: `Response Validation Warnings for platform > Theme > getPublicThemes \n ${res_error}`,
|
|
1175
|
-
});
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
return response;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
943
|
/**
|
|
1183
944
|
* @param {ThemePlatformApplicationValidator.GetThemeByIdParam} arg - Arg object
|
|
1184
945
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1185
946
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1186
947
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
1187
948
|
* @name getThemeById
|
|
1188
|
-
* @summary: Get theme
|
|
1189
|
-
* @description: Retrieve a theme by its unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeById/).
|
|
949
|
+
* @summary: Get theme
|
|
950
|
+
* @description: Retrieve a theme by its unique identifier. Response contains theme template data and data stored in theme editor. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeById/).
|
|
1190
951
|
*/
|
|
1191
952
|
async getThemeById(
|
|
1192
953
|
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1263,7 +1024,7 @@ class Theme {
|
|
|
1263
1024
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
1264
1025
|
* @name getThemeForPreview
|
|
1265
1026
|
* @summary: Get theme for preview
|
|
1266
|
-
* @description: Retrieve a theme
|
|
1027
|
+
* @description: Retrieve a theme by its unique identifier. Response contains theme template data and data stored in theme editor. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeForPreview/).
|
|
1267
1028
|
*/
|
|
1268
1029
|
async getThemeForPreview(
|
|
1269
1030
|
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1343,8 +1104,8 @@ class Theme {
|
|
|
1343
1104
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1344
1105
|
* @returns {Promise<any>} - Success response
|
|
1345
1106
|
* @name getThemeLastModified
|
|
1346
|
-
* @summary: Get theme last modified
|
|
1347
|
-
* @description: Retrieve the last modification of a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeLastModified/).
|
|
1107
|
+
* @summary: Get theme last modified date
|
|
1108
|
+
* @description: Retrieve the last modification of a theme used for polling and identifing cross user changes in a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeLastModified/).
|
|
1348
1109
|
*/
|
|
1349
1110
|
async getThemeLastModified(
|
|
1350
1111
|
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1413,97 +1174,14 @@ class Theme {
|
|
|
1413
1174
|
return response;
|
|
1414
1175
|
}
|
|
1415
1176
|
|
|
1416
|
-
/**
|
|
1417
|
-
* @param {ThemePlatformApplicationValidator.GetThemeLibraryParam} arg - Arg object
|
|
1418
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1419
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1420
|
-
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
1421
|
-
* @name getThemeLibrary
|
|
1422
|
-
* @summary: Get theme library
|
|
1423
|
-
* @description: Retrieve themes available in the platform's library. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeLibrary/).
|
|
1424
|
-
*/
|
|
1425
|
-
async getThemeLibrary(
|
|
1426
|
-
{ pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
1427
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1428
|
-
) {
|
|
1429
|
-
const {
|
|
1430
|
-
error,
|
|
1431
|
-
} = ThemePlatformApplicationValidator.getThemeLibrary().validate(
|
|
1432
|
-
{
|
|
1433
|
-
pageSize,
|
|
1434
|
-
pageNo,
|
|
1435
|
-
},
|
|
1436
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1437
|
-
);
|
|
1438
|
-
if (error) {
|
|
1439
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1443
|
-
const {
|
|
1444
|
-
error: warrning,
|
|
1445
|
-
} = ThemePlatformApplicationValidator.getThemeLibrary().validate(
|
|
1446
|
-
{
|
|
1447
|
-
pageSize,
|
|
1448
|
-
pageNo,
|
|
1449
|
-
},
|
|
1450
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1451
|
-
);
|
|
1452
|
-
if (warrning) {
|
|
1453
|
-
Logger({
|
|
1454
|
-
level: "WARN",
|
|
1455
|
-
message: `Parameter Validation warrnings for platform > Theme > getThemeLibrary \n ${warrning}`,
|
|
1456
|
-
});
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
const query_params = {};
|
|
1460
|
-
query_params["page_size"] = pageSize;
|
|
1461
|
-
query_params["page_no"] = pageNo;
|
|
1462
|
-
|
|
1463
|
-
const response = await PlatformAPIClient.execute(
|
|
1464
|
-
this.config,
|
|
1465
|
-
"get",
|
|
1466
|
-
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
|
|
1467
|
-
query_params,
|
|
1468
|
-
undefined,
|
|
1469
|
-
requestHeaders,
|
|
1470
|
-
{ responseHeaders }
|
|
1471
|
-
);
|
|
1472
|
-
|
|
1473
|
-
let responseData = response;
|
|
1474
|
-
if (responseHeaders) {
|
|
1475
|
-
responseData = response[0];
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
const {
|
|
1479
|
-
error: res_error,
|
|
1480
|
-
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
1481
|
-
abortEarly: false,
|
|
1482
|
-
allowUnknown: true,
|
|
1483
|
-
});
|
|
1484
|
-
|
|
1485
|
-
if (res_error) {
|
|
1486
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1487
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1488
|
-
} else {
|
|
1489
|
-
Logger({
|
|
1490
|
-
level: "WARN",
|
|
1491
|
-
message: `Response Validation Warnings for platform > Theme > getThemeLibrary \n ${res_error}`,
|
|
1492
|
-
});
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
return response;
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
1177
|
/**
|
|
1500
1178
|
* @param {ThemePlatformApplicationValidator.IsUpgradableParam} arg - Arg object
|
|
1501
1179
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1502
1180
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1503
1181
|
* @returns {Promise<ThemePlatformModel.ThemeUpgradableResponse>} - Success response
|
|
1504
1182
|
* @name isUpgradable
|
|
1505
|
-
* @summary:
|
|
1506
|
-
* @description: Determine if a theme is eligible for an upgrade.
|
|
1183
|
+
* @summary: Check theme is upgradable
|
|
1184
|
+
* @description: Determine if a public theme is eligible for an upgrade to a new version after any new version released in marketplace. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/isUpgradable/).
|
|
1507
1185
|
*/
|
|
1508
1186
|
async isUpgradable(
|
|
1509
1187
|
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1573,241 +1251,6 @@ class Theme {
|
|
|
1573
1251
|
return response;
|
|
1574
1252
|
}
|
|
1575
1253
|
|
|
1576
|
-
/**
|
|
1577
|
-
* @param {ThemePlatformApplicationValidator.PublishThemeParam} arg - Arg object
|
|
1578
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1579
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1580
|
-
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
1581
|
-
* @name publishTheme
|
|
1582
|
-
* @summary: Publish theme
|
|
1583
|
-
* @description: Make a theme accessible for use. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/publishTheme/).
|
|
1584
|
-
*/
|
|
1585
|
-
async publishTheme(
|
|
1586
|
-
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
1587
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1588
|
-
) {
|
|
1589
|
-
const { error } = ThemePlatformApplicationValidator.publishTheme().validate(
|
|
1590
|
-
{
|
|
1591
|
-
themeId,
|
|
1592
|
-
},
|
|
1593
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1594
|
-
);
|
|
1595
|
-
if (error) {
|
|
1596
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1600
|
-
const {
|
|
1601
|
-
error: warrning,
|
|
1602
|
-
} = ThemePlatformApplicationValidator.publishTheme().validate(
|
|
1603
|
-
{
|
|
1604
|
-
themeId,
|
|
1605
|
-
},
|
|
1606
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1607
|
-
);
|
|
1608
|
-
if (warrning) {
|
|
1609
|
-
Logger({
|
|
1610
|
-
level: "WARN",
|
|
1611
|
-
message: `Parameter Validation warrnings for platform > Theme > publishTheme \n ${warrning}`,
|
|
1612
|
-
});
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
|
-
const query_params = {};
|
|
1616
|
-
|
|
1617
|
-
const response = await PlatformAPIClient.execute(
|
|
1618
|
-
this.config,
|
|
1619
|
-
"put",
|
|
1620
|
-
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/publish`,
|
|
1621
|
-
query_params,
|
|
1622
|
-
undefined,
|
|
1623
|
-
requestHeaders,
|
|
1624
|
-
{ responseHeaders }
|
|
1625
|
-
);
|
|
1626
|
-
|
|
1627
|
-
let responseData = response;
|
|
1628
|
-
if (responseHeaders) {
|
|
1629
|
-
responseData = response[0];
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
const {
|
|
1633
|
-
error: res_error,
|
|
1634
|
-
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
1635
|
-
abortEarly: false,
|
|
1636
|
-
allowUnknown: true,
|
|
1637
|
-
});
|
|
1638
|
-
|
|
1639
|
-
if (res_error) {
|
|
1640
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1641
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1642
|
-
} else {
|
|
1643
|
-
Logger({
|
|
1644
|
-
level: "WARN",
|
|
1645
|
-
message: `Response Validation Warnings for platform > Theme > publishTheme \n ${res_error}`,
|
|
1646
|
-
});
|
|
1647
|
-
}
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
|
-
return response;
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
/**
|
|
1654
|
-
* @param {ThemePlatformApplicationValidator.UnarchiveThemeParam} arg - Arg object
|
|
1655
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1656
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1657
|
-
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
1658
|
-
* @name unarchiveTheme
|
|
1659
|
-
* @summary: Unarchive theme
|
|
1660
|
-
* @description: Retrieve a theme from the archive. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/unarchiveTheme/).
|
|
1661
|
-
*/
|
|
1662
|
-
async unarchiveTheme(
|
|
1663
|
-
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
1664
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1665
|
-
) {
|
|
1666
|
-
const {
|
|
1667
|
-
error,
|
|
1668
|
-
} = ThemePlatformApplicationValidator.unarchiveTheme().validate(
|
|
1669
|
-
{
|
|
1670
|
-
themeId,
|
|
1671
|
-
},
|
|
1672
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1673
|
-
);
|
|
1674
|
-
if (error) {
|
|
1675
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1679
|
-
const {
|
|
1680
|
-
error: warrning,
|
|
1681
|
-
} = ThemePlatformApplicationValidator.unarchiveTheme().validate(
|
|
1682
|
-
{
|
|
1683
|
-
themeId,
|
|
1684
|
-
},
|
|
1685
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1686
|
-
);
|
|
1687
|
-
if (warrning) {
|
|
1688
|
-
Logger({
|
|
1689
|
-
level: "WARN",
|
|
1690
|
-
message: `Parameter Validation warrnings for platform > Theme > unarchiveTheme \n ${warrning}`,
|
|
1691
|
-
});
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
const query_params = {};
|
|
1695
|
-
|
|
1696
|
-
const response = await PlatformAPIClient.execute(
|
|
1697
|
-
this.config,
|
|
1698
|
-
"put",
|
|
1699
|
-
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unarchive`,
|
|
1700
|
-
query_params,
|
|
1701
|
-
undefined,
|
|
1702
|
-
requestHeaders,
|
|
1703
|
-
{ responseHeaders }
|
|
1704
|
-
);
|
|
1705
|
-
|
|
1706
|
-
let responseData = response;
|
|
1707
|
-
if (responseHeaders) {
|
|
1708
|
-
responseData = response[0];
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
const {
|
|
1712
|
-
error: res_error,
|
|
1713
|
-
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
1714
|
-
abortEarly: false,
|
|
1715
|
-
allowUnknown: true,
|
|
1716
|
-
});
|
|
1717
|
-
|
|
1718
|
-
if (res_error) {
|
|
1719
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1720
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1721
|
-
} else {
|
|
1722
|
-
Logger({
|
|
1723
|
-
level: "WARN",
|
|
1724
|
-
message: `Response Validation Warnings for platform > Theme > unarchiveTheme \n ${res_error}`,
|
|
1725
|
-
});
|
|
1726
|
-
}
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
|
-
return response;
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
|
-
/**
|
|
1733
|
-
* @param {ThemePlatformApplicationValidator.UnpublishThemeParam} arg - Arg object
|
|
1734
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1735
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1736
|
-
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
1737
|
-
* @name unpublishTheme
|
|
1738
|
-
* @summary: Unpublish theme
|
|
1739
|
-
* @description: Remove a published theme from public access. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/unpublishTheme/).
|
|
1740
|
-
*/
|
|
1741
|
-
async unpublishTheme(
|
|
1742
|
-
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
1743
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1744
|
-
) {
|
|
1745
|
-
const {
|
|
1746
|
-
error,
|
|
1747
|
-
} = ThemePlatformApplicationValidator.unpublishTheme().validate(
|
|
1748
|
-
{
|
|
1749
|
-
themeId,
|
|
1750
|
-
},
|
|
1751
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1752
|
-
);
|
|
1753
|
-
if (error) {
|
|
1754
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1758
|
-
const {
|
|
1759
|
-
error: warrning,
|
|
1760
|
-
} = ThemePlatformApplicationValidator.unpublishTheme().validate(
|
|
1761
|
-
{
|
|
1762
|
-
themeId,
|
|
1763
|
-
},
|
|
1764
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1765
|
-
);
|
|
1766
|
-
if (warrning) {
|
|
1767
|
-
Logger({
|
|
1768
|
-
level: "WARN",
|
|
1769
|
-
message: `Parameter Validation warrnings for platform > Theme > unpublishTheme \n ${warrning}`,
|
|
1770
|
-
});
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
const query_params = {};
|
|
1774
|
-
|
|
1775
|
-
const response = await PlatformAPIClient.execute(
|
|
1776
|
-
this.config,
|
|
1777
|
-
"put",
|
|
1778
|
-
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unpublish`,
|
|
1779
|
-
query_params,
|
|
1780
|
-
undefined,
|
|
1781
|
-
requestHeaders,
|
|
1782
|
-
{ responseHeaders }
|
|
1783
|
-
);
|
|
1784
|
-
|
|
1785
|
-
let responseData = response;
|
|
1786
|
-
if (responseHeaders) {
|
|
1787
|
-
responseData = response[0];
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
const {
|
|
1791
|
-
error: res_error,
|
|
1792
|
-
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
1793
|
-
abortEarly: false,
|
|
1794
|
-
allowUnknown: true,
|
|
1795
|
-
});
|
|
1796
|
-
|
|
1797
|
-
if (res_error) {
|
|
1798
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
1799
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1800
|
-
} else {
|
|
1801
|
-
Logger({
|
|
1802
|
-
level: "WARN",
|
|
1803
|
-
message: `Response Validation Warnings for platform > Theme > unpublishTheme \n ${res_error}`,
|
|
1804
|
-
});
|
|
1805
|
-
}
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
return response;
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
1254
|
/**
|
|
1812
1255
|
* @param {ThemePlatformApplicationValidator.UpdateMultiplePagesParam} arg
|
|
1813
1256
|
* - Arg object
|
|
@@ -1816,8 +1259,8 @@ class Theme {
|
|
|
1816
1259
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1817
1260
|
* @returns {Promise<ThemePlatformModel.AllAvailablePageSchema>} - Success response
|
|
1818
1261
|
* @name updateMultiplePages
|
|
1819
|
-
* @summary: Update
|
|
1820
|
-
* @description: Modify multiple pages simultaneously. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updateMultiplePages/).
|
|
1262
|
+
* @summary: Update theme pages
|
|
1263
|
+
* @description: Modify multiple pages simultaneously of a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updateMultiplePages/).
|
|
1821
1264
|
*/
|
|
1822
1265
|
async updateMultiplePages(
|
|
1823
1266
|
{ themeId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -1897,7 +1340,7 @@ class Theme {
|
|
|
1897
1340
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1898
1341
|
* @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
|
|
1899
1342
|
* @name updatePage
|
|
1900
|
-
* @summary: Update page
|
|
1343
|
+
* @summary: Update a page
|
|
1901
1344
|
* @description: Modify and update the content of a page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updatePage/).
|
|
1902
1345
|
*/
|
|
1903
1346
|
async updatePage(
|
|
@@ -1979,7 +1422,7 @@ class Theme {
|
|
|
1979
1422
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
1980
1423
|
* @name updateTheme
|
|
1981
1424
|
* @summary: Update theme
|
|
1982
|
-
* @description: Modify and update the content and settings of a theme - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updateTheme/).
|
|
1425
|
+
* @description: Modify and update the content and settings of a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updateTheme/).
|
|
1983
1426
|
*/
|
|
1984
1427
|
async updateTheme(
|
|
1985
1428
|
{ themeId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2058,7 +1501,7 @@ class Theme {
|
|
|
2058
1501
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
2059
1502
|
* @name updateThemeName
|
|
2060
1503
|
* @summary: Update theme name
|
|
2061
|
-
* @description: Modify the name of
|
|
1504
|
+
* @description: Modify the name of the draft theme by theme Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updateThemeName/).
|
|
2062
1505
|
*/
|
|
2063
1506
|
async updateThemeName(
|
|
2064
1507
|
{ themeId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2139,7 +1582,7 @@ class Theme {
|
|
|
2139
1582
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
2140
1583
|
* @name upgradeTheme
|
|
2141
1584
|
* @summary: Upgrade theme
|
|
2142
|
-
* @description:
|
|
1585
|
+
* @description: Update a draft theme to a new version of the marketplace. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/upgradeTheme/).
|
|
2143
1586
|
*/
|
|
2144
1587
|
async upgradeTheme(
|
|
2145
1588
|
{ themeId, requestHeaders } = { requestHeaders: {} },
|