@gofynd/fdk-client-javascript 3.16.2 → 3.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Content/ContentApplicationClient.d.ts +10 -0
  6. package/sdk/application/Content/ContentApplicationClient.js +53 -0
  7. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -21
  8. package/sdk/application/Logistic/LogisticApplicationClient.js +34 -83
  9. package/sdk/application/Order/OrderApplicationClient.d.ts +11 -0
  10. package/sdk/application/Order/OrderApplicationClient.js +50 -0
  11. package/sdk/application/Payment/PaymentApplicationClient.d.ts +4 -4
  12. package/sdk/application/Payment/PaymentApplicationClient.js +3 -4
  13. package/sdk/application/User/UserApplicationClient.d.ts +10 -0
  14. package/sdk/application/User/UserApplicationClient.js +67 -0
  15. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +84 -0
  16. package/sdk/partner/Logistics/LogisticsPartnerClient.js +712 -0
  17. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +237 -1
  18. package/sdk/partner/Logistics/LogisticsPartnerModel.js +157 -0
  19. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +8 -0
  20. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +70 -0
  21. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +3 -3
  22. package/sdk/platform/Cart/CartPlatformApplicationClient.js +3 -3
  23. package/sdk/platform/Cart/CartPlatformModel.d.ts +1 -4
  24. package/sdk/platform/Cart/CartPlatformModel.js +1 -1
  25. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +2 -2
  26. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2 -2
  27. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +0 -11
  28. package/sdk/platform/Catalog/CatalogPlatformClient.js +0 -80
  29. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6 -131
  30. package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -141
  31. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1 -10
  32. package/sdk/platform/Catalog/CatalogPlatformValidator.js +0 -12
  33. package/sdk/platform/Common/CommonPlatformModel.d.ts +18 -1
  34. package/sdk/platform/Common/CommonPlatformModel.js +14 -0
  35. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -73
  36. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +18 -459
  37. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +28 -41
  38. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +12 -52
  39. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +54 -1
  40. package/sdk/platform/Communication/CommunicationPlatformModel.js +47 -0
  41. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +14 -0
  42. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +6 -0
  43. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +1 -1
  44. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1 -7
  45. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +0 -14
  46. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -6
  47. package/sdk/platform/Content/ContentPlatformModel.d.ts +0 -2
  48. package/sdk/platform/Content/ContentPlatformModel.js +0 -2
  49. package/sdk/platform/Order/OrderPlatformClient.d.ts +26 -18
  50. package/sdk/platform/Order/OrderPlatformClient.js +175 -107
  51. package/sdk/platform/Order/OrderPlatformModel.d.ts +339 -43
  52. package/sdk/platform/Order/OrderPlatformModel.js +209 -43
  53. package/sdk/platform/Order/OrderPlatformValidator.d.ts +40 -43
  54. package/sdk/platform/Order/OrderPlatformValidator.js +35 -30
  55. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +20 -10
  56. package/sdk/platform/Payment/PaymentPlatformModel.js +14 -10
  57. package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
  58. package/sdk/platform/PlatformApplicationClient.js +0 -4
  59. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -13
  60. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -82
  61. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -10
  62. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -12
  63. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +212 -28
  64. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +133 -13
  65. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +10 -0
  66. package/sdk/platform/User/UserPlatformApplicationClient.js +79 -0
  67. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +13 -1
  68. package/sdk/platform/User/UserPlatformApplicationValidator.js +12 -0
  69. package/sdk/platform/User/UserPlatformModel.d.ts +42 -5
  70. package/sdk/platform/User/UserPlatformModel.js +25 -6
  71. package/sdk/platform/index.d.ts +0 -1
  72. package/sdk/platform/index.js +0 -2
  73. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +27 -1
  74. package/sdk/public/Configuration/ConfigurationPublicModel.js +19 -0
  75. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
  76. package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
  77. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
  78. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
  79. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
  80. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
  81. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -387
  82. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -410
package/README.md CHANGED
@@ -234,7 +234,7 @@ console.log("Active Theme: ", response.information.name);
234
234
  The above code will log the curl command in the console
235
235
 
236
236
  ```bash
237
- curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.16.2' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
237
+ curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.17.0' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
238
238
  Active Theme: Emerge
239
239
  ```
240
240
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "3.16.2",
3
+ "version": "3.17.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -42,4 +42,4 @@
42
42
  "!dist",
43
43
  "!cypress"
44
44
  ]
45
- }
45
+ }
@@ -20,7 +20,6 @@ declare class ApplicationClient {
20
20
  logistic: Logistic;
21
21
  order: Order;
22
22
  payment: Payment;
23
- rewards: Rewards;
24
23
  share: Share;
25
24
  theme: Theme;
26
25
  user: User;
@@ -78,7 +77,6 @@ import Lead = require("./Lead/LeadApplicationClient");
78
77
  import Logistic = require("./Logistic/LogisticApplicationClient");
79
78
  import Order = require("./Order/OrderApplicationClient");
80
79
  import Payment = require("./Payment/PaymentApplicationClient");
81
- import Rewards = require("./Rewards/RewardsApplicationClient");
82
80
  import Share = require("./Share/ShareApplicationClient");
83
81
  import Theme = require("./Theme/ThemeApplicationClient");
84
82
  import User = require("./User/UserApplicationClient");
@@ -10,7 +10,6 @@ const Lead = require("./Lead/LeadApplicationClient");
10
10
  const Logistic = require("./Logistic/LogisticApplicationClient");
11
11
  const Order = require("./Order/OrderApplicationClient");
12
12
  const Payment = require("./Payment/PaymentApplicationClient");
13
- const Rewards = require("./Rewards/RewardsApplicationClient");
14
13
  const Share = require("./Share/ShareApplicationClient");
15
14
  const Theme = require("./Theme/ThemeApplicationClient");
16
15
  const User = require("./User/UserApplicationClient");
@@ -47,7 +46,6 @@ class ApplicationClient {
47
46
  this.logistic = new Logistic(this.config);
48
47
  this.order = new Order(this.config);
49
48
  this.payment = new Payment(this.config);
50
- this.rewards = new Rewards(this.config);
51
49
  this.share = new Share(this.config);
52
50
  this.theme = new Theme(this.config);
53
51
  this.user = new User(this.config);
@@ -8,6 +8,7 @@ declare class Content {
8
8
  getAnnouncements: string;
9
9
  getBlog: string;
10
10
  getBlogs: string;
11
+ getBulkCustomFieldsByResource: string;
11
12
  getCustomFieldsByResourceId: string;
12
13
  getCustomObjectBySlug: string;
13
14
  getDataLoaders: string;
@@ -75,6 +76,15 @@ declare class Content {
75
76
  * @description: List all the blogs against an application. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/content/getBlogs/).
76
77
  */
77
78
  getBlogs({ pageNo, pageSize, tags, search, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<BlogGetDetails>;
79
+ /**
80
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
81
+ * @param {import("../ApplicationAPIClient").Options} - Options
82
+ * @returns {Promise<BulkCustomFieldsResponseByResourceSchema>} - Success response
83
+ * @name getBulkCustomFieldsByResource
84
+ * @summary: Get bulk list of custom fields of given resource
85
+ * @description: Retrieves a bulk list of custom fields attached to a particular resource by using the resource and resource IDs. The resource_ids query parameter is required and can accept multiple comma-separated values. Optional filters for keys and namespaces can also be applied. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/content/getBulkCustomFieldsByResource/).
86
+ */
87
+ getBulkCustomFieldsByResource({ resource, resourceIds, keys, namespaces, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<BulkCustomFieldsResponseByResourceSchema>;
78
88
  /**
79
89
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
80
90
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -19,6 +19,8 @@ class Content {
19
19
  getAnnouncements: "/service/application/content/v1.0/announcements",
20
20
  getBlog: "/service/application/content/v1.0/blogs/{slug}",
21
21
  getBlogs: "/service/application/content/v1.0/blogs",
22
+ getBulkCustomFieldsByResource:
23
+ "/service/application/content/v2.0/customfields/resource/{resource}",
22
24
  getCustomFieldsByResourceId:
23
25
  "/service/application/content/v2.0/customfields/resource/{resource}/{resource_slug}",
24
26
  getCustomObjectBySlug:
@@ -280,6 +282,57 @@ class Content {
280
282
  return response;
281
283
  }
282
284
 
285
+ /**
286
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
287
+ * @param {import("../ApplicationAPIClient").Options} - Options
288
+ * @returns {Promise<BulkCustomFieldsResponseByResourceSchema>} - Success response
289
+ * @name getBulkCustomFieldsByResource
290
+ * @summary: Get bulk list of custom fields of given resource
291
+ * @description: Retrieves a bulk list of custom fields attached to a particular resource by using the resource and resource IDs. The resource_ids query parameter is required and can accept multiple comma-separated values. Optional filters for keys and namespaces can also be applied. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/content/getBulkCustomFieldsByResource/).
292
+ */
293
+ async getBulkCustomFieldsByResource(
294
+ { resource, resourceIds, keys, namespaces, requestHeaders } = {
295
+ requestHeaders: {},
296
+ },
297
+ { responseHeaders } = { responseHeaders: false }
298
+ ) {
299
+ const errors = validateRequiredParams(arguments[0], ["resource"]);
300
+ if (errors.length > 0) {
301
+ const error = new FDKClientValidationError({
302
+ message: "Missing required field",
303
+ details: errors,
304
+ });
305
+ return Promise.reject(new FDKClientValidationError(error));
306
+ }
307
+
308
+ const query_params = {};
309
+ query_params["resource_ids"] = resourceIds;
310
+ query_params["keys"] = keys;
311
+ query_params["namespaces"] = namespaces;
312
+
313
+ const xHeaders = {};
314
+
315
+ const response = await ApplicationAPIClient.execute(
316
+ this._conf,
317
+ "get",
318
+ constructUrl({
319
+ url: this._urls["getBulkCustomFieldsByResource"],
320
+ params: { resource },
321
+ }),
322
+ query_params,
323
+ undefined,
324
+ { ...xHeaders, ...requestHeaders },
325
+ { responseHeaders }
326
+ );
327
+
328
+ let responseData = response;
329
+ if (responseHeaders) {
330
+ responseData = response[0];
331
+ }
332
+
333
+ return response;
334
+ }
335
+
283
336
  /**
284
337
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
285
338
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -6,12 +6,11 @@ declare class Logistic {
6
6
  getAllCountries: string;
7
7
  getCountries: string;
8
8
  getCountry: string;
9
- getCourierPartners: string;
10
9
  getDeliveryPromise: string;
10
+ getFulfillmentOptionStores: string;
11
11
  getFulfillmentOptions: string;
12
12
  getLocalities: string;
13
13
  getLocality: string;
14
- getPincodeCity: string;
15
14
  validateAddress: string;
16
15
  };
17
16
  _urls: {};
@@ -46,21 +45,21 @@ declare class Logistic {
46
45
  /**
47
46
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
48
47
  * @param {import("../ApplicationAPIClient").Options} - Options
49
- * @returns {Promise<ShipmentCourierPartnerResult>} - Success response
50
- * @name getCourierPartners
51
- * @summary: Serviceable Courier Partners
52
- * @description: Get all the serviceable courier partners of a destination and the shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/logistic/getCourierPartners/).
48
+ * @returns {Promise<GetPromiseDetails>} - Success response
49
+ * @name getDeliveryPromise
50
+ * @summary: Get delivery promise
51
+ * @description: Delivery Promise Configurations involve estimating and communicating the anticipated delivery date or time to customers, taking into account parameters like store processing time, delivery partner time to delivery, and buffer time. This helps establish precise delivery expectations based on both the delivery partner's capabilities and the store's operations. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/logistic/getDeliveryPromise/).
53
52
  */
54
- getCourierPartners({ companyId, applicationId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<ShipmentCourierPartnerResult>;
53
+ getDeliveryPromise({ xLocationDetail, pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetPromiseDetails>;
55
54
  /**
56
55
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
57
56
  * @param {import("../ApplicationAPIClient").Options} - Options
58
- * @returns {Promise<GetPromiseDetails>} - Success response
59
- * @name getDeliveryPromise
60
- * @summary: Get delivery promise
61
- * @description: Get delivery promises for both global and store levels based on a specific locality type. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/logistic/getDeliveryPromise/).
57
+ * @returns {Promise<FulfillmentOptionStores>} - Success response
58
+ * @name getFulfillmentOptionStores
59
+ * @summary: Get Fulfillment Option Stores
60
+ * @description: Fetches a paginated list of stores associated with a given fulfillment option slug. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/logistic/getFulfillmentOptionStores/).
62
61
  */
63
- getDeliveryPromise({ xLocationDetail, xApplicationData, pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetPromiseDetails>;
62
+ getFulfillmentOptionStores({ slug, pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<FulfillmentOptionStores>;
64
63
  /**
65
64
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
66
65
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -88,15 +87,6 @@ declare class Logistic {
88
87
  * @description: Get detailed geographical data for a specific locality, such as a pincode. For example, for a pincode value of 400603, the service returns its parent locations, including city, state, and country details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/logistic/getLocality/).
89
88
  */
90
89
  getLocality({ localityType, localityValue, country, state, city, sector, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<GetLocalityApp>;
91
- /**
92
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
93
- * @param {import("../ApplicationAPIClient").Options} - Options
94
- * @returns {Promise<PincodeDetailsResult>} - Success response
95
- * @name getPincodeCity
96
- * @summary: Get pincode details
97
- * @description: Get details of a specific pincode, such as obtaining its city and state information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/logistic/getPincodeCity/).
98
- */
99
- getPincodeCity({ pincode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<PincodeDetailsResult>;
100
90
  /**
101
91
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
102
92
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -16,17 +16,16 @@ class Logistic {
16
16
  getCountries: "/service/application/logistics/v2.0/countries",
17
17
  getCountry:
18
18
  "/service/application/logistics/v1.0/countries/{country_iso_code}",
19
- getCourierPartners:
20
- "/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipment/courier-partners",
21
19
  getDeliveryPromise:
22
20
  "/service/application/logistics/v1.0/delivery-promise",
21
+ getFulfillmentOptionStores:
22
+ "/service/application/logistics/v1.0/fulfillment-options/{slug}/stores",
23
23
  getFulfillmentOptions:
24
24
  "/service/application/logistics/v1.0/fulfillment-options",
25
25
  getLocalities:
26
26
  "/service/application/logistics/v1.0/localities/{locality_type}",
27
27
  getLocality:
28
28
  "/service/application/logistics/v1.0/localities/{locality_type}/{locality_value}",
29
- getPincodeCity: "/service/application/logistics/v1.0/pincode/{pincode}",
30
29
  validateAddress:
31
30
  "/service/application/logistics/v1.0/country/{country_iso_code}/address/templates/{template_name}/validate",
32
31
  };
@@ -183,40 +182,33 @@ class Logistic {
183
182
  /**
184
183
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
185
184
  * @param {import("../ApplicationAPIClient").Options} - Options
186
- * @returns {Promise<ShipmentCourierPartnerResult>} - Success response
187
- * @name getCourierPartners
188
- * @summary: Serviceable Courier Partners
189
- * @description: Get all the serviceable courier partners of a destination and the shipments. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/logistic/getCourierPartners/).
185
+ * @returns {Promise<GetPromiseDetails>} - Success response
186
+ * @name getDeliveryPromise
187
+ * @summary: Get delivery promise
188
+ * @description: Delivery Promise Configurations involve estimating and communicating the anticipated delivery date or time to customers, taking into account parameters like store processing time, delivery partner time to delivery, and buffer time. This helps establish precise delivery expectations based on both the delivery partner's capabilities and the store's operations. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/logistic/getDeliveryPromise/).
190
189
  */
191
- async getCourierPartners(
192
- { companyId, applicationId, body, requestHeaders } = { requestHeaders: {} },
190
+ async getDeliveryPromise(
191
+ { xLocationDetail, pageNo, pageSize, requestHeaders } = {
192
+ requestHeaders: {},
193
+ },
193
194
  { responseHeaders } = { responseHeaders: false }
194
195
  ) {
195
- const errors = validateRequiredParams(arguments[0], [
196
- "companyId",
197
- "applicationId",
198
- ]);
199
- if (errors.length > 0) {
200
- const error = new FDKClientValidationError({
201
- message: "Missing required field",
202
- details: errors,
203
- });
204
- return Promise.reject(new FDKClientValidationError(error));
205
- }
206
-
207
196
  const query_params = {};
197
+ query_params["page_no"] = pageNo;
198
+ query_params["page_size"] = pageSize;
208
199
 
209
200
  const xHeaders = {};
201
+ xHeaders["x-location-detail"] = xLocationDetail;
210
202
 
211
203
  const response = await ApplicationAPIClient.execute(
212
204
  this._conf,
213
- "post",
205
+ "get",
214
206
  constructUrl({
215
- url: this._urls["getCourierPartners"],
216
- params: { companyId, applicationId },
207
+ url: this._urls["getDeliveryPromise"],
208
+ params: {},
217
209
  }),
218
210
  query_params,
219
- body,
211
+ undefined,
220
212
  { ...xHeaders, ...requestHeaders },
221
213
  { responseHeaders }
222
214
  );
@@ -232,31 +224,36 @@ class Logistic {
232
224
  /**
233
225
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
234
226
  * @param {import("../ApplicationAPIClient").Options} - Options
235
- * @returns {Promise<GetPromiseDetails>} - Success response
236
- * @name getDeliveryPromise
237
- * @summary: Get delivery promise
238
- * @description: Get delivery promises for both global and store levels based on a specific locality type. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/logistic/getDeliveryPromise/).
227
+ * @returns {Promise<FulfillmentOptionStores>} - Success response
228
+ * @name getFulfillmentOptionStores
229
+ * @summary: Get Fulfillment Option Stores
230
+ * @description: Fetches a paginated list of stores associated with a given fulfillment option slug. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/logistic/getFulfillmentOptionStores/).
239
231
  */
240
- async getDeliveryPromise(
241
- { xLocationDetail, xApplicationData, pageNo, pageSize, requestHeaders } = {
242
- requestHeaders: {},
243
- },
232
+ async getFulfillmentOptionStores(
233
+ { slug, pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
244
234
  { responseHeaders } = { responseHeaders: false }
245
235
  ) {
236
+ const errors = validateRequiredParams(arguments[0], ["slug"]);
237
+ if (errors.length > 0) {
238
+ const error = new FDKClientValidationError({
239
+ message: "Missing required field",
240
+ details: errors,
241
+ });
242
+ return Promise.reject(new FDKClientValidationError(error));
243
+ }
244
+
246
245
  const query_params = {};
247
246
  query_params["page_no"] = pageNo;
248
247
  query_params["page_size"] = pageSize;
249
248
 
250
249
  const xHeaders = {};
251
- xHeaders["x-location-detail"] = xLocationDetail;
252
- xHeaders["x-application-data"] = xApplicationData;
253
250
 
254
251
  const response = await ApplicationAPIClient.execute(
255
252
  this._conf,
256
253
  "get",
257
254
  constructUrl({
258
- url: this._urls["getDeliveryPromise"],
259
- params: {},
255
+ url: this._urls["getFulfillmentOptionStores"],
256
+ params: { slug },
260
257
  }),
261
258
  query_params,
262
259
  undefined,
@@ -438,52 +435,6 @@ class Logistic {
438
435
  return response;
439
436
  }
440
437
 
441
- /**
442
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
443
- * @param {import("../ApplicationAPIClient").Options} - Options
444
- * @returns {Promise<PincodeDetailsResult>} - Success response
445
- * @name getPincodeCity
446
- * @summary: Get pincode details
447
- * @description: Get details of a specific pincode, such as obtaining its city and state information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/logistic/getPincodeCity/).
448
- */
449
- async getPincodeCity(
450
- { pincode, requestHeaders } = { requestHeaders: {} },
451
- { responseHeaders } = { responseHeaders: false }
452
- ) {
453
- const errors = validateRequiredParams(arguments[0], ["pincode"]);
454
- if (errors.length > 0) {
455
- const error = new FDKClientValidationError({
456
- message: "Missing required field",
457
- details: errors,
458
- });
459
- return Promise.reject(new FDKClientValidationError(error));
460
- }
461
-
462
- const query_params = {};
463
-
464
- const xHeaders = {};
465
-
466
- const response = await ApplicationAPIClient.execute(
467
- this._conf,
468
- "get",
469
- constructUrl({
470
- url: this._urls["getPincodeCity"],
471
- params: { pincode },
472
- }),
473
- query_params,
474
- undefined,
475
- { ...xHeaders, ...requestHeaders },
476
- { responseHeaders }
477
- );
478
-
479
- let responseData = response;
480
- if (responseHeaders) {
481
- responseData = response[0];
482
- }
483
-
484
- return response;
485
- }
486
-
487
438
  /**
488
439
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
489
440
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -8,6 +8,7 @@ declare class Order {
8
8
  getOrderById: string;
9
9
  getOrders: string;
10
10
  getPosOrderById: string;
11
+ getRefundModes: string;
11
12
  getShipmentBagReasons: string;
12
13
  getShipmentById: string;
13
14
  getShipmentReasons: string;
@@ -64,6 +65,16 @@ declare class Order {
64
65
  * @description: Retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/order/getPosOrderById/).
65
66
  */
66
67
  getPosOrderById({ orderId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<OrderById>;
68
+ /**
69
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
70
+ * @param {import("../ApplicationAPIClient").Options} - Options
71
+ * @returns {Promise<RefundOptions>} - Success response
72
+ * @name getRefundModes
73
+ * @summary: Get refund modes for a shipment
74
+ * @description: Returns a list of available refund options for the given company and shipment.
75
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/order/getRefundModes/).
76
+ */
77
+ getRefundModes({ shipmentId, lineNumbers, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options, ...args: any[]): Promise<RefundOptions>;
67
78
  /**
68
79
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
69
80
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -20,6 +20,8 @@ class Order {
20
20
  getOrders: "/service/application/order/v1.0/orders",
21
21
  getPosOrderById:
22
22
  "/service/application/order/v1.0/orders/pos-order/{order_id}",
23
+ getRefundModes:
24
+ "/service/application/order-manage/v1.0/shipment/{shipment_id}/refund/modes",
23
25
  getShipmentBagReasons:
24
26
  "/service/application/order/v1.0/orders/shipments/{shipment_id}/bags/{bag_id}/reasons",
25
27
  getShipmentById:
@@ -298,6 +300,54 @@ class Order {
298
300
  return response;
299
301
  }
300
302
 
303
+ /**
304
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
305
+ * @param {import("../ApplicationAPIClient").Options} - Options
306
+ * @returns {Promise<RefundOptions>} - Success response
307
+ * @name getRefundModes
308
+ * @summary: Get refund modes for a shipment
309
+ * @description: Returns a list of available refund options for the given company and shipment.
310
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/order/getRefundModes/).
311
+ */
312
+ async getRefundModes(
313
+ { shipmentId, lineNumbers, requestHeaders } = { requestHeaders: {} },
314
+ { responseHeaders } = { responseHeaders: false }
315
+ ) {
316
+ const errors = validateRequiredParams(arguments[0], ["shipmentId"]);
317
+ if (errors.length > 0) {
318
+ const error = new FDKClientValidationError({
319
+ message: "Missing required field",
320
+ details: errors,
321
+ });
322
+ return Promise.reject(new FDKClientValidationError(error));
323
+ }
324
+
325
+ const query_params = {};
326
+ query_params["line_numbers"] = lineNumbers;
327
+
328
+ const xHeaders = {};
329
+
330
+ const response = await ApplicationAPIClient.execute(
331
+ this._conf,
332
+ "get",
333
+ constructUrl({
334
+ url: this._urls["getRefundModes"],
335
+ params: { shipmentId },
336
+ }),
337
+ query_params,
338
+ undefined,
339
+ { ...xHeaders, ...requestHeaders },
340
+ { responseHeaders }
341
+ );
342
+
343
+ let responseData = response;
344
+ if (responseHeaders) {
345
+ responseData = response[0];
346
+ }
347
+
348
+ return response;
349
+ }
350
+
301
351
  /**
302
352
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
303
353
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -310,21 +310,21 @@ declare class Payment {
310
310
  /**
311
311
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
312
312
  * @param {import("../ApplicationAPIClient").Options} - Options
313
- * @returns {Promise<RefundBeneficiaries>} - Success response
313
+ * @returns {Promise<GetRefundBeneficiary>} - Success response
314
314
  * @name getRefundBeneficiaries
315
315
  * @summary: Get Refund Beneficiaries
316
316
  * @description: Returns a list of UPI and Bank refund beneficiaries associated with a user. Both `order_id` and `shipment_id` are optional query parameters. Use the optional filter_by enum parameter to refine the response. When the value of filter_by is order, the API returns only beneficiaries associated with the order. When the value of filter_by is shipment, it returns only beneficiaries associated with the shipment. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/getRefundBeneficiaries/).
317
317
  */
318
- getRefundBeneficiaries({ orderId, shipmentId, filterBy, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<RefundBeneficiaries>;
318
+ getRefundBeneficiaries({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetRefundBeneficiary>;
319
319
  /**
320
320
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
321
321
  * @param {import("../ApplicationAPIClient").Options} - Options
322
- * @returns {Promise<RefundBeneficiaries>} - Success response
322
+ * @returns {Promise<GetRefundBeneficiary>} - Success response
323
323
  * @name getRefundBeneficiariesUsingOTPSession
324
324
  * @summary: Get Refund Beneficiaries using OTP session
325
325
  * @description: Returns a list of UPI and Bank refund beneficiaries associated with a user for a given order and shipment. Use the optional filter_by enum parameter to refine the response. When the value of filter_by is order, the API returns only beneficiaries associated with the order. When the value of filter_by is shipment, it returns only beneficiaries associated with the shipment. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/getRefundBeneficiariesUsingOTPSession/).
326
326
  */
327
- getRefundBeneficiariesUsingOTPSession({ orderId, shipmentId, filterBy, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<RefundBeneficiaries>;
327
+ getRefundBeneficiariesUsingOTPSession({ orderId, shipmentId, filterBy, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetRefundBeneficiary>;
328
328
  /**
329
329
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
330
330
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -1219,19 +1219,18 @@ class Payment {
1219
1219
  /**
1220
1220
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1221
1221
  * @param {import("../ApplicationAPIClient").Options} - Options
1222
- * @returns {Promise<RefundBeneficiaries>} - Success response
1222
+ * @returns {Promise<GetRefundBeneficiary>} - Success response
1223
1223
  * @name getRefundBeneficiaries
1224
1224
  * @summary: Get Refund Beneficiaries
1225
1225
  * @description: Returns a list of UPI and Bank refund beneficiaries associated with a user. Both `order_id` and `shipment_id` are optional query parameters. Use the optional filter_by enum parameter to refine the response. When the value of filter_by is order, the API returns only beneficiaries associated with the order. When the value of filter_by is shipment, it returns only beneficiaries associated with the shipment. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/getRefundBeneficiaries/).
1226
1226
  */
1227
1227
  async getRefundBeneficiaries(
1228
- { orderId, shipmentId, filterBy, requestHeaders } = { requestHeaders: {} },
1228
+ { orderId, shipmentId, requestHeaders } = { requestHeaders: {} },
1229
1229
  { responseHeaders } = { responseHeaders: false }
1230
1230
  ) {
1231
1231
  const query_params = {};
1232
1232
  query_params["order_id"] = orderId;
1233
1233
  query_params["shipment_id"] = shipmentId;
1234
- query_params["filter_by"] = filterBy;
1235
1234
 
1236
1235
  const xHeaders = {};
1237
1236
 
@@ -1259,7 +1258,7 @@ class Payment {
1259
1258
  /**
1260
1259
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1261
1260
  * @param {import("../ApplicationAPIClient").Options} - Options
1262
- * @returns {Promise<RefundBeneficiaries>} - Success response
1261
+ * @returns {Promise<GetRefundBeneficiary>} - Success response
1263
1262
  * @name getRefundBeneficiariesUsingOTPSession
1264
1263
  * @summary: Get Refund Beneficiaries using OTP session
1265
1264
  * @description: Returns a list of UPI and Bank refund beneficiaries associated with a user for a given order and shipment. Use the optional filter_by enum parameter to refine the response. When the value of filter_by is order, the API returns only beneficiaries associated with the order. When the value of filter_by is shipment, it returns only beneficiaries associated with the shipment. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/payment/getRefundBeneficiariesUsingOTPSession/).
@@ -9,6 +9,7 @@ declare class User {
9
9
  deleteMobileNumber: string;
10
10
  deleteUser: string;
11
11
  forgotPassword: string;
12
+ getAttributesDefinition: string;
12
13
  getListOfActiveSessions: string;
13
14
  getLoggedInUser: string;
14
15
  getPlatformConfig: string;
@@ -107,6 +108,15 @@ declare class User {
107
108
  * @description: Reset a password using the code sent on email or sms the login. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/user/forgotPassword/).
108
109
  */
109
110
  forgotPassword({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<LoginSuccess>;
111
+ /**
112
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
113
+ * @param {import("../ApplicationAPIClient").Options} - Options
114
+ * @returns {Promise<Object>} - Success response
115
+ * @name getAttributesDefinition
116
+ * @summary: Get User Attribute Definitions
117
+ * @description: Retrieve user attribute definitions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/user/getAttributesDefinition/).
118
+ */
119
+ getAttributesDefinition({ excludingIds, slug, type, customerEditable, encrypted, pinned, pinOrder, isLocked, name, registrationEnabled, registrationType, pageSize, pageNo, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<any>;
110
120
  /**
111
121
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
112
122
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -19,6 +19,8 @@ class User {
19
19
  deleteUser: "/service/application/user/authentication/v1.0/delete",
20
20
  forgotPassword:
21
21
  "/service/application/user/authentication/v1.0/login/password/reset/forgot",
22
+ getAttributesDefinition:
23
+ "/service/application/user/profile/v1.0/attributes/definition",
22
24
  getListOfActiveSessions:
23
25
  "/service/application/user/authentication/v1.0/sessions",
24
26
  getLoggedInUser: "/service/application/user/authentication/v1.0/session",
@@ -353,6 +355,71 @@ class User {
353
355
  return response;
354
356
  }
355
357
 
358
+ /**
359
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
360
+ * @param {import("../ApplicationAPIClient").Options} - Options
361
+ * @returns {Promise<Object>} - Success response
362
+ * @name getAttributesDefinition
363
+ * @summary: Get User Attribute Definitions
364
+ * @description: Retrieve user attribute definitions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/application/user/getAttributesDefinition/).
365
+ */
366
+ async getAttributesDefinition(
367
+ {
368
+ excludingIds,
369
+ slug,
370
+ type,
371
+ customerEditable,
372
+ encrypted,
373
+ pinned,
374
+ pinOrder,
375
+ isLocked,
376
+ name,
377
+ registrationEnabled,
378
+ registrationType,
379
+ pageSize,
380
+ pageNo,
381
+ requestHeaders,
382
+ } = { requestHeaders: {} },
383
+ { responseHeaders } = { responseHeaders: false }
384
+ ) {
385
+ const query_params = {};
386
+ query_params["excluding_ids"] = excludingIds;
387
+ query_params["slug"] = slug;
388
+ query_params["type"] = type;
389
+ query_params["customer_editable"] = customerEditable;
390
+ query_params["encrypted"] = encrypted;
391
+ query_params["pinned"] = pinned;
392
+ query_params["pin_order"] = pinOrder;
393
+ query_params["is_locked"] = isLocked;
394
+ query_params["name"] = name;
395
+ query_params["registration_enabled"] = registrationEnabled;
396
+ query_params["registration_type"] = registrationType;
397
+ query_params["page_size"] = pageSize;
398
+ query_params["page_no"] = pageNo;
399
+
400
+ const xHeaders = {};
401
+
402
+ const response = await ApplicationAPIClient.execute(
403
+ this._conf,
404
+ "get",
405
+ constructUrl({
406
+ url: this._urls["getAttributesDefinition"],
407
+ params: {},
408
+ }),
409
+ query_params,
410
+ undefined,
411
+ { ...xHeaders, ...requestHeaders },
412
+ { responseHeaders }
413
+ );
414
+
415
+ let responseData = response;
416
+ if (responseHeaders) {
417
+ responseData = response[0];
418
+ }
419
+
420
+ return response;
421
+ }
422
+
356
423
  /**
357
424
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
358
425
  * @param {import("../ApplicationAPIClient").Options} - Options