@gofynd/fdk-client-javascript 1.6.4 → 2.0.0
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 +20 -20
- package/sdk/application/Catalog/CatalogApplicationClient.js +98 -347
- package/sdk/application/Common/CommonApplicationClient.js +1 -16
- package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +24 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +58 -137
- package/sdk/application/Content/ContentApplicationClient.d.ts +47 -7
- package/sdk/application/Content/ContentApplicationClient.js +222 -191
- 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 +16 -56
- package/sdk/application/Logistic/LogisticApplicationClient.js +57 -332
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
- package/sdk/application/Order/OrderApplicationClient.js +68 -153
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -12
- package/sdk/application/Payment/PaymentApplicationClient.js +7 -487
- 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/partner/FileStorage/FileStoragePartnerClient.d.ts +1 -55
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +1 -408
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -37
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -0
- package/sdk/partner/Lead/LeadPartnerModel.js +2 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +29 -25
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +65 -42
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1008 -794
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +573 -460
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +10 -5
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.js +2 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +2 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +67 -9
- package/sdk/platform/Cart/CartPlatformModel.js +38 -5
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.js +4 -4
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +47 -13
- package/sdk/platform/Catalog/CatalogPlatformModel.js +29 -7
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +7 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +71 -7
- package/sdk/platform/Communication/CommunicationPlatformModel.js +70 -6
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +0 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +8 -60
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +31 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -3
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +13 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +68 -11
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +49 -7
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +169 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1279 -132
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +156 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +180 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +162 -0
- package/sdk/platform/Content/ContentPlatformClient.js +1697 -497
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1053 -35
- package/sdk/platform/Content/ContentPlatformModel.js +717 -34
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +127 -1
- package/sdk/platform/Content/ContentPlatformValidator.js +171 -0
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +34 -0
- package/sdk/platform/Discount/DiscountPlatformClient.js +59 -0
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +365 -93
- package/sdk/platform/Discount/DiscountPlatformModel.js +98 -93
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +54 -34
- package/sdk/platform/Discount/DiscountPlatformValidator.js +27 -17
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +0 -156
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +0 -1072
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -137
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +0 -173
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +1 -1105
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +0 -1125
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -0
- package/sdk/platform/Lead/LeadPlatformModel.js +2 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +212 -0
- package/sdk/platform/Order/OrderPlatformClient.js +397 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +41 -9
- package/sdk/platform/Order/OrderPlatformModel.js +20 -7
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +58 -10
- package/sdk/platform/Partner/PartnerPlatformModel.js +19 -10
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -2
- package/sdk/platform/Payment/PaymentPlatformModel.js +8 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +5 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.js +2 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +240 -24
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +1753 -277
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +320 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +269 -19
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +53 -104
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +201 -629
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +5720 -2891
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3414 -2181
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +138 -216
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +81 -148
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
- package/sdk/platform/Share/SharePlatformModel.js +2 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +10 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +79 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +13 -1
- package/sdk/platform/User/UserPlatformApplicationValidator.js +12 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +52 -1
- package/sdk/platform/User/UserPlatformModel.js +36 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +5 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +2 -0
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +1 -1
- package/sdk/public/Catalog/CatalogPublicClient.js +6 -11
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -3
- package/sdk/public/Content/ContentPublicClient.js +261 -104
- package/sdk/public/Content/ContentPublicModel.d.ts +155 -1
- package/sdk/public/Content/ContentPublicModel.js +102 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -1
- package/sdk/public/Content/ContentPublicValidator.js +26 -0
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
|
@@ -314,6 +314,60 @@ const Joi = require("joi");
|
|
|
314
314
|
* @property {Object} [meta]
|
|
315
315
|
*/
|
|
316
316
|
|
|
317
|
+
/**
|
|
318
|
+
* @typedef Language
|
|
319
|
+
* @property {string} [_id] - Unique identifier for the language entry in the
|
|
320
|
+
* system database.
|
|
321
|
+
* @property {string} locale - Standard language code following ISO 639-1 format
|
|
322
|
+
* for language identification.
|
|
323
|
+
* @property {string} direction - Text direction specification for proper
|
|
324
|
+
* content rendering in the language.
|
|
325
|
+
* @property {string} name - Full name of the language in English for easy
|
|
326
|
+
* reference and display at the merchant panel.
|
|
327
|
+
* @property {string} [display_name] - Translated name of the language in
|
|
328
|
+
* English for easy reference and display at the website.
|
|
329
|
+
*/
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* @typedef Error
|
|
333
|
+
* @property {string} [error] - Detailed error message explaining the nature of
|
|
334
|
+
* the failure or invalid request.
|
|
335
|
+
*/
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* @typedef TranslatableResource
|
|
339
|
+
* @property {string} [_id] - Unique identifier for the translatable resource in
|
|
340
|
+
* the system.
|
|
341
|
+
* @property {string} type - Categorization of the resource indicating its
|
|
342
|
+
* context and ownership level
|
|
343
|
+
* @property {string} name - Primary identifier or title of the resource in its
|
|
344
|
+
* default language.
|
|
345
|
+
* @property {string} description - Detailed explanation of the resource's
|
|
346
|
+
* purpose and content scope.
|
|
347
|
+
* @property {Meta} meta
|
|
348
|
+
*/
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* @typedef Meta
|
|
352
|
+
* @property {string} [created_by] - MongoDB ObjectId of the user who initially
|
|
353
|
+
* created the resource.
|
|
354
|
+
* @property {string} [updated_by] - MongoDB ObjectId of the user who last
|
|
355
|
+
* modified the resource.
|
|
356
|
+
* @property {string} [created_at] - Timestamp indicating when the resource was
|
|
357
|
+
* first created.
|
|
358
|
+
* @property {string} [updated_at] - Timestamp indicating when the resource was
|
|
359
|
+
* last modified.
|
|
360
|
+
*/
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* @typedef ResourceTranslation
|
|
364
|
+
* @property {string} [_id] - Unique identifier for the translation entry in the system.
|
|
365
|
+
* @property {string} [locale] - Language code indicating the target language of
|
|
366
|
+
* the translation.
|
|
367
|
+
* @property {Object} [value] - Contains the translated content with flexible
|
|
368
|
+
* schema based on resource type.
|
|
369
|
+
*/
|
|
370
|
+
|
|
317
371
|
class ContentPublicModel {
|
|
318
372
|
/** @returns {BasicDetailsPayloadSchema} */
|
|
319
373
|
static BasicDetailsPayloadSchema() {
|
|
@@ -702,5 +756,53 @@ class ContentPublicModel {
|
|
|
702
756
|
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
703
757
|
});
|
|
704
758
|
}
|
|
759
|
+
|
|
760
|
+
/** @returns {Language} */
|
|
761
|
+
static Language() {
|
|
762
|
+
return Joi.object({
|
|
763
|
+
_id: Joi.string().allow(""),
|
|
764
|
+
locale: Joi.string().allow("").required(),
|
|
765
|
+
direction: Joi.string().allow("").required(),
|
|
766
|
+
name: Joi.string().allow("").required(),
|
|
767
|
+
display_name: Joi.string().allow(""),
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/** @returns {Error} */
|
|
772
|
+
static Error() {
|
|
773
|
+
return Joi.object({
|
|
774
|
+
error: Joi.string().allow(""),
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/** @returns {TranslatableResource} */
|
|
779
|
+
static TranslatableResource() {
|
|
780
|
+
return Joi.object({
|
|
781
|
+
_id: Joi.string().allow(""),
|
|
782
|
+
type: Joi.string().allow("").required(),
|
|
783
|
+
name: Joi.string().allow("").required(),
|
|
784
|
+
description: Joi.string().allow("").required(),
|
|
785
|
+
meta: ContentPublicModel.Meta().required(),
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
/** @returns {Meta} */
|
|
790
|
+
static Meta() {
|
|
791
|
+
return Joi.object({
|
|
792
|
+
created_by: Joi.string().allow(""),
|
|
793
|
+
updated_by: Joi.string().allow(""),
|
|
794
|
+
created_at: Joi.string().allow(""),
|
|
795
|
+
updated_at: Joi.string().allow(""),
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/** @returns {ResourceTranslation} */
|
|
800
|
+
static ResourceTranslation() {
|
|
801
|
+
return Joi.object({
|
|
802
|
+
_id: Joi.string().allow(""),
|
|
803
|
+
locale: Joi.string().allow(""),
|
|
804
|
+
value: Joi.object().pattern(/\S/, Joi.any()),
|
|
805
|
+
});
|
|
806
|
+
}
|
|
705
807
|
}
|
|
706
808
|
module.exports = ContentPublicModel;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export = ContentPublicValidator;
|
|
2
|
+
/** @typedef GetAllLanguagesParam */
|
|
2
3
|
/** @typedef GetAllTagsParam */
|
|
4
|
+
/** @typedef GetAllTranslatableResourcesParam */
|
|
3
5
|
/** @typedef GetAnalyticsTagsParam */
|
|
4
6
|
/** @typedef GetBasicDetailsParam */
|
|
5
7
|
/**
|
|
@@ -16,6 +18,10 @@ export = ContentPublicValidator;
|
|
|
16
18
|
* @typedef GetHomePageContentParam
|
|
17
19
|
* @property {string} pageType - The type of the page (e.g., pricing).
|
|
18
20
|
*/
|
|
21
|
+
/**
|
|
22
|
+
* @typedef GetLanguageByLocaleParam
|
|
23
|
+
* @property {string} locale
|
|
24
|
+
*/
|
|
19
25
|
/** @typedef GetMenuContentParam */
|
|
20
26
|
/**
|
|
21
27
|
* @typedef GetMenuContentByTypeParam
|
|
@@ -24,8 +30,12 @@ export = ContentPublicValidator;
|
|
|
24
30
|
/** @typedef GetNavbarParam */
|
|
25
31
|
/** @typedef GetPricingBannerParam */
|
|
26
32
|
declare class ContentPublicValidator {
|
|
33
|
+
/** @returns {GetAllLanguagesParam} */
|
|
34
|
+
static getAllLanguages(): any;
|
|
27
35
|
/** @returns {GetAllTagsParam} */
|
|
28
36
|
static getAllTags(): any;
|
|
37
|
+
/** @returns {GetAllTranslatableResourcesParam} */
|
|
38
|
+
static getAllTranslatableResources(): any;
|
|
29
39
|
/** @returns {GetAnalyticsTagsParam} */
|
|
30
40
|
static getAnalyticsTags(): any;
|
|
31
41
|
/** @returns {GetBasicDetailsParam} */
|
|
@@ -38,6 +48,8 @@ declare class ContentPublicValidator {
|
|
|
38
48
|
static getFooterContent(): any;
|
|
39
49
|
/** @returns {GetHomePageContentParam} */
|
|
40
50
|
static getHomePageContent(): GetHomePageContentParam;
|
|
51
|
+
/** @returns {GetLanguageByLocaleParam} */
|
|
52
|
+
static getLanguageByLocale(): GetLanguageByLocaleParam;
|
|
41
53
|
/** @returns {GetMenuContentParam} */
|
|
42
54
|
static getMenuContent(): any;
|
|
43
55
|
/** @returns {GetMenuContentByTypeParam} */
|
|
@@ -48,7 +60,7 @@ declare class ContentPublicValidator {
|
|
|
48
60
|
static getPricingBanner(): any;
|
|
49
61
|
}
|
|
50
62
|
declare namespace ContentPublicValidator {
|
|
51
|
-
export { GetAllTagsParam, GetAnalyticsTagsParam, GetBasicDetailsParam, GetCredentialsByEntityParam, GetCustomPageParam, GetFooterContentParam, GetHomePageContentParam, GetMenuContentParam, GetMenuContentByTypeParam, GetNavbarParam, GetPricingBannerParam };
|
|
63
|
+
export { GetAllLanguagesParam, GetAllTagsParam, GetAllTranslatableResourcesParam, GetAnalyticsTagsParam, GetBasicDetailsParam, GetCredentialsByEntityParam, GetCustomPageParam, GetFooterContentParam, GetHomePageContentParam, GetLanguageByLocaleParam, GetMenuContentParam, GetMenuContentByTypeParam, GetNavbarParam, GetPricingBannerParam };
|
|
52
64
|
}
|
|
53
65
|
type GetCredentialsByEntityParam = {
|
|
54
66
|
/**
|
|
@@ -69,13 +81,18 @@ type GetHomePageContentParam = {
|
|
|
69
81
|
*/
|
|
70
82
|
pageType: string;
|
|
71
83
|
};
|
|
84
|
+
type GetLanguageByLocaleParam = {
|
|
85
|
+
locale: string;
|
|
86
|
+
};
|
|
72
87
|
type GetMenuContentByTypeParam = {
|
|
73
88
|
/**
|
|
74
89
|
* - Type param is type of device
|
|
75
90
|
*/
|
|
76
91
|
type: string;
|
|
77
92
|
};
|
|
93
|
+
type GetAllLanguagesParam = any;
|
|
78
94
|
type GetAllTagsParam = any;
|
|
95
|
+
type GetAllTranslatableResourcesParam = any;
|
|
79
96
|
type GetAnalyticsTagsParam = any;
|
|
80
97
|
type GetBasicDetailsParam = any;
|
|
81
98
|
type GetFooterContentParam = any;
|
|
@@ -2,8 +2,12 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
const ContentPublicModel = require("./ContentPublicModel");
|
|
4
4
|
|
|
5
|
+
/** @typedef GetAllLanguagesParam */
|
|
6
|
+
|
|
5
7
|
/** @typedef GetAllTagsParam */
|
|
6
8
|
|
|
9
|
+
/** @typedef GetAllTranslatableResourcesParam */
|
|
10
|
+
|
|
7
11
|
/** @typedef GetAnalyticsTagsParam */
|
|
8
12
|
|
|
9
13
|
/** @typedef GetBasicDetailsParam */
|
|
@@ -26,6 +30,11 @@ const ContentPublicModel = require("./ContentPublicModel");
|
|
|
26
30
|
* @property {string} pageType - The type of the page (e.g., pricing).
|
|
27
31
|
*/
|
|
28
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @typedef GetLanguageByLocaleParam
|
|
35
|
+
* @property {string} locale
|
|
36
|
+
*/
|
|
37
|
+
|
|
29
38
|
/** @typedef GetMenuContentParam */
|
|
30
39
|
|
|
31
40
|
/**
|
|
@@ -38,11 +47,21 @@ const ContentPublicModel = require("./ContentPublicModel");
|
|
|
38
47
|
/** @typedef GetPricingBannerParam */
|
|
39
48
|
|
|
40
49
|
class ContentPublicValidator {
|
|
50
|
+
/** @returns {GetAllLanguagesParam} */
|
|
51
|
+
static getAllLanguages() {
|
|
52
|
+
return Joi.object({});
|
|
53
|
+
}
|
|
54
|
+
|
|
41
55
|
/** @returns {GetAllTagsParam} */
|
|
42
56
|
static getAllTags() {
|
|
43
57
|
return Joi.object({});
|
|
44
58
|
}
|
|
45
59
|
|
|
60
|
+
/** @returns {GetAllTranslatableResourcesParam} */
|
|
61
|
+
static getAllTranslatableResources() {
|
|
62
|
+
return Joi.object({});
|
|
63
|
+
}
|
|
64
|
+
|
|
46
65
|
/** @returns {GetAnalyticsTagsParam} */
|
|
47
66
|
static getAnalyticsTags() {
|
|
48
67
|
return Joi.object({});
|
|
@@ -79,6 +98,13 @@ class ContentPublicValidator {
|
|
|
79
98
|
}).required();
|
|
80
99
|
}
|
|
81
100
|
|
|
101
|
+
/** @returns {GetLanguageByLocaleParam} */
|
|
102
|
+
static getLanguageByLocale() {
|
|
103
|
+
return Joi.object({
|
|
104
|
+
locale: Joi.string().allow("").required(),
|
|
105
|
+
}).required();
|
|
106
|
+
}
|
|
107
|
+
|
|
82
108
|
/** @returns {GetMenuContentParam} */
|
|
83
109
|
static getMenuContent() {
|
|
84
110
|
return Joi.object({});
|
|
@@ -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
|
|