@gofynd/fdk-client-javascript 1.4.8 → 1.4.10-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.
@@ -1,560 +0,0 @@
1
- const Joi = require("joi");
2
-
3
- /**
4
- * @typedef TenureConfig
5
- * @property {string} [display_name] - Display name for the tenure
6
- * configuration(like "Monthly", "Half Yearly", "Yearly")
7
- * @property {string} [description] - Description of the tenure configuration
8
- * @property {boolean} [is_active] - Indicates whether the tenure configuration is active
9
- * @property {string} [slug] - Slug identifier that uniquely identifies the
10
- * tenure configuration
11
- */
12
-
13
- /**
14
- * @typedef TenureConfigData
15
- * @property {string} [country] - Country associated with the tenure configuration
16
- * @property {TenureConfig[]} [tenure_config] - Array of tenure configurations
17
- */
18
-
19
- /**
20
- * @typedef TenureConfigResponse
21
- * @property {boolean} [success] - Indicates whether the request was successful
22
- * @property {TenureConfigData} [data]
23
- */
24
-
25
- /**
26
- * @typedef ResourceNotFound
27
- * @property {string} [message] - Resource not found with {id}
28
- */
29
-
30
- /**
31
- * @typedef PlanRecurring
32
- * @property {string} [interval] - Interval for the recurring plan
33
- * @property {number} [interval_count] - Number of intervals for the recurring plan
34
- * @property {string} [aggregate_usage] - Aggregate usage type for the recurring plan
35
- * @property {string} [usage_type] - Usage type for the recurring plan (like metered etc)
36
- */
37
-
38
- /**
39
- * @typedef PlanTypes
40
- * @property {PlanDetails[]} [month] - Monthly plan details
41
- * @property {PlanDetails[]} [quarter] - Quarterly plan details
42
- * @property {PlanDetails[]} [half_year] - Half-yearly plan details
43
- * @property {PlanDetails[]} [year] - Yearly plan details
44
- */
45
-
46
- /**
47
- * @typedef DetailList
48
- * @property {PlanTypes} [plans]
49
- * @property {TrialPlanDetails} [trial_plan]
50
- */
51
-
52
- /**
53
- * @typedef PlanTaxation
54
- * @property {number} [gst] - GST percentage applied to the plan
55
- */
56
-
57
- /**
58
- * @typedef CountryRes
59
- * @property {string} [name] - Name of the country
60
- * @property {string} [code] - Country code
61
- */
62
-
63
- /**
64
- * @typedef OneTimeFees
65
- * @property {number} [developement] - One time Development fees
66
- * @property {number} [marketing] - One time Marketing fees
67
- */
68
-
69
- /**
70
- * @typedef CreditLine
71
- * @property {boolean} [is_active] - Indicates whether the credit line is active
72
- */
73
-
74
- /**
75
- * @typedef PlanMeta
76
- * @property {string} [plan_platform_display_name] - Display name for the plan platform
77
- */
78
-
79
- /**
80
- * @typedef FeatureConfig
81
- * @property {boolean} [enabled] - Indicates whether the feature is enabled
82
- * @property {number} [limit] - Limit for the feature
83
- * @property {number} [hard_limit] - Hard limit for the feature
84
- * @property {number} [soft_limit] - Soft limit for the feature
85
- */
86
-
87
- /**
88
- * @typedef PlanConfig
89
- * @property {boolean} [is_active] - Indicates whether the plan configuration is active
90
- * @property {string} [display_text] - Text to display plan configuration
91
- * @property {boolean} [is_default] - Indicates whether the plan configuration is default
92
- * @property {string} [processing_type] - Type of processing for the plan configuration
93
- * @property {string[]} [tags] - Tags associated with the plan configuration
94
- * @property {FeatureConfig} [feature_config]
95
- * @property {string} [_id] - Unique identifier for the plan configuration
96
- * @property {string} [component_id] - Component identifier associated with the
97
- * plan configuration
98
- * @property {string} [created_at] - Creation date of the plan configuration
99
- * @property {string} [modified_at] - Modification date of the plan configuration
100
- * @property {number} [__v] - Version number of the plan configuration
101
- * @property {string} [billing_scheme] - Billing scheme for the plan configuration
102
- * @property {string} [bill_type] - Billing type for the plan configuration
103
- * @property {string} [price_ui_type] - Price UI type for the plan configuration
104
- * @property {PlanRecurring} [recurring]
105
- * @property {TransformQuantity} [transform_quantity]
106
- * @property {FreeTier} [free_tier]
107
- * @property {string} [currency] - Currency used in the plan configuration
108
- * @property {number} [unit_amount] - Unit amount for the plan configuration
109
- * @property {number} [quantity] - Quantity for the plan configuration
110
- * @property {string} [price_type] - Price type for the plan configuration
111
- * @property {Object[]} [tiers] - An array of pricing tiers that apply based on
112
- * quantity or usage. Each tier can define a maximum limit (`up_to`), an
113
- * additional flat fee (`flat_amount`), and a price per unit (`unit_amount`)
114
- */
115
-
116
- /**
117
- * @typedef FreeTier
118
- * @property {string} [type] - Type of the free tier
119
- * @property {number} [value] - Value of the free tier type
120
- */
121
-
122
- /**
123
- * @typedef TransformQuantity
124
- * @property {number} [divide_by] - Divide by value for the quantity transformation
125
- * @property {string} [round] - Rounding method for the quantity transformation
126
- */
127
-
128
- /**
129
- * @typedef ComponentsSchema
130
- * @property {string} [name] - Name of the component
131
- * @property {string} [slug] - Slug identifier for the component
132
- * @property {string} [description] - Description of the component
133
- * @property {string} [group] - Group to which the component belongs
134
- * @property {string} [icon] - Icon associated with the component
135
- * @property {Object} [links] - Links associated with the component
136
- * @property {PlanConfig} [config]
137
- * @property {boolean} [is_active] - Indicates whether the component is active
138
- * @property {string} [display_text] - Display text for the component
139
- */
140
-
141
- /**
142
- * @typedef PlanDetails
143
- * @property {string} [activated_by] - ID of the user who activated the plan
144
- * @property {string} [updated_by] - ID of the user who updated the plan
145
- * @property {PlanRecurring} [recurring]
146
- * @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan
147
- * @property {string[]} [company_ids] - Company IDs associated with the plan
148
- * @property {string} [created_by] - ID of the user who created the plan
149
- * @property {string} [channel_type] - Ordering channel associated with the
150
- * plan(e.g, ecomm, fynd)
151
- * @property {string} [platform] - Platform associated with the plan(e.g, web, mobile)
152
- * @property {string} [plan_group] - Group to which the plan belongs
153
- * @property {string[]} [tag_lines] - Tag lines associated with the plan
154
- * @property {string} [currency] - Currency of the plan
155
- * @property {boolean} [is_active] - Indicates whether the plan is active
156
- * @property {boolean} [is_visible] - Indicates whether the plan is visible on ui
157
- * @property {number} [trial_period] - Trial period of the plan
158
- * @property {string[]} [addons] - Addons associated with the plan
159
- * @property {string[]} [tags] - Tags associated with the plan
160
- * @property {string} [type] - Type of the plan
161
- * @property {CountryRes} [country]
162
- * @property {string} [_id] - Unique identifier for the plan."
163
- * @property {string} [name] - Name of the plan
164
- * @property {string} [description] - Description of the plan
165
- * @property {number} [amount] - Amount of the plan
166
- * @property {string} [product_suite_id] - Identifier of the product suite
167
- * associated with the plan
168
- * @property {string} [created_at] - Creation date of the plan
169
- * @property {string} [modified_at] - Modification date of the plan
170
- * @property {PlanTaxation} [taxation]
171
- * @property {OneTimeFees} [one_time_fees]
172
- * @property {CreditLine} [credit_line]
173
- * @property {string} [current_status] - Current status of the plan
174
- * @property {string} [approved_by] - Id of the User who has approved the plan
175
- * @property {PlanMeta} [meta]
176
- * @property {ComponentsSchema[]} [components] - Components associated with the plan
177
- */
178
-
179
- /**
180
- * @typedef Recurring
181
- * @property {string} [interval] - Interval for recurring payments
182
- * @property {number} [interval_count] - Number of intervals
183
- */
184
-
185
- /**
186
- * @typedef Taxation
187
- * @property {number} [gst] - GST percentage applied to the plan
188
- */
189
-
190
- /**
191
- * @typedef PlanList
192
- * @property {string} [approved_by] - ID of the user who approved the plan
193
- * @property {string} [updated_by] - ID of the user who updated the plan
194
- * @property {Recurring} [recurring]
195
- * @property {Taxation} [taxation]
196
- * @property {OneTimeFees} [one_time_fees]
197
- * @property {CreditLine} [credit_line]
198
- * @property {string} [_id] - Unique identifier of the plan
199
- * @property {string} [product_suite_id] - Identifier of the product suite
200
- * associated with the plan
201
- * @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan
202
- * @property {string} [name] - Name of the plan
203
- * @property {string} [description] - Description of the plan
204
- * @property {string} [plan_group] - Group to which plan belongs
205
- * @property {string} [plan_group_id] - Group id to which plan belongs
206
- * @property {string[]} [tag_lines] - Tag lines associated with the plan
207
- * @property {string} [currency] - Currency of the plan
208
- * @property {number} [amount] - Amount of the plan
209
- * @property {boolean} [is_active] - Indicates whether the plan is active
210
- * @property {boolean} [is_visible] - Indicates whether the plan is visible on ui
211
- * @property {number} [trial_period] - Trial period of the plan in days
212
- * @property {Object[]} [addons] - Addons associated with the plan
213
- * @property {string[]} [tags] - Tags associated with the plan
214
- * @property {string} [type] - Type of the plan (enterprise or standard)
215
- * @property {Object} [meta] - Additional metadata associated with the plan
216
- * @property {CountryRes} [country]
217
- * @property {string[]} [company_ids] - Company IDs associated with the plan
218
- * @property {string} [created_by] - ID of the user who created the plan
219
- * @property {string} [current_status] - Current status of the plan (active, inactive)
220
- * @property {string} [channel_type] - Ordering channel for which plan is
221
- * created(fynd, ecomm, uniket etc)
222
- * @property {string} [platform] - Platform associated with the plan (web, mobile, all)
223
- * @property {string} [created_at] - Date and time when the plan was created
224
- * @property {string} [modified_at] - Date and time when the plan was last modified
225
- */
226
-
227
- /**
228
- * @typedef TrialPlanDetails
229
- * @property {string} [activated_by] - ID of the user who activated the trial plan
230
- * @property {string} [updated_by] - ID of the user who updated the trial plan
231
- * @property {PlanRecurring} [recurring]
232
- * @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan
233
- * @property {string[]} [company_ids] - Company IDs associated with the trial plan
234
- * @property {string} [created_by] - ID of the user who created the trial plan
235
- * @property {string} [channel_type] - Ordering channel for which plan is
236
- * created(ecomm, fynd etc)
237
- * @property {string} [platform] - Platform associated with the trial plan(web ,
238
- * mobile, all)
239
- * @property {string} [plan_group] - Group to which the trial plan belongs
240
- * @property {string[]} [tag_lines] - Tag lines associated with the trial plan
241
- * @property {string} [currency] - Currency of the trial plan
242
- * @property {boolean} [is_active] - Indicates whether the trial plan is active
243
- * @property {boolean} [is_visible] - Indicates whether the trial plan is visible on ui
244
- * @property {number} [trial_period] - Trial period of the trial plan in days
245
- * @property {string[]} [addons] - Addons associated with the trial plan
246
- * @property {string[]} [tags] - Tags associated with the trial plan
247
- * @property {string} [type] - Type of the trial plan(public, company_specific)
248
- * @property {CountryRes} [country]
249
- * @property {string} [_id] - Unique identifier for the trial plan
250
- * @property {string} [name] - Name of the trial plan
251
- * @property {string} [description] - Description of the trial plan
252
- * @property {number} [amount] - Amount of the trial plan
253
- * @property {string} [product_suite_id] - Identifier of the product suite
254
- * associated with the trial plan
255
- * @property {string} [created_at] - Creation date of the trial plan
256
- * @property {string} [modified_at] - Modification date of the trial plan
257
- * @property {PlanTaxation} [taxation]
258
- * @property {OneTimeFees} [one_time_fees]
259
- * @property {CreditLine} [credit_line]
260
- * @property {string} [current_status] - Current status of the trial plan
261
- * @property {PlanMeta} [meta]
262
- * @property {ComponentsSchema[]} [components] - Components associated with the trial plan
263
- */
264
-
265
- class BillingPublicModel {
266
- /** @returns {TenureConfig} */
267
- static TenureConfig() {
268
- return Joi.object({
269
- display_name: Joi.string().allow(""),
270
- description: Joi.string().allow(""),
271
- is_active: Joi.boolean(),
272
- slug: Joi.string().allow(""),
273
- });
274
- }
275
-
276
- /** @returns {TenureConfigData} */
277
- static TenureConfigData() {
278
- return Joi.object({
279
- country: Joi.string().allow(""),
280
- tenure_config: Joi.array().items(BillingPublicModel.TenureConfig()),
281
- });
282
- }
283
-
284
- /** @returns {TenureConfigResponse} */
285
- static TenureConfigResponse() {
286
- return Joi.object({
287
- success: Joi.boolean(),
288
- data: BillingPublicModel.TenureConfigData(),
289
- });
290
- }
291
-
292
- /** @returns {ResourceNotFound} */
293
- static ResourceNotFound() {
294
- return Joi.object({
295
- message: Joi.string().allow(""),
296
- });
297
- }
298
-
299
- /** @returns {PlanRecurring} */
300
- static PlanRecurring() {
301
- return Joi.object({
302
- interval: Joi.string().allow(""),
303
- interval_count: Joi.number(),
304
- aggregate_usage: Joi.string().allow(""),
305
- usage_type: Joi.string().allow(""),
306
- });
307
- }
308
-
309
- /** @returns {PlanTypes} */
310
- static PlanTypes() {
311
- return Joi.object({
312
- month: Joi.array().items(BillingPublicModel.PlanDetails()),
313
- quarter: Joi.array().items(BillingPublicModel.PlanDetails()),
314
- half_year: Joi.array().items(BillingPublicModel.PlanDetails()),
315
- year: Joi.array().items(BillingPublicModel.PlanDetails()),
316
- });
317
- }
318
-
319
- /** @returns {DetailList} */
320
- static DetailList() {
321
- return Joi.object({
322
- plans: BillingPublicModel.PlanTypes(),
323
- trial_plan: BillingPublicModel.TrialPlanDetails(),
324
- });
325
- }
326
-
327
- /** @returns {PlanTaxation} */
328
- static PlanTaxation() {
329
- return Joi.object({
330
- gst: Joi.number(),
331
- });
332
- }
333
-
334
- /** @returns {CountryRes} */
335
- static CountryRes() {
336
- return Joi.object({
337
- name: Joi.string().allow(""),
338
- code: Joi.string().allow(""),
339
- });
340
- }
341
-
342
- /** @returns {OneTimeFees} */
343
- static OneTimeFees() {
344
- return Joi.object({
345
- developement: Joi.number().allow(null),
346
- marketing: Joi.number().allow(null),
347
- });
348
- }
349
-
350
- /** @returns {CreditLine} */
351
- static CreditLine() {
352
- return Joi.object({
353
- is_active: Joi.boolean(),
354
- });
355
- }
356
-
357
- /** @returns {PlanMeta} */
358
- static PlanMeta() {
359
- return Joi.object({
360
- plan_platform_display_name: Joi.string().allow("").allow(null),
361
- });
362
- }
363
-
364
- /** @returns {FeatureConfig} */
365
- static FeatureConfig() {
366
- return Joi.object({
367
- enabled: Joi.boolean(),
368
- limit: Joi.number(),
369
- hard_limit: Joi.number(),
370
- soft_limit: Joi.number(),
371
- });
372
- }
373
-
374
- /** @returns {PlanConfig} */
375
- static PlanConfig() {
376
- return Joi.object({
377
- is_active: Joi.boolean(),
378
- display_text: Joi.string().allow("").allow(null),
379
- is_default: Joi.boolean(),
380
- processing_type: Joi.string().allow(""),
381
- tags: Joi.array().items(Joi.string().allow("")),
382
- feature_config: BillingPublicModel.FeatureConfig(),
383
- _id: Joi.string().allow(""),
384
- component_id: Joi.string().allow(""),
385
- created_at: Joi.string().allow(""),
386
- modified_at: Joi.string().allow(""),
387
- __v: Joi.number(),
388
- billing_scheme: Joi.string().allow(""),
389
- bill_type: Joi.string().allow(""),
390
- price_ui_type: Joi.string().allow(""),
391
- recurring: BillingPublicModel.PlanRecurring(),
392
- transform_quantity: BillingPublicModel.TransformQuantity(),
393
- free_tier: BillingPublicModel.FreeTier(),
394
- currency: Joi.string().allow(""),
395
- unit_amount: Joi.number(),
396
- quantity: Joi.number(),
397
- price_type: Joi.string().allow(""),
398
- tiers: Joi.array().items(Joi.any()),
399
- });
400
- }
401
-
402
- /** @returns {FreeTier} */
403
- static FreeTier() {
404
- return Joi.object({
405
- type: Joi.string().allow(""),
406
- value: Joi.number(),
407
- });
408
- }
409
-
410
- /** @returns {TransformQuantity} */
411
- static TransformQuantity() {
412
- return Joi.object({
413
- divide_by: Joi.number(),
414
- round: Joi.string().allow(""),
415
- });
416
- }
417
-
418
- /** @returns {ComponentsSchema} */
419
- static ComponentsSchema() {
420
- return Joi.object({
421
- name: Joi.string().allow(""),
422
- slug: Joi.string().allow(""),
423
- description: Joi.string().allow(""),
424
- group: Joi.string().allow(""),
425
- icon: Joi.string().allow(""),
426
- links: Joi.any(),
427
- config: BillingPublicModel.PlanConfig(),
428
- is_active: Joi.boolean(),
429
- display_text: Joi.string().allow("").allow(null),
430
- });
431
- }
432
-
433
- /** @returns {PlanDetails} */
434
- static PlanDetails() {
435
- return Joi.object({
436
- activated_by: Joi.string().allow(""),
437
- updated_by: Joi.string().allow(""),
438
- recurring: BillingPublicModel.PlanRecurring(),
439
- is_trial_plan: Joi.boolean(),
440
- company_ids: Joi.array().items(Joi.string().allow("")),
441
- created_by: Joi.string().allow(""),
442
- channel_type: Joi.string().allow(""),
443
- platform: Joi.string().allow("").allow(null),
444
- plan_group: Joi.string().allow(""),
445
- tag_lines: Joi.array().items(Joi.string().allow("")),
446
- currency: Joi.string().allow(""),
447
- is_active: Joi.boolean(),
448
- is_visible: Joi.boolean(),
449
- trial_period: Joi.number(),
450
- addons: Joi.array().items(Joi.string().allow("")),
451
- tags: Joi.array().items(Joi.string().allow("")),
452
- type: Joi.string().allow(""),
453
- country: BillingPublicModel.CountryRes(),
454
- _id: Joi.string().allow(""),
455
- name: Joi.string().allow(""),
456
- description: Joi.string().allow(""),
457
- amount: Joi.number(),
458
- product_suite_id: Joi.string().allow(""),
459
- created_at: Joi.string().allow(""),
460
- modified_at: Joi.string().allow(""),
461
- taxation: BillingPublicModel.PlanTaxation(),
462
- one_time_fees: BillingPublicModel.OneTimeFees(),
463
- credit_line: BillingPublicModel.CreditLine(),
464
- current_status: Joi.string().allow(""),
465
- approved_by: Joi.string().allow(""),
466
- meta: BillingPublicModel.PlanMeta(),
467
- components: Joi.array().items(BillingPublicModel.ComponentsSchema()),
468
- });
469
- }
470
-
471
- /** @returns {Recurring} */
472
- static Recurring() {
473
- return Joi.object({
474
- interval: Joi.string().allow(""),
475
- interval_count: Joi.number(),
476
- });
477
- }
478
-
479
- /** @returns {Taxation} */
480
- static Taxation() {
481
- return Joi.object({
482
- gst: Joi.number(),
483
- });
484
- }
485
-
486
- /** @returns {PlanList} */
487
- static PlanList() {
488
- return Joi.object({
489
- approved_by: Joi.string().allow(""),
490
- updated_by: Joi.string().allow(""),
491
- recurring: BillingPublicModel.Recurring(),
492
- taxation: BillingPublicModel.Taxation(),
493
- one_time_fees: BillingPublicModel.OneTimeFees(),
494
- credit_line: BillingPublicModel.CreditLine(),
495
- _id: Joi.string().allow(""),
496
- product_suite_id: Joi.string().allow(""),
497
- is_trial_plan: Joi.boolean(),
498
- name: Joi.string().allow(""),
499
- description: Joi.string().allow(""),
500
- plan_group: Joi.string().allow(""),
501
- plan_group_id: Joi.string().allow(""),
502
- tag_lines: Joi.array().items(Joi.string().allow("")),
503
- currency: Joi.string().allow(""),
504
- amount: Joi.number(),
505
- is_active: Joi.boolean(),
506
- is_visible: Joi.boolean(),
507
- trial_period: Joi.number(),
508
- addons: Joi.array().items(Joi.any()),
509
- tags: Joi.array().items(Joi.string().allow("")),
510
- type: Joi.string().allow(""),
511
- meta: Joi.any(),
512
- country: BillingPublicModel.CountryRes(),
513
- company_ids: Joi.array().items(Joi.string().allow("")),
514
- created_by: Joi.string().allow(""),
515
- current_status: Joi.string().allow(""),
516
- channel_type: Joi.string().allow(""),
517
- platform: Joi.string().allow("").allow(null),
518
- created_at: Joi.string().allow(""),
519
- modified_at: Joi.string().allow(""),
520
- });
521
- }
522
-
523
- /** @returns {TrialPlanDetails} */
524
- static TrialPlanDetails() {
525
- return Joi.object({
526
- activated_by: Joi.string().allow(""),
527
- updated_by: Joi.string().allow(""),
528
- recurring: BillingPublicModel.PlanRecurring(),
529
- is_trial_plan: Joi.boolean(),
530
- company_ids: Joi.array().items(Joi.string().allow("")),
531
- created_by: Joi.string().allow(""),
532
- channel_type: Joi.string().allow(""),
533
- platform: Joi.string().allow("").allow(null),
534
- plan_group: Joi.string().allow(""),
535
- tag_lines: Joi.array().items(Joi.string().allow("")),
536
- currency: Joi.string().allow(""),
537
- is_active: Joi.boolean(),
538
- is_visible: Joi.boolean(),
539
- trial_period: Joi.number(),
540
- addons: Joi.array().items(Joi.string().allow("")),
541
- tags: Joi.array().items(Joi.string().allow("")),
542
- type: Joi.string().allow(""),
543
- country: BillingPublicModel.CountryRes(),
544
- _id: Joi.string().allow(""),
545
- name: Joi.string().allow(""),
546
- description: Joi.string().allow(""),
547
- amount: Joi.number(),
548
- product_suite_id: Joi.string().allow(""),
549
- created_at: Joi.string().allow(""),
550
- modified_at: Joi.string().allow(""),
551
- taxation: BillingPublicModel.PlanTaxation(),
552
- one_time_fees: BillingPublicModel.OneTimeFees(),
553
- credit_line: BillingPublicModel.CreditLine(),
554
- current_status: Joi.string().allow(""),
555
- meta: BillingPublicModel.PlanMeta(),
556
- components: Joi.array().items(BillingPublicModel.ComponentsSchema()),
557
- });
558
- }
559
- }
560
- module.exports = BillingPublicModel;
@@ -1,43 +0,0 @@
1
- export = BillingPublicValidator;
2
- /**
3
- * @typedef GetPlanDetailsParam
4
- * @property {string} planId - Plan unique id.
5
- */
6
- /**
7
- * @typedef GetStandardPlansParam
8
- * @property {string} [platform] - The type of platform for which plans are requested.
9
- */
10
- /**
11
- * @typedef GetTenureConfigParam
12
- * @property {string} countryCode
13
- */
14
- /** @typedef PlanListParam */
15
- declare class BillingPublicValidator {
16
- /** @returns {GetPlanDetailsParam} */
17
- static getPlanDetails(): GetPlanDetailsParam;
18
- /** @returns {GetStandardPlansParam} */
19
- static getStandardPlans(): GetStandardPlansParam;
20
- /** @returns {GetTenureConfigParam} */
21
- static getTenureConfig(): GetTenureConfigParam;
22
- /** @returns {PlanListParam} */
23
- static planList(): any;
24
- }
25
- declare namespace BillingPublicValidator {
26
- export { GetPlanDetailsParam, GetStandardPlansParam, GetTenureConfigParam, PlanListParam };
27
- }
28
- type GetPlanDetailsParam = {
29
- /**
30
- * - Plan unique id.
31
- */
32
- planId: string;
33
- };
34
- type GetStandardPlansParam = {
35
- /**
36
- * - The type of platform for which plans are requested.
37
- */
38
- platform?: string;
39
- };
40
- type GetTenureConfigParam = {
41
- countryCode: string;
42
- };
43
- type PlanListParam = any;
@@ -1,50 +0,0 @@
1
- const Joi = require("joi");
2
-
3
- const BillingPublicModel = require("./BillingPublicModel");
4
-
5
- /**
6
- * @typedef GetPlanDetailsParam
7
- * @property {string} planId - Plan unique id.
8
- */
9
-
10
- /**
11
- * @typedef GetStandardPlansParam
12
- * @property {string} [platform] - The type of platform for which plans are requested.
13
- */
14
-
15
- /**
16
- * @typedef GetTenureConfigParam
17
- * @property {string} countryCode
18
- */
19
-
20
- /** @typedef PlanListParam */
21
-
22
- class BillingPublicValidator {
23
- /** @returns {GetPlanDetailsParam} */
24
- static getPlanDetails() {
25
- return Joi.object({
26
- planId: Joi.string().allow("").required(),
27
- }).required();
28
- }
29
-
30
- /** @returns {GetStandardPlansParam} */
31
- static getStandardPlans() {
32
- return Joi.object({
33
- platform: Joi.string().allow(""),
34
- });
35
- }
36
-
37
- /** @returns {GetTenureConfigParam} */
38
- static getTenureConfig() {
39
- return Joi.object({
40
- countryCode: Joi.string().allow("").required(),
41
- }).required();
42
- }
43
-
44
- /** @returns {PlanListParam} */
45
- static planList() {
46
- return Joi.object({});
47
- }
48
- }
49
-
50
- module.exports = BillingPublicValidator;