@gofynd/fdk-client-javascript 1.4.8-beta.2 → 1.4.8

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 (198) 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 +1206 -281
  36. package/sdk/application/Content/ContentApplicationModel.js +342 -276
  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 +1401 -324
  58. package/sdk/application/Order/OrderApplicationModel.js +392 -316
  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 +75 -8
  97. package/sdk/partner/Logistics/LogisticsPartnerModel.js +59 -7
  98. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +2 -2
  99. package/sdk/partner/PartnerClient.d.ts +8 -0
  100. package/sdk/partner/PartnerClient.js +14 -0
  101. package/sdk/partner/Theme/ThemePartnerClient.d.ts +20 -0
  102. package/sdk/partner/Theme/ThemePartnerClient.js +158 -0
  103. package/sdk/partner/Theme/ThemePartnerModel.d.ts +45 -6
  104. package/sdk/partner/Theme/ThemePartnerModel.js +33 -4
  105. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +2 -0
  106. package/sdk/partner/Theme/ThemePartnerValidator.js +14 -0
  107. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +28 -7
  108. package/sdk/partner/Webhook/WebhookPartnerModel.js +7 -7
  109. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +28 -7
  110. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +7 -7
  111. package/sdk/platform/Billing/BillingPlatformClient.d.ts +21 -10
  112. package/sdk/platform/Billing/BillingPlatformClient.js +167 -83
  113. package/sdk/platform/Billing/BillingPlatformModel.d.ts +2849 -565
  114. package/sdk/platform/Billing/BillingPlatformModel.js +935 -556
  115. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +30 -14
  116. package/sdk/platform/Billing/BillingPlatformValidator.js +31 -16
  117. package/sdk/platform/Cart/CartPlatformModel.d.ts +28 -7
  118. package/sdk/platform/Cart/CartPlatformModel.js +8 -8
  119. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1 -1
  120. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +20 -0
  121. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +37 -0
  122. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +16 -0
  123. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +12 -2
  124. package/sdk/platform/Catalog/CatalogPlatformClient.js +41 -1
  125. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +46 -12
  126. package/sdk/platform/Catalog/CatalogPlatformModel.js +14 -11
  127. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +40 -0
  128. package/sdk/platform/Catalog/CatalogPlatformValidator.js +17 -0
  129. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +28 -7
  130. package/sdk/platform/Communication/CommunicationPlatformModel.js +7 -7
  131. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -7
  132. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +7 -7
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +0 -97
  134. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +77 -782
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +24 -701
  136. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +7 -539
  137. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +1 -183
  138. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +0 -134
  139. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -10
  140. package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -79
  141. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -15
  142. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -13
  143. package/sdk/platform/Content/ContentPlatformModel.d.ts +60 -17
  144. package/sdk/platform/Content/ContentPlatformModel.js +30 -15
  145. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +28 -7
  146. package/sdk/platform/Discount/DiscountPlatformModel.js +7 -7
  147. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +127 -25
  148. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +37 -25
  149. package/sdk/platform/Finance/FinancePlatformClient.d.ts +30 -30
  150. package/sdk/platform/Finance/FinancePlatformClient.js +30 -30
  151. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1601 -348
  152. package/sdk/platform/Finance/FinancePlatformModel.js +488 -352
  153. package/sdk/platform/Lead/LeadPlatformModel.d.ts +28 -7
  154. package/sdk/platform/Lead/LeadPlatformModel.js +7 -7
  155. package/sdk/platform/Order/OrderPlatformClient.d.ts +22 -0
  156. package/sdk/platform/Order/OrderPlatformClient.js +165 -0
  157. package/sdk/platform/Order/OrderPlatformModel.d.ts +631 -39
  158. package/sdk/platform/Order/OrderPlatformModel.js +367 -41
  159. package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -1
  160. package/sdk/platform/Order/OrderPlatformValidator.js +28 -0
  161. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +30 -9
  162. package/sdk/platform/Payment/PaymentPlatformModel.js +9 -9
  163. package/sdk/platform/PlatformClient.d.ts +8 -0
  164. package/sdk/platform/PlatformClient.js +14 -0
  165. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +28 -7
  166. package/sdk/platform/Rewards/RewardsPlatformModel.js +7 -7
  167. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +12 -9
  168. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +12 -9
  169. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +1 -1
  170. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +4 -4
  171. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +139 -22
  172. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +98 -21
  173. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
  174. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
  175. package/sdk/platform/Share/SharePlatformModel.d.ts +28 -7
  176. package/sdk/platform/Share/SharePlatformModel.js +7 -7
  177. package/sdk/platform/Theme/ThemePlatformModel.d.ts +18 -5
  178. package/sdk/platform/Theme/ThemePlatformModel.js +7 -4
  179. package/sdk/platform/User/UserPlatformModel.d.ts +18 -20
  180. package/sdk/platform/User/UserPlatformModel.js +9 -11
  181. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +54 -33
  182. package/sdk/platform/Webhook/WebhookPlatformModel.js +33 -33
  183. package/sdk/public/Billing/BillingPublicClient.d.ts +11 -0
  184. package/sdk/public/Billing/BillingPublicClient.js +80 -0
  185. package/sdk/public/Billing/BillingPublicModel.d.ts +584 -99
  186. package/sdk/public/Billing/BillingPublicModel.js +252 -87
  187. package/sdk/public/Billing/BillingPublicValidator.d.ts +10 -1
  188. package/sdk/public/Billing/BillingPublicValidator.js +12 -0
  189. package/sdk/public/PublicClient.d.ts +0 -2
  190. package/sdk/public/PublicClient.js +0 -4
  191. package/sdk/public/index.d.ts +0 -1
  192. package/sdk/public/index.js +0 -2
  193. package/sdk/public/Inventory/InventoryPublicClient.d.ts +0 -87
  194. package/sdk/public/Inventory/InventoryPublicClient.js +0 -529
  195. package/sdk/public/Inventory/InventoryPublicModel.d.ts +0 -393
  196. package/sdk/public/Inventory/InventoryPublicModel.js +0 -448
  197. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +0 -91
  198. package/sdk/public/Inventory/InventoryPublicValidator.js +0 -85
@@ -8,12 +8,12 @@ export = WebhookPlatformModel;
8
8
  */
9
9
  /**
10
10
  * @typedef EventProcessRequest
11
- * @property {string} search_text
11
+ * @property {string} [search_text]
12
12
  * @property {string} end_date
13
13
  * @property {string} start_date
14
- * @property {number[]} subscriber_ids
15
- * @property {string} status
16
- * @property {Event[]} event
14
+ * @property {number[]} [subscriber_ids]
15
+ * @property {string} [status]
16
+ * @property {Event[]} [event]
17
17
  */
18
18
  /**
19
19
  * @typedef DownloadReportResponse
@@ -41,13 +41,13 @@ export = WebhookPlatformModel;
41
41
  */
42
42
  /**
43
43
  * @typedef Page
44
- * @property {number} [item_total]
45
- * @property {string} [next_id]
46
- * @property {boolean} [has_previous]
47
- * @property {boolean} [has_next]
48
- * @property {number} [current]
49
- * @property {string} type
50
- * @property {number} [size]
44
+ * @property {number} [item_total] - The total number of items on the page.
45
+ * @property {string} [next_id] - The identifier for the next page.
46
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
47
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
48
+ * @property {number} [current] - The current page number.
49
+ * @property {string} type - The type of the page, such as 'PageType'.
50
+ * @property {number} [size] - The number of items per page.
51
51
  */
52
52
  /**
53
53
  * @typedef PingWebhook
@@ -200,7 +200,7 @@ export = WebhookPlatformModel;
200
200
  */
201
201
  /**
202
202
  * @typedef SubscriberConfigPostRequestV2
203
- * @property {string} [name]
203
+ * @property {string} name
204
204
  * @property {string} [webhook_url]
205
205
  * @property {string} provider
206
206
  * @property {Association} association
@@ -208,7 +208,7 @@ export = WebhookPlatformModel;
208
208
  * @property {SubscriberStatus} status
209
209
  * @property {string} email_id
210
210
  * @property {AuthMeta} [auth_meta]
211
- * @property {Events[]} [events]
211
+ * @property {Events[]} events
212
212
  */
213
213
  /**
214
214
  * @typedef SubscriberConfigUpdateRequestV2
@@ -216,16 +216,16 @@ export = WebhookPlatformModel;
216
216
  * @property {string} [name]
217
217
  * @property {string} [webhook_url]
218
218
  * @property {string} provider
219
- * @property {Association} association
219
+ * @property {Association} [association]
220
220
  * @property {Object} [custom_headers]
221
221
  * @property {SubscriberStatus} status
222
- * @property {string} email_id
222
+ * @property {string} [email_id]
223
223
  * @property {AuthMeta} [auth_meta]
224
224
  * @property {Events[]} [events]
225
225
  */
226
226
  /**
227
227
  * @typedef SubscriberConfigPost
228
- * @property {string} [name]
228
+ * @property {string} name
229
229
  * @property {string} webhook_url
230
230
  * @property {Association} association
231
231
  * @property {Object} [custom_headers]
@@ -238,11 +238,11 @@ export = WebhookPlatformModel;
238
238
  * @typedef SubscriberConfigUpdate
239
239
  * @property {number} id
240
240
  * @property {string} [name]
241
- * @property {string} webhook_url
242
- * @property {Association} association
241
+ * @property {string} [webhook_url]
242
+ * @property {Association} [association]
243
243
  * @property {Object} [custom_headers]
244
- * @property {SubscriberStatus} status
245
- * @property {string} email_id
244
+ * @property {SubscriberStatus} [status]
245
+ * @property {string} [email_id]
246
246
  * @property {AuthMeta} [auth_meta]
247
247
  * @property {number[]} event_id
248
248
  */
@@ -285,12 +285,12 @@ type Event = {
285
285
  /** @returns {EventProcessRequest} */
286
286
  declare function EventProcessRequest(): EventProcessRequest;
287
287
  type EventProcessRequest = {
288
- search_text: string;
288
+ search_text?: string;
289
289
  end_date: string;
290
290
  start_date: string;
291
- subscriber_ids: number[];
292
- status: string;
293
- event: Event[];
291
+ subscriber_ids?: number[];
292
+ status?: string;
293
+ event?: Event[];
294
294
  };
295
295
  /** @returns {DownloadReportResponse} */
296
296
  declare function DownloadReportResponse(): DownloadReportResponse;
@@ -352,12 +352,33 @@ type EventProcessReportObject = {
352
352
  /** @returns {Page} */
353
353
  declare function Page(): Page;
354
354
  type Page = {
355
+ /**
356
+ * - The total number of items on the page.
357
+ */
355
358
  item_total?: number;
359
+ /**
360
+ * - The identifier for the next page.
361
+ */
356
362
  next_id?: string;
363
+ /**
364
+ * - Indicates whether there is a previous page.
365
+ */
357
366
  has_previous?: boolean;
367
+ /**
368
+ * - Indicates whether there is a next page.
369
+ */
358
370
  has_next?: boolean;
371
+ /**
372
+ * - The current page number.
373
+ */
359
374
  current?: number;
375
+ /**
376
+ * - The type of the page, such as 'PageType'.
377
+ */
360
378
  type: string;
379
+ /**
380
+ * - The number of items per page.
381
+ */
361
382
  size?: number;
362
383
  };
363
384
  /** @returns {PingWebhook} */
@@ -608,7 +629,7 @@ type Events = {
608
629
  /** @returns {SubscriberConfigPostRequestV2} */
609
630
  declare function SubscriberConfigPostRequestV2(): SubscriberConfigPostRequestV2;
610
631
  type SubscriberConfigPostRequestV2 = {
611
- name?: string;
632
+ name: string;
612
633
  webhook_url?: string;
613
634
  provider: string;
614
635
  association: Association;
@@ -616,7 +637,7 @@ type SubscriberConfigPostRequestV2 = {
616
637
  status: SubscriberStatus;
617
638
  email_id: string;
618
639
  auth_meta?: AuthMeta;
619
- events?: Events[];
640
+ events: Events[];
620
641
  };
621
642
  /** @returns {SubscriberConfigUpdateRequestV2} */
622
643
  declare function SubscriberConfigUpdateRequestV2(): SubscriberConfigUpdateRequestV2;
@@ -625,17 +646,17 @@ type SubscriberConfigUpdateRequestV2 = {
625
646
  name?: string;
626
647
  webhook_url?: string;
627
648
  provider: string;
628
- association: Association;
649
+ association?: Association;
629
650
  custom_headers?: any;
630
651
  status: SubscriberStatus;
631
- email_id: string;
652
+ email_id?: string;
632
653
  auth_meta?: AuthMeta;
633
654
  events?: Events[];
634
655
  };
635
656
  /** @returns {SubscriberConfigPost} */
636
657
  declare function SubscriberConfigPost(): SubscriberConfigPost;
637
658
  type SubscriberConfigPost = {
638
- name?: string;
659
+ name: string;
639
660
  webhook_url: string;
640
661
  association: Association;
641
662
  custom_headers?: any;
@@ -649,11 +670,11 @@ declare function SubscriberConfigUpdate(): SubscriberConfigUpdate;
649
670
  type SubscriberConfigUpdate = {
650
671
  id: number;
651
672
  name?: string;
652
- webhook_url: string;
653
- association: Association;
673
+ webhook_url?: string;
674
+ association?: Association;
654
675
  custom_headers?: any;
655
- status: SubscriberStatus;
656
- email_id: string;
676
+ status?: SubscriberStatus;
677
+ email_id?: string;
657
678
  auth_meta?: AuthMeta;
658
679
  event_id: number[];
659
680
  };
@@ -10,12 +10,12 @@ const Joi = require("joi");
10
10
 
11
11
  /**
12
12
  * @typedef EventProcessRequest
13
- * @property {string} search_text
13
+ * @property {string} [search_text]
14
14
  * @property {string} end_date
15
15
  * @property {string} start_date
16
- * @property {number[]} subscriber_ids
17
- * @property {string} status
18
- * @property {Event[]} event
16
+ * @property {number[]} [subscriber_ids]
17
+ * @property {string} [status]
18
+ * @property {Event[]} [event]
19
19
  */
20
20
 
21
21
  /**
@@ -47,13 +47,13 @@ const Joi = require("joi");
47
47
 
48
48
  /**
49
49
  * @typedef Page
50
- * @property {number} [item_total]
51
- * @property {string} [next_id]
52
- * @property {boolean} [has_previous]
53
- * @property {boolean} [has_next]
54
- * @property {number} [current]
55
- * @property {string} type
56
- * @property {number} [size]
50
+ * @property {number} [item_total] - The total number of items on the page.
51
+ * @property {string} [next_id] - The identifier for the next page.
52
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
53
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
54
+ * @property {number} [current] - The current page number.
55
+ * @property {string} type - The type of the page, such as 'PageType'.
56
+ * @property {number} [size] - The number of items per page.
57
57
  */
58
58
 
59
59
  /**
@@ -228,7 +228,7 @@ const Joi = require("joi");
228
228
 
229
229
  /**
230
230
  * @typedef SubscriberConfigPostRequestV2
231
- * @property {string} [name]
231
+ * @property {string} name
232
232
  * @property {string} [webhook_url]
233
233
  * @property {string} provider
234
234
  * @property {Association} association
@@ -236,7 +236,7 @@ const Joi = require("joi");
236
236
  * @property {SubscriberStatus} status
237
237
  * @property {string} email_id
238
238
  * @property {AuthMeta} [auth_meta]
239
- * @property {Events[]} [events]
239
+ * @property {Events[]} events
240
240
  */
241
241
 
242
242
  /**
@@ -245,17 +245,17 @@ const Joi = require("joi");
245
245
  * @property {string} [name]
246
246
  * @property {string} [webhook_url]
247
247
  * @property {string} provider
248
- * @property {Association} association
248
+ * @property {Association} [association]
249
249
  * @property {Object} [custom_headers]
250
250
  * @property {SubscriberStatus} status
251
- * @property {string} email_id
251
+ * @property {string} [email_id]
252
252
  * @property {AuthMeta} [auth_meta]
253
253
  * @property {Events[]} [events]
254
254
  */
255
255
 
256
256
  /**
257
257
  * @typedef SubscriberConfigPost
258
- * @property {string} [name]
258
+ * @property {string} name
259
259
  * @property {string} webhook_url
260
260
  * @property {Association} association
261
261
  * @property {Object} [custom_headers]
@@ -269,11 +269,11 @@ const Joi = require("joi");
269
269
  * @typedef SubscriberConfigUpdate
270
270
  * @property {number} id
271
271
  * @property {string} [name]
272
- * @property {string} webhook_url
273
- * @property {Association} association
272
+ * @property {string} [webhook_url]
273
+ * @property {Association} [association]
274
274
  * @property {Object} [custom_headers]
275
- * @property {SubscriberStatus} status
276
- * @property {string} email_id
275
+ * @property {SubscriberStatus} [status]
276
+ * @property {string} [email_id]
277
277
  * @property {AuthMeta} [auth_meta]
278
278
  * @property {number[]} event_id
279
279
  */
@@ -318,12 +318,12 @@ class WebhookPlatformModel {
318
318
  /** @returns {EventProcessRequest} */
319
319
  static EventProcessRequest() {
320
320
  return Joi.object({
321
- search_text: Joi.string().allow("").required(),
321
+ search_text: Joi.string().allow(""),
322
322
  end_date: Joi.string().allow("").required(),
323
323
  start_date: Joi.string().allow("").required(),
324
- subscriber_ids: Joi.array().items(Joi.number()).required(),
325
- status: Joi.string().allow("").required(),
326
- event: Joi.array().items(WebhookPlatformModel.Event()).required(),
324
+ subscriber_ids: Joi.array().items(Joi.number()),
325
+ status: Joi.string().allow(""),
326
+ event: Joi.array().items(WebhookPlatformModel.Event()),
327
327
  });
328
328
  }
329
329
 
@@ -582,7 +582,7 @@ class WebhookPlatformModel {
582
582
  /** @returns {SubscriberConfigPostRequestV2} */
583
583
  static SubscriberConfigPostRequestV2() {
584
584
  return Joi.object({
585
- name: Joi.string().allow(""),
585
+ name: Joi.string().allow("").required(),
586
586
  webhook_url: Joi.string().allow(""),
587
587
  provider: Joi.string().allow("").required(),
588
588
  association: WebhookPlatformModel.Association().required(),
@@ -590,7 +590,7 @@ class WebhookPlatformModel {
590
590
  status: WebhookPlatformModel.SubscriberStatus().required(),
591
591
  email_id: Joi.string().allow("").required(),
592
592
  auth_meta: WebhookPlatformModel.AuthMeta(),
593
- events: Joi.array().items(WebhookPlatformModel.Events()),
593
+ events: Joi.array().items(WebhookPlatformModel.Events()).required(),
594
594
  });
595
595
  }
596
596
 
@@ -601,10 +601,10 @@ class WebhookPlatformModel {
601
601
  name: Joi.string().allow(""),
602
602
  webhook_url: Joi.string().allow(""),
603
603
  provider: Joi.string().allow("").required(),
604
- association: WebhookPlatformModel.Association().required(),
604
+ association: WebhookPlatformModel.Association(),
605
605
  custom_headers: Joi.any(),
606
606
  status: WebhookPlatformModel.SubscriberStatus().required(),
607
- email_id: Joi.string().allow("").required(),
607
+ email_id: Joi.string().allow(""),
608
608
  auth_meta: WebhookPlatformModel.AuthMeta(),
609
609
  events: Joi.array().items(WebhookPlatformModel.Events()),
610
610
  });
@@ -613,7 +613,7 @@ class WebhookPlatformModel {
613
613
  /** @returns {SubscriberConfigPost} */
614
614
  static SubscriberConfigPost() {
615
615
  return Joi.object({
616
- name: Joi.string().allow(""),
616
+ name: Joi.string().allow("").required(),
617
617
  webhook_url: Joi.string().allow("").required(),
618
618
  association: WebhookPlatformModel.Association().required(),
619
619
  custom_headers: Joi.any(),
@@ -629,11 +629,11 @@ class WebhookPlatformModel {
629
629
  return Joi.object({
630
630
  id: Joi.number().required(),
631
631
  name: Joi.string().allow(""),
632
- webhook_url: Joi.string().allow("").required(),
633
- association: WebhookPlatformModel.Association().required(),
632
+ webhook_url: Joi.string().allow(""),
633
+ association: WebhookPlatformModel.Association(),
634
634
  custom_headers: Joi.any(),
635
- status: WebhookPlatformModel.SubscriberStatus().required(),
636
- email_id: Joi.string().allow("").required(),
635
+ status: WebhookPlatformModel.SubscriberStatus(),
636
+ email_id: Joi.string().allow(""),
637
637
  auth_meta: WebhookPlatformModel.AuthMeta(),
638
638
  event_id: Joi.array().items(Joi.number()).required(),
639
639
  });
@@ -5,6 +5,7 @@ declare class Billing {
5
5
  _relativeUrls: {
6
6
  getPlanDetails: string;
7
7
  getStandardPlans: string;
8
+ getTenureConfig: string;
8
9
  planList: string;
9
10
  };
10
11
  _urls: {};
@@ -30,6 +31,16 @@ declare class Billing {
30
31
  * @description: Get Standard/Public Plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getStandardPlans/).
31
32
  */
32
33
  getStandardPlans({ platform, requestHeaders }?: BillingPublicValidator.GetStandardPlansParam, { responseHeaders }?: object): Promise<BillingPublicModel.DetailList>;
34
+ /**
35
+ * @param {BillingPublicValidator.GetTenureConfigParam} arg - Arg object.
36
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
37
+ * @param {import("../PublicAPIClient").Options} - Options
38
+ * @returns {Promise<BillingPublicModel.TenureConfigResponse>} - Success response
39
+ * @name getTenureConfig
40
+ * @summary: Get Tenure Configuration
41
+ * @description: Retrieve the tenure configuration for a specific country. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getTenureConfig/).
42
+ */
43
+ getTenureConfig({ countryCode, requestHeaders }?: BillingPublicValidator.GetTenureConfigParam, { responseHeaders }?: object): Promise<BillingPublicModel.TenureConfigResponse>;
33
44
  /**
34
45
  * @param {BillingPublicValidator.PlanListParam} arg - Arg object.
35
46
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -16,6 +16,8 @@ class Billing {
16
16
  this._relativeUrls = {
17
17
  getPlanDetails: "/service/public/billing/v1.0/plan/details/{plan_id}",
18
18
  getStandardPlans: "/service/public/billing/v1.0/plan/detailed-list/",
19
+ getTenureConfig:
20
+ "/service/public/billing/v1.0/tenure-config/{country_code}",
19
21
  planList: "/service/public/billing/v1.0/plan/list",
20
22
  };
21
23
  this._urls = Object.entries(this._relativeUrls).reduce(
@@ -192,6 +194,84 @@ class Billing {
192
194
  return response;
193
195
  }
194
196
 
197
+ /**
198
+ * @param {BillingPublicValidator.GetTenureConfigParam} arg - Arg object.
199
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
200
+ * @param {import("../PublicAPIClient").Options} - Options
201
+ * @returns {Promise<BillingPublicModel.TenureConfigResponse>} - Success response
202
+ * @name getTenureConfig
203
+ * @summary: Get Tenure Configuration
204
+ * @description: Retrieve the tenure configuration for a specific country. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getTenureConfig/).
205
+ */
206
+ async getTenureConfig(
207
+ { countryCode, requestHeaders } = { requestHeaders: {} },
208
+ { responseHeaders } = { responseHeaders: false }
209
+ ) {
210
+ const { error } = BillingPublicValidator.getTenureConfig().validate(
211
+ { countryCode },
212
+ { abortEarly: false, allowUnknown: true }
213
+ );
214
+ if (error) {
215
+ return Promise.reject(new FDKClientValidationError(error));
216
+ }
217
+
218
+ // Showing warrnings if extra unknown parameters are found
219
+ const {
220
+ error: warrning,
221
+ } = BillingPublicValidator.getTenureConfig().validate(
222
+ { countryCode },
223
+ { abortEarly: false, allowUnknown: false }
224
+ );
225
+ if (warrning) {
226
+ Logger({
227
+ level: "WARN",
228
+ message: `Parameter Validation warrnings for public > Billing > getTenureConfig \n ${warrning}`,
229
+ });
230
+ }
231
+
232
+ const query_params = {};
233
+
234
+ const xHeaders = {};
235
+
236
+ const response = await PublicAPIClient.execute(
237
+ this._conf,
238
+ "get",
239
+ constructUrl({
240
+ url: this._urls["getTenureConfig"],
241
+ params: { countryCode },
242
+ }),
243
+ query_params,
244
+ undefined,
245
+ { ...xHeaders, ...requestHeaders },
246
+ { responseHeaders }
247
+ );
248
+
249
+ let responseData = response;
250
+ if (responseHeaders) {
251
+ responseData = response[0];
252
+ }
253
+
254
+ const {
255
+ error: res_error,
256
+ } = BillingPublicModel.TenureConfigResponse().validate(responseData, {
257
+ abortEarly: false,
258
+ allowUnknown: true,
259
+ });
260
+
261
+ if (res_error) {
262
+ if (this._conf.options.strictResponseCheck === true) {
263
+ return Promise.reject(new FDKResponseValidationError(res_error));
264
+ } else {
265
+ Logger({
266
+ level: "WARN",
267
+ message: `Response Validation Warnings for public > Billing > getTenureConfig \n ${res_error}`,
268
+ });
269
+ }
270
+ }
271
+
272
+ return response;
273
+ }
274
+
195
275
  /**
196
276
  * @param {BillingPublicValidator.PlanListParam} arg - Arg object.
197
277
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`