@gofynd/fdk-client-javascript 1.5.2 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +293 -0
- package/sdk/application/Catalog/CatalogApplicationClient.js +408 -0
- package/sdk/application/Common/CommonApplicationClient.js +21 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +147 -0
- package/sdk/application/Content/ContentApplicationClient.js +226 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +43 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +21 -0
- package/sdk/application/Lead/LeadApplicationClient.js +73 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.js +192 -3
- package/sdk/application/Order/OrderApplicationClient.js +202 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +454 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +68 -0
- package/sdk/application/Share/ShareApplicationClient.js +96 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +64 -0
- package/sdk/application/User/UserApplicationClient.js +412 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +13 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +75 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +6 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +16 -3
- package/sdk/partner/Webhook/WebhookPartnerModel.js +5 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +46 -23
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -23
- package/sdk/platform/Cart/CartPlatformModel.d.ts +90 -1
- package/sdk/platform/Cart/CartPlatformModel.js +51 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -12
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -81
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -10
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -12
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +82 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +10 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +12 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +108 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +77 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
- package/sdk/platform/User/UserPlatformModel.js +2 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +58 -14
- package/sdk/platform/Webhook/WebhookPlatformModel.js +15 -14
- package/sdk/public/Catalog/CatalogPublicClient.js +15 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +16 -0
- package/sdk/public/Content/ContentPublicClient.js +116 -0
- package/sdk/public/Partner/PartnerPublicClient.js +15 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +40 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +194 -46
- package/sdk/public/Webhook/WebhookPublicModel.js +51 -46
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
const {
|
|
2
|
+
FDKClientValidationError,
|
|
3
|
+
FDKResponseValidationError,
|
|
4
|
+
} = require("../../common/FDKError");
|
|
5
|
+
|
|
1
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
7
|
const constructUrl = require("../constructUrl");
|
|
3
8
|
const Paginator = require("../../common/Paginator");
|
|
@@ -47,6 +52,14 @@ class Rewards {
|
|
|
47
52
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
48
53
|
{ responseHeaders } = { responseHeaders: false }
|
|
49
54
|
) {
|
|
55
|
+
let invalidInput = [];
|
|
56
|
+
if (invalidInput.length) {
|
|
57
|
+
const error = new Error();
|
|
58
|
+
error.message = "Missing required field";
|
|
59
|
+
error.details = invalidInput;
|
|
60
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
61
|
+
}
|
|
62
|
+
|
|
50
63
|
const query_params = {};
|
|
51
64
|
|
|
52
65
|
const xHeaders = {};
|
|
@@ -84,6 +97,21 @@ class Rewards {
|
|
|
84
97
|
{ name, requestHeaders } = { requestHeaders: {} },
|
|
85
98
|
{ responseHeaders } = { responseHeaders: false }
|
|
86
99
|
) {
|
|
100
|
+
let invalidInput = [];
|
|
101
|
+
|
|
102
|
+
if (!name) {
|
|
103
|
+
invalidInput.push({
|
|
104
|
+
message: `The 'name' field is required.`,
|
|
105
|
+
path: ["name"],
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
if (invalidInput.length) {
|
|
109
|
+
const error = new Error();
|
|
110
|
+
error.message = "Missing required field";
|
|
111
|
+
error.details = invalidInput;
|
|
112
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
113
|
+
}
|
|
114
|
+
|
|
87
115
|
const query_params = {};
|
|
88
116
|
|
|
89
117
|
const xHeaders = {};
|
|
@@ -121,6 +149,14 @@ class Rewards {
|
|
|
121
149
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
122
150
|
{ responseHeaders } = { responseHeaders: false }
|
|
123
151
|
) {
|
|
152
|
+
let invalidInput = [];
|
|
153
|
+
if (invalidInput.length) {
|
|
154
|
+
const error = new Error();
|
|
155
|
+
error.message = "Missing required field";
|
|
156
|
+
error.details = invalidInput;
|
|
157
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
158
|
+
}
|
|
159
|
+
|
|
124
160
|
const query_params = {};
|
|
125
161
|
|
|
126
162
|
const xHeaders = {};
|
|
@@ -158,6 +194,14 @@ class Rewards {
|
|
|
158
194
|
{ requestHeaders } = { requestHeaders: {} },
|
|
159
195
|
{ responseHeaders } = { responseHeaders: false }
|
|
160
196
|
) {
|
|
197
|
+
let invalidInput = [];
|
|
198
|
+
if (invalidInput.length) {
|
|
199
|
+
const error = new Error();
|
|
200
|
+
error.message = "Missing required field";
|
|
201
|
+
error.details = invalidInput;
|
|
202
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
203
|
+
}
|
|
204
|
+
|
|
161
205
|
const query_params = {};
|
|
162
206
|
|
|
163
207
|
const xHeaders = {};
|
|
@@ -195,6 +239,14 @@ class Rewards {
|
|
|
195
239
|
{ pageId, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
196
240
|
{ responseHeaders } = { responseHeaders: false }
|
|
197
241
|
) {
|
|
242
|
+
let invalidInput = [];
|
|
243
|
+
if (invalidInput.length) {
|
|
244
|
+
const error = new Error();
|
|
245
|
+
error.message = "Missing required field";
|
|
246
|
+
error.details = invalidInput;
|
|
247
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
248
|
+
}
|
|
249
|
+
|
|
198
250
|
const query_params = {};
|
|
199
251
|
query_params["page_id"] = pageId;
|
|
200
252
|
query_params["page_size"] = pageSize;
|
|
@@ -234,6 +286,14 @@ class Rewards {
|
|
|
234
286
|
{ requestHeaders } = { requestHeaders: {} },
|
|
235
287
|
{ responseHeaders } = { responseHeaders: false }
|
|
236
288
|
) {
|
|
289
|
+
let invalidInput = [];
|
|
290
|
+
if (invalidInput.length) {
|
|
291
|
+
const error = new Error();
|
|
292
|
+
error.message = "Missing required field";
|
|
293
|
+
error.details = invalidInput;
|
|
294
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
295
|
+
}
|
|
296
|
+
|
|
237
297
|
const query_params = {};
|
|
238
298
|
|
|
239
299
|
const xHeaders = {};
|
|
@@ -271,6 +331,14 @@ class Rewards {
|
|
|
271
331
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
272
332
|
{ responseHeaders } = { responseHeaders: false }
|
|
273
333
|
) {
|
|
334
|
+
let invalidInput = [];
|
|
335
|
+
if (invalidInput.length) {
|
|
336
|
+
const error = new Error();
|
|
337
|
+
error.message = "Missing required field";
|
|
338
|
+
error.details = invalidInput;
|
|
339
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
340
|
+
}
|
|
341
|
+
|
|
274
342
|
const query_params = {};
|
|
275
343
|
|
|
276
344
|
const xHeaders = {};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
const {
|
|
2
|
+
FDKClientValidationError,
|
|
3
|
+
FDKResponseValidationError,
|
|
4
|
+
} = require("../../common/FDKError");
|
|
5
|
+
|
|
1
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
7
|
const constructUrl = require("../constructUrl");
|
|
3
8
|
const Paginator = require("../../common/Paginator");
|
|
@@ -46,6 +51,14 @@ class Share {
|
|
|
46
51
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
47
52
|
{ responseHeaders } = { responseHeaders: false }
|
|
48
53
|
) {
|
|
54
|
+
let invalidInput = [];
|
|
55
|
+
if (invalidInput.length) {
|
|
56
|
+
const error = new Error();
|
|
57
|
+
error.message = "Missing required field";
|
|
58
|
+
error.details = invalidInput;
|
|
59
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
60
|
+
}
|
|
61
|
+
|
|
49
62
|
const query_params = {};
|
|
50
63
|
|
|
51
64
|
const xHeaders = {};
|
|
@@ -83,6 +96,14 @@ class Share {
|
|
|
83
96
|
{ requestHeaders } = { requestHeaders: {} },
|
|
84
97
|
{ responseHeaders } = { responseHeaders: false }
|
|
85
98
|
) {
|
|
99
|
+
let invalidInput = [];
|
|
100
|
+
if (invalidInput.length) {
|
|
101
|
+
const error = new Error();
|
|
102
|
+
error.message = "Missing required field";
|
|
103
|
+
error.details = invalidInput;
|
|
104
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
105
|
+
}
|
|
106
|
+
|
|
86
107
|
const query_params = {};
|
|
87
108
|
|
|
88
109
|
const xHeaders = {};
|
|
@@ -120,6 +141,21 @@ class Share {
|
|
|
120
141
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
121
142
|
{ responseHeaders } = { responseHeaders: false }
|
|
122
143
|
) {
|
|
144
|
+
let invalidInput = [];
|
|
145
|
+
|
|
146
|
+
if (!slug) {
|
|
147
|
+
invalidInput.push({
|
|
148
|
+
message: `The 'slug' field is required.`,
|
|
149
|
+
path: ["slug"],
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
if (invalidInput.length) {
|
|
153
|
+
const error = new Error();
|
|
154
|
+
error.message = "Missing required field";
|
|
155
|
+
error.details = invalidInput;
|
|
156
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
157
|
+
}
|
|
158
|
+
|
|
123
159
|
const query_params = {};
|
|
124
160
|
|
|
125
161
|
const xHeaders = {};
|
|
@@ -157,6 +193,21 @@ class Share {
|
|
|
157
193
|
{ hash, requestHeaders } = { requestHeaders: {} },
|
|
158
194
|
{ responseHeaders } = { responseHeaders: false }
|
|
159
195
|
) {
|
|
196
|
+
let invalidInput = [];
|
|
197
|
+
|
|
198
|
+
if (!hash) {
|
|
199
|
+
invalidInput.push({
|
|
200
|
+
message: `The 'hash' field is required.`,
|
|
201
|
+
path: ["hash"],
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
if (invalidInput.length) {
|
|
205
|
+
const error = new Error();
|
|
206
|
+
error.message = "Missing required field";
|
|
207
|
+
error.details = invalidInput;
|
|
208
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
209
|
+
}
|
|
210
|
+
|
|
160
211
|
const query_params = {};
|
|
161
212
|
|
|
162
213
|
const xHeaders = {};
|
|
@@ -194,6 +245,21 @@ class Share {
|
|
|
194
245
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
195
246
|
{ responseHeaders } = { responseHeaders: false }
|
|
196
247
|
) {
|
|
248
|
+
let invalidInput = [];
|
|
249
|
+
|
|
250
|
+
if (!slug) {
|
|
251
|
+
invalidInput.push({
|
|
252
|
+
message: `The 'slug' field is required.`,
|
|
253
|
+
path: ["slug"],
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
if (invalidInput.length) {
|
|
257
|
+
const error = new Error();
|
|
258
|
+
error.message = "Missing required field";
|
|
259
|
+
error.details = invalidInput;
|
|
260
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
261
|
+
}
|
|
262
|
+
|
|
197
263
|
const query_params = {};
|
|
198
264
|
|
|
199
265
|
const xHeaders = {};
|
|
@@ -231,6 +297,21 @@ class Share {
|
|
|
231
297
|
{ hash, requestHeaders } = { requestHeaders: {} },
|
|
232
298
|
{ responseHeaders } = { responseHeaders: false }
|
|
233
299
|
) {
|
|
300
|
+
let invalidInput = [];
|
|
301
|
+
|
|
302
|
+
if (!hash) {
|
|
303
|
+
invalidInput.push({
|
|
304
|
+
message: `The 'hash' field is required.`,
|
|
305
|
+
path: ["hash"],
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
if (invalidInput.length) {
|
|
309
|
+
const error = new Error();
|
|
310
|
+
error.message = "Missing required field";
|
|
311
|
+
error.details = invalidInput;
|
|
312
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
313
|
+
}
|
|
314
|
+
|
|
234
315
|
const query_params = {};
|
|
235
316
|
|
|
236
317
|
const xHeaders = {};
|
|
@@ -268,6 +349,21 @@ class Share {
|
|
|
268
349
|
{ url, requestHeaders } = { requestHeaders: {} },
|
|
269
350
|
{ responseHeaders } = { responseHeaders: false }
|
|
270
351
|
) {
|
|
352
|
+
let invalidInput = [];
|
|
353
|
+
|
|
354
|
+
if (!url) {
|
|
355
|
+
invalidInput.push({
|
|
356
|
+
message: `The 'url' field is required.`,
|
|
357
|
+
path: ["url"],
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
if (invalidInput.length) {
|
|
361
|
+
const error = new Error();
|
|
362
|
+
error.message = "Missing required field";
|
|
363
|
+
error.details = invalidInput;
|
|
364
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
365
|
+
}
|
|
366
|
+
|
|
271
367
|
const query_params = {};
|
|
272
368
|
query_params["url"] = url;
|
|
273
369
|
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
const {
|
|
2
|
+
FDKClientValidationError,
|
|
3
|
+
FDKResponseValidationError,
|
|
4
|
+
} = require("../../common/FDKError");
|
|
5
|
+
|
|
1
6
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
7
|
const constructUrl = require("../constructUrl");
|
|
3
8
|
const Paginator = require("../../common/Paginator");
|
|
@@ -39,6 +44,21 @@ class Theme {
|
|
|
39
44
|
{ themeId, requestHeaders } = { requestHeaders: {} },
|
|
40
45
|
{ responseHeaders } = { responseHeaders: false }
|
|
41
46
|
) {
|
|
47
|
+
let invalidInput = [];
|
|
48
|
+
|
|
49
|
+
if (!themeId) {
|
|
50
|
+
invalidInput.push({
|
|
51
|
+
message: `The 'themeId' field is required.`,
|
|
52
|
+
path: ["themeId"],
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (invalidInput.length) {
|
|
56
|
+
const error = new Error();
|
|
57
|
+
error.message = "Missing required field";
|
|
58
|
+
error.details = invalidInput;
|
|
59
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
60
|
+
}
|
|
61
|
+
|
|
42
62
|
const query_params = {};
|
|
43
63
|
|
|
44
64
|
const xHeaders = {};
|
|
@@ -76,6 +96,14 @@ class Theme {
|
|
|
76
96
|
{ filters, requestHeaders } = { requestHeaders: {} },
|
|
77
97
|
{ responseHeaders } = { responseHeaders: false }
|
|
78
98
|
) {
|
|
99
|
+
let invalidInput = [];
|
|
100
|
+
if (invalidInput.length) {
|
|
101
|
+
const error = new Error();
|
|
102
|
+
error.message = "Missing required field";
|
|
103
|
+
error.details = invalidInput;
|
|
104
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
105
|
+
}
|
|
106
|
+
|
|
79
107
|
const query_params = {};
|
|
80
108
|
query_params["filters"] = filters;
|
|
81
109
|
|
|
@@ -121,6 +149,27 @@ class Theme {
|
|
|
121
149
|
} = { requestHeaders: {} },
|
|
122
150
|
{ responseHeaders } = { responseHeaders: false }
|
|
123
151
|
) {
|
|
152
|
+
let invalidInput = [];
|
|
153
|
+
|
|
154
|
+
if (!themeId) {
|
|
155
|
+
invalidInput.push({
|
|
156
|
+
message: `The 'themeId' field is required.`,
|
|
157
|
+
path: ["themeId"],
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
if (!pageValue) {
|
|
161
|
+
invalidInput.push({
|
|
162
|
+
message: `The 'pageValue' field is required.`,
|
|
163
|
+
path: ["pageValue"],
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
if (invalidInput.length) {
|
|
167
|
+
const error = new Error();
|
|
168
|
+
error.message = "Missing required field";
|
|
169
|
+
error.details = invalidInput;
|
|
170
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
171
|
+
}
|
|
172
|
+
|
|
124
173
|
const query_params = {};
|
|
125
174
|
query_params["filters"] = filters;
|
|
126
175
|
query_params["section_preview_hash"] = sectionPreviewHash;
|
|
@@ -161,6 +210,21 @@ class Theme {
|
|
|
161
210
|
{ themeId, filters, requestHeaders } = { requestHeaders: {} },
|
|
162
211
|
{ responseHeaders } = { responseHeaders: false }
|
|
163
212
|
) {
|
|
213
|
+
let invalidInput = [];
|
|
214
|
+
|
|
215
|
+
if (!themeId) {
|
|
216
|
+
invalidInput.push({
|
|
217
|
+
message: `The 'themeId' field is required.`,
|
|
218
|
+
path: ["themeId"],
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
if (invalidInput.length) {
|
|
222
|
+
const error = new Error();
|
|
223
|
+
error.message = "Missing required field";
|
|
224
|
+
error.details = invalidInput;
|
|
225
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
226
|
+
}
|
|
227
|
+
|
|
164
228
|
const query_params = {};
|
|
165
229
|
query_params["filters"] = filters;
|
|
166
230
|
|