@gofynd/fdk-client-javascript 1.4.15-beta.2 → 1.4.15-beta.4
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 +2 -3
- package/sdk/application/ApplicationClient.js +0 -18
- package/sdk/application/Cart/CartApplicationClient.d.ts +55 -90
- package/sdk/application/Cart/CartApplicationClient.js +27 -1203
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -142
- package/sdk/application/Catalog/CatalogApplicationClient.js +40 -1344
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
- package/sdk/application/Common/CommonApplicationClient.js +2 -92
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -148
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -727
- package/sdk/application/Content/ContentApplicationClient.d.ts +46 -78
- package/sdk/application/Content/ContentApplicationClient.js +23 -941
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -11
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +4 -134
- package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
- package/sdk/application/Lead/LeadApplicationClient.js +5 -217
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -39
- package/sdk/application/Logistic/LogisticApplicationClient.js +11 -496
- package/sdk/application/Order/OrderApplicationClient.d.ts +22 -42
- package/sdk/application/Order/OrderApplicationClient.js +11 -505
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -212
- package/sdk/application/Payment/PaymentApplicationClient.js +46 -2106
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -28
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -311
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
- package/sdk/application/Share/ShareApplicationClient.js +7 -309
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
- package/sdk/application/Theme/ThemeApplicationClient.js +4 -174
- package/sdk/application/User/UserApplicationClient.d.ts +85 -136
- package/sdk/application/User/UserApplicationClient.js +42 -1818
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +2 -5
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -50
- package/sdk/application/index.d.ts +0 -18
- package/sdk/application/index.js +0 -33
- package/sdk/partner/OAuthClient.js +1 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +7 -0
- package/sdk/platform/Cart/CartPlatformModel.js +3 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +0 -7
- package/sdk/platform/Catalog/CatalogPlatformModel.js +0 -3
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +3 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +4 -2
- package/sdk/public/Content/ContentPublicClient.js +4 -2
- package/sdk/public/Partner/PartnerPublicClient.js +4 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +4 -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,6 @@
|
|
|
1
1
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
-
const {
|
|
3
|
-
FDKClientValidationError,
|
|
4
|
-
FDKResponseValidationError,
|
|
5
|
-
} = require("../../common/FDKError");
|
|
6
2
|
const constructUrl = require("../constructUrl");
|
|
7
3
|
const Paginator = require("../../common/Paginator");
|
|
8
|
-
const ConfigurationApplicationValidator = require("./ConfigurationApplicationValidator");
|
|
9
|
-
const ConfigurationApplicationModel = require("./ConfigurationApplicationModel");
|
|
10
|
-
const { Logger } = require("./../../common/Logger");
|
|
11
|
-
const Joi = require("joi");
|
|
12
4
|
|
|
13
5
|
class Configuration {
|
|
14
6
|
constructor(_conf) {
|
|
@@ -52,11 +44,9 @@ class Configuration {
|
|
|
52
44
|
}
|
|
53
45
|
|
|
54
46
|
/**
|
|
55
|
-
* @param {ConfigurationApplicationValidator.GetAppCurrenciesParam} arg - Arg object.
|
|
56
47
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
57
48
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
58
|
-
* @returns {Promise<
|
|
59
|
-
* Success response
|
|
49
|
+
* @returns {Promise<AppCurrencyResponse>} - Success response
|
|
60
50
|
* @name getAppCurrencies
|
|
61
51
|
* @summary: Get currency configuration
|
|
62
52
|
* @description: Get currency configuration of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getAppCurrencies/).
|
|
@@ -65,30 +55,6 @@ class Configuration {
|
|
|
65
55
|
{ requestHeaders } = { requestHeaders: {} },
|
|
66
56
|
{ responseHeaders } = { responseHeaders: false }
|
|
67
57
|
) {
|
|
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
58
|
const query_params = {};
|
|
93
59
|
|
|
94
60
|
const xHeaders = {};
|
|
@@ -111,33 +77,13 @@ class Configuration {
|
|
|
111
77
|
responseData = response[0];
|
|
112
78
|
}
|
|
113
79
|
|
|
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
80
|
return response;
|
|
133
81
|
}
|
|
134
82
|
|
|
135
83
|
/**
|
|
136
|
-
* @param {ConfigurationApplicationValidator.GetAppStaffListParam} arg - Arg object.
|
|
137
84
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
138
85
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
139
|
-
* @returns {Promise<
|
|
140
|
-
* Success response
|
|
86
|
+
* @returns {Promise<AppStaffListResponse>} - Success response
|
|
141
87
|
* @name getAppStaffList
|
|
142
88
|
* @summary: List staff members
|
|
143
89
|
* @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 +100,6 @@ class Configuration {
|
|
|
154
100
|
} = { requestHeaders: {} },
|
|
155
101
|
{ responseHeaders } = { responseHeaders: false }
|
|
156
102
|
) {
|
|
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
103
|
const query_params = {};
|
|
182
104
|
query_params["page_no"] = pageNo;
|
|
183
105
|
query_params["page_size"] = pageSize;
|
|
@@ -206,33 +128,13 @@ class Configuration {
|
|
|
206
128
|
responseData = response[0];
|
|
207
129
|
}
|
|
208
130
|
|
|
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
131
|
return response;
|
|
228
132
|
}
|
|
229
133
|
|
|
230
134
|
/**
|
|
231
|
-
* @param {ConfigurationApplicationValidator.GetAppStaffsParam} arg - Arg object.
|
|
232
135
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
233
136
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
234
|
-
* @returns {Promise<
|
|
235
|
-
* Success response
|
|
137
|
+
* @returns {Promise<AppStaffResponse>} - Success response
|
|
236
138
|
* @name getAppStaffs
|
|
237
139
|
* @summary: Get staff member
|
|
238
140
|
* @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 +145,6 @@ class Configuration {
|
|
|
243
145
|
},
|
|
244
146
|
{ responseHeaders } = { responseHeaders: false }
|
|
245
147
|
) {
|
|
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
148
|
const query_params = {};
|
|
269
149
|
query_params["order_incent"] = orderIncent;
|
|
270
150
|
query_params["ordering_store"] = orderingStore;
|
|
@@ -290,32 +170,13 @@ class Configuration {
|
|
|
290
170
|
responseData = response[0];
|
|
291
171
|
}
|
|
292
172
|
|
|
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
173
|
return response;
|
|
312
174
|
}
|
|
313
175
|
|
|
314
176
|
/**
|
|
315
|
-
* @param {ConfigurationApplicationValidator.GetApplicationParam} arg - Arg object.
|
|
316
177
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
317
178
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
318
|
-
* @returns {Promise<
|
|
179
|
+
* @returns {Promise<Application>} - Success response
|
|
319
180
|
* @name getApplication
|
|
320
181
|
* @summary: Get sales channel
|
|
321
182
|
* @description: Get details of the current sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getApplication/).
|
|
@@ -324,30 +185,6 @@ class Configuration {
|
|
|
324
185
|
{ requestHeaders } = { requestHeaders: {} },
|
|
325
186
|
{ responseHeaders } = { responseHeaders: false }
|
|
326
187
|
) {
|
|
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
188
|
const query_params = {};
|
|
352
189
|
|
|
353
190
|
const xHeaders = {};
|
|
@@ -370,33 +207,13 @@ class Configuration {
|
|
|
370
207
|
responseData = response[0];
|
|
371
208
|
}
|
|
372
209
|
|
|
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
210
|
return response;
|
|
392
211
|
}
|
|
393
212
|
|
|
394
213
|
/**
|
|
395
|
-
* @param {ConfigurationApplicationValidator.GetBasicDetailsParam} arg - Arg object.
|
|
396
214
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
397
215
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
398
|
-
* @returns {Promise<
|
|
399
|
-
* Success response
|
|
216
|
+
* @returns {Promise<ApplicationDetail>} - Success response
|
|
400
217
|
* @name getBasicDetails
|
|
401
218
|
* @summary: Get Sales channel
|
|
402
219
|
* @description: Get basic details of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getBasicDetails/).
|
|
@@ -405,30 +222,6 @@ class Configuration {
|
|
|
405
222
|
{ requestHeaders } = { requestHeaders: {} },
|
|
406
223
|
{ responseHeaders } = { responseHeaders: false }
|
|
407
224
|
) {
|
|
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
225
|
const query_params = {};
|
|
433
226
|
|
|
434
227
|
const xHeaders = {};
|
|
@@ -451,34 +244,13 @@ class Configuration {
|
|
|
451
244
|
responseData = response[0];
|
|
452
245
|
}
|
|
453
246
|
|
|
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
247
|
return response;
|
|
473
248
|
}
|
|
474
249
|
|
|
475
250
|
/**
|
|
476
|
-
* @param {ConfigurationApplicationValidator.GetContactInfoParam} arg - Arg object.
|
|
477
251
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
478
252
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
479
|
-
* @returns {Promise<
|
|
480
|
-
* - Success response
|
|
481
|
-
*
|
|
253
|
+
* @returns {Promise<ApplicationInformation>} - Success response
|
|
482
254
|
* @name getContactInfo
|
|
483
255
|
* @summary: Get sales channel contact
|
|
484
256
|
* @description: Get contact details of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getContactInfo/).
|
|
@@ -487,30 +259,6 @@ class Configuration {
|
|
|
487
259
|
{ requestHeaders } = { requestHeaders: {} },
|
|
488
260
|
{ responseHeaders } = { responseHeaders: false }
|
|
489
261
|
) {
|
|
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
262
|
const query_params = {};
|
|
515
263
|
|
|
516
264
|
const xHeaders = {};
|
|
@@ -533,33 +281,13 @@ class Configuration {
|
|
|
533
281
|
responseData = response[0];
|
|
534
282
|
}
|
|
535
283
|
|
|
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
284
|
return response;
|
|
555
285
|
}
|
|
556
286
|
|
|
557
287
|
/**
|
|
558
|
-
* @param {ConfigurationApplicationValidator.GetCurrenciesParam} arg - Arg object.
|
|
559
288
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
560
289
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
561
|
-
* @returns {Promise<
|
|
562
|
-
* Success response
|
|
290
|
+
* @returns {Promise<CurrenciesResponse>} - Success response
|
|
563
291
|
* @name getCurrencies
|
|
564
292
|
* @summary: List currencies
|
|
565
293
|
* @description: List available currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getCurrencies/).
|
|
@@ -568,30 +296,6 @@ class Configuration {
|
|
|
568
296
|
{ requestHeaders } = { requestHeaders: {} },
|
|
569
297
|
{ responseHeaders } = { responseHeaders: false }
|
|
570
298
|
) {
|
|
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
299
|
const query_params = {};
|
|
596
300
|
|
|
597
301
|
const xHeaders = {};
|
|
@@ -614,32 +318,13 @@ class Configuration {
|
|
|
614
318
|
responseData = response[0];
|
|
615
319
|
}
|
|
616
320
|
|
|
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
321
|
return response;
|
|
636
322
|
}
|
|
637
323
|
|
|
638
324
|
/**
|
|
639
|
-
* @param {ConfigurationApplicationValidator.GetCurrencyByIdParam} arg - Arg object.
|
|
640
325
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
641
326
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
642
|
-
* @returns {Promise<
|
|
327
|
+
* @returns {Promise<Currency>} - Success response
|
|
643
328
|
* @name getCurrencyById
|
|
644
329
|
* @summary: Get a currency
|
|
645
330
|
* @description: Get details of the currency. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getCurrencyById/).
|
|
@@ -648,30 +333,6 @@ class Configuration {
|
|
|
648
333
|
{ id, requestHeaders } = { requestHeaders: {} },
|
|
649
334
|
{ responseHeaders } = { responseHeaders: false }
|
|
650
335
|
) {
|
|
651
|
-
const {
|
|
652
|
-
error,
|
|
653
|
-
} = ConfigurationApplicationValidator.getCurrencyById().validate(
|
|
654
|
-
{ id },
|
|
655
|
-
{ abortEarly: false, allowUnknown: true }
|
|
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}`,
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
|
|
675
336
|
const query_params = {};
|
|
676
337
|
|
|
677
338
|
const xHeaders = {};
|
|
@@ -694,33 +355,13 @@ class Configuration {
|
|
|
694
355
|
responseData = response[0];
|
|
695
356
|
}
|
|
696
357
|
|
|
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
358
|
return response;
|
|
716
359
|
}
|
|
717
360
|
|
|
718
361
|
/**
|
|
719
|
-
* @param {ConfigurationApplicationValidator.GetFeaturesParam} arg - Arg object.
|
|
720
362
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
721
363
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
722
|
-
* @returns {Promise<
|
|
723
|
-
* Success response
|
|
364
|
+
* @returns {Promise<AppFeatureResponse>} - Success response
|
|
724
365
|
* @name getFeatures
|
|
725
366
|
* @summary: Get sales channel features
|
|
726
367
|
* @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 +370,6 @@ class Configuration {
|
|
|
729
370
|
{ requestHeaders } = { requestHeaders: {} },
|
|
730
371
|
{ responseHeaders } = { responseHeaders: false }
|
|
731
372
|
) {
|
|
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
373
|
const query_params = {};
|
|
755
374
|
|
|
756
375
|
const xHeaders = {};
|
|
@@ -773,35 +392,13 @@ class Configuration {
|
|
|
773
392
|
responseData = response[0];
|
|
774
393
|
}
|
|
775
394
|
|
|
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
395
|
return response;
|
|
795
396
|
}
|
|
796
397
|
|
|
797
398
|
/**
|
|
798
|
-
* @param {ConfigurationApplicationValidator.GetIntegrationTokensParam} arg
|
|
799
|
-
* - Arg object.
|
|
800
|
-
*
|
|
801
399
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
802
400
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
803
|
-
* @returns {Promise<
|
|
804
|
-
* Success response
|
|
401
|
+
* @returns {Promise<AppTokenResponse>} - Success response
|
|
805
402
|
* @name getIntegrationTokens
|
|
806
403
|
* @summary: Get API tokens
|
|
807
404
|
* @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 +407,6 @@ class Configuration {
|
|
|
810
407
|
{ requestHeaders } = { requestHeaders: {} },
|
|
811
408
|
{ responseHeaders } = { responseHeaders: false }
|
|
812
409
|
) {
|
|
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
410
|
const query_params = {};
|
|
838
411
|
|
|
839
412
|
const xHeaders = {};
|
|
@@ -856,33 +429,13 @@ class Configuration {
|
|
|
856
429
|
responseData = response[0];
|
|
857
430
|
}
|
|
858
431
|
|
|
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
432
|
return response;
|
|
878
433
|
}
|
|
879
434
|
|
|
880
435
|
/**
|
|
881
|
-
* @param {ConfigurationApplicationValidator.GetLanguagesParam} arg - Arg object.
|
|
882
436
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
883
437
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
884
|
-
* @returns {Promise<
|
|
885
|
-
* Success response
|
|
438
|
+
* @returns {Promise<LanguageResponse>} - Success response
|
|
886
439
|
* @name getLanguages
|
|
887
440
|
* @summary: List languages
|
|
888
441
|
* @description: List available languages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getLanguages/).
|
|
@@ -891,28 +444,6 @@ class Configuration {
|
|
|
891
444
|
{ requestHeaders } = { requestHeaders: {} },
|
|
892
445
|
{ responseHeaders } = { responseHeaders: false }
|
|
893
446
|
) {
|
|
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
447
|
const query_params = {};
|
|
917
448
|
|
|
918
449
|
const xHeaders = {};
|
|
@@ -935,36 +466,13 @@ class Configuration {
|
|
|
935
466
|
responseData = response[0];
|
|
936
467
|
}
|
|
937
468
|
|
|
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
469
|
return response;
|
|
957
470
|
}
|
|
958
471
|
|
|
959
472
|
/**
|
|
960
|
-
* @param {ConfigurationApplicationValidator.GetOrderingStoreCookieParam} arg
|
|
961
|
-
* - Arg object.
|
|
962
|
-
*
|
|
963
473
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
964
474
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
965
|
-
* @returns {Promise<
|
|
966
|
-
* - Success response
|
|
967
|
-
*
|
|
475
|
+
* @returns {Promise<SuccessMessageResponse>} - Success response
|
|
968
476
|
* @name getOrderingStoreCookie
|
|
969
477
|
* @summary: Create cookies
|
|
970
478
|
* @description: Reset cookie of ordering store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getOrderingStoreCookie/).
|
|
@@ -973,30 +481,6 @@ class Configuration {
|
|
|
973
481
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
974
482
|
{ responseHeaders } = { responseHeaders: false }
|
|
975
483
|
) {
|
|
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
484
|
const query_params = {};
|
|
1001
485
|
|
|
1002
486
|
const xHeaders = {};
|
|
@@ -1019,32 +503,13 @@ class Configuration {
|
|
|
1019
503
|
responseData = response[0];
|
|
1020
504
|
}
|
|
1021
505
|
|
|
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
506
|
return response;
|
|
1041
507
|
}
|
|
1042
508
|
|
|
1043
509
|
/**
|
|
1044
|
-
* @param {ConfigurationApplicationValidator.GetOrderingStoresParam} arg - Arg object.
|
|
1045
510
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1046
511
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1047
|
-
* @returns {Promise<
|
|
512
|
+
* @returns {Promise<OrderingStores>} - Success response
|
|
1048
513
|
* @name getOrderingStores
|
|
1049
514
|
* @summary: List order-enabled selling locations
|
|
1050
515
|
* @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 +518,6 @@ class Configuration {
|
|
|
1053
518
|
{ pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
|
|
1054
519
|
{ responseHeaders } = { responseHeaders: false }
|
|
1055
520
|
) {
|
|
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
521
|
const query_params = {};
|
|
1081
522
|
query_params["page_no"] = pageNo;
|
|
1082
523
|
query_params["page_size"] = pageSize;
|
|
@@ -1102,34 +543,13 @@ class Configuration {
|
|
|
1102
543
|
responseData = response[0];
|
|
1103
544
|
}
|
|
1104
545
|
|
|
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
546
|
return response;
|
|
1124
547
|
}
|
|
1125
548
|
|
|
1126
549
|
/**
|
|
1127
|
-
* @param {ConfigurationApplicationValidator.GetOwnerInfoParam} arg - Arg object.
|
|
1128
550
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1129
551
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1130
|
-
* @returns {Promise<
|
|
1131
|
-
* - Success response
|
|
1132
|
-
*
|
|
552
|
+
* @returns {Promise<ApplicationAboutResponse>} - Success response
|
|
1133
553
|
* @name getOwnerInfo
|
|
1134
554
|
* @summary: Get sales channel owner
|
|
1135
555
|
* @description: Get details of the sales channel owner. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getOwnerInfo/).
|
|
@@ -1138,28 +558,6 @@ class Configuration {
|
|
|
1138
558
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1139
559
|
{ responseHeaders } = { responseHeaders: false }
|
|
1140
560
|
) {
|
|
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
561
|
const query_params = {};
|
|
1164
562
|
|
|
1165
563
|
const xHeaders = {};
|
|
@@ -1182,33 +580,13 @@ class Configuration {
|
|
|
1182
580
|
responseData = response[0];
|
|
1183
581
|
}
|
|
1184
582
|
|
|
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
583
|
return response;
|
|
1204
584
|
}
|
|
1205
585
|
|
|
1206
586
|
/**
|
|
1207
|
-
* @param {ConfigurationApplicationValidator.GetStoreDetailByIdParam} arg -
|
|
1208
|
-
* Arg object.
|
|
1209
587
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1210
588
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1211
|
-
* @returns {Promise<
|
|
589
|
+
* @returns {Promise<OrderingStore>} - Success response
|
|
1212
590
|
* @name getStoreDetailById
|
|
1213
591
|
* @summary: Get a selling location
|
|
1214
592
|
* @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,30 +595,6 @@ class Configuration {
|
|
|
1217
595
|
{ storeId, requestHeaders } = { requestHeaders: {} },
|
|
1218
596
|
{ responseHeaders } = { responseHeaders: false }
|
|
1219
597
|
) {
|
|
1220
|
-
const {
|
|
1221
|
-
error,
|
|
1222
|
-
} = ConfigurationApplicationValidator.getStoreDetailById().validate(
|
|
1223
|
-
{ storeId },
|
|
1224
|
-
{ abortEarly: false, allowUnknown: true }
|
|
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}`,
|
|
1241
|
-
});
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
598
|
const query_params = {};
|
|
1245
599
|
|
|
1246
600
|
const xHeaders = {};
|
|
@@ -1263,36 +617,13 @@ class Configuration {
|
|
|
1263
617
|
responseData = response[0];
|
|
1264
618
|
}
|
|
1265
619
|
|
|
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
620
|
return response;
|
|
1285
621
|
}
|
|
1286
622
|
|
|
1287
623
|
/**
|
|
1288
|
-
* @param {ConfigurationApplicationValidator.RemoveOrderingStoreCookieParam} arg
|
|
1289
|
-
* - Arg object.
|
|
1290
|
-
*
|
|
1291
624
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1292
625
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1293
|
-
* @returns {Promise<
|
|
1294
|
-
* - Success response
|
|
1295
|
-
*
|
|
626
|
+
* @returns {Promise<SuccessMessageResponse>} - Success response
|
|
1296
627
|
* @name removeOrderingStoreCookie
|
|
1297
628
|
* @summary: Delete store cookie
|
|
1298
629
|
* @description: Delete store cookie. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/removeOrderingStoreCookie/).
|
|
@@ -1301,30 +632,6 @@ class Configuration {
|
|
|
1301
632
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1302
633
|
{ responseHeaders } = { responseHeaders: false }
|
|
1303
634
|
) {
|
|
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
635
|
const query_params = {};
|
|
1329
636
|
|
|
1330
637
|
const xHeaders = {};
|
|
@@ -1347,24 +654,6 @@ class Configuration {
|
|
|
1347
654
|
responseData = response[0];
|
|
1348
655
|
}
|
|
1349
656
|
|
|
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
657
|
return response;
|
|
1369
658
|
}
|
|
1370
659
|
}
|