@gofynd/fdk-client-javascript 1.4.7 → 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.
Files changed (110) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +16 -3
  4. package/sdk/application/Cart/CartApplicationClient.js +118 -13
  5. package/sdk/application/Cart/CartApplicationModel.d.ts +121 -45
  6. package/sdk/application/Cart/CartApplicationModel.js +98 -26
  7. package/sdk/application/Cart/CartApplicationValidator.d.ts +45 -1
  8. package/sdk/application/Cart/CartApplicationValidator.js +26 -0
  9. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +4 -2
  10. package/sdk/application/Catalog/CatalogApplicationModel.js +4 -2
  11. package/sdk/application/Content/ContentApplicationClient.d.ts +1 -1
  12. package/sdk/application/Content/ContentApplicationClient.js +5 -3
  13. package/sdk/application/Content/ContentApplicationModel.d.ts +5 -18
  14. package/sdk/application/Content/ContentApplicationModel.js +4 -20
  15. package/sdk/application/Content/ContentApplicationValidator.d.ts +10 -0
  16. package/sdk/application/Content/ContentApplicationValidator.js +4 -0
  17. package/sdk/application/Lead/LeadApplicationClient.d.ts +0 -27
  18. package/sdk/application/Lead/LeadApplicationClient.js +0 -167
  19. package/sdk/application/Lead/LeadApplicationModel.d.ts +1 -146
  20. package/sdk/application/Lead/LeadApplicationModel.js +0 -126
  21. package/sdk/application/Lead/LeadApplicationValidator.d.ts +1 -25
  22. package/sdk/application/Lead/LeadApplicationValidator.js +0 -24
  23. package/sdk/application/Logistic/LogisticApplicationClient.js +1 -1
  24. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +2 -0
  25. package/sdk/application/Logistic/LogisticApplicationModel.js +2 -0
  26. package/sdk/application/Order/OrderApplicationModel.d.ts +2 -0
  27. package/sdk/application/Order/OrderApplicationModel.js +2 -0
  28. package/sdk/application/Payment/PaymentApplicationModel.d.ts +9 -2
  29. package/sdk/application/Payment/PaymentApplicationModel.js +5 -2
  30. package/sdk/application/Theme/ThemeApplicationModel.d.ts +2 -0
  31. package/sdk/application/Theme/ThemeApplicationModel.js +2 -0
  32. package/sdk/partner/Lead/LeadPartnerClient.d.ts +0 -23
  33. package/sdk/partner/Lead/LeadPartnerClient.js +0 -157
  34. package/sdk/partner/Lead/LeadPartnerModel.d.ts +12 -581
  35. package/sdk/partner/Lead/LeadPartnerModel.js +14 -403
  36. package/sdk/partner/Lead/LeadPartnerValidator.d.ts +0 -2
  37. package/sdk/partner/Lead/LeadPartnerValidator.js +0 -12
  38. package/sdk/partner/Logistics/LogisticsPartnerClient.js +1 -1
  39. package/sdk/partner/Logistics/LogisticsPartnerModel.js +4 -4
  40. package/sdk/partner/Theme/ThemePartnerClient.d.ts +22 -0
  41. package/sdk/partner/Theme/ThemePartnerClient.js +162 -0
  42. package/sdk/partner/Theme/ThemePartnerModel.d.ts +119 -1
  43. package/sdk/partner/Theme/ThemePartnerModel.js +142 -0
  44. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
  45. package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
  46. package/sdk/platform/Billing/BillingPlatformClient.d.ts +304 -43
  47. package/sdk/platform/Billing/BillingPlatformClient.js +2218 -118
  48. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1330 -282
  49. package/sdk/platform/Billing/BillingPlatformModel.js +1808 -590
  50. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +324 -16
  51. package/sdk/platform/Billing/BillingPlatformValidator.js +340 -12
  52. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +28 -5
  53. package/sdk/platform/Cart/CartPlatformApplicationClient.js +198 -5
  54. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +81 -1
  55. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +48 -0
  56. package/sdk/platform/Cart/CartPlatformModel.d.ts +214 -40
  57. package/sdk/platform/Cart/CartPlatformModel.js +164 -24
  58. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
  59. package/sdk/platform/Catalog/CatalogPlatformClient.js +18 -2
  60. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +4 -0
  61. package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -0
  62. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +28 -0
  63. package/sdk/platform/Catalog/CatalogPlatformValidator.js +12 -0
  64. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
  65. package/sdk/platform/Content/ContentPlatformApplicationClient.js +18 -1
  66. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +25 -0
  67. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +10 -0
  68. package/sdk/platform/Content/ContentPlatformModel.d.ts +6 -4
  69. package/sdk/platform/Content/ContentPlatformModel.js +6 -4
  70. package/sdk/platform/Finance/FinancePlatformClient.d.ts +49 -28
  71. package/sdk/platform/Finance/FinancePlatformClient.js +181 -28
  72. package/sdk/platform/Finance/FinancePlatformModel.d.ts +350 -127
  73. package/sdk/platform/Finance/FinancePlatformModel.js +378 -108
  74. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +56 -43
  75. package/sdk/platform/Finance/FinancePlatformValidator.js +61 -42
  76. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +0 -47
  77. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +0 -321
  78. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +1 -46
  79. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +0 -48
  80. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -25
  81. package/sdk/platform/Lead/LeadPlatformClient.js +2 -167
  82. package/sdk/platform/Lead/LeadPlatformModel.d.ts +82 -204
  83. package/sdk/platform/Lead/LeadPlatformModel.js +98 -178
  84. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +1 -25
  85. package/sdk/platform/Lead/LeadPlatformValidator.js +0 -24
  86. package/sdk/platform/Order/OrderPlatformModel.d.ts +108 -15
  87. package/sdk/platform/Order/OrderPlatformModel.js +47 -14
  88. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -0
  89. package/sdk/platform/Payment/PaymentPlatformModel.js +5 -0
  90. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +4 -4
  91. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +12 -0
  92. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +82 -0
  93. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -1
  94. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +14 -0
  95. package/sdk/platform/Theme/ThemePlatformModel.d.ts +67 -1
  96. package/sdk/platform/Theme/ThemePlatformModel.js +78 -0
  97. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +0 -40
  98. package/sdk/platform/Webhook/WebhookPlatformClient.js +0 -307
  99. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +112 -164
  100. package/sdk/platform/Webhook/WebhookPlatformModel.js +118 -169
  101. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +9 -35
  102. package/sdk/platform/Webhook/WebhookPlatformValidator.js +8 -46
  103. package/sdk/public/Billing/BillingPublicClient.d.ts +24 -2
  104. package/sdk/public/Billing/BillingPublicClient.js +156 -3
  105. package/sdk/public/Billing/BillingPublicModel.d.ts +368 -26
  106. package/sdk/public/Billing/BillingPublicModel.js +317 -18
  107. package/sdk/public/Billing/BillingPublicValidator.d.ts +19 -3
  108. package/sdk/public/Billing/BillingPublicValidator.js +22 -3
  109. package/sdk/public/Webhook/WebhookPublicModel.d.ts +22 -22
  110. package/sdk/public/Webhook/WebhookPublicModel.js +22 -22
@@ -3,10 +3,23 @@ declare class Billing {
3
3
  constructor(_conf: any);
4
4
  _conf: any;
5
5
  _relativeUrls: {
6
+ getPlanDetails: string;
6
7
  getStandardPlans: string;
8
+ planList: string;
7
9
  };
8
10
  _urls: {};
9
11
  updateUrls(urls: any): void;
12
+ /**
13
+ * @param {BillingPublicValidator.GetPlanDetailsParam} arg - Arg object.
14
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
15
+ * @param {import("../PublicAPIClient").Options} - Options
16
+ * @returns {Promise<BillingPublicModel.PlanDetails>} - Success response
17
+ * @name getPlanDetails
18
+ * @summary: Get plan details
19
+ * @description: Get plan details.
20
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getPlanDetails/).
21
+ */
22
+ getPlanDetails({ planId, requestHeaders }?: BillingPublicValidator.GetPlanDetailsParam, { responseHeaders }?: object): Promise<BillingPublicModel.PlanDetails>;
10
23
  /**
11
24
  * @param {BillingPublicValidator.GetStandardPlansParam} arg - Arg object.
12
25
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -14,10 +27,19 @@ declare class Billing {
14
27
  * @returns {Promise<BillingPublicModel.DetailList>} - Success response
15
28
  * @name getStandardPlans
16
29
  * @summary: Get Standard/Public Plans
17
- * @description: Get Standard/Public Plans.
18
- * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getStandardPlans/).
30
+ * @description: Get Standard/Public Plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getStandardPlans/).
19
31
  */
20
32
  getStandardPlans({ platform, requestHeaders }?: BillingPublicValidator.GetStandardPlansParam, { responseHeaders }?: object): Promise<BillingPublicModel.DetailList>;
33
+ /**
34
+ * @param {BillingPublicValidator.PlanListParam} arg - Arg object.
35
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
36
+ * @param {import("../PublicAPIClient").Options} - Options
37
+ * @returns {Promise<BillingPublicModel.PlanList[]>} - Success response
38
+ * @name planList
39
+ * @summary: Get List of all plans
40
+ * @description: Get List of all plans - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/planList/).
41
+ */
42
+ planList({ requestHeaders }?: any, { responseHeaders }?: object): Promise<BillingPublicModel.PlanList[]>;
21
43
  }
22
44
  import BillingPublicValidator = require("./BillingPublicValidator");
23
45
  import BillingPublicModel = require("./BillingPublicModel");
@@ -14,7 +14,9 @@ class Billing {
14
14
  constructor(_conf) {
15
15
  this._conf = _conf;
16
16
  this._relativeUrls = {
17
- getStandardPlans: "/service/public/billing/v1.0/plan/detailed-list",
17
+ getPlanDetails: "/service/public/billing/v1.0/plan/details/{plan_id}",
18
+ getStandardPlans: "/service/public/billing/v1.0/plan/detailed-list/",
19
+ planList: "/service/public/billing/v1.0/plan/list",
18
20
  };
19
21
  this._urls = Object.entries(this._relativeUrls).reduce(
20
22
  (urls, [method, relativeUrl]) => {
@@ -32,6 +34,85 @@ class Billing {
32
34
  };
33
35
  }
34
36
 
37
+ /**
38
+ * @param {BillingPublicValidator.GetPlanDetailsParam} arg - Arg object.
39
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
40
+ * @param {import("../PublicAPIClient").Options} - Options
41
+ * @returns {Promise<BillingPublicModel.PlanDetails>} - Success response
42
+ * @name getPlanDetails
43
+ * @summary: Get plan details
44
+ * @description: Get plan details.
45
+ * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getPlanDetails/).
46
+ */
47
+ async getPlanDetails(
48
+ { planId, requestHeaders } = { requestHeaders: {} },
49
+ { responseHeaders } = { responseHeaders: false }
50
+ ) {
51
+ const { error } = BillingPublicValidator.getPlanDetails().validate(
52
+ { planId },
53
+ { abortEarly: false, allowUnknown: true }
54
+ );
55
+ if (error) {
56
+ return Promise.reject(new FDKClientValidationError(error));
57
+ }
58
+
59
+ // Showing warrnings if extra unknown parameters are found
60
+ const {
61
+ error: warrning,
62
+ } = BillingPublicValidator.getPlanDetails().validate(
63
+ { planId },
64
+ { abortEarly: false, allowUnknown: false }
65
+ );
66
+ if (warrning) {
67
+ Logger({
68
+ level: "WARN",
69
+ message: `Parameter Validation warrnings for public > Billing > getPlanDetails \n ${warrning}`,
70
+ });
71
+ }
72
+
73
+ const query_params = {};
74
+
75
+ const xHeaders = {};
76
+
77
+ const response = await PublicAPIClient.execute(
78
+ this._conf,
79
+ "get",
80
+ constructUrl({
81
+ url: this._urls["getPlanDetails"],
82
+ params: { planId },
83
+ }),
84
+ query_params,
85
+ undefined,
86
+ { ...xHeaders, ...requestHeaders },
87
+ { responseHeaders }
88
+ );
89
+
90
+ let responseData = response;
91
+ if (responseHeaders) {
92
+ responseData = response[0];
93
+ }
94
+
95
+ const {
96
+ error: res_error,
97
+ } = BillingPublicModel.PlanDetails().validate(responseData, {
98
+ abortEarly: false,
99
+ allowUnknown: true,
100
+ });
101
+
102
+ if (res_error) {
103
+ if (this._conf.options.strictResponseCheck === true) {
104
+ return Promise.reject(new FDKResponseValidationError(res_error));
105
+ } else {
106
+ Logger({
107
+ level: "WARN",
108
+ message: `Response Validation Warnings for public > Billing > getPlanDetails \n ${res_error}`,
109
+ });
110
+ }
111
+ }
112
+
113
+ return response;
114
+ }
115
+
35
116
  /**
36
117
  * @param {BillingPublicValidator.GetStandardPlansParam} arg - Arg object.
37
118
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -39,8 +120,7 @@ class Billing {
39
120
  * @returns {Promise<BillingPublicModel.DetailList>} - Success response
40
121
  * @name getStandardPlans
41
122
  * @summary: Get Standard/Public Plans
42
- * @description: Get Standard/Public Plans.
43
- * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getStandardPlans/).
123
+ * @description: Get Standard/Public Plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getStandardPlans/).
44
124
  */
45
125
  async getStandardPlans(
46
126
  { platform, requestHeaders } = { requestHeaders: {} },
@@ -111,6 +191,79 @@ class Billing {
111
191
 
112
192
  return response;
113
193
  }
194
+
195
+ /**
196
+ * @param {BillingPublicValidator.PlanListParam} arg - Arg object.
197
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
198
+ * @param {import("../PublicAPIClient").Options} - Options
199
+ * @returns {Promise<BillingPublicModel.PlanList[]>} - Success response
200
+ * @name planList
201
+ * @summary: Get List of all plans
202
+ * @description: Get List of all plans - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/planList/).
203
+ */
204
+ async planList(
205
+ { requestHeaders } = { requestHeaders: {} },
206
+ { responseHeaders } = { responseHeaders: false }
207
+ ) {
208
+ const { error } = BillingPublicValidator.planList().validate(
209
+ {},
210
+ { abortEarly: false, allowUnknown: true }
211
+ );
212
+ if (error) {
213
+ return Promise.reject(new FDKClientValidationError(error));
214
+ }
215
+
216
+ // Showing warrnings if extra unknown parameters are found
217
+ const { error: warrning } = BillingPublicValidator.planList().validate(
218
+ {},
219
+ { abortEarly: false, allowUnknown: false }
220
+ );
221
+ if (warrning) {
222
+ Logger({
223
+ level: "WARN",
224
+ message: `Parameter Validation warrnings for public > Billing > planList \n ${warrning}`,
225
+ });
226
+ }
227
+
228
+ const query_params = {};
229
+
230
+ const xHeaders = {};
231
+
232
+ const response = await PublicAPIClient.execute(
233
+ this._conf,
234
+ "get",
235
+ constructUrl({
236
+ url: this._urls["planList"],
237
+ params: {},
238
+ }),
239
+ query_params,
240
+ undefined,
241
+ { ...xHeaders, ...requestHeaders },
242
+ { responseHeaders }
243
+ );
244
+
245
+ let responseData = response;
246
+ if (responseHeaders) {
247
+ responseData = response[0];
248
+ }
249
+
250
+ const { error: res_error } = Joi.array()
251
+ .items(BillingPublicModel.PlanList())
252
+ .validate(responseData, { abortEarly: false, allowUnknown: true });
253
+
254
+ if (res_error) {
255
+ if (this._conf.options.strictResponseCheck === true) {
256
+ return Promise.reject(new FDKResponseValidationError(res_error));
257
+ } else {
258
+ Logger({
259
+ level: "WARN",
260
+ message: `Response Validation Warnings for public > Billing > planList \n ${res_error}`,
261
+ });
262
+ }
263
+ }
264
+
265
+ return response;
266
+ }
114
267
  }
115
268
 
116
269
  module.exports = Billing;
@@ -1,18 +1,101 @@
1
1
  export = BillingPublicModel;
2
2
  /**
3
- * @typedef InternalServerError
4
- * @property {string} [message] - Internal server Server error
5
- * @property {string} [code] - Error code
3
+ * @typedef ResourceNotFound
4
+ * @property {string} [message] - Resource not found with {id}
6
5
  */
7
6
  /**
8
7
  * @typedef PlanRecurring
9
8
  * @property {string} [interval]
10
9
  * @property {number} [interval_count]
10
+ * @property {string} [aggregate_usage]
11
+ * @property {string} [usage_type]
11
12
  */
12
13
  /**
13
- * @typedef Plan
14
+ * @typedef DetailList
15
+ * @property {PlanDetails[]} [plans]
16
+ * @property {string[]} [component_groups]
17
+ */
18
+ /**
19
+ * @typedef PlanTaxation
20
+ * @property {number} [gst]
21
+ */
22
+ /**
23
+ * @typedef OneTimeFees
24
+ * @property {number} [developement]
25
+ * @property {number} [marketing]
26
+ */
27
+ /**
28
+ * @typedef CreditLine
29
+ * @property {boolean} [is_active]
30
+ */
31
+ /**
32
+ * @typedef PlanMeta
33
+ * @property {string} [plan_platform_display_name]
34
+ */
35
+ /**
36
+ * @typedef FeatureConfig
37
+ * @property {boolean} [enabled]
38
+ * @property {number} [limit]
39
+ * @property {number} [hard_limit]
40
+ * @property {number} [soft_limit]
41
+ */
42
+ /**
43
+ * @typedef PlanConfig
44
+ * @property {boolean} [is_active]
45
+ * @property {string} [display_text]
46
+ * @property {boolean} [is_default]
47
+ * @property {string} [processing_type]
48
+ * @property {string[]} [tags]
49
+ * @property {FeatureConfig} [feature_config]
50
+ * @property {string} [_id]
51
+ * @property {string} [component_id]
52
+ * @property {string} [created_at]
53
+ * @property {string} [modified_at]
54
+ * @property {number} [__v]
55
+ * @property {string} [billing_scheme]
56
+ * @property {string} [bill_type]
57
+ * @property {string} [price_ui_type]
58
+ * @property {PlanRecurring} [recurring]
59
+ * @property {TransformQuantity} [transform_quantity]
60
+ * @property {FreeTier} [free_tier]
61
+ * @property {string} [currency]
62
+ * @property {number} [unit_amount]
63
+ * @property {number} [quantity]
64
+ * @property {string} [price_type]
65
+ * @property {Object[]} [tiers]
66
+ */
67
+ /**
68
+ * @typedef FreeTier
69
+ * @property {string} [type]
70
+ * @property {number} [value]
71
+ */
72
+ /**
73
+ * @typedef TransformQuantity
74
+ * @property {number} [divide_by]
75
+ * @property {string} [round]
76
+ */
77
+ /**
78
+ * @typedef ComponentsSchema
79
+ * @property {string} [name]
80
+ * @property {string} [slug]
81
+ * @property {string} [description]
82
+ * @property {string} [group]
83
+ * @property {string} [icon]
84
+ * @property {Object} [links]
85
+ * @property {PlanConfig} [config]
86
+ * @property {boolean} [is_active]
87
+ * @property {string} [display_text]
88
+ */
89
+ /**
90
+ * @typedef PlanDetails
91
+ * @property {string} [approved_by]
92
+ * @property {string} [updated_by]
14
93
  * @property {PlanRecurring} [recurring]
15
94
  * @property {boolean} [is_trial_plan]
95
+ * @property {string[]} [company_ids]
96
+ * @property {string} [created_by]
97
+ * @property {string} [channel_type]
98
+ * @property {string} [platform]
16
99
  * @property {string} [plan_group]
17
100
  * @property {string[]} [tag_lines]
18
101
  * @property {string} [currency]
@@ -30,41 +113,174 @@ export = BillingPublicModel;
30
113
  * @property {string} [product_suite_id]
31
114
  * @property {string} [created_at]
32
115
  * @property {string} [modified_at]
116
+ * @property {PlanTaxation} [taxation]
117
+ * @property {OneTimeFees} [one_time_fees]
118
+ * @property {CreditLine} [credit_line]
119
+ * @property {string} [current_status]
120
+ * @property {PlanMeta} [meta]
121
+ * @property {ComponentsSchema[]} [components]
33
122
  */
34
123
  /**
35
- * @typedef DetailList
36
- * @property {Plan[]} [plans]
37
- * @property {Plan} [trial_plan]
38
- * @property {string[]} [component_groups]
124
+ * @typedef Recurring
125
+ * @property {string} [interval] - Interval for recurring payments
126
+ * @property {number} [interval_count] - Number of intervals
127
+ */
128
+ /**
129
+ * @typedef Taxation
130
+ * @property {number} [gst] - GST percentage
131
+ */
132
+ /**
133
+ * @typedef PlanList
134
+ * @property {string} [approved_by]
135
+ * @property {string} [updated_by]
136
+ * @property {Recurring} [recurring]
137
+ * @property {Taxation} [taxation]
138
+ * @property {OneTimeFees} [one_time_fees]
139
+ * @property {CreditLine} [credit_line]
140
+ * @property {string} [_id] - Unique identifier of the plan
141
+ * @property {string} [product_suite_id] - Identifier of the product suite
142
+ * associated with the plan
143
+ * @property {boolean} [is_trial_plan] - Indicates whether the plan is a trial plan
144
+ * @property {string} [name] - Name of the plan
145
+ * @property {string} [description] - Description of the plan
146
+ * @property {string} [plan_group] - Group to which the plan belongs
147
+ * @property {string[]} [tag_lines] - Tag lines associated with the plan
148
+ * @property {string} [currency] - Currency of the plan
149
+ * @property {number} [amount] - Amount of the plan
150
+ * @property {boolean} [is_active] - Indicates whether the plan is active
151
+ * @property {boolean} [is_visible] - Indicates whether the plan is visible
152
+ * @property {number} [trial_period] - Trial period of the plan
153
+ * @property {Object[]} [addons] - Addons associated with the plan
154
+ * @property {string[]} [tags] - Tags associated with the plan
155
+ * @property {string} [type] - Type of the plan
156
+ * @property {Object} [meta] - Additional metadata associated with the plan
157
+ * @property {string} [country] - Country associated with the plan
158
+ * @property {string[]} [company_ids] - Company IDs associated with the plan
159
+ * @property {string} [created_by] - ID of the user who created the plan
160
+ * @property {string} [current_status] - Current status of the plan
161
+ * @property {string} [channel_type] - Type of channel associated with the plan
162
+ * @property {string} [platform] - Platform associated with the plan
163
+ * @property {string} [created_at] - Date and time when the plan was created
164
+ * @property {string} [modified_at] - Date and time when the plan was last modified
39
165
  */
40
166
  declare class BillingPublicModel {
41
167
  }
42
168
  declare namespace BillingPublicModel {
43
- export { InternalServerError, PlanRecurring, Plan, DetailList };
169
+ export { ResourceNotFound, PlanRecurring, DetailList, PlanTaxation, OneTimeFees, CreditLine, PlanMeta, FeatureConfig, PlanConfig, FreeTier, TransformQuantity, ComponentsSchema, PlanDetails, Recurring, Taxation, PlanList };
44
170
  }
45
- /** @returns {InternalServerError} */
46
- declare function InternalServerError(): InternalServerError;
47
- type InternalServerError = {
171
+ /** @returns {ResourceNotFound} */
172
+ declare function ResourceNotFound(): ResourceNotFound;
173
+ type ResourceNotFound = {
48
174
  /**
49
- * - Internal server Server error
175
+ * - Resource not found with {id}
50
176
  */
51
177
  message?: string;
52
- /**
53
- * - Error code
54
- */
55
- code?: string;
56
178
  };
57
179
  /** @returns {PlanRecurring} */
58
180
  declare function PlanRecurring(): PlanRecurring;
59
181
  type PlanRecurring = {
60
182
  interval?: string;
61
183
  interval_count?: number;
184
+ aggregate_usage?: string;
185
+ usage_type?: string;
186
+ };
187
+ /** @returns {DetailList} */
188
+ declare function DetailList(): DetailList;
189
+ type DetailList = {
190
+ plans?: PlanDetails[];
191
+ component_groups?: string[];
62
192
  };
63
- /** @returns {Plan} */
64
- declare function Plan(): Plan;
65
- type Plan = {
193
+ /** @returns {PlanTaxation} */
194
+ declare function PlanTaxation(): PlanTaxation;
195
+ type PlanTaxation = {
196
+ gst?: number;
197
+ };
198
+ /** @returns {OneTimeFees} */
199
+ declare function OneTimeFees(): OneTimeFees;
200
+ type OneTimeFees = {
201
+ developement?: number;
202
+ marketing?: number;
203
+ };
204
+ /** @returns {CreditLine} */
205
+ declare function CreditLine(): CreditLine;
206
+ type CreditLine = {
207
+ is_active?: boolean;
208
+ };
209
+ /** @returns {PlanMeta} */
210
+ declare function PlanMeta(): PlanMeta;
211
+ type PlanMeta = {
212
+ plan_platform_display_name?: string;
213
+ };
214
+ /** @returns {FeatureConfig} */
215
+ declare function FeatureConfig(): FeatureConfig;
216
+ type FeatureConfig = {
217
+ enabled?: boolean;
218
+ limit?: number;
219
+ hard_limit?: number;
220
+ soft_limit?: number;
221
+ };
222
+ /** @returns {PlanConfig} */
223
+ declare function PlanConfig(): PlanConfig;
224
+ type PlanConfig = {
225
+ is_active?: boolean;
226
+ display_text?: string;
227
+ is_default?: boolean;
228
+ processing_type?: string;
229
+ tags?: string[];
230
+ feature_config?: FeatureConfig;
231
+ _id?: string;
232
+ component_id?: string;
233
+ created_at?: string;
234
+ modified_at?: string;
235
+ __v?: number;
236
+ billing_scheme?: string;
237
+ bill_type?: string;
238
+ price_ui_type?: string;
239
+ recurring?: PlanRecurring;
240
+ transform_quantity?: TransformQuantity;
241
+ free_tier?: FreeTier;
242
+ currency?: string;
243
+ unit_amount?: number;
244
+ quantity?: number;
245
+ price_type?: string;
246
+ tiers?: any[];
247
+ };
248
+ /** @returns {FreeTier} */
249
+ declare function FreeTier(): FreeTier;
250
+ type FreeTier = {
251
+ type?: string;
252
+ value?: number;
253
+ };
254
+ /** @returns {TransformQuantity} */
255
+ declare function TransformQuantity(): TransformQuantity;
256
+ type TransformQuantity = {
257
+ divide_by?: number;
258
+ round?: string;
259
+ };
260
+ /** @returns {ComponentsSchema} */
261
+ declare function ComponentsSchema(): ComponentsSchema;
262
+ type ComponentsSchema = {
263
+ name?: string;
264
+ slug?: string;
265
+ description?: string;
266
+ group?: string;
267
+ icon?: string;
268
+ links?: any;
269
+ config?: PlanConfig;
270
+ is_active?: boolean;
271
+ display_text?: string;
272
+ };
273
+ /** @returns {PlanDetails} */
274
+ declare function PlanDetails(): PlanDetails;
275
+ type PlanDetails = {
276
+ approved_by?: string;
277
+ updated_by?: string;
66
278
  recurring?: PlanRecurring;
67
279
  is_trial_plan?: boolean;
280
+ company_ids?: string[];
281
+ created_by?: string;
282
+ channel_type?: string;
283
+ platform?: string;
68
284
  plan_group?: string;
69
285
  tag_lines?: string[];
70
286
  currency?: string;
@@ -82,11 +298,137 @@ type Plan = {
82
298
  product_suite_id?: string;
83
299
  created_at?: string;
84
300
  modified_at?: string;
301
+ taxation?: PlanTaxation;
302
+ one_time_fees?: OneTimeFees;
303
+ credit_line?: CreditLine;
304
+ current_status?: string;
305
+ meta?: PlanMeta;
306
+ components?: ComponentsSchema[];
85
307
  };
86
- /** @returns {DetailList} */
87
- declare function DetailList(): DetailList;
88
- type DetailList = {
89
- plans?: Plan[];
90
- trial_plan?: Plan;
91
- component_groups?: string[];
308
+ /** @returns {Recurring} */
309
+ declare function Recurring(): Recurring;
310
+ type Recurring = {
311
+ /**
312
+ * - Interval for recurring payments
313
+ */
314
+ interval?: string;
315
+ /**
316
+ * - Number of intervals
317
+ */
318
+ interval_count?: number;
319
+ };
320
+ /** @returns {Taxation} */
321
+ declare function Taxation(): Taxation;
322
+ type Taxation = {
323
+ /**
324
+ * - GST percentage
325
+ */
326
+ gst?: number;
327
+ };
328
+ /** @returns {PlanList} */
329
+ declare function PlanList(): PlanList;
330
+ type PlanList = {
331
+ approved_by?: string;
332
+ updated_by?: string;
333
+ recurring?: Recurring;
334
+ taxation?: Taxation;
335
+ one_time_fees?: OneTimeFees;
336
+ credit_line?: CreditLine;
337
+ /**
338
+ * - Unique identifier of the plan
339
+ */
340
+ _id?: string;
341
+ /**
342
+ * - Identifier of the product suite
343
+ * associated with the plan
344
+ */
345
+ product_suite_id?: string;
346
+ /**
347
+ * - Indicates whether the plan is a trial plan
348
+ */
349
+ is_trial_plan?: boolean;
350
+ /**
351
+ * - Name of the plan
352
+ */
353
+ name?: string;
354
+ /**
355
+ * - Description of the plan
356
+ */
357
+ description?: string;
358
+ /**
359
+ * - Group to which the plan belongs
360
+ */
361
+ plan_group?: string;
362
+ /**
363
+ * - Tag lines associated with the plan
364
+ */
365
+ tag_lines?: string[];
366
+ /**
367
+ * - Currency of the plan
368
+ */
369
+ currency?: string;
370
+ /**
371
+ * - Amount of the plan
372
+ */
373
+ amount?: number;
374
+ /**
375
+ * - Indicates whether the plan is active
376
+ */
377
+ is_active?: boolean;
378
+ /**
379
+ * - Indicates whether the plan is visible
380
+ */
381
+ is_visible?: boolean;
382
+ /**
383
+ * - Trial period of the plan
384
+ */
385
+ trial_period?: number;
386
+ /**
387
+ * - Addons associated with the plan
388
+ */
389
+ addons?: any[];
390
+ /**
391
+ * - Tags associated with the plan
392
+ */
393
+ tags?: string[];
394
+ /**
395
+ * - Type of the plan
396
+ */
397
+ type?: string;
398
+ /**
399
+ * - Additional metadata associated with the plan
400
+ */
401
+ meta?: any;
402
+ /**
403
+ * - Country associated with the plan
404
+ */
405
+ country?: string;
406
+ /**
407
+ * - Company IDs associated with the plan
408
+ */
409
+ company_ids?: string[];
410
+ /**
411
+ * - ID of the user who created the plan
412
+ */
413
+ created_by?: string;
414
+ /**
415
+ * - Current status of the plan
416
+ */
417
+ current_status?: string;
418
+ /**
419
+ * - Type of channel associated with the plan
420
+ */
421
+ channel_type?: string;
422
+ /**
423
+ * - Platform associated with the plan
424
+ */
425
+ platform?: string;
426
+ /**
427
+ * - Date and time when the plan was created
428
+ */
429
+ created_at?: string;
430
+ /**
431
+ * - Date and time when the plan was last modified
432
+ */
433
+ modified_at?: string;
92
434
  };