@gofynd/fdk-client-javascript 1.4.15 → 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 +16 -16
- package/sdk/application/Cart/CartApplicationClient.js +101 -48
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -16
- package/sdk/application/Catalog/CatalogApplicationClient.js +159 -0
- package/sdk/application/Common/CommonApplicationClient.js +6 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +2 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +24 -0
- package/sdk/application/Content/ContentApplicationClient.d.ts +59 -7
- package/sdk/application/Content/ContentApplicationClient.js +290 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +24 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +6 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +42 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +6 -6
- package/sdk/application/Logistic/LogisticApplicationClient.js +69 -2
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
- package/sdk/application/Order/OrderApplicationClient.js +117 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -11
- package/sdk/application/Payment/PaymentApplicationClient.js +15 -39
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +15 -0
- package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationClient.js +42 -0
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +36 -0
- package/sdk/application/User/UserApplicationClient.js +6 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +6 -0
- 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/partner/Logistics/LogisticsPartnerClient.d.ts +12 -33
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +38 -209
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +19 -399
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +11 -212
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -3
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -22
- package/sdk/partner/OAuthClient.js +1 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -40
- package/sdk/partner/Theme/ThemePartnerModel.js +2 -24
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +12 -3
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -1
- package/sdk/platform/Cart/CartPlatformModel.d.ts +49 -28
- package/sdk/platform/Cart/CartPlatformModel.js +23 -13
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +0 -24
- package/sdk/platform/Catalog/CatalogPlatformClient.js +0 -176
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +33 -80
- package/sdk/platform/Catalog/CatalogPlatformModel.js +36 -72
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1 -45
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +0 -35
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +3 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +132 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1104 -122
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +159 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +161 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +220 -5
- package/sdk/platform/Content/ContentPlatformModel.js +214 -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 +12 -2
- package/sdk/platform/Order/OrderPlatformClient.js +99 -8
- package/sdk/platform/Order/OrderPlatformModel.d.ts +3 -75
- package/sdk/platform/Order/OrderPlatformModel.js +2 -43
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -23
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -95
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +78 -701
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +23 -598
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +20 -382
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +3 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +2 -110
- 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/platform/Theme/ThemePlatformModel.d.ts +3 -40
- package/sdk/platform/Theme/ThemePlatformModel.js +2 -24
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +3 -3
- package/sdk/public/Content/ContentPublicClient.js +28 -0
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +10 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -0
|
@@ -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
|
|
|
@@ -387,16 +387,7 @@ export = ThemePlatformModel;
|
|
|
387
387
|
*/
|
|
388
388
|
/**
|
|
389
389
|
* @typedef GlobalSchema
|
|
390
|
-
* @property {
|
|
391
|
-
*/
|
|
392
|
-
/**
|
|
393
|
-
* @typedef Prop
|
|
394
|
-
* @property {string} [type] - The type of the property
|
|
395
|
-
* @property {string} [category] - The category of the property
|
|
396
|
-
* @property {string} [value] - The value of the property
|
|
397
|
-
* @property {string} [id] - The ID of the property
|
|
398
|
-
* @property {string} [label] - The label of the property
|
|
399
|
-
* @property {string} [info] - Additional information about the property
|
|
390
|
+
* @property {Object[]} [props]
|
|
400
391
|
*/
|
|
401
392
|
/**
|
|
402
393
|
* @typedef Assets
|
|
@@ -598,7 +589,7 @@ export = ThemePlatformModel;
|
|
|
598
589
|
declare class ThemePlatformModel {
|
|
599
590
|
}
|
|
600
591
|
declare namespace ThemePlatformModel {
|
|
601
|
-
export { GetExtensionSectionRes, ExtensionSection, PropExtension, AssetsExtension, ThemeReq, CompanyThemeSchema, MarketplaceThemeId, CompanyThemeMeta, ThemePayment, ThemeImages, AvailablePageSchema, AvailablePageSectionMetaAttributes, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSeo, AvailablePageSchemaSections, SectionSource, AvailablePagePredicate, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AllAvailablePageSchema, AddThemeRequestSchema, FontsSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, FontsSchemaItems, FontsSchemaItemsFiles, ThemesSchema, ThemeUpgradable, UpdateThemeNameRequestBody, UpdateThemeRequestBody, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, ThemeMeta, Release, Images, CustomProps, GlobalSchema,
|
|
592
|
+
export { GetExtensionSectionRes, ExtensionSection, PropExtension, AssetsExtension, ThemeReq, CompanyThemeSchema, MarketplaceThemeId, CompanyThemeMeta, ThemePayment, ThemeImages, AvailablePageSchema, AvailablePageSectionMetaAttributes, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSeo, AvailablePageSchemaSections, SectionSource, AvailablePagePredicate, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AllAvailablePageSchema, AddThemeRequestSchema, FontsSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, FontsSchemaItems, FontsSchemaItemsFiles, ThemesSchema, ThemeUpgradable, UpdateThemeNameRequestBody, UpdateThemeRequestBody, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, ThemeMeta, Release, Images, CustomProps, GlobalSchema, Assets, UMDJs, CommonJS, CSS, SectionItem, Preset, Page, Section, Block, Predicate, Screen, ThemeUserSchema, Route, SectionProps, SectionPreset, BlockProps, TextProp, CheckboxProp, RangeProp, ImagePickerProp, UrlProp, ThemeVersions, DummyTheme, AppliedThemes, CompanyPrivateTheme, ActionPage, PageType };
|
|
602
593
|
}
|
|
603
594
|
/** @returns {GetExtensionSectionRes} */
|
|
604
595
|
declare function GetExtensionSectionRes(): GetExtensionSectionRes;
|
|
@@ -1312,35 +1303,7 @@ type CustomProps = {
|
|
|
1312
1303
|
/** @returns {GlobalSchema} */
|
|
1313
1304
|
declare function GlobalSchema(): GlobalSchema;
|
|
1314
1305
|
type GlobalSchema = {
|
|
1315
|
-
props?:
|
|
1316
|
-
};
|
|
1317
|
-
/** @returns {Prop} */
|
|
1318
|
-
declare function Prop(): Prop;
|
|
1319
|
-
type Prop = {
|
|
1320
|
-
/**
|
|
1321
|
-
* - The type of the property
|
|
1322
|
-
*/
|
|
1323
|
-
type?: string;
|
|
1324
|
-
/**
|
|
1325
|
-
* - The category of the property
|
|
1326
|
-
*/
|
|
1327
|
-
category?: string;
|
|
1328
|
-
/**
|
|
1329
|
-
* - The value of the property
|
|
1330
|
-
*/
|
|
1331
|
-
value?: string;
|
|
1332
|
-
/**
|
|
1333
|
-
* - The ID of the property
|
|
1334
|
-
*/
|
|
1335
|
-
id?: string;
|
|
1336
|
-
/**
|
|
1337
|
-
* - The label of the property
|
|
1338
|
-
*/
|
|
1339
|
-
label?: string;
|
|
1340
|
-
/**
|
|
1341
|
-
* - Additional information about the property
|
|
1342
|
-
*/
|
|
1343
|
-
info?: string;
|
|
1306
|
+
props?: any[];
|
|
1344
1307
|
};
|
|
1345
1308
|
/** @returns {Assets} */
|
|
1346
1309
|
declare function Assets(): Assets;
|
|
@@ -441,17 +441,7 @@ const Joi = require("joi");
|
|
|
441
441
|
|
|
442
442
|
/**
|
|
443
443
|
* @typedef GlobalSchema
|
|
444
|
-
* @property {
|
|
445
|
-
*/
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* @typedef Prop
|
|
449
|
-
* @property {string} [type] - The type of the property
|
|
450
|
-
* @property {string} [category] - The category of the property
|
|
451
|
-
* @property {string} [value] - The value of the property
|
|
452
|
-
* @property {string} [id] - The ID of the property
|
|
453
|
-
* @property {string} [label] - The label of the property
|
|
454
|
-
* @property {string} [info] - Additional information about the property
|
|
444
|
+
* @property {Object[]} [props]
|
|
455
445
|
*/
|
|
456
446
|
|
|
457
447
|
/**
|
|
@@ -1224,19 +1214,7 @@ class ThemePlatformModel {
|
|
|
1224
1214
|
/** @returns {GlobalSchema} */
|
|
1225
1215
|
static GlobalSchema() {
|
|
1226
1216
|
return Joi.object({
|
|
1227
|
-
props: Joi.array().items(
|
|
1228
|
-
});
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
/** @returns {Prop} */
|
|
1232
|
-
static Prop() {
|
|
1233
|
-
return Joi.object({
|
|
1234
|
-
type: Joi.string().allow(""),
|
|
1235
|
-
category: Joi.string().allow(""),
|
|
1236
|
-
value: Joi.string().allow(""),
|
|
1237
|
-
id: Joi.string().allow(""),
|
|
1238
|
-
label: Joi.string().allow(""),
|
|
1239
|
-
info: Joi.string().allow(""),
|
|
1217
|
+
props: Joi.array().items(Joi.any()),
|
|
1240
1218
|
});
|
|
1241
1219
|
}
|
|
1242
1220
|
|
|
@@ -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");
|
|
@@ -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");
|
|
@@ -290,6 +291,15 @@ class Content {
|
|
|
290
291
|
{ entityType, requestHeaders } = { requestHeaders: {} },
|
|
291
292
|
{ responseHeaders } = { responseHeaders: false }
|
|
292
293
|
) {
|
|
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,
|
|
299
|
+
});
|
|
300
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
301
|
+
}
|
|
302
|
+
|
|
293
303
|
const { error } = ContentPublicValidator.getCredentialsByEntity().validate(
|
|
294
304
|
{ entityType },
|
|
295
305
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -368,6 +378,15 @@ class Content {
|
|
|
368
378
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
369
379
|
{ responseHeaders } = { responseHeaders: false }
|
|
370
380
|
) {
|
|
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,
|
|
386
|
+
});
|
|
387
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
388
|
+
}
|
|
389
|
+
|
|
371
390
|
const { error } = ContentPublicValidator.getCustomPage().validate(
|
|
372
391
|
{ slug },
|
|
373
392
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -679,6 +698,15 @@ class Content {
|
|
|
679
698
|
{ type, requestHeaders } = { requestHeaders: {} },
|
|
680
699
|
{ responseHeaders } = { responseHeaders: false }
|
|
681
700
|
) {
|
|
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,
|
|
706
|
+
});
|
|
707
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
708
|
+
}
|
|
709
|
+
|
|
682
710
|
const { error } = ContentPublicValidator.getMenuContentByType().validate(
|
|
683
711
|
{ type },
|
|
684
712
|
{ 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,6 +49,15 @@ class Partner {
|
|
|
48
49
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
49
50
|
{ responseHeaders } = { responseHeaders: false }
|
|
50
51
|
) {
|
|
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
|
+
});
|
|
58
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
59
|
+
}
|
|
60
|
+
|
|
51
61
|
const {
|
|
52
62
|
error,
|
|
53
63
|
} = PartnerPublicValidator.getPanelExtensionDetails().validate(
|
|
@@ -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");
|