@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.
Files changed (109) hide show
  1. package/README.md +1 -1
  2. package/documentation/application/CART.md +256 -239
  3. package/documentation/application/CATALOG.md +413 -409
  4. package/documentation/application/COMMON.md +4 -0
  5. package/documentation/application/COMMUNICATION.md +4 -0
  6. package/documentation/application/CONFIGURATION.md +4 -0
  7. package/documentation/application/CONTENT.md +7 -20
  8. package/documentation/application/FILESTORAGE.md +85 -0
  9. package/documentation/application/LEAD.md +6 -2
  10. package/documentation/application/LOGISTIC.md +4 -0
  11. package/documentation/application/ORDER.md +307 -303
  12. package/documentation/application/PAYMENT.md +445 -259
  13. package/documentation/application/POSCART.md +317 -300
  14. package/documentation/application/REWARDS.md +153 -160
  15. package/documentation/application/SHARE.md +4 -0
  16. package/documentation/application/THEME.md +4 -0
  17. package/documentation/application/USER.md +4 -0
  18. package/documentation/platform/ANALYTICS.md +4 -0
  19. package/documentation/platform/AUDITTRAIL.md +4 -0
  20. package/documentation/platform/BILLING.md +4 -0
  21. package/documentation/platform/CART.md +480 -463
  22. package/documentation/platform/CATALOG.md +3895 -2942
  23. package/documentation/platform/COMMON.md +4 -0
  24. package/documentation/platform/COMMUNICATION.md +4 -0
  25. package/documentation/platform/COMPANYPROFILE.md +224 -193
  26. package/documentation/platform/CONFIGURATION.md +4 -0
  27. package/documentation/platform/CONTENT.md +8 -21
  28. package/documentation/platform/DISCOUNT.md +4 -0
  29. package/documentation/platform/FILESTORAGE.md +85 -0
  30. package/documentation/platform/INVENTORY.md +4 -0
  31. package/documentation/platform/LEAD.md +6 -2
  32. package/documentation/platform/ORDER.md +6298 -1448
  33. package/documentation/platform/PARTNER.md +12 -8
  34. package/documentation/platform/PAYMENT.md +107 -103
  35. package/documentation/platform/README.md +2 -2
  36. package/documentation/platform/REWARDS.md +219 -152
  37. package/documentation/platform/SHARE.md +4 -0
  38. package/documentation/platform/THEME.md +4 -0
  39. package/documentation/platform/USER.md +4 -0
  40. package/documentation/platform/WEBHOOK.md +4 -0
  41. package/documentation/public/CONFIGURATION.md +4 -0
  42. package/documentation/public/INVENTORY.md +4 -0
  43. package/documentation/public/WEBHOOK.md +4 -0
  44. package/package.json +1 -1
  45. package/sdk/application/ApplicationModels.d.ts +77 -73
  46. package/sdk/application/ApplicationModels.js +1751 -1725
  47. package/sdk/application/client/CartApplicationClient.d.ts +36 -36
  48. package/sdk/application/client/CatalogApplicationClient.d.ts +39 -39
  49. package/sdk/application/client/CatalogApplicationClient.js +16 -16
  50. package/sdk/application/client/CommonApplicationClient.d.ts +2 -2
  51. package/sdk/application/client/CommunicationApplicationClient.d.ts +5 -5
  52. package/sdk/application/client/ConfigurationApplicationClient.d.ts +17 -17
  53. package/sdk/application/client/ContentApplicationClient.d.ts +19 -19
  54. package/sdk/application/client/FileStorageApplicationClient.d.ts +14 -6
  55. package/sdk/application/client/FileStorageApplicationClient.js +2 -0
  56. package/sdk/application/client/LeadApplicationClient.d.ts +10 -10
  57. package/sdk/application/client/LogisticApplicationClient.d.ts +5 -5
  58. package/sdk/application/client/OrderApplicationClient.d.ts +15 -15
  59. package/sdk/application/client/OrderApplicationClient.js +1 -1
  60. package/sdk/application/client/PaymentApplicationClient.d.ts +79 -57
  61. package/sdk/application/client/PaymentApplicationClient.js +66 -0
  62. package/sdk/application/client/PosCartApplicationClient.d.ts +38 -38
  63. package/sdk/application/client/RewardsApplicationClient.d.ts +34 -34
  64. package/sdk/application/client/RewardsApplicationClient.js +77 -77
  65. package/sdk/application/client/ShareApplicationClient.d.ts +8 -8
  66. package/sdk/application/client/ThemeApplicationClient.d.ts +4 -4
  67. package/sdk/application/client/UserApplicationClient.d.ts +63 -63
  68. package/sdk/application/models/CatalogValidator.d.ts +1 -1
  69. package/sdk/application/models/CatalogValidator.js +2 -2
  70. package/sdk/application/models/PaymentValidator.d.ts +2 -0
  71. package/sdk/application/models/PaymentValidator.js +12 -0
  72. package/sdk/application/models/RewardsValidator.d.ts +3 -3
  73. package/sdk/application/models/RewardsValidator.js +12 -12
  74. package/sdk/common/AxiosHelper.js +1 -1
  75. package/sdk/common/Constant.d.ts +9 -0
  76. package/sdk/common/Constant.js +11 -0
  77. package/sdk/platform/PlatformApplicationClient.d.ts +8600 -7286
  78. package/sdk/platform/PlatformApplicationClient.js +4338 -3678
  79. package/sdk/platform/PlatformApplicationModels.d.ts +21 -26
  80. package/sdk/platform/PlatformApplicationModels.js +5561 -4301
  81. package/sdk/platform/PlatformClient.d.ts +3448 -2801
  82. package/sdk/platform/PlatformClient.js +3903 -3108
  83. package/sdk/platform/PlatformModels.d.ts +352 -278
  84. package/sdk/platform/PlatformModels.js +5230 -3942
  85. package/sdk/platform/client/AnalyticsPlatformClient.d.ts +5 -5
  86. package/sdk/platform/client/AuditTrailPlatformClient.d.ts +1 -1
  87. package/sdk/platform/client/BillingPlatformClient.d.ts +4 -4
  88. package/sdk/platform/client/CatalogPlatformClient.d.ts +209 -150
  89. package/sdk/platform/client/CatalogPlatformClient.js +441 -294
  90. package/sdk/platform/client/CompanyProfilePlatformClient.d.ts +8 -8
  91. package/sdk/platform/client/ConfigurationPlatformClient.d.ts +9 -9
  92. package/sdk/platform/client/DiscountPlatformClient.d.ts +4 -4
  93. package/sdk/platform/client/FileStoragePlatformClient.d.ts +20 -4
  94. package/sdk/platform/client/FileStoragePlatformClient.js +49 -0
  95. package/sdk/platform/client/InventoryPlatformClient.d.ts +3 -3
  96. package/sdk/platform/client/LeadPlatformClient.d.ts +6 -6
  97. package/sdk/platform/client/OrderPlatformClient.d.ts +557 -131
  98. package/sdk/platform/client/OrderPlatformClient.js +1551 -247
  99. package/sdk/platform/client/PaymentPlatformClient.d.ts +4 -4
  100. package/sdk/platform/client/WebhookPlatformClient.d.ts +2 -2
  101. package/sdk/platform/models/CatalogValidator.d.ts +24 -21
  102. package/sdk/platform/models/CatalogValidator.js +103 -72
  103. package/sdk/platform/models/OrderValidator.d.ts +43 -11
  104. package/sdk/platform/models/OrderValidator.js +312 -51
  105. package/sdk/public/client/ConfigurationPublicClient.d.ts +2 -2
  106. package/sdk/public/client/InventoryPublicClient.d.ts +7 -7
  107. package/sdk/public/client/WebhookPublicClient.d.ts +3 -3
  108. package/tests/common/schema/action-url.json +15 -0
  109. package/tests/common/schema/url-action.json +16 -0
@@ -50,7 +50,7 @@ declare class PosCart {
50
50
  b?: boolean;
51
51
  assignCardId?: number;
52
52
  buyNow?: boolean;
53
- }): Promise<any>;
53
+ }): Promise<CartDetailResponse>;
54
54
  /**
55
55
  * @param {Object} arg - Arg object.
56
56
  * @param {string} [arg.id] -
@@ -75,8 +75,8 @@ declare class PosCart {
75
75
  i?: boolean;
76
76
  b?: boolean;
77
77
  buyNow?: boolean;
78
- body: any;
79
- }): Promise<any>;
78
+ body: AddCartRequest;
79
+ }): Promise<AddCartDetailResponse>;
80
80
  /**
81
81
  * @param {Object} arg - Arg object.
82
82
  * @param {string} [arg.id] -
@@ -93,8 +93,8 @@ declare class PosCart {
93
93
  i?: boolean;
94
94
  b?: boolean;
95
95
  buyNow?: boolean;
96
- body: any;
97
- }): Promise<any>;
96
+ body: UpdateCartRequest;
97
+ }): Promise<UpdateCartDetailResponse>;
98
98
  /**
99
99
  * @param {Object} arg - Arg object.
100
100
  * @param {string} [arg.id] - The unique identifier of the cart.
@@ -106,7 +106,7 @@ declare class PosCart {
106
106
  getItemCount({ id, buyNow }?: {
107
107
  id?: string;
108
108
  buyNow?: boolean;
109
- }): Promise<any>;
109
+ }): Promise<CartItemCountResponse>;
110
110
  /**
111
111
  * @param {Object} arg - Arg object.
112
112
  * @param {string} [arg.id] -
@@ -118,7 +118,7 @@ declare class PosCart {
118
118
  getCoupons({ id, buyNow }?: {
119
119
  id?: string;
120
120
  buyNow?: boolean;
121
- }): Promise<any>;
121
+ }): Promise<GetCouponResponse>;
122
122
  /**
123
123
  * @param {Object} arg - Arg object.
124
124
  * @param {boolean} [arg.i] -
@@ -137,8 +137,8 @@ declare class PosCart {
137
137
  p?: boolean;
138
138
  id?: string;
139
139
  buyNow?: boolean;
140
- body: any;
141
- }): Promise<any>;
140
+ body: ApplyCouponRequest;
141
+ }): Promise<CartDetailResponse>;
142
142
  /**
143
143
  * @param {Object} arg - Arg object.
144
144
  * @param {string} [arg.id] -
@@ -150,7 +150,7 @@ declare class PosCart {
150
150
  removeCoupon({ id, buyNow }?: {
151
151
  id?: string;
152
152
  buyNow?: boolean;
153
- }): Promise<any>;
153
+ }): Promise<CartDetailResponse>;
154
154
  /**
155
155
  * @param {Object} arg - Arg object.
156
156
  * @param {number} [arg.itemId] - The Item ID of the product
@@ -168,7 +168,7 @@ declare class PosCart {
168
168
  articleId?: string;
169
169
  uid?: number;
170
170
  slug?: string;
171
- }): Promise<any>;
171
+ }): Promise<BulkPriceResponse>;
172
172
  /**
173
173
  * @param {Object} arg - Arg object.
174
174
  * @param {string} [arg.id] -
@@ -185,8 +185,8 @@ declare class PosCart {
185
185
  i?: boolean;
186
186
  b?: boolean;
187
187
  buyNow?: boolean;
188
- body: any;
189
- }): Promise<any>;
188
+ body: RewardPointRequest;
189
+ }): Promise<CartDetailResponse>;
190
190
  /**
191
191
  * @param {Object} arg - Arg object.
192
192
  * @param {string} [arg.cartId] -
@@ -206,7 +206,7 @@ declare class PosCart {
206
206
  checkoutMode?: string;
207
207
  tags?: string;
208
208
  isDefault?: boolean;
209
- }): Promise<any>;
209
+ }): Promise<GetAddressesResponse>;
210
210
  /**
211
211
  * @param {Object} arg - Arg object.
212
212
  * @param {Address} arg.body
@@ -215,8 +215,8 @@ declare class PosCart {
215
215
  * @description: Use this API to add an address to an account.
216
216
  */
217
217
  addAddress({ body }?: {
218
- body: any;
219
- }): Promise<any>;
218
+ body: Address;
219
+ }): Promise<SaveAddressResponse>;
220
220
  /**
221
221
  * @param {Object} arg - Arg object.
222
222
  * @param {string} arg.id -
@@ -238,7 +238,7 @@ declare class PosCart {
238
238
  checkoutMode?: string;
239
239
  tags?: string;
240
240
  isDefault?: boolean;
241
- }): Promise<any>;
241
+ }): Promise<Address>;
242
242
  /**
243
243
  * @param {Object} arg - Arg object.
244
244
  * @param {string} arg.id - ID allotted to the selected address
@@ -249,8 +249,8 @@ declare class PosCart {
249
249
  */
250
250
  updateAddress({ id, body }?: {
251
251
  id: string;
252
- body: any;
253
- }): Promise<any>;
252
+ body: Address;
253
+ }): Promise<UpdateAddressResponse>;
254
254
  /**
255
255
  * @param {Object} arg - Arg object.
256
256
  * @param {string} arg.id - ID allotted to the selected address
@@ -260,7 +260,7 @@ declare class PosCart {
260
260
  */
261
261
  removeAddress({ id }?: {
262
262
  id: string;
263
- }): Promise<any>;
263
+ }): Promise<DeleteAddressResponse>;
264
264
  /**
265
265
  * @param {Object} arg - Arg object.
266
266
  * @param {string} [arg.cartId] -
@@ -277,8 +277,8 @@ declare class PosCart {
277
277
  buyNow?: boolean;
278
278
  i?: boolean;
279
279
  b?: boolean;
280
- body: any;
281
- }): Promise<any>;
280
+ body: SelectCartAddressRequest;
281
+ }): Promise<CartDetailResponse>;
282
282
  /**
283
283
  * @param {Object} arg - Arg object.
284
284
  * @param {string} [arg.id] -
@@ -291,8 +291,8 @@ declare class PosCart {
291
291
  selectPaymentMode({ body, id, buyNow }?: {
292
292
  id?: string;
293
293
  buyNow?: boolean;
294
- body: any;
295
- }): Promise<any>;
294
+ body: UpdateCartPaymentRequest;
295
+ }): Promise<CartDetailResponse>;
296
296
  /**
297
297
  * @param {Object} arg - Arg object.
298
298
  * @param {string} [arg.id] -
@@ -314,7 +314,7 @@ declare class PosCart {
314
314
  paymentIdentifier?: string;
315
315
  aggregatorName?: string;
316
316
  merchantCode?: string;
317
- }): Promise<any>;
317
+ }): Promise<PaymentCouponValidate>;
318
318
  /**
319
319
  * @param {Object} arg - Arg object.
320
320
  * @param {number} [arg.pickAtStoreUid] -
@@ -340,7 +340,7 @@ declare class PosCart {
340
340
  addressId?: string;
341
341
  areaCode?: string;
342
342
  orderType?: string;
343
- }): Promise<any>;
343
+ }): Promise<CartShipmentsResponse>;
344
344
  /**
345
345
  * @param {Object} arg - Arg object.
346
346
  * @param {boolean} [arg.i] - This is a boolean value. Select `true` to
@@ -363,8 +363,8 @@ declare class PosCart {
363
363
  id?: string;
364
364
  addressId?: string;
365
365
  orderType?: string;
366
- body: any;
367
- }): Promise<any>;
366
+ body: UpdateCartShipmentRequest;
367
+ }): Promise<CartShipmentsResponse>;
368
368
  /**
369
369
  * @param {Object} arg - Arg object.
370
370
  * @param {string} [arg.id] -
@@ -375,8 +375,8 @@ declare class PosCart {
375
375
  */
376
376
  checkoutCart({ body, id }?: {
377
377
  id?: string;
378
- body: any;
379
- }): Promise<any>;
378
+ body: CartPosCheckoutDetailRequest;
379
+ }): Promise<CartCheckoutResponse>;
380
380
  /**
381
381
  * @param {Object} arg - Arg object.
382
382
  * @param {string} [arg.id] -
@@ -389,8 +389,8 @@ declare class PosCart {
389
389
  updateCartMeta({ body, id, buyNow }?: {
390
390
  id?: string;
391
391
  buyNow?: boolean;
392
- body: any;
393
- }): Promise<any>;
392
+ body: CartMetaRequest;
393
+ }): Promise<CartMetaResponse>;
394
394
  /**
395
395
  * @param {Object} arg - Arg object.
396
396
  * @param {string} arg.areaCode -
@@ -402,7 +402,7 @@ declare class PosCart {
402
402
  getAvailableDeliveryModes({ areaCode, id }?: {
403
403
  areaCode: string;
404
404
  id?: string;
405
- }): Promise<any>;
405
+ }): Promise<CartDeliveryModesResponse>;
406
406
  /**
407
407
  * @param {Object} arg - Arg object.
408
408
  * @param {number} arg.storeUid -
@@ -412,7 +412,7 @@ declare class PosCart {
412
412
  */
413
413
  getStoreAddressByUid({ storeUid }?: {
414
414
  storeUid: number;
415
- }): Promise<any>;
415
+ }): Promise<StoreDetailsResponse>;
416
416
  /**
417
417
  * @param {Object} arg - Arg object.
418
418
  * @param {GetShareCartLinkRequest} arg.body
@@ -421,8 +421,8 @@ declare class PosCart {
421
421
  * @description: Use this API to generate a shared cart snapshot and return a shortlink token. The link can be shared with other users for getting the same items in their cart.
422
422
  */
423
423
  getCartShareLink({ body }?: {
424
- body: any;
425
- }): Promise<any>;
424
+ body: GetShareCartLinkRequest;
425
+ }): Promise<GetShareCartLinkResponse>;
426
426
  /**
427
427
  * @param {Object} arg - Arg object.
428
428
  * @param {string} arg.token - Token of the shared short link
@@ -432,7 +432,7 @@ declare class PosCart {
432
432
  */
433
433
  getCartSharedItems({ token }?: {
434
434
  token: string;
435
- }): Promise<any>;
435
+ }): Promise<SharedCartResponse>;
436
436
  /**
437
437
  * @param {Object} arg - Arg object.
438
438
  * @param {string} arg.token - Token of the shared short link
@@ -445,5 +445,5 @@ declare class PosCart {
445
445
  updateCartWithSharedItems({ token, action }?: {
446
446
  token: string;
447
447
  action: string;
448
- }): Promise<any>;
448
+ }): Promise<SharedCartResponse>;
449
449
  }
@@ -3,26 +3,16 @@ declare class Rewards {
3
3
  constructor(_conf: any);
4
4
  _conf: any;
5
5
  _relativeUrls: {
6
- getPointsOnProduct: string;
7
6
  getOfferByName: string;
8
- getOrderDiscount: string;
9
- getUserPoints: string;
7
+ catalogueOrder: string;
10
8
  getUserPointsHistory: string;
9
+ getUserPoints: string;
11
10
  getUserReferralDetails: string;
11
+ getOrderDiscount: string;
12
12
  redeemReferralCode: string;
13
13
  };
14
14
  _urls: {};
15
15
  updateUrls(urls: any): void;
16
- /**
17
- * @param {Object} arg - Arg object.
18
- * @param {CatalogueOrderRequest} arg.body
19
- * @returns {Promise<CatalogueOrderResponse>} - Success response
20
- * @summary: Get the eligibility of reward points on a product
21
- * @description: Use this API to evaluate the amount of reward points that could be earned on any catalogue product.
22
- */
23
- getPointsOnProduct({ body }?: {
24
- body: any;
25
- }): Promise<any>;
26
16
  /**
27
17
  * @param {Object} arg - Arg object.
28
18
  * @param {string} arg.name - The name given to the offer.
@@ -32,24 +22,17 @@ declare class Rewards {
32
22
  */
33
23
  getOfferByName({ name }?: {
34
24
  name: string;
35
- }): Promise<any>;
25
+ }): Promise<Offer>;
36
26
  /**
37
27
  * @param {Object} arg - Arg object.
38
- * @param {OrderDiscountRequest} arg.body
39
- * @returns {Promise<OrderDiscountResponse>} - Success response
40
- * @summary: Calculates the discount on order-amount
41
- * @description: Use this API to calculate the discount on order-amount based on all the amount range configured in order_discount.
42
- */
43
- getOrderDiscount({ body }?: {
44
- body: any;
45
- }): Promise<any>;
46
- /**
47
- * @param {Object} arg - Arg object.
48
- * @returns {Promise<PointsResponse>} - Success response
49
- * @summary: Get reward points available with a user
50
- * @description: Use this API to retrieve total available points of a user for current application
28
+ * @param {CatalogueOrderRequest} arg.body
29
+ * @returns {Promise<CatalogueOrderResponse>} - Success response
30
+ * @summary: Get all transactions of reward points
31
+ * @description: Use this API to evaluate the amount of reward points that could be earned on any catalogue product.
51
32
  */
52
- getUserPoints({}?: any): Promise<any>;
33
+ catalogueOrder({ body }?: {
34
+ body: CatalogueOrderRequest;
35
+ }): Promise<CatalogueOrderResponse>;
53
36
  /**
54
37
  * @param {Object} arg - Arg object.
55
38
  * @param {string} [arg.pageId] - PageID is the ID of the requested page.
@@ -57,28 +40,45 @@ declare class Rewards {
57
40
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
58
41
  * @returns {Promise<PointsHistoryResponse>} - Success response
59
42
  * @summary: Get all transactions of reward points
60
- * @description: Use this API to get a list of points transactions. The list of points history is paginated.
43
+ * @description: Use this API to get a list of points transactions.
61
44
  */
62
45
  getUserPointsHistory({ pageId, pageSize }?: {
63
46
  pageId?: string;
64
47
  pageSize?: number;
65
- }): Promise<any>;
48
+ }): Promise<PointsHistoryResponse>;
66
49
  /**
67
50
  * @param {Object} arg - Arg object.
68
51
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
69
52
  * @summary: Get all transactions of reward points
70
- * @description: Use this API to get a list of points transactions. The list of points history is paginated.
53
+ * @description: Use this API to get a list of points transactions.
71
54
  */
72
55
  getUserPointsHistoryPaginator({ pageSize }?: {
73
56
  pageSize?: number;
74
57
  }): Paginator;
58
+ /**
59
+ * @param {Object} arg - Arg object.
60
+ * @returns {Promise<PointsResponse>} - Success response
61
+ * @summary: Get referral details of a user
62
+ * @description: Use this API to retrieve total available points of a user for current application
63
+ */
64
+ getUserPoints({}?: any): Promise<PointsResponse>;
75
65
  /**
76
66
  * @param {Object} arg - Arg object.
77
67
  * @returns {Promise<ReferralDetailsResponse>} - Success response
78
68
  * @summary: Get referral details of a user
79
69
  * @description: Use this API to retrieve the referral details a user has configured in the application.
80
70
  */
81
- getUserReferralDetails({}?: any): Promise<any>;
71
+ getUserReferralDetails({}?: any): Promise<ReferralDetailsResponse>;
72
+ /**
73
+ * @param {Object} arg - Arg object.
74
+ * @param {OrderDiscountRequest} arg.body
75
+ * @returns {Promise<OrderDiscountResponse>} - Success response
76
+ * @summary: Calculates the discount on order-amount
77
+ * @description: Use this API to calculate the discount on order-amount based on all the amount range configured in order_discount.
78
+ */
79
+ getOrderDiscount({ body }?: {
80
+ body: OrderDiscountRequest;
81
+ }): Promise<OrderDiscountResponse>;
82
82
  /**
83
83
  * @param {Object} arg - Arg object.
84
84
  * @param {RedeemReferralCodeRequest} arg.body
@@ -87,7 +87,7 @@ declare class Rewards {
87
87
  * @description: Use this API to enter a referral code following which, the configured points would be credited to a user's reward points account.
88
88
  */
89
89
  redeemReferralCode({ body }?: {
90
- body: any;
91
- }): Promise<any>;
90
+ body: RedeemReferralCodeRequest;
91
+ }): Promise<RedeemReferralCodeResponse>;
92
92
  }
93
93
  import Paginator = require("../../common/Paginator");
@@ -8,16 +8,16 @@ class Rewards {
8
8
  constructor(_conf) {
9
9
  this._conf = _conf;
10
10
  this._relativeUrls = {
11
- getPointsOnProduct:
12
- "/service/application/rewards/v1.0/catalogue/offer/order/",
13
11
  getOfferByName: "/service/application/rewards/v1.0/offers/{name}/",
14
- getOrderDiscount:
15
- "/service/application/rewards/v1.0/user/offers/order-discount/",
16
- getUserPoints: "/service/application/rewards/v1.0/user/points/",
12
+ catalogueOrder:
13
+ "/service/application/rewards/v1.0/catalogue/offer/order/",
17
14
  getUserPointsHistory:
18
15
  "/service/application/rewards/v1.0/user/points/history/",
16
+ getUserPoints: "/service/application/rewards/v1.0/user/points/",
19
17
  getUserReferralDetails:
20
18
  "/service/application/rewards/v1.0/user/referral/",
19
+ getOrderDiscount:
20
+ "/service/application/rewards/v1.0/user/offer/order-discount/",
21
21
  redeemReferralCode:
22
22
  "/service/application/rewards/v1.0/user/referral/redeem/",
23
23
  };
@@ -37,38 +37,6 @@ class Rewards {
37
37
  };
38
38
  }
39
39
 
40
- /**
41
- * @param {Object} arg - Arg object.
42
- * @param {CatalogueOrderRequest} arg.body
43
- * @returns {Promise<CatalogueOrderResponse>} - Success response
44
- * @summary: Get the eligibility of reward points on a product
45
- * @description: Use this API to evaluate the amount of reward points that could be earned on any catalogue product.
46
- */
47
- getPointsOnProduct({ body } = {}) {
48
- const { error } = RewardsValidator.getPointsOnProduct().validate(
49
- { body },
50
- { abortEarly: false, allowUnknown: true }
51
- );
52
- if (error) {
53
- return Promise.reject(new FDKClientValidationError(error));
54
- }
55
- const query_params = {};
56
-
57
- const xHeaders = {};
58
-
59
- return APIClient.execute(
60
- this._conf,
61
- "post",
62
- constructUrl({
63
- url: this._urls["getPointsOnProduct"],
64
- params: {},
65
- }),
66
- query_params,
67
- body,
68
- xHeaders
69
- );
70
- }
71
-
72
40
  /**
73
41
  * @param {Object} arg - Arg object.
74
42
  * @param {string} arg.name - The name given to the offer.
@@ -103,13 +71,13 @@ class Rewards {
103
71
 
104
72
  /**
105
73
  * @param {Object} arg - Arg object.
106
- * @param {OrderDiscountRequest} arg.body
107
- * @returns {Promise<OrderDiscountResponse>} - Success response
108
- * @summary: Calculates the discount on order-amount
109
- * @description: Use this API to calculate the discount on order-amount based on all the amount range configured in order_discount.
74
+ * @param {CatalogueOrderRequest} arg.body
75
+ * @returns {Promise<CatalogueOrderResponse>} - Success response
76
+ * @summary: Get all transactions of reward points
77
+ * @description: Use this API to evaluate the amount of reward points that could be earned on any catalogue product.
110
78
  */
111
- getOrderDiscount({ body } = {}) {
112
- const { error } = RewardsValidator.getOrderDiscount().validate(
79
+ catalogueOrder({ body } = {}) {
80
+ const { error } = RewardsValidator.catalogueOrder().validate(
113
81
  { body },
114
82
  { abortEarly: false, allowUnknown: true }
115
83
  );
@@ -124,7 +92,7 @@ class Rewards {
124
92
  this._conf,
125
93
  "post",
126
94
  constructUrl({
127
- url: this._urls["getOrderDiscount"],
95
+ url: this._urls["catalogueOrder"],
128
96
  params: {},
129
97
  }),
130
98
  query_params,
@@ -133,37 +101,6 @@ class Rewards {
133
101
  );
134
102
  }
135
103
 
136
- /**
137
- * @param {Object} arg - Arg object.
138
- * @returns {Promise<PointsResponse>} - Success response
139
- * @summary: Get reward points available with a user
140
- * @description: Use this API to retrieve total available points of a user for current application
141
- */
142
- getUserPoints({} = {}) {
143
- const { error } = RewardsValidator.getUserPoints().validate(
144
- {},
145
- { abortEarly: false, allowUnknown: true }
146
- );
147
- if (error) {
148
- return Promise.reject(new FDKClientValidationError(error));
149
- }
150
- const query_params = {};
151
-
152
- const xHeaders = {};
153
-
154
- return APIClient.execute(
155
- this._conf,
156
- "get",
157
- constructUrl({
158
- url: this._urls["getUserPoints"],
159
- params: {},
160
- }),
161
- query_params,
162
- undefined,
163
- xHeaders
164
- );
165
- }
166
-
167
104
  /**
168
105
  * @param {Object} arg - Arg object.
169
106
  * @param {string} [arg.pageId] - PageID is the ID of the requested page.
@@ -171,7 +108,7 @@ class Rewards {
171
108
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
172
109
  * @returns {Promise<PointsHistoryResponse>} - Success response
173
110
  * @summary: Get all transactions of reward points
174
- * @description: Use this API to get a list of points transactions. The list of points history is paginated.
111
+ * @description: Use this API to get a list of points transactions.
175
112
  */
176
113
  getUserPointsHistory({ pageId, pageSize } = {}) {
177
114
  const { error } = RewardsValidator.getUserPointsHistory().validate(
@@ -204,7 +141,7 @@ class Rewards {
204
141
  * @param {Object} arg - Arg object.
205
142
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
206
143
  * @summary: Get all transactions of reward points
207
- * @description: Use this API to get a list of points transactions. The list of points history is paginated.
144
+ * @description: Use this API to get a list of points transactions.
208
145
  */
209
146
  getUserPointsHistoryPaginator({ pageSize } = {}) {
210
147
  const paginator = new Paginator();
@@ -226,6 +163,37 @@ class Rewards {
226
163
  return paginator;
227
164
  }
228
165
 
166
+ /**
167
+ * @param {Object} arg - Arg object.
168
+ * @returns {Promise<PointsResponse>} - Success response
169
+ * @summary: Get referral details of a user
170
+ * @description: Use this API to retrieve total available points of a user for current application
171
+ */
172
+ getUserPoints({} = {}) {
173
+ const { error } = RewardsValidator.getUserPoints().validate(
174
+ {},
175
+ { abortEarly: false, allowUnknown: true }
176
+ );
177
+ if (error) {
178
+ return Promise.reject(new FDKClientValidationError(error));
179
+ }
180
+ const query_params = {};
181
+
182
+ const xHeaders = {};
183
+
184
+ return APIClient.execute(
185
+ this._conf,
186
+ "get",
187
+ constructUrl({
188
+ url: this._urls["getUserPoints"],
189
+ params: {},
190
+ }),
191
+ query_params,
192
+ undefined,
193
+ xHeaders
194
+ );
195
+ }
196
+
229
197
  /**
230
198
  * @param {Object} arg - Arg object.
231
199
  * @returns {Promise<ReferralDetailsResponse>} - Success response
@@ -257,6 +225,38 @@ class Rewards {
257
225
  );
258
226
  }
259
227
 
228
+ /**
229
+ * @param {Object} arg - Arg object.
230
+ * @param {OrderDiscountRequest} arg.body
231
+ * @returns {Promise<OrderDiscountResponse>} - Success response
232
+ * @summary: Calculates the discount on order-amount
233
+ * @description: Use this API to calculate the discount on order-amount based on all the amount range configured in order_discount.
234
+ */
235
+ getOrderDiscount({ body } = {}) {
236
+ const { error } = RewardsValidator.getOrderDiscount().validate(
237
+ { body },
238
+ { abortEarly: false, allowUnknown: true }
239
+ );
240
+ if (error) {
241
+ return Promise.reject(new FDKClientValidationError(error));
242
+ }
243
+ const query_params = {};
244
+
245
+ const xHeaders = {};
246
+
247
+ return APIClient.execute(
248
+ this._conf,
249
+ "post",
250
+ constructUrl({
251
+ url: this._urls["getOrderDiscount"],
252
+ params: {},
253
+ }),
254
+ query_params,
255
+ body,
256
+ xHeaders
257
+ );
258
+ }
259
+
260
260
  /**
261
261
  * @param {Object} arg - Arg object.
262
262
  * @param {RedeemReferralCodeRequest} arg.body
@@ -19,7 +19,7 @@ declare class Share {
19
19
  * @summary: Create QR Code of an app
20
20
  * @description: Use this API to create a QR code of an app for sharing it with users who want to use the app.
21
21
  */
22
- getApplicationQRCode({}?: any): Promise<any>;
22
+ getApplicationQRCode({}?: any): Promise<QRCodeResp>;
23
23
  /**
24
24
  * @param {Object} arg - Arg object.
25
25
  * @param {string} arg.slug - A short, human-readable, URL-friendly
@@ -30,7 +30,7 @@ declare class Share {
30
30
  */
31
31
  getProductQRCodeBySlug({ slug }?: {
32
32
  slug: string;
33
- }): Promise<any>;
33
+ }): Promise<QRCodeResp>;
34
34
  /**
35
35
  * @param {Object} arg - Arg object.
36
36
  * @param {string} arg.slug - A short, human-readable, URL-friendly
@@ -41,7 +41,7 @@ declare class Share {
41
41
  */
42
42
  getCollectionQRCodeBySlug({ slug }?: {
43
43
  slug: string;
44
- }): Promise<any>;
44
+ }): Promise<QRCodeResp>;
45
45
  /**
46
46
  * @param {Object} arg - Arg object.
47
47
  * @param {string} arg.url - A link or a web address
@@ -51,7 +51,7 @@ declare class Share {
51
51
  */
52
52
  getUrlQRCode({ url }?: {
53
53
  url: string;
54
- }): Promise<any>;
54
+ }): Promise<QRCodeResp>;
55
55
  /**
56
56
  * @param {Object} arg - Arg object.
57
57
  * @param {ShortLinkReq} arg.body
@@ -60,8 +60,8 @@ declare class Share {
60
60
  * @description: Use this API to create a short link that is easy to write/share/read as compared to long URLs.
61
61
  */
62
62
  createShortLink({ body }?: {
63
- body: any;
64
- }): Promise<any>;
63
+ body: ShortLinkReq;
64
+ }): Promise<ShortLinkRes>;
65
65
  /**
66
66
  * @param {Object} arg - Arg object.
67
67
  * @param {string} arg.hash - A string value used for converting long URL to
@@ -72,7 +72,7 @@ declare class Share {
72
72
  */
73
73
  getShortLinkByHash({ hash }?: {
74
74
  hash: string;
75
- }): Promise<any>;
75
+ }): Promise<ShortLinkRes>;
76
76
  /**
77
77
  * @param {Object} arg - Arg object.
78
78
  * @param {string} arg.hash - A string value used for converting long URL to
@@ -83,5 +83,5 @@ declare class Share {
83
83
  */
84
84
  getOriginalShortLinkByHash({ hash }?: {
85
85
  hash: string;
86
- }): Promise<any>;
86
+ }): Promise<ShortLinkRes>;
87
87
  }
@@ -19,7 +19,7 @@ declare class Theme {
19
19
  */
20
20
  getAllPages({ themeId }?: {
21
21
  themeId: string;
22
- }): Promise<any>;
22
+ }): Promise<AllAvailablePageSchema>;
23
23
  /**
24
24
  * @param {Object} arg - Arg object.
25
25
  * @param {string} arg.themeId - ID of the theme to be retrieved
@@ -31,14 +31,14 @@ declare class Theme {
31
31
  getPage({ themeId, pageValue }?: {
32
32
  themeId: string;
33
33
  pageValue: string;
34
- }): Promise<any>;
34
+ }): Promise<AvailablePageSchema>;
35
35
  /**
36
36
  * @param {Object} arg - Arg object.
37
37
  * @returns {Promise<ThemesSchema>} - Success response
38
38
  * @summary: Get the theme currently applied to an application
39
39
  * @description: An application has multiple themes, but only one theme can be applied at a time. Use this API to retrieve the theme currently applied to the application.
40
40
  */
41
- getAppliedTheme({}?: any): Promise<any>;
41
+ getAppliedTheme({}?: any): Promise<ThemesSchema>;
42
42
  /**
43
43
  * @param {Object} arg - Arg object.
44
44
  * @param {string} arg.themeId - ID of the theme to be retrieved
@@ -48,5 +48,5 @@ declare class Theme {
48
48
  */
49
49
  getThemeForPreview({ themeId }?: {
50
50
  themeId: string;
51
- }): Promise<any>;
51
+ }): Promise<ThemesSchema>;
52
52
  }