@gofynd/fdk-client-javascript 1.0.3 → 1.1.0

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 (185) hide show
  1. package/README.md +51 -2
  2. package/index.d.ts +7 -4
  3. package/index.js +22 -7
  4. package/package.json +23 -14
  5. package/partner.d.ts +4 -0
  6. package/partner.js +7 -0
  7. package/sdk/application/ApplicationAPIClient.js +2 -4
  8. package/sdk/application/Cart/CartApplicationClient.js +29 -28
  9. package/sdk/application/Cart/CartApplicationModel.js +3 -1
  10. package/sdk/application/Catalog/CatalogApplicationClient.js +43 -42
  11. package/sdk/application/Catalog/CatalogApplicationModel.js +5 -3
  12. package/sdk/application/Common/CommonApplicationClient.js +5 -4
  13. package/sdk/application/Communication/CommunicationApplicationClient.js +6 -5
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +21 -20
  15. package/sdk/application/Content/ContentApplicationClient.js +26 -25
  16. package/sdk/application/FileStorage/FileStorageApplicationClient.js +6 -5
  17. package/sdk/application/Lead/LeadApplicationClient.js +10 -9
  18. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -3
  19. package/sdk/application/Logistic/LogisticApplicationClient.js +11 -12
  20. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -1
  21. package/sdk/application/Order/OrderApplicationClient.js +15 -14
  22. package/sdk/application/Order/OrderApplicationModel.js +9 -0
  23. package/sdk/application/Payment/PaymentApplicationClient.js +42 -41
  24. package/sdk/application/PosCart/PosCartApplicationClient.js +30 -29
  25. package/sdk/application/PosCart/PosCartApplicationModel.js +3 -1
  26. package/sdk/application/Rewards/RewardsApplicationClient.js +11 -10
  27. package/sdk/application/Share/ShareApplicationClient.js +10 -9
  28. package/sdk/application/Theme/ThemeApplicationClient.js +7 -6
  29. package/sdk/application/User/UserApplicationClient.js +38 -37
  30. package/sdk/common/AxiosHelper.js +17 -6
  31. package/sdk/common/BaseOAuthClient.d.ts +17 -0
  32. package/sdk/common/BaseOAuthClient.js +67 -0
  33. package/sdk/common/RequestSigner.js +0 -5
  34. package/sdk/partner/OAuthClient.d.ts +14 -0
  35. package/sdk/partner/OAuthClient.js +112 -0
  36. package/sdk/partner/PartnerAPIClient.d.ts +12 -0
  37. package/sdk/partner/PartnerAPIClient.js +42 -0
  38. package/sdk/partner/PartnerClient.d.ts +6 -0
  39. package/sdk/partner/PartnerClient.js +17 -0
  40. package/sdk/partner/PartnerConfig.d.ts +30 -0
  41. package/sdk/partner/PartnerConfig.js +39 -0
  42. package/sdk/partner/index.d.ts +3 -0
  43. package/sdk/partner/index.js +5 -0
  44. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +3 -1
  45. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  46. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
  47. package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
  48. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -2
  49. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +1 -0
  50. package/sdk/platform/Billing/BillingPlatformClient.d.ts +24 -0
  51. package/sdk/platform/Billing/BillingPlatformClient.js +137 -2
  52. package/sdk/platform/Billing/BillingPlatformModel.d.ts +4 -0
  53. package/sdk/platform/Billing/BillingPlatformModel.js +44 -0
  54. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +2 -0
  55. package/sdk/platform/Billing/BillingPlatformValidator.js +15 -0
  56. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +27 -0
  57. package/sdk/platform/Cart/CartPlatformApplicationClient.js +177 -1
  58. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
  59. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +17 -1
  60. package/sdk/platform/Cart/CartPlatformModel.js +7 -3
  61. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +3 -1
  62. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -1
  63. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
  64. package/sdk/platform/Catalog/CatalogPlatformClient.js +6 -9
  65. package/sdk/platform/Catalog/CatalogPlatformModel.js +9 -9
  66. package/sdk/platform/Catalog/CatalogPlatformValidator.js +2 -1
  67. package/sdk/platform/Common/CommonPlatformClient.js +7 -18
  68. package/sdk/platform/Common/CommonPlatformValidator.js +1 -0
  69. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3 -1
  70. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -1
  71. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
  72. package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
  73. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +5 -4
  74. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +1 -0
  75. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -1
  76. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +1 -1
  77. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +9 -8
  78. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +1 -0
  79. package/sdk/platform/Content/ContentPlatformApplicationClient.js +3 -1
  80. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +1 -1
  81. package/sdk/platform/Discount/DiscountPlatformClient.js +3 -2
  82. package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -0
  83. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +3 -3
  84. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +27 -5
  85. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
  86. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +3 -3
  87. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +28 -6
  88. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +1 -0
  89. package/sdk/platform/Inventory/InventoryPlatformClient.js +3 -2
  90. package/sdk/platform/Inventory/InventoryPlatformValidator.js +1 -0
  91. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +3 -1
  92. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +1 -1
  93. package/sdk/platform/Lead/LeadPlatformClient.js +4 -3
  94. package/sdk/platform/Lead/LeadPlatformValidator.js +1 -0
  95. package/sdk/platform/OAuthClient.js +3 -9
  96. package/sdk/platform/Order/OrderPlatformApplicationClient.js +3 -1
  97. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -1
  98. package/sdk/platform/Order/OrderPlatformClient.d.ts +1 -1
  99. package/sdk/platform/Order/OrderPlatformClient.js +16 -3
  100. package/sdk/platform/Order/OrderPlatformModel.js +1 -0
  101. package/sdk/platform/Order/OrderPlatformValidator.js +1 -0
  102. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
  103. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
  104. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +1 -1
  105. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +14 -14
  106. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +1 -1
  107. package/sdk/platform/Payment/PaymentPlatformClient.js +3 -2
  108. package/sdk/platform/Payment/PaymentPlatformValidator.js +1 -0
  109. package/sdk/platform/PlatformApplicationClient.d.ts +5 -1
  110. package/sdk/platform/PlatformApplicationClient.js +4 -0
  111. package/sdk/platform/PlatformClient.d.ts +51 -12
  112. package/sdk/platform/PlatformClient.js +54 -11
  113. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +17 -19
  114. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +88 -83
  115. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +1 -1
  116. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +8 -9
  117. package/sdk/platform/Share/SharePlatformApplicationClient.js +3 -1
  118. package/sdk/platform/Share/SharePlatformApplicationValidator.js +1 -1
  119. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +3 -1
  120. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +1 -1
  121. package/sdk/platform/User/UserPlatformApplicationClient.js +3 -1
  122. package/sdk/platform/User/UserPlatformApplicationValidator.js +1 -1
  123. package/sdk/platform/Webhook/WebhookPlatformClient.js +3 -2
  124. package/sdk/platform/Webhook/WebhookPlatformValidator.js +1 -0
  125. package/sdk/public/Configuration/ConfigurationPublicClient.js +2 -0
  126. package/sdk/public/Inventory/InventoryPublicClient.js +2 -0
  127. package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
  128. package/.github/workflows/on_create_release.yml +0 -23
  129. package/.github/workflows/on_merge_main.yml +0 -38
  130. package/.github/workflows/on_pull_request.yml +0 -35
  131. package/.prettierrc +0 -5
  132. package/documentation/application/CART.md +0 -8771
  133. package/documentation/application/CATALOG.md +0 -8690
  134. package/documentation/application/COMMON.md +0 -325
  135. package/documentation/application/COMMUNICATION.md +0 -387
  136. package/documentation/application/CONFIGURATION.md +0 -2212
  137. package/documentation/application/CONTENT.md +0 -2629
  138. package/documentation/application/FILESTORAGE.md +0 -442
  139. package/documentation/application/LEAD.md +0 -1549
  140. package/documentation/application/LOGISTIC.md +0 -689
  141. package/documentation/application/ORDER.md +0 -2937
  142. package/documentation/application/PAYMENT.md +0 -4475
  143. package/documentation/application/POSCART.md +0 -9375
  144. package/documentation/application/README.md +0 -21
  145. package/documentation/application/REWARDS.md +0 -554
  146. package/documentation/application/SHARE.md +0 -635
  147. package/documentation/application/THEME.md +0 -5517
  148. package/documentation/application/USER.md +0 -3798
  149. package/documentation/platform/ANALYTICS.md +0 -1012
  150. package/documentation/platform/AUDITTRAIL.md +0 -493
  151. package/documentation/platform/BILLING.md +0 -1889
  152. package/documentation/platform/CART.md +0 -4711
  153. package/documentation/platform/CATALOG.md +0 -20522
  154. package/documentation/platform/COMMON.md +0 -325
  155. package/documentation/platform/COMMUNICATION.md +0 -4970
  156. package/documentation/platform/COMPANYPROFILE.md +0 -1646
  157. package/documentation/platform/CONFIGURATION.md +0 -6316
  158. package/documentation/platform/CONTENT.md +0 -8364
  159. package/documentation/platform/DISCOUNT.md +0 -767
  160. package/documentation/platform/FILESTORAGE.md +0 -945
  161. package/documentation/platform/INVENTORY.md +0 -1136
  162. package/documentation/platform/LEAD.md +0 -4394
  163. package/documentation/platform/ORDER.md +0 -6525
  164. package/documentation/platform/PARTNER.md +0 -193
  165. package/documentation/platform/PAYMENT.md +0 -3138
  166. package/documentation/platform/README.md +0 -27
  167. package/documentation/platform/REWARDS.md +0 -919
  168. package/documentation/platform/SHARE.md +0 -513
  169. package/documentation/platform/THEME.md +0 -35446
  170. package/documentation/platform/USER.md +0 -2174
  171. package/documentation/platform/WEBHOOK.md +0 -485
  172. package/documentation/public/CONFIGURATION.md +0 -325
  173. package/documentation/public/INVENTORY.md +0 -508
  174. package/documentation/public/WEBHOOK.md +0 -246
  175. package/jest.config.d.ts +0 -4
  176. package/jest.config.js +0 -6
  177. package/tests/application/catalog.spec.js +0 -54
  178. package/tests/common/action-url.spec.js +0 -35
  179. package/tests/common/schema/action-url.json +0 -178
  180. package/tests/common/schema/url-action.json +0 -683
  181. package/tests/common/url-action.spec.js +0 -48
  182. package/tests/helpers/cookie.helper.js +0 -31
  183. package/tests/helpers/oauth.helper.js +0 -43
  184. package/tests/platform/catalog.spec.js +0 -49
  185. package/tests/public/location.spec.js +0 -39
@@ -1,767 +0,0 @@
1
-
2
-
3
-
4
-
5
-
6
- ##### [Back to Platform docs](./README.md)
7
-
8
- ## Discount Methods
9
- Discount
10
-
11
- * [cancelDownloadJob](#canceldownloadjob)
12
- * [cancelValidationJob](#cancelvalidationjob)
13
- * [createDiscount](#creatediscount)
14
- * [downloadDiscountFile](#downloaddiscountfile)
15
- * [getDiscount](#getdiscount)
16
- * [getDiscounts](#getdiscounts)
17
- * [getDownloadJob](#getdownloadjob)
18
- * [getValidationJob](#getvalidationjob)
19
- * [updateDiscount](#updatediscount)
20
- * [upsertDiscountItems](#upsertdiscountitems)
21
- * [validateDiscountFile](#validatediscountfile)
22
-
23
-
24
-
25
- ## Methods with example and description
26
-
27
-
28
-
29
-
30
- ### cancelDownloadJob
31
- Cancel Download Job.
32
-
33
-
34
-
35
- ```javascript
36
- // Promise
37
- const promise = client.discount.cancelDownloadJob({ id : value });
38
-
39
- // Async/Await
40
- const data = await client.discount.cancelDownloadJob({ id : value });
41
- ```
42
-
43
-
44
-
45
-
46
-
47
- | Argument | Type | Required | Description |
48
- | --------- | ----- | -------- | ----------- |
49
- | id | string | yes | id |
50
-
51
-
52
-
53
- Cancel Download Job.
54
-
55
- *Returned Response:*
56
-
57
-
58
-
59
-
60
- [CancelJobResponse](#CancelJobResponse)
61
-
62
- Success
63
-
64
-
65
-
66
-
67
- <details>
68
- <summary><i>&nbsp; Example:</i></summary>
69
-
70
- ```json
71
-
72
- ```
73
- </details>
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
- ---
84
-
85
-
86
- ### cancelValidationJob
87
- Cancel Validation Job.
88
-
89
-
90
-
91
- ```javascript
92
- // Promise
93
- const promise = client.discount.cancelValidationJob({ id : value });
94
-
95
- // Async/Await
96
- const data = await client.discount.cancelValidationJob({ id : value });
97
- ```
98
-
99
-
100
-
101
-
102
-
103
- | Argument | Type | Required | Description |
104
- | --------- | ----- | -------- | ----------- |
105
- | id | string | yes | id |
106
-
107
-
108
-
109
- Cancel Validation Job.
110
-
111
- *Returned Response:*
112
-
113
-
114
-
115
-
116
- [CancelJobResponse](#CancelJobResponse)
117
-
118
- Success
119
-
120
-
121
-
122
-
123
- <details>
124
- <summary><i>&nbsp; Example:</i></summary>
125
-
126
- ```json
127
-
128
- ```
129
- </details>
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
- ---
140
-
141
-
142
- ### createDiscount
143
- Create Discount.
144
-
145
-
146
-
147
- ```javascript
148
- // Promise
149
- const promise = client.discount.createDiscount({ body : value });
150
-
151
- // Async/Await
152
- const data = await client.discount.createDiscount({ body : value });
153
- ```
154
-
155
-
156
-
157
-
158
-
159
- | Argument | Type | Required | Description |
160
- | --------- | ----- | -------- | ----------- |
161
- | body | [CreateUpdateDiscount](#CreateUpdateDiscount) | yes | Request body |
162
-
163
-
164
- Create Discount.
165
-
166
- *Returned Response:*
167
-
168
-
169
-
170
-
171
- [DiscountJob](#DiscountJob)
172
-
173
- Success
174
-
175
-
176
-
177
-
178
- <details>
179
- <summary><i>&nbsp; Example:</i></summary>
180
-
181
- ```json
182
-
183
- ```
184
- </details>
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
- ---
195
-
196
-
197
- ### downloadDiscountFile
198
- Validate File.
199
-
200
-
201
-
202
- ```javascript
203
- // Promise
204
- const promise = client.discount.downloadDiscountFile({ type : value,
205
- body : value });
206
-
207
- // Async/Await
208
- const data = await client.discount.downloadDiscountFile({ type : value,
209
- body : value });
210
- ```
211
-
212
-
213
-
214
-
215
-
216
- | Argument | Type | Required | Description |
217
- | --------- | ----- | -------- | ----------- |
218
- | type | string | yes | type |
219
- | body | [DownloadFileJob](#DownloadFileJob) | yes | Request body |
220
-
221
-
222
- Validate File.
223
-
224
- *Returned Response:*
225
-
226
-
227
-
228
-
229
- [FileJobResponse](#FileJobResponse)
230
-
231
- Success
232
-
233
-
234
-
235
-
236
- <details>
237
- <summary><i>&nbsp; Example:</i></summary>
238
-
239
- ```json
240
-
241
- ```
242
- </details>
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
- ---
253
-
254
-
255
- ### getDiscount
256
- Fetch discount.
257
-
258
-
259
-
260
- ```javascript
261
- // Promise
262
- const promise = client.discount.getDiscount({ id : value });
263
-
264
- // Async/Await
265
- const data = await client.discount.getDiscount({ id : value });
266
- ```
267
-
268
-
269
-
270
-
271
-
272
- | Argument | Type | Required | Description |
273
- | --------- | ----- | -------- | ----------- |
274
- | id | string | yes | unique id. |
275
-
276
-
277
-
278
- Fetch discount.
279
-
280
- *Returned Response:*
281
-
282
-
283
-
284
-
285
- [DiscountJob](#DiscountJob)
286
-
287
- Success
288
-
289
-
290
-
291
-
292
- <details>
293
- <summary><i>&nbsp; Example:</i></summary>
294
-
295
- ```json
296
-
297
- ```
298
- </details>
299
-
300
-
301
-
302
-
303
-
304
-
305
-
306
-
307
-
308
- ---
309
-
310
-
311
- ### getDiscounts
312
- Fetch discount list.
313
-
314
-
315
-
316
- ```javascript
317
- // Promise
318
- const promise = client.discount.getDiscounts({ view : value,
319
- q : value,
320
- pageNo : value,
321
- pageSize : value,
322
- archived : value,
323
- month : value,
324
- year : value,
325
- type : value,
326
- appIds : value });
327
-
328
- // Async/Await
329
- const data = await client.discount.getDiscounts({ view : value,
330
- q : value,
331
- pageNo : value,
332
- pageSize : value,
333
- archived : value,
334
- month : value,
335
- year : value,
336
- type : value,
337
- appIds : value });
338
- ```
339
-
340
-
341
-
342
-
343
-
344
- | Argument | Type | Required | Description |
345
- | --------- | ----- | -------- | ----------- |
346
- | view | string | no | listing or calender. Default is listing. |
347
- | q | string | no | The search query. This can be a partial or complete name of a discount. |
348
- | pageNo | number | no | page number. Default is 1. |
349
- | pageSize | number | no | page size. Default is 12. |
350
- | archived | boolean | no | archived. Default is false. |
351
- | month | number | no | month. Default is current month. |
352
- | year | number | no | year. Default is current year. |
353
- | type | string | no | basic or custom. |
354
- | appIds | Array<string> | no | application ids. |
355
-
356
-
357
-
358
- Fetch discount list.
359
-
360
- *Returned Response:*
361
-
362
-
363
-
364
-
365
- [ListOrCalender](#ListOrCalender)
366
-
367
- Success
368
-
369
-
370
-
371
-
372
- <details>
373
- <summary><i>&nbsp; Example:</i></summary>
374
-
375
- ```json
376
-
377
- ```
378
- </details>
379
-
380
-
381
-
382
-
383
-
384
-
385
-
386
-
387
-
388
- ---
389
-
390
-
391
- ### getDownloadJob
392
- Download File Job.
393
-
394
-
395
-
396
- ```javascript
397
- // Promise
398
- const promise = client.discount.getDownloadJob({ id : value });
399
-
400
- // Async/Await
401
- const data = await client.discount.getDownloadJob({ id : value });
402
- ```
403
-
404
-
405
-
406
-
407
-
408
- | Argument | Type | Required | Description |
409
- | --------- | ----- | -------- | ----------- |
410
- | id | string | yes | id |
411
-
412
-
413
-
414
- Download File Job.
415
-
416
- *Returned Response:*
417
-
418
-
419
-
420
-
421
- [FileJobResponse](#FileJobResponse)
422
-
423
- Success
424
-
425
-
426
-
427
-
428
- <details>
429
- <summary><i>&nbsp; Example:</i></summary>
430
-
431
- ```json
432
-
433
- ```
434
- </details>
435
-
436
-
437
-
438
-
439
-
440
-
441
-
442
-
443
-
444
- ---
445
-
446
-
447
- ### getValidationJob
448
- Validate File Job.
449
-
450
-
451
-
452
- ```javascript
453
- // Promise
454
- const promise = client.discount.getValidationJob({ id : value });
455
-
456
- // Async/Await
457
- const data = await client.discount.getValidationJob({ id : value });
458
- ```
459
-
460
-
461
-
462
-
463
-
464
- | Argument | Type | Required | Description |
465
- | --------- | ----- | -------- | ----------- |
466
- | id | string | yes | id |
467
-
468
-
469
-
470
- Validate File Job.
471
-
472
- *Returned Response:*
473
-
474
-
475
-
476
-
477
- [FileJobResponse](#FileJobResponse)
478
-
479
- Success
480
-
481
-
482
-
483
-
484
- <details>
485
- <summary><i>&nbsp; Example:</i></summary>
486
-
487
- ```json
488
-
489
- ```
490
- </details>
491
-
492
-
493
-
494
-
495
-
496
-
497
-
498
-
499
-
500
- ---
501
-
502
-
503
- ### updateDiscount
504
- Create Discount.
505
-
506
-
507
-
508
- ```javascript
509
- // Promise
510
- const promise = client.discount.updateDiscount({ id : value,
511
- body : value });
512
-
513
- // Async/Await
514
- const data = await client.discount.updateDiscount({ id : value,
515
- body : value });
516
- ```
517
-
518
-
519
-
520
-
521
-
522
- | Argument | Type | Required | Description |
523
- | --------- | ----- | -------- | ----------- |
524
- | id | string | yes | id |
525
- | body | [CreateUpdateDiscount](#CreateUpdateDiscount) | yes | Request body |
526
-
527
-
528
- Create Discount.
529
-
530
- *Returned Response:*
531
-
532
-
533
-
534
-
535
- [DiscountJob](#DiscountJob)
536
-
537
- Success
538
-
539
-
540
-
541
-
542
- <details>
543
- <summary><i>&nbsp; Example:</i></summary>
544
-
545
- ```json
546
-
547
- ```
548
- </details>
549
-
550
-
551
-
552
-
553
-
554
-
555
-
556
-
557
-
558
- ---
559
-
560
-
561
- ### upsertDiscountItems
562
- Create custom discount from bulk.
563
-
564
-
565
-
566
- ```javascript
567
- // Promise
568
- const promise = client.discount.upsertDiscountItems({ id : value,
569
- body : value });
570
-
571
- // Async/Await
572
- const data = await client.discount.upsertDiscountItems({ id : value,
573
- body : value });
574
- ```
575
-
576
-
577
-
578
-
579
-
580
- | Argument | Type | Required | Description |
581
- | --------- | ----- | -------- | ----------- |
582
- | id | string | yes | Job ID of the discount. |
583
- | body | [BulkDiscount](#BulkDiscount) | yes | Request body |
584
-
585
-
586
- Create custom discounts through API.
587
-
588
- *Returned Response:*
589
-
590
-
591
-
592
-
593
- [Object](#Object)
594
-
595
- Success
596
-
597
-
598
-
599
-
600
- <details>
601
- <summary><i>&nbsp; Example:</i></summary>
602
-
603
- ```json
604
-
605
- ```
606
- </details>
607
-
608
-
609
-
610
-
611
-
612
-
613
-
614
-
615
-
616
- ---
617
-
618
-
619
- ### validateDiscountFile
620
- Validate File.
621
-
622
-
623
-
624
- ```javascript
625
- // Promise
626
- const promise = client.discount.validateDiscountFile({ body : value,
627
- discount : value });
628
-
629
- // Async/Await
630
- const data = await client.discount.validateDiscountFile({ body : value,
631
- discount : value });
632
- ```
633
-
634
-
635
-
636
-
637
-
638
- | Argument | Type | Required | Description |
639
- | --------- | ----- | -------- | ----------- |
640
- | discount | string | no | discount |
641
- | body | [DiscountJob](#DiscountJob) | yes | Request body |
642
-
643
-
644
- Validate File.
645
-
646
- *Returned Response:*
647
-
648
-
649
-
650
-
651
- [FileJobResponse](#FileJobResponse)
652
-
653
- Success
654
-
655
-
656
-
657
-
658
- <details>
659
- <summary><i>&nbsp; Example:</i></summary>
660
-
661
- ```json
662
-
663
- ```
664
- </details>
665
-
666
-
667
-
668
-
669
-
670
-
671
-
672
-
673
-
674
- ---
675
-
676
-
677
-
678
- ### Schemas
679
-
680
-
681
- #### [BadRequestObject](#BadRequestObject)
682
-
683
- | Properties | Type | Nullable | Description |
684
- | ---------- | ---- | -------- | ----------- || message | string | yes | |
685
-
686
- ---
687
-
688
- #### [BulkDiscount](#BulkDiscount)
689
-
690
- | Properties | Type | Nullable | Description |
691
- | ---------- | ---- | -------- | ----------- || company_id | number | yes | || items | [[DiscountItems](#DiscountItems)] | yes | |
692
-
693
- ---
694
-
695
- #### [CancelJobResponse](#CancelJobResponse)
696
-
697
- | Properties | Type | Nullable | Description |
698
- | ---------- | ---- | -------- | ----------- || success | boolean | yes | |
699
-
700
- ---
701
-
702
- #### [CreateUpdateDiscount](#CreateUpdateDiscount)
703
-
704
- | Properties | Type | Nullable | Description |
705
- | ---------- | ---- | -------- | ----------- || app_ids | [string] | yes | || brand_ids | [number] | no | || company_id | number | yes | || discount_level | string | yes | || discount_type | string | yes | || extension_ids | [string] | yes | || file_path | string | no | || is_active | boolean | yes | || job_type | string | yes | || name | string | yes | || store_ids | [number] | no | || validity | [ValidityObject](#ValidityObject) | yes | || value | number | no | |
706
-
707
- ---
708
-
709
- #### [DiscountItems](#DiscountItems)
710
-
711
- | Properties | Type | Nullable | Description |
712
- | ---------- | ---- | -------- | ----------- || brand_uid | number | no | || discount_type | string | yes | || item_code | string | no | || seller_identifier | string | no | || value | number | yes | |
713
-
714
- ---
715
-
716
- #### [DiscountJob](#DiscountJob)
717
-
718
- | Properties | Type | Nullable | Description |
719
- | ---------- | ---- | -------- | ----------- || _id | string | yes | || app_ids | [string] | no | || brand_ids | [number] | no | || company_id | number | yes | || created_by | [UserDetails](#UserDetails) | yes | || created_on | string | yes | || discount_level | string | no | || discount_type | string | no | || file_path | string | no | || is_active | boolean | yes | || job_type | string | no | || meta | string | no | || modified_by | [UserDetails](#UserDetails) | yes | || modified_on | string | yes | || name | string | yes | || store_ids | [number] | no | || validity | [ValidityObject](#ValidityObject) | yes | || value | number | no | |
720
-
721
- ---
722
-
723
- #### [DownloadFileJob](#DownloadFileJob)
724
-
725
- | Properties | Type | Nullable | Description |
726
- | ---------- | ---- | -------- | ----------- || brand_ids | [number] | no | || store_ids | [number] | no | |
727
-
728
- ---
729
-
730
- #### [FileJobResponse](#FileJobResponse)
731
-
732
- | Properties | Type | Nullable | Description |
733
- | ---------- | ---- | -------- | ----------- || body | string | no | || company_id | number | yes | || failed | number | yes | || file_type | string | yes | || stage | string | yes | || total | number | yes | || type | string | yes | |
734
-
735
- ---
736
-
737
- #### [ListOrCalender](#ListOrCalender)
738
-
739
- | Properties | Type | Nullable | Description |
740
- | ---------- | ---- | -------- | ----------- || items | [[DiscountJob](#DiscountJob)] | yes | || page | [Page](#Page) | yes | |
741
-
742
- ---
743
-
744
- #### [Page](#Page)
745
-
746
- | Properties | Type | Nullable | Description |
747
- | ---------- | ---- | -------- | ----------- || current | number | no | || has_next | boolean | no | || has_previous | boolean | no | || item_total | number | no | || next_id | string | no | || size | number | no | || type | number | yes | |
748
-
749
- ---
750
-
751
- #### [UserDetails](#UserDetails)
752
-
753
- | Properties | Type | Nullable | Description |
754
- | ---------- | ---- | -------- | ----------- || user_id | string | yes | || username | string | yes | |
755
-
756
- ---
757
-
758
- #### [ValidityObject](#ValidityObject)
759
-
760
- | Properties | Type | Nullable | Description |
761
- | ---------- | ---- | -------- | ----------- || end | string | yes | || start | string | yes | |
762
-
763
- ---
764
-
765
-
766
-
767
-