@gofynd/fdk-client-javascript 1.4.16-beta.1 → 1.4.16-beta.2
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.d.ts +5 -5
- package/sdk/application/Cart/CartApplicationClient.js +26 -268
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -16
- package/sdk/application/Catalog/CatalogApplicationClient.js +90 -339
- package/sdk/application/Common/CommonApplicationClient.js +1 -16
- package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +11 -134
- package/sdk/application/Content/ContentApplicationClient.d.ts +40 -8
- package/sdk/application/Content/ContentApplicationClient.js +174 -211
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +21 -52
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.js +40 -153
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
- package/sdk/application/Order/OrderApplicationClient.js +68 -153
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +6 -437
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
- package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationClient.js +21 -75
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
- package/sdk/application/User/UserApplicationClient.js +1 -407
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +4 -4
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -0
- package/sdk/platform/Cart/CartPlatformModel.js +16 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +4 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +80 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +571 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +75 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +88 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +131 -5
- package/sdk/platform/Content/ContentPlatformModel.js +110 -4
- 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/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -118
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -53
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -29
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +10 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +58 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +3 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +10 -2
- package/sdk/platform/Share/SharePlatformModel.js +4 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
- package/sdk/public/Content/ContentPublicClient.d.ts +3 -3
- package/sdk/public/Content/ContentPublicClient.js +16 -104
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
|
@@ -69,7 +69,6 @@ export = SharePlatformModel;
|
|
|
69
69
|
*/
|
|
70
70
|
/**
|
|
71
71
|
* @typedef UrlInfo
|
|
72
|
-
* @property {string} [original]
|
|
73
72
|
* @property {string} [hash]
|
|
74
73
|
* @property {string} [short_url]
|
|
75
74
|
* @property {string} [alias]
|
|
@@ -106,6 +105,8 @@ export = SharePlatformModel;
|
|
|
106
105
|
* @property {number} [current] - The current page number.
|
|
107
106
|
* @property {string} type - The type of the page, such as 'PageType'.
|
|
108
107
|
* @property {number} [size] - The number of items per page.
|
|
108
|
+
* @property {number} [total] - Total number of items.
|
|
109
|
+
* @property {number} [page] - Current page number
|
|
109
110
|
*/
|
|
110
111
|
/**
|
|
111
112
|
* @typedef ShortLinkList
|
|
@@ -226,7 +227,6 @@ type shortLinkReqMeta = {
|
|
|
226
227
|
/** @returns {UrlInfo} */
|
|
227
228
|
declare function UrlInfo(): UrlInfo;
|
|
228
229
|
type UrlInfo = {
|
|
229
|
-
original?: string;
|
|
230
230
|
hash?: string;
|
|
231
231
|
short_url?: string;
|
|
232
232
|
alias?: string;
|
|
@@ -289,6 +289,14 @@ type Page = {
|
|
|
289
289
|
* - The number of items per page.
|
|
290
290
|
*/
|
|
291
291
|
size?: number;
|
|
292
|
+
/**
|
|
293
|
+
* - Total number of items.
|
|
294
|
+
*/
|
|
295
|
+
total?: number;
|
|
296
|
+
/**
|
|
297
|
+
* - Current page number
|
|
298
|
+
*/
|
|
299
|
+
page?: number;
|
|
292
300
|
};
|
|
293
301
|
/** @returns {ShortLinkList} */
|
|
294
302
|
declare function ShortLinkList(): ShortLinkList;
|
|
@@ -80,7 +80,6 @@ const Joi = require("joi");
|
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* @typedef UrlInfo
|
|
83
|
-
* @property {string} [original]
|
|
84
83
|
* @property {string} [hash]
|
|
85
84
|
* @property {string} [short_url]
|
|
86
85
|
* @property {string} [alias]
|
|
@@ -119,6 +118,8 @@ const Joi = require("joi");
|
|
|
119
118
|
* @property {number} [current] - The current page number.
|
|
120
119
|
* @property {string} type - The type of the page, such as 'PageType'.
|
|
121
120
|
* @property {number} [size] - The number of items per page.
|
|
121
|
+
* @property {number} [total] - Total number of items.
|
|
122
|
+
* @property {number} [page] - Current page number
|
|
122
123
|
*/
|
|
123
124
|
|
|
124
125
|
/**
|
|
@@ -230,7 +231,6 @@ class SharePlatformModel {
|
|
|
230
231
|
/** @returns {UrlInfo} */
|
|
231
232
|
static UrlInfo() {
|
|
232
233
|
return Joi.object({
|
|
233
|
-
original: Joi.string().allow(""),
|
|
234
234
|
hash: Joi.string().allow(""),
|
|
235
235
|
short_url: Joi.string().allow(""),
|
|
236
236
|
alias: Joi.string().allow(""),
|
|
@@ -273,6 +273,8 @@ class SharePlatformModel {
|
|
|
273
273
|
current: Joi.number(),
|
|
274
274
|
type: Joi.string().allow("").required(),
|
|
275
275
|
size: Joi.number(),
|
|
276
|
+
total: Joi.number(),
|
|
277
|
+
page: Joi.number(),
|
|
276
278
|
});
|
|
277
279
|
}
|
|
278
280
|
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const PublicAPIClient = require("../PublicAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
const ConfigurationPublicValidator = require("./ConfigurationPublicValidator");
|
|
11
12
|
const ConfigurationPublicModel = require("./ConfigurationPublicModel");
|
|
@@ -49,14 +50,6 @@ class Configuration {
|
|
|
49
50
|
{ locationType, id, requestHeaders } = { requestHeaders: {} },
|
|
50
51
|
{ responseHeaders } = { responseHeaders: false }
|
|
51
52
|
) {
|
|
52
|
-
let invalidInput = [];
|
|
53
|
-
if (invalidInput.length) {
|
|
54
|
-
const error = new Error();
|
|
55
|
-
error.message = "Missing required field";
|
|
56
|
-
error.details = invalidInput;
|
|
57
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
53
|
const { error } = ConfigurationPublicValidator.getLocations().validate(
|
|
61
54
|
{ locationType, id },
|
|
62
55
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -138,14 +131,6 @@ class Configuration {
|
|
|
138
131
|
{ authorization, query, requestHeaders } = { requestHeaders: {} },
|
|
139
132
|
{ responseHeaders } = { responseHeaders: false }
|
|
140
133
|
) {
|
|
141
|
-
let invalidInput = [];
|
|
142
|
-
if (invalidInput.length) {
|
|
143
|
-
const error = new Error();
|
|
144
|
-
error.message = "Missing required field";
|
|
145
|
-
error.details = invalidInput;
|
|
146
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
147
|
-
}
|
|
148
|
-
|
|
149
134
|
const { error } = ConfigurationPublicValidator.searchApplication().validate(
|
|
150
135
|
{ authorization, query },
|
|
151
136
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -56,7 +56,7 @@ declare class Content {
|
|
|
56
56
|
* @summary: Get credentials to power chat support systems
|
|
57
57
|
* @description: Get credentials for support system - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCredentialsByEntity/).
|
|
58
58
|
*/
|
|
59
|
-
getCredentialsByEntity({ entityType, requestHeaders }?: ContentPublicValidator.GetCredentialsByEntityParam, { responseHeaders }?: object): Promise<ContentPublicModel.CredentialsSchema>;
|
|
59
|
+
getCredentialsByEntity({ entityType, requestHeaders }?: ContentPublicValidator.GetCredentialsByEntityParam, { responseHeaders }?: object, ...args: any[]): Promise<ContentPublicModel.CredentialsSchema>;
|
|
60
60
|
/**
|
|
61
61
|
* @param {ContentPublicValidator.GetCustomPageParam} arg - Arg object.
|
|
62
62
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -66,7 +66,7 @@ declare class Content {
|
|
|
66
66
|
* @summary: Retrieve info for custom page.
|
|
67
67
|
* @description: Retrieve info of custom pagee to develop and manage custom webpages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCustomPage/).
|
|
68
68
|
*/
|
|
69
|
-
getCustomPage({ slug, requestHeaders }?: ContentPublicValidator.GetCustomPageParam, { responseHeaders }?: object): Promise<ContentPublicModel.CustomPageBySlugSchema>;
|
|
69
|
+
getCustomPage({ slug, requestHeaders }?: ContentPublicValidator.GetCustomPageParam, { responseHeaders }?: object, ...args: any[]): Promise<ContentPublicModel.CustomPageBySlugSchema>;
|
|
70
70
|
/**
|
|
71
71
|
* @param {ContentPublicValidator.GetFooterContentParam} arg - Arg object.
|
|
72
72
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -106,7 +106,7 @@ declare class Content {
|
|
|
106
106
|
* @summary: Get desktop menu content
|
|
107
107
|
* @description: Retrieves the desktop menu content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getMenuContentByType/).
|
|
108
108
|
*/
|
|
109
|
-
getMenuContentByType({ type, requestHeaders }?: ContentPublicValidator.GetMenuContentByTypeParam, { responseHeaders }?: object): Promise<ContentPublicModel.MenuTypeSchema>;
|
|
109
|
+
getMenuContentByType({ type, requestHeaders }?: ContentPublicValidator.GetMenuContentByTypeParam, { responseHeaders }?: object, ...args: any[]): Promise<ContentPublicModel.MenuTypeSchema>;
|
|
110
110
|
/**
|
|
111
111
|
* @param {ContentPublicValidator.GetNavbarParam} arg - Arg object.
|
|
112
112
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const PublicAPIClient = require("../PublicAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
const ContentPublicValidator = require("./ContentPublicValidator");
|
|
11
12
|
const ContentPublicModel = require("./ContentPublicModel");
|
|
@@ -58,14 +59,6 @@ class Content {
|
|
|
58
59
|
{ requestHeaders } = { requestHeaders: {} },
|
|
59
60
|
{ responseHeaders } = { responseHeaders: false }
|
|
60
61
|
) {
|
|
61
|
-
let invalidInput = [];
|
|
62
|
-
if (invalidInput.length) {
|
|
63
|
-
const error = new Error();
|
|
64
|
-
error.message = "Missing required field";
|
|
65
|
-
error.details = invalidInput;
|
|
66
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
62
|
const { error } = ContentPublicValidator.getAllTags().validate(
|
|
70
63
|
{},
|
|
71
64
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -142,14 +135,6 @@ class Content {
|
|
|
142
135
|
{ requestHeaders } = { requestHeaders: {} },
|
|
143
136
|
{ responseHeaders } = { responseHeaders: false }
|
|
144
137
|
) {
|
|
145
|
-
let invalidInput = [];
|
|
146
|
-
if (invalidInput.length) {
|
|
147
|
-
const error = new Error();
|
|
148
|
-
error.message = "Missing required field";
|
|
149
|
-
error.details = invalidInput;
|
|
150
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
138
|
const { error } = ContentPublicValidator.getAnalyticsTags().validate(
|
|
154
139
|
{},
|
|
155
140
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -228,14 +213,6 @@ class Content {
|
|
|
228
213
|
{ requestHeaders } = { requestHeaders: {} },
|
|
229
214
|
{ responseHeaders } = { responseHeaders: false }
|
|
230
215
|
) {
|
|
231
|
-
let invalidInput = [];
|
|
232
|
-
if (invalidInput.length) {
|
|
233
|
-
const error = new Error();
|
|
234
|
-
error.message = "Missing required field";
|
|
235
|
-
error.details = invalidInput;
|
|
236
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
237
|
-
}
|
|
238
|
-
|
|
239
216
|
const { error } = ContentPublicValidator.getBasicDetails().validate(
|
|
240
217
|
{},
|
|
241
218
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -314,18 +291,12 @@ class Content {
|
|
|
314
291
|
{ entityType, requestHeaders } = { requestHeaders: {} },
|
|
315
292
|
{ responseHeaders } = { responseHeaders: false }
|
|
316
293
|
) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
path: ["entityType"],
|
|
294
|
+
const errors = validateRequiredParams(arguments[0], ["entityType"]);
|
|
295
|
+
if (errors.length > 0) {
|
|
296
|
+
const error = new FDKClientValidationError({
|
|
297
|
+
message: "Missing required field",
|
|
298
|
+
details: errors,
|
|
323
299
|
});
|
|
324
|
-
}
|
|
325
|
-
if (invalidInput.length) {
|
|
326
|
-
const error = new Error();
|
|
327
|
-
error.message = "Missing required field";
|
|
328
|
-
error.details = invalidInput;
|
|
329
300
|
return Promise.reject(new FDKClientValidationError(error));
|
|
330
301
|
}
|
|
331
302
|
|
|
@@ -407,18 +378,12 @@ class Content {
|
|
|
407
378
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
408
379
|
{ responseHeaders } = { responseHeaders: false }
|
|
409
380
|
) {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
path: ["slug"],
|
|
381
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
382
|
+
if (errors.length > 0) {
|
|
383
|
+
const error = new FDKClientValidationError({
|
|
384
|
+
message: "Missing required field",
|
|
385
|
+
details: errors,
|
|
416
386
|
});
|
|
417
|
-
}
|
|
418
|
-
if (invalidInput.length) {
|
|
419
|
-
const error = new Error();
|
|
420
|
-
error.message = "Missing required field";
|
|
421
|
-
error.details = invalidInput;
|
|
422
387
|
return Promise.reject(new FDKClientValidationError(error));
|
|
423
388
|
}
|
|
424
389
|
|
|
@@ -498,14 +463,6 @@ class Content {
|
|
|
498
463
|
{ requestHeaders } = { requestHeaders: {} },
|
|
499
464
|
{ responseHeaders } = { responseHeaders: false }
|
|
500
465
|
) {
|
|
501
|
-
let invalidInput = [];
|
|
502
|
-
if (invalidInput.length) {
|
|
503
|
-
const error = new Error();
|
|
504
|
-
error.message = "Missing required field";
|
|
505
|
-
error.details = invalidInput;
|
|
506
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
507
|
-
}
|
|
508
|
-
|
|
509
466
|
const { error } = ContentPublicValidator.getFooterContent().validate(
|
|
510
467
|
{},
|
|
511
468
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -584,21 +541,6 @@ class Content {
|
|
|
584
541
|
{ pageType, requestHeaders } = { requestHeaders: {} },
|
|
585
542
|
{ responseHeaders } = { responseHeaders: false }
|
|
586
543
|
) {
|
|
587
|
-
let invalidInput = [];
|
|
588
|
-
|
|
589
|
-
if (!pageType) {
|
|
590
|
-
invalidInput.push({
|
|
591
|
-
message: `The 'pageType' field is required.`,
|
|
592
|
-
path: ["pageType"],
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
if (invalidInput.length) {
|
|
596
|
-
const error = new Error();
|
|
597
|
-
error.message = "Missing required field";
|
|
598
|
-
error.details = invalidInput;
|
|
599
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
600
|
-
}
|
|
601
|
-
|
|
602
544
|
const { error } = ContentPublicValidator.getHomePageContent().validate(
|
|
603
545
|
{ pageType },
|
|
604
546
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -678,14 +620,6 @@ class Content {
|
|
|
678
620
|
{ requestHeaders } = { requestHeaders: {} },
|
|
679
621
|
{ responseHeaders } = { responseHeaders: false }
|
|
680
622
|
) {
|
|
681
|
-
let invalidInput = [];
|
|
682
|
-
if (invalidInput.length) {
|
|
683
|
-
const error = new Error();
|
|
684
|
-
error.message = "Missing required field";
|
|
685
|
-
error.details = invalidInput;
|
|
686
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
687
|
-
}
|
|
688
|
-
|
|
689
623
|
const { error } = ContentPublicValidator.getMenuContent().validate(
|
|
690
624
|
{},
|
|
691
625
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -764,18 +698,12 @@ class Content {
|
|
|
764
698
|
{ type, requestHeaders } = { requestHeaders: {} },
|
|
765
699
|
{ responseHeaders } = { responseHeaders: false }
|
|
766
700
|
) {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
path: ["type"],
|
|
701
|
+
const errors = validateRequiredParams(arguments[0], ["type"]);
|
|
702
|
+
if (errors.length > 0) {
|
|
703
|
+
const error = new FDKClientValidationError({
|
|
704
|
+
message: "Missing required field",
|
|
705
|
+
details: errors,
|
|
773
706
|
});
|
|
774
|
-
}
|
|
775
|
-
if (invalidInput.length) {
|
|
776
|
-
const error = new Error();
|
|
777
|
-
error.message = "Missing required field";
|
|
778
|
-
error.details = invalidInput;
|
|
779
707
|
return Promise.reject(new FDKClientValidationError(error));
|
|
780
708
|
}
|
|
781
709
|
|
|
@@ -857,14 +785,6 @@ class Content {
|
|
|
857
785
|
{ requestHeaders } = { requestHeaders: {} },
|
|
858
786
|
{ responseHeaders } = { responseHeaders: false }
|
|
859
787
|
) {
|
|
860
|
-
let invalidInput = [];
|
|
861
|
-
if (invalidInput.length) {
|
|
862
|
-
const error = new Error();
|
|
863
|
-
error.message = "Missing required field";
|
|
864
|
-
error.details = invalidInput;
|
|
865
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
866
|
-
}
|
|
867
|
-
|
|
868
788
|
const { error } = ContentPublicValidator.getNavbar().validate(
|
|
869
789
|
{},
|
|
870
790
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -941,14 +861,6 @@ class Content {
|
|
|
941
861
|
{ requestHeaders } = { requestHeaders: {} },
|
|
942
862
|
{ responseHeaders } = { responseHeaders: false }
|
|
943
863
|
) {
|
|
944
|
-
let invalidInput = [];
|
|
945
|
-
if (invalidInput.length) {
|
|
946
|
-
const error = new Error();
|
|
947
|
-
error.message = "Missing required field";
|
|
948
|
-
error.details = invalidInput;
|
|
949
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
950
|
-
}
|
|
951
|
-
|
|
952
864
|
const { error } = ContentPublicValidator.getPricingBanner().validate(
|
|
953
865
|
{},
|
|
954
866
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -16,7 +16,7 @@ declare class Partner {
|
|
|
16
16
|
* @summary: Get panel extension details
|
|
17
17
|
* @description: Retrieve detailed information about panel extensions in the public server setup. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/partner/getPanelExtensionDetails/).
|
|
18
18
|
*/
|
|
19
|
-
getPanelExtensionDetails({ slug, requestHeaders }?: PartnerPublicValidator.GetPanelExtensionDetailsParam, { responseHeaders }?: object): Promise<PartnerPublicModel.ExtensionUsingSlug>;
|
|
19
|
+
getPanelExtensionDetails({ slug, requestHeaders }?: PartnerPublicValidator.GetPanelExtensionDetailsParam, { responseHeaders }?: object, ...args: any[]): Promise<PartnerPublicModel.ExtensionUsingSlug>;
|
|
20
20
|
}
|
|
21
21
|
import PartnerPublicValidator = require("./PartnerPublicValidator");
|
|
22
22
|
import PartnerPublicModel = require("./PartnerPublicModel");
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const PublicAPIClient = require("../PublicAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
const PartnerPublicValidator = require("./PartnerPublicValidator");
|
|
11
12
|
const PartnerPublicModel = require("./PartnerPublicModel");
|
|
@@ -48,18 +49,12 @@ class Partner {
|
|
|
48
49
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
49
50
|
{ responseHeaders } = { responseHeaders: false }
|
|
50
51
|
) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
path: ["slug"],
|
|
52
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
53
|
+
if (errors.length > 0) {
|
|
54
|
+
const error = new FDKClientValidationError({
|
|
55
|
+
message: "Missing required field",
|
|
56
|
+
details: errors,
|
|
57
57
|
});
|
|
58
|
-
}
|
|
59
|
-
if (invalidInput.length) {
|
|
60
|
-
const error = new Error();
|
|
61
|
-
error.message = "Missing required field";
|
|
62
|
-
error.details = invalidInput;
|
|
63
58
|
return Promise.reject(new FDKClientValidationError(error));
|
|
64
59
|
}
|
|
65
60
|
|
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const PublicAPIClient = require("../PublicAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
const WebhookPublicValidator = require("./WebhookPublicValidator");
|
|
11
12
|
const WebhookPublicModel = require("./WebhookPublicModel");
|
|
@@ -55,14 +56,6 @@ class Webhook {
|
|
|
55
56
|
{ requestHeaders } = { requestHeaders: {} },
|
|
56
57
|
{ responseHeaders } = { responseHeaders: false }
|
|
57
58
|
) {
|
|
58
|
-
let invalidInput = [];
|
|
59
|
-
if (invalidInput.length) {
|
|
60
|
-
const error = new Error();
|
|
61
|
-
error.message = "Missing required field";
|
|
62
|
-
error.details = invalidInput;
|
|
63
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
59
|
const { error } = WebhookPublicValidator.fetchAllWebhookEvents().validate(
|
|
67
60
|
{},
|
|
68
61
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -141,14 +134,6 @@ class Webhook {
|
|
|
141
134
|
{ requestHeaders } = { requestHeaders: {} },
|
|
142
135
|
{ responseHeaders } = { responseHeaders: false }
|
|
143
136
|
) {
|
|
144
|
-
let invalidInput = [];
|
|
145
|
-
if (invalidInput.length) {
|
|
146
|
-
const error = new Error();
|
|
147
|
-
error.message = "Missing required field";
|
|
148
|
-
error.details = invalidInput;
|
|
149
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
150
|
-
}
|
|
151
|
-
|
|
152
137
|
const { error } = WebhookPublicValidator.notifyDepricatedEvent().validate(
|
|
153
138
|
{},
|
|
154
139
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -227,14 +212,6 @@ class Webhook {
|
|
|
227
212
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
228
213
|
{ responseHeaders } = { responseHeaders: false }
|
|
229
214
|
) {
|
|
230
|
-
let invalidInput = [];
|
|
231
|
-
if (invalidInput.length) {
|
|
232
|
-
const error = new Error();
|
|
233
|
-
error.message = "Missing required field";
|
|
234
|
-
error.details = invalidInput;
|
|
235
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
236
|
-
}
|
|
237
|
-
|
|
238
215
|
const {
|
|
239
216
|
error,
|
|
240
217
|
} = WebhookPublicValidator.queryWebhookEventDetails().validate(
|
|
@@ -315,14 +292,6 @@ class Webhook {
|
|
|
315
292
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
316
293
|
{ responseHeaders } = { responseHeaders: false }
|
|
317
294
|
) {
|
|
318
|
-
let invalidInput = [];
|
|
319
|
-
if (invalidInput.length) {
|
|
320
|
-
const error = new Error();
|
|
321
|
-
error.message = "Missing required field";
|
|
322
|
-
error.details = invalidInput;
|
|
323
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
324
|
-
}
|
|
325
|
-
|
|
326
295
|
const {
|
|
327
296
|
error,
|
|
328
297
|
} = WebhookPublicValidator.testHandlerTransformation().validate(
|
|
@@ -403,14 +372,6 @@ class Webhook {
|
|
|
403
372
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
404
373
|
{ responseHeaders } = { responseHeaders: false }
|
|
405
374
|
) {
|
|
406
|
-
let invalidInput = [];
|
|
407
|
-
if (invalidInput.length) {
|
|
408
|
-
const error = new Error();
|
|
409
|
-
error.message = "Missing required field";
|
|
410
|
-
error.details = invalidInput;
|
|
411
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
412
|
-
}
|
|
413
|
-
|
|
414
375
|
const { error } = WebhookPublicValidator.validateSchema().validate(
|
|
415
376
|
{ body },
|
|
416
377
|
{ abortEarly: false, allowUnknown: true }
|