@gofynd/fdk-client-javascript 1.2.0 → 1.3.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 +44 -7
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +3 -3
- package/sdk/application/ApplicationAPIClient.js +6 -4
- package/sdk/application/ApplicationClient.d.ts +2 -3
- package/sdk/application/ApplicationClient.js +1 -45
- package/sdk/application/ApplicationConfig.d.ts +46 -6
- package/sdk/application/ApplicationConfig.js +15 -16
- package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
- package/sdk/application/Cart/CartApplicationClient.js +225 -134
- package/sdk/application/Cart/CartApplicationModel.d.ts +4 -4
- package/sdk/application/Cart/CartApplicationModel.js +4 -4
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
- package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
- package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
- package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
- package/sdk/application/Common/CommonApplicationClient.js +13 -11
- package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
- package/sdk/application/Common/CommonApplicationModel.js +2 -58
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
- package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
- package/sdk/application/Content/ContentApplicationClient.js +159 -80
- package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
- package/sdk/application/Content/ContentApplicationModel.js +11 -763
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
- package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
- package/sdk/application/Lead/LeadApplicationClient.js +50 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
- package/sdk/application/Lead/LeadApplicationModel.js +21 -481
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
- package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
- package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
- package/sdk/application/Order/OrderApplicationClient.js +88 -56
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
- package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
- package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
- package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
- package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
- package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
- package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
- package/sdk/application/Share/ShareApplicationClient.js +51 -31
- package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
- package/sdk/application/Share/ShareApplicationModel.js +0 -38
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
- package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
- package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
- package/sdk/application/User/UserApplicationClient.d.ts +74 -35
- package/sdk/application/User/UserApplicationClient.js +252 -161
- package/sdk/application/User/UserApplicationModel.d.ts +3 -401
- package/sdk/application/User/UserApplicationModel.js +2 -490
- package/sdk/common/AxiosHelper.js +1 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +5 -4
- package/sdk/partner/PartnerAPIClient.js +7 -4
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
- package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
- package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
- package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
- package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
- package/sdk/platform/Cart/CartPlatformModel.js +104 -54
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
- package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
- package/sdk/platform/Common/CommonPlatformClient.js +13 -11
- package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
- package/sdk/platform/Common/CommonPlatformModel.js +23 -57
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
- package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
- package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
- package/sdk/platform/Content/ContentPlatformModel.js +8 -231
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
- package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
- package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
- package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
- package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
- package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
- package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
- package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
- package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
- package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
- package/sdk/platform/Order/OrderPlatformClient.js +738 -205
- package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
- package/sdk/platform/Order/OrderPlatformModel.js +225 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
- package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
- package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
- package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
- package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
- package/sdk/platform/PlatformAPIClient.d.ts +3 -3
- package/sdk/platform/PlatformAPIClient.js +2 -2
- package/sdk/platform/PlatformClient.d.ts +2 -2
- package/sdk/platform/PlatformClient.js +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
- package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
- package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
- package/sdk/platform/Share/SharePlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
- package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
- package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
- package/sdk/platform/User/UserPlatformModel.js +3 -899
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
- package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
- package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +96 -9
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +117 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
- package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
- package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
- package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
- package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -48
- package/sdk/application/ApplicationModels.js +0 -38
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef Benefits
|
|
5
|
+
* @property {string} [description]
|
|
6
|
+
* @property {string} [title]
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @typedef CategoryCommon
|
|
11
|
+
* @property {CategoryL1[]} [category_l1]
|
|
12
|
+
* @property {CategoryL2[]} [category_l2]
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @typedef CategoryL1
|
|
17
|
+
* @property {string} [_id]
|
|
18
|
+
* @property {string} [description]
|
|
19
|
+
* @property {string} [display]
|
|
20
|
+
* @property {number} [level]
|
|
21
|
+
* @property {string} [logo]
|
|
22
|
+
* @property {string} [slug]
|
|
23
|
+
* @property {string} [value]
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @typedef CategoryL2
|
|
28
|
+
* @property {string} [_id]
|
|
29
|
+
* @property {string} [display]
|
|
30
|
+
* @property {number} [level]
|
|
31
|
+
* @property {string} [parent]
|
|
32
|
+
* @property {string} [slug]
|
|
33
|
+
* @property {string} [value]
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @typedef ContactInfo
|
|
38
|
+
* @property {Support} [support]
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @typedef Details
|
|
43
|
+
* @property {Benefits[]} [benefits]
|
|
44
|
+
* @property {string} [demo_url]
|
|
45
|
+
* @property {string} [description]
|
|
46
|
+
* @property {string[]} [integration]
|
|
47
|
+
* @property {Screenshots} [screenshots]
|
|
48
|
+
* @property {Object[]} [video_url]
|
|
49
|
+
* @property {string[]} [youtube]
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @typedef ExtensionUsingSlug
|
|
54
|
+
* @property {string} [_id]
|
|
55
|
+
* @property {CategoryCommon} [category]
|
|
56
|
+
* @property {ContactInfo} [contact_info]
|
|
57
|
+
* @property {string} [created_at]
|
|
58
|
+
* @property {string} [current_status]
|
|
59
|
+
* @property {Details} [details]
|
|
60
|
+
* @property {string} [extension_id]
|
|
61
|
+
* @property {boolean} [is_coming_soon]
|
|
62
|
+
* @property {ListingInfo} [listing_info]
|
|
63
|
+
* @property {string} [modified_at]
|
|
64
|
+
* @property {Organization} [organization]
|
|
65
|
+
* @property {string} [organization_id]
|
|
66
|
+
* @property {string} [plan_type]
|
|
67
|
+
* @property {Plans[]} [plans]
|
|
68
|
+
* @property {string} [plans_url]
|
|
69
|
+
* @property {string} [review_instructions]
|
|
70
|
+
* @property {string[]} [scope]
|
|
71
|
+
* @property {string} [slug]
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @typedef ListingInfo
|
|
76
|
+
* @property {string} [icon]
|
|
77
|
+
* @property {string[]} [keywords]
|
|
78
|
+
* @property {string} [name]
|
|
79
|
+
* @property {string} [tagline]
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @typedef Organization
|
|
84
|
+
* @property {string} [name]
|
|
85
|
+
* @property {string} [slug]
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @typedef Plans
|
|
90
|
+
* @property {string} [additional_charges]
|
|
91
|
+
* @property {string} [features]
|
|
92
|
+
* @property {string} [name]
|
|
93
|
+
* @property {Price} [price]
|
|
94
|
+
* @property {Recurring} [recurring]
|
|
95
|
+
* @property {number} [trial_days]
|
|
96
|
+
* @property {string} [type]
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @typedef Price
|
|
101
|
+
* @property {number} [amount]
|
|
102
|
+
* @property {string} [currency]
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @typedef Recurring
|
|
107
|
+
* @property {number} [recurring_time]
|
|
108
|
+
* @property {string} [type]
|
|
109
|
+
* @property {number} [yearly_amount]
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @typedef Screenshots
|
|
114
|
+
* @property {string[]} [desktop]
|
|
115
|
+
* @property {string[]} [mobile]
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @typedef Support
|
|
120
|
+
* @property {string} [email]
|
|
121
|
+
* @property {string} [faq_url]
|
|
122
|
+
* @property {string} [phone]
|
|
123
|
+
* @property {string} [privacy_policy_url]
|
|
124
|
+
* @property {string} [website_url]
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
class PartnerPublicModel {
|
|
128
|
+
/** @returns {Benefits} */
|
|
129
|
+
static Benefits() {
|
|
130
|
+
return Joi.object({
|
|
131
|
+
description: Joi.string().allow(""),
|
|
132
|
+
title: Joi.string().allow(""),
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** @returns {CategoryCommon} */
|
|
137
|
+
static CategoryCommon() {
|
|
138
|
+
return Joi.object({
|
|
139
|
+
category_l1: Joi.array().items(PartnerPublicModel.CategoryL1()),
|
|
140
|
+
category_l2: Joi.array().items(PartnerPublicModel.CategoryL2()),
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** @returns {CategoryL1} */
|
|
145
|
+
static CategoryL1() {
|
|
146
|
+
return Joi.object({
|
|
147
|
+
_id: Joi.string().allow(""),
|
|
148
|
+
description: Joi.string().allow(""),
|
|
149
|
+
display: Joi.string().allow(""),
|
|
150
|
+
level: Joi.number(),
|
|
151
|
+
logo: Joi.string().allow(""),
|
|
152
|
+
slug: Joi.string().allow(""),
|
|
153
|
+
value: Joi.string().allow(""),
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** @returns {CategoryL2} */
|
|
158
|
+
static CategoryL2() {
|
|
159
|
+
return Joi.object({
|
|
160
|
+
_id: Joi.string().allow(""),
|
|
161
|
+
display: Joi.string().allow(""),
|
|
162
|
+
level: Joi.number(),
|
|
163
|
+
parent: Joi.string().allow(""),
|
|
164
|
+
slug: Joi.string().allow(""),
|
|
165
|
+
value: Joi.string().allow(""),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** @returns {ContactInfo} */
|
|
170
|
+
static ContactInfo() {
|
|
171
|
+
return Joi.object({
|
|
172
|
+
support: PartnerPublicModel.Support(),
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** @returns {Details} */
|
|
177
|
+
static Details() {
|
|
178
|
+
return Joi.object({
|
|
179
|
+
benefits: Joi.array().items(PartnerPublicModel.Benefits()),
|
|
180
|
+
demo_url: Joi.string().allow(""),
|
|
181
|
+
description: Joi.string().allow(""),
|
|
182
|
+
integration: Joi.array().items(Joi.string().allow("")),
|
|
183
|
+
screenshots: PartnerPublicModel.Screenshots(),
|
|
184
|
+
video_url: Joi.array().items(Joi.any()),
|
|
185
|
+
youtube: Joi.array().items(Joi.string().allow("")),
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** @returns {ExtensionUsingSlug} */
|
|
190
|
+
static ExtensionUsingSlug() {
|
|
191
|
+
return Joi.object({
|
|
192
|
+
_id: Joi.string().allow(""),
|
|
193
|
+
category: PartnerPublicModel.CategoryCommon(),
|
|
194
|
+
contact_info: PartnerPublicModel.ContactInfo(),
|
|
195
|
+
created_at: Joi.string().allow(""),
|
|
196
|
+
current_status: Joi.string().allow(""),
|
|
197
|
+
details: PartnerPublicModel.Details(),
|
|
198
|
+
extension_id: Joi.string().allow(""),
|
|
199
|
+
is_coming_soon: Joi.boolean(),
|
|
200
|
+
listing_info: PartnerPublicModel.ListingInfo(),
|
|
201
|
+
modified_at: Joi.string().allow(""),
|
|
202
|
+
organization: PartnerPublicModel.Organization(),
|
|
203
|
+
organization_id: Joi.string().allow(""),
|
|
204
|
+
plan_type: Joi.string().allow(""),
|
|
205
|
+
plans: Joi.array().items(PartnerPublicModel.Plans()),
|
|
206
|
+
plans_url: Joi.string().allow(""),
|
|
207
|
+
review_instructions: Joi.string().allow(""),
|
|
208
|
+
scope: Joi.array().items(Joi.string().allow("")),
|
|
209
|
+
slug: Joi.string().allow(""),
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** @returns {ListingInfo} */
|
|
214
|
+
static ListingInfo() {
|
|
215
|
+
return Joi.object({
|
|
216
|
+
icon: Joi.string().allow(""),
|
|
217
|
+
keywords: Joi.array().items(Joi.string().allow("")),
|
|
218
|
+
name: Joi.string().allow(""),
|
|
219
|
+
tagline: Joi.string().allow(""),
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/** @returns {Organization} */
|
|
224
|
+
static Organization() {
|
|
225
|
+
return Joi.object({
|
|
226
|
+
name: Joi.string().allow(""),
|
|
227
|
+
slug: Joi.string().allow(""),
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** @returns {Plans} */
|
|
232
|
+
static Plans() {
|
|
233
|
+
return Joi.object({
|
|
234
|
+
additional_charges: Joi.string().allow(""),
|
|
235
|
+
features: Joi.string().allow(""),
|
|
236
|
+
name: Joi.string().allow(""),
|
|
237
|
+
price: PartnerPublicModel.Price(),
|
|
238
|
+
recurring: PartnerPublicModel.Recurring(),
|
|
239
|
+
trial_days: Joi.number(),
|
|
240
|
+
type: Joi.string().allow(""),
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/** @returns {Price} */
|
|
245
|
+
static Price() {
|
|
246
|
+
return Joi.object({
|
|
247
|
+
amount: Joi.number(),
|
|
248
|
+
currency: Joi.string().allow(""),
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/** @returns {Recurring} */
|
|
253
|
+
static Recurring() {
|
|
254
|
+
return Joi.object({
|
|
255
|
+
recurring_time: Joi.number(),
|
|
256
|
+
type: Joi.string().allow(""),
|
|
257
|
+
yearly_amount: Joi.number(),
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/** @returns {Screenshots} */
|
|
262
|
+
static Screenshots() {
|
|
263
|
+
return Joi.object({
|
|
264
|
+
desktop: Joi.array().items(Joi.string().allow("")),
|
|
265
|
+
mobile: Joi.array().items(Joi.string().allow("")),
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/** @returns {Support} */
|
|
270
|
+
static Support() {
|
|
271
|
+
return Joi.object({
|
|
272
|
+
email: Joi.string().allow(""),
|
|
273
|
+
faq_url: Joi.string().allow(""),
|
|
274
|
+
phone: Joi.string().allow(""),
|
|
275
|
+
privacy_policy_url: Joi.string().allow(""),
|
|
276
|
+
website_url: Joi.string().allow(""),
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
module.exports = PartnerPublicModel;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export = PartnerPublicValidator;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef GetPanelExtensionDetailsParam
|
|
4
|
+
* @property {string} slug - Pass the slug of the extension
|
|
5
|
+
*/
|
|
6
|
+
declare class PartnerPublicValidator {
|
|
7
|
+
/** @returns {GetPanelExtensionDetailsParam} */
|
|
8
|
+
static getPanelExtensionDetails(): GetPanelExtensionDetailsParam;
|
|
9
|
+
}
|
|
10
|
+
declare namespace PartnerPublicValidator {
|
|
11
|
+
export { GetPanelExtensionDetailsParam };
|
|
12
|
+
}
|
|
13
|
+
type GetPanelExtensionDetailsParam = {
|
|
14
|
+
/**
|
|
15
|
+
* - Pass the slug of the extension
|
|
16
|
+
*/
|
|
17
|
+
slug: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
|
|
3
|
+
const PartnerPublicModel = require("./PartnerPublicModel");
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @typedef GetPanelExtensionDetailsParam
|
|
7
|
+
* @property {string} slug - Pass the slug of the extension
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
class PartnerPublicValidator {
|
|
11
|
+
/** @returns {GetPanelExtensionDetailsParam} */
|
|
12
|
+
static getPanelExtensionDetails() {
|
|
13
|
+
return Joi.object({
|
|
14
|
+
slug: Joi.string().allow("").required(),
|
|
15
|
+
}).required();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = PartnerPublicValidator;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export = PublicAPIClient;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef {Object} Options
|
|
4
|
+
* @property {boolean} responseHeaders - Whether response headers are returned or not.
|
|
5
|
+
*/
|
|
2
6
|
declare class PublicAPIClient {
|
|
3
7
|
/**
|
|
4
8
|
* @param {object} conf
|
|
@@ -7,5 +11,14 @@ declare class PublicAPIClient {
|
|
|
7
11
|
* @param {object} query
|
|
8
12
|
* @param {object} body
|
|
9
13
|
*/
|
|
10
|
-
static execute(conf: object, method: string, url: string, query: object, body: object, xHeaders: any): any;
|
|
14
|
+
static execute(conf: object, method: string, url: string, query: object, body: object, xHeaders: any, options: any): any;
|
|
11
15
|
}
|
|
16
|
+
declare namespace PublicAPIClient {
|
|
17
|
+
export { Options };
|
|
18
|
+
}
|
|
19
|
+
type Options = {
|
|
20
|
+
/**
|
|
21
|
+
* - Whether response headers are returned or not.
|
|
22
|
+
*/
|
|
23
|
+
responseHeaders: boolean;
|
|
24
|
+
};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
const { fdkAxios } = require("../common/AxiosHelper");
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {Object} Options
|
|
5
|
+
* @property {boolean} responseHeaders - Whether response headers are returned or not.
|
|
6
|
+
*/
|
|
7
|
+
|
|
3
8
|
class PublicAPIClient {
|
|
4
9
|
/**
|
|
5
10
|
* @param {object} conf
|
|
@@ -9,7 +14,7 @@ class PublicAPIClient {
|
|
|
9
14
|
* @param {object} body
|
|
10
15
|
*/
|
|
11
16
|
|
|
12
|
-
static execute(conf, method, url, query, body, xHeaders) {
|
|
17
|
+
static execute(conf, method, url, query, body, xHeaders, options) {
|
|
13
18
|
let headers = {};
|
|
14
19
|
headers["User-Agent"] = conf.userAgent ? conf.userAgent : "";
|
|
15
20
|
headers["Accept-Language"] = conf.language ? conf.language : "en-IN";
|
|
@@ -30,6 +35,7 @@ class PublicAPIClient {
|
|
|
30
35
|
...extraHeaders,
|
|
31
36
|
...xHeaders,
|
|
32
37
|
},
|
|
38
|
+
responseHeaders: options.responseHeaders,
|
|
33
39
|
};
|
|
34
40
|
return fdkAxios.request(rawRequest);
|
|
35
41
|
}
|
|
@@ -14,6 +14,7 @@ declare class PublicClient {
|
|
|
14
14
|
config: import("./PublicConfig");
|
|
15
15
|
configuration: Configuration;
|
|
16
16
|
inventory: Inventory;
|
|
17
|
+
partner: Partner;
|
|
17
18
|
webhook: Webhook;
|
|
18
19
|
/**
|
|
19
20
|
* Sets the extra headers for the public client.
|
|
@@ -25,4 +26,5 @@ declare class PublicClient {
|
|
|
25
26
|
}
|
|
26
27
|
import Configuration = require("./Configuration/ConfigurationPublicClient");
|
|
27
28
|
import Inventory = require("./Inventory/InventoryPublicClient");
|
|
29
|
+
import Partner = require("./Partner/PartnerPublicClient");
|
|
28
30
|
import Webhook = require("./Webhook/WebhookPublicClient");
|
|
@@ -2,6 +2,8 @@ const Configuration = require("./Configuration/ConfigurationPublicClient");
|
|
|
2
2
|
|
|
3
3
|
const Inventory = require("./Inventory/InventoryPublicClient");
|
|
4
4
|
|
|
5
|
+
const Partner = require("./Partner/PartnerPublicClient");
|
|
6
|
+
|
|
5
7
|
const Webhook = require("./Webhook/WebhookPublicClient");
|
|
6
8
|
|
|
7
9
|
const { FDKClientValidationError } = require("../common/FDKError");
|
|
@@ -24,6 +26,8 @@ class PublicClient {
|
|
|
24
26
|
|
|
25
27
|
this.inventory = new Inventory(config);
|
|
26
28
|
|
|
29
|
+
this.partner = new Partner(config);
|
|
30
|
+
|
|
27
31
|
this.webhook = new Webhook(config);
|
|
28
32
|
}
|
|
29
33
|
|
|
@@ -9,22 +9,25 @@ declare class Webhook {
|
|
|
9
9
|
_urls: {};
|
|
10
10
|
updateUrls(urls: any): void;
|
|
11
11
|
/**
|
|
12
|
+
* @param {WebhookPublicValidator.FetchAllWebhookEventsParam} arg - Arg object.
|
|
13
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
12
14
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
13
15
|
* @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
|
|
14
16
|
* @name fetchAllWebhookEvents
|
|
15
17
|
* @summary: Get All Webhook Events
|
|
16
18
|
* @description: Get All Webhook Events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/fetchAllWebhookEvents/).
|
|
17
19
|
*/
|
|
18
|
-
fetchAllWebhookEvents({
|
|
20
|
+
fetchAllWebhookEvents({ requestHeaders }?: any, { responseHeaders }?: object): Promise<WebhookPublicModel.EventConfigResponse>;
|
|
19
21
|
/**
|
|
20
22
|
* @param {WebhookPublicValidator.QueryWebhookEventDetailsParam} arg - Arg object.
|
|
23
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
21
24
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
22
25
|
* @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
|
|
23
26
|
* @name queryWebhookEventDetails
|
|
24
27
|
* @summary: Send webhook event name, type, version, category in request body to get complete details of event from server
|
|
25
28
|
* @description: Get Webhook Event Details for provided events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/queryWebhookEventDetails/).
|
|
26
29
|
*/
|
|
27
|
-
queryWebhookEventDetails({ body }?: WebhookPublicValidator.QueryWebhookEventDetailsParam, {
|
|
30
|
+
queryWebhookEventDetails({ body, requestHeaders }?: WebhookPublicValidator.QueryWebhookEventDetailsParam, { responseHeaders }?: object): Promise<WebhookPublicModel.EventConfigResponse>;
|
|
28
31
|
}
|
|
29
32
|
import WebhookPublicModel = require("./WebhookPublicModel");
|
|
30
33
|
import WebhookPublicValidator = require("./WebhookPublicValidator");
|
|
@@ -32,13 +32,18 @@ class Webhook {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
+
* @param {WebhookPublicValidator.FetchAllWebhookEventsParam} arg - Arg object.
|
|
36
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
35
37
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
36
38
|
* @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
|
|
37
39
|
* @name fetchAllWebhookEvents
|
|
38
40
|
* @summary: Get All Webhook Events
|
|
39
41
|
* @description: Get All Webhook Events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/fetchAllWebhookEvents/).
|
|
40
42
|
*/
|
|
41
|
-
async fetchAllWebhookEvents(
|
|
43
|
+
async fetchAllWebhookEvents(
|
|
44
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
45
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
46
|
+
) {
|
|
42
47
|
const { error } = WebhookPublicValidator.fetchAllWebhookEvents().validate(
|
|
43
48
|
{},
|
|
44
49
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -74,12 +79,12 @@ class Webhook {
|
|
|
74
79
|
}),
|
|
75
80
|
query_params,
|
|
76
81
|
undefined,
|
|
77
|
-
xHeaders,
|
|
78
|
-
{
|
|
82
|
+
{ ...xHeaders, ...requestHeaders },
|
|
83
|
+
{ responseHeaders }
|
|
79
84
|
);
|
|
80
85
|
|
|
81
86
|
let responseData = response;
|
|
82
|
-
if (
|
|
87
|
+
if (responseHeaders) {
|
|
83
88
|
responseData = response[0];
|
|
84
89
|
}
|
|
85
90
|
|
|
@@ -102,6 +107,7 @@ class Webhook {
|
|
|
102
107
|
|
|
103
108
|
/**
|
|
104
109
|
* @param {WebhookPublicValidator.QueryWebhookEventDetailsParam} arg - Arg object.
|
|
110
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
105
111
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
106
112
|
* @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
|
|
107
113
|
* @name queryWebhookEventDetails
|
|
@@ -109,8 +115,8 @@ class Webhook {
|
|
|
109
115
|
* @description: Get Webhook Event Details for provided events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/queryWebhookEventDetails/).
|
|
110
116
|
*/
|
|
111
117
|
async queryWebhookEventDetails(
|
|
112
|
-
{ body } = {},
|
|
113
|
-
{
|
|
118
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
119
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
114
120
|
) {
|
|
115
121
|
const {
|
|
116
122
|
error,
|
|
@@ -149,12 +155,12 @@ class Webhook {
|
|
|
149
155
|
}),
|
|
150
156
|
query_params,
|
|
151
157
|
body,
|
|
152
|
-
xHeaders,
|
|
153
|
-
{
|
|
158
|
+
{ ...xHeaders, ...requestHeaders },
|
|
159
|
+
{ responseHeaders }
|
|
154
160
|
);
|
|
155
161
|
|
|
156
162
|
let responseData = response;
|
|
157
|
-
if (
|
|
163
|
+
if (responseHeaders) {
|
|
158
164
|
responseData = response[0];
|
|
159
165
|
}
|
|
160
166
|
|