@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
@@ -74,6 +74,17 @@ const Joi = require("joi");
74
74
  * @property {string} [status]
75
75
  */
76
76
 
77
+ /**
78
+ * @typedef ExtensionPreviewRequest
79
+ * @property {string} [application_id] - Application ID
80
+ * @property {string} [section_preview_hash] - Hash for the section preview
81
+ */
82
+
83
+ /**
84
+ * @typedef ExtensionPreviewResponse
85
+ * @property {string} [message]
86
+ */
87
+
77
88
  /**
78
89
  * @typedef PublishExtensionSectionResponse
79
90
  * @property {SectionsResponse} [sections]
@@ -120,7 +131,7 @@ const Joi = require("joi");
120
131
 
121
132
  /**
122
133
  * @typedef Action
123
- * @property {string} [type]
134
+ * @property {string} [type] - Type of action to be taken e.g, page.
124
135
  * @property {ActionPage} [page]
125
136
  * @property {ActionPage} [popup]
126
137
  */
@@ -675,9 +686,9 @@ const Joi = require("joi");
675
686
 
676
687
  /**
677
688
  * @typedef ActionPage
678
- * @property {Object} [params]
679
- * @property {Object} [query]
680
- * @property {string} [url]
689
+ * @property {Object} [params] - Parameters that should be considered in path.
690
+ * @property {Object} [query] - Query parameter if any to be added to the action.
691
+ * @property {string} [url] - The URL for the action.
681
692
  * @property {PageType} type
682
693
  */
683
694
 
@@ -693,6 +704,7 @@ const Joi = require("joi");
693
704
  * | "category"
694
705
  * | "collection"
695
706
  * | "collections"
707
+ * | "custom"
696
708
  * | "contact-us"
697
709
  * | "external"
698
710
  * | "faq"
@@ -825,6 +837,21 @@ class ThemePartnerModel {
825
837
  });
826
838
  }
827
839
 
840
+ /** @returns {ExtensionPreviewRequest} */
841
+ static ExtensionPreviewRequest() {
842
+ return Joi.object({
843
+ application_id: Joi.string().allow(""),
844
+ section_preview_hash: Joi.string().allow(""),
845
+ });
846
+ }
847
+
848
+ /** @returns {ExtensionPreviewResponse} */
849
+ static ExtensionPreviewResponse() {
850
+ return Joi.object({
851
+ message: Joi.string().allow(""),
852
+ });
853
+ }
854
+
828
855
  /** @returns {PublishExtensionSectionResponse} */
829
856
  static PublishExtensionSectionResponse() {
830
857
  return Joi.object({
@@ -1620,6 +1647,8 @@ class ThemePartnerModel {
1620
1647
 
1621
1648
  "collections",
1622
1649
 
1650
+ "custom",
1651
+
1623
1652
  "contact-us",
1624
1653
 
1625
1654
  "external",
@@ -19,6 +19,8 @@ declare class ThemeValidator {
19
19
  static createNewThemeInOrganization(): any;
20
20
  static createExtensionSectionDraft(): any;
21
21
  static publishExtensionSections(): any;
22
+ static applyExtensionPreview(): any;
23
+ static removeExtensionPreview(): any;
22
24
  static getThemeRejectionReasons(): any;
23
25
  static getThemeVersions(): any;
24
26
  static createTheme(): any;
@@ -153,6 +153,20 @@ class ThemeValidator {
153
153
  }).required();
154
154
  }
155
155
 
156
+ static applyExtensionPreview() {
157
+ return Joi.object({
158
+ extensionSectionId: Joi.string().allow("").required(),
159
+ body: ThemeModel.ExtensionPreviewRequest().required(),
160
+ }).required();
161
+ }
162
+
163
+ static removeExtensionPreview() {
164
+ return Joi.object({
165
+ extensionSectionId: Joi.string().allow("").required(),
166
+ body: ThemeModel.ExtensionPreviewRequest().required(),
167
+ }).required();
168
+ }
169
+
156
170
  static getThemeRejectionReasons() {
157
171
  return Joi.object({
158
172
  themeId: Joi.string().allow("").required(),
@@ -179,13 +179,13 @@ export = WebhookPartnerModel;
179
179
  */
180
180
  /**
181
181
  * @typedef Page
182
- * @property {number} [item_total]
183
- * @property {string} [next_id]
184
- * @property {boolean} [has_previous]
185
- * @property {boolean} [has_next]
186
- * @property {number} [current]
187
- * @property {string} type
188
- * @property {number} [size]
182
+ * @property {number} [item_total] - The total number of items on the page.
183
+ * @property {string} [next_id] - The identifier for the next page.
184
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
185
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
186
+ * @property {number} [current] - The current page number.
187
+ * @property {string} type - The type of the page, such as 'PageType'.
188
+ * @property {number} [size] - The number of items per page.
189
189
  */
190
190
  /**
191
191
  * @typedef DeliveryEventLevelSchema
@@ -516,12 +516,33 @@ type EventProcessReportObject = {
516
516
  /** @returns {Page} */
517
517
  declare function Page(): Page;
518
518
  type Page = {
519
+ /**
520
+ * - The total number of items on the page.
521
+ */
519
522
  item_total?: number;
523
+ /**
524
+ * - The identifier for the next page.
525
+ */
520
526
  next_id?: string;
527
+ /**
528
+ * - Indicates whether there is a previous page.
529
+ */
521
530
  has_previous?: boolean;
531
+ /**
532
+ * - Indicates whether there is a next page.
533
+ */
522
534
  has_next?: boolean;
535
+ /**
536
+ * - The current page number.
537
+ */
523
538
  current?: number;
539
+ /**
540
+ * - The type of the page, such as 'PageType'.
541
+ */
524
542
  type: string;
543
+ /**
544
+ * - The number of items per page.
545
+ */
525
546
  size?: number;
526
547
  };
527
548
  /** @returns {DeliveryEventLevelSchema} */
@@ -205,13 +205,13 @@ const Joi = require("joi");
205
205
 
206
206
  /**
207
207
  * @typedef Page
208
- * @property {number} [item_total]
209
- * @property {string} [next_id]
210
- * @property {boolean} [has_previous]
211
- * @property {boolean} [has_next]
212
- * @property {number} [current]
213
- * @property {string} type
214
- * @property {number} [size]
208
+ * @property {number} [item_total] - The total number of items on the page.
209
+ * @property {string} [next_id] - The identifier for the next page.
210
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
211
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
212
+ * @property {number} [current] - The current page number.
213
+ * @property {string} type - The type of the page, such as 'PageType'.
214
+ * @property {number} [size] - The number of items per page.
215
215
  */
216
216
 
217
217
  /**
@@ -1,13 +1,13 @@
1
1
  export = AnalyticsPlatformModel;
2
2
  /**
3
3
  * @typedef Page
4
- * @property {number} [item_total]
5
- * @property {string} [next_id]
6
- * @property {boolean} [has_previous]
7
- * @property {boolean} [has_next]
8
- * @property {number} [current]
9
- * @property {string} type
10
- * @property {number} [size]
4
+ * @property {number} [item_total] - The total number of items on the page.
5
+ * @property {string} [next_id] - The identifier for the next page.
6
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
7
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
8
+ * @property {number} [current] - The current page number.
9
+ * @property {string} type - The type of the page, such as 'PageType'.
10
+ * @property {number} [size] - The number of items per page.
11
11
  */
12
12
  /**
13
13
  * @typedef FileDownloadRequestBody
@@ -28,12 +28,33 @@ declare namespace AnalyticsPlatformModel {
28
28
  /** @returns {Page} */
29
29
  declare function Page(): Page;
30
30
  type Page = {
31
+ /**
32
+ * - The total number of items on the page.
33
+ */
31
34
  item_total?: number;
35
+ /**
36
+ * - The identifier for the next page.
37
+ */
32
38
  next_id?: string;
39
+ /**
40
+ * - Indicates whether there is a previous page.
41
+ */
33
42
  has_previous?: boolean;
43
+ /**
44
+ * - Indicates whether there is a next page.
45
+ */
34
46
  has_next?: boolean;
47
+ /**
48
+ * - The current page number.
49
+ */
35
50
  current?: number;
51
+ /**
52
+ * - The type of the page, such as 'PageType'.
53
+ */
36
54
  type: string;
55
+ /**
56
+ * - The number of items per page.
57
+ */
37
58
  size?: number;
38
59
  };
39
60
  /** @returns {FileDownloadRequestBody} */
@@ -2,13 +2,13 @@ const Joi = require("joi");
2
2
 
3
3
  /**
4
4
  * @typedef Page
5
- * @property {number} [item_total]
6
- * @property {string} [next_id]
7
- * @property {boolean} [has_previous]
8
- * @property {boolean} [has_next]
9
- * @property {number} [current]
10
- * @property {string} type
11
- * @property {number} [size]
5
+ * @property {number} [item_total] - The total number of items on the page.
6
+ * @property {string} [next_id] - The identifier for the next page.
7
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
8
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
9
+ * @property {number} [current] - The current page number.
10
+ * @property {string} type - The type of the page, such as 'PageType'.
11
+ * @property {number} [size] - The number of items per page.
12
12
  */
13
13
 
14
14
  /**
@@ -63,6 +63,17 @@ declare class Billing {
63
63
  * @description: Generate a one-time charge for specific services or products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createOneTimeCharge/).
64
64
  */
65
65
  createOneTimeCharge({ extensionId, body, requestHeaders }?: BillingPlatformValidator.CreateOneTimeChargeParam, { responseHeaders }?: object): Promise<BillingPlatformModel.CreateOneTimeChargeResponse>;
66
+ /**
67
+ * @param {BillingPlatformValidator.CreateSubscriptionChargeParam} arg - Arg object
68
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
69
+ * @param {import("../PlatformAPIClient").Options} - Options
70
+ * @returns {Promise<BillingPlatformModel.CreateSubscriptionResponse>} -
71
+ * Success response
72
+ * @name createSubscriptionCharge
73
+ * @summary: Initiate subscription billing
74
+ * @description: Register a subscription charge for a seller using your extension. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createSubscriptionCharge/).
75
+ */
76
+ createSubscriptionCharge({ extensionId, body, requestHeaders }?: BillingPlatformValidator.CreateSubscriptionChargeParam, { responseHeaders }?: object): Promise<BillingPlatformModel.CreateSubscriptionResponse>;
66
77
  /**
67
78
  * @param {BillingPlatformValidator.CreditTransactionParam} arg - Arg object
68
79
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -84,6 +95,16 @@ declare class Billing {
84
95
  * @description: Retrieve configuration settings for feature limits in subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/currentAppLimit/).
85
96
  */
86
97
  currentAppLimit({ productSuite, type, requestHeaders }?: BillingPlatformValidator.CurrentAppLimitParam, { responseHeaders }?: object): Promise<BillingPlatformModel.SubscriptionLimit>;
98
+ /**
99
+ * @param {BillingPlatformValidator.CurrentLimitParam} arg - Arg object
100
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
101
+ * @param {import("../PlatformAPIClient").Options} - Options
102
+ * @returns {Promise<BillingPlatformModel.SubscriptionLimit>} - Success response
103
+ * @name currentLimit
104
+ * @summary: Obtain feature limit configurations.
105
+ * @description: Retrieve configuration settings for feature limits in subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/currentLimit/).
106
+ */
107
+ currentLimit({ productSuite, type, requestHeaders }?: BillingPlatformValidator.CurrentLimitParam, { responseHeaders }?: object): Promise<BillingPlatformModel.SubscriptionLimit>;
87
108
  /**
88
109
  * @param {BillingPlatformValidator.GetBankListParam} arg - Arg object
89
110
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -124,16 +145,6 @@ declare class Billing {
124
145
  * @description: Retrieve available enterprise-level subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getEnterprisePlans/).
125
146
  */
126
147
  getEnterprisePlans({ requestHeaders }?: any, { responseHeaders }?: object): Promise<BillingPlatformModel.Plan[]>;
127
- /**
128
- * @param {BillingPlatformValidator.GetFeatureLimitConfigParam} arg - Arg object
129
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
130
- * @param {import("../PlatformAPIClient").Options} - Options
131
- * @returns {Promise<BillingPlatformModel.SubscriptionLimit>} - Success response
132
- * @name getFeatureLimitConfig
133
- * @summary: Obtain feature limit configurations.
134
- * @description: Retrieve configuration settings for feature limits in subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getFeatureLimitConfig/).
135
- */
136
- getFeatureLimitConfig({ productSuite, type, requestHeaders }?: BillingPlatformValidator.GetFeatureLimitConfigParam, { responseHeaders }?: object): Promise<BillingPlatformModel.SubscriptionLimit>;
137
148
  /**
138
149
  * @param {BillingPlatformValidator.GetInvoiceByIdParam} arg - Arg object
139
150
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -501,6 +501,90 @@ class Billing {
501
501
  return response;
502
502
  }
503
503
 
504
+ /**
505
+ * @param {BillingPlatformValidator.CreateSubscriptionChargeParam} arg - Arg object
506
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
507
+ * @param {import("../PlatformAPIClient").Options} - Options
508
+ * @returns {Promise<BillingPlatformModel.CreateSubscriptionResponse>} -
509
+ * Success response
510
+ * @name createSubscriptionCharge
511
+ * @summary: Initiate subscription billing
512
+ * @description: Register a subscription charge for a seller using your extension. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createSubscriptionCharge/).
513
+ */
514
+ async createSubscriptionCharge(
515
+ { extensionId, body, requestHeaders } = { requestHeaders: {} },
516
+ { responseHeaders } = { responseHeaders: false }
517
+ ) {
518
+ const {
519
+ error,
520
+ } = BillingPlatformValidator.createSubscriptionCharge().validate(
521
+ {
522
+ extensionId,
523
+ body,
524
+ },
525
+ { abortEarly: false, allowUnknown: true }
526
+ );
527
+ if (error) {
528
+ return Promise.reject(new FDKClientValidationError(error));
529
+ }
530
+
531
+ // Showing warrnings if extra unknown parameters are found
532
+ const {
533
+ error: warrning,
534
+ } = BillingPlatformValidator.createSubscriptionCharge().validate(
535
+ {
536
+ extensionId,
537
+ body,
538
+ },
539
+ { abortEarly: false, allowUnknown: false }
540
+ );
541
+ if (warrning) {
542
+ Logger({
543
+ level: "WARN",
544
+ message: `Parameter Validation warrnings for platform > Billing > createSubscriptionCharge \n ${warrning}`,
545
+ });
546
+ }
547
+
548
+ const query_params = {};
549
+
550
+ const xHeaders = {};
551
+
552
+ const response = await PlatformAPIClient.execute(
553
+ this.config,
554
+ "post",
555
+ `/service/platform/billing/v1.0/company/${this.config.companyId}/extension/${extensionId}/subscription`,
556
+ query_params,
557
+ body,
558
+ { ...xHeaders, ...requestHeaders },
559
+ { responseHeaders }
560
+ );
561
+
562
+ let responseData = response;
563
+ if (responseHeaders) {
564
+ responseData = response[0];
565
+ }
566
+
567
+ const {
568
+ error: res_error,
569
+ } = BillingPlatformModel.CreateSubscriptionResponse().validate(
570
+ responseData,
571
+ { abortEarly: false, allowUnknown: true }
572
+ );
573
+
574
+ if (res_error) {
575
+ if (this.config.options.strictResponseCheck === true) {
576
+ return Promise.reject(new FDKResponseValidationError(res_error));
577
+ } else {
578
+ Logger({
579
+ level: "WARN",
580
+ message: `Response Validation Warnings for platform > Billing > createSubscriptionCharge \n ${res_error}`,
581
+ });
582
+ }
583
+ }
584
+
585
+ return response;
586
+ }
587
+
504
588
  /**
505
589
  * @param {BillingPlatformValidator.CreditTransactionParam} arg - Arg object
506
590
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -700,6 +784,89 @@ class Billing {
700
784
  return response;
701
785
  }
702
786
 
787
+ /**
788
+ * @param {BillingPlatformValidator.CurrentLimitParam} arg - Arg object
789
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
790
+ * @param {import("../PlatformAPIClient").Options} - Options
791
+ * @returns {Promise<BillingPlatformModel.SubscriptionLimit>} - Success response
792
+ * @name currentLimit
793
+ * @summary: Obtain feature limit configurations.
794
+ * @description: Retrieve configuration settings for feature limits in subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/currentLimit/).
795
+ */
796
+ async currentLimit(
797
+ { productSuite, type, requestHeaders } = { requestHeaders: {} },
798
+ { responseHeaders } = { responseHeaders: false }
799
+ ) {
800
+ const { error } = BillingPlatformValidator.currentLimit().validate(
801
+ {
802
+ productSuite,
803
+ type,
804
+ },
805
+ { abortEarly: false, allowUnknown: true }
806
+ );
807
+ if (error) {
808
+ return Promise.reject(new FDKClientValidationError(error));
809
+ }
810
+
811
+ // Showing warrnings if extra unknown parameters are found
812
+ const {
813
+ error: warrning,
814
+ } = BillingPlatformValidator.currentLimit().validate(
815
+ {
816
+ productSuite,
817
+ type,
818
+ },
819
+ { abortEarly: false, allowUnknown: false }
820
+ );
821
+ if (warrning) {
822
+ Logger({
823
+ level: "WARN",
824
+ message: `Parameter Validation warrnings for platform > Billing > currentLimit \n ${warrning}`,
825
+ });
826
+ }
827
+
828
+ const query_params = {};
829
+ query_params["product_suite"] = productSuite;
830
+ query_params["type"] = type;
831
+
832
+ const xHeaders = {};
833
+
834
+ const response = await PlatformAPIClient.execute(
835
+ this.config,
836
+ "get",
837
+ `/service/platform/billing/v1.0/company/${this.config.companyId}/subscription/current-limit`,
838
+ query_params,
839
+ undefined,
840
+ { ...xHeaders, ...requestHeaders },
841
+ { responseHeaders }
842
+ );
843
+
844
+ let responseData = response;
845
+ if (responseHeaders) {
846
+ responseData = response[0];
847
+ }
848
+
849
+ const {
850
+ error: res_error,
851
+ } = BillingPlatformModel.SubscriptionLimit().validate(responseData, {
852
+ abortEarly: false,
853
+ allowUnknown: true,
854
+ });
855
+
856
+ if (res_error) {
857
+ if (this.config.options.strictResponseCheck === true) {
858
+ return Promise.reject(new FDKResponseValidationError(res_error));
859
+ } else {
860
+ Logger({
861
+ level: "WARN",
862
+ message: `Response Validation Warnings for platform > Billing > currentLimit \n ${res_error}`,
863
+ });
864
+ }
865
+ }
866
+
867
+ return response;
868
+ }
869
+
703
870
  /**
704
871
  * @param {BillingPlatformValidator.GetBankListParam} arg - Arg object
705
872
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -998,89 +1165,6 @@ class Billing {
998
1165
  return response;
999
1166
  }
1000
1167
 
1001
- /**
1002
- * @param {BillingPlatformValidator.GetFeatureLimitConfigParam} arg - Arg object
1003
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1004
- * @param {import("../PlatformAPIClient").Options} - Options
1005
- * @returns {Promise<BillingPlatformModel.SubscriptionLimit>} - Success response
1006
- * @name getFeatureLimitConfig
1007
- * @summary: Obtain feature limit configurations.
1008
- * @description: Retrieve configuration settings for feature limits in subscription plans. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getFeatureLimitConfig/).
1009
- */
1010
- async getFeatureLimitConfig(
1011
- { productSuite, type, requestHeaders } = { requestHeaders: {} },
1012
- { responseHeaders } = { responseHeaders: false }
1013
- ) {
1014
- const { error } = BillingPlatformValidator.getFeatureLimitConfig().validate(
1015
- {
1016
- productSuite,
1017
- type,
1018
- },
1019
- { abortEarly: false, allowUnknown: true }
1020
- );
1021
- if (error) {
1022
- return Promise.reject(new FDKClientValidationError(error));
1023
- }
1024
-
1025
- // Showing warrnings if extra unknown parameters are found
1026
- const {
1027
- error: warrning,
1028
- } = BillingPlatformValidator.getFeatureLimitConfig().validate(
1029
- {
1030
- productSuite,
1031
- type,
1032
- },
1033
- { abortEarly: false, allowUnknown: false }
1034
- );
1035
- if (warrning) {
1036
- Logger({
1037
- level: "WARN",
1038
- message: `Parameter Validation warrnings for platform > Billing > getFeatureLimitConfig \n ${warrning}`,
1039
- });
1040
- }
1041
-
1042
- const query_params = {};
1043
- query_params["product_suite"] = productSuite;
1044
- query_params["type"] = type;
1045
-
1046
- const xHeaders = {};
1047
-
1048
- const response = await PlatformAPIClient.execute(
1049
- this.config,
1050
- "get",
1051
- `/service/platform/billing/v1.0/company/${this.config.companyId}/subscription/current-limit`,
1052
- query_params,
1053
- undefined,
1054
- { ...xHeaders, ...requestHeaders },
1055
- { responseHeaders }
1056
- );
1057
-
1058
- let responseData = response;
1059
- if (responseHeaders) {
1060
- responseData = response[0];
1061
- }
1062
-
1063
- const {
1064
- error: res_error,
1065
- } = BillingPlatformModel.SubscriptionLimit().validate(responseData, {
1066
- abortEarly: false,
1067
- allowUnknown: true,
1068
- });
1069
-
1070
- if (res_error) {
1071
- if (this.config.options.strictResponseCheck === true) {
1072
- return Promise.reject(new FDKResponseValidationError(res_error));
1073
- } else {
1074
- Logger({
1075
- level: "WARN",
1076
- message: `Response Validation Warnings for platform > Billing > getFeatureLimitConfig \n ${res_error}`,
1077
- });
1078
- }
1079
- }
1080
-
1081
- return response;
1082
- }
1083
-
1084
1168
  /**
1085
1169
  * @param {BillingPlatformValidator.GetInvoiceByIdParam} arg - Arg object
1086
1170
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`