@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,919 +0,0 @@
1
-
2
-
3
-
4
-
5
-
6
- ##### [Back to Platform docs](./README.md)
7
-
8
- ## Rewards Methods
9
- Earn and redeem reward points
10
-
11
- * [getGiveawayAudienceStatus](#getgiveawayaudiencestatus)
12
- * [getGiveawayById](#getgiveawaybyid)
13
- * [getOfferByName](#getofferbyname)
14
- * [getRewardsConfiguration](#getrewardsconfiguration)
15
- * [getUserPointsHistory](#getuserpointshistory)
16
- * [saveGiveAway](#savegiveaway)
17
- * [setRewardsConfiguration](#setrewardsconfiguration)
18
- * [showGiveaways](#showgiveaways)
19
- * [showOffers](#showoffers)
20
- * [updateGiveAway](#updategiveaway)
21
- * [updateOfferByName](#updateofferbyname)
22
- * [updateUserStatus](#updateuserstatus)
23
- * [user](#user)
24
-
25
-
26
-
27
- ## Methods with example and description
28
-
29
-
30
-
31
-
32
- ### getGiveawayAudienceStatus
33
- Get the Giveaway audience status
34
-
35
-
36
-
37
- ```javascript
38
- // Promise
39
- const promise = client.application("<APPLICATION_ID>").rewards.getGiveawayAudienceStatus({ audienceId : value });
40
-
41
- // Async/Await
42
- const data = await client.application("<APPLICATION_ID>").rewards.getGiveawayAudienceStatus({ audienceId : value });
43
- ```
44
-
45
-
46
-
47
-
48
-
49
- | Argument | Type | Required | Description |
50
- | --------- | ----- | -------- | ----------- |
51
- | audienceId | string | yes | audience id |
52
-
53
-
54
-
55
- Get giveaway audience status
56
-
57
- *Returned Response:*
58
-
59
-
60
-
61
-
62
- [GiveawayAudience](#GiveawayAudience)
63
-
64
- Success
65
-
66
-
67
-
68
-
69
- <details>
70
- <summary><i>&nbsp; Example:</i></summary>
71
-
72
- ```json
73
-
74
- ```
75
- </details>
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
- ---
86
-
87
-
88
- ### getGiveawayById
89
- Get giveaway by ID.
90
-
91
-
92
-
93
- ```javascript
94
- // Promise
95
- const promise = client.application("<APPLICATION_ID>").rewards.getGiveawayById({ id : value });
96
-
97
- // Async/Await
98
- const data = await client.application("<APPLICATION_ID>").rewards.getGiveawayById({ id : value });
99
- ```
100
-
101
-
102
-
103
-
104
-
105
- | Argument | Type | Required | Description |
106
- | --------- | ----- | -------- | ----------- |
107
- | id | string | yes | Giveaway ID |
108
-
109
-
110
-
111
- Get giveaway by ID.
112
-
113
- *Returned Response:*
114
-
115
-
116
-
117
-
118
- [Giveaway](#Giveaway)
119
-
120
- ok
121
-
122
-
123
-
124
-
125
- <details>
126
- <summary><i>&nbsp; Example:</i></summary>
127
-
128
- ```json
129
-
130
- ```
131
- </details>
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
-
141
- ---
142
-
143
-
144
- ### getOfferByName
145
- Get offer by name
146
-
147
-
148
-
149
- ```javascript
150
- // Promise
151
- const promise = client.application("<APPLICATION_ID>").rewards.getOfferByName({ name : value,
152
- cookie : value });
153
-
154
- // Async/Await
155
- const data = await client.application("<APPLICATION_ID>").rewards.getOfferByName({ name : value,
156
- cookie : value });
157
- ```
158
-
159
-
160
-
161
-
162
-
163
- | Argument | Type | Required | Description |
164
- | --------- | ----- | -------- | ----------- |
165
- | name | string | yes | The name given to the offer. |
166
- | cookie | string | yes | User's session cookie. This cookie is set in browser cookie when logged-in to fynd's authentication system i.e. `Grimlock` or by using grimlock-backend SDK for backend implementation. |
167
-
168
-
169
-
170
- Use this API to get the offer details and configuration by entering the name of the offer.
171
-
172
- *Returned Response:*
173
-
174
-
175
-
176
-
177
- [Offer](#Offer)
178
-
179
- Success. Check example below or refer `Offer` for more details.
180
-
181
-
182
-
183
-
184
- <details>
185
- <summary><i>&nbsp; Example:</i></summary>
186
-
187
- ```json
188
-
189
- ```
190
- </details>
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
- ---
201
-
202
-
203
- ### getRewardsConfiguration
204
- Get all valid android paths
205
-
206
-
207
-
208
- ```javascript
209
- // Promise
210
- const promise = client.application("<APPLICATION_ID>").rewards.getRewardsConfiguration();
211
-
212
- // Async/Await
213
- const data = await client.application("<APPLICATION_ID>").rewards.getRewardsConfiguration();
214
- ```
215
-
216
-
217
-
218
-
219
-
220
-
221
- Use this API to get a list of valid android paths required by the Rewards INIT API to validate a fradualent device.
222
-
223
- *Returned Response:*
224
-
225
-
226
-
227
-
228
- [ConfigurationRes](#ConfigurationRes)
229
-
230
- Success. Refer `ConfigurationRes` for more details.
231
-
232
-
233
-
234
-
235
- <details>
236
- <summary><i>&nbsp; Example:</i></summary>
237
-
238
- ```json
239
-
240
- ```
241
- </details>
242
-
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
- ---
252
-
253
-
254
- ### getUserPointsHistory
255
- Get all transactions of reward points
256
-
257
-
258
-
259
- ```javascript
260
- // Promise
261
- const promise = client.application("<APPLICATION_ID>").rewards.getUserPointsHistory({ userId : value,
262
- pageId : value,
263
- pageSize : value });
264
-
265
- // Async/Await
266
- const data = await client.application("<APPLICATION_ID>").rewards.getUserPointsHistory({ userId : value,
267
- pageId : value,
268
- pageSize : value });
269
- ```
270
-
271
-
272
-
273
-
274
-
275
- | Argument | Type | Required | Description |
276
- | --------- | ----- | -------- | ----------- |
277
- | userId | string | yes | user id |
278
- | pageId | string | no | PageID is the ID of the requested page. For first request it should be kept empty. |
279
- | pageSize | number | no | The number of items to retrieve in each page. |
280
-
281
-
282
-
283
- Use this API to get a list of points transactions.
284
-
285
- *Returned Response:*
286
-
287
-
288
-
289
-
290
- [HistoryRes](#HistoryRes)
291
-
292
- Success. Check example below or refer `HistoryRes` for more details.
293
-
294
-
295
-
296
-
297
- <details>
298
- <summary><i>&nbsp; Example:</i></summary>
299
-
300
- ```json
301
-
302
- ```
303
- </details>
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
- ---
314
-
315
-
316
- ### saveGiveAway
317
- List of giveaways of the current application.
318
-
319
-
320
-
321
- ```javascript
322
- // Promise
323
- const promise = client.application("<APPLICATION_ID>").rewards.saveGiveAway({ body : value });
324
-
325
- // Async/Await
326
- const data = await client.application("<APPLICATION_ID>").rewards.saveGiveAway({ body : value });
327
- ```
328
-
329
-
330
-
331
-
332
-
333
- | Argument | Type | Required | Description |
334
- | --------- | ----- | -------- | ----------- |
335
- | body | [Giveaway](#Giveaway) | yes | Request body |
336
-
337
-
338
- Adds a new giveaway.
339
-
340
- *Returned Response:*
341
-
342
-
343
-
344
-
345
- [Giveaway](#Giveaway)
346
-
347
- ok
348
-
349
-
350
-
351
-
352
- <details>
353
- <summary><i>&nbsp; Example:</i></summary>
354
-
355
- ```json
356
-
357
- ```
358
- </details>
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
- ---
369
-
370
-
371
- ### setRewardsConfiguration
372
- Updates the collection with given android paths.
373
-
374
-
375
-
376
- ```javascript
377
- // Promise
378
- const promise = client.application("<APPLICATION_ID>").rewards.setRewardsConfiguration({ body : value });
379
-
380
- // Async/Await
381
- const data = await client.application("<APPLICATION_ID>").rewards.setRewardsConfiguration({ body : value });
382
- ```
383
-
384
-
385
-
386
-
387
-
388
- | Argument | Type | Required | Description |
389
- | --------- | ----- | -------- | ----------- |
390
- | body | [ConfigurationRequest](#ConfigurationRequest) | yes | Request body |
391
-
392
-
393
- Updates the configuration or inserts new records.
394
-
395
- *Returned Response:*
396
-
397
-
398
-
399
-
400
- [SetConfigurationRes](#SetConfigurationRes)
401
-
402
- ok
403
-
404
-
405
-
406
-
407
- <details>
408
- <summary><i>&nbsp; Example:</i></summary>
409
-
410
- ```json
411
-
412
- ```
413
- </details>
414
-
415
-
416
-
417
-
418
-
419
-
420
-
421
-
422
-
423
- ---
424
-
425
-
426
- ### showGiveaways
427
- List of giveaways of the current application.
428
-
429
-
430
-
431
- ```javascript
432
- // Promise
433
- const promise = client.application("<APPLICATION_ID>").rewards.showGiveaways({ pageId : value,
434
- pageSize : value });
435
-
436
- // Async/Await
437
- const data = await client.application("<APPLICATION_ID>").rewards.showGiveaways({ pageId : value,
438
- pageSize : value });
439
- ```
440
-
441
-
442
-
443
-
444
-
445
- | Argument | Type | Required | Description |
446
- | --------- | ----- | -------- | ----------- |
447
- | pageId | string | yes | pagination page id |
448
- | pageSize | number | yes | pagination page size |
449
-
450
-
451
-
452
- List of giveaways of the current application.
453
-
454
- *Returned Response:*
455
-
456
-
457
-
458
-
459
- [GiveawayResponse](#GiveawayResponse)
460
-
461
- ok
462
-
463
-
464
-
465
-
466
- <details>
467
- <summary><i>&nbsp; Example:</i></summary>
468
-
469
- ```json
470
-
471
- ```
472
- </details>
473
-
474
-
475
-
476
-
477
-
478
-
479
-
480
-
481
-
482
- ---
483
-
484
-
485
- ### showOffers
486
- List of offers of the current application.
487
-
488
-
489
-
490
- ```javascript
491
- // Promise
492
- const promise = client.application("<APPLICATION_ID>").rewards.showOffers();
493
-
494
- // Async/Await
495
- const data = await client.application("<APPLICATION_ID>").rewards.showOffers();
496
- ```
497
-
498
-
499
-
500
-
501
-
502
-
503
- List of offers of the current application.
504
-
505
- *Returned Response:*
506
-
507
-
508
-
509
-
510
- [Array<Offer>](#Array<Offer>)
511
-
512
- ok
513
-
514
-
515
-
516
-
517
- <details>
518
- <summary><i>&nbsp; Example:</i></summary>
519
-
520
- ```json
521
-
522
- ```
523
- </details>
524
-
525
-
526
-
527
-
528
-
529
-
530
-
531
-
532
-
533
- ---
534
-
535
-
536
- ### updateGiveAway
537
- Updates the giveaway by it's ID.
538
-
539
-
540
-
541
- ```javascript
542
- // Promise
543
- const promise = client.application("<APPLICATION_ID>").rewards.updateGiveAway({ id : value,
544
- body : value });
545
-
546
- // Async/Await
547
- const data = await client.application("<APPLICATION_ID>").rewards.updateGiveAway({ id : value,
548
- body : value });
549
- ```
550
-
551
-
552
-
553
-
554
-
555
- | Argument | Type | Required | Description |
556
- | --------- | ----- | -------- | ----------- |
557
- | id | string | yes | Giveaway ID |
558
- | body | [Giveaway](#Giveaway) | yes | Request body |
559
-
560
-
561
- Updates the giveaway by it's ID.
562
-
563
- *Returned Response:*
564
-
565
-
566
-
567
-
568
- [Giveaway](#Giveaway)
569
-
570
- ok
571
-
572
-
573
-
574
-
575
- <details>
576
- <summary><i>&nbsp; Example:</i></summary>
577
-
578
- ```json
579
-
580
- ```
581
- </details>
582
-
583
-
584
-
585
-
586
-
587
-
588
-
589
-
590
-
591
- ---
592
-
593
-
594
- ### updateOfferByName
595
- Update offer by name
596
-
597
-
598
-
599
- ```javascript
600
- // Promise
601
- const promise = client.application("<APPLICATION_ID>").rewards.updateOfferByName({ name : value,
602
- body : value });
603
-
604
- // Async/Await
605
- const data = await client.application("<APPLICATION_ID>").rewards.updateOfferByName({ name : value,
606
- body : value });
607
- ```
608
-
609
-
610
-
611
-
612
-
613
- | Argument | Type | Required | Description |
614
- | --------- | ----- | -------- | ----------- |
615
- | name | string | yes | The name given to the offer. |
616
- | body | [Offer](#Offer) | yes | Request body |
617
-
618
-
619
- Use this API to update the offer details
620
-
621
- *Returned Response:*
622
-
623
-
624
-
625
-
626
- [Offer](#Offer)
627
-
628
- Success. Check example below or refer `Offer` for more details.
629
-
630
-
631
-
632
-
633
- <details>
634
- <summary><i>&nbsp; Example:</i></summary>
635
-
636
- ```json
637
-
638
- ```
639
- </details>
640
-
641
-
642
-
643
-
644
-
645
-
646
-
647
-
648
-
649
- ---
650
-
651
-
652
- ### updateUserStatus
653
- Update user status
654
-
655
-
656
-
657
- ```javascript
658
- // Promise
659
- const promise = client.application("<APPLICATION_ID>").rewards.updateUserStatus({ userId : value,
660
- body : value });
661
-
662
- // Async/Await
663
- const data = await client.application("<APPLICATION_ID>").rewards.updateUserStatus({ userId : value,
664
- body : value });
665
- ```
666
-
667
-
668
-
669
-
670
-
671
- | Argument | Type | Required | Description |
672
- | --------- | ----- | -------- | ----------- |
673
- | userId | string | yes | user id |
674
- | body | [AppUser](#AppUser) | yes | Request body |
675
-
676
-
677
- Use this API to update the user status active/archive
678
-
679
- *Returned Response:*
680
-
681
-
682
-
683
-
684
- [AppUser](#AppUser)
685
-
686
- Success
687
-
688
-
689
-
690
-
691
- <details>
692
- <summary><i>&nbsp; Example:</i></summary>
693
-
694
- ```json
695
-
696
- ```
697
- </details>
698
-
699
-
700
-
701
-
702
-
703
-
704
-
705
-
706
-
707
- ---
708
-
709
-
710
- ### user
711
- Get user reward details
712
-
713
-
714
-
715
- ```javascript
716
- // Promise
717
- const promise = client.application("<APPLICATION_ID>").rewards.user({ userId : value });
718
-
719
- // Async/Await
720
- const data = await client.application("<APPLICATION_ID>").rewards.user({ userId : value });
721
- ```
722
-
723
-
724
-
725
-
726
-
727
- | Argument | Type | Required | Description |
728
- | --------- | ----- | -------- | ----------- |
729
- | userId | string | yes | user id |
730
-
731
-
732
-
733
- Use this API to get the user reward details
734
-
735
- *Returned Response:*
736
-
737
-
738
-
739
-
740
- [UserRes](#UserRes)
741
-
742
- Success. Check example below or refer `UserRes` for more details.
743
-
744
-
745
-
746
-
747
- <details>
748
- <summary><i>&nbsp; Example:</i></summary>
749
-
750
- ```json
751
-
752
- ```
753
- </details>
754
-
755
-
756
-
757
-
758
-
759
-
760
-
761
-
762
-
763
- ---
764
-
765
-
766
-
767
- ### Schemas
768
-
769
-
770
- #### [AppUser](#AppUser)
771
-
772
- | Properties | Type | Nullable | Description |
773
- | ---------- | ---- | -------- | ----------- || _id | string | no | || active | boolean | no | || application_id | string | no | || block_reason | string | no | || updated_at | string | no | || updated_by | string | no | || user_id | string | no | |
774
-
775
- ---
776
-
777
- #### [Asset](#Asset)
778
-
779
- | Properties | Type | Nullable | Description |
780
- | ---------- | ---- | -------- | ----------- || aspect_ratio | string | no | || id | string | no | || secure_url | string | no | |
781
-
782
- ---
783
-
784
- #### [ConfigurationRequest](#ConfigurationRequest)
785
-
786
- | Properties | Type | Nullable | Description |
787
- | ---------- | ---- | -------- | ----------- || terms_conditions_link | string | no | || valid_android_packages | [string] | no | |
788
-
789
- ---
790
-
791
- #### [ConfigurationRes](#ConfigurationRes)
792
-
793
- | Properties | Type | Nullable | Description |
794
- | ---------- | ---- | -------- | ----------- || application_id | string | no | || success | boolean | no | || terms_conditions_link | string | no | || valid_android_packages | [string] | no | |
795
-
796
- ---
797
-
798
- #### [E](#E)
799
-
800
- | Properties | Type | Nullable | Description |
801
- | ---------- | ---- | -------- | ----------- || code | number | no | || exception | string | no | || info | string | no | || message | string | no | |
802
-
803
- ---
804
-
805
- #### [Giveaway](#Giveaway)
806
-
807
- | Properties | Type | Nullable | Description |
808
- | ---------- | ---- | -------- | ----------- || _id | string | no | || _schedule | [Schedule](#Schedule) | no | || active | boolean | no | || application_id | string | no | || audience | [RewardsAudience](#RewardsAudience) | no | || banner_image | [Asset](#Asset) | no | || created_at | string | no | || description | string | no | || name | string | no | || rule | [RewardsRule](#RewardsRule) | no | || title | string | no | || updated_at | string | no | |
809
-
810
- ---
811
-
812
- #### [GiveawayAudience](#GiveawayAudience)
813
-
814
- | Properties | Type | Nullable | Description |
815
- | ---------- | ---- | -------- | ----------- || audience_id | string | no | || current_count | number | no | |
816
-
817
- ---
818
-
819
- #### [GiveawayResponse](#GiveawayResponse)
820
-
821
- | Properties | Type | Nullable | Description |
822
- | ---------- | ---- | -------- | ----------- || items | [[Giveaway](#Giveaway)] | no | || page | [Page](#Page) | no | |
823
-
824
- ---
825
-
826
- #### [HistoryRes](#HistoryRes)
827
-
828
- | Properties | Type | Nullable | Description |
829
- | ---------- | ---- | -------- | ----------- || items | [[PointsHistory](#PointsHistory)] | no | || page | [Page](#Page) | no | || points | number | no | |
830
-
831
- ---
832
-
833
- #### [Offer](#Offer)
834
-
835
- | Properties | Type | Nullable | Description |
836
- | ---------- | ---- | -------- | ----------- || _schedule | [Schedule](#Schedule) | no | || active | boolean | no | || application_id | string | no | || banner_image | [Asset](#Asset) | no | || created_at | string | no | || name | string | no | || rule | string | no | || share | [ShareMessages](#ShareMessages) | no | || sub_text | string | no | || text | string | no | || type | string | no | || updated_at | string | no | || updated_by | string | no | || url | string | no | |
837
-
838
- ---
839
-
840
- #### [Page](#Page)
841
-
842
- | Properties | Type | Nullable | Description |
843
- | ---------- | ---- | -------- | ----------- || current | number | no | || has_next | boolean | no | || has_previous | boolean | no | || item_total | number | no | || next_id | string | no | || size | number | no | || type | string | yes | |
844
-
845
- ---
846
-
847
- #### [Points](#Points)
848
-
849
- | Properties | Type | Nullable | Description |
850
- | ---------- | ---- | -------- | ----------- || available | number | no | |
851
-
852
- ---
853
-
854
- #### [PointsHistory](#PointsHistory)
855
-
856
- | Properties | Type | Nullable | Description |
857
- | ---------- | ---- | -------- | ----------- || _id | string | no | || application_id | string | no | || claimed | boolean | no | || created_at | string | no | || expires_on | string | no | || meta | string | no | || points | number | no | || remaining_points | number | no | || text_1 | string | no | || text_2 | string | no | || text_3 | string | no | || txn_name | string | no | || updated_at | string | no | || user_id | string | no | |
858
-
859
- ---
860
-
861
- #### [Referral](#Referral)
862
-
863
- | Properties | Type | Nullable | Description |
864
- | ---------- | ---- | -------- | ----------- || code | string | no | |
865
-
866
- ---
867
-
868
- #### [RewardsAudience](#RewardsAudience)
869
-
870
- | Properties | Type | Nullable | Description |
871
- | ---------- | ---- | -------- | ----------- || header_user_id | string | no | || id | string | no | |
872
-
873
- ---
874
-
875
- #### [RewardsRule](#RewardsRule)
876
-
877
- | Properties | Type | Nullable | Description |
878
- | ---------- | ---- | -------- | ----------- || amount | number | no | |
879
-
880
- ---
881
-
882
- #### [RewardUser](#RewardUser)
883
-
884
- | Properties | Type | Nullable | Description |
885
- | ---------- | ---- | -------- | ----------- || _id | string | no | || active | boolean | no | || created_at | string | no | || referral | [Referral](#Referral) | no | || uid | number | no | || updated_at | string | no | || user_block_reason | string | no | || user_id | string | no | |
886
-
887
- ---
888
-
889
- #### [Schedule](#Schedule)
890
-
891
- | Properties | Type | Nullable | Description |
892
- | ---------- | ---- | -------- | ----------- || cron | string | no | || duration | number | no | || end | string | no | || start | string | no | |
893
-
894
- ---
895
-
896
- #### [SetConfigurationRes](#SetConfigurationRes)
897
-
898
- | Properties | Type | Nullable | Description |
899
- | ---------- | ---- | -------- | ----------- || success | boolean | no | |
900
-
901
- ---
902
-
903
- #### [ShareMessages](#ShareMessages)
904
-
905
- | Properties | Type | Nullable | Description |
906
- | ---------- | ---- | -------- | ----------- || email | number | no | || facebook | string | no | || fallback | string | no | || message | string | no | || messenger | string | no | || sms | string | no | || text | string | no | || twitter | string | no | || whatsapp | string | no | |
907
-
908
- ---
909
-
910
- #### [UserRes](#UserRes)
911
-
912
- | Properties | Type | Nullable | Description |
913
- | ---------- | ---- | -------- | ----------- || points | [Points](#Points) | no | || user | [RewardUser](#RewardUser) | no | |
914
-
915
- ---
916
-
917
-
918
-
919
-