@gofynd/fdk-client-javascript 1.2.0 → 1.3.0
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 +44 -7
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +3 -3
- package/sdk/application/ApplicationAPIClient.js +6 -4
- package/sdk/application/ApplicationClient.d.ts +2 -3
- package/sdk/application/ApplicationClient.js +1 -45
- package/sdk/application/ApplicationConfig.d.ts +46 -6
- package/sdk/application/ApplicationConfig.js +15 -16
- package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
- package/sdk/application/Cart/CartApplicationClient.js +225 -134
- package/sdk/application/Cart/CartApplicationModel.d.ts +4 -4
- package/sdk/application/Cart/CartApplicationModel.js +4 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
- package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
- package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
- package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
- package/sdk/application/Common/CommonApplicationClient.js +13 -11
- package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
- package/sdk/application/Common/CommonApplicationModel.js +2 -58
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
- package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
- package/sdk/application/Content/ContentApplicationClient.js +159 -80
- package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
- package/sdk/application/Content/ContentApplicationModel.js +11 -763
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
- package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
- package/sdk/application/Lead/LeadApplicationClient.js +50 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
- package/sdk/application/Lead/LeadApplicationModel.js +21 -481
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
- package/sdk/application/Order/OrderApplicationClient.js +88 -56
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
- package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
- package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
- package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
- package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
- package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
- package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
- package/sdk/application/Share/ShareApplicationClient.js +51 -31
- package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
- package/sdk/application/Share/ShareApplicationModel.js +0 -38
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
- package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
- package/sdk/application/User/UserApplicationClient.d.ts +74 -35
- package/sdk/application/User/UserApplicationClient.js +252 -161
- package/sdk/application/User/UserApplicationModel.d.ts +3 -401
- package/sdk/application/User/UserApplicationModel.js +2 -490
- package/sdk/common/AxiosHelper.js +1 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +5 -4
- package/sdk/partner/PartnerAPIClient.js +7 -4
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
- package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
- package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
- package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
- package/sdk/platform/Cart/CartPlatformModel.js +104 -54
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
- package/sdk/platform/Common/CommonPlatformClient.js +13 -11
- package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
- package/sdk/platform/Common/CommonPlatformModel.js +23 -57
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
- package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
- package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
- package/sdk/platform/Content/ContentPlatformModel.js +8 -231
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
- package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
- package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
- package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
- package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
- package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
- package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
- package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
- package/sdk/platform/Order/OrderPlatformClient.js +738 -205
- package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
- package/sdk/platform/Order/OrderPlatformModel.js +225 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
- package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
- package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
- package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
- package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
- package/sdk/platform/PlatformAPIClient.d.ts +3 -3
- package/sdk/platform/PlatformAPIClient.js +2 -2
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/PlatformClient.js +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
- package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
- package/sdk/platform/Share/SharePlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
- package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
- package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
- package/sdk/platform/User/UserPlatformModel.js +3 -899
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
- package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
- package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +96 -9
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +117 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
- package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
- package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
- package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -48
- package/sdk/application/ApplicationModels.js +0 -38
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
|
@@ -13,14 +13,95 @@ class Theme {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* @param {ThemePlatformApplicationValidator.
|
|
16
|
+
* @param {ThemePlatformApplicationValidator.AddThemeToApplicationParam} arg
|
|
17
|
+
* - Arg object
|
|
18
|
+
*
|
|
19
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
17
20
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
18
21
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
22
|
+
* @name addThemeToApplication
|
|
23
|
+
* @summary: Add a theme to an application
|
|
24
|
+
* @description: Add a theme to an application by providing the marketplace theme ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/addThemeToApplication/).
|
|
25
|
+
*/
|
|
26
|
+
async addThemeToApplication(
|
|
27
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
28
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
29
|
+
) {
|
|
30
|
+
const {
|
|
31
|
+
error,
|
|
32
|
+
} = ThemePlatformApplicationValidator.addThemeToApplication().validate(
|
|
33
|
+
{
|
|
34
|
+
body,
|
|
35
|
+
},
|
|
36
|
+
{ abortEarly: false, allowUnknown: true }
|
|
37
|
+
);
|
|
38
|
+
if (error) {
|
|
39
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Showing warrnings if extra unknown parameters are found
|
|
43
|
+
const {
|
|
44
|
+
error: warrning,
|
|
45
|
+
} = ThemePlatformApplicationValidator.addThemeToApplication().validate(
|
|
46
|
+
{
|
|
47
|
+
body,
|
|
48
|
+
},
|
|
49
|
+
{ abortEarly: false, allowUnknown: false }
|
|
50
|
+
);
|
|
51
|
+
if (warrning) {
|
|
52
|
+
Logger({
|
|
53
|
+
level: "WARN",
|
|
54
|
+
message: `Parameter Validation warrnings for platform > Theme > addThemeToApplication \n ${warrning}`,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const query_params = {};
|
|
59
|
+
|
|
60
|
+
const response = await PlatformAPIClient.execute(
|
|
61
|
+
this.config,
|
|
62
|
+
"post",
|
|
63
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/`,
|
|
64
|
+
query_params,
|
|
65
|
+
body,
|
|
66
|
+
requestHeaders,
|
|
67
|
+
{ responseHeaders }
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
let responseData = response;
|
|
71
|
+
if (responseHeaders) {
|
|
72
|
+
responseData = response[0];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const {
|
|
76
|
+
error: res_error,
|
|
77
|
+
} = ThemePlatformModel.ThemesSchema().validate(responseData, {
|
|
78
|
+
abortEarly: false,
|
|
79
|
+
allowUnknown: false,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
if (res_error) {
|
|
83
|
+
Logger({
|
|
84
|
+
level: "WARN",
|
|
85
|
+
message: `Response Validation Warnnings for platform > Theme > addThemeToApplication \n ${res_error}`,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return response;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @param {ThemePlatformApplicationValidator.AddToThemeLibraryParam} arg - Arg object
|
|
94
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
95
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
96
|
+
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
19
97
|
* @name addToThemeLibrary
|
|
20
98
|
* @summary: Add a theme to the theme library
|
|
21
99
|
* @description: Theme library is a personalized collection of themes that are chosen and added from the available themes. Use this API to choose a theme and add it to the theme library. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/addToThemeLibrary/).
|
|
22
100
|
*/
|
|
23
|
-
async addToThemeLibrary(
|
|
101
|
+
async addToThemeLibrary(
|
|
102
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
103
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
104
|
+
) {
|
|
24
105
|
const {
|
|
25
106
|
error,
|
|
26
107
|
} = ThemePlatformApplicationValidator.addToThemeLibrary().validate(
|
|
@@ -57,18 +138,18 @@ class Theme {
|
|
|
57
138
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
|
|
58
139
|
query_params,
|
|
59
140
|
body,
|
|
60
|
-
|
|
61
|
-
{
|
|
141
|
+
requestHeaders,
|
|
142
|
+
{ responseHeaders }
|
|
62
143
|
);
|
|
63
144
|
|
|
64
145
|
let responseData = response;
|
|
65
|
-
if (
|
|
146
|
+
if (responseHeaders) {
|
|
66
147
|
responseData = response[0];
|
|
67
148
|
}
|
|
68
149
|
|
|
69
150
|
const {
|
|
70
151
|
error: res_error,
|
|
71
|
-
} = ThemePlatformModel.
|
|
152
|
+
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
72
153
|
abortEarly: false,
|
|
73
154
|
allowUnknown: false,
|
|
74
155
|
});
|
|
@@ -85,16 +166,20 @@ class Theme {
|
|
|
85
166
|
|
|
86
167
|
/**
|
|
87
168
|
* @param {ThemePlatformApplicationValidator.ApplyThemeParam} arg - Arg object
|
|
169
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
88
170
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
89
171
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
90
172
|
* @name applyTheme
|
|
91
|
-
* @summary: Apply a
|
|
92
|
-
* @description:
|
|
173
|
+
* @summary: Apply theme to a specific application
|
|
174
|
+
* @description: Apply theme to a specific application by providing company_id, application_id, and theme_id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/applyTheme/).
|
|
93
175
|
*/
|
|
94
|
-
async applyTheme(
|
|
176
|
+
async applyTheme(
|
|
177
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
178
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
179
|
+
) {
|
|
95
180
|
const { error } = ThemePlatformApplicationValidator.applyTheme().validate(
|
|
96
181
|
{
|
|
97
|
-
|
|
182
|
+
themeId,
|
|
98
183
|
},
|
|
99
184
|
{ abortEarly: false, allowUnknown: true }
|
|
100
185
|
);
|
|
@@ -107,7 +192,7 @@ class Theme {
|
|
|
107
192
|
error: warrning,
|
|
108
193
|
} = ThemePlatformApplicationValidator.applyTheme().validate(
|
|
109
194
|
{
|
|
110
|
-
|
|
195
|
+
themeId,
|
|
111
196
|
},
|
|
112
197
|
{ abortEarly: false, allowUnknown: false }
|
|
113
198
|
);
|
|
@@ -122,16 +207,16 @@ class Theme {
|
|
|
122
207
|
|
|
123
208
|
const response = await PlatformAPIClient.execute(
|
|
124
209
|
this.config,
|
|
125
|
-
"
|
|
126
|
-
`/service/platform/theme/
|
|
210
|
+
"patch",
|
|
211
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/apply`,
|
|
127
212
|
query_params,
|
|
128
|
-
body,
|
|
129
213
|
undefined,
|
|
130
|
-
|
|
214
|
+
requestHeaders,
|
|
215
|
+
{ responseHeaders }
|
|
131
216
|
);
|
|
132
217
|
|
|
133
218
|
let responseData = response;
|
|
134
|
-
if (
|
|
219
|
+
if (responseHeaders) {
|
|
135
220
|
responseData = response[0];
|
|
136
221
|
}
|
|
137
222
|
|
|
@@ -154,13 +239,17 @@ class Theme {
|
|
|
154
239
|
|
|
155
240
|
/**
|
|
156
241
|
* @param {ThemePlatformApplicationValidator.ArchiveThemeParam} arg - Arg object
|
|
242
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
157
243
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
158
|
-
* @returns {Promise<ThemePlatformModel.
|
|
244
|
+
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
159
245
|
* @name archiveTheme
|
|
160
246
|
* @summary: Archive a theme
|
|
161
247
|
* @description: Use this API to store an existing theme but not delete it so that it can be used in future if required. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/archiveTheme/).
|
|
162
248
|
*/
|
|
163
|
-
async archiveTheme(
|
|
249
|
+
async archiveTheme(
|
|
250
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
251
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
252
|
+
) {
|
|
164
253
|
const { error } = ThemePlatformApplicationValidator.archiveTheme().validate(
|
|
165
254
|
{
|
|
166
255
|
themeId,
|
|
@@ -195,18 +284,18 @@ class Theme {
|
|
|
195
284
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/archive`,
|
|
196
285
|
query_params,
|
|
197
286
|
undefined,
|
|
198
|
-
|
|
199
|
-
{
|
|
287
|
+
requestHeaders,
|
|
288
|
+
{ responseHeaders }
|
|
200
289
|
);
|
|
201
290
|
|
|
202
291
|
let responseData = response;
|
|
203
|
-
if (
|
|
292
|
+
if (responseHeaders) {
|
|
204
293
|
responseData = response[0];
|
|
205
294
|
}
|
|
206
295
|
|
|
207
296
|
const {
|
|
208
297
|
error: res_error,
|
|
209
|
-
} = ThemePlatformModel.
|
|
298
|
+
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
210
299
|
abortEarly: false,
|
|
211
300
|
allowUnknown: false,
|
|
212
301
|
});
|
|
@@ -223,13 +312,17 @@ class Theme {
|
|
|
223
312
|
|
|
224
313
|
/**
|
|
225
314
|
* @param {ThemePlatformApplicationValidator.CreatePageParam} arg - Arg object
|
|
315
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
226
316
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
227
317
|
* @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
|
|
228
318
|
* @name createPage
|
|
229
319
|
* @summary: Create a page
|
|
230
320
|
* @description: Use this API to create a page for a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/createPage/).
|
|
231
321
|
*/
|
|
232
|
-
async createPage(
|
|
322
|
+
async createPage(
|
|
323
|
+
{ themeId, body, requestHeaders } = { requestHeaders: {} },
|
|
324
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
325
|
+
) {
|
|
233
326
|
const { error } = ThemePlatformApplicationValidator.createPage().validate(
|
|
234
327
|
{
|
|
235
328
|
themeId,
|
|
@@ -266,12 +359,12 @@ class Theme {
|
|
|
266
359
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
|
|
267
360
|
query_params,
|
|
268
361
|
body,
|
|
269
|
-
|
|
270
|
-
{
|
|
362
|
+
requestHeaders,
|
|
363
|
+
{ responseHeaders }
|
|
271
364
|
);
|
|
272
365
|
|
|
273
366
|
let responseData = response;
|
|
274
|
-
if (
|
|
367
|
+
if (responseHeaders) {
|
|
275
368
|
responseData = response[0];
|
|
276
369
|
}
|
|
277
370
|
|
|
@@ -293,17 +386,22 @@ class Theme {
|
|
|
293
386
|
}
|
|
294
387
|
|
|
295
388
|
/**
|
|
296
|
-
* @param {ThemePlatformApplicationValidator.
|
|
389
|
+
* @param {ThemePlatformApplicationValidator.DeletePageParam} arg - Arg object
|
|
390
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
297
391
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
298
|
-
* @returns {Promise<ThemePlatformModel.
|
|
299
|
-
* @name
|
|
300
|
-
* @summary:
|
|
301
|
-
* @description:
|
|
392
|
+
* @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
|
|
393
|
+
* @name deletePage
|
|
394
|
+
* @summary: Deletes a page
|
|
395
|
+
* @description: Use this API to delete a page for a theme by its ID and page_value. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/deletePage/).
|
|
302
396
|
*/
|
|
303
|
-
async
|
|
304
|
-
|
|
397
|
+
async deletePage(
|
|
398
|
+
{ themeId, pageValue, requestHeaders } = { requestHeaders: {} },
|
|
399
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
400
|
+
) {
|
|
401
|
+
const { error } = ThemePlatformApplicationValidator.deletePage().validate(
|
|
305
402
|
{
|
|
306
|
-
|
|
403
|
+
themeId,
|
|
404
|
+
pageValue,
|
|
307
405
|
},
|
|
308
406
|
{ abortEarly: false, allowUnknown: true }
|
|
309
407
|
);
|
|
@@ -314,16 +412,17 @@ class Theme {
|
|
|
314
412
|
// Showing warrnings if extra unknown parameters are found
|
|
315
413
|
const {
|
|
316
414
|
error: warrning,
|
|
317
|
-
} = ThemePlatformApplicationValidator.
|
|
415
|
+
} = ThemePlatformApplicationValidator.deletePage().validate(
|
|
318
416
|
{
|
|
319
|
-
|
|
417
|
+
themeId,
|
|
418
|
+
pageValue,
|
|
320
419
|
},
|
|
321
420
|
{ abortEarly: false, allowUnknown: false }
|
|
322
421
|
);
|
|
323
422
|
if (warrning) {
|
|
324
423
|
Logger({
|
|
325
424
|
level: "WARN",
|
|
326
|
-
message: `Parameter Validation warrnings for platform > Theme >
|
|
425
|
+
message: `Parameter Validation warrnings for platform > Theme > deletePage \n ${warrning}`,
|
|
327
426
|
});
|
|
328
427
|
}
|
|
329
428
|
|
|
@@ -331,22 +430,22 @@ class Theme {
|
|
|
331
430
|
|
|
332
431
|
const response = await PlatformAPIClient.execute(
|
|
333
432
|
this.config,
|
|
334
|
-
"
|
|
335
|
-
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}
|
|
433
|
+
"delete",
|
|
434
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
|
|
336
435
|
query_params,
|
|
337
|
-
body,
|
|
338
436
|
undefined,
|
|
339
|
-
|
|
437
|
+
requestHeaders,
|
|
438
|
+
{ responseHeaders }
|
|
340
439
|
);
|
|
341
440
|
|
|
342
441
|
let responseData = response;
|
|
343
|
-
if (
|
|
442
|
+
if (responseHeaders) {
|
|
344
443
|
responseData = response[0];
|
|
345
444
|
}
|
|
346
445
|
|
|
347
446
|
const {
|
|
348
447
|
error: res_error,
|
|
349
|
-
} = ThemePlatformModel.
|
|
448
|
+
} = ThemePlatformModel.AvailablePageSchema().validate(responseData, {
|
|
350
449
|
abortEarly: false,
|
|
351
450
|
allowUnknown: false,
|
|
352
451
|
});
|
|
@@ -354,7 +453,7 @@ class Theme {
|
|
|
354
453
|
if (res_error) {
|
|
355
454
|
Logger({
|
|
356
455
|
level: "WARN",
|
|
357
|
-
message: `Response Validation Warnnings for platform > Theme >
|
|
456
|
+
message: `Response Validation Warnnings for platform > Theme > deletePage \n ${res_error}`,
|
|
358
457
|
});
|
|
359
458
|
}
|
|
360
459
|
|
|
@@ -362,21 +461,21 @@ class Theme {
|
|
|
362
461
|
}
|
|
363
462
|
|
|
364
463
|
/**
|
|
365
|
-
* @param {ThemePlatformApplicationValidator.
|
|
464
|
+
* @param {ThemePlatformApplicationValidator.DeleteThemeParam} arg - Arg object
|
|
465
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
366
466
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
367
|
-
* @returns {Promise<ThemePlatformModel.
|
|
368
|
-
* @name
|
|
369
|
-
* @summary:
|
|
370
|
-
* @description:
|
|
467
|
+
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
468
|
+
* @name deleteTheme
|
|
469
|
+
* @summary: Delete a theme
|
|
470
|
+
* @description: This endpoint is used to delete a theme from the specified company and application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/deleteTheme/).
|
|
371
471
|
*/
|
|
372
|
-
async
|
|
373
|
-
{ themeId,
|
|
374
|
-
{
|
|
472
|
+
async deleteTheme(
|
|
473
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
474
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
375
475
|
) {
|
|
376
|
-
const { error } = ThemePlatformApplicationValidator.
|
|
476
|
+
const { error } = ThemePlatformApplicationValidator.deleteTheme().validate(
|
|
377
477
|
{
|
|
378
478
|
themeId,
|
|
379
|
-
pageValue,
|
|
380
479
|
},
|
|
381
480
|
{ abortEarly: false, allowUnknown: true }
|
|
382
481
|
);
|
|
@@ -387,17 +486,16 @@ class Theme {
|
|
|
387
486
|
// Showing warrnings if extra unknown parameters are found
|
|
388
487
|
const {
|
|
389
488
|
error: warrning,
|
|
390
|
-
} = ThemePlatformApplicationValidator.
|
|
489
|
+
} = ThemePlatformApplicationValidator.deleteTheme().validate(
|
|
391
490
|
{
|
|
392
491
|
themeId,
|
|
393
|
-
pageValue,
|
|
394
492
|
},
|
|
395
493
|
{ abortEarly: false, allowUnknown: false }
|
|
396
494
|
);
|
|
397
495
|
if (warrning) {
|
|
398
496
|
Logger({
|
|
399
497
|
level: "WARN",
|
|
400
|
-
message: `Parameter Validation warrnings for platform > Theme >
|
|
498
|
+
message: `Parameter Validation warrnings for platform > Theme > deleteTheme \n ${warrning}`,
|
|
401
499
|
});
|
|
402
500
|
}
|
|
403
501
|
|
|
@@ -406,21 +504,21 @@ class Theme {
|
|
|
406
504
|
const response = await PlatformAPIClient.execute(
|
|
407
505
|
this.config,
|
|
408
506
|
"delete",
|
|
409
|
-
`/service/platform/theme/
|
|
507
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
|
|
410
508
|
query_params,
|
|
411
509
|
undefined,
|
|
412
|
-
|
|
413
|
-
{
|
|
510
|
+
requestHeaders,
|
|
511
|
+
{ responseHeaders }
|
|
414
512
|
);
|
|
415
513
|
|
|
416
514
|
let responseData = response;
|
|
417
|
-
if (
|
|
515
|
+
if (responseHeaders) {
|
|
418
516
|
responseData = response[0];
|
|
419
517
|
}
|
|
420
518
|
|
|
421
519
|
const {
|
|
422
520
|
error: res_error,
|
|
423
|
-
} = ThemePlatformModel.
|
|
521
|
+
} = ThemePlatformModel.ThemesSchema().validate(responseData, {
|
|
424
522
|
abortEarly: false,
|
|
425
523
|
allowUnknown: false,
|
|
426
524
|
});
|
|
@@ -428,7 +526,7 @@ class Theme {
|
|
|
428
526
|
if (res_error) {
|
|
429
527
|
Logger({
|
|
430
528
|
level: "WARN",
|
|
431
|
-
message: `Response Validation Warnnings for platform > Theme >
|
|
529
|
+
message: `Response Validation Warnnings for platform > Theme > deleteTheme \n ${res_error}`,
|
|
432
530
|
});
|
|
433
531
|
}
|
|
434
532
|
|
|
@@ -436,15 +534,21 @@ class Theme {
|
|
|
436
534
|
}
|
|
437
535
|
|
|
438
536
|
/**
|
|
439
|
-
* @param {ThemePlatformApplicationValidator.
|
|
537
|
+
* @param {ThemePlatformApplicationValidator.DuplicateThemeParam} arg - Arg object
|
|
538
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
440
539
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
441
540
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
442
|
-
* @name
|
|
443
|
-
* @summary:
|
|
444
|
-
* @description:
|
|
541
|
+
* @name duplicateTheme
|
|
542
|
+
* @summary: Duplicate a Theme
|
|
543
|
+
* @description: This endpoint duplicates a Theme in the specified application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/duplicateTheme/).
|
|
445
544
|
*/
|
|
446
|
-
async
|
|
447
|
-
|
|
545
|
+
async duplicateTheme(
|
|
546
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
547
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
548
|
+
) {
|
|
549
|
+
const {
|
|
550
|
+
error,
|
|
551
|
+
} = ThemePlatformApplicationValidator.duplicateTheme().validate(
|
|
448
552
|
{
|
|
449
553
|
themeId,
|
|
450
554
|
},
|
|
@@ -457,7 +561,7 @@ class Theme {
|
|
|
457
561
|
// Showing warrnings if extra unknown parameters are found
|
|
458
562
|
const {
|
|
459
563
|
error: warrning,
|
|
460
|
-
} = ThemePlatformApplicationValidator.
|
|
564
|
+
} = ThemePlatformApplicationValidator.duplicateTheme().validate(
|
|
461
565
|
{
|
|
462
566
|
themeId,
|
|
463
567
|
},
|
|
@@ -466,7 +570,7 @@ class Theme {
|
|
|
466
570
|
if (warrning) {
|
|
467
571
|
Logger({
|
|
468
572
|
level: "WARN",
|
|
469
|
-
message: `Parameter Validation warrnings for platform > Theme >
|
|
573
|
+
message: `Parameter Validation warrnings for platform > Theme > duplicateTheme \n ${warrning}`,
|
|
470
574
|
});
|
|
471
575
|
}
|
|
472
576
|
|
|
@@ -474,16 +578,16 @@ class Theme {
|
|
|
474
578
|
|
|
475
579
|
const response = await PlatformAPIClient.execute(
|
|
476
580
|
this.config,
|
|
477
|
-
"
|
|
478
|
-
`/service/platform/theme/
|
|
581
|
+
"post",
|
|
582
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/duplicate`,
|
|
479
583
|
query_params,
|
|
480
584
|
undefined,
|
|
481
|
-
|
|
482
|
-
{
|
|
585
|
+
requestHeaders,
|
|
586
|
+
{ responseHeaders }
|
|
483
587
|
);
|
|
484
588
|
|
|
485
589
|
let responseData = response;
|
|
486
|
-
if (
|
|
590
|
+
if (responseHeaders) {
|
|
487
591
|
responseData = response[0];
|
|
488
592
|
}
|
|
489
593
|
|
|
@@ -497,7 +601,7 @@ class Theme {
|
|
|
497
601
|
if (res_error) {
|
|
498
602
|
Logger({
|
|
499
603
|
level: "WARN",
|
|
500
|
-
message: `Response Validation Warnnings for platform > Theme >
|
|
604
|
+
message: `Response Validation Warnnings for platform > Theme > duplicateTheme \n ${res_error}`,
|
|
501
605
|
});
|
|
502
606
|
}
|
|
503
607
|
|
|
@@ -506,13 +610,17 @@ class Theme {
|
|
|
506
610
|
|
|
507
611
|
/**
|
|
508
612
|
* @param {ThemePlatformApplicationValidator.GetAllPagesParam} arg - Arg object
|
|
613
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
509
614
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
510
615
|
* @returns {Promise<ThemePlatformModel.AllAvailablePageSchema>} - Success response
|
|
511
616
|
* @name getAllPages
|
|
512
617
|
* @summary: Get all pages of a theme
|
|
513
618
|
* @description: Use this API to retrieve all the available pages of a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getAllPages/).
|
|
514
619
|
*/
|
|
515
|
-
async getAllPages(
|
|
620
|
+
async getAllPages(
|
|
621
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
622
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
623
|
+
) {
|
|
516
624
|
const { error } = ThemePlatformApplicationValidator.getAllPages().validate(
|
|
517
625
|
{
|
|
518
626
|
themeId,
|
|
@@ -547,12 +655,12 @@ class Theme {
|
|
|
547
655
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
|
|
548
656
|
query_params,
|
|
549
657
|
undefined,
|
|
550
|
-
|
|
551
|
-
{
|
|
658
|
+
requestHeaders,
|
|
659
|
+
{ responseHeaders }
|
|
552
660
|
);
|
|
553
661
|
|
|
554
662
|
let responseData = response;
|
|
555
|
-
if (
|
|
663
|
+
if (responseHeaders) {
|
|
556
664
|
responseData = response[0];
|
|
557
665
|
}
|
|
558
666
|
|
|
@@ -574,13 +682,159 @@ class Theme {
|
|
|
574
682
|
}
|
|
575
683
|
|
|
576
684
|
/**
|
|
685
|
+
* @param {ThemePlatformApplicationValidator.GetApplicationThemesParam} arg
|
|
686
|
+
* - Arg object
|
|
687
|
+
*
|
|
688
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
689
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
690
|
+
* @returns {Promise<ThemePlatformModel.ThemesSchema[]>} - Success response
|
|
691
|
+
* @name getApplicationThemes
|
|
692
|
+
* @summary: Get all the themes for a specific application
|
|
693
|
+
* @description: Get all the themes for a specific application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getApplicationThemes/).
|
|
694
|
+
*/
|
|
695
|
+
async getApplicationThemes(
|
|
696
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
697
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
698
|
+
) {
|
|
699
|
+
const {
|
|
700
|
+
error,
|
|
701
|
+
} = ThemePlatformApplicationValidator.getApplicationThemes().validate(
|
|
702
|
+
{},
|
|
703
|
+
{ abortEarly: false, allowUnknown: true }
|
|
704
|
+
);
|
|
705
|
+
if (error) {
|
|
706
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
// Showing warrnings if extra unknown parameters are found
|
|
710
|
+
const {
|
|
711
|
+
error: warrning,
|
|
712
|
+
} = ThemePlatformApplicationValidator.getApplicationThemes().validate(
|
|
713
|
+
{},
|
|
714
|
+
{ abortEarly: false, allowUnknown: false }
|
|
715
|
+
);
|
|
716
|
+
if (warrning) {
|
|
717
|
+
Logger({
|
|
718
|
+
level: "WARN",
|
|
719
|
+
message: `Parameter Validation warrnings for platform > Theme > getApplicationThemes \n ${warrning}`,
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
const query_params = {};
|
|
724
|
+
|
|
725
|
+
const response = await PlatformAPIClient.execute(
|
|
726
|
+
this.config,
|
|
727
|
+
"get",
|
|
728
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/themes`,
|
|
729
|
+
query_params,
|
|
730
|
+
undefined,
|
|
731
|
+
requestHeaders,
|
|
732
|
+
{ responseHeaders }
|
|
733
|
+
);
|
|
734
|
+
|
|
735
|
+
let responseData = response;
|
|
736
|
+
if (responseHeaders) {
|
|
737
|
+
responseData = response[0];
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
const { error: res_error } = Joi.array()
|
|
741
|
+
.items(ThemePlatformModel.ThemesSchema())
|
|
742
|
+
.validate(responseData, { abortEarly: false, allowUnknown: false });
|
|
743
|
+
|
|
744
|
+
if (res_error) {
|
|
745
|
+
Logger({
|
|
746
|
+
level: "WARN",
|
|
747
|
+
message: `Response Validation Warnnings for platform > Theme > getApplicationThemes \n ${res_error}`,
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
return response;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* @param {ThemePlatformApplicationValidator.GetApplicationThemesCountParam} arg
|
|
756
|
+
* - Arg object
|
|
757
|
+
*
|
|
758
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
759
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
760
|
+
* @returns {Promise<Object>} - Success response
|
|
761
|
+
* @name getApplicationThemesCount
|
|
762
|
+
* @summary: Get the count of themes for a specific application
|
|
763
|
+
* @description: Get the count of themes for a specific application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getApplicationThemesCount/).
|
|
764
|
+
*/
|
|
765
|
+
async getApplicationThemesCount(
|
|
766
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
767
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
768
|
+
) {
|
|
769
|
+
const {
|
|
770
|
+
error,
|
|
771
|
+
} = ThemePlatformApplicationValidator.getApplicationThemesCount().validate(
|
|
772
|
+
{},
|
|
773
|
+
{ abortEarly: false, allowUnknown: true }
|
|
774
|
+
);
|
|
775
|
+
if (error) {
|
|
776
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
// Showing warrnings if extra unknown parameters are found
|
|
780
|
+
const {
|
|
781
|
+
error: warrning,
|
|
782
|
+
} = ThemePlatformApplicationValidator.getApplicationThemesCount().validate(
|
|
783
|
+
{},
|
|
784
|
+
{ abortEarly: false, allowUnknown: false }
|
|
785
|
+
);
|
|
786
|
+
if (warrning) {
|
|
787
|
+
Logger({
|
|
788
|
+
level: "WARN",
|
|
789
|
+
message: `Parameter Validation warrnings for platform > Theme > getApplicationThemesCount \n ${warrning}`,
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
const query_params = {};
|
|
794
|
+
|
|
795
|
+
const response = await PlatformAPIClient.execute(
|
|
796
|
+
this.config,
|
|
797
|
+
"get",
|
|
798
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/application_themes_count`,
|
|
799
|
+
query_params,
|
|
800
|
+
undefined,
|
|
801
|
+
requestHeaders,
|
|
802
|
+
{ responseHeaders }
|
|
803
|
+
);
|
|
804
|
+
|
|
805
|
+
let responseData = response;
|
|
806
|
+
if (responseHeaders) {
|
|
807
|
+
responseData = response[0];
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
811
|
+
abortEarly: false,
|
|
812
|
+
allowUnknown: false,
|
|
813
|
+
});
|
|
814
|
+
|
|
815
|
+
if (res_error) {
|
|
816
|
+
Logger({
|
|
817
|
+
level: "WARN",
|
|
818
|
+
message: `Response Validation Warnnings for platform > Theme > getApplicationThemesCount \n ${res_error}`,
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
return response;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* @param {ThemePlatformApplicationValidator.GetAppliedThemeParam} arg - Arg object
|
|
827
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
577
828
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
578
829
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
579
830
|
* @name getAppliedTheme
|
|
580
|
-
* @summary: Get the
|
|
581
|
-
* @description:
|
|
831
|
+
* @summary: Get the Applied theme of an Application
|
|
832
|
+
* @description: Get Applied Theme of an Application by Application Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getAppliedTheme/).
|
|
582
833
|
*/
|
|
583
|
-
async getAppliedTheme(
|
|
834
|
+
async getAppliedTheme(
|
|
835
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
836
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
837
|
+
) {
|
|
584
838
|
const {
|
|
585
839
|
error,
|
|
586
840
|
} = ThemePlatformApplicationValidator.getAppliedTheme().validate(
|
|
@@ -610,15 +864,15 @@ class Theme {
|
|
|
610
864
|
const response = await PlatformAPIClient.execute(
|
|
611
865
|
this.config,
|
|
612
866
|
"get",
|
|
613
|
-
`/service/platform/theme/
|
|
867
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}`,
|
|
614
868
|
query_params,
|
|
615
869
|
undefined,
|
|
616
|
-
|
|
617
|
-
{
|
|
870
|
+
requestHeaders,
|
|
871
|
+
{ responseHeaders }
|
|
618
872
|
);
|
|
619
873
|
|
|
620
874
|
let responseData = response;
|
|
621
|
-
if (
|
|
875
|
+
if (responseHeaders) {
|
|
622
876
|
responseData = response[0];
|
|
623
877
|
}
|
|
624
878
|
|
|
@@ -640,13 +894,18 @@ class Theme {
|
|
|
640
894
|
}
|
|
641
895
|
|
|
642
896
|
/**
|
|
897
|
+
* @param {ThemePlatformApplicationValidator.GetFontsParam} arg - Arg object
|
|
898
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
643
899
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
644
900
|
* @returns {Promise<ThemePlatformModel.FontsSchema>} - Success response
|
|
645
901
|
* @name getFonts
|
|
646
902
|
* @summary: Get all the supported fonts in a theme
|
|
647
903
|
* @description: Font is a collection of characters with a similar design. Use this API to retrieve a list of website fonts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getFonts/).
|
|
648
904
|
*/
|
|
649
|
-
async getFonts(
|
|
905
|
+
async getFonts(
|
|
906
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
907
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
908
|
+
) {
|
|
650
909
|
const { error } = ThemePlatformApplicationValidator.getFonts().validate(
|
|
651
910
|
{},
|
|
652
911
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -677,12 +936,12 @@ class Theme {
|
|
|
677
936
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fonts`,
|
|
678
937
|
query_params,
|
|
679
938
|
undefined,
|
|
680
|
-
|
|
681
|
-
{
|
|
939
|
+
requestHeaders,
|
|
940
|
+
{ responseHeaders }
|
|
682
941
|
);
|
|
683
942
|
|
|
684
943
|
let responseData = response;
|
|
685
|
-
if (
|
|
944
|
+
if (responseHeaders) {
|
|
686
945
|
responseData = response[0];
|
|
687
946
|
}
|
|
688
947
|
|
|
@@ -705,13 +964,17 @@ class Theme {
|
|
|
705
964
|
|
|
706
965
|
/**
|
|
707
966
|
* @param {ThemePlatformApplicationValidator.GetPageParam} arg - Arg object
|
|
967
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
708
968
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
709
969
|
* @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
|
|
710
970
|
* @name getPage
|
|
711
971
|
* @summary: Get page of a theme
|
|
712
972
|
* @description: Use this API to retrieve a page of a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getPage/).
|
|
713
973
|
*/
|
|
714
|
-
async getPage(
|
|
974
|
+
async getPage(
|
|
975
|
+
{ themeId, pageValue, requestHeaders } = { requestHeaders: {} },
|
|
976
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
977
|
+
) {
|
|
715
978
|
const { error } = ThemePlatformApplicationValidator.getPage().validate(
|
|
716
979
|
{
|
|
717
980
|
themeId,
|
|
@@ -748,12 +1011,12 @@ class Theme {
|
|
|
748
1011
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
|
|
749
1012
|
query_params,
|
|
750
1013
|
undefined,
|
|
751
|
-
|
|
752
|
-
{
|
|
1014
|
+
requestHeaders,
|
|
1015
|
+
{ responseHeaders }
|
|
753
1016
|
);
|
|
754
1017
|
|
|
755
1018
|
let responseData = response;
|
|
756
|
-
if (
|
|
1019
|
+
if (responseHeaders) {
|
|
757
1020
|
responseData = response[0];
|
|
758
1021
|
}
|
|
759
1022
|
|
|
@@ -776,16 +1039,16 @@ class Theme {
|
|
|
776
1039
|
|
|
777
1040
|
/**
|
|
778
1041
|
* @param {ThemePlatformApplicationValidator.GetPublicThemesParam} arg - Arg object
|
|
1042
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
779
1043
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
780
|
-
* @returns {Promise<ThemePlatformModel.
|
|
781
|
-
* Success response
|
|
1044
|
+
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
782
1045
|
* @name getPublicThemes
|
|
783
1046
|
* @summary: Get all public themes
|
|
784
1047
|
* @description: Use this API to get a list of free themes that you can apply to your website. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getPublicThemes/).
|
|
785
1048
|
*/
|
|
786
1049
|
async getPublicThemes(
|
|
787
|
-
{ pageSize, pageNo } = {},
|
|
788
|
-
{
|
|
1050
|
+
{ pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
1051
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
789
1052
|
) {
|
|
790
1053
|
const {
|
|
791
1054
|
error,
|
|
@@ -827,21 +1090,21 @@ class Theme {
|
|
|
827
1090
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/list/public`,
|
|
828
1091
|
query_params,
|
|
829
1092
|
undefined,
|
|
830
|
-
|
|
831
|
-
{
|
|
1093
|
+
requestHeaders,
|
|
1094
|
+
{ responseHeaders }
|
|
832
1095
|
);
|
|
833
1096
|
|
|
834
1097
|
let responseData = response;
|
|
835
|
-
if (
|
|
1098
|
+
if (responseHeaders) {
|
|
836
1099
|
responseData = response[0];
|
|
837
1100
|
}
|
|
838
1101
|
|
|
839
1102
|
const {
|
|
840
1103
|
error: res_error,
|
|
841
|
-
} = ThemePlatformModel.
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
);
|
|
1104
|
+
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
1105
|
+
abortEarly: false,
|
|
1106
|
+
allowUnknown: false,
|
|
1107
|
+
});
|
|
845
1108
|
|
|
846
1109
|
if (res_error) {
|
|
847
1110
|
Logger({
|
|
@@ -855,13 +1118,17 @@ class Theme {
|
|
|
855
1118
|
|
|
856
1119
|
/**
|
|
857
1120
|
* @param {ThemePlatformApplicationValidator.GetThemeByIdParam} arg - Arg object
|
|
1121
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
858
1122
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
859
1123
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
860
1124
|
* @name getThemeById
|
|
861
|
-
* @summary:
|
|
862
|
-
* @description:
|
|
1125
|
+
* @summary: Get Theme By Theme Id
|
|
1126
|
+
* @description: Get Theme By Theme Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeById/).
|
|
863
1127
|
*/
|
|
864
|
-
async getThemeById(
|
|
1128
|
+
async getThemeById(
|
|
1129
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
1130
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1131
|
+
) {
|
|
865
1132
|
const { error } = ThemePlatformApplicationValidator.getThemeById().validate(
|
|
866
1133
|
{
|
|
867
1134
|
themeId,
|
|
@@ -893,15 +1160,15 @@ class Theme {
|
|
|
893
1160
|
const response = await PlatformAPIClient.execute(
|
|
894
1161
|
this.config,
|
|
895
1162
|
"get",
|
|
896
|
-
`/service/platform/theme/
|
|
1163
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
|
|
897
1164
|
query_params,
|
|
898
1165
|
undefined,
|
|
899
|
-
|
|
900
|
-
{
|
|
1166
|
+
requestHeaders,
|
|
1167
|
+
{ responseHeaders }
|
|
901
1168
|
);
|
|
902
1169
|
|
|
903
1170
|
let responseData = response;
|
|
904
|
-
if (
|
|
1171
|
+
if (responseHeaders) {
|
|
905
1172
|
responseData = response[0];
|
|
906
1173
|
}
|
|
907
1174
|
|
|
@@ -924,13 +1191,17 @@ class Theme {
|
|
|
924
1191
|
|
|
925
1192
|
/**
|
|
926
1193
|
* @param {ThemePlatformApplicationValidator.GetThemeForPreviewParam} arg - Arg object
|
|
1194
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
927
1195
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
928
1196
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
929
1197
|
* @name getThemeForPreview
|
|
930
|
-
* @summary: Get
|
|
931
|
-
* @description:
|
|
1198
|
+
* @summary: Get Theme Preview By Theme Id
|
|
1199
|
+
* @description: Get Theme Preview By Theme Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeForPreview/).
|
|
932
1200
|
*/
|
|
933
|
-
async getThemeForPreview(
|
|
1201
|
+
async getThemeForPreview(
|
|
1202
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
1203
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1204
|
+
) {
|
|
934
1205
|
const {
|
|
935
1206
|
error,
|
|
936
1207
|
} = ThemePlatformApplicationValidator.getThemeForPreview().validate(
|
|
@@ -964,15 +1235,15 @@ class Theme {
|
|
|
964
1235
|
const response = await PlatformAPIClient.execute(
|
|
965
1236
|
this.config,
|
|
966
1237
|
"get",
|
|
967
|
-
`/service/platform/theme/
|
|
1238
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/preview`,
|
|
968
1239
|
query_params,
|
|
969
1240
|
undefined,
|
|
970
|
-
|
|
971
|
-
{
|
|
1241
|
+
requestHeaders,
|
|
1242
|
+
{ responseHeaders }
|
|
972
1243
|
);
|
|
973
1244
|
|
|
974
1245
|
let responseData = response;
|
|
975
|
-
if (
|
|
1246
|
+
if (responseHeaders) {
|
|
976
1247
|
responseData = response[0];
|
|
977
1248
|
}
|
|
978
1249
|
|
|
@@ -997,6 +1268,7 @@ class Theme {
|
|
|
997
1268
|
* @param {ThemePlatformApplicationValidator.GetThemeLastModifiedParam} arg
|
|
998
1269
|
* - Arg object
|
|
999
1270
|
*
|
|
1271
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1000
1272
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1001
1273
|
* @returns {Promise<any>} - Success response
|
|
1002
1274
|
* @name getThemeLastModified
|
|
@@ -1004,8 +1276,8 @@ class Theme {
|
|
|
1004
1276
|
* @description: Use this API to fetch Last-Modified timestamp in header metadata. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeLastModified/).
|
|
1005
1277
|
*/
|
|
1006
1278
|
async getThemeLastModified(
|
|
1007
|
-
{ themeId } = {},
|
|
1008
|
-
{
|
|
1279
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
1280
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1009
1281
|
) {
|
|
1010
1282
|
const {
|
|
1011
1283
|
error,
|
|
@@ -1040,15 +1312,15 @@ class Theme {
|
|
|
1040
1312
|
const response = await PlatformAPIClient.execute(
|
|
1041
1313
|
this.config,
|
|
1042
1314
|
"head",
|
|
1043
|
-
`/service/platform/theme/
|
|
1315
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/polling`,
|
|
1044
1316
|
query_params,
|
|
1045
1317
|
undefined,
|
|
1046
|
-
|
|
1047
|
-
{
|
|
1318
|
+
requestHeaders,
|
|
1319
|
+
{ responseHeaders }
|
|
1048
1320
|
);
|
|
1049
1321
|
|
|
1050
1322
|
let responseData = response;
|
|
1051
|
-
if (
|
|
1323
|
+
if (responseHeaders) {
|
|
1052
1324
|
responseData = response[0];
|
|
1053
1325
|
}
|
|
1054
1326
|
|
|
@@ -1068,16 +1340,16 @@ class Theme {
|
|
|
1068
1340
|
|
|
1069
1341
|
/**
|
|
1070
1342
|
* @param {ThemePlatformApplicationValidator.GetThemeLibraryParam} arg - Arg object
|
|
1343
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1071
1344
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1072
|
-
* @returns {Promise<ThemePlatformModel.
|
|
1073
|
-
* Success response
|
|
1345
|
+
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
1074
1346
|
* @name getThemeLibrary
|
|
1075
1347
|
* @summary: Get a list of themes from the theme library
|
|
1076
1348
|
* @description: Theme library is a personalized collection of themes that are chosen and added from the available themes. Use this API to fetch a list of themes from the library along with their configuration details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getThemeLibrary/).
|
|
1077
1349
|
*/
|
|
1078
1350
|
async getThemeLibrary(
|
|
1079
|
-
{ pageSize, pageNo } = {},
|
|
1080
|
-
{
|
|
1351
|
+
{ pageSize, pageNo, requestHeaders } = { requestHeaders: {} },
|
|
1352
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1081
1353
|
) {
|
|
1082
1354
|
const {
|
|
1083
1355
|
error,
|
|
@@ -1119,21 +1391,21 @@ class Theme {
|
|
|
1119
1391
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
|
|
1120
1392
|
query_params,
|
|
1121
1393
|
undefined,
|
|
1122
|
-
|
|
1123
|
-
{
|
|
1394
|
+
requestHeaders,
|
|
1395
|
+
{ responseHeaders }
|
|
1124
1396
|
);
|
|
1125
1397
|
|
|
1126
1398
|
let responseData = response;
|
|
1127
|
-
if (
|
|
1399
|
+
if (responseHeaders) {
|
|
1128
1400
|
responseData = response[0];
|
|
1129
1401
|
}
|
|
1130
1402
|
|
|
1131
1403
|
const {
|
|
1132
1404
|
error: res_error,
|
|
1133
|
-
} = ThemePlatformModel.
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
);
|
|
1405
|
+
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
1406
|
+
abortEarly: false,
|
|
1407
|
+
allowUnknown: false,
|
|
1408
|
+
});
|
|
1137
1409
|
|
|
1138
1410
|
if (res_error) {
|
|
1139
1411
|
Logger({
|
|
@@ -1147,13 +1419,17 @@ class Theme {
|
|
|
1147
1419
|
|
|
1148
1420
|
/**
|
|
1149
1421
|
* @param {ThemePlatformApplicationValidator.IsUpgradableParam} arg - Arg object
|
|
1422
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1150
1423
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1151
|
-
* @returns {Promise<ThemePlatformModel.
|
|
1424
|
+
* @returns {Promise<ThemePlatformModel.ThemeUpgradableResponse>} - Success response
|
|
1152
1425
|
* @name isUpgradable
|
|
1153
|
-
* @summary:
|
|
1154
|
-
* @description:
|
|
1426
|
+
* @summary: Check if the theme is upgradable
|
|
1427
|
+
* @description: This API endpoint checks if the theme is upgradable for a specific company and application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/isUpgradable/).
|
|
1155
1428
|
*/
|
|
1156
|
-
async isUpgradable(
|
|
1429
|
+
async isUpgradable(
|
|
1430
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
1431
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1432
|
+
) {
|
|
1157
1433
|
const { error } = ThemePlatformApplicationValidator.isUpgradable().validate(
|
|
1158
1434
|
{
|
|
1159
1435
|
themeId,
|
|
@@ -1185,21 +1461,21 @@ class Theme {
|
|
|
1185
1461
|
const response = await PlatformAPIClient.execute(
|
|
1186
1462
|
this.config,
|
|
1187
1463
|
"get",
|
|
1188
|
-
`/service/platform/theme/
|
|
1464
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgradable`,
|
|
1189
1465
|
query_params,
|
|
1190
1466
|
undefined,
|
|
1191
|
-
|
|
1192
|
-
{
|
|
1467
|
+
requestHeaders,
|
|
1468
|
+
{ responseHeaders }
|
|
1193
1469
|
);
|
|
1194
1470
|
|
|
1195
1471
|
let responseData = response;
|
|
1196
|
-
if (
|
|
1472
|
+
if (responseHeaders) {
|
|
1197
1473
|
responseData = response[0];
|
|
1198
1474
|
}
|
|
1199
1475
|
|
|
1200
1476
|
const {
|
|
1201
1477
|
error: res_error,
|
|
1202
|
-
} = ThemePlatformModel.
|
|
1478
|
+
} = ThemePlatformModel.ThemeUpgradableResponse().validate(responseData, {
|
|
1203
1479
|
abortEarly: false,
|
|
1204
1480
|
allowUnknown: false,
|
|
1205
1481
|
});
|
|
@@ -1216,13 +1492,17 @@ class Theme {
|
|
|
1216
1492
|
|
|
1217
1493
|
/**
|
|
1218
1494
|
* @param {ThemePlatformApplicationValidator.PublishThemeParam} arg - Arg object
|
|
1495
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1219
1496
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1220
|
-
* @returns {Promise<ThemePlatformModel.
|
|
1497
|
+
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
1221
1498
|
* @name publishTheme
|
|
1222
1499
|
* @summary: Publish a theme
|
|
1223
1500
|
* @description: Use this API to publish a theme that is either newly created or edited. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/publishTheme/).
|
|
1224
1501
|
*/
|
|
1225
|
-
async publishTheme(
|
|
1502
|
+
async publishTheme(
|
|
1503
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
1504
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1505
|
+
) {
|
|
1226
1506
|
const { error } = ThemePlatformApplicationValidator.publishTheme().validate(
|
|
1227
1507
|
{
|
|
1228
1508
|
themeId,
|
|
@@ -1257,18 +1537,18 @@ class Theme {
|
|
|
1257
1537
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/publish`,
|
|
1258
1538
|
query_params,
|
|
1259
1539
|
undefined,
|
|
1260
|
-
|
|
1261
|
-
{
|
|
1540
|
+
requestHeaders,
|
|
1541
|
+
{ responseHeaders }
|
|
1262
1542
|
);
|
|
1263
1543
|
|
|
1264
1544
|
let responseData = response;
|
|
1265
|
-
if (
|
|
1545
|
+
if (responseHeaders) {
|
|
1266
1546
|
responseData = response[0];
|
|
1267
1547
|
}
|
|
1268
1548
|
|
|
1269
1549
|
const {
|
|
1270
1550
|
error: res_error,
|
|
1271
|
-
} = ThemePlatformModel.
|
|
1551
|
+
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
1272
1552
|
abortEarly: false,
|
|
1273
1553
|
allowUnknown: false,
|
|
1274
1554
|
});
|
|
@@ -1285,13 +1565,17 @@ class Theme {
|
|
|
1285
1565
|
|
|
1286
1566
|
/**
|
|
1287
1567
|
* @param {ThemePlatformApplicationValidator.UnarchiveThemeParam} arg - Arg object
|
|
1568
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1288
1569
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1289
|
-
* @returns {Promise<ThemePlatformModel.
|
|
1570
|
+
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
1290
1571
|
* @name unarchiveTheme
|
|
1291
1572
|
* @summary: Unarchive a theme
|
|
1292
1573
|
* @description: Use this API to restore an archived theme and bring it back for editing or publishing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/unarchiveTheme/).
|
|
1293
1574
|
*/
|
|
1294
|
-
async unarchiveTheme(
|
|
1575
|
+
async unarchiveTheme(
|
|
1576
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
1577
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1578
|
+
) {
|
|
1295
1579
|
const {
|
|
1296
1580
|
error,
|
|
1297
1581
|
} = ThemePlatformApplicationValidator.unarchiveTheme().validate(
|
|
@@ -1328,18 +1612,18 @@ class Theme {
|
|
|
1328
1612
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unarchive`,
|
|
1329
1613
|
query_params,
|
|
1330
1614
|
undefined,
|
|
1331
|
-
|
|
1332
|
-
{
|
|
1615
|
+
requestHeaders,
|
|
1616
|
+
{ responseHeaders }
|
|
1333
1617
|
);
|
|
1334
1618
|
|
|
1335
1619
|
let responseData = response;
|
|
1336
|
-
if (
|
|
1620
|
+
if (responseHeaders) {
|
|
1337
1621
|
responseData = response[0];
|
|
1338
1622
|
}
|
|
1339
1623
|
|
|
1340
1624
|
const {
|
|
1341
1625
|
error: res_error,
|
|
1342
|
-
} = ThemePlatformModel.
|
|
1626
|
+
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
1343
1627
|
abortEarly: false,
|
|
1344
1628
|
allowUnknown: false,
|
|
1345
1629
|
});
|
|
@@ -1356,13 +1640,17 @@ class Theme {
|
|
|
1356
1640
|
|
|
1357
1641
|
/**
|
|
1358
1642
|
* @param {ThemePlatformApplicationValidator.UnpublishThemeParam} arg - Arg object
|
|
1643
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1359
1644
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1360
|
-
* @returns {Promise<ThemePlatformModel.
|
|
1645
|
+
* @returns {Promise<ThemePlatformModel.DummyResponse>} - Success response
|
|
1361
1646
|
* @name unpublishTheme
|
|
1362
1647
|
* @summary: Unpublish a theme
|
|
1363
1648
|
* @description: Use this API to remove an existing theme from the list of available themes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/unpublishTheme/).
|
|
1364
1649
|
*/
|
|
1365
|
-
async unpublishTheme(
|
|
1650
|
+
async unpublishTheme(
|
|
1651
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
1652
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1653
|
+
) {
|
|
1366
1654
|
const {
|
|
1367
1655
|
error,
|
|
1368
1656
|
} = ThemePlatformApplicationValidator.unpublishTheme().validate(
|
|
@@ -1399,18 +1687,18 @@ class Theme {
|
|
|
1399
1687
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unpublish`,
|
|
1400
1688
|
query_params,
|
|
1401
1689
|
undefined,
|
|
1402
|
-
|
|
1403
|
-
{
|
|
1690
|
+
requestHeaders,
|
|
1691
|
+
{ responseHeaders }
|
|
1404
1692
|
);
|
|
1405
1693
|
|
|
1406
1694
|
let responseData = response;
|
|
1407
|
-
if (
|
|
1695
|
+
if (responseHeaders) {
|
|
1408
1696
|
responseData = response[0];
|
|
1409
1697
|
}
|
|
1410
1698
|
|
|
1411
1699
|
const {
|
|
1412
1700
|
error: res_error,
|
|
1413
|
-
} = ThemePlatformModel.
|
|
1701
|
+
} = ThemePlatformModel.DummyResponse().validate(responseData, {
|
|
1414
1702
|
abortEarly: false,
|
|
1415
1703
|
allowUnknown: false,
|
|
1416
1704
|
});
|
|
@@ -1429,6 +1717,7 @@ class Theme {
|
|
|
1429
1717
|
* @param {ThemePlatformApplicationValidator.UpdateMultiplePagesParam} arg
|
|
1430
1718
|
* - Arg object
|
|
1431
1719
|
*
|
|
1720
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1432
1721
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1433
1722
|
* @returns {Promise<ThemePlatformModel.AllAvailablePageSchema>} - Success response
|
|
1434
1723
|
* @name updateMultiplePages
|
|
@@ -1436,8 +1725,8 @@ class Theme {
|
|
|
1436
1725
|
* @description: Use this API to update multiple pages of a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updateMultiplePages/).
|
|
1437
1726
|
*/
|
|
1438
1727
|
async updateMultiplePages(
|
|
1439
|
-
{ themeId, body } = {},
|
|
1440
|
-
{
|
|
1728
|
+
{ themeId, body, requestHeaders } = { requestHeaders: {} },
|
|
1729
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1441
1730
|
) {
|
|
1442
1731
|
const {
|
|
1443
1732
|
error,
|
|
@@ -1477,12 +1766,12 @@ class Theme {
|
|
|
1477
1766
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
|
|
1478
1767
|
query_params,
|
|
1479
1768
|
body,
|
|
1480
|
-
|
|
1481
|
-
{
|
|
1769
|
+
requestHeaders,
|
|
1770
|
+
{ responseHeaders }
|
|
1482
1771
|
);
|
|
1483
1772
|
|
|
1484
1773
|
let responseData = response;
|
|
1485
|
-
if (
|
|
1774
|
+
if (responseHeaders) {
|
|
1486
1775
|
responseData = response[0];
|
|
1487
1776
|
}
|
|
1488
1777
|
|
|
@@ -1505,6 +1794,7 @@ class Theme {
|
|
|
1505
1794
|
|
|
1506
1795
|
/**
|
|
1507
1796
|
* @param {ThemePlatformApplicationValidator.UpdatePageParam} arg - Arg object
|
|
1797
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1508
1798
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1509
1799
|
* @returns {Promise<ThemePlatformModel.AvailablePageSchema>} - Success response
|
|
1510
1800
|
* @name updatePage
|
|
@@ -1512,8 +1802,8 @@ class Theme {
|
|
|
1512
1802
|
* @description: Use this API to update a page for a theme by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updatePage/).
|
|
1513
1803
|
*/
|
|
1514
1804
|
async updatePage(
|
|
1515
|
-
{ themeId, pageValue, body } = {},
|
|
1516
|
-
{
|
|
1805
|
+
{ themeId, pageValue, body, requestHeaders } = { requestHeaders: {} },
|
|
1806
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1517
1807
|
) {
|
|
1518
1808
|
const { error } = ThemePlatformApplicationValidator.updatePage().validate(
|
|
1519
1809
|
{
|
|
@@ -1553,12 +1843,12 @@ class Theme {
|
|
|
1553
1843
|
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
|
|
1554
1844
|
query_params,
|
|
1555
1845
|
body,
|
|
1556
|
-
|
|
1557
|
-
{
|
|
1846
|
+
requestHeaders,
|
|
1847
|
+
{ responseHeaders }
|
|
1558
1848
|
);
|
|
1559
1849
|
|
|
1560
1850
|
let responseData = response;
|
|
1561
|
-
if (
|
|
1851
|
+
if (responseHeaders) {
|
|
1562
1852
|
responseData = response[0];
|
|
1563
1853
|
}
|
|
1564
1854
|
|
|
@@ -1581,13 +1871,17 @@ class Theme {
|
|
|
1581
1871
|
|
|
1582
1872
|
/**
|
|
1583
1873
|
* @param {ThemePlatformApplicationValidator.UpdateThemeParam} arg - Arg object
|
|
1874
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1584
1875
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1585
1876
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
1586
1877
|
* @name updateTheme
|
|
1587
|
-
* @summary: Update a
|
|
1588
|
-
* @description:
|
|
1878
|
+
* @summary: Update theme for a specific company and application
|
|
1879
|
+
* @description: Update theme for a specific company and application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updateTheme/).
|
|
1589
1880
|
*/
|
|
1590
|
-
async updateTheme(
|
|
1881
|
+
async updateTheme(
|
|
1882
|
+
{ themeId, body, requestHeaders } = { requestHeaders: {} },
|
|
1883
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1884
|
+
) {
|
|
1591
1885
|
const { error } = ThemePlatformApplicationValidator.updateTheme().validate(
|
|
1592
1886
|
{
|
|
1593
1887
|
themeId,
|
|
@@ -1621,15 +1915,15 @@ class Theme {
|
|
|
1621
1915
|
const response = await PlatformAPIClient.execute(
|
|
1622
1916
|
this.config,
|
|
1623
1917
|
"put",
|
|
1624
|
-
`/service/platform/theme/
|
|
1918
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
|
|
1625
1919
|
query_params,
|
|
1626
1920
|
body,
|
|
1627
|
-
|
|
1628
|
-
{
|
|
1921
|
+
requestHeaders,
|
|
1922
|
+
{ responseHeaders }
|
|
1629
1923
|
);
|
|
1630
1924
|
|
|
1631
1925
|
let responseData = response;
|
|
1632
|
-
if (
|
|
1926
|
+
if (responseHeaders) {
|
|
1633
1927
|
responseData = response[0];
|
|
1634
1928
|
}
|
|
1635
1929
|
|
|
@@ -1650,15 +1944,96 @@ class Theme {
|
|
|
1650
1944
|
return response;
|
|
1651
1945
|
}
|
|
1652
1946
|
|
|
1947
|
+
/**
|
|
1948
|
+
* @param {ThemePlatformApplicationValidator.UpdateThemeNameParam} arg - Arg object
|
|
1949
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1950
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1951
|
+
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
1952
|
+
* @name updateThemeName
|
|
1953
|
+
* @summary: Update Theme Name
|
|
1954
|
+
* @description: Update the name of a theme for a specific company and application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updateThemeName/).
|
|
1955
|
+
*/
|
|
1956
|
+
async updateThemeName(
|
|
1957
|
+
{ themeId, body, requestHeaders } = { requestHeaders: {} },
|
|
1958
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1959
|
+
) {
|
|
1960
|
+
const {
|
|
1961
|
+
error,
|
|
1962
|
+
} = ThemePlatformApplicationValidator.updateThemeName().validate(
|
|
1963
|
+
{
|
|
1964
|
+
themeId,
|
|
1965
|
+
body,
|
|
1966
|
+
},
|
|
1967
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1968
|
+
);
|
|
1969
|
+
if (error) {
|
|
1970
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1974
|
+
const {
|
|
1975
|
+
error: warrning,
|
|
1976
|
+
} = ThemePlatformApplicationValidator.updateThemeName().validate(
|
|
1977
|
+
{
|
|
1978
|
+
themeId,
|
|
1979
|
+
body,
|
|
1980
|
+
},
|
|
1981
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1982
|
+
);
|
|
1983
|
+
if (warrning) {
|
|
1984
|
+
Logger({
|
|
1985
|
+
level: "WARN",
|
|
1986
|
+
message: `Parameter Validation warrnings for platform > Theme > updateThemeName \n ${warrning}`,
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
const query_params = {};
|
|
1991
|
+
|
|
1992
|
+
const response = await PlatformAPIClient.execute(
|
|
1993
|
+
this.config,
|
|
1994
|
+
"patch",
|
|
1995
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/name`,
|
|
1996
|
+
query_params,
|
|
1997
|
+
body,
|
|
1998
|
+
requestHeaders,
|
|
1999
|
+
{ responseHeaders }
|
|
2000
|
+
);
|
|
2001
|
+
|
|
2002
|
+
let responseData = response;
|
|
2003
|
+
if (responseHeaders) {
|
|
2004
|
+
responseData = response[0];
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
const {
|
|
2008
|
+
error: res_error,
|
|
2009
|
+
} = ThemePlatformModel.ThemesSchema().validate(responseData, {
|
|
2010
|
+
abortEarly: false,
|
|
2011
|
+
allowUnknown: false,
|
|
2012
|
+
});
|
|
2013
|
+
|
|
2014
|
+
if (res_error) {
|
|
2015
|
+
Logger({
|
|
2016
|
+
level: "WARN",
|
|
2017
|
+
message: `Response Validation Warnnings for platform > Theme > updateThemeName \n ${res_error}`,
|
|
2018
|
+
});
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
return response;
|
|
2022
|
+
}
|
|
2023
|
+
|
|
1653
2024
|
/**
|
|
1654
2025
|
* @param {ThemePlatformApplicationValidator.UpgradeThemeParam} arg - Arg object
|
|
2026
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1655
2027
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1656
2028
|
* @returns {Promise<ThemePlatformModel.ThemesSchema>} - Success response
|
|
1657
2029
|
* @name upgradeTheme
|
|
1658
|
-
* @summary: Upgrade
|
|
1659
|
-
* @description:
|
|
2030
|
+
* @summary: Upgrade an application
|
|
2031
|
+
* @description: This endpoint allows you to upgrade an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/upgradeTheme/).
|
|
1660
2032
|
*/
|
|
1661
|
-
async upgradeTheme(
|
|
2033
|
+
async upgradeTheme(
|
|
2034
|
+
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
2035
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2036
|
+
) {
|
|
1662
2037
|
const { error } = ThemePlatformApplicationValidator.upgradeTheme().validate(
|
|
1663
2038
|
{
|
|
1664
2039
|
themeId,
|
|
@@ -1690,15 +2065,15 @@ class Theme {
|
|
|
1690
2065
|
const response = await PlatformAPIClient.execute(
|
|
1691
2066
|
this.config,
|
|
1692
2067
|
"put",
|
|
1693
|
-
`/service/platform/theme/
|
|
2068
|
+
`/service/platform/theme/v2.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgrade`,
|
|
1694
2069
|
query_params,
|
|
1695
2070
|
undefined,
|
|
1696
|
-
|
|
1697
|
-
{
|
|
2071
|
+
requestHeaders,
|
|
2072
|
+
{ responseHeaders }
|
|
1698
2073
|
);
|
|
1699
2074
|
|
|
1700
2075
|
let responseData = response;
|
|
1701
|
-
if (
|
|
2076
|
+
if (responseHeaders) {
|
|
1702
2077
|
responseData = response[0];
|
|
1703
2078
|
}
|
|
1704
2079
|
|