@gofynd/fdk-client-javascript 1.0.3 → 1.0.4

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 (175) hide show
  1. package/README.md +31 -2
  2. package/index.d.ts +4 -4
  3. package/index.js +9 -10
  4. package/package.json +14 -14
  5. package/sdk/APIClient.d.ts +11 -0
  6. package/sdk/APIClient.js +35 -0
  7. package/sdk/Client.d.ts +6 -0
  8. package/sdk/Client.js +17 -0
  9. package/sdk/Config.d.ts +9 -0
  10. package/sdk/Config.js +17 -0
  11. package/sdk/application/Cart/CartApplicationClient.js +29 -28
  12. package/sdk/application/Cart/CartApplicationModel.js +3 -1
  13. package/sdk/application/Catalog/CatalogApplicationClient.js +43 -42
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +1 -1
  15. package/sdk/application/Common/CommonApplicationClient.js +5 -4
  16. package/sdk/application/Communication/CommunicationApplicationClient.js +6 -5
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.js +21 -20
  18. package/sdk/application/Content/ContentApplicationClient.js +26 -25
  19. package/sdk/application/Content/ContentApplicationModel.js +1 -0
  20. package/sdk/application/FileStorage/FileStorageApplicationClient.js +6 -5
  21. package/sdk/application/Lead/LeadApplicationClient.js +10 -9
  22. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -3
  23. package/sdk/application/Logistic/LogisticApplicationClient.js +11 -12
  24. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -1
  25. package/sdk/application/Order/OrderApplicationClient.js +15 -14
  26. package/sdk/application/Order/OrderApplicationModel.js +9 -0
  27. package/sdk/application/Payment/PaymentApplicationClient.js +42 -41
  28. package/sdk/application/PosCart/PosCartApplicationClient.js +30 -29
  29. package/sdk/application/PosCart/PosCartApplicationModel.js +3 -1
  30. package/sdk/application/Rewards/RewardsApplicationClient.js +11 -10
  31. package/sdk/application/Share/ShareApplicationClient.js +10 -9
  32. package/sdk/application/Theme/ThemeApplicationClient.js +7 -6
  33. package/sdk/application/User/UserApplicationClient.js +38 -37
  34. package/sdk/common/AxiosHelper.js +17 -6
  35. package/sdk/constructUrl.d.ts +5 -0
  36. package/sdk/constructUrl.js +13 -0
  37. package/sdk/index.d.ts +3 -0
  38. package/sdk/index.js +5 -0
  39. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +3 -1
  40. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  41. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
  42. package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
  43. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -2
  44. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +1 -0
  45. package/sdk/platform/Billing/BillingPlatformClient.js +3 -2
  46. package/sdk/platform/Billing/BillingPlatformValidator.js +1 -0
  47. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +27 -0
  48. package/sdk/platform/Cart/CartPlatformApplicationClient.js +177 -1
  49. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
  50. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +17 -1
  51. package/sdk/platform/Cart/CartPlatformModel.js +7 -3
  52. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +3 -1
  53. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -1
  54. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
  55. package/sdk/platform/Catalog/CatalogPlatformClient.js +6 -9
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +7 -7
  57. package/sdk/platform/Catalog/CatalogPlatformValidator.js +2 -1
  58. package/sdk/platform/Common/CommonPlatformClient.js +7 -18
  59. package/sdk/platform/Common/CommonPlatformValidator.js +1 -0
  60. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3 -1
  61. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -1
  62. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
  63. package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
  64. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +5 -4
  65. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +1 -0
  66. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -1
  67. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +1 -1
  68. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +9 -8
  69. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +1 -0
  70. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -10
  71. package/sdk/platform/Content/ContentPlatformApplicationClient.js +3 -62
  72. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +0 -1
  73. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +1 -7
  74. package/sdk/platform/Content/ContentPlatformModel.js +1 -0
  75. package/sdk/platform/Discount/DiscountPlatformClient.js +3 -2
  76. package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -0
  77. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +3 -3
  78. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +27 -5
  79. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
  80. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +3 -3
  81. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +28 -6
  82. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +1 -0
  83. package/sdk/platform/Inventory/InventoryPlatformClient.js +3 -2
  84. package/sdk/platform/Inventory/InventoryPlatformValidator.js +1 -0
  85. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +3 -1
  86. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +1 -1
  87. package/sdk/platform/Lead/LeadPlatformClient.js +4 -3
  88. package/sdk/platform/Lead/LeadPlatformValidator.js +1 -0
  89. package/sdk/platform/Order/OrderPlatformApplicationClient.js +3 -1
  90. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -1
  91. package/sdk/platform/Order/OrderPlatformClient.d.ts +1 -1
  92. package/sdk/platform/Order/OrderPlatformClient.js +16 -3
  93. package/sdk/platform/Order/OrderPlatformModel.js +1 -0
  94. package/sdk/platform/Order/OrderPlatformValidator.js +1 -0
  95. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
  96. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
  97. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +1 -1
  98. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +14 -14
  99. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +1 -1
  100. package/sdk/platform/Payment/PaymentPlatformClient.js +3 -2
  101. package/sdk/platform/Payment/PaymentPlatformValidator.js +1 -0
  102. package/sdk/platform/PlatformClient.d.ts +13 -9
  103. package/sdk/platform/PlatformClient.js +13 -9
  104. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +4 -4
  105. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +36 -17
  106. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +1 -1
  107. package/sdk/platform/Share/SharePlatformApplicationClient.js +3 -1
  108. package/sdk/platform/Share/SharePlatformApplicationValidator.js +1 -1
  109. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +3 -1
  110. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +1 -1
  111. package/sdk/platform/User/UserPlatformApplicationClient.js +3 -1
  112. package/sdk/platform/User/UserPlatformApplicationValidator.js +1 -1
  113. package/sdk/platform/Webhook/WebhookPlatformClient.js +3 -2
  114. package/sdk/platform/Webhook/WebhookPlatformValidator.js +1 -0
  115. package/sdk/public/Configuration/ConfigurationPublicClient.js +2 -0
  116. package/sdk/public/Inventory/InventoryPublicClient.js +2 -0
  117. package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
  118. package/.github/workflows/on_create_release.yml +0 -23
  119. package/.github/workflows/on_merge_main.yml +0 -38
  120. package/.github/workflows/on_pull_request.yml +0 -35
  121. package/.prettierrc +0 -5
  122. package/documentation/application/CART.md +0 -8771
  123. package/documentation/application/CATALOG.md +0 -8690
  124. package/documentation/application/COMMON.md +0 -325
  125. package/documentation/application/COMMUNICATION.md +0 -387
  126. package/documentation/application/CONFIGURATION.md +0 -2212
  127. package/documentation/application/CONTENT.md +0 -2629
  128. package/documentation/application/FILESTORAGE.md +0 -442
  129. package/documentation/application/LEAD.md +0 -1549
  130. package/documentation/application/LOGISTIC.md +0 -689
  131. package/documentation/application/ORDER.md +0 -2937
  132. package/documentation/application/PAYMENT.md +0 -4475
  133. package/documentation/application/POSCART.md +0 -9375
  134. package/documentation/application/README.md +0 -21
  135. package/documentation/application/REWARDS.md +0 -554
  136. package/documentation/application/SHARE.md +0 -635
  137. package/documentation/application/THEME.md +0 -5517
  138. package/documentation/application/USER.md +0 -3798
  139. package/documentation/platform/ANALYTICS.md +0 -1012
  140. package/documentation/platform/AUDITTRAIL.md +0 -493
  141. package/documentation/platform/BILLING.md +0 -1889
  142. package/documentation/platform/CART.md +0 -4711
  143. package/documentation/platform/CATALOG.md +0 -20522
  144. package/documentation/platform/COMMON.md +0 -325
  145. package/documentation/platform/COMMUNICATION.md +0 -4970
  146. package/documentation/platform/COMPANYPROFILE.md +0 -1646
  147. package/documentation/platform/CONFIGURATION.md +0 -6316
  148. package/documentation/platform/CONTENT.md +0 -8364
  149. package/documentation/platform/DISCOUNT.md +0 -767
  150. package/documentation/platform/FILESTORAGE.md +0 -945
  151. package/documentation/platform/INVENTORY.md +0 -1136
  152. package/documentation/platform/LEAD.md +0 -4394
  153. package/documentation/platform/ORDER.md +0 -6525
  154. package/documentation/platform/PARTNER.md +0 -193
  155. package/documentation/platform/PAYMENT.md +0 -3138
  156. package/documentation/platform/README.md +0 -27
  157. package/documentation/platform/REWARDS.md +0 -919
  158. package/documentation/platform/SHARE.md +0 -513
  159. package/documentation/platform/THEME.md +0 -35446
  160. package/documentation/platform/USER.md +0 -2174
  161. package/documentation/platform/WEBHOOK.md +0 -485
  162. package/documentation/public/CONFIGURATION.md +0 -325
  163. package/documentation/public/INVENTORY.md +0 -508
  164. package/documentation/public/WEBHOOK.md +0 -246
  165. package/jest.config.d.ts +0 -4
  166. package/jest.config.js +0 -6
  167. package/tests/application/catalog.spec.js +0 -54
  168. package/tests/common/action-url.spec.js +0 -35
  169. package/tests/common/schema/action-url.json +0 -178
  170. package/tests/common/schema/url-action.json +0 -683
  171. package/tests/common/url-action.spec.js +0 -48
  172. package/tests/helpers/cookie.helper.js +0 -31
  173. package/tests/helpers/oauth.helper.js +0 -43
  174. package/tests/platform/catalog.spec.js +0 -49
  175. 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
-