@gofynd/fdk-client-javascript 0.1.35 → 0.1.36
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.
- package/README.md +1 -1
- package/documentation/application/CART.md +256 -239
- package/documentation/application/CATALOG.md +413 -409
- package/documentation/application/COMMON.md +4 -0
- package/documentation/application/COMMUNICATION.md +4 -0
- package/documentation/application/CONFIGURATION.md +4 -0
- package/documentation/application/CONTENT.md +7 -20
- package/documentation/application/FILESTORAGE.md +85 -0
- package/documentation/application/LEAD.md +6 -2
- package/documentation/application/LOGISTIC.md +4 -0
- package/documentation/application/ORDER.md +307 -303
- package/documentation/application/PAYMENT.md +445 -259
- package/documentation/application/POSCART.md +317 -300
- package/documentation/application/REWARDS.md +153 -160
- package/documentation/application/SHARE.md +4 -0
- package/documentation/application/THEME.md +4 -0
- package/documentation/application/USER.md +4 -0
- package/documentation/platform/ANALYTICS.md +4 -0
- package/documentation/platform/AUDITTRAIL.md +4 -0
- package/documentation/platform/BILLING.md +4 -0
- package/documentation/platform/CART.md +480 -463
- package/documentation/platform/CATALOG.md +3895 -2942
- package/documentation/platform/COMMON.md +4 -0
- package/documentation/platform/COMMUNICATION.md +4 -0
- package/documentation/platform/COMPANYPROFILE.md +224 -193
- package/documentation/platform/CONFIGURATION.md +4 -0
- package/documentation/platform/CONTENT.md +8 -21
- package/documentation/platform/DISCOUNT.md +4 -0
- package/documentation/platform/FILESTORAGE.md +85 -0
- package/documentation/platform/INVENTORY.md +4 -0
- package/documentation/platform/LEAD.md +6 -2
- package/documentation/platform/ORDER.md +6298 -1448
- package/documentation/platform/PARTNER.md +12 -8
- package/documentation/platform/PAYMENT.md +107 -103
- package/documentation/platform/README.md +2 -2
- package/documentation/platform/REWARDS.md +219 -152
- package/documentation/platform/SHARE.md +4 -0
- package/documentation/platform/THEME.md +4 -0
- package/documentation/platform/USER.md +4 -0
- package/documentation/platform/WEBHOOK.md +4 -0
- package/documentation/public/CONFIGURATION.md +4 -0
- package/documentation/public/INVENTORY.md +4 -0
- package/documentation/public/WEBHOOK.md +4 -0
- package/package.json +1 -1
- package/sdk/application/ApplicationModels.d.ts +77 -73
- package/sdk/application/ApplicationModels.js +1751 -1725
- package/sdk/application/client/CartApplicationClient.d.ts +36 -36
- package/sdk/application/client/CatalogApplicationClient.d.ts +39 -39
- package/sdk/application/client/CatalogApplicationClient.js +16 -16
- package/sdk/application/client/CommonApplicationClient.d.ts +2 -2
- package/sdk/application/client/CommunicationApplicationClient.d.ts +5 -5
- package/sdk/application/client/ConfigurationApplicationClient.d.ts +17 -17
- package/sdk/application/client/ContentApplicationClient.d.ts +19 -19
- package/sdk/application/client/FileStorageApplicationClient.d.ts +14 -6
- package/sdk/application/client/FileStorageApplicationClient.js +2 -0
- package/sdk/application/client/LeadApplicationClient.d.ts +10 -10
- package/sdk/application/client/LogisticApplicationClient.d.ts +5 -5
- package/sdk/application/client/OrderApplicationClient.d.ts +15 -15
- package/sdk/application/client/OrderApplicationClient.js +1 -1
- package/sdk/application/client/PaymentApplicationClient.d.ts +79 -57
- package/sdk/application/client/PaymentApplicationClient.js +66 -0
- package/sdk/application/client/PosCartApplicationClient.d.ts +38 -38
- package/sdk/application/client/RewardsApplicationClient.d.ts +34 -34
- package/sdk/application/client/RewardsApplicationClient.js +77 -77
- package/sdk/application/client/ShareApplicationClient.d.ts +8 -8
- package/sdk/application/client/ThemeApplicationClient.d.ts +4 -4
- package/sdk/application/client/UserApplicationClient.d.ts +63 -63
- package/sdk/application/models/CatalogValidator.d.ts +1 -1
- package/sdk/application/models/CatalogValidator.js +2 -2
- package/sdk/application/models/PaymentValidator.d.ts +2 -0
- package/sdk/application/models/PaymentValidator.js +12 -0
- package/sdk/application/models/RewardsValidator.d.ts +3 -3
- package/sdk/application/models/RewardsValidator.js +12 -12
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/common/Constant.d.ts +9 -0
- package/sdk/common/Constant.js +11 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +8600 -7286
- package/sdk/platform/PlatformApplicationClient.js +4338 -3678
- package/sdk/platform/PlatformApplicationModels.d.ts +21 -26
- package/sdk/platform/PlatformApplicationModels.js +5561 -4301
- package/sdk/platform/PlatformClient.d.ts +3448 -2801
- package/sdk/platform/PlatformClient.js +3903 -3108
- package/sdk/platform/PlatformModels.d.ts +352 -278
- package/sdk/platform/PlatformModels.js +5230 -3942
- package/sdk/platform/client/AnalyticsPlatformClient.d.ts +5 -5
- package/sdk/platform/client/AuditTrailPlatformClient.d.ts +1 -1
- package/sdk/platform/client/BillingPlatformClient.d.ts +4 -4
- package/sdk/platform/client/CatalogPlatformClient.d.ts +209 -150
- package/sdk/platform/client/CatalogPlatformClient.js +441 -294
- package/sdk/platform/client/CompanyProfilePlatformClient.d.ts +8 -8
- package/sdk/platform/client/ConfigurationPlatformClient.d.ts +9 -9
- package/sdk/platform/client/DiscountPlatformClient.d.ts +4 -4
- package/sdk/platform/client/FileStoragePlatformClient.d.ts +20 -4
- package/sdk/platform/client/FileStoragePlatformClient.js +49 -0
- package/sdk/platform/client/InventoryPlatformClient.d.ts +3 -3
- package/sdk/platform/client/LeadPlatformClient.d.ts +6 -6
- package/sdk/platform/client/OrderPlatformClient.d.ts +557 -131
- package/sdk/platform/client/OrderPlatformClient.js +1551 -247
- package/sdk/platform/client/PaymentPlatformClient.d.ts +4 -4
- package/sdk/platform/client/WebhookPlatformClient.d.ts +2 -2
- package/sdk/platform/models/CatalogValidator.d.ts +24 -21
- package/sdk/platform/models/CatalogValidator.js +103 -72
- package/sdk/platform/models/OrderValidator.d.ts +43 -11
- package/sdk/platform/models/OrderValidator.js +312 -51
- package/sdk/public/client/ConfigurationPublicClient.d.ts +2 -2
- package/sdk/public/client/InventoryPublicClient.d.ts +7 -7
- package/sdk/public/client/WebhookPublicClient.d.ts +3 -3
- package/tests/common/schema/action-url.json +15 -0
- package/tests/common/schema/url-action.json +16 -0
|
@@ -2,19 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
##### [Back to Platform docs](./README.md)
|
|
6
7
|
|
|
7
8
|
## Rewards Methods
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* [
|
|
11
|
-
* [
|
|
12
|
-
* [
|
|
13
|
-
* [
|
|
9
|
+
Earn and redeem reward points
|
|
10
|
+
|
|
11
|
+
* [showGiveaways](#showgiveaways)
|
|
12
|
+
* [saveGiveAway](#savegiveaway)
|
|
13
|
+
* [getGiveawayById](#getgiveawaybyid)
|
|
14
|
+
* [updateGiveAway](#updategiveaway)
|
|
15
|
+
* [getGiveawayAudienceStatus](#getgiveawayaudiencestatus)
|
|
16
|
+
* [showOffers](#showoffers)
|
|
14
17
|
* [getOfferByName](#getofferbyname)
|
|
15
18
|
* [updateOfferByName](#updateofferbyname)
|
|
16
|
-
* [getUserAvailablePoints](#getuseravailablepoints)
|
|
17
19
|
* [updateUserStatus](#updateuserstatus)
|
|
20
|
+
* [user](#user)
|
|
18
21
|
* [getUserPointsHistory](#getuserpointshistory)
|
|
19
22
|
|
|
20
23
|
|
|
@@ -22,18 +25,20 @@ Rewards
|
|
|
22
25
|
## Methods with example and description
|
|
23
26
|
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### showGiveaways
|
|
26
31
|
List of giveaways of the current application.
|
|
27
32
|
|
|
28
33
|
|
|
29
34
|
|
|
30
35
|
```javascript
|
|
31
36
|
// Promise
|
|
32
|
-
const promise = client.application("<APPLICATION_ID>").rewards.
|
|
37
|
+
const promise = client.application("<APPLICATION_ID>").rewards.showGiveaways({ pageId : value,
|
|
33
38
|
pageSize : value });
|
|
34
39
|
|
|
35
40
|
// Async/Await
|
|
36
|
-
const data = await client.application("<APPLICATION_ID>").rewards.
|
|
41
|
+
const data = await client.application("<APPLICATION_ID>").rewards.showGiveaways({ pageId : value,
|
|
37
42
|
pageSize : value });
|
|
38
43
|
```
|
|
39
44
|
|
|
@@ -42,9 +47,9 @@ const data = await client.application("<APPLICATION_ID>").rewards.getGiveaways({
|
|
|
42
47
|
|
|
43
48
|
|
|
44
49
|
| Argument | Type | Required | Description |
|
|
45
|
-
| --------- | ----- | -------- | ----------- |
|
|
46
|
-
| pageId | string |
|
|
47
|
-
| pageSize | number |
|
|
50
|
+
| --------- | ----- | -------- | ----------- |
|
|
51
|
+
| pageId | string | yes | pagination page id |
|
|
52
|
+
| pageSize | number | yes | pagination page size |
|
|
48
53
|
|
|
49
54
|
|
|
50
55
|
|
|
@@ -81,17 +86,17 @@ ok
|
|
|
81
86
|
---
|
|
82
87
|
|
|
83
88
|
|
|
84
|
-
###
|
|
85
|
-
|
|
89
|
+
### saveGiveAway
|
|
90
|
+
List of giveaways of the current application.
|
|
86
91
|
|
|
87
92
|
|
|
88
93
|
|
|
89
94
|
```javascript
|
|
90
95
|
// Promise
|
|
91
|
-
const promise = client.application("<APPLICATION_ID>").rewards.
|
|
96
|
+
const promise = client.application("<APPLICATION_ID>").rewards.saveGiveAway({ body : value });
|
|
92
97
|
|
|
93
98
|
// Async/Await
|
|
94
|
-
const data = await client.application("<APPLICATION_ID>").rewards.
|
|
99
|
+
const data = await client.application("<APPLICATION_ID>").rewards.saveGiveAway({ body : value });
|
|
95
100
|
```
|
|
96
101
|
|
|
97
102
|
|
|
@@ -136,17 +141,17 @@ ok
|
|
|
136
141
|
---
|
|
137
142
|
|
|
138
143
|
|
|
139
|
-
###
|
|
144
|
+
### getGiveawayById
|
|
140
145
|
Get giveaway by ID.
|
|
141
146
|
|
|
142
147
|
|
|
143
148
|
|
|
144
149
|
```javascript
|
|
145
150
|
// Promise
|
|
146
|
-
const promise = client.application("<APPLICATION_ID>").rewards.
|
|
151
|
+
const promise = client.application("<APPLICATION_ID>").rewards.getGiveawayById({ id : value });
|
|
147
152
|
|
|
148
153
|
// Async/Await
|
|
149
|
-
const data = await client.application("<APPLICATION_ID>").rewards.
|
|
154
|
+
const data = await client.application("<APPLICATION_ID>").rewards.getGiveawayById({ id : value });
|
|
150
155
|
```
|
|
151
156
|
|
|
152
157
|
|
|
@@ -192,18 +197,18 @@ ok
|
|
|
192
197
|
---
|
|
193
198
|
|
|
194
199
|
|
|
195
|
-
###
|
|
200
|
+
### updateGiveAway
|
|
196
201
|
Updates the giveaway by it's ID.
|
|
197
202
|
|
|
198
203
|
|
|
199
204
|
|
|
200
205
|
```javascript
|
|
201
206
|
// Promise
|
|
202
|
-
const promise = client.application("<APPLICATION_ID>").rewards.
|
|
207
|
+
const promise = client.application("<APPLICATION_ID>").rewards.updateGiveAway({ id : value,
|
|
203
208
|
body : value });
|
|
204
209
|
|
|
205
210
|
// Async/Await
|
|
206
|
-
const data = await client.application("<APPLICATION_ID>").rewards.
|
|
211
|
+
const data = await client.application("<APPLICATION_ID>").rewards.updateGiveAway({ id : value,
|
|
207
212
|
body : value });
|
|
208
213
|
```
|
|
209
214
|
|
|
@@ -250,17 +255,73 @@ ok
|
|
|
250
255
|
---
|
|
251
256
|
|
|
252
257
|
|
|
253
|
-
###
|
|
254
|
-
|
|
258
|
+
### getGiveawayAudienceStatus
|
|
259
|
+
Get the Giveaway audience status
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
```javascript
|
|
264
|
+
// Promise
|
|
265
|
+
const promise = client.application("<APPLICATION_ID>").rewards.getGiveawayAudienceStatus({ audienceId : value });
|
|
266
|
+
|
|
267
|
+
// Async/Await
|
|
268
|
+
const data = await client.application("<APPLICATION_ID>").rewards.getGiveawayAudienceStatus({ audienceId : value });
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
| Argument | Type | Required | Description |
|
|
276
|
+
| --------- | ----- | -------- | ----------- |
|
|
277
|
+
| audienceId | string | yes | audience id |
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
Get giveaway audience status
|
|
282
|
+
|
|
283
|
+
*Returned Response:*
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
[GiveawayAudience](#GiveawayAudience)
|
|
289
|
+
|
|
290
|
+
Success
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
<details>
|
|
296
|
+
<summary><i> Example:</i></summary>
|
|
297
|
+
|
|
298
|
+
```json
|
|
299
|
+
|
|
300
|
+
```
|
|
301
|
+
</details>
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
### showOffers
|
|
315
|
+
List of offers of the current application.
|
|
255
316
|
|
|
256
317
|
|
|
257
318
|
|
|
258
319
|
```javascript
|
|
259
320
|
// Promise
|
|
260
|
-
const promise = client.application("<APPLICATION_ID>").rewards.
|
|
321
|
+
const promise = client.application("<APPLICATION_ID>").rewards.showOffers();
|
|
261
322
|
|
|
262
323
|
// Async/Await
|
|
263
|
-
const data = await client.application("<APPLICATION_ID>").rewards.
|
|
324
|
+
const data = await client.application("<APPLICATION_ID>").rewards.showOffers();
|
|
264
325
|
```
|
|
265
326
|
|
|
266
327
|
|
|
@@ -268,7 +329,7 @@ const data = await client.application("<APPLICATION_ID>").rewards.getOffers();
|
|
|
268
329
|
|
|
269
330
|
|
|
270
331
|
|
|
271
|
-
List of
|
|
332
|
+
List of offers of the current application.
|
|
272
333
|
|
|
273
334
|
*Returned Response:*
|
|
274
335
|
|
|
@@ -302,18 +363,18 @@ ok
|
|
|
302
363
|
|
|
303
364
|
|
|
304
365
|
### getOfferByName
|
|
305
|
-
Get offer by name
|
|
366
|
+
Get offer by name
|
|
306
367
|
|
|
307
368
|
|
|
308
369
|
|
|
309
370
|
```javascript
|
|
310
371
|
// Promise
|
|
311
|
-
const promise = client.application("<APPLICATION_ID>").rewards.getOfferByName({
|
|
312
|
-
|
|
372
|
+
const promise = client.application("<APPLICATION_ID>").rewards.getOfferByName({ name : value,
|
|
373
|
+
cookie : value });
|
|
313
374
|
|
|
314
375
|
// Async/Await
|
|
315
|
-
const data = await client.application("<APPLICATION_ID>").rewards.getOfferByName({
|
|
316
|
-
|
|
376
|
+
const data = await client.application("<APPLICATION_ID>").rewards.getOfferByName({ name : value,
|
|
377
|
+
cookie : value });
|
|
317
378
|
```
|
|
318
379
|
|
|
319
380
|
|
|
@@ -322,12 +383,12 @@ const data = await client.application("<APPLICATION_ID>").rewards.getOfferByName
|
|
|
322
383
|
|
|
323
384
|
| Argument | Type | Required | Description |
|
|
324
385
|
| --------- | ----- | -------- | ----------- |
|
|
325
|
-
|
|
|
326
|
-
|
|
|
386
|
+
| name | string | yes | The name given to the offer. |
|
|
387
|
+
| 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. |
|
|
327
388
|
|
|
328
389
|
|
|
329
390
|
|
|
330
|
-
|
|
391
|
+
Use this API to get the offer details and configuration by entering the name of the offer.
|
|
331
392
|
|
|
332
393
|
*Returned Response:*
|
|
333
394
|
|
|
@@ -336,7 +397,7 @@ Get offer by name.
|
|
|
336
397
|
|
|
337
398
|
[Offer](#Offer)
|
|
338
399
|
|
|
339
|
-
|
|
400
|
+
Success. Check example below or refer `Offer` for more details.
|
|
340
401
|
|
|
341
402
|
|
|
342
403
|
|
|
@@ -361,7 +422,7 @@ ok
|
|
|
361
422
|
|
|
362
423
|
|
|
363
424
|
### updateOfferByName
|
|
364
|
-
|
|
425
|
+
Update offer by name
|
|
365
426
|
|
|
366
427
|
|
|
367
428
|
|
|
@@ -381,11 +442,11 @@ const data = await client.application("<APPLICATION_ID>").rewards.updateOfferByN
|
|
|
381
442
|
|
|
382
443
|
| Argument | Type | Required | Description |
|
|
383
444
|
| --------- | ----- | -------- | ----------- |
|
|
384
|
-
| name | string | yes |
|
|
445
|
+
| name | string | yes | The name given to the offer. |
|
|
385
446
|
| body | [Offer](#Offer) | yes | Request body |
|
|
386
447
|
|
|
387
448
|
|
|
388
|
-
|
|
449
|
+
Use this API to update the offer details
|
|
389
450
|
|
|
390
451
|
*Returned Response:*
|
|
391
452
|
|
|
@@ -394,7 +455,7 @@ Updates the offer by name.
|
|
|
394
455
|
|
|
395
456
|
[Offer](#Offer)
|
|
396
457
|
|
|
397
|
-
|
|
458
|
+
Success. Check example below or refer `Offer` for more details.
|
|
398
459
|
|
|
399
460
|
|
|
400
461
|
|
|
@@ -418,17 +479,19 @@ ok
|
|
|
418
479
|
---
|
|
419
480
|
|
|
420
481
|
|
|
421
|
-
###
|
|
422
|
-
|
|
482
|
+
### updateUserStatus
|
|
483
|
+
Update user status
|
|
423
484
|
|
|
424
485
|
|
|
425
486
|
|
|
426
487
|
```javascript
|
|
427
488
|
// Promise
|
|
428
|
-
const promise = client.application("<APPLICATION_ID>").rewards.
|
|
489
|
+
const promise = client.application("<APPLICATION_ID>").rewards.updateUserStatus({ userId : value,
|
|
490
|
+
body : value });
|
|
429
491
|
|
|
430
492
|
// Async/Await
|
|
431
|
-
const data = await client.application("<APPLICATION_ID>").rewards.
|
|
493
|
+
const data = await client.application("<APPLICATION_ID>").rewards.updateUserStatus({ userId : value,
|
|
494
|
+
body : value });
|
|
432
495
|
```
|
|
433
496
|
|
|
434
497
|
|
|
@@ -438,19 +501,19 @@ const data = await client.application("<APPLICATION_ID>").rewards.getUserAvailab
|
|
|
438
501
|
| Argument | Type | Required | Description |
|
|
439
502
|
| --------- | ----- | -------- | ----------- |
|
|
440
503
|
| userId | string | yes | user id |
|
|
504
|
+
| body | [AppUser](#AppUser) | yes | Request body |
|
|
441
505
|
|
|
442
506
|
|
|
443
|
-
|
|
444
|
-
User's reward details.
|
|
507
|
+
Use this API to update the user status active/archive
|
|
445
508
|
|
|
446
509
|
*Returned Response:*
|
|
447
510
|
|
|
448
511
|
|
|
449
512
|
|
|
450
513
|
|
|
451
|
-
[
|
|
514
|
+
[AppUser](#AppUser)
|
|
452
515
|
|
|
453
|
-
|
|
516
|
+
Success
|
|
454
517
|
|
|
455
518
|
|
|
456
519
|
|
|
@@ -474,19 +537,17 @@ ok
|
|
|
474
537
|
---
|
|
475
538
|
|
|
476
539
|
|
|
477
|
-
###
|
|
478
|
-
|
|
540
|
+
### user
|
|
541
|
+
Get user reward details
|
|
479
542
|
|
|
480
543
|
|
|
481
544
|
|
|
482
545
|
```javascript
|
|
483
546
|
// Promise
|
|
484
|
-
const promise = client.application("<APPLICATION_ID>").rewards.
|
|
485
|
-
body : value });
|
|
547
|
+
const promise = client.application("<APPLICATION_ID>").rewards.user({ userId : value });
|
|
486
548
|
|
|
487
549
|
// Async/Await
|
|
488
|
-
const data = await client.application("<APPLICATION_ID>").rewards.
|
|
489
|
-
body : value });
|
|
550
|
+
const data = await client.application("<APPLICATION_ID>").rewards.user({ userId : value });
|
|
490
551
|
```
|
|
491
552
|
|
|
492
553
|
|
|
@@ -496,19 +557,19 @@ const data = await client.application("<APPLICATION_ID>").rewards.updateUserStat
|
|
|
496
557
|
| Argument | Type | Required | Description |
|
|
497
558
|
| --------- | ----- | -------- | ----------- |
|
|
498
559
|
| userId | string | yes | user id |
|
|
499
|
-
| body | [AppUser](#AppUser) | yes | Request body |
|
|
500
560
|
|
|
501
561
|
|
|
502
|
-
|
|
562
|
+
|
|
563
|
+
Use this API to get the user reward details
|
|
503
564
|
|
|
504
565
|
*Returned Response:*
|
|
505
566
|
|
|
506
567
|
|
|
507
568
|
|
|
508
569
|
|
|
509
|
-
[
|
|
570
|
+
[UserRes](#UserRes)
|
|
510
571
|
|
|
511
|
-
Success
|
|
572
|
+
Success. Check example below or refer `UserRes` for more details.
|
|
512
573
|
|
|
513
574
|
|
|
514
575
|
|
|
@@ -533,7 +594,7 @@ Success
|
|
|
533
594
|
|
|
534
595
|
|
|
535
596
|
### getUserPointsHistory
|
|
536
|
-
Get
|
|
597
|
+
Get all transactions of reward points
|
|
537
598
|
|
|
538
599
|
|
|
539
600
|
|
|
@@ -541,13 +602,11 @@ Get list of points transactions.
|
|
|
541
602
|
// Promise
|
|
542
603
|
const promise = client.application("<APPLICATION_ID>").rewards.getUserPointsHistory({ userId : value,
|
|
543
604
|
pageId : value,
|
|
544
|
-
pageLimit : value,
|
|
545
605
|
pageSize : value });
|
|
546
606
|
|
|
547
607
|
// Async/Await
|
|
548
608
|
const data = await client.application("<APPLICATION_ID>").rewards.getUserPointsHistory({ userId : value,
|
|
549
609
|
pageId : value,
|
|
550
|
-
pageLimit : value,
|
|
551
610
|
pageSize : value });
|
|
552
611
|
```
|
|
553
612
|
|
|
@@ -559,13 +618,11 @@ const data = await client.application("<APPLICATION_ID>").rewards.getUserPointsH
|
|
|
559
618
|
| --------- | ----- | -------- | ----------- |
|
|
560
619
|
| userId | string | yes | user id |
|
|
561
620
|
| pageId | string | no | PageID is the ID of the requested page. For first request it should be kept empty. |
|
|
562
|
-
|
|
|
563
|
-
| pageSize | number | no | PageSize is the number of requested items in response. |
|
|
621
|
+
| pageSize | number | no | The number of items to retrieve in each page. |
|
|
564
622
|
|
|
565
623
|
|
|
566
624
|
|
|
567
|
-
|
|
568
|
-
The list of points history is paginated.
|
|
625
|
+
Use this API to get a list of points transactions.
|
|
569
626
|
|
|
570
627
|
*Returned Response:*
|
|
571
628
|
|
|
@@ -574,7 +631,7 @@ The list of points history is paginated.
|
|
|
574
631
|
|
|
575
632
|
[HistoryRes](#HistoryRes)
|
|
576
633
|
|
|
577
|
-
|
|
634
|
+
Success. Check example below or refer `HistoryRes` for more details.
|
|
578
635
|
|
|
579
636
|
|
|
580
637
|
|
|
@@ -603,47 +660,26 @@ ok
|
|
|
603
660
|
|
|
604
661
|
|
|
605
662
|
|
|
606
|
-
#### [
|
|
607
|
-
|
|
608
|
-
| Properties | Type | Nullable | Description |
|
|
609
|
-
| ---------- | ---- | -------- | ----------- |
|
|
610
|
-
| _id | string | no | |
|
|
611
|
-
| active | boolean | no | |
|
|
612
|
-
| application_id | string | no | |
|
|
613
|
-
| block_reason | string | no | |
|
|
614
|
-
| updated_at | string | no | |
|
|
615
|
-
| updated_by | string | no | |
|
|
616
|
-
| user_id | string | no | |
|
|
617
|
-
|
|
618
|
-
---
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
#### [Asset](#Asset)
|
|
663
|
+
#### [E](#E)
|
|
624
664
|
|
|
625
665
|
| Properties | Type | Nullable | Description |
|
|
626
666
|
| ---------- | ---- | -------- | ----------- |
|
|
627
|
-
|
|
|
628
|
-
|
|
|
629
|
-
|
|
|
667
|
+
| code | number | no | |
|
|
668
|
+
| exception | string | no | |
|
|
669
|
+
| info | string | no | |
|
|
670
|
+
| message | string | no | |
|
|
630
671
|
|
|
631
672
|
---
|
|
632
673
|
|
|
633
674
|
|
|
634
675
|
|
|
635
676
|
|
|
636
|
-
#### [
|
|
677
|
+
#### [GiveawayResponse](#GiveawayResponse)
|
|
637
678
|
|
|
638
679
|
| Properties | Type | Nullable | Description |
|
|
639
680
|
| ---------- | ---- | -------- | ----------- |
|
|
640
|
-
|
|
|
641
|
-
|
|
|
642
|
-
| info | string | no | |
|
|
643
|
-
| message | string | no | |
|
|
644
|
-
| request_id | string | no | |
|
|
645
|
-
| stack_trace | string | no | |
|
|
646
|
-
| status | number | no | |
|
|
681
|
+
| items | [[Giveaway](#Giveaway)] | no | |
|
|
682
|
+
| page | [Page](#Page) | no | |
|
|
647
683
|
|
|
648
684
|
---
|
|
649
685
|
|
|
@@ -672,48 +708,67 @@ ok
|
|
|
672
708
|
|
|
673
709
|
|
|
674
710
|
|
|
675
|
-
#### [
|
|
711
|
+
#### [Schedule](#Schedule)
|
|
676
712
|
|
|
677
713
|
| Properties | Type | Nullable | Description |
|
|
678
714
|
| ---------- | ---- | -------- | ----------- |
|
|
679
|
-
|
|
|
680
|
-
|
|
|
715
|
+
| duration | number | no | |
|
|
716
|
+
| end | string | no | |
|
|
717
|
+
| start | string | no | |
|
|
718
|
+
| cron | string | no | |
|
|
681
719
|
|
|
682
720
|
---
|
|
683
721
|
|
|
684
722
|
|
|
685
723
|
|
|
686
724
|
|
|
687
|
-
#### [
|
|
725
|
+
#### [RewardsAudience](#RewardsAudience)
|
|
688
726
|
|
|
689
727
|
| Properties | Type | Nullable | Description |
|
|
690
728
|
| ---------- | ---- | -------- | ----------- |
|
|
691
|
-
|
|
|
692
|
-
|
|
|
693
|
-
| claimed | boolean | no | |
|
|
694
|
-
| created_at | string | no | |
|
|
695
|
-
| expires_on | string | no | |
|
|
696
|
-
| points | number | no | |
|
|
697
|
-
| remaining_points | number | no | |
|
|
698
|
-
| text_1 | string | no | |
|
|
699
|
-
| text_2 | string | no | |
|
|
700
|
-
| text_3 | string | no | |
|
|
701
|
-
| txn_name | string | no | |
|
|
702
|
-
| updated_at | string | no | |
|
|
703
|
-
| user_id | string | no | |
|
|
729
|
+
| header_user_id | string | no | |
|
|
730
|
+
| id | string | no | |
|
|
704
731
|
|
|
705
732
|
---
|
|
706
733
|
|
|
707
734
|
|
|
708
735
|
|
|
709
736
|
|
|
710
|
-
#### [
|
|
737
|
+
#### [Asset](#Asset)
|
|
711
738
|
|
|
712
739
|
| Properties | Type | Nullable | Description |
|
|
713
740
|
| ---------- | ---- | -------- | ----------- |
|
|
714
|
-
|
|
|
715
|
-
|
|
|
716
|
-
|
|
|
741
|
+
| aspect_ratio | string | no | |
|
|
742
|
+
| id | string | no | |
|
|
743
|
+
| secure_url | string | no | |
|
|
744
|
+
|
|
745
|
+
---
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
#### [RewardsRule](#RewardsRule)
|
|
751
|
+
|
|
752
|
+
| Properties | Type | Nullable | Description |
|
|
753
|
+
| ---------- | ---- | -------- | ----------- |
|
|
754
|
+
| amount | number | no | |
|
|
755
|
+
|
|
756
|
+
---
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
#### [Page](#Page)
|
|
762
|
+
|
|
763
|
+
| Properties | Type | Nullable | Description |
|
|
764
|
+
| ---------- | ---- | -------- | ----------- |
|
|
765
|
+
| current | number | no | |
|
|
766
|
+
| has_next | boolean | no | |
|
|
767
|
+
| has_previous | boolean | no | |
|
|
768
|
+
| item_total | number | no | |
|
|
769
|
+
| next_id | string | no | |
|
|
770
|
+
| size | number | no | |
|
|
771
|
+
| type | string | yes | |
|
|
717
772
|
|
|
718
773
|
---
|
|
719
774
|
|
|
@@ -744,39 +799,42 @@ ok
|
|
|
744
799
|
|
|
745
800
|
|
|
746
801
|
|
|
747
|
-
#### [
|
|
802
|
+
#### [ShareMessages](#ShareMessages)
|
|
748
803
|
|
|
749
804
|
| Properties | Type | Nullable | Description |
|
|
750
805
|
| ---------- | ---- | -------- | ----------- |
|
|
751
|
-
|
|
|
752
|
-
|
|
|
753
|
-
|
|
|
754
|
-
|
|
|
755
|
-
|
|
|
756
|
-
|
|
|
757
|
-
|
|
|
806
|
+
| email | number | no | |
|
|
807
|
+
| facebook | string | no | |
|
|
808
|
+
| fallback | string | no | |
|
|
809
|
+
| message | string | no | |
|
|
810
|
+
| messenger | string | no | |
|
|
811
|
+
| sms | string | no | |
|
|
812
|
+
| text | string | no | |
|
|
813
|
+
| twitter | string | no | |
|
|
814
|
+
| whatsapp | string | no | |
|
|
758
815
|
|
|
759
816
|
---
|
|
760
817
|
|
|
761
818
|
|
|
762
819
|
|
|
763
820
|
|
|
764
|
-
#### [
|
|
821
|
+
#### [UserRes](#UserRes)
|
|
765
822
|
|
|
766
823
|
| Properties | Type | Nullable | Description |
|
|
767
824
|
| ---------- | ---- | -------- | ----------- |
|
|
768
|
-
|
|
|
825
|
+
| points | [Points](#Points) | no | |
|
|
826
|
+
| user | [RewardUser](#RewardUser) | no | |
|
|
769
827
|
|
|
770
828
|
---
|
|
771
829
|
|
|
772
830
|
|
|
773
831
|
|
|
774
832
|
|
|
775
|
-
#### [
|
|
833
|
+
#### [Points](#Points)
|
|
776
834
|
|
|
777
835
|
| Properties | Type | Nullable | Description |
|
|
778
836
|
| ---------- | ---- | -------- | ----------- |
|
|
779
|
-
|
|
|
837
|
+
| available | number | no | |
|
|
780
838
|
|
|
781
839
|
---
|
|
782
840
|
|
|
@@ -801,68 +859,77 @@ ok
|
|
|
801
859
|
|
|
802
860
|
|
|
803
861
|
|
|
804
|
-
#### [
|
|
862
|
+
#### [Referral](#Referral)
|
|
805
863
|
|
|
806
864
|
| Properties | Type | Nullable | Description |
|
|
807
865
|
| ---------- | ---- | -------- | ----------- |
|
|
808
|
-
|
|
|
809
|
-
| id | string | no | |
|
|
866
|
+
| code | string | no | |
|
|
810
867
|
|
|
811
868
|
---
|
|
812
869
|
|
|
813
870
|
|
|
814
871
|
|
|
815
872
|
|
|
816
|
-
#### [
|
|
873
|
+
#### [AppUser](#AppUser)
|
|
817
874
|
|
|
818
875
|
| Properties | Type | Nullable | Description |
|
|
819
876
|
| ---------- | ---- | -------- | ----------- |
|
|
820
|
-
|
|
|
877
|
+
| _id | string | no | |
|
|
878
|
+
| active | boolean | no | |
|
|
879
|
+
| application_id | string | no | |
|
|
880
|
+
| block_reason | string | no | |
|
|
881
|
+
| updated_at | string | no | |
|
|
882
|
+
| updated_by | string | no | |
|
|
883
|
+
| user_id | string | no | |
|
|
821
884
|
|
|
822
885
|
---
|
|
823
886
|
|
|
824
887
|
|
|
825
888
|
|
|
826
889
|
|
|
827
|
-
#### [
|
|
890
|
+
#### [GiveawayAudience](#GiveawayAudience)
|
|
828
891
|
|
|
829
892
|
| Properties | Type | Nullable | Description |
|
|
830
893
|
| ---------- | ---- | -------- | ----------- |
|
|
831
|
-
|
|
|
832
|
-
|
|
|
833
|
-
| end | string | no | |
|
|
834
|
-
| start | string | no | |
|
|
894
|
+
| audience_id | string | no | |
|
|
895
|
+
| current_count | number | no | |
|
|
835
896
|
|
|
836
897
|
---
|
|
837
898
|
|
|
838
899
|
|
|
839
900
|
|
|
840
901
|
|
|
841
|
-
#### [
|
|
902
|
+
#### [HistoryRes](#HistoryRes)
|
|
842
903
|
|
|
843
904
|
| Properties | Type | Nullable | Description |
|
|
844
905
|
| ---------- | ---- | -------- | ----------- |
|
|
845
|
-
|
|
|
846
|
-
|
|
|
847
|
-
|
|
|
848
|
-
| message | string | no | |
|
|
849
|
-
| messenger | string | no | |
|
|
850
|
-
| sms | string | no | |
|
|
851
|
-
| text | string | no | |
|
|
852
|
-
| twitter | string | no | |
|
|
853
|
-
| whatsapp | string | no | |
|
|
906
|
+
| items | [[PointsHistory](#PointsHistory)] | no | History is the list of points transaction. |
|
|
907
|
+
| page | [Page](#Page) | no | |
|
|
908
|
+
| points | number | no | |
|
|
854
909
|
|
|
855
910
|
---
|
|
856
911
|
|
|
857
912
|
|
|
858
913
|
|
|
859
914
|
|
|
860
|
-
#### [
|
|
915
|
+
#### [PointsHistory](#PointsHistory)
|
|
861
916
|
|
|
862
917
|
| Properties | Type | Nullable | Description |
|
|
863
918
|
| ---------- | ---- | -------- | ----------- |
|
|
864
|
-
|
|
|
865
|
-
|
|
|
919
|
+
| _id | string | no | |
|
|
920
|
+
| application_id | string | no | |
|
|
921
|
+
| claimed | boolean | no | |
|
|
922
|
+
| created_at | string | no | |
|
|
923
|
+
| expires_on | string | no | |
|
|
924
|
+
| meta | string | no | |
|
|
925
|
+
| points | number | no | |
|
|
926
|
+
| remaining_points | number | no | |
|
|
927
|
+
| text_1 | string | no | |
|
|
928
|
+
| text_2 | string | no | |
|
|
929
|
+
| text_3 | string | no | |
|
|
930
|
+
| txn_name | string | no | |
|
|
931
|
+
| updated_at | string | no | |
|
|
932
|
+
| user_id | string | no | |
|
|
866
933
|
|
|
867
934
|
---
|
|
868
935
|
|