@gofynd/fdk-client-javascript 1.4.6 → 1.4.8-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 +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +16 -3
- package/sdk/application/Cart/CartApplicationClient.js +118 -13
- package/sdk/application/Cart/CartApplicationModel.d.ts +121 -45
- package/sdk/application/Cart/CartApplicationModel.js +98 -26
- package/sdk/application/Cart/CartApplicationValidator.d.ts +45 -1
- package/sdk/application/Cart/CartApplicationValidator.js +26 -0
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +10 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +10 -2
- package/sdk/application/Content/ContentApplicationClient.d.ts +1 -1
- package/sdk/application/Content/ContentApplicationClient.js +5 -3
- package/sdk/application/Content/ContentApplicationModel.d.ts +7 -18
- package/sdk/application/Content/ContentApplicationModel.js +6 -20
- package/sdk/application/Content/ContentApplicationValidator.d.ts +10 -0
- package/sdk/application/Content/ContentApplicationValidator.js +4 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +0 -27
- package/sdk/application/Lead/LeadApplicationClient.js +0 -167
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1 -146
- package/sdk/application/Lead/LeadApplicationModel.js +0 -126
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -25
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -24
- package/sdk/application/Logistic/LogisticApplicationClient.js +1 -1
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +2 -0
- package/sdk/application/Logistic/LogisticApplicationModel.js +2 -0
- package/sdk/application/Order/OrderApplicationModel.d.ts +72 -9
- package/sdk/application/Order/OrderApplicationModel.js +45 -7
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +27 -20
- package/sdk/application/Payment/PaymentApplicationModel.js +23 -20
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +2 -0
- package/sdk/application/Theme/ThemeApplicationModel.js +2 -0
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +22 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +115 -0
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +37 -0
- package/sdk/application/Webhook/WebhookApplicationModel.js +46 -0
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +16 -0
- package/sdk/application/Webhook/WebhookApplicationValidator.js +19 -0
- package/sdk/application/index.d.ts +1 -0
- package/sdk/application/index.js +2 -0
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -23
- package/sdk/partner/Lead/LeadPartnerClient.js +0 -157
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +12 -581
- package/sdk/partner/Lead/LeadPartnerModel.js +14 -403
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -2
- package/sdk/partner/Lead/LeadPartnerValidator.js +0 -12
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +4 -4
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +162 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +119 -1
- package/sdk/partner/Theme/ThemePartnerModel.js +142 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +2 -2
- package/sdk/partner/Webhook/WebhookPartnerClient.js +2 -2
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +23 -19
- package/sdk/partner/Webhook/WebhookPartnerModel.js +19 -22
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +43 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +257 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +39 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +45 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +60 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +57 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +304 -43
- package/sdk/platform/Billing/BillingPlatformClient.js +2218 -118
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1330 -282
- package/sdk/platform/Billing/BillingPlatformModel.js +1808 -590
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +324 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +340 -12
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +36 -3
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +276 -3
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +93 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +60 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +216 -40
- package/sdk/platform/Cart/CartPlatformModel.js +166 -24
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +11 -7
- package/sdk/platform/Catalog/CatalogPlatformClient.js +37 -14
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +122 -17
- package/sdk/platform/Catalog/CatalogPlatformModel.js +141 -15
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -7
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +19 -5
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +18 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +25 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +10 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +8 -4
- package/sdk/platform/Content/ContentPlatformModel.js +8 -4
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +49 -28
- package/sdk/platform/Finance/FinancePlatformClient.js +181 -28
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +350 -127
- package/sdk/platform/Finance/FinancePlatformModel.js +378 -108
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +56 -43
- package/sdk/platform/Finance/FinancePlatformValidator.js +61 -42
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +0 -47
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +0 -321
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -46
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +0 -48
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -25
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -167
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +82 -204
- package/sdk/platform/Lead/LeadPlatformModel.js +98 -178
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -25
- package/sdk/platform/Lead/LeadPlatformValidator.js +0 -24
- package/sdk/platform/Order/OrderPlatformClient.d.ts +11 -1
- package/sdk/platform/Order/OrderPlatformClient.js +82 -5
- package/sdk/platform/Order/OrderPlatformModel.d.ts +270 -29
- package/sdk/platform/Order/OrderPlatformModel.js +139 -28
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +58 -17
- package/sdk/platform/Order/OrderPlatformValidator.js +28 -16
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +14 -2
- package/sdk/platform/Payment/PaymentPlatformModel.js +7 -2
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -0
- package/sdk/platform/PlatformApplicationClient.js +4 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +4 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +12 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +82 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -1
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +14 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +67 -1
- package/sdk/platform/Theme/ThemePlatformModel.js +78 -0
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +24 -40
- package/sdk/platform/Webhook/WebhookPlatformClient.js +78 -221
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +168 -167
- package/sdk/platform/Webhook/WebhookPlatformModel.js +180 -178
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +23 -31
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +28 -42
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Billing/BillingPublicClient.d.ts +24 -2
- package/sdk/public/Billing/BillingPublicClient.js +156 -3
- package/sdk/public/Billing/BillingPublicModel.d.ts +368 -26
- package/sdk/public/Billing/BillingPublicModel.js +317 -18
- package/sdk/public/Billing/BillingPublicValidator.d.ts +19 -3
- package/sdk/public/Billing/BillingPublicValidator.js +22 -3
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +24 -22
- package/sdk/public/Webhook/WebhookPublicModel.js +24 -22
|
@@ -1,21 +1,114 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {string} [message] -
|
|
6
|
-
* @property {string} [code] - Error code
|
|
4
|
+
* @typedef ResourceNotFound
|
|
5
|
+
* @property {string} [message] - Resource not found with {id}
|
|
7
6
|
*/
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* @typedef PlanRecurring
|
|
11
10
|
* @property {string} [interval]
|
|
12
11
|
* @property {number} [interval_count]
|
|
12
|
+
* @property {string} [aggregate_usage]
|
|
13
|
+
* @property {string} [usage_type]
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
|
-
* @typedef
|
|
17
|
+
* @typedef DetailList
|
|
18
|
+
* @property {PlanDetails[]} [plans]
|
|
19
|
+
* @property {string[]} [component_groups]
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @typedef PlanTaxation
|
|
24
|
+
* @property {number} [gst]
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @typedef OneTimeFees
|
|
29
|
+
* @property {number} [developement]
|
|
30
|
+
* @property {number} [marketing]
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @typedef CreditLine
|
|
35
|
+
* @property {boolean} [is_active]
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @typedef PlanMeta
|
|
40
|
+
* @property {string} [plan_platform_display_name]
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @typedef FeatureConfig
|
|
45
|
+
* @property {boolean} [enabled]
|
|
46
|
+
* @property {number} [limit]
|
|
47
|
+
* @property {number} [hard_limit]
|
|
48
|
+
* @property {number} [soft_limit]
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @typedef PlanConfig
|
|
53
|
+
* @property {boolean} [is_active]
|
|
54
|
+
* @property {string} [display_text]
|
|
55
|
+
* @property {boolean} [is_default]
|
|
56
|
+
* @property {string} [processing_type]
|
|
57
|
+
* @property {string[]} [tags]
|
|
58
|
+
* @property {FeatureConfig} [feature_config]
|
|
59
|
+
* @property {string} [_id]
|
|
60
|
+
* @property {string} [component_id]
|
|
61
|
+
* @property {string} [created_at]
|
|
62
|
+
* @property {string} [modified_at]
|
|
63
|
+
* @property {number} [__v]
|
|
64
|
+
* @property {string} [billing_scheme]
|
|
65
|
+
* @property {string} [bill_type]
|
|
66
|
+
* @property {string} [price_ui_type]
|
|
67
|
+
* @property {PlanRecurring} [recurring]
|
|
68
|
+
* @property {TransformQuantity} [transform_quantity]
|
|
69
|
+
* @property {FreeTier} [free_tier]
|
|
70
|
+
* @property {string} [currency]
|
|
71
|
+
* @property {number} [unit_amount]
|
|
72
|
+
* @property {number} [quantity]
|
|
73
|
+
* @property {string} [price_type]
|
|
74
|
+
* @property {Object[]} [tiers]
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @typedef FreeTier
|
|
79
|
+
* @property {string} [type]
|
|
80
|
+
* @property {number} [value]
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @typedef TransformQuantity
|
|
85
|
+
* @property {number} [divide_by]
|
|
86
|
+
* @property {string} [round]
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @typedef ComponentsSchema
|
|
91
|
+
* @property {string} [name]
|
|
92
|
+
* @property {string} [slug]
|
|
93
|
+
* @property {string} [description]
|
|
94
|
+
* @property {string} [group]
|
|
95
|
+
* @property {string} [icon]
|
|
96
|
+
* @property {Object} [links]
|
|
97
|
+
* @property {PlanConfig} [config]
|
|
98
|
+
* @property {boolean} [is_active]
|
|
99
|
+
* @property {string} [display_text]
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @typedef PlanDetails
|
|
104
|
+
* @property {string} [approved_by]
|
|
105
|
+
* @property {string} [updated_by]
|
|
17
106
|
* @property {PlanRecurring} [recurring]
|
|
18
107
|
* @property {boolean} [is_trial_plan]
|
|
108
|
+
* @property {string[]} [company_ids]
|
|
109
|
+
* @property {string} [created_by]
|
|
110
|
+
* @property {string} [channel_type]
|
|
111
|
+
* @property {string} [platform]
|
|
19
112
|
* @property {string} [plan_group]
|
|
20
113
|
* @property {string[]} [tag_lines]
|
|
21
114
|
* @property {string} [currency]
|
|
@@ -33,21 +126,65 @@ const Joi = require("joi");
|
|
|
33
126
|
* @property {string} [product_suite_id]
|
|
34
127
|
* @property {string} [created_at]
|
|
35
128
|
* @property {string} [modified_at]
|
|
129
|
+
* @property {PlanTaxation} [taxation]
|
|
130
|
+
* @property {OneTimeFees} [one_time_fees]
|
|
131
|
+
* @property {CreditLine} [credit_line]
|
|
132
|
+
* @property {string} [current_status]
|
|
133
|
+
* @property {PlanMeta} [meta]
|
|
134
|
+
* @property {ComponentsSchema[]} [components]
|
|
36
135
|
*/
|
|
37
136
|
|
|
38
137
|
/**
|
|
39
|
-
* @typedef
|
|
40
|
-
* @property {
|
|
41
|
-
* @property {
|
|
42
|
-
|
|
138
|
+
* @typedef Recurring
|
|
139
|
+
* @property {string} [interval] - Interval for recurring payments
|
|
140
|
+
* @property {number} [interval_count] - Number of intervals
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @typedef Taxation
|
|
145
|
+
* @property {number} [gst] - GST percentage
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @typedef PlanList
|
|
150
|
+
* @property {string} [approved_by]
|
|
151
|
+
* @property {string} [updated_by]
|
|
152
|
+
* @property {Recurring} [recurring]
|
|
153
|
+
* @property {Taxation} [taxation]
|
|
154
|
+
* @property {OneTimeFees} [one_time_fees]
|
|
155
|
+
* @property {CreditLine} [credit_line]
|
|
156
|
+
* @property {string} [_id] - Unique identifier of the plan
|
|
157
|
+
* @property {string} [product_suite_id] - Identifier of the product suite
|
|
158
|
+
* associated with the plan
|
|
159
|
+
* @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan
|
|
160
|
+
* @property {string} [name] - Name of the plan
|
|
161
|
+
* @property {string} [description] - Description of the plan
|
|
162
|
+
* @property {string} [plan_group] - Group to which the plan belongs
|
|
163
|
+
* @property {string[]} [tag_lines] - Tag lines associated with the plan
|
|
164
|
+
* @property {string} [currency] - Currency of the plan
|
|
165
|
+
* @property {number} [amount] - Amount of the plan
|
|
166
|
+
* @property {boolean} [is_active] - Indicates whether the plan is active
|
|
167
|
+
* @property {boolean} [is_visible] - Indicates whether the plan is visible
|
|
168
|
+
* @property {number} [trial_period] - Trial period of the plan
|
|
169
|
+
* @property {Object[]} [addons] - Addons associated with the plan
|
|
170
|
+
* @property {string[]} [tags] - Tags associated with the plan
|
|
171
|
+
* @property {string} [type] - Type of the plan
|
|
172
|
+
* @property {Object} [meta] - Additional metadata associated with the plan
|
|
173
|
+
* @property {string} [country] - Country associated with the plan
|
|
174
|
+
* @property {string[]} [company_ids] - Company IDs associated with the plan
|
|
175
|
+
* @property {string} [created_by] - ID of the user who created the plan
|
|
176
|
+
* @property {string} [current_status] - Current status of the plan
|
|
177
|
+
* @property {string} [channel_type] - Type of channel associated with the plan
|
|
178
|
+
* @property {string} [platform] - Platform associated with the plan
|
|
179
|
+
* @property {string} [created_at] - Date and time when the plan was created
|
|
180
|
+
* @property {string} [modified_at] - Date and time when the plan was last modified
|
|
43
181
|
*/
|
|
44
182
|
|
|
45
183
|
class BillingPublicModel {
|
|
46
|
-
/** @returns {
|
|
47
|
-
static
|
|
184
|
+
/** @returns {ResourceNotFound} */
|
|
185
|
+
static ResourceNotFound() {
|
|
48
186
|
return Joi.object({
|
|
49
187
|
message: Joi.string().allow(""),
|
|
50
|
-
code: Joi.string().allow(""),
|
|
51
188
|
});
|
|
52
189
|
}
|
|
53
190
|
|
|
@@ -56,14 +193,128 @@ class BillingPublicModel {
|
|
|
56
193
|
return Joi.object({
|
|
57
194
|
interval: Joi.string().allow(""),
|
|
58
195
|
interval_count: Joi.number(),
|
|
196
|
+
aggregate_usage: Joi.string().allow(""),
|
|
197
|
+
usage_type: Joi.string().allow(""),
|
|
59
198
|
});
|
|
60
199
|
}
|
|
61
200
|
|
|
62
|
-
/** @returns {
|
|
63
|
-
static
|
|
201
|
+
/** @returns {DetailList} */
|
|
202
|
+
static DetailList() {
|
|
64
203
|
return Joi.object({
|
|
204
|
+
plans: Joi.array().items(BillingPublicModel.PlanDetails()),
|
|
205
|
+
component_groups: Joi.array().items(Joi.string().allow("")),
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** @returns {PlanTaxation} */
|
|
210
|
+
static PlanTaxation() {
|
|
211
|
+
return Joi.object({
|
|
212
|
+
gst: Joi.number(),
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** @returns {OneTimeFees} */
|
|
217
|
+
static OneTimeFees() {
|
|
218
|
+
return Joi.object({
|
|
219
|
+
developement: Joi.number().allow(null),
|
|
220
|
+
marketing: Joi.number().allow(null),
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** @returns {CreditLine} */
|
|
225
|
+
static CreditLine() {
|
|
226
|
+
return Joi.object({
|
|
227
|
+
is_active: Joi.boolean(),
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** @returns {PlanMeta} */
|
|
232
|
+
static PlanMeta() {
|
|
233
|
+
return Joi.object({
|
|
234
|
+
plan_platform_display_name: Joi.string().allow("").allow(null),
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/** @returns {FeatureConfig} */
|
|
239
|
+
static FeatureConfig() {
|
|
240
|
+
return Joi.object({
|
|
241
|
+
enabled: Joi.boolean(),
|
|
242
|
+
limit: Joi.number(),
|
|
243
|
+
hard_limit: Joi.number(),
|
|
244
|
+
soft_limit: Joi.number(),
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** @returns {PlanConfig} */
|
|
249
|
+
static PlanConfig() {
|
|
250
|
+
return Joi.object({
|
|
251
|
+
is_active: Joi.boolean(),
|
|
252
|
+
display_text: Joi.string().allow("").allow(null),
|
|
253
|
+
is_default: Joi.boolean(),
|
|
254
|
+
processing_type: Joi.string().allow(""),
|
|
255
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
256
|
+
feature_config: BillingPublicModel.FeatureConfig(),
|
|
257
|
+
_id: Joi.string().allow(""),
|
|
258
|
+
component_id: Joi.string().allow(""),
|
|
259
|
+
created_at: Joi.string().allow(""),
|
|
260
|
+
modified_at: Joi.string().allow(""),
|
|
261
|
+
__v: Joi.number(),
|
|
262
|
+
billing_scheme: Joi.string().allow(""),
|
|
263
|
+
bill_type: Joi.string().allow(""),
|
|
264
|
+
price_ui_type: Joi.string().allow(""),
|
|
265
|
+
recurring: BillingPublicModel.PlanRecurring(),
|
|
266
|
+
transform_quantity: BillingPublicModel.TransformQuantity(),
|
|
267
|
+
free_tier: BillingPublicModel.FreeTier(),
|
|
268
|
+
currency: Joi.string().allow(""),
|
|
269
|
+
unit_amount: Joi.number(),
|
|
270
|
+
quantity: Joi.number(),
|
|
271
|
+
price_type: Joi.string().allow(""),
|
|
272
|
+
tiers: Joi.array().items(Joi.any()),
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/** @returns {FreeTier} */
|
|
277
|
+
static FreeTier() {
|
|
278
|
+
return Joi.object({
|
|
279
|
+
type: Joi.string().allow(""),
|
|
280
|
+
value: Joi.number(),
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/** @returns {TransformQuantity} */
|
|
285
|
+
static TransformQuantity() {
|
|
286
|
+
return Joi.object({
|
|
287
|
+
divide_by: Joi.number(),
|
|
288
|
+
round: Joi.string().allow(""),
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** @returns {ComponentsSchema} */
|
|
293
|
+
static ComponentsSchema() {
|
|
294
|
+
return Joi.object({
|
|
295
|
+
name: Joi.string().allow(""),
|
|
296
|
+
slug: Joi.string().allow(""),
|
|
297
|
+
description: Joi.string().allow(""),
|
|
298
|
+
group: Joi.string().allow(""),
|
|
299
|
+
icon: Joi.string().allow(""),
|
|
300
|
+
links: Joi.any(),
|
|
301
|
+
config: BillingPublicModel.PlanConfig(),
|
|
302
|
+
is_active: Joi.boolean(),
|
|
303
|
+
display_text: Joi.string().allow("").allow(null),
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/** @returns {PlanDetails} */
|
|
308
|
+
static PlanDetails() {
|
|
309
|
+
return Joi.object({
|
|
310
|
+
approved_by: Joi.string().allow(""),
|
|
311
|
+
updated_by: Joi.string().allow(""),
|
|
65
312
|
recurring: BillingPublicModel.PlanRecurring(),
|
|
66
313
|
is_trial_plan: Joi.boolean(),
|
|
314
|
+
company_ids: Joi.array().items(Joi.string().allow("")),
|
|
315
|
+
created_by: Joi.string().allow(""),
|
|
316
|
+
channel_type: Joi.string().allow(""),
|
|
317
|
+
platform: Joi.string().allow("").allow(null),
|
|
67
318
|
plan_group: Joi.string().allow(""),
|
|
68
319
|
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
69
320
|
currency: Joi.string().allow(""),
|
|
@@ -81,15 +332,63 @@ class BillingPublicModel {
|
|
|
81
332
|
product_suite_id: Joi.string().allow(""),
|
|
82
333
|
created_at: Joi.string().allow(""),
|
|
83
334
|
modified_at: Joi.string().allow(""),
|
|
335
|
+
taxation: BillingPublicModel.PlanTaxation(),
|
|
336
|
+
one_time_fees: BillingPublicModel.OneTimeFees(),
|
|
337
|
+
credit_line: BillingPublicModel.CreditLine(),
|
|
338
|
+
current_status: Joi.string().allow(""),
|
|
339
|
+
meta: BillingPublicModel.PlanMeta(),
|
|
340
|
+
components: Joi.array().items(BillingPublicModel.ComponentsSchema()),
|
|
84
341
|
});
|
|
85
342
|
}
|
|
86
343
|
|
|
87
|
-
/** @returns {
|
|
88
|
-
static
|
|
344
|
+
/** @returns {Recurring} */
|
|
345
|
+
static Recurring() {
|
|
89
346
|
return Joi.object({
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
347
|
+
interval: Joi.string().allow(""),
|
|
348
|
+
interval_count: Joi.number(),
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** @returns {Taxation} */
|
|
353
|
+
static Taxation() {
|
|
354
|
+
return Joi.object({
|
|
355
|
+
gst: Joi.number(),
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/** @returns {PlanList} */
|
|
360
|
+
static PlanList() {
|
|
361
|
+
return Joi.object({
|
|
362
|
+
approved_by: Joi.string().allow(""),
|
|
363
|
+
updated_by: Joi.string().allow(""),
|
|
364
|
+
recurring: BillingPublicModel.Recurring(),
|
|
365
|
+
taxation: BillingPublicModel.Taxation(),
|
|
366
|
+
one_time_fees: BillingPublicModel.OneTimeFees(),
|
|
367
|
+
credit_line: BillingPublicModel.CreditLine(),
|
|
368
|
+
_id: Joi.string().allow(""),
|
|
369
|
+
product_suite_id: Joi.string().allow(""),
|
|
370
|
+
is_trial_plan: Joi.boolean(),
|
|
371
|
+
name: Joi.string().allow(""),
|
|
372
|
+
description: Joi.string().allow(""),
|
|
373
|
+
plan_group: Joi.string().allow(""),
|
|
374
|
+
tag_lines: Joi.array().items(Joi.string().allow("")),
|
|
375
|
+
currency: Joi.string().allow(""),
|
|
376
|
+
amount: Joi.number(),
|
|
377
|
+
is_active: Joi.boolean(),
|
|
378
|
+
is_visible: Joi.boolean(),
|
|
379
|
+
trial_period: Joi.number(),
|
|
380
|
+
addons: Joi.array().items(Joi.any()),
|
|
381
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
382
|
+
type: Joi.string().allow(""),
|
|
383
|
+
meta: Joi.any(),
|
|
384
|
+
country: Joi.string().allow(""),
|
|
385
|
+
company_ids: Joi.array().items(Joi.string().allow("")),
|
|
386
|
+
created_by: Joi.string().allow(""),
|
|
387
|
+
current_status: Joi.string().allow(""),
|
|
388
|
+
channel_type: Joi.string().allow(""),
|
|
389
|
+
platform: Joi.string().allow("").allow(null),
|
|
390
|
+
created_at: Joi.string().allow(""),
|
|
391
|
+
modified_at: Joi.string().allow(""),
|
|
93
392
|
});
|
|
94
393
|
}
|
|
95
394
|
}
|
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
export = BillingPublicValidator;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef GetPlanDetailsParam
|
|
4
|
+
* @property {string} planId - Plan unique id.
|
|
5
|
+
*/
|
|
2
6
|
/**
|
|
3
7
|
* @typedef GetStandardPlansParam
|
|
4
|
-
* @property {string} platform - The type of platform for which plans are requested.
|
|
8
|
+
* @property {string} [platform] - The type of platform for which plans are requested.
|
|
5
9
|
*/
|
|
10
|
+
/** @typedef PlanListParam */
|
|
6
11
|
declare class BillingPublicValidator {
|
|
12
|
+
/** @returns {GetPlanDetailsParam} */
|
|
13
|
+
static getPlanDetails(): GetPlanDetailsParam;
|
|
7
14
|
/** @returns {GetStandardPlansParam} */
|
|
8
15
|
static getStandardPlans(): GetStandardPlansParam;
|
|
16
|
+
/** @returns {PlanListParam} */
|
|
17
|
+
static planList(): any;
|
|
9
18
|
}
|
|
10
19
|
declare namespace BillingPublicValidator {
|
|
11
|
-
export { GetStandardPlansParam };
|
|
20
|
+
export { GetPlanDetailsParam, GetStandardPlansParam, PlanListParam };
|
|
12
21
|
}
|
|
22
|
+
type GetPlanDetailsParam = {
|
|
23
|
+
/**
|
|
24
|
+
* - Plan unique id.
|
|
25
|
+
*/
|
|
26
|
+
planId: string;
|
|
27
|
+
};
|
|
13
28
|
type GetStandardPlansParam = {
|
|
14
29
|
/**
|
|
15
30
|
* - The type of platform for which plans are requested.
|
|
16
31
|
*/
|
|
17
|
-
platform
|
|
32
|
+
platform?: string;
|
|
18
33
|
};
|
|
34
|
+
type PlanListParam = any;
|
|
@@ -2,17 +2,36 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
const BillingPublicModel = require("./BillingPublicModel");
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @typedef GetPlanDetailsParam
|
|
7
|
+
* @property {string} planId - Plan unique id.
|
|
8
|
+
*/
|
|
9
|
+
|
|
5
10
|
/**
|
|
6
11
|
* @typedef GetStandardPlansParam
|
|
7
|
-
* @property {string} platform - The type of platform for which plans are requested.
|
|
12
|
+
* @property {string} [platform] - The type of platform for which plans are requested.
|
|
8
13
|
*/
|
|
9
14
|
|
|
15
|
+
/** @typedef PlanListParam */
|
|
16
|
+
|
|
10
17
|
class BillingPublicValidator {
|
|
18
|
+
/** @returns {GetPlanDetailsParam} */
|
|
19
|
+
static getPlanDetails() {
|
|
20
|
+
return Joi.object({
|
|
21
|
+
planId: Joi.string().allow("").required(),
|
|
22
|
+
}).required();
|
|
23
|
+
}
|
|
24
|
+
|
|
11
25
|
/** @returns {GetStandardPlansParam} */
|
|
12
26
|
static getStandardPlans() {
|
|
13
27
|
return Joi.object({
|
|
14
|
-
platform: Joi.string().allow("")
|
|
15
|
-
})
|
|
28
|
+
platform: Joi.string().allow(""),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** @returns {PlanListParam} */
|
|
33
|
+
static planList() {
|
|
34
|
+
return Joi.object({});
|
|
16
35
|
}
|
|
17
36
|
}
|
|
18
37
|
|
|
@@ -17,7 +17,7 @@ declare class Webhook {
|
|
|
17
17
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
18
18
|
* @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
|
|
19
19
|
* @name fetchAllWebhookEvents
|
|
20
|
-
* @summary: Fetch all webhook events
|
|
20
|
+
* @summary: Fetch all webhook events.
|
|
21
21
|
* @description: Retrieve a list of all webhook events in the public server setup. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/fetchAllWebhookEvents/).
|
|
22
22
|
*/
|
|
23
23
|
fetchAllWebhookEvents({ requestHeaders }?: any, { responseHeaders }?: object): Promise<WebhookPublicModel.EventConfigResponse>;
|
|
@@ -37,7 +37,7 @@ declare class Webhook {
|
|
|
37
37
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
38
38
|
* @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
|
|
39
39
|
* @name queryWebhookEventDetails
|
|
40
|
-
* @summary: Query webhook event details
|
|
40
|
+
* @summary: Query webhook event details.
|
|
41
41
|
* @description: Query and obtain detailed information about webhook events in the public server configurations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/queryWebhookEventDetails/).
|
|
42
42
|
*/
|
|
43
43
|
queryWebhookEventDetails({ body, requestHeaders }?: WebhookPublicValidator.QueryWebhookEventDetailsParam, { responseHeaders }?: object): Promise<WebhookPublicModel.EventConfigResponse>;
|
|
@@ -46,7 +46,7 @@ class Webhook {
|
|
|
46
46
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
47
47
|
* @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
|
|
48
48
|
* @name fetchAllWebhookEvents
|
|
49
|
-
* @summary: Fetch all webhook events
|
|
49
|
+
* @summary: Fetch all webhook events.
|
|
50
50
|
* @description: Retrieve a list of all webhook events in the public server setup. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/fetchAllWebhookEvents/).
|
|
51
51
|
*/
|
|
52
52
|
async fetchAllWebhookEvents(
|
|
@@ -202,7 +202,7 @@ class Webhook {
|
|
|
202
202
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
203
203
|
* @returns {Promise<WebhookPublicModel.EventConfigResponse>} - Success response
|
|
204
204
|
* @name queryWebhookEventDetails
|
|
205
|
-
* @summary: Query webhook event details
|
|
205
|
+
* @summary: Query webhook event details.
|
|
206
206
|
* @description: Query and obtain detailed information about webhook events in the public server configurations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/queryWebhookEventDetails/).
|
|
207
207
|
*/
|
|
208
208
|
async queryWebhookEventDetails(
|
|
@@ -11,6 +11,7 @@ export = WebhookPublicModel;
|
|
|
11
11
|
* @property {string} [description]
|
|
12
12
|
* @property {string} [created_on]
|
|
13
13
|
* @property {string} [updated_on]
|
|
14
|
+
* @property {string} [group]
|
|
14
15
|
*/
|
|
15
16
|
/**
|
|
16
17
|
* @typedef EventConfigResponse
|
|
@@ -58,20 +59,20 @@ export = WebhookPublicModel;
|
|
|
58
59
|
*/
|
|
59
60
|
/**
|
|
60
61
|
* @typedef TransformEventRequest
|
|
61
|
-
* @property {string}
|
|
62
|
-
* @property {string}
|
|
63
|
-
* @property {string}
|
|
64
|
-
* @property {string}
|
|
65
|
-
* @property {EventSchema}
|
|
62
|
+
* @property {string} event_name
|
|
63
|
+
* @property {string} event_type
|
|
64
|
+
* @property {string} event_category
|
|
65
|
+
* @property {string} event_version
|
|
66
|
+
* @property {EventSchema} event
|
|
66
67
|
*/
|
|
67
68
|
/**
|
|
68
69
|
* @typedef ValidateSchemaRequest
|
|
69
|
-
* @property {string}
|
|
70
|
-
* @property {string}
|
|
71
|
-
* @property {string}
|
|
72
|
-
* @property {string}
|
|
73
|
-
* @property {EventSchema}
|
|
74
|
-
* @property {Object}
|
|
70
|
+
* @property {string} event_name
|
|
71
|
+
* @property {string} event_type
|
|
72
|
+
* @property {string} event_category
|
|
73
|
+
* @property {string} event_version
|
|
74
|
+
* @property {EventSchema} event
|
|
75
|
+
* @property {Object} event_schema
|
|
75
76
|
*/
|
|
76
77
|
/**
|
|
77
78
|
* @typedef ValidateSchemaResponse
|
|
@@ -107,6 +108,7 @@ type EventConfig = {
|
|
|
107
108
|
description?: string;
|
|
108
109
|
created_on?: string;
|
|
109
110
|
updated_on?: string;
|
|
111
|
+
group?: string;
|
|
110
112
|
};
|
|
111
113
|
/** @returns {EventConfigResponse} */
|
|
112
114
|
declare function EventConfigResponse(): EventConfigResponse;
|
|
@@ -163,21 +165,21 @@ type TransformEventAssociation = {
|
|
|
163
165
|
/** @returns {TransformEventRequest} */
|
|
164
166
|
declare function TransformEventRequest(): TransformEventRequest;
|
|
165
167
|
type TransformEventRequest = {
|
|
166
|
-
event_name
|
|
167
|
-
event_type
|
|
168
|
-
event_category
|
|
169
|
-
event_version
|
|
170
|
-
event
|
|
168
|
+
event_name: string;
|
|
169
|
+
event_type: string;
|
|
170
|
+
event_category: string;
|
|
171
|
+
event_version: string;
|
|
172
|
+
event: EventSchema;
|
|
171
173
|
};
|
|
172
174
|
/** @returns {ValidateSchemaRequest} */
|
|
173
175
|
declare function ValidateSchemaRequest(): ValidateSchemaRequest;
|
|
174
176
|
type ValidateSchemaRequest = {
|
|
175
|
-
event_name
|
|
176
|
-
event_type
|
|
177
|
-
event_category
|
|
178
|
-
event_version
|
|
179
|
-
event
|
|
180
|
-
event_schema
|
|
177
|
+
event_name: string;
|
|
178
|
+
event_type: string;
|
|
179
|
+
event_category: string;
|
|
180
|
+
event_version: string;
|
|
181
|
+
event: EventSchema;
|
|
182
|
+
event_schema: any;
|
|
181
183
|
};
|
|
182
184
|
/** @returns {ValidateSchemaResponse} */
|
|
183
185
|
declare function ValidateSchemaResponse(): ValidateSchemaResponse;
|
|
@@ -12,6 +12,7 @@ const Joi = require("joi");
|
|
|
12
12
|
* @property {string} [description]
|
|
13
13
|
* @property {string} [created_on]
|
|
14
14
|
* @property {string} [updated_on]
|
|
15
|
+
* @property {string} [group]
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -68,21 +69,21 @@ const Joi = require("joi");
|
|
|
68
69
|
|
|
69
70
|
/**
|
|
70
71
|
* @typedef TransformEventRequest
|
|
71
|
-
* @property {string}
|
|
72
|
-
* @property {string}
|
|
73
|
-
* @property {string}
|
|
74
|
-
* @property {string}
|
|
75
|
-
* @property {EventSchema}
|
|
72
|
+
* @property {string} event_name
|
|
73
|
+
* @property {string} event_type
|
|
74
|
+
* @property {string} event_category
|
|
75
|
+
* @property {string} event_version
|
|
76
|
+
* @property {EventSchema} event
|
|
76
77
|
*/
|
|
77
78
|
|
|
78
79
|
/**
|
|
79
80
|
* @typedef ValidateSchemaRequest
|
|
80
|
-
* @property {string}
|
|
81
|
-
* @property {string}
|
|
82
|
-
* @property {string}
|
|
83
|
-
* @property {string}
|
|
84
|
-
* @property {EventSchema}
|
|
85
|
-
* @property {Object}
|
|
81
|
+
* @property {string} event_name
|
|
82
|
+
* @property {string} event_type
|
|
83
|
+
* @property {string} event_category
|
|
84
|
+
* @property {string} event_version
|
|
85
|
+
* @property {EventSchema} event
|
|
86
|
+
* @property {Object} event_schema
|
|
86
87
|
*/
|
|
87
88
|
|
|
88
89
|
/**
|
|
@@ -117,6 +118,7 @@ class WebhookPublicModel {
|
|
|
117
118
|
description: Joi.string().allow("").allow(null),
|
|
118
119
|
created_on: Joi.string().allow(""),
|
|
119
120
|
updated_on: Joi.string().allow(""),
|
|
121
|
+
group: Joi.string().allow("").allow(null),
|
|
120
122
|
});
|
|
121
123
|
}
|
|
122
124
|
|
|
@@ -191,23 +193,23 @@ class WebhookPublicModel {
|
|
|
191
193
|
/** @returns {TransformEventRequest} */
|
|
192
194
|
static TransformEventRequest() {
|
|
193
195
|
return Joi.object({
|
|
194
|
-
event_name: Joi.string().allow(""),
|
|
195
|
-
event_type: Joi.string().allow(""),
|
|
196
|
-
event_category: Joi.string().allow(""),
|
|
197
|
-
event_version: Joi.string().allow(""),
|
|
198
|
-
event: WebhookPublicModel.EventSchema(),
|
|
196
|
+
event_name: Joi.string().allow("").required(),
|
|
197
|
+
event_type: Joi.string().allow("").required(),
|
|
198
|
+
event_category: Joi.string().allow("").required(),
|
|
199
|
+
event_version: Joi.string().allow("").required(),
|
|
200
|
+
event: WebhookPublicModel.EventSchema().required(),
|
|
199
201
|
});
|
|
200
202
|
}
|
|
201
203
|
|
|
202
204
|
/** @returns {ValidateSchemaRequest} */
|
|
203
205
|
static ValidateSchemaRequest() {
|
|
204
206
|
return Joi.object({
|
|
205
|
-
event_name: Joi.string().allow(""),
|
|
206
|
-
event_type: Joi.string().allow(""),
|
|
207
|
-
event_category: Joi.string().allow(""),
|
|
208
|
-
event_version: Joi.string().allow(""),
|
|
209
|
-
event: WebhookPublicModel.EventSchema(),
|
|
210
|
-
event_schema: Joi.object().pattern(/\S/, Joi.any()),
|
|
207
|
+
event_name: Joi.string().allow("").required(),
|
|
208
|
+
event_type: Joi.string().allow("").required(),
|
|
209
|
+
event_category: Joi.string().allow("").required(),
|
|
210
|
+
event_version: Joi.string().allow("").required(),
|
|
211
|
+
event: WebhookPublicModel.EventSchema().required(),
|
|
212
|
+
event_schema: Joi.object().pattern(/\S/, Joi.any()).required(),
|
|
211
213
|
});
|
|
212
214
|
}
|
|
213
215
|
|