@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.1.0-beta.1
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 +14 -14
- package/sdk/application/Cart/CartApplicationClient.js +14 -14
- package/sdk/application/Content/ContentApplicationClient.d.ts +10 -0
- package/sdk/application/Content/ContentApplicationClient.js +53 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +136 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -12
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +46 -33
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +41 -25
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +6 -397
- package/sdk/platform/Billing/BillingPlatformClient.js +77 -3215
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +417 -3811
- package/sdk/platform/Billing/BillingPlatformModel.js +292 -2544
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +12 -451
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -483
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +34 -34
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +34 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +363 -29
- package/sdk/platform/Cart/CartPlatformModel.js +203 -31
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +57 -57
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +220 -200
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +121 -91
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +58 -46
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +10 -51
- package/sdk/platform/Catalog/CatalogPlatformClient.js +79 -400
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +22 -228
- package/sdk/platform/Catalog/CatalogPlatformModel.js +12 -163
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +15 -61
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -65
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +4 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +10 -14
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +94 -30
- package/sdk/platform/Communication/CommunicationPlatformModel.js +110 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +33 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +62 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +11 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +5 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +12 -2
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +12 -10
- package/sdk/platform/Content/ContentPlatformModel.d.ts +42 -12
- package/sdk/platform/Content/ContentPlatformModel.js +43 -13
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +28 -28
- package/sdk/platform/Finance/FinancePlatformClient.js +28 -28
- package/sdk/platform/Order/OrderPlatformClient.d.ts +21 -21
- package/sdk/platform/Order/OrderPlatformClient.js +21 -21
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1010 -80
- package/sdk/platform/Order/OrderPlatformModel.js +665 -70
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +31 -4
- package/sdk/platform/Payment/PaymentPlatformModel.js +11 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +8 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +14 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +24 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +194 -23
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +116 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +23 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +16 -0
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
- package/sdk/platform/Share/SharePlatformModel.js +2 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +10 -12
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +45 -49
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +12 -12
- package/sdk/public/PublicClient.d.ts +0 -2
- package/sdk/public/PublicClient.js +0 -4
- package/sdk/public/index.d.ts +0 -1
- package/sdk/public/index.js +0 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
- package/sdk/public/Billing/BillingPublicClient.js +0 -397
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
- package/sdk/public/Billing/BillingPublicModel.js +0 -560
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
- package/sdk/public/Billing/BillingPublicValidator.js +0 -50
|
@@ -2,33 +2,12 @@ const Joi = require("joi");
|
|
|
2
2
|
|
|
3
3
|
const BillingPlatformModel = require("./BillingPlatformModel");
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* @typedef ActivateSubscriptionPlanParam
|
|
7
|
-
* @property {BillingPlatformModel.SubscriptionActivateReq} body
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
5
|
/**
|
|
11
6
|
* @typedef CancelSubscriptionChargeParam
|
|
12
7
|
* @property {string} extensionId - Extension _id
|
|
13
8
|
* @property {string} subscriptionId - Subscription charge _id
|
|
14
9
|
*/
|
|
15
10
|
|
|
16
|
-
/**
|
|
17
|
-
* @typedef CancelSubscriptionPlanParam
|
|
18
|
-
* @property {BillingPlatformModel.CancelSubscriptionReq} body
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @typedef ChangePlanParam
|
|
23
|
-
* @property {BillingPlatformModel.SubscriptionActivateReq} body
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @typedef CheckCouponValidityParam
|
|
28
|
-
* @property {string} plan - ID of the plan.
|
|
29
|
-
* @property {string} couponCode - Coupon code.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
11
|
/**
|
|
33
12
|
* @typedef CreateOneTimeChargeParam
|
|
34
13
|
* @property {string} extensionId - Extension _id
|
|
@@ -36,206 +15,25 @@ const BillingPlatformModel = require("./BillingPlatformModel");
|
|
|
36
15
|
*/
|
|
37
16
|
|
|
38
17
|
/**
|
|
39
|
-
* @typedef
|
|
40
|
-
* @property {
|
|
41
|
-
*
|
|
42
|
-
* @property {
|
|
43
|
-
* @property {number} [pageSize] - Number of items per page
|
|
44
|
-
* @property {number} [pageNo] - Page number
|
|
45
|
-
* @property {string} [startDate] - Start date
|
|
46
|
-
* @property {string} [endDate] - End date
|
|
47
|
-
* @property {string} [searchType] - Search Type
|
|
48
|
-
* @property {string} [searchValue] - Search Value
|
|
18
|
+
* @typedef CreateSubscriptionChargeParam
|
|
19
|
+
* @property {string} extensionId - Extension Id for which we need to crete new
|
|
20
|
+
* subscription
|
|
21
|
+
* @property {BillingPlatformModel.CreateSubscriptionCharge} body
|
|
49
22
|
*/
|
|
50
23
|
|
|
51
|
-
/**
|
|
52
|
-
* @typedef CurrentAppLimitParam
|
|
53
|
-
* @property {string} [productSuite]
|
|
54
|
-
* @property {string} [type]
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
/** @typedef GetBankListParam */
|
|
58
|
-
|
|
59
24
|
/**
|
|
60
25
|
* @typedef GetChargeDetailsParam
|
|
61
26
|
* @property {string} extensionId - Extension _id
|
|
62
27
|
* @property {string} chargeId - Standalone charge _id
|
|
63
28
|
*/
|
|
64
29
|
|
|
65
|
-
/** @typedef GetCustomerDetailParam */
|
|
66
|
-
|
|
67
|
-
/** @typedef GetEnterprisePlansParam */
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* @typedef GetFeatureLimitConfigParam
|
|
71
|
-
* @property {string} [productSuite]
|
|
72
|
-
* @property {string} [type]
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @typedef GetInvoiceByIdParam
|
|
77
|
-
* @property {string} invoiceId - Invoice id
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
/** @typedef GetInvoicesParam */
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @typedef GetPaymentOptionsParam
|
|
84
|
-
* @property {string} transactionId - ID of the payment transaction.
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* @typedef GetPaymentTransactionParam
|
|
89
|
-
* @property {string} transactionId - Payment Transaction unique id.
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
/** @typedef GetSubscriptionParam */
|
|
93
|
-
|
|
94
30
|
/**
|
|
95
31
|
* @typedef GetSubscriptionChargeParam
|
|
96
32
|
* @property {string} extensionId - Extension _id
|
|
97
33
|
* @property {string} subscriptionId - Subscription charge _id
|
|
98
34
|
*/
|
|
99
35
|
|
|
100
|
-
/**
|
|
101
|
-
* @typedef GetentityDetailParam
|
|
102
|
-
* @property {string} entityName - Entity name.
|
|
103
|
-
* @property {string} [entityId] - Entity unique id.
|
|
104
|
-
* @property {string} channel - Ordering channel.
|
|
105
|
-
* @property {string} [component] - The coponents the user would like to know.
|
|
106
|
-
* @property {string} [componentName] - The name of component the preferred to be fetched.
|
|
107
|
-
*/
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* @typedef GlobalSettingsParam
|
|
111
|
-
* @property {number} pageNo - Number of pages needed
|
|
112
|
-
* @property {number} pageSize - Number of items to be there in page
|
|
113
|
-
* @property {Object} query - Field which will be used in db query
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* @typedef MethodDefaultParam
|
|
118
|
-
* @property {BillingPlatformModel.DefaultReq} body
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @typedef PaymentCollectParam
|
|
123
|
-
* @property {BillingPlatformModel.PaymentCollectReq} body
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @typedef PaymentInitiateParam
|
|
128
|
-
* @property {BillingPlatformModel.SubscribePlan} body
|
|
129
|
-
*/
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @typedef PaymentOptionsParam
|
|
133
|
-
* @property {string} code - Payment options unique code.
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* @typedef PaymentStatusParam
|
|
138
|
-
* @property {string} orderId - Unique ID of the company
|
|
139
|
-
*/
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* @typedef PlanDowngradeParam
|
|
143
|
-
* @property {BillingPlatformModel.DowngradePlanReq} body
|
|
144
|
-
*/
|
|
145
|
-
|
|
146
|
-
/** @typedef PlanDowngradeGetParam */
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* @typedef PlanStatusUpdateParam
|
|
150
|
-
* @property {BillingPlatformModel.PlanStatusUpdateReq} body
|
|
151
|
-
*/
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* @typedef SetupIntentParam
|
|
155
|
-
* @property {BillingPlatformModel.IntentReq} body
|
|
156
|
-
*/
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* @typedef SetupMandateParam
|
|
160
|
-
* @property {BillingPlatformModel.SetupMandateReq} body
|
|
161
|
-
*/
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* @typedef SetupPaymentParam
|
|
165
|
-
* @property {BillingPlatformModel.SetupPaymentReq} body
|
|
166
|
-
*/
|
|
167
|
-
|
|
168
|
-
/** @typedef SubscriptionConfigsParam */
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* @typedef SubscriptionMethodsParam
|
|
172
|
-
* @property {string} uniqueExternalId - Unique id for external company
|
|
173
|
-
*/
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* @typedef SubscriptionMethodsDeleteParam
|
|
177
|
-
* @property {string} uniqueExternalId - Unique id for external company
|
|
178
|
-
* @property {string} paymentMethodId - Payment method id
|
|
179
|
-
*/
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* @typedef SubscriptionPlanChangeParam
|
|
183
|
-
* @property {string} [productSuite]
|
|
184
|
-
* @property {string} [coupon]
|
|
185
|
-
* @property {number} [uniqueId]
|
|
186
|
-
* @property {string} [platform]
|
|
187
|
-
* @property {string} [planId]
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* @typedef SubscriptionRenewParam
|
|
192
|
-
* @property {BillingPlatformModel.SubscriptionRenewReq} body
|
|
193
|
-
*/
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* @typedef TopupCancelCreditParam
|
|
197
|
-
* @property {BillingPlatformModel.CancelTopupReq} body
|
|
198
|
-
*/
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* @typedef TopupCreditParam
|
|
202
|
-
* @property {BillingPlatformModel.TopupReq} body
|
|
203
|
-
*/
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* @typedef UpdateConsentParam
|
|
207
|
-
* @property {string} subscriberId - Customer unique id. In case of company it
|
|
208
|
-
* will be company id.
|
|
209
|
-
*/
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* @typedef UpdateSetupIntentParam
|
|
213
|
-
* @property {BillingPlatformModel.PutIntentReq} body
|
|
214
|
-
*/
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* @typedef UpgradePlanParam
|
|
218
|
-
* @property {BillingPlatformModel.SubscriptionMethodsReq} body
|
|
219
|
-
*/
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* @typedef UpsertCustomerDetailParam
|
|
223
|
-
* @property {BillingPlatformModel.SubscriptionCustomerCreate} body
|
|
224
|
-
*/
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* @typedef VerifyPaymentParam
|
|
228
|
-
* @property {BillingPlatformModel.VerifyPaymentReq} body
|
|
229
|
-
*/
|
|
230
|
-
|
|
231
36
|
class BillingPlatformValidator {
|
|
232
|
-
/** @returns {ActivateSubscriptionPlanParam} */
|
|
233
|
-
static activateSubscriptionPlan() {
|
|
234
|
-
return Joi.object({
|
|
235
|
-
body: BillingPlatformModel.SubscriptionActivateReq().required(),
|
|
236
|
-
}).required();
|
|
237
|
-
}
|
|
238
|
-
|
|
239
37
|
/** @returns {CancelSubscriptionChargeParam} */
|
|
240
38
|
static cancelSubscriptionCharge() {
|
|
241
39
|
return Joi.object({
|
|
@@ -244,28 +42,6 @@ class BillingPlatformValidator {
|
|
|
244
42
|
}).required();
|
|
245
43
|
}
|
|
246
44
|
|
|
247
|
-
/** @returns {CancelSubscriptionPlanParam} */
|
|
248
|
-
static cancelSubscriptionPlan() {
|
|
249
|
-
return Joi.object({
|
|
250
|
-
body: BillingPlatformModel.CancelSubscriptionReq().required(),
|
|
251
|
-
}).required();
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/** @returns {ChangePlanParam} */
|
|
255
|
-
static changePlan() {
|
|
256
|
-
return Joi.object({
|
|
257
|
-
body: BillingPlatformModel.SubscriptionActivateReq().required(),
|
|
258
|
-
}).required();
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/** @returns {CheckCouponValidityParam} */
|
|
262
|
-
static checkCouponValidity() {
|
|
263
|
-
return Joi.object({
|
|
264
|
-
plan: Joi.string().allow("").required(),
|
|
265
|
-
couponCode: Joi.string().allow("").required(),
|
|
266
|
-
}).required();
|
|
267
|
-
}
|
|
268
|
-
|
|
269
45
|
/** @returns {CreateOneTimeChargeParam} */
|
|
270
46
|
static createOneTimeCharge() {
|
|
271
47
|
return Joi.object({
|
|
@@ -274,34 +50,14 @@ class BillingPlatformValidator {
|
|
|
274
50
|
}).required();
|
|
275
51
|
}
|
|
276
52
|
|
|
277
|
-
/** @returns {
|
|
278
|
-
static
|
|
279
|
-
return Joi.object({
|
|
280
|
-
uniqueId: Joi.number().required(),
|
|
281
|
-
productSuite: Joi.string().allow("").required(),
|
|
282
|
-
type: Joi.string().allow("").required(),
|
|
283
|
-
pageSize: Joi.number(),
|
|
284
|
-
pageNo: Joi.number(),
|
|
285
|
-
startDate: Joi.string().allow(""),
|
|
286
|
-
endDate: Joi.string().allow(""),
|
|
287
|
-
searchType: Joi.string().allow(""),
|
|
288
|
-
searchValue: Joi.string().allow(""),
|
|
289
|
-
}).required();
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/** @returns {CurrentAppLimitParam} */
|
|
293
|
-
static currentAppLimit() {
|
|
53
|
+
/** @returns {CreateSubscriptionChargeParam} */
|
|
54
|
+
static createSubscriptionCharge() {
|
|
294
55
|
return Joi.object({
|
|
295
|
-
|
|
296
|
-
|
|
56
|
+
extensionId: Joi.string().allow("").required(),
|
|
57
|
+
body: BillingPlatformModel.CreateSubscriptionCharge().required(),
|
|
297
58
|
}).required();
|
|
298
59
|
}
|
|
299
60
|
|
|
300
|
-
/** @returns {GetBankListParam} */
|
|
301
|
-
static getBankList() {
|
|
302
|
-
return Joi.object({}).required();
|
|
303
|
-
}
|
|
304
|
-
|
|
305
61
|
/** @returns {GetChargeDetailsParam} */
|
|
306
62
|
static getChargeDetails() {
|
|
307
63
|
return Joi.object({
|
|
@@ -310,55 +66,6 @@ class BillingPlatformValidator {
|
|
|
310
66
|
}).required();
|
|
311
67
|
}
|
|
312
68
|
|
|
313
|
-
/** @returns {GetCustomerDetailParam} */
|
|
314
|
-
static getCustomerDetail() {
|
|
315
|
-
return Joi.object({}).required();
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/** @returns {GetEnterprisePlansParam} */
|
|
319
|
-
static getEnterprisePlans() {
|
|
320
|
-
return Joi.object({}).required();
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
/** @returns {GetFeatureLimitConfigParam} */
|
|
324
|
-
static getFeatureLimitConfig() {
|
|
325
|
-
return Joi.object({
|
|
326
|
-
productSuite: Joi.string().allow(""),
|
|
327
|
-
type: Joi.string().allow(""),
|
|
328
|
-
}).required();
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
/** @returns {GetInvoiceByIdParam} */
|
|
332
|
-
static getInvoiceById() {
|
|
333
|
-
return Joi.object({
|
|
334
|
-
invoiceId: Joi.string().allow("").required(),
|
|
335
|
-
}).required();
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/** @returns {GetInvoicesParam} */
|
|
339
|
-
static getInvoices() {
|
|
340
|
-
return Joi.object({}).required();
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
/** @returns {GetPaymentOptionsParam} */
|
|
344
|
-
static getPaymentOptions() {
|
|
345
|
-
return Joi.object({
|
|
346
|
-
transactionId: Joi.string().allow("").required(),
|
|
347
|
-
}).required();
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
/** @returns {GetPaymentTransactionParam} */
|
|
351
|
-
static getPaymentTransaction() {
|
|
352
|
-
return Joi.object({
|
|
353
|
-
transactionId: Joi.string().allow("").required(),
|
|
354
|
-
}).required();
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/** @returns {GetSubscriptionParam} */
|
|
358
|
-
static getSubscription() {
|
|
359
|
-
return Joi.object({}).required();
|
|
360
|
-
}
|
|
361
|
-
|
|
362
69
|
/** @returns {GetSubscriptionChargeParam} */
|
|
363
70
|
static getSubscriptionCharge() {
|
|
364
71
|
return Joi.object({
|
|
@@ -366,188 +73,6 @@ class BillingPlatformValidator {
|
|
|
366
73
|
subscriptionId: Joi.string().allow("").required(),
|
|
367
74
|
}).required();
|
|
368
75
|
}
|
|
369
|
-
|
|
370
|
-
/** @returns {GetentityDetailParam} */
|
|
371
|
-
static getentityDetail() {
|
|
372
|
-
return Joi.object({
|
|
373
|
-
entityName: Joi.string().allow("").required(),
|
|
374
|
-
entityId: Joi.string().allow(""),
|
|
375
|
-
channel: Joi.string().allow("").required(),
|
|
376
|
-
component: Joi.string().allow(""),
|
|
377
|
-
componentName: Joi.string().allow(""),
|
|
378
|
-
}).required();
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/** @returns {GlobalSettingsParam} */
|
|
382
|
-
static globalSettings() {
|
|
383
|
-
return Joi.object({
|
|
384
|
-
pageNo: Joi.number().required(),
|
|
385
|
-
pageSize: Joi.number().required(),
|
|
386
|
-
query: Joi.any().required(),
|
|
387
|
-
}).required();
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
/** @returns {MethodDefaultParam} */
|
|
391
|
-
static methodDefault() {
|
|
392
|
-
return Joi.object({
|
|
393
|
-
body: BillingPlatformModel.DefaultReq().required(),
|
|
394
|
-
}).required();
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
/** @returns {PaymentCollectParam} */
|
|
398
|
-
static paymentCollect() {
|
|
399
|
-
return Joi.object({
|
|
400
|
-
body: BillingPlatformModel.PaymentCollectReq().required(),
|
|
401
|
-
}).required();
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/** @returns {PaymentInitiateParam} */
|
|
405
|
-
static paymentInitiate() {
|
|
406
|
-
return Joi.object({
|
|
407
|
-
body: BillingPlatformModel.SubscribePlan().required(),
|
|
408
|
-
}).required();
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
/** @returns {PaymentOptionsParam} */
|
|
412
|
-
static paymentOptions() {
|
|
413
|
-
return Joi.object({
|
|
414
|
-
code: Joi.string().allow("").required(),
|
|
415
|
-
}).required();
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
/** @returns {PaymentStatusParam} */
|
|
419
|
-
static paymentStatus() {
|
|
420
|
-
return Joi.object({
|
|
421
|
-
orderId: Joi.string().allow("").required(),
|
|
422
|
-
}).required();
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
/** @returns {PlanDowngradeParam} */
|
|
426
|
-
static planDowngrade() {
|
|
427
|
-
return Joi.object({
|
|
428
|
-
body: BillingPlatformModel.DowngradePlanReq().required(),
|
|
429
|
-
}).required();
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
/** @returns {PlanDowngradeGetParam} */
|
|
433
|
-
static planDowngradeGet() {
|
|
434
|
-
return Joi.object({}).required();
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/** @returns {PlanStatusUpdateParam} */
|
|
438
|
-
static planStatusUpdate() {
|
|
439
|
-
return Joi.object({
|
|
440
|
-
body: BillingPlatformModel.PlanStatusUpdateReq().required(),
|
|
441
|
-
}).required();
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
/** @returns {SetupIntentParam} */
|
|
445
|
-
static setupIntent() {
|
|
446
|
-
return Joi.object({
|
|
447
|
-
body: BillingPlatformModel.IntentReq().required(),
|
|
448
|
-
}).required();
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/** @returns {SetupMandateParam} */
|
|
452
|
-
static setupMandate() {
|
|
453
|
-
return Joi.object({
|
|
454
|
-
body: BillingPlatformModel.SetupMandateReq().required(),
|
|
455
|
-
}).required();
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
/** @returns {SetupPaymentParam} */
|
|
459
|
-
static setupPayment() {
|
|
460
|
-
return Joi.object({
|
|
461
|
-
body: BillingPlatformModel.SetupPaymentReq().required(),
|
|
462
|
-
}).required();
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
/** @returns {SubscriptionConfigsParam} */
|
|
466
|
-
static subscriptionConfigs() {
|
|
467
|
-
return Joi.object({}).required();
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
/** @returns {SubscriptionMethodsParam} */
|
|
471
|
-
static subscriptionMethods() {
|
|
472
|
-
return Joi.object({
|
|
473
|
-
uniqueExternalId: Joi.string().allow("").required(),
|
|
474
|
-
}).required();
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
/** @returns {SubscriptionMethodsDeleteParam} */
|
|
478
|
-
static subscriptionMethodsDelete() {
|
|
479
|
-
return Joi.object({
|
|
480
|
-
uniqueExternalId: Joi.string().allow("").required(),
|
|
481
|
-
paymentMethodId: Joi.string().allow("").required(),
|
|
482
|
-
}).required();
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
/** @returns {SubscriptionPlanChangeParam} */
|
|
486
|
-
static subscriptionPlanChange() {
|
|
487
|
-
return Joi.object({
|
|
488
|
-
productSuite: Joi.string().allow(""),
|
|
489
|
-
coupon: Joi.string().allow(""),
|
|
490
|
-
uniqueId: Joi.number(),
|
|
491
|
-
platform: Joi.string().allow(""),
|
|
492
|
-
planId: Joi.string().allow(""),
|
|
493
|
-
}).required();
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
/** @returns {SubscriptionRenewParam} */
|
|
497
|
-
static subscriptionRenew() {
|
|
498
|
-
return Joi.object({
|
|
499
|
-
body: BillingPlatformModel.SubscriptionRenewReq().required(),
|
|
500
|
-
}).required();
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
/** @returns {TopupCancelCreditParam} */
|
|
504
|
-
static topupCancelCredit() {
|
|
505
|
-
return Joi.object({
|
|
506
|
-
body: BillingPlatformModel.CancelTopupReq().required(),
|
|
507
|
-
}).required();
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
/** @returns {TopupCreditParam} */
|
|
511
|
-
static topupCredit() {
|
|
512
|
-
return Joi.object({
|
|
513
|
-
body: BillingPlatformModel.TopupReq().required(),
|
|
514
|
-
}).required();
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
/** @returns {UpdateConsentParam} */
|
|
518
|
-
static updateConsent() {
|
|
519
|
-
return Joi.object({
|
|
520
|
-
subscriberId: Joi.string().allow("").required(),
|
|
521
|
-
}).required();
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
/** @returns {UpdateSetupIntentParam} */
|
|
525
|
-
static updateSetupIntent() {
|
|
526
|
-
return Joi.object({
|
|
527
|
-
body: BillingPlatformModel.PutIntentReq().required(),
|
|
528
|
-
}).required();
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
/** @returns {UpgradePlanParam} */
|
|
532
|
-
static upgradePlan() {
|
|
533
|
-
return Joi.object({
|
|
534
|
-
body: BillingPlatformModel.SubscriptionMethodsReq().required(),
|
|
535
|
-
}).required();
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
/** @returns {UpsertCustomerDetailParam} */
|
|
539
|
-
static upsertCustomerDetail() {
|
|
540
|
-
return Joi.object({
|
|
541
|
-
body: BillingPlatformModel.SubscriptionCustomerCreate().required(),
|
|
542
|
-
}).required();
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
/** @returns {VerifyPaymentParam} */
|
|
546
|
-
static verifyPayment() {
|
|
547
|
-
return Joi.object({
|
|
548
|
-
body: BillingPlatformModel.VerifyPaymentReq().required(),
|
|
549
|
-
}).required();
|
|
550
|
-
}
|
|
551
76
|
}
|
|
552
77
|
|
|
553
78
|
module.exports = BillingPlatformValidator;
|