@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
@@ -9,13 +9,13 @@ const Joi = require("joi");
9
9
 
10
10
  /**
11
11
  * @typedef Page
12
- * @property {number} [item_total]
13
- * @property {string} [next_id]
14
- * @property {boolean} [has_previous]
15
- * @property {boolean} [has_next]
16
- * @property {number} [current]
17
- * @property {string} type
18
- * @property {number} [size]
12
+ * @property {number} [item_total] - The total number of items on the page.
13
+ * @property {string} [next_id] - The identifier for the next page.
14
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
15
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
16
+ * @property {number} [current] - The current page number.
17
+ * @property {string} type - The type of the page, such as 'PageType'.
18
+ * @property {number} [size] - The number of items per page.
19
19
  */
20
20
 
21
21
  /**
@@ -33,13 +33,13 @@ export = LogisticsPartnerModel;
33
33
  */
34
34
  /**
35
35
  * @typedef Page
36
- * @property {number} [item_total]
37
- * @property {string} [next_id]
38
- * @property {boolean} [has_previous]
39
- * @property {boolean} [has_next]
40
- * @property {number} [current]
41
- * @property {string} type
42
- * @property {number} [size]
36
+ * @property {number} [item_total] - The total number of items on the page.
37
+ * @property {string} [next_id] - The identifier for the next page.
38
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
39
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
40
+ * @property {number} [current] - The current page number.
41
+ * @property {string} type - The type of the page, such as 'PageType'.
42
+ * @property {number} [size] - The number of items per page.
43
43
  */
44
44
  /**
45
45
  * @typedef BulkRegionJobSerializer
@@ -76,6 +76,15 @@ export = LogisticsPartnerModel;
76
76
  * @property {string} stage
77
77
  * @property {boolean} is_own_account
78
78
  */
79
+ /**
80
+ * @typedef CourierAccountRequestBody
81
+ * @property {string} extension_id
82
+ * @property {string} [account_id]
83
+ * @property {string} scheme_id
84
+ * @property {boolean} is_self_ship
85
+ * @property {string} stage
86
+ * @property {boolean} is_own_account
87
+ */
79
88
  /**
80
89
  * @typedef CourierPartnerAccountFailureResponse
81
90
  * @property {boolean} success
@@ -108,6 +117,19 @@ export = LogisticsPartnerModel;
108
117
  * @property {string} stage
109
118
  * @property {CourierPartnerSchemeFeatures} feature
110
119
  */
120
+ /**
121
+ * @typedef CourierPartnerSchemeRequestModel
122
+ * @property {string} extension_id
123
+ * @property {string} [scheme_id]
124
+ * @property {string} name
125
+ * @property {ArithmeticOperations} weight
126
+ * @property {string} transport_type
127
+ * @property {string} region
128
+ * @property {string} delivery_type
129
+ * @property {string[]} payment_mode
130
+ * @property {string} stage
131
+ * @property {CourierPartnerSchemeFeatures} feature
132
+ */
111
133
  /**
112
134
  * @typedef CourierPartnerSchemeFeatures
113
135
  * @property {boolean} [doorstep_qc]
@@ -175,7 +197,7 @@ export = LogisticsPartnerModel;
175
197
  declare class LogisticsPartnerModel {
176
198
  }
177
199
  declare namespace LogisticsPartnerModel {
178
- export { BulkRegionServiceabilityTatRequest, BulkRegionServiceabilityTatResponseItemData, ErrorResponse, FailureResponse, BulkRegionServiceabilityTatResponse, Page, BulkRegionJobSerializer, BulkRegionResponseItemData, BulkRegionResponse, CourierAccount, CourierPartnerAccountFailureResponse, CompanyCourierPartnerAccountListResponse, CourierAccountResponse, CourierPartnerSchemeModel, CourierPartnerSchemeFeatures, ArithmeticOperations, CourierPartnerSchemeUpdateRequest, GetCountries, GetCountriesItems, HierarchyItems };
200
+ export { BulkRegionServiceabilityTatRequest, BulkRegionServiceabilityTatResponseItemData, ErrorResponse, FailureResponse, BulkRegionServiceabilityTatResponse, Page, BulkRegionJobSerializer, BulkRegionResponseItemData, BulkRegionResponse, CourierAccount, CourierAccountRequestBody, CourierPartnerAccountFailureResponse, CompanyCourierPartnerAccountListResponse, CourierAccountResponse, CourierPartnerSchemeModel, CourierPartnerSchemeRequestModel, CourierPartnerSchemeFeatures, ArithmeticOperations, CourierPartnerSchemeUpdateRequest, GetCountries, GetCountriesItems, HierarchyItems };
179
201
  }
180
202
  /** @returns {BulkRegionServiceabilityTatRequest} */
181
203
  declare function BulkRegionServiceabilityTatRequest(): BulkRegionServiceabilityTatRequest;
@@ -217,12 +239,33 @@ type BulkRegionServiceabilityTatResponse = {
217
239
  /** @returns {Page} */
218
240
  declare function Page(): Page;
219
241
  type Page = {
242
+ /**
243
+ * - The total number of items on the page.
244
+ */
220
245
  item_total?: number;
246
+ /**
247
+ * - The identifier for the next page.
248
+ */
221
249
  next_id?: string;
250
+ /**
251
+ * - Indicates whether there is a previous page.
252
+ */
222
253
  has_previous?: boolean;
254
+ /**
255
+ * - Indicates whether there is a next page.
256
+ */
223
257
  has_next?: boolean;
258
+ /**
259
+ * - The current page number.
260
+ */
224
261
  current?: number;
262
+ /**
263
+ * - The type of the page, such as 'PageType'.
264
+ */
225
265
  type: string;
266
+ /**
267
+ * - The number of items per page.
268
+ */
226
269
  size?: number;
227
270
  };
228
271
  /** @returns {BulkRegionJobSerializer} */
@@ -264,6 +307,16 @@ type CourierAccount = {
264
307
  stage: string;
265
308
  is_own_account: boolean;
266
309
  };
310
+ /** @returns {CourierAccountRequestBody} */
311
+ declare function CourierAccountRequestBody(): CourierAccountRequestBody;
312
+ type CourierAccountRequestBody = {
313
+ extension_id: string;
314
+ account_id?: string;
315
+ scheme_id: string;
316
+ is_self_ship: boolean;
317
+ stage: string;
318
+ is_own_account: boolean;
319
+ };
267
320
  /** @returns {CourierPartnerAccountFailureResponse} */
268
321
  declare function CourierPartnerAccountFailureResponse(): CourierPartnerAccountFailureResponse;
269
322
  type CourierPartnerAccountFailureResponse = {
@@ -300,6 +353,20 @@ type CourierPartnerSchemeModel = {
300
353
  stage: string;
301
354
  feature: CourierPartnerSchemeFeatures;
302
355
  };
356
+ /** @returns {CourierPartnerSchemeRequestModel} */
357
+ declare function CourierPartnerSchemeRequestModel(): CourierPartnerSchemeRequestModel;
358
+ type CourierPartnerSchemeRequestModel = {
359
+ extension_id: string;
360
+ scheme_id?: string;
361
+ name: string;
362
+ weight: ArithmeticOperations;
363
+ transport_type: string;
364
+ region: string;
365
+ delivery_type: string;
366
+ payment_mode: string[];
367
+ stage: string;
368
+ feature: CourierPartnerSchemeFeatures;
369
+ };
303
370
  /** @returns {CourierPartnerSchemeFeatures} */
304
371
  declare function CourierPartnerSchemeFeatures(): CourierPartnerSchemeFeatures;
305
372
  type CourierPartnerSchemeFeatures = {
@@ -39,13 +39,13 @@ const Joi = require("joi");
39
39
 
40
40
  /**
41
41
  * @typedef Page
42
- * @property {number} [item_total]
43
- * @property {string} [next_id]
44
- * @property {boolean} [has_previous]
45
- * @property {boolean} [has_next]
46
- * @property {number} [current]
47
- * @property {string} type
48
- * @property {number} [size]
42
+ * @property {number} [item_total] - The total number of items on the page.
43
+ * @property {string} [next_id] - The identifier for the next page.
44
+ * @property {boolean} [has_previous] - Indicates whether there is a previous page.
45
+ * @property {boolean} [has_next] - Indicates whether there is a next page.
46
+ * @property {number} [current] - The current page number.
47
+ * @property {string} type - The type of the page, such as 'PageType'.
48
+ * @property {number} [size] - The number of items per page.
49
49
  */
50
50
 
51
51
  /**
@@ -87,6 +87,16 @@ const Joi = require("joi");
87
87
  * @property {boolean} is_own_account
88
88
  */
89
89
 
90
+ /**
91
+ * @typedef CourierAccountRequestBody
92
+ * @property {string} extension_id
93
+ * @property {string} [account_id]
94
+ * @property {string} scheme_id
95
+ * @property {boolean} is_self_ship
96
+ * @property {string} stage
97
+ * @property {boolean} is_own_account
98
+ */
99
+
90
100
  /**
91
101
  * @typedef CourierPartnerAccountFailureResponse
92
102
  * @property {boolean} success
@@ -123,6 +133,20 @@ const Joi = require("joi");
123
133
  * @property {CourierPartnerSchemeFeatures} feature
124
134
  */
125
135
 
136
+ /**
137
+ * @typedef CourierPartnerSchemeRequestModel
138
+ * @property {string} extension_id
139
+ * @property {string} [scheme_id]
140
+ * @property {string} name
141
+ * @property {ArithmeticOperations} weight
142
+ * @property {string} transport_type
143
+ * @property {string} region
144
+ * @property {string} delivery_type
145
+ * @property {string[]} payment_mode
146
+ * @property {string} stage
147
+ * @property {CourierPartnerSchemeFeatures} feature
148
+ */
149
+
126
150
  /**
127
151
  * @typedef CourierPartnerSchemeFeatures
128
152
  * @property {boolean} [doorstep_qc]
@@ -307,6 +331,18 @@ class LogisticsPartnerModel {
307
331
  });
308
332
  }
309
333
 
334
+ /** @returns {CourierAccountRequestBody} */
335
+ static CourierAccountRequestBody() {
336
+ return Joi.object({
337
+ extension_id: Joi.string().allow("").required(),
338
+ account_id: Joi.string().allow(""),
339
+ scheme_id: Joi.string().allow("").required(),
340
+ is_self_ship: Joi.boolean().required(),
341
+ stage: Joi.string().allow("").required(),
342
+ is_own_account: Joi.boolean().required(),
343
+ });
344
+ }
345
+
310
346
  /** @returns {CourierPartnerAccountFailureResponse} */
311
347
  static CourierPartnerAccountFailureResponse() {
312
348
  return Joi.object({
@@ -355,6 +391,22 @@ class LogisticsPartnerModel {
355
391
  });
356
392
  }
357
393
 
394
+ /** @returns {CourierPartnerSchemeRequestModel} */
395
+ static CourierPartnerSchemeRequestModel() {
396
+ return Joi.object({
397
+ extension_id: Joi.string().allow("").required(),
398
+ scheme_id: Joi.string().allow(""),
399
+ name: Joi.string().allow("").required(),
400
+ weight: LogisticsPartnerModel.ArithmeticOperations().required(),
401
+ transport_type: Joi.string().allow("").required(),
402
+ region: Joi.string().allow("").required(),
403
+ delivery_type: Joi.string().allow("").required(),
404
+ payment_mode: Joi.array().items(Joi.string().allow("")).required(),
405
+ stage: Joi.string().allow("").required(),
406
+ feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
407
+ });
408
+ }
409
+
358
410
  /** @returns {CourierPartnerSchemeFeatures} */
359
411
  static CourierPartnerSchemeFeatures() {
360
412
  return Joi.object({
@@ -67,7 +67,7 @@ class LogisticsValidator {
67
67
  static createCourierPartnerAccount() {
68
68
  return Joi.object({
69
69
  companyId: Joi.number().required(),
70
- body: LogisticsModel.CourierAccount().required(),
70
+ body: LogisticsModel.CourierAccountRequestBody().required(),
71
71
  }).required();
72
72
  }
73
73
 
@@ -99,7 +99,7 @@ class LogisticsValidator {
99
99
 
100
100
  static createCourierPartnerScheme() {
101
101
  return Joi.object({
102
- body: LogisticsModel.CourierPartnerSchemeModel().required(),
102
+ body: LogisticsModel.CourierPartnerSchemeRequestModel().required(),
103
103
  }).required();
104
104
  }
105
105
 
@@ -25,6 +25,14 @@ declare class PartnerClient {
25
25
  * @throws {FDKClientValidationError} When the provided header is not an object.
26
26
  */
27
27
  setExtraHeaders(header: object): void;
28
+ request({ method, url, query, body, headers, responseHeaders, }: {
29
+ method: any;
30
+ url: any;
31
+ query: any;
32
+ body: any;
33
+ headers: any;
34
+ responseHeaders?: boolean;
35
+ }): Promise<import("axios").AxiosResponse<any, any>>;
28
36
  }
29
37
  import FileStorage = require("./FileStorage/FileStoragePartnerClient");
30
38
  import Lead = require("./Lead/LeadPartnerClient");
@@ -9,6 +9,7 @@ const Theme = require("./Theme/ThemePartnerClient");
9
9
  const Webhook = require("./Webhook/WebhookPartnerClient");
10
10
 
11
11
  const { FDKClientValidationError } = require("../common/FDKError");
12
+ const { execute } = require("./PartnerAPIClient");
12
13
 
13
14
  /**
14
15
  * Represents the client for the partner APIs.
@@ -44,6 +45,19 @@ class PartnerClient {
44
45
  throw new FDKClientValidationError("Context value should be an object");
45
46
  }
46
47
  }
48
+
49
+ async request({
50
+ method,
51
+ url,
52
+ query,
53
+ body,
54
+ headers,
55
+ responseHeaders = false,
56
+ }) {
57
+ return await execute(this.config, method, url, query, body, headers, {
58
+ responseHeaders,
59
+ });
60
+ }
47
61
  }
48
62
 
49
63
  module.exports = PartnerClient;
@@ -194,6 +194,26 @@ declare class Theme {
194
194
  * @description: Publish a draft extension section within the specified organization. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/publishExtensionSections/).
195
195
  */
196
196
  publishExtensionSections({ extensionId, body, requestHeaders }?: ThemePartnerValidator.PublishExtensionSectionsParam, { responseHeaders }?: object): Promise<ThemePartnerModel.PublishExtensionSectionResponse>;
197
+ /**
198
+ * @param {ThemePartnerValidator.ApplyExtensionPreviewParam} arg - Arg object.
199
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
200
+ * @param {import("../PartnerAPIClient").Options} - Options
201
+ * @returns {Promise<ThemePartnerModel.ExtensionPreviewResponse>} - Success response
202
+ * @name applyExtensionPreview
203
+ * @summary: Start a Preview of Extension Section
204
+ * @description: Use this API to start a local session for previewing the extension section binding. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/applyExtensionPreview/).
205
+ */
206
+ applyExtensionPreview({ extensionSectionId, body, requestHeaders }?: ThemePartnerValidator.ApplyExtensionPreviewParam, { responseHeaders }?: object): Promise<ThemePartnerModel.ExtensionPreviewResponse>;
207
+ /**
208
+ * @param {ThemePartnerValidator.RemoveExtensionPreviewParam} arg - Arg object.
209
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
210
+ * @param {import("../PartnerAPIClient").Options} - Options
211
+ * @returns {Promise<ThemePartnerModel.ExtensionPreviewResponse>} - Success response
212
+ * @name removeExtensionPreview
213
+ * @summary: Close a Preview of Extension Section
214
+ * @description: Use this API to close a local session for previewing the extension section binding - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/removeExtensionPreview/).
215
+ */
216
+ removeExtensionPreview({ extensionSectionId, body, requestHeaders }?: ThemePartnerValidator.RemoveExtensionPreviewParam, { responseHeaders }?: object): Promise<ThemePartnerModel.ExtensionPreviewResponse>;
197
217
  /**
198
218
  * @param {ThemePartnerValidator.GetThemeRejectionReasonsParam} arg - Arg object.
199
219
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -1532,6 +1532,164 @@ class Theme {
1532
1532
  return response;
1533
1533
  }
1534
1534
 
1535
+ /**
1536
+ * @param {ThemePartnerValidator.ApplyExtensionPreviewParam} arg - Arg object.
1537
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1538
+ * @param {import("../PartnerAPIClient").Options} - Options
1539
+ * @returns {Promise<ThemePartnerModel.ExtensionPreviewResponse>} - Success response
1540
+ * @name applyExtensionPreview
1541
+ * @summary: Start a Preview of Extension Section
1542
+ * @description: Use this API to start a local session for previewing the extension section binding. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/applyExtensionPreview/).
1543
+ */
1544
+ async applyExtensionPreview(
1545
+ { extensionSectionId, body, requestHeaders } = { requestHeaders: {} },
1546
+ { responseHeaders } = { responseHeaders: false }
1547
+ ) {
1548
+ const { error } = ThemePartnerValidator.applyExtensionPreview().validate(
1549
+ {
1550
+ extensionSectionId,
1551
+ body,
1552
+ },
1553
+ { abortEarly: false, allowUnknown: true }
1554
+ );
1555
+ if (error) {
1556
+ return Promise.reject(new FDKClientValidationError(error));
1557
+ }
1558
+
1559
+ // Showing warrnings if extra unknown parameters are found
1560
+ const {
1561
+ error: warrning,
1562
+ } = ThemePartnerValidator.applyExtensionPreview().validate(
1563
+ {
1564
+ extensionSectionId,
1565
+ body,
1566
+ },
1567
+ { abortEarly: false, allowUnknown: false }
1568
+ );
1569
+ if (warrning) {
1570
+ Logger({
1571
+ level: "WARN",
1572
+ message: `Parameter Validation warrnings for partner > Theme > applyExtensionPreview \n ${warrning}`,
1573
+ });
1574
+ }
1575
+
1576
+ const query_params = {};
1577
+
1578
+ const response = await PartnerAPIClient.execute(
1579
+ this.config,
1580
+ "post",
1581
+ `/service/partner/theme/v1.0/organization/${this.config.organizationId}/extension-section/${extensionSectionId}/preview`,
1582
+ query_params,
1583
+ body,
1584
+ requestHeaders,
1585
+ { responseHeaders }
1586
+ );
1587
+
1588
+ let responseData = response;
1589
+ if (responseHeaders) {
1590
+ responseData = response[0];
1591
+ }
1592
+
1593
+ const {
1594
+ error: res_error,
1595
+ } = ThemePartnerModel.ExtensionPreviewResponse().validate(responseData, {
1596
+ abortEarly: false,
1597
+ allowUnknown: true,
1598
+ });
1599
+
1600
+ if (res_error) {
1601
+ if (this.config.options.strictResponseCheck === true) {
1602
+ return Promise.reject(new FDKResponseValidationError(res_error));
1603
+ } else {
1604
+ Logger({
1605
+ level: "WARN",
1606
+ message: `Response Validation Warnings for partner > Theme > applyExtensionPreview \n ${res_error}`,
1607
+ });
1608
+ }
1609
+ }
1610
+
1611
+ return response;
1612
+ }
1613
+
1614
+ /**
1615
+ * @param {ThemePartnerValidator.RemoveExtensionPreviewParam} arg - Arg object.
1616
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1617
+ * @param {import("../PartnerAPIClient").Options} - Options
1618
+ * @returns {Promise<ThemePartnerModel.ExtensionPreviewResponse>} - Success response
1619
+ * @name removeExtensionPreview
1620
+ * @summary: Close a Preview of Extension Section
1621
+ * @description: Use this API to close a local session for previewing the extension section binding - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/removeExtensionPreview/).
1622
+ */
1623
+ async removeExtensionPreview(
1624
+ { extensionSectionId, body, requestHeaders } = { requestHeaders: {} },
1625
+ { responseHeaders } = { responseHeaders: false }
1626
+ ) {
1627
+ const { error } = ThemePartnerValidator.removeExtensionPreview().validate(
1628
+ {
1629
+ extensionSectionId,
1630
+ body,
1631
+ },
1632
+ { abortEarly: false, allowUnknown: true }
1633
+ );
1634
+ if (error) {
1635
+ return Promise.reject(new FDKClientValidationError(error));
1636
+ }
1637
+
1638
+ // Showing warrnings if extra unknown parameters are found
1639
+ const {
1640
+ error: warrning,
1641
+ } = ThemePartnerValidator.removeExtensionPreview().validate(
1642
+ {
1643
+ extensionSectionId,
1644
+ body,
1645
+ },
1646
+ { abortEarly: false, allowUnknown: false }
1647
+ );
1648
+ if (warrning) {
1649
+ Logger({
1650
+ level: "WARN",
1651
+ message: `Parameter Validation warrnings for partner > Theme > removeExtensionPreview \n ${warrning}`,
1652
+ });
1653
+ }
1654
+
1655
+ const query_params = {};
1656
+
1657
+ const response = await PartnerAPIClient.execute(
1658
+ this.config,
1659
+ "delete",
1660
+ `/service/partner/theme/v1.0/organization/${this.config.organizationId}/extension-section/${extensionSectionId}/preview`,
1661
+ query_params,
1662
+ body,
1663
+ requestHeaders,
1664
+ { responseHeaders }
1665
+ );
1666
+
1667
+ let responseData = response;
1668
+ if (responseHeaders) {
1669
+ responseData = response[0];
1670
+ }
1671
+
1672
+ const {
1673
+ error: res_error,
1674
+ } = ThemePartnerModel.ExtensionPreviewResponse().validate(responseData, {
1675
+ abortEarly: false,
1676
+ allowUnknown: true,
1677
+ });
1678
+
1679
+ if (res_error) {
1680
+ if (this.config.options.strictResponseCheck === true) {
1681
+ return Promise.reject(new FDKResponseValidationError(res_error));
1682
+ } else {
1683
+ Logger({
1684
+ level: "WARN",
1685
+ message: `Response Validation Warnings for partner > Theme > removeExtensionPreview \n ${res_error}`,
1686
+ });
1687
+ }
1688
+ }
1689
+
1690
+ return response;
1691
+ }
1692
+
1535
1693
  /**
1536
1694
  * @param {ThemePartnerValidator.GetThemeRejectionReasonsParam} arg - Arg object.
1537
1695
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
@@ -65,6 +65,15 @@ export = ThemePartnerModel;
65
65
  * @property {string} [type]
66
66
  * @property {string} [status]
67
67
  */
68
+ /**
69
+ * @typedef ExtensionPreviewRequest
70
+ * @property {string} [application_id] - Application ID
71
+ * @property {string} [section_preview_hash] - Hash for the section preview
72
+ */
73
+ /**
74
+ * @typedef ExtensionPreviewResponse
75
+ * @property {string} [message]
76
+ */
68
77
  /**
69
78
  * @typedef PublishExtensionSectionResponse
70
79
  * @property {SectionsResponse} [sections]
@@ -104,7 +113,7 @@ export = ThemePartnerModel;
104
113
  */
105
114
  /**
106
115
  * @typedef Action
107
- * @property {string} [type]
116
+ * @property {string} [type] - Type of action to be taken e.g, page.
108
117
  * @property {ActionPage} [page]
109
118
  * @property {ActionPage} [popup]
110
119
  */
@@ -589,9 +598,9 @@ export = ThemePartnerModel;
589
598
  */
590
599
  /**
591
600
  * @typedef ActionPage
592
- * @property {Object} [params]
593
- * @property {Object} [query]
594
- * @property {string} [url]
601
+ * @property {Object} [params] - Parameters that should be considered in path.
602
+ * @property {Object} [query] - Query parameter if any to be added to the action.
603
+ * @property {string} [url] - The URL for the action.
595
604
  * @property {PageType} type
596
605
  */
597
606
  /**
@@ -606,6 +615,7 @@ export = ThemePartnerModel;
606
615
  * | "category"
607
616
  * | "collection"
608
617
  * | "collections"
618
+ * | "custom"
609
619
  * | "contact-us"
610
620
  * | "external"
611
621
  * | "faq"
@@ -645,7 +655,7 @@ export = ThemePartnerModel;
645
655
  declare class ThemePartnerModel {
646
656
  }
647
657
  declare namespace ThemePartnerModel {
648
- export { AvailablePageSchema, DraftExtensionSectionRequest, DraftExtensionSectionResponse, SectionsResponse, ExtensionSection, PropExtension, AssetsExtension, PublishExtensionSectionRequest, PublishExtensionSectionResponse, AvailablePageSectionMetaAttributes, AvailablePageSeo, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AvailablePagePredicate, MarketplaceThemeSchema, MarketplaceTheme, PaymentInfo, ContactInfo, CatalogSize, MarketplaceThemeImages, CarouselItem, ExploreInfo, Feature, FeatureItem, Highlight, Variation, Documentation, Comments, ThemeRejectionReasons, AllAvailablePageSchema, PaginationSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, ThemesSchema, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, CustomProps, ThemeMeta, ThemePayment, Release, Images, Assets, UMDJs, CommonJS, CSS, SectionItem, GlobalSchema, Prop, Preset, Page, SectionProps, SectionPreset, ImagePickerProp, UrlProp, BlockProps, TextProp, CheckboxProp, RangeProp, Section, Block, Predicate, Screen, ThemeUserSchema, Route, UpdateThemeRequestBody, CreateNewTheme, ActionPage, PageType };
658
+ export { AvailablePageSchema, DraftExtensionSectionRequest, DraftExtensionSectionResponse, SectionsResponse, ExtensionSection, PropExtension, AssetsExtension, PublishExtensionSectionRequest, ExtensionPreviewRequest, ExtensionPreviewResponse, PublishExtensionSectionResponse, AvailablePageSectionMetaAttributes, AvailablePageSeo, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AvailablePagePredicate, MarketplaceThemeSchema, MarketplaceTheme, PaymentInfo, ContactInfo, CatalogSize, MarketplaceThemeImages, CarouselItem, ExploreInfo, Feature, FeatureItem, Highlight, Variation, Documentation, Comments, ThemeRejectionReasons, AllAvailablePageSchema, PaginationSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, ThemesSchema, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, CustomProps, ThemeMeta, ThemePayment, Release, Images, Assets, UMDJs, CommonJS, CSS, SectionItem, GlobalSchema, Prop, Preset, Page, SectionProps, SectionPreset, ImagePickerProp, UrlProp, BlockProps, TextProp, CheckboxProp, RangeProp, Section, Block, Predicate, Screen, ThemeUserSchema, Route, UpdateThemeRequestBody, CreateNewTheme, ActionPage, PageType };
649
659
  }
650
660
  /** @returns {AvailablePageSchema} */
651
661
  declare function AvailablePageSchema(): AvailablePageSchema;
@@ -727,6 +737,23 @@ type PublishExtensionSectionRequest = {
727
737
  type?: string;
728
738
  status?: string;
729
739
  };
740
+ /** @returns {ExtensionPreviewRequest} */
741
+ declare function ExtensionPreviewRequest(): ExtensionPreviewRequest;
742
+ type ExtensionPreviewRequest = {
743
+ /**
744
+ * - Application ID
745
+ */
746
+ application_id?: string;
747
+ /**
748
+ * - Hash for the section preview
749
+ */
750
+ section_preview_hash?: string;
751
+ };
752
+ /** @returns {ExtensionPreviewResponse} */
753
+ declare function ExtensionPreviewResponse(): ExtensionPreviewResponse;
754
+ type ExtensionPreviewResponse = {
755
+ message?: string;
756
+ };
730
757
  /** @returns {PublishExtensionSectionResponse} */
731
758
  declare function PublishExtensionSectionResponse(): PublishExtensionSectionResponse;
732
759
  type PublishExtensionSectionResponse = {
@@ -774,6 +801,9 @@ type SEObreadcrumb = {
774
801
  /** @returns {Action} */
775
802
  declare function Action(): Action;
776
803
  type Action = {
804
+ /**
805
+ * - Type of action to be taken e.g, page.
806
+ */
777
807
  type?: string;
778
808
  page?: ActionPage;
779
809
  popup?: ActionPage;
@@ -1785,8 +1815,17 @@ type CreateNewTheme = {
1785
1815
  /** @returns {ActionPage} */
1786
1816
  declare function ActionPage(): ActionPage;
1787
1817
  type ActionPage = {
1818
+ /**
1819
+ * - Parameters that should be considered in path.
1820
+ */
1788
1821
  params?: any;
1822
+ /**
1823
+ * - Query parameter if any to be added to the action.
1824
+ */
1789
1825
  query?: any;
1826
+ /**
1827
+ * - The URL for the action.
1828
+ */
1790
1829
  url?: string;
1791
1830
  type: PageType;
1792
1831
  };
@@ -1796,4 +1835,4 @@ type ActionPage = {
1796
1835
  * @returns {PageType}
1797
1836
  */
1798
1837
  declare function PageType(): PageType;
1799
- type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status";
1838
+ type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status";