@gofynd/fdk-client-javascript 1.4.8-beta.3 → 1.4.9

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 (189) hide show
  1. package/README.md +26 -1
  2. package/package.json +2 -2
  3. package/sdk/application/ApplicationClient.d.ts +8 -0
  4. package/sdk/application/ApplicationClient.js +14 -0
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +20 -20
  6. package/sdk/application/Cart/CartApplicationClient.js +20 -20
  7. package/sdk/application/Cart/CartApplicationModel.d.ts +2446 -664
  8. package/sdk/application/Cart/CartApplicationModel.js +783 -552
  9. package/sdk/application/Cart/CartApplicationValidator.d.ts +268 -194
  10. package/sdk/application/Cart/CartApplicationValidator.js +100 -114
  11. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +53 -53
  12. package/sdk/application/Catalog/CatalogApplicationClient.js +53 -53
  13. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2012 -503
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +603 -453
  15. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +64 -64
  16. package/sdk/application/Catalog/CatalogApplicationValidator.js +32 -32
  17. package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
  18. package/sdk/application/Common/CommonApplicationClient.js +2 -2
  19. package/sdk/application/Common/CommonApplicationModel.d.ts +170 -90
  20. package/sdk/application/Common/CommonApplicationModel.js +59 -58
  21. package/sdk/application/Common/CommonApplicationValidator.d.ts +8 -5
  22. package/sdk/application/Common/CommonApplicationValidator.js +3 -3
  23. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +2 -2
  24. package/sdk/application/Communication/CommunicationApplicationClient.js +2 -2
  25. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +170 -35
  26. package/sdk/application/Communication/CommunicationApplicationModel.js +54 -33
  27. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +15 -15
  28. package/sdk/application/Configuration/ConfigurationApplicationClient.js +15 -15
  29. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +624 -443
  30. package/sdk/application/Configuration/ConfigurationApplicationModel.js +259 -248
  31. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +32 -24
  32. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +14 -13
  33. package/sdk/application/Content/ContentApplicationClient.d.ts +16 -16
  34. package/sdk/application/Content/ContentApplicationClient.js +16 -16
  35. package/sdk/application/Content/ContentApplicationModel.d.ts +1205 -282
  36. package/sdk/application/Content/ContentApplicationModel.js +341 -277
  37. package/sdk/application/Content/ContentApplicationValidator.d.ts +28 -17
  38. package/sdk/application/Content/ContentApplicationValidator.js +11 -10
  39. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +3 -3
  40. package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
  41. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +146 -37
  42. package/sdk/application/FileStorage/FileStorageApplicationModel.js +38 -36
  43. package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
  44. package/sdk/application/Lead/LeadApplicationClient.js +3 -3
  45. package/sdk/application/Lead/LeadApplicationModel.d.ts +195 -134
  46. package/sdk/application/Lead/LeadApplicationModel.js +110 -67
  47. package/sdk/application/Lead/LeadApplicationValidator.d.ts +8 -8
  48. package/sdk/application/Lead/LeadApplicationValidator.js +4 -4
  49. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +10 -10
  50. package/sdk/application/Logistic/LogisticApplicationClient.js +10 -10
  51. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +1039 -221
  52. package/sdk/application/Logistic/LogisticApplicationModel.js +342 -199
  53. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +76 -82
  54. package/sdk/application/Logistic/LogisticApplicationValidator.js +38 -41
  55. package/sdk/application/Order/OrderApplicationClient.d.ts +10 -10
  56. package/sdk/application/Order/OrderApplicationClient.js +10 -10
  57. package/sdk/application/Order/OrderApplicationModel.d.ts +1400 -325
  58. package/sdk/application/Order/OrderApplicationModel.js +391 -317
  59. package/sdk/application/Order/OrderApplicationValidator.d.ts +32 -30
  60. package/sdk/application/Order/OrderApplicationValidator.js +15 -14
  61. package/sdk/application/Payment/PaymentApplicationClient.d.ts +43 -43
  62. package/sdk/application/Payment/PaymentApplicationClient.js +43 -43
  63. package/sdk/application/Payment/PaymentApplicationModel.d.ts +1111 -1022
  64. package/sdk/application/Payment/PaymentApplicationModel.js +537 -521
  65. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +82 -49
  66. package/sdk/application/Payment/PaymentApplicationValidator.js +30 -30
  67. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +28 -7
  68. package/sdk/application/Rewards/RewardsApplicationModel.js +7 -7
  69. package/sdk/application/Share/ShareApplicationModel.d.ts +178 -38
  70. package/sdk/application/Share/ShareApplicationModel.js +53 -37
  71. package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -2
  72. package/sdk/application/Share/ShareApplicationValidator.js +2 -1
  73. package/sdk/application/Theme/ThemeApplicationClient.d.ts +4 -4
  74. package/sdk/application/Theme/ThemeApplicationClient.js +14 -8
  75. package/sdk/application/Theme/ThemeApplicationModel.d.ts +528 -287
  76. package/sdk/application/Theme/ThemeApplicationModel.js +208 -172
  77. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +17 -12
  78. package/sdk/application/Theme/ThemeApplicationValidator.js +8 -6
  79. package/sdk/application/User/UserApplicationClient.d.ts +36 -36
  80. package/sdk/application/User/UserApplicationClient.js +36 -36
  81. package/sdk/application/User/UserApplicationModel.d.ts +1062 -255
  82. package/sdk/application/User/UserApplicationModel.js +298 -244
  83. package/sdk/application/User/UserApplicationValidator.d.ts +80 -80
  84. package/sdk/application/User/UserApplicationValidator.js +40 -40
  85. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +1 -1
  86. package/sdk/application/Webhook/WebhookApplicationClient.js +1 -1
  87. package/sdk/application/Webhook/WebhookApplicationModel.d.ts +20 -5
  88. package/sdk/application/Webhook/WebhookApplicationModel.js +5 -5
  89. package/sdk/common/Clickstream.js +95 -15
  90. package/sdk/common/Constant.d.ts +9 -0
  91. package/sdk/common/Constant.js +11 -0
  92. package/sdk/common/Utility.js +19 -0
  93. package/sdk/common/utils.js +8 -1
  94. package/sdk/partner/Lead/LeadPartnerModel.d.ts +28 -7
  95. package/sdk/partner/Lead/LeadPartnerModel.js +7 -7
  96. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +28 -7
  97. package/sdk/partner/Logistics/LogisticsPartnerModel.js +7 -7
  98. package/sdk/partner/PartnerClient.d.ts +8 -0
  99. package/sdk/partner/PartnerClient.js +14 -0
  100. package/sdk/partner/Theme/ThemePartnerClient.d.ts +20 -0
  101. package/sdk/partner/Theme/ThemePartnerClient.js +158 -0
  102. package/sdk/partner/Theme/ThemePartnerModel.d.ts +45 -6
  103. package/sdk/partner/Theme/ThemePartnerModel.js +33 -4
  104. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
  105. package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
  106. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +28 -7
  107. package/sdk/partner/Webhook/WebhookPartnerModel.js +7 -7
  108. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +28 -7
  109. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +7 -7
  110. package/sdk/platform/Billing/BillingPlatformClient.d.ts +6 -397
  111. package/sdk/platform/Billing/BillingPlatformClient.js +77 -3215
  112. package/sdk/platform/Billing/BillingPlatformModel.d.ts +621 -2021
  113. package/sdk/platform/Billing/BillingPlatformModel.js +353 -2405
  114. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +12 -451
  115. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -483
  116. package/sdk/platform/Cart/CartPlatformModel.d.ts +28 -7
  117. package/sdk/platform/Cart/CartPlatformModel.js +8 -8
  118. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +12 -2
  119. package/sdk/platform/Catalog/CatalogPlatformClient.js +41 -1
  120. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +46 -12
  121. package/sdk/platform/Catalog/CatalogPlatformModel.js +14 -11
  122. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -0
  123. package/sdk/platform/Catalog/CatalogPlatformValidator.js +17 -0
  124. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +28 -7
  125. package/sdk/platform/Communication/CommunicationPlatformModel.js +7 -7
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -7
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +7 -7
  128. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -97
  129. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +77 -782
  130. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +24 -701
  131. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +7 -539
  132. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +1 -183
  133. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +0 -134
  134. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -10
  135. package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -79
  136. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -15
  137. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -13
  138. package/sdk/platform/Content/ContentPlatformModel.d.ts +58 -17
  139. package/sdk/platform/Content/ContentPlatformModel.js +28 -15
  140. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +28 -7
  141. package/sdk/platform/Discount/DiscountPlatformModel.js +7 -7
  142. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +127 -25
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +37 -25
  144. package/sdk/platform/Finance/FinancePlatformClient.d.ts +28 -28
  145. package/sdk/platform/Finance/FinancePlatformClient.js +28 -28
  146. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1583 -347
  147. package/sdk/platform/Finance/FinancePlatformModel.js +463 -351
  148. package/sdk/platform/Lead/LeadPlatformModel.d.ts +28 -7
  149. package/sdk/platform/Lead/LeadPlatformModel.js +7 -7
  150. package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -0
  151. package/sdk/platform/Order/OrderPlatformClient.js +165 -0
  152. package/sdk/platform/Order/OrderPlatformModel.d.ts +613 -39
  153. package/sdk/platform/Order/OrderPlatformModel.js +359 -41
  154. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -1
  155. package/sdk/platform/Order/OrderPlatformValidator.js +28 -0
  156. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +30 -9
  157. package/sdk/platform/Payment/PaymentPlatformModel.js +9 -9
  158. package/sdk/platform/PlatformClient.d.ts +8 -0
  159. package/sdk/platform/PlatformClient.js +14 -0
  160. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +28 -7
  161. package/sdk/platform/Rewards/RewardsPlatformModel.js +7 -7
  162. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +12 -9
  163. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +12 -9
  164. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +120 -22
  165. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +76 -21
  166. package/sdk/platform/Share/SharePlatformModel.d.ts +28 -7
  167. package/sdk/platform/Share/SharePlatformModel.js +7 -7
  168. package/sdk/platform/Theme/ThemePlatformModel.d.ts +18 -5
  169. package/sdk/platform/Theme/ThemePlatformModel.js +7 -4
  170. package/sdk/platform/User/UserPlatformModel.d.ts +18 -18
  171. package/sdk/platform/User/UserPlatformModel.js +9 -9
  172. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +28 -7
  173. package/sdk/platform/Webhook/WebhookPlatformModel.js +7 -7
  174. package/sdk/public/PublicClient.d.ts +0 -4
  175. package/sdk/public/PublicClient.js +0 -8
  176. package/sdk/public/index.d.ts +0 -2
  177. package/sdk/public/index.js +0 -4
  178. package/sdk/public/Billing/BillingPublicClient.d.ts +0 -45
  179. package/sdk/public/Billing/BillingPublicClient.js +0 -269
  180. package/sdk/public/Billing/BillingPublicModel.d.ts +0 -434
  181. package/sdk/public/Billing/BillingPublicModel.js +0 -395
  182. package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -34
  183. package/sdk/public/Billing/BillingPublicValidator.js +0 -38
  184. package/sdk/public/Inventory/InventoryPublicClient.d.ts +0 -87
  185. package/sdk/public/Inventory/InventoryPublicClient.js +0 -529
  186. package/sdk/public/Inventory/InventoryPublicModel.d.ts +0 -393
  187. package/sdk/public/Inventory/InventoryPublicModel.js +0 -448
  188. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +0 -91
  189. package/sdk/public/Inventory/InventoryPublicValidator.js +0 -85
@@ -1,269 +0,0 @@
1
- const PublicAPIClient = require("../PublicAPIClient");
2
- const {
3
- FDKClientValidationError,
4
- FDKResponseValidationError,
5
- } = require("../../common/FDKError");
6
- const constructUrl = require("../constructUrl");
7
- const Paginator = require("../../common/Paginator");
8
- const BillingPublicValidator = require("./BillingPublicValidator");
9
- const BillingPublicModel = require("./BillingPublicModel");
10
- const { Logger } = require("./../../common/Logger");
11
- const Joi = require("joi");
12
-
13
- class Billing {
14
- constructor(_conf) {
15
- this._conf = _conf;
16
- this._relativeUrls = {
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",
20
- };
21
- this._urls = Object.entries(this._relativeUrls).reduce(
22
- (urls, [method, relativeUrl]) => {
23
- urls[method] = `${_conf.domain}${relativeUrl}`;
24
- return urls;
25
- },
26
- {}
27
- );
28
- }
29
-
30
- updateUrls(urls) {
31
- this._urls = {
32
- ...this._urls,
33
- ...urls,
34
- };
35
- }
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
-
116
- /**
117
- * @param {BillingPublicValidator.GetStandardPlansParam} arg - Arg object.
118
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
119
- * @param {import("../PublicAPIClient").Options} - Options
120
- * @returns {Promise<BillingPublicModel.DetailList>} - Success response
121
- * @name getStandardPlans
122
- * @summary: Get Standard/Public Plans
123
- * @description: Get Standard/Public Plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getStandardPlans/).
124
- */
125
- async getStandardPlans(
126
- { platform, requestHeaders } = { requestHeaders: {} },
127
- { responseHeaders } = { responseHeaders: false }
128
- ) {
129
- const { error } = BillingPublicValidator.getStandardPlans().validate(
130
- { platform },
131
- { abortEarly: false, allowUnknown: true }
132
- );
133
- if (error) {
134
- return Promise.reject(new FDKClientValidationError(error));
135
- }
136
-
137
- // Showing warrnings if extra unknown parameters are found
138
- const {
139
- error: warrning,
140
- } = BillingPublicValidator.getStandardPlans().validate(
141
- { platform },
142
- { abortEarly: false, allowUnknown: false }
143
- );
144
- if (warrning) {
145
- Logger({
146
- level: "WARN",
147
- message: `Parameter Validation warrnings for public > Billing > getStandardPlans \n ${warrning}`,
148
- });
149
- }
150
-
151
- const query_params = {};
152
- query_params["platform"] = platform;
153
-
154
- const xHeaders = {};
155
-
156
- const response = await PublicAPIClient.execute(
157
- this._conf,
158
- "get",
159
- constructUrl({
160
- url: this._urls["getStandardPlans"],
161
- params: {},
162
- }),
163
- query_params,
164
- undefined,
165
- { ...xHeaders, ...requestHeaders },
166
- { responseHeaders }
167
- );
168
-
169
- let responseData = response;
170
- if (responseHeaders) {
171
- responseData = response[0];
172
- }
173
-
174
- const {
175
- error: res_error,
176
- } = BillingPublicModel.DetailList().validate(responseData, {
177
- abortEarly: false,
178
- allowUnknown: true,
179
- });
180
-
181
- if (res_error) {
182
- if (this._conf.options.strictResponseCheck === true) {
183
- return Promise.reject(new FDKResponseValidationError(res_error));
184
- } else {
185
- Logger({
186
- level: "WARN",
187
- message: `Response Validation Warnings for public > Billing > getStandardPlans \n ${res_error}`,
188
- });
189
- }
190
- }
191
-
192
- return response;
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
- }
267
- }
268
-
269
- module.exports = Billing;
@@ -1,434 +0,0 @@
1
- export = BillingPublicModel;
2
- /**
3
- * @typedef ResourceNotFound
4
- * @property {string} [message] - Resource not found with {id}
5
- */
6
- /**
7
- * @typedef PlanRecurring
8
- * @property {string} [interval]
9
- * @property {number} [interval_count]
10
- * @property {string} [aggregate_usage]
11
- * @property {string} [usage_type]
12
- */
13
- /**
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]
93
- * @property {PlanRecurring} [recurring]
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]
99
- * @property {string} [plan_group]
100
- * @property {string[]} [tag_lines]
101
- * @property {string} [currency]
102
- * @property {boolean} [is_active]
103
- * @property {boolean} [is_visible]
104
- * @property {number} [trial_period]
105
- * @property {string[]} [addons]
106
- * @property {string[]} [tags]
107
- * @property {string} [type]
108
- * @property {string} [country]
109
- * @property {string} [_id]
110
- * @property {string} [name]
111
- * @property {string} [description]
112
- * @property {number} [amount]
113
- * @property {string} [product_suite_id]
114
- * @property {string} [created_at]
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]
122
- */
123
- /**
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
165
- */
166
- declare class BillingPublicModel {
167
- }
168
- declare namespace BillingPublicModel {
169
- export { ResourceNotFound, PlanRecurring, DetailList, PlanTaxation, OneTimeFees, CreditLine, PlanMeta, FeatureConfig, PlanConfig, FreeTier, TransformQuantity, ComponentsSchema, PlanDetails, Recurring, Taxation, PlanList };
170
- }
171
- /** @returns {ResourceNotFound} */
172
- declare function ResourceNotFound(): ResourceNotFound;
173
- type ResourceNotFound = {
174
- /**
175
- * - Resource not found with {id}
176
- */
177
- message?: string;
178
- };
179
- /** @returns {PlanRecurring} */
180
- declare function PlanRecurring(): PlanRecurring;
181
- type PlanRecurring = {
182
- interval?: string;
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[];
192
- };
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;
278
- recurring?: PlanRecurring;
279
- is_trial_plan?: boolean;
280
- company_ids?: string[];
281
- created_by?: string;
282
- channel_type?: string;
283
- platform?: string;
284
- plan_group?: string;
285
- tag_lines?: string[];
286
- currency?: string;
287
- is_active?: boolean;
288
- is_visible?: boolean;
289
- trial_period?: number;
290
- addons?: string[];
291
- tags?: string[];
292
- type?: string;
293
- country?: string;
294
- _id?: string;
295
- name?: string;
296
- description?: string;
297
- amount?: number;
298
- product_suite_id?: string;
299
- created_at?: string;
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[];
307
- };
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;
434
- };