@gofynd/fdk-client-javascript 1.4.15-beta.1 → 1.4.15-beta.11
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 +2 -2
- package/application.d.ts +1 -2
- package/application.js +2 -3
- package/index.d.ts +1 -2
- package/index.js +7 -1
- package/package.json +3 -4
- package/sdk/application/ApplicationClient.js +0 -18
- package/sdk/application/Cart/CartApplicationClient.d.ts +55 -90
- package/sdk/application/Cart/CartApplicationClient.js +60 -1185
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +90 -142
- package/sdk/application/Catalog/CatalogApplicationClient.js +187 -1293
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
- package/sdk/application/Common/CommonApplicationClient.js +5 -89
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -145
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +31 -718
- package/sdk/application/Content/ContentApplicationClient.d.ts +46 -78
- package/sdk/application/Content/ContentApplicationClient.js +77 -914
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +19 -125
- package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
- package/sdk/application/Lead/LeadApplicationClient.js +32 -202
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -39
- package/sdk/application/Logistic/LogisticApplicationClient.js +50 -478
- package/sdk/application/Order/OrderApplicationClient.d.ts +22 -42
- package/sdk/application/Order/OrderApplicationClient.js +86 -472
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -212
- package/sdk/application/Payment/PaymentApplicationClient.js +57 -2102
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -28
- package/sdk/application/Rewards/RewardsApplicationClient.js +16 -305
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
- package/sdk/application/Share/ShareApplicationClient.js +34 -294
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
- package/sdk/application/Theme/ThemeApplicationClient.js +28 -162
- package/sdk/application/User/UserApplicationClient.d.ts +85 -136
- package/sdk/application/User/UserApplicationClient.js +45 -1815
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +2 -5
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -47
- package/sdk/application/index.d.ts +0 -18
- package/sdk/application/index.js +0 -33
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/OAuthClient.js +1 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -40
- package/sdk/partner/Theme/ThemePartnerModel.js +2 -24
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +39 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +247 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +33 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +37 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +193 -1
- package/sdk/platform/Cart/CartPlatformModel.js +132 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +0 -7
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +14 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +6 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +10 -0
- package/sdk/platform/Order/OrderPlatformClient.js +99 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +7 -0
- package/sdk/platform/Order/OrderPlatformModel.js +3 -0
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +56 -19
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +42 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +3 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +2 -2
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -40
- package/sdk/platform/Theme/ThemePlatformModel.js +2 -24
- package/sdk/public/Configuration/ConfigurationPublicClient.js +5 -2
- package/sdk/public/Content/ContentPublicClient.d.ts +1 -1
- package/sdk/public/Content/ContentPublicClient.js +14 -2
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +14 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +5 -2
- package/sdk/application/Cart/CartApplicationModel.d.ts +0 -3994
- package/sdk/application/Cart/CartApplicationModel.js +0 -2497
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -769
- package/sdk/application/Cart/CartApplicationValidator.js +0 -530
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3857
- package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2629
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
- package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
- package/sdk/application/Common/CommonApplicationModel.js +0 -308
- package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
- package/sdk/application/Common/CommonApplicationValidator.js +0 -38
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
- package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2556
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1887
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
- package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2133
- package/sdk/application/Content/ContentApplicationModel.js +0 -1589
- package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -284
- package/sdk/application/Content/ContentApplicationValidator.js +0 -264
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -272
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -190
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
- package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
- package/sdk/application/Lead/LeadApplicationModel.js +0 -480
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -1675
- package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1121
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -254
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -190
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2296
- package/sdk/application/Order/OrderApplicationModel.js +0 -1471
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -265
- package/sdk/application/Order/OrderApplicationValidator.js +0 -197
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4058
- package/sdk/application/Payment/PaymentApplicationModel.js +0 -2630
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
- package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
- package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
- package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
- package/sdk/application/Share/ShareApplicationModel.js +0 -234
- package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
- package/sdk/application/Share/ShareApplicationValidator.js +0 -91
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1713
- package/sdk/application/Theme/ThemeApplicationModel.js +0 -1426
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -66
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -58
- package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
- package/sdk/application/User/UserApplicationModel.js +0 -1382
- package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
- package/sdk/application/User/UserApplicationValidator.js +0 -573
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -52
- package/sdk/application/Webhook/WebhookApplicationModel.js +0 -46
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
- package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
- package/sdk/common/Clickstream.d.ts +0 -1
- package/sdk/common/Clickstream.js +0 -464
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
1
|
const {
|
|
3
2
|
FDKClientValidationError,
|
|
4
3
|
FDKResponseValidationError,
|
|
5
4
|
} = require("../../common/FDKError");
|
|
5
|
+
|
|
6
|
+
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
6
7
|
const constructUrl = require("../constructUrl");
|
|
7
8
|
const Paginator = require("../../common/Paginator");
|
|
8
|
-
const
|
|
9
|
-
const ConfigurationApplicationModel = require("./ConfigurationApplicationModel");
|
|
10
|
-
const { Logger } = require("./../../common/Logger");
|
|
11
|
-
const Joi = require("joi");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
12
10
|
|
|
13
11
|
class Configuration {
|
|
14
12
|
constructor(_conf) {
|
|
@@ -52,11 +50,9 @@ class Configuration {
|
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
/**
|
|
55
|
-
* @param {ConfigurationApplicationValidator.GetAppCurrenciesParam} arg - Arg object.
|
|
56
53
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
57
54
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
58
|
-
* @returns {Promise<
|
|
59
|
-
* Success response
|
|
55
|
+
* @returns {Promise<AppCurrencyResponse>} - Success response
|
|
60
56
|
* @name getAppCurrencies
|
|
61
57
|
* @summary: Get currency configuration
|
|
62
58
|
* @description: Get currency configuration of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getAppCurrencies/).
|
|
@@ -65,30 +61,6 @@ class Configuration {
|
|
|
65
61
|
{ requestHeaders } = { requestHeaders: {} },
|
|
66
62
|
{ responseHeaders } = { responseHeaders: false }
|
|
67
63
|
) {
|
|
68
|
-
const {
|
|
69
|
-
error,
|
|
70
|
-
} = ConfigurationApplicationValidator.getAppCurrencies().validate(
|
|
71
|
-
{},
|
|
72
|
-
{ abortEarly: false, allowUnknown: true }
|
|
73
|
-
);
|
|
74
|
-
if (error) {
|
|
75
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Showing warrnings if extra unknown parameters are found
|
|
79
|
-
const {
|
|
80
|
-
error: warrning,
|
|
81
|
-
} = ConfigurationApplicationValidator.getAppCurrencies().validate(
|
|
82
|
-
{},
|
|
83
|
-
{ abortEarly: false, allowUnknown: false }
|
|
84
|
-
);
|
|
85
|
-
if (warrning) {
|
|
86
|
-
Logger({
|
|
87
|
-
level: "WARN",
|
|
88
|
-
message: `Parameter Validation warrnings for application > Configuration > getAppCurrencies \n ${warrning}`,
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
64
|
const query_params = {};
|
|
93
65
|
|
|
94
66
|
const xHeaders = {};
|
|
@@ -111,33 +83,13 @@ class Configuration {
|
|
|
111
83
|
responseData = response[0];
|
|
112
84
|
}
|
|
113
85
|
|
|
114
|
-
const {
|
|
115
|
-
error: res_error,
|
|
116
|
-
} = ConfigurationApplicationModel.AppCurrencyResponse().validate(
|
|
117
|
-
responseData,
|
|
118
|
-
{ abortEarly: false, allowUnknown: true }
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
if (res_error) {
|
|
122
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
123
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
124
|
-
} else {
|
|
125
|
-
Logger({
|
|
126
|
-
level: "WARN",
|
|
127
|
-
message: `Response Validation Warnings for application > Configuration > getAppCurrencies \n ${res_error}`,
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
86
|
return response;
|
|
133
87
|
}
|
|
134
88
|
|
|
135
89
|
/**
|
|
136
|
-
* @param {ConfigurationApplicationValidator.GetAppStaffListParam} arg - Arg object.
|
|
137
90
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
138
91
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
139
|
-
* @returns {Promise<
|
|
140
|
-
* Success response
|
|
92
|
+
* @returns {Promise<AppStaffListResponse>} - Success response
|
|
141
93
|
* @name getAppStaffList
|
|
142
94
|
* @summary: List staff members
|
|
143
95
|
* @description: List all staff members of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getAppStaffList/).
|
|
@@ -154,30 +106,6 @@ class Configuration {
|
|
|
154
106
|
} = { requestHeaders: {} },
|
|
155
107
|
{ responseHeaders } = { responseHeaders: false }
|
|
156
108
|
) {
|
|
157
|
-
const {
|
|
158
|
-
error,
|
|
159
|
-
} = ConfigurationApplicationValidator.getAppStaffList().validate(
|
|
160
|
-
{ pageNo, pageSize, orderIncent, orderingStore, user, userName },
|
|
161
|
-
{ abortEarly: false, allowUnknown: true }
|
|
162
|
-
);
|
|
163
|
-
if (error) {
|
|
164
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// Showing warrnings if extra unknown parameters are found
|
|
168
|
-
const {
|
|
169
|
-
error: warrning,
|
|
170
|
-
} = ConfigurationApplicationValidator.getAppStaffList().validate(
|
|
171
|
-
{ pageNo, pageSize, orderIncent, orderingStore, user, userName },
|
|
172
|
-
{ abortEarly: false, allowUnknown: false }
|
|
173
|
-
);
|
|
174
|
-
if (warrning) {
|
|
175
|
-
Logger({
|
|
176
|
-
level: "WARN",
|
|
177
|
-
message: `Parameter Validation warrnings for application > Configuration > getAppStaffList \n ${warrning}`,
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
|
|
181
109
|
const query_params = {};
|
|
182
110
|
query_params["page_no"] = pageNo;
|
|
183
111
|
query_params["page_size"] = pageSize;
|
|
@@ -206,33 +134,13 @@ class Configuration {
|
|
|
206
134
|
responseData = response[0];
|
|
207
135
|
}
|
|
208
136
|
|
|
209
|
-
const {
|
|
210
|
-
error: res_error,
|
|
211
|
-
} = ConfigurationApplicationModel.AppStaffListResponse().validate(
|
|
212
|
-
responseData,
|
|
213
|
-
{ abortEarly: false, allowUnknown: true }
|
|
214
|
-
);
|
|
215
|
-
|
|
216
|
-
if (res_error) {
|
|
217
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
218
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
219
|
-
} else {
|
|
220
|
-
Logger({
|
|
221
|
-
level: "WARN",
|
|
222
|
-
message: `Response Validation Warnings for application > Configuration > getAppStaffList \n ${res_error}`,
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
137
|
return response;
|
|
228
138
|
}
|
|
229
139
|
|
|
230
140
|
/**
|
|
231
|
-
* @param {ConfigurationApplicationValidator.GetAppStaffsParam} arg - Arg object.
|
|
232
141
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
233
142
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
234
|
-
* @returns {Promise<
|
|
235
|
-
* Success response
|
|
143
|
+
* @returns {Promise<AppStaffResponse>} - Success response
|
|
236
144
|
* @name getAppStaffs
|
|
237
145
|
* @summary: Get staff member
|
|
238
146
|
* @description: Get a staff user including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getAppStaffs/).
|
|
@@ -243,28 +151,6 @@ class Configuration {
|
|
|
243
151
|
},
|
|
244
152
|
{ responseHeaders } = { responseHeaders: false }
|
|
245
153
|
) {
|
|
246
|
-
const { error } = ConfigurationApplicationValidator.getAppStaffs().validate(
|
|
247
|
-
{ orderIncent, orderingStore, user },
|
|
248
|
-
{ abortEarly: false, allowUnknown: true }
|
|
249
|
-
);
|
|
250
|
-
if (error) {
|
|
251
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
// Showing warrnings if extra unknown parameters are found
|
|
255
|
-
const {
|
|
256
|
-
error: warrning,
|
|
257
|
-
} = ConfigurationApplicationValidator.getAppStaffs().validate(
|
|
258
|
-
{ orderIncent, orderingStore, user },
|
|
259
|
-
{ abortEarly: false, allowUnknown: false }
|
|
260
|
-
);
|
|
261
|
-
if (warrning) {
|
|
262
|
-
Logger({
|
|
263
|
-
level: "WARN",
|
|
264
|
-
message: `Parameter Validation warrnings for application > Configuration > getAppStaffs \n ${warrning}`,
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
|
|
268
154
|
const query_params = {};
|
|
269
155
|
query_params["order_incent"] = orderIncent;
|
|
270
156
|
query_params["ordering_store"] = orderingStore;
|
|
@@ -290,32 +176,13 @@ class Configuration {
|
|
|
290
176
|
responseData = response[0];
|
|
291
177
|
}
|
|
292
178
|
|
|
293
|
-
const {
|
|
294
|
-
error: res_error,
|
|
295
|
-
} = ConfigurationApplicationModel.AppStaffResponse().validate(
|
|
296
|
-
responseData,
|
|
297
|
-
{ abortEarly: false, allowUnknown: true }
|
|
298
|
-
);
|
|
299
|
-
|
|
300
|
-
if (res_error) {
|
|
301
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
302
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
303
|
-
} else {
|
|
304
|
-
Logger({
|
|
305
|
-
level: "WARN",
|
|
306
|
-
message: `Response Validation Warnings for application > Configuration > getAppStaffs \n ${res_error}`,
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
|
|
311
179
|
return response;
|
|
312
180
|
}
|
|
313
181
|
|
|
314
182
|
/**
|
|
315
|
-
* @param {ConfigurationApplicationValidator.GetApplicationParam} arg - Arg object.
|
|
316
183
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
317
184
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
318
|
-
* @returns {Promise<
|
|
185
|
+
* @returns {Promise<Application>} - Success response
|
|
319
186
|
* @name getApplication
|
|
320
187
|
* @summary: Get sales channel
|
|
321
188
|
* @description: Get details of the current sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getApplication/).
|
|
@@ -324,30 +191,6 @@ class Configuration {
|
|
|
324
191
|
{ requestHeaders } = { requestHeaders: {} },
|
|
325
192
|
{ responseHeaders } = { responseHeaders: false }
|
|
326
193
|
) {
|
|
327
|
-
const {
|
|
328
|
-
error,
|
|
329
|
-
} = ConfigurationApplicationValidator.getApplication().validate(
|
|
330
|
-
{},
|
|
331
|
-
{ abortEarly: false, allowUnknown: true }
|
|
332
|
-
);
|
|
333
|
-
if (error) {
|
|
334
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// Showing warrnings if extra unknown parameters are found
|
|
338
|
-
const {
|
|
339
|
-
error: warrning,
|
|
340
|
-
} = ConfigurationApplicationValidator.getApplication().validate(
|
|
341
|
-
{},
|
|
342
|
-
{ abortEarly: false, allowUnknown: false }
|
|
343
|
-
);
|
|
344
|
-
if (warrning) {
|
|
345
|
-
Logger({
|
|
346
|
-
level: "WARN",
|
|
347
|
-
message: `Parameter Validation warrnings for application > Configuration > getApplication \n ${warrning}`,
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
|
|
351
194
|
const query_params = {};
|
|
352
195
|
|
|
353
196
|
const xHeaders = {};
|
|
@@ -370,33 +213,13 @@ class Configuration {
|
|
|
370
213
|
responseData = response[0];
|
|
371
214
|
}
|
|
372
215
|
|
|
373
|
-
const {
|
|
374
|
-
error: res_error,
|
|
375
|
-
} = ConfigurationApplicationModel.Application().validate(responseData, {
|
|
376
|
-
abortEarly: false,
|
|
377
|
-
allowUnknown: true,
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
if (res_error) {
|
|
381
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
382
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
383
|
-
} else {
|
|
384
|
-
Logger({
|
|
385
|
-
level: "WARN",
|
|
386
|
-
message: `Response Validation Warnings for application > Configuration > getApplication \n ${res_error}`,
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
|
|
391
216
|
return response;
|
|
392
217
|
}
|
|
393
218
|
|
|
394
219
|
/**
|
|
395
|
-
* @param {ConfigurationApplicationValidator.GetBasicDetailsParam} arg - Arg object.
|
|
396
220
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
397
221
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
398
|
-
* @returns {Promise<
|
|
399
|
-
* Success response
|
|
222
|
+
* @returns {Promise<ApplicationDetail>} - Success response
|
|
400
223
|
* @name getBasicDetails
|
|
401
224
|
* @summary: Get Sales channel
|
|
402
225
|
* @description: Get basic details of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getBasicDetails/).
|
|
@@ -405,30 +228,6 @@ class Configuration {
|
|
|
405
228
|
{ requestHeaders } = { requestHeaders: {} },
|
|
406
229
|
{ responseHeaders } = { responseHeaders: false }
|
|
407
230
|
) {
|
|
408
|
-
const {
|
|
409
|
-
error,
|
|
410
|
-
} = ConfigurationApplicationValidator.getBasicDetails().validate(
|
|
411
|
-
{},
|
|
412
|
-
{ abortEarly: false, allowUnknown: true }
|
|
413
|
-
);
|
|
414
|
-
if (error) {
|
|
415
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
// Showing warrnings if extra unknown parameters are found
|
|
419
|
-
const {
|
|
420
|
-
error: warrning,
|
|
421
|
-
} = ConfigurationApplicationValidator.getBasicDetails().validate(
|
|
422
|
-
{},
|
|
423
|
-
{ abortEarly: false, allowUnknown: false }
|
|
424
|
-
);
|
|
425
|
-
if (warrning) {
|
|
426
|
-
Logger({
|
|
427
|
-
level: "WARN",
|
|
428
|
-
message: `Parameter Validation warrnings for application > Configuration > getBasicDetails \n ${warrning}`,
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
|
|
432
231
|
const query_params = {};
|
|
433
232
|
|
|
434
233
|
const xHeaders = {};
|
|
@@ -451,34 +250,13 @@ class Configuration {
|
|
|
451
250
|
responseData = response[0];
|
|
452
251
|
}
|
|
453
252
|
|
|
454
|
-
const {
|
|
455
|
-
error: res_error,
|
|
456
|
-
} = ConfigurationApplicationModel.ApplicationDetail().validate(
|
|
457
|
-
responseData,
|
|
458
|
-
{ abortEarly: false, allowUnknown: true }
|
|
459
|
-
);
|
|
460
|
-
|
|
461
|
-
if (res_error) {
|
|
462
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
463
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
464
|
-
} else {
|
|
465
|
-
Logger({
|
|
466
|
-
level: "WARN",
|
|
467
|
-
message: `Response Validation Warnings for application > Configuration > getBasicDetails \n ${res_error}`,
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
|
|
472
253
|
return response;
|
|
473
254
|
}
|
|
474
255
|
|
|
475
256
|
/**
|
|
476
|
-
* @param {ConfigurationApplicationValidator.GetContactInfoParam} arg - Arg object.
|
|
477
257
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
478
258
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
479
|
-
* @returns {Promise<
|
|
480
|
-
* - Success response
|
|
481
|
-
*
|
|
259
|
+
* @returns {Promise<ApplicationInformation>} - Success response
|
|
482
260
|
* @name getContactInfo
|
|
483
261
|
* @summary: Get sales channel contact
|
|
484
262
|
* @description: Get contact details of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getContactInfo/).
|
|
@@ -487,30 +265,6 @@ class Configuration {
|
|
|
487
265
|
{ requestHeaders } = { requestHeaders: {} },
|
|
488
266
|
{ responseHeaders } = { responseHeaders: false }
|
|
489
267
|
) {
|
|
490
|
-
const {
|
|
491
|
-
error,
|
|
492
|
-
} = ConfigurationApplicationValidator.getContactInfo().validate(
|
|
493
|
-
{},
|
|
494
|
-
{ abortEarly: false, allowUnknown: true }
|
|
495
|
-
);
|
|
496
|
-
if (error) {
|
|
497
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
// Showing warrnings if extra unknown parameters are found
|
|
501
|
-
const {
|
|
502
|
-
error: warrning,
|
|
503
|
-
} = ConfigurationApplicationValidator.getContactInfo().validate(
|
|
504
|
-
{},
|
|
505
|
-
{ abortEarly: false, allowUnknown: false }
|
|
506
|
-
);
|
|
507
|
-
if (warrning) {
|
|
508
|
-
Logger({
|
|
509
|
-
level: "WARN",
|
|
510
|
-
message: `Parameter Validation warrnings for application > Configuration > getContactInfo \n ${warrning}`,
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
|
|
514
268
|
const query_params = {};
|
|
515
269
|
|
|
516
270
|
const xHeaders = {};
|
|
@@ -533,33 +287,13 @@ class Configuration {
|
|
|
533
287
|
responseData = response[0];
|
|
534
288
|
}
|
|
535
289
|
|
|
536
|
-
const {
|
|
537
|
-
error: res_error,
|
|
538
|
-
} = ConfigurationApplicationModel.ApplicationInformation().validate(
|
|
539
|
-
responseData,
|
|
540
|
-
{ abortEarly: false, allowUnknown: true }
|
|
541
|
-
);
|
|
542
|
-
|
|
543
|
-
if (res_error) {
|
|
544
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
545
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
546
|
-
} else {
|
|
547
|
-
Logger({
|
|
548
|
-
level: "WARN",
|
|
549
|
-
message: `Response Validation Warnings for application > Configuration > getContactInfo \n ${res_error}`,
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
290
|
return response;
|
|
555
291
|
}
|
|
556
292
|
|
|
557
293
|
/**
|
|
558
|
-
* @param {ConfigurationApplicationValidator.GetCurrenciesParam} arg - Arg object.
|
|
559
294
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
560
295
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
561
|
-
* @returns {Promise<
|
|
562
|
-
* Success response
|
|
296
|
+
* @returns {Promise<CurrenciesResponse>} - Success response
|
|
563
297
|
* @name getCurrencies
|
|
564
298
|
* @summary: List currencies
|
|
565
299
|
* @description: List available currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getCurrencies/).
|
|
@@ -568,30 +302,6 @@ class Configuration {
|
|
|
568
302
|
{ requestHeaders } = { requestHeaders: {} },
|
|
569
303
|
{ responseHeaders } = { responseHeaders: false }
|
|
570
304
|
) {
|
|
571
|
-
const {
|
|
572
|
-
error,
|
|
573
|
-
} = ConfigurationApplicationValidator.getCurrencies().validate(
|
|
574
|
-
{},
|
|
575
|
-
{ abortEarly: false, allowUnknown: true }
|
|
576
|
-
);
|
|
577
|
-
if (error) {
|
|
578
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
// Showing warrnings if extra unknown parameters are found
|
|
582
|
-
const {
|
|
583
|
-
error: warrning,
|
|
584
|
-
} = ConfigurationApplicationValidator.getCurrencies().validate(
|
|
585
|
-
{},
|
|
586
|
-
{ abortEarly: false, allowUnknown: false }
|
|
587
|
-
);
|
|
588
|
-
if (warrning) {
|
|
589
|
-
Logger({
|
|
590
|
-
level: "WARN",
|
|
591
|
-
message: `Parameter Validation warrnings for application > Configuration > getCurrencies \n ${warrning}`,
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
|
|
595
305
|
const query_params = {};
|
|
596
306
|
|
|
597
307
|
const xHeaders = {};
|
|
@@ -614,32 +324,13 @@ class Configuration {
|
|
|
614
324
|
responseData = response[0];
|
|
615
325
|
}
|
|
616
326
|
|
|
617
|
-
const {
|
|
618
|
-
error: res_error,
|
|
619
|
-
} = ConfigurationApplicationModel.CurrenciesResponse().validate(
|
|
620
|
-
responseData,
|
|
621
|
-
{ abortEarly: false, allowUnknown: true }
|
|
622
|
-
);
|
|
623
|
-
|
|
624
|
-
if (res_error) {
|
|
625
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
626
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
627
|
-
} else {
|
|
628
|
-
Logger({
|
|
629
|
-
level: "WARN",
|
|
630
|
-
message: `Response Validation Warnings for application > Configuration > getCurrencies \n ${res_error}`,
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
|
|
635
327
|
return response;
|
|
636
328
|
}
|
|
637
329
|
|
|
638
330
|
/**
|
|
639
|
-
* @param {ConfigurationApplicationValidator.GetCurrencyByIdParam} arg - Arg object.
|
|
640
331
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
641
332
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
642
|
-
* @returns {Promise<
|
|
333
|
+
* @returns {Promise<Currency>} - Success response
|
|
643
334
|
* @name getCurrencyById
|
|
644
335
|
* @summary: Get a currency
|
|
645
336
|
* @description: Get details of the currency. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getCurrencyById/).
|
|
@@ -648,28 +339,13 @@ class Configuration {
|
|
|
648
339
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
649
340
|
{ responseHeaders } = { responseHeaders: false }
|
|
650
341
|
) {
|
|
651
|
-
const
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
);
|
|
657
|
-
if (error) {
|
|
658
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
// Showing warrnings if extra unknown parameters are found
|
|
662
|
-
const {
|
|
663
|
-
error: warrning,
|
|
664
|
-
} = ConfigurationApplicationValidator.getCurrencyById().validate(
|
|
665
|
-
{ id },
|
|
666
|
-
{ abortEarly: false, allowUnknown: false }
|
|
667
|
-
);
|
|
668
|
-
if (warrning) {
|
|
669
|
-
Logger({
|
|
670
|
-
level: "WARN",
|
|
671
|
-
message: `Parameter Validation warrnings for application > Configuration > getCurrencyById \n ${warrning}`,
|
|
342
|
+
const errors = validateRequiredParams(arguments[0], ["id"]);
|
|
343
|
+
if (errors.length > 0) {
|
|
344
|
+
const error = new FDKClientValidationError({
|
|
345
|
+
message: "Missing required field",
|
|
346
|
+
details: errors,
|
|
672
347
|
});
|
|
348
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
673
349
|
}
|
|
674
350
|
|
|
675
351
|
const query_params = {};
|
|
@@ -694,33 +370,13 @@ class Configuration {
|
|
|
694
370
|
responseData = response[0];
|
|
695
371
|
}
|
|
696
372
|
|
|
697
|
-
const {
|
|
698
|
-
error: res_error,
|
|
699
|
-
} = ConfigurationApplicationModel.Currency().validate(responseData, {
|
|
700
|
-
abortEarly: false,
|
|
701
|
-
allowUnknown: true,
|
|
702
|
-
});
|
|
703
|
-
|
|
704
|
-
if (res_error) {
|
|
705
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
706
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
707
|
-
} else {
|
|
708
|
-
Logger({
|
|
709
|
-
level: "WARN",
|
|
710
|
-
message: `Response Validation Warnings for application > Configuration > getCurrencyById \n ${res_error}`,
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
|
|
715
373
|
return response;
|
|
716
374
|
}
|
|
717
375
|
|
|
718
376
|
/**
|
|
719
|
-
* @param {ConfigurationApplicationValidator.GetFeaturesParam} arg - Arg object.
|
|
720
377
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
721
378
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
722
|
-
* @returns {Promise<
|
|
723
|
-
* Success response
|
|
379
|
+
* @returns {Promise<AppFeatureResponse>} - Success response
|
|
724
380
|
* @name getFeatures
|
|
725
381
|
* @summary: Get sales channel features
|
|
726
382
|
* @description: Get configuration of the features of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getFeatures/).
|
|
@@ -729,28 +385,6 @@ class Configuration {
|
|
|
729
385
|
{ requestHeaders } = { requestHeaders: {} },
|
|
730
386
|
{ responseHeaders } = { responseHeaders: false }
|
|
731
387
|
) {
|
|
732
|
-
const { error } = ConfigurationApplicationValidator.getFeatures().validate(
|
|
733
|
-
{},
|
|
734
|
-
{ abortEarly: false, allowUnknown: true }
|
|
735
|
-
);
|
|
736
|
-
if (error) {
|
|
737
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
// Showing warrnings if extra unknown parameters are found
|
|
741
|
-
const {
|
|
742
|
-
error: warrning,
|
|
743
|
-
} = ConfigurationApplicationValidator.getFeatures().validate(
|
|
744
|
-
{},
|
|
745
|
-
{ abortEarly: false, allowUnknown: false }
|
|
746
|
-
);
|
|
747
|
-
if (warrning) {
|
|
748
|
-
Logger({
|
|
749
|
-
level: "WARN",
|
|
750
|
-
message: `Parameter Validation warrnings for application > Configuration > getFeatures \n ${warrning}`,
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
|
-
|
|
754
388
|
const query_params = {};
|
|
755
389
|
|
|
756
390
|
const xHeaders = {};
|
|
@@ -773,35 +407,13 @@ class Configuration {
|
|
|
773
407
|
responseData = response[0];
|
|
774
408
|
}
|
|
775
409
|
|
|
776
|
-
const {
|
|
777
|
-
error: res_error,
|
|
778
|
-
} = ConfigurationApplicationModel.AppFeatureResponse().validate(
|
|
779
|
-
responseData,
|
|
780
|
-
{ abortEarly: false, allowUnknown: true }
|
|
781
|
-
);
|
|
782
|
-
|
|
783
|
-
if (res_error) {
|
|
784
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
785
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
786
|
-
} else {
|
|
787
|
-
Logger({
|
|
788
|
-
level: "WARN",
|
|
789
|
-
message: `Response Validation Warnings for application > Configuration > getFeatures \n ${res_error}`,
|
|
790
|
-
});
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
|
|
794
410
|
return response;
|
|
795
411
|
}
|
|
796
412
|
|
|
797
413
|
/**
|
|
798
|
-
* @param {ConfigurationApplicationValidator.GetIntegrationTokensParam} arg
|
|
799
|
-
* - Arg object.
|
|
800
|
-
*
|
|
801
414
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
802
415
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
803
|
-
* @returns {Promise<
|
|
804
|
-
* Success response
|
|
416
|
+
* @returns {Promise<AppTokenResponse>} - Success response
|
|
805
417
|
* @name getIntegrationTokens
|
|
806
418
|
* @summary: Get API tokens
|
|
807
419
|
* @description: Get tools integration token of the sales channel. For example, Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map, and Facebook. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getIntegrationTokens/).
|
|
@@ -810,30 +422,6 @@ class Configuration {
|
|
|
810
422
|
{ requestHeaders } = { requestHeaders: {} },
|
|
811
423
|
{ responseHeaders } = { responseHeaders: false }
|
|
812
424
|
) {
|
|
813
|
-
const {
|
|
814
|
-
error,
|
|
815
|
-
} = ConfigurationApplicationValidator.getIntegrationTokens().validate(
|
|
816
|
-
{},
|
|
817
|
-
{ abortEarly: false, allowUnknown: true }
|
|
818
|
-
);
|
|
819
|
-
if (error) {
|
|
820
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
// Showing warrnings if extra unknown parameters are found
|
|
824
|
-
const {
|
|
825
|
-
error: warrning,
|
|
826
|
-
} = ConfigurationApplicationValidator.getIntegrationTokens().validate(
|
|
827
|
-
{},
|
|
828
|
-
{ abortEarly: false, allowUnknown: false }
|
|
829
|
-
);
|
|
830
|
-
if (warrning) {
|
|
831
|
-
Logger({
|
|
832
|
-
level: "WARN",
|
|
833
|
-
message: `Parameter Validation warrnings for application > Configuration > getIntegrationTokens \n ${warrning}`,
|
|
834
|
-
});
|
|
835
|
-
}
|
|
836
|
-
|
|
837
425
|
const query_params = {};
|
|
838
426
|
|
|
839
427
|
const xHeaders = {};
|
|
@@ -856,33 +444,13 @@ class Configuration {
|
|
|
856
444
|
responseData = response[0];
|
|
857
445
|
}
|
|
858
446
|
|
|
859
|
-
const {
|
|
860
|
-
error: res_error,
|
|
861
|
-
} = ConfigurationApplicationModel.AppTokenResponse().validate(
|
|
862
|
-
responseData,
|
|
863
|
-
{ abortEarly: false, allowUnknown: true }
|
|
864
|
-
);
|
|
865
|
-
|
|
866
|
-
if (res_error) {
|
|
867
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
868
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
869
|
-
} else {
|
|
870
|
-
Logger({
|
|
871
|
-
level: "WARN",
|
|
872
|
-
message: `Response Validation Warnings for application > Configuration > getIntegrationTokens \n ${res_error}`,
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
|
|
877
447
|
return response;
|
|
878
448
|
}
|
|
879
449
|
|
|
880
450
|
/**
|
|
881
|
-
* @param {ConfigurationApplicationValidator.GetLanguagesParam} arg - Arg object.
|
|
882
451
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
883
452
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
884
|
-
* @returns {Promise<
|
|
885
|
-
* Success response
|
|
453
|
+
* @returns {Promise<LanguageResponse>} - Success response
|
|
886
454
|
* @name getLanguages
|
|
887
455
|
* @summary: List languages
|
|
888
456
|
* @description: List available languages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getLanguages/).
|
|
@@ -891,28 +459,6 @@ class Configuration {
|
|
|
891
459
|
{ requestHeaders } = { requestHeaders: {} },
|
|
892
460
|
{ responseHeaders } = { responseHeaders: false }
|
|
893
461
|
) {
|
|
894
|
-
const { error } = ConfigurationApplicationValidator.getLanguages().validate(
|
|
895
|
-
{},
|
|
896
|
-
{ abortEarly: false, allowUnknown: true }
|
|
897
|
-
);
|
|
898
|
-
if (error) {
|
|
899
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
// Showing warrnings if extra unknown parameters are found
|
|
903
|
-
const {
|
|
904
|
-
error: warrning,
|
|
905
|
-
} = ConfigurationApplicationValidator.getLanguages().validate(
|
|
906
|
-
{},
|
|
907
|
-
{ abortEarly: false, allowUnknown: false }
|
|
908
|
-
);
|
|
909
|
-
if (warrning) {
|
|
910
|
-
Logger({
|
|
911
|
-
level: "WARN",
|
|
912
|
-
message: `Parameter Validation warrnings for application > Configuration > getLanguages \n ${warrning}`,
|
|
913
|
-
});
|
|
914
|
-
}
|
|
915
|
-
|
|
916
462
|
const query_params = {};
|
|
917
463
|
|
|
918
464
|
const xHeaders = {};
|
|
@@ -935,36 +481,13 @@ class Configuration {
|
|
|
935
481
|
responseData = response[0];
|
|
936
482
|
}
|
|
937
483
|
|
|
938
|
-
const {
|
|
939
|
-
error: res_error,
|
|
940
|
-
} = ConfigurationApplicationModel.LanguageResponse().validate(
|
|
941
|
-
responseData,
|
|
942
|
-
{ abortEarly: false, allowUnknown: true }
|
|
943
|
-
);
|
|
944
|
-
|
|
945
|
-
if (res_error) {
|
|
946
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
947
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
948
|
-
} else {
|
|
949
|
-
Logger({
|
|
950
|
-
level: "WARN",
|
|
951
|
-
message: `Response Validation Warnings for application > Configuration > getLanguages \n ${res_error}`,
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
|
|
956
484
|
return response;
|
|
957
485
|
}
|
|
958
486
|
|
|
959
487
|
/**
|
|
960
|
-
* @param {ConfigurationApplicationValidator.GetOrderingStoreCookieParam} arg
|
|
961
|
-
* - Arg object.
|
|
962
|
-
*
|
|
963
488
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
964
489
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
965
|
-
* @returns {Promise<
|
|
966
|
-
* - Success response
|
|
967
|
-
*
|
|
490
|
+
* @returns {Promise<SuccessMessageResponse>} - Success response
|
|
968
491
|
* @name getOrderingStoreCookie
|
|
969
492
|
* @summary: Create cookies
|
|
970
493
|
* @description: Reset cookie of ordering store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getOrderingStoreCookie/).
|
|
@@ -973,30 +496,6 @@ class Configuration {
|
|
|
973
496
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
974
497
|
{ responseHeaders } = { responseHeaders: false }
|
|
975
498
|
) {
|
|
976
|
-
const {
|
|
977
|
-
error,
|
|
978
|
-
} = ConfigurationApplicationValidator.getOrderingStoreCookie().validate(
|
|
979
|
-
{ body },
|
|
980
|
-
{ abortEarly: false, allowUnknown: true }
|
|
981
|
-
);
|
|
982
|
-
if (error) {
|
|
983
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
// Showing warrnings if extra unknown parameters are found
|
|
987
|
-
const {
|
|
988
|
-
error: warrning,
|
|
989
|
-
} = ConfigurationApplicationValidator.getOrderingStoreCookie().validate(
|
|
990
|
-
{ body },
|
|
991
|
-
{ abortEarly: false, allowUnknown: false }
|
|
992
|
-
);
|
|
993
|
-
if (warrning) {
|
|
994
|
-
Logger({
|
|
995
|
-
level: "WARN",
|
|
996
|
-
message: `Parameter Validation warrnings for application > Configuration > getOrderingStoreCookie \n ${warrning}`,
|
|
997
|
-
});
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
499
|
const query_params = {};
|
|
1001
500
|
|
|
1002
501
|
const xHeaders = {};
|
|
@@ -1019,32 +518,13 @@ class Configuration {
|
|
|
1019
518
|
responseData = response[0];
|
|
1020
519
|
}
|
|
1021
520
|
|
|
1022
|
-
const {
|
|
1023
|
-
error: res_error,
|
|
1024
|
-
} = ConfigurationApplicationModel.SuccessMessageResponse().validate(
|
|
1025
|
-
responseData,
|
|
1026
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1027
|
-
);
|
|
1028
|
-
|
|
1029
|
-
if (res_error) {
|
|
1030
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1031
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1032
|
-
} else {
|
|
1033
|
-
Logger({
|
|
1034
|
-
level: "WARN",
|
|
1035
|
-
message: `Response Validation Warnings for application > Configuration > getOrderingStoreCookie \n ${res_error}`,
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
521
|
return response;
|
|
1041
522
|
}
|
|
1042
523
|
|
|
1043
524
|
/**
|
|
1044
|
-
* @param {ConfigurationApplicationValidator.GetOrderingStoresParam} arg - Arg object.
|
|
1045
525
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1046
526
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1047
|
-
* @returns {Promise<
|
|
527
|
+
* @returns {Promise<OrderingStores>} - Success response
|
|
1048
528
|
* @name getOrderingStores
|
|
1049
529
|
* @summary: List order-enabled selling locations
|
|
1050
530
|
* @description: Get details of all the deployment store locations where the sales channel will be used for order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getOrderingStores/).
|
|
@@ -1053,30 +533,6 @@ class Configuration {
|
|
|
1053
533
|
{ pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
|
|
1054
534
|
{ responseHeaders } = { responseHeaders: false }
|
|
1055
535
|
) {
|
|
1056
|
-
const {
|
|
1057
|
-
error,
|
|
1058
|
-
} = ConfigurationApplicationValidator.getOrderingStores().validate(
|
|
1059
|
-
{ pageNo, pageSize, q },
|
|
1060
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1061
|
-
);
|
|
1062
|
-
if (error) {
|
|
1063
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1067
|
-
const {
|
|
1068
|
-
error: warrning,
|
|
1069
|
-
} = ConfigurationApplicationValidator.getOrderingStores().validate(
|
|
1070
|
-
{ pageNo, pageSize, q },
|
|
1071
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1072
|
-
);
|
|
1073
|
-
if (warrning) {
|
|
1074
|
-
Logger({
|
|
1075
|
-
level: "WARN",
|
|
1076
|
-
message: `Parameter Validation warrnings for application > Configuration > getOrderingStores \n ${warrning}`,
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
536
|
const query_params = {};
|
|
1081
537
|
query_params["page_no"] = pageNo;
|
|
1082
538
|
query_params["page_size"] = pageSize;
|
|
@@ -1102,34 +558,13 @@ class Configuration {
|
|
|
1102
558
|
responseData = response[0];
|
|
1103
559
|
}
|
|
1104
560
|
|
|
1105
|
-
const {
|
|
1106
|
-
error: res_error,
|
|
1107
|
-
} = ConfigurationApplicationModel.OrderingStores().validate(responseData, {
|
|
1108
|
-
abortEarly: false,
|
|
1109
|
-
allowUnknown: true,
|
|
1110
|
-
});
|
|
1111
|
-
|
|
1112
|
-
if (res_error) {
|
|
1113
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1114
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1115
|
-
} else {
|
|
1116
|
-
Logger({
|
|
1117
|
-
level: "WARN",
|
|
1118
|
-
message: `Response Validation Warnings for application > Configuration > getOrderingStores \n ${res_error}`,
|
|
1119
|
-
});
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
561
|
return response;
|
|
1124
562
|
}
|
|
1125
563
|
|
|
1126
564
|
/**
|
|
1127
|
-
* @param {ConfigurationApplicationValidator.GetOwnerInfoParam} arg - Arg object.
|
|
1128
565
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1129
566
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1130
|
-
* @returns {Promise<
|
|
1131
|
-
* - Success response
|
|
1132
|
-
*
|
|
567
|
+
* @returns {Promise<ApplicationAboutResponse>} - Success response
|
|
1133
568
|
* @name getOwnerInfo
|
|
1134
569
|
* @summary: Get sales channel owner
|
|
1135
570
|
* @description: Get details of the sales channel owner. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getOwnerInfo/).
|
|
@@ -1138,28 +573,6 @@ class Configuration {
|
|
|
1138
573
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1139
574
|
{ responseHeaders } = { responseHeaders: false }
|
|
1140
575
|
) {
|
|
1141
|
-
const { error } = ConfigurationApplicationValidator.getOwnerInfo().validate(
|
|
1142
|
-
{},
|
|
1143
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1144
|
-
);
|
|
1145
|
-
if (error) {
|
|
1146
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1150
|
-
const {
|
|
1151
|
-
error: warrning,
|
|
1152
|
-
} = ConfigurationApplicationValidator.getOwnerInfo().validate(
|
|
1153
|
-
{},
|
|
1154
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1155
|
-
);
|
|
1156
|
-
if (warrning) {
|
|
1157
|
-
Logger({
|
|
1158
|
-
level: "WARN",
|
|
1159
|
-
message: `Parameter Validation warrnings for application > Configuration > getOwnerInfo \n ${warrning}`,
|
|
1160
|
-
});
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
576
|
const query_params = {};
|
|
1164
577
|
|
|
1165
578
|
const xHeaders = {};
|
|
@@ -1182,33 +595,13 @@ class Configuration {
|
|
|
1182
595
|
responseData = response[0];
|
|
1183
596
|
}
|
|
1184
597
|
|
|
1185
|
-
const {
|
|
1186
|
-
error: res_error,
|
|
1187
|
-
} = ConfigurationApplicationModel.ApplicationAboutResponse().validate(
|
|
1188
|
-
responseData,
|
|
1189
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1190
|
-
);
|
|
1191
|
-
|
|
1192
|
-
if (res_error) {
|
|
1193
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1194
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1195
|
-
} else {
|
|
1196
|
-
Logger({
|
|
1197
|
-
level: "WARN",
|
|
1198
|
-
message: `Response Validation Warnings for application > Configuration > getOwnerInfo \n ${res_error}`,
|
|
1199
|
-
});
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
598
|
return response;
|
|
1204
599
|
}
|
|
1205
600
|
|
|
1206
601
|
/**
|
|
1207
|
-
* @param {ConfigurationApplicationValidator.GetStoreDetailByIdParam} arg -
|
|
1208
|
-
* Arg object.
|
|
1209
602
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1210
603
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1211
|
-
* @returns {Promise<
|
|
604
|
+
* @returns {Promise<OrderingStore>} - Success response
|
|
1212
605
|
* @name getStoreDetailById
|
|
1213
606
|
* @summary: Get a selling location
|
|
1214
607
|
* @description: Get details of a selling location (store) by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getStoreDetailById/).
|
|
@@ -1217,28 +610,13 @@ class Configuration {
|
|
|
1217
610
|
{ storeId, requestHeaders } = { requestHeaders: {} },
|
|
1218
611
|
{ responseHeaders } = { responseHeaders: false }
|
|
1219
612
|
) {
|
|
1220
|
-
const
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
);
|
|
1226
|
-
if (error) {
|
|
1227
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1231
|
-
const {
|
|
1232
|
-
error: warrning,
|
|
1233
|
-
} = ConfigurationApplicationValidator.getStoreDetailById().validate(
|
|
1234
|
-
{ storeId },
|
|
1235
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1236
|
-
);
|
|
1237
|
-
if (warrning) {
|
|
1238
|
-
Logger({
|
|
1239
|
-
level: "WARN",
|
|
1240
|
-
message: `Parameter Validation warrnings for application > Configuration > getStoreDetailById \n ${warrning}`,
|
|
613
|
+
const errors = validateRequiredParams(arguments[0], ["storeId"]);
|
|
614
|
+
if (errors.length > 0) {
|
|
615
|
+
const error = new FDKClientValidationError({
|
|
616
|
+
message: "Missing required field",
|
|
617
|
+
details: errors,
|
|
1241
618
|
});
|
|
619
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1242
620
|
}
|
|
1243
621
|
|
|
1244
622
|
const query_params = {};
|
|
@@ -1263,36 +641,13 @@ class Configuration {
|
|
|
1263
641
|
responseData = response[0];
|
|
1264
642
|
}
|
|
1265
643
|
|
|
1266
|
-
const {
|
|
1267
|
-
error: res_error,
|
|
1268
|
-
} = ConfigurationApplicationModel.OrderingStore().validate(responseData, {
|
|
1269
|
-
abortEarly: false,
|
|
1270
|
-
allowUnknown: true,
|
|
1271
|
-
});
|
|
1272
|
-
|
|
1273
|
-
if (res_error) {
|
|
1274
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1275
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1276
|
-
} else {
|
|
1277
|
-
Logger({
|
|
1278
|
-
level: "WARN",
|
|
1279
|
-
message: `Response Validation Warnings for application > Configuration > getStoreDetailById \n ${res_error}`,
|
|
1280
|
-
});
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
644
|
return response;
|
|
1285
645
|
}
|
|
1286
646
|
|
|
1287
647
|
/**
|
|
1288
|
-
* @param {ConfigurationApplicationValidator.RemoveOrderingStoreCookieParam} arg
|
|
1289
|
-
* - Arg object.
|
|
1290
|
-
*
|
|
1291
648
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1292
649
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1293
|
-
* @returns {Promise<
|
|
1294
|
-
* - Success response
|
|
1295
|
-
*
|
|
650
|
+
* @returns {Promise<SuccessMessageResponse>} - Success response
|
|
1296
651
|
* @name removeOrderingStoreCookie
|
|
1297
652
|
* @summary: Delete store cookie
|
|
1298
653
|
* @description: Delete store cookie. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/removeOrderingStoreCookie/).
|
|
@@ -1301,30 +656,6 @@ class Configuration {
|
|
|
1301
656
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1302
657
|
{ responseHeaders } = { responseHeaders: false }
|
|
1303
658
|
) {
|
|
1304
|
-
const {
|
|
1305
|
-
error,
|
|
1306
|
-
} = ConfigurationApplicationValidator.removeOrderingStoreCookie().validate(
|
|
1307
|
-
{},
|
|
1308
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1309
|
-
);
|
|
1310
|
-
if (error) {
|
|
1311
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1315
|
-
const {
|
|
1316
|
-
error: warrning,
|
|
1317
|
-
} = ConfigurationApplicationValidator.removeOrderingStoreCookie().validate(
|
|
1318
|
-
{},
|
|
1319
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1320
|
-
);
|
|
1321
|
-
if (warrning) {
|
|
1322
|
-
Logger({
|
|
1323
|
-
level: "WARN",
|
|
1324
|
-
message: `Parameter Validation warrnings for application > Configuration > removeOrderingStoreCookie \n ${warrning}`,
|
|
1325
|
-
});
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
659
|
const query_params = {};
|
|
1329
660
|
|
|
1330
661
|
const xHeaders = {};
|
|
@@ -1347,24 +678,6 @@ class Configuration {
|
|
|
1347
678
|
responseData = response[0];
|
|
1348
679
|
}
|
|
1349
680
|
|
|
1350
|
-
const {
|
|
1351
|
-
error: res_error,
|
|
1352
|
-
} = ConfigurationApplicationModel.SuccessMessageResponse().validate(
|
|
1353
|
-
responseData,
|
|
1354
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1355
|
-
);
|
|
1356
|
-
|
|
1357
|
-
if (res_error) {
|
|
1358
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1359
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1360
|
-
} else {
|
|
1361
|
-
Logger({
|
|
1362
|
-
level: "WARN",
|
|
1363
|
-
message: `Response Validation Warnings for application > Configuration > removeOrderingStoreCookie \n ${res_error}`,
|
|
1364
|
-
});
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
681
|
return response;
|
|
1369
682
|
}
|
|
1370
683
|
}
|