@gofynd/fdk-client-javascript 3.0.0-beta.1 → 3.1.0-beta.1
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/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +14 -14
- package/sdk/application/Cart/CartApplicationClient.js +14 -14
- package/sdk/application/Content/ContentApplicationClient.d.ts +10 -0
- package/sdk/application/Content/ContentApplicationClient.js +53 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +136 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -12
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +46 -33
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +41 -25
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +6 -397
- package/sdk/platform/Billing/BillingPlatformClient.js +77 -3215
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +417 -3811
- package/sdk/platform/Billing/BillingPlatformModel.js +292 -2544
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +12 -451
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -483
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +34 -34
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +34 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +363 -29
- package/sdk/platform/Cart/CartPlatformModel.js +203 -31
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +57 -57
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +220 -200
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +121 -91
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +58 -46
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +10 -51
- package/sdk/platform/Catalog/CatalogPlatformClient.js +79 -400
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +22 -228
- package/sdk/platform/Catalog/CatalogPlatformModel.js +12 -163
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +15 -61
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -65
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +4 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +10 -14
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +94 -30
- package/sdk/platform/Communication/CommunicationPlatformModel.js +110 -32
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +33 -1
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +62 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +11 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +5 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +12 -2
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -1
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +12 -10
- package/sdk/platform/Content/ContentPlatformModel.d.ts +42 -12
- package/sdk/platform/Content/ContentPlatformModel.js +43 -13
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +28 -28
- package/sdk/platform/Finance/FinancePlatformClient.js +28 -28
- package/sdk/platform/Order/OrderPlatformClient.d.ts +21 -21
- package/sdk/platform/Order/OrderPlatformClient.js +21 -21
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1010 -80
- package/sdk/platform/Order/OrderPlatformModel.js +665 -70
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +31 -4
- package/sdk/platform/Payment/PaymentPlatformModel.js +11 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +8 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +14 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +6 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +24 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +194 -23
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +116 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +23 -1
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +16 -0
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
- package/sdk/platform/Share/SharePlatformModel.js +2 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +10 -12
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +45 -49
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +10 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +12 -12
- package/sdk/public/PublicClient.d.ts +0 -2
- package/sdk/public/PublicClient.js +0 -4
- package/sdk/public/index.d.ts +0 -1
- package/sdk/public/index.js +0 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +0 -56
- package/sdk/public/Billing/BillingPublicClient.js +0 -397
- package/sdk/public/Billing/BillingPublicModel.d.ts +0 -919
- package/sdk/public/Billing/BillingPublicModel.js +0 -560
- package/sdk/public/Billing/BillingPublicValidator.d.ts +0 -43
- package/sdk/public/Billing/BillingPublicValidator.js +0 -50
package/README.md
CHANGED
|
@@ -237,7 +237,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
237
237
|
The above code will log the curl command in the console
|
|
238
238
|
|
|
239
239
|
```bash
|
|
240
|
-
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.
|
|
240
|
+
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.1.0-beta.1' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
241
241
|
Active Theme: Emerge
|
|
242
242
|
```
|
|
243
243
|
|
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@ declare class Cart {
|
|
|
43
43
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
44
44
|
* @returns {Promise<SaveAddressResponse>} - Success response
|
|
45
45
|
* @name addAddress
|
|
46
|
-
* @summary:
|
|
46
|
+
* @summary: Creates a new address for a customer
|
|
47
47
|
* @description: Add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addAddress/).
|
|
48
48
|
*/
|
|
49
49
|
addAddress({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<SaveAddressResponse>;
|
|
@@ -106,7 +106,7 @@ declare class Cart {
|
|
|
106
106
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
107
107
|
* @returns {Promise<Address>} - Success response
|
|
108
108
|
* @name getAddressById
|
|
109
|
-
* @summary:
|
|
109
|
+
* @summary: Get details for a single customer address
|
|
110
110
|
* @description: Get a specific customer address stored in the system by providing its unique identifier. This API provides detailed information about the address, including the recipient's name, address, city, postal code, and other relevant details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddressById/).
|
|
111
111
|
*/
|
|
112
112
|
getAddressById({ id, cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, userId, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<Address>;
|
|
@@ -115,7 +115,7 @@ declare class Cart {
|
|
|
115
115
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
116
116
|
* @returns {Promise<GetAddressesResponse>} - Success response
|
|
117
117
|
* @name getAddresses
|
|
118
|
-
* @summary: Get
|
|
118
|
+
* @summary: Get a list of addresses for a customer
|
|
119
119
|
* @description: List all addresses saved by the customer, simplifying the checkout process by offering pre-saved address options for delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddresses/).
|
|
120
120
|
*/
|
|
121
121
|
getAddresses({ cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, userId, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetAddressesResponse>;
|
|
@@ -124,7 +124,7 @@ declare class Cart {
|
|
|
124
124
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
125
125
|
* @returns {Promise<BulkPriceResponse>} - Success response
|
|
126
126
|
* @name getBulkDiscountOffers
|
|
127
|
-
* @summary:
|
|
127
|
+
* @summary: List bulk discounts
|
|
128
128
|
* @description: List offer discounts with information about quantity and seller. One offer is marked with a "best" flag, indicating it as the best offer among the list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getBulkDiscountOffers/).
|
|
129
129
|
*/
|
|
130
130
|
getBulkDiscountOffers({ itemId, articleId, uid, slug, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<BulkPriceResponse>;
|
|
@@ -169,7 +169,7 @@ declare class Cart {
|
|
|
169
169
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
170
170
|
* @returns {Promise<GetShareCartLinkResponse>} - Success response
|
|
171
171
|
* @name getCartShareLink
|
|
172
|
-
* @summary:
|
|
172
|
+
* @summary: Create share cart link
|
|
173
173
|
* @description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartShareLink/).
|
|
174
174
|
*/
|
|
175
175
|
getCartShareLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetShareCartLinkResponse>;
|
|
@@ -178,7 +178,7 @@ declare class Cart {
|
|
|
178
178
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
179
179
|
* @returns {Promise<SharedCartResponse>} - Success response
|
|
180
180
|
* @name getCartSharedItems
|
|
181
|
-
* @summary:
|
|
181
|
+
* @summary: List shared cart items
|
|
182
182
|
* @description: Get cart items from the shared cart link based on unique token. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartSharedItems/).
|
|
183
183
|
*/
|
|
184
184
|
getCartSharedItems({ token, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<SharedCartResponse>;
|
|
@@ -214,7 +214,7 @@ declare class Cart {
|
|
|
214
214
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
215
215
|
* @returns {Promise<LadderPriceOffers>} - Success response
|
|
216
216
|
* @name getLadderOffers
|
|
217
|
-
* @summary:
|
|
217
|
+
* @summary: List ladder offers
|
|
218
218
|
* @description: Get ladder offers associated for the items in the cart. Ladder offers provide discounts or special pricing based on item quantity, allowing users to benefit from bulk purchases or promotional deals. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getLadderOffers/).
|
|
219
219
|
*/
|
|
220
220
|
getLadderOffers({ slug, storeId, promotionId, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<LadderPriceOffers>;
|
|
@@ -232,7 +232,7 @@ declare class Cart {
|
|
|
232
232
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
233
233
|
* @returns {Promise<PromotionOffersResponse>} - Success response
|
|
234
234
|
* @name getPromotionOffers
|
|
235
|
-
* @summary:
|
|
235
|
+
* @summary: List available promotion offers
|
|
236
236
|
* @description: List all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionOffers/).
|
|
237
237
|
*/
|
|
238
238
|
getPromotionOffers({ slug, pageSize, promotionGroup, storeId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PromotionOffersResponse>;
|
|
@@ -250,7 +250,7 @@ declare class Cart {
|
|
|
250
250
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
251
251
|
* @returns {Promise<DeleteAddressResponse>} - Success response
|
|
252
252
|
* @name removeAddress
|
|
253
|
-
* @summary:
|
|
253
|
+
* @summary: Removes an address from a customer's address list
|
|
254
254
|
* @description: Delete an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/).
|
|
255
255
|
*/
|
|
256
256
|
removeAddress({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<DeleteAddressResponse>;
|
|
@@ -268,7 +268,7 @@ declare class Cart {
|
|
|
268
268
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
269
269
|
* @returns {Promise<CartDetailResponse>} - Success response
|
|
270
270
|
* @name selectAddress
|
|
271
|
-
* @summary: Select
|
|
271
|
+
* @summary: Select customer address for order processing
|
|
272
272
|
* @description: Select an address from the saved customer addresses and validates the availability of items in the cart. Additionally, it verifies and updates the delivery promise based on the selected address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectAddress/).
|
|
273
273
|
*/
|
|
274
274
|
selectAddress({ body, cartId, buyNow, i, b, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResponse>;
|
|
@@ -277,7 +277,7 @@ declare class Cart {
|
|
|
277
277
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
278
278
|
* @returns {Promise<CartDetailResponse>} - Success response
|
|
279
279
|
* @name selectPaymentMode
|
|
280
|
-
* @summary:
|
|
280
|
+
* @summary: Select payment mode
|
|
281
281
|
* @description: Select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectPaymentMode/).
|
|
282
282
|
*/
|
|
283
283
|
selectPaymentMode({ body, id, buyNow, orderType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResponse>;
|
|
@@ -286,7 +286,7 @@ declare class Cart {
|
|
|
286
286
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
287
287
|
* @returns {Promise<UpdateAddressResponse>} - Success response
|
|
288
288
|
* @name updateAddress
|
|
289
|
-
* @summary:
|
|
289
|
+
* @summary: Updates an existing customer address
|
|
290
290
|
* @description: Customer can modify the details of a previously saved addresses. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateAddress/).
|
|
291
291
|
*/
|
|
292
292
|
updateAddress({ id, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<UpdateAddressResponse>;
|
|
@@ -313,7 +313,7 @@ declare class Cart {
|
|
|
313
313
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
314
314
|
* @returns {Promise<SharedCartResponse>} - Success response
|
|
315
315
|
* @name updateCartWithSharedItems
|
|
316
|
-
* @summary:
|
|
316
|
+
* @summary: Update with shared items
|
|
317
317
|
* @description: Merge or replace shared cart items with existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartWithSharedItems/).
|
|
318
318
|
*/
|
|
319
319
|
updateCartWithSharedItems({ token, action, cartId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<SharedCartResponse>;
|
|
@@ -322,7 +322,7 @@ declare class Cart {
|
|
|
322
322
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
323
323
|
* @returns {Promise<PaymentCouponValidate>} - Success response
|
|
324
324
|
* @name validateCouponForPayment
|
|
325
|
-
* @summary: Validate coupon
|
|
325
|
+
* @summary: Validate applied coupon
|
|
326
326
|
* @description: Validate the applicability of a coupon code for the selected payment mode for the existing cart. This ensures the coupon's validity before proceeding with the payment process, enhancing user experience and preventing potential errors during transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/validateCouponForPayment/).
|
|
327
327
|
*/
|
|
328
328
|
validateCouponForPayment({ id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, iin, network, type, cardId, cartType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<PaymentCouponValidate>;
|
|
@@ -69,7 +69,7 @@ class Cart {
|
|
|
69
69
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
70
70
|
* @returns {Promise<SaveAddressResponse>} - Success response
|
|
71
71
|
* @name addAddress
|
|
72
|
-
* @summary:
|
|
72
|
+
* @summary: Creates a new address for a customer
|
|
73
73
|
* @description: Add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addAddress/).
|
|
74
74
|
*/
|
|
75
75
|
async addAddress(
|
|
@@ -422,7 +422,7 @@ class Cart {
|
|
|
422
422
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
423
423
|
* @returns {Promise<Address>} - Success response
|
|
424
424
|
* @name getAddressById
|
|
425
|
-
* @summary:
|
|
425
|
+
* @summary: Get details for a single customer address
|
|
426
426
|
* @description: Get a specific customer address stored in the system by providing its unique identifier. This API provides detailed information about the address, including the recipient's name, address, city, postal code, and other relevant details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddressById/).
|
|
427
427
|
*/
|
|
428
428
|
async getAddressById(
|
|
@@ -491,7 +491,7 @@ class Cart {
|
|
|
491
491
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
492
492
|
* @returns {Promise<GetAddressesResponse>} - Success response
|
|
493
493
|
* @name getAddresses
|
|
494
|
-
* @summary: Get
|
|
494
|
+
* @summary: Get a list of addresses for a customer
|
|
495
495
|
* @description: List all addresses saved by the customer, simplifying the checkout process by offering pre-saved address options for delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddresses/).
|
|
496
496
|
*/
|
|
497
497
|
async getAddresses(
|
|
@@ -552,7 +552,7 @@ class Cart {
|
|
|
552
552
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
553
553
|
* @returns {Promise<BulkPriceResponse>} - Success response
|
|
554
554
|
* @name getBulkDiscountOffers
|
|
555
|
-
* @summary:
|
|
555
|
+
* @summary: List bulk discounts
|
|
556
556
|
* @description: List offer discounts with information about quantity and seller. One offer is marked with a "best" flag, indicating it as the best offer among the list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getBulkDiscountOffers/).
|
|
557
557
|
*/
|
|
558
558
|
async getBulkDiscountOffers(
|
|
@@ -812,7 +812,7 @@ class Cart {
|
|
|
812
812
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
813
813
|
* @returns {Promise<GetShareCartLinkResponse>} - Success response
|
|
814
814
|
* @name getCartShareLink
|
|
815
|
-
* @summary:
|
|
815
|
+
* @summary: Create share cart link
|
|
816
816
|
* @description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartShareLink/).
|
|
817
817
|
*/
|
|
818
818
|
async getCartShareLink(
|
|
@@ -857,7 +857,7 @@ class Cart {
|
|
|
857
857
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
858
858
|
* @returns {Promise<SharedCartResponse>} - Success response
|
|
859
859
|
* @name getCartSharedItems
|
|
860
|
-
* @summary:
|
|
860
|
+
* @summary: List shared cart items
|
|
861
861
|
* @description: Get cart items from the shared cart link based on unique token. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartSharedItems/).
|
|
862
862
|
*/
|
|
863
863
|
async getCartSharedItems(
|
|
@@ -1052,7 +1052,7 @@ class Cart {
|
|
|
1052
1052
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1053
1053
|
* @returns {Promise<LadderPriceOffers>} - Success response
|
|
1054
1054
|
* @name getLadderOffers
|
|
1055
|
-
* @summary:
|
|
1055
|
+
* @summary: List ladder offers
|
|
1056
1056
|
* @description: Get ladder offers associated for the items in the cart. Ladder offers provide discounts or special pricing based on item quantity, allowing users to benefit from bulk purchases or promotional deals. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getLadderOffers/).
|
|
1057
1057
|
*/
|
|
1058
1058
|
async getLadderOffers(
|
|
@@ -1157,7 +1157,7 @@ class Cart {
|
|
|
1157
1157
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1158
1158
|
* @returns {Promise<PromotionOffersResponse>} - Success response
|
|
1159
1159
|
* @name getPromotionOffers
|
|
1160
|
-
* @summary:
|
|
1160
|
+
* @summary: List available promotion offers
|
|
1161
1161
|
* @description: List all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionOffers/).
|
|
1162
1162
|
*/
|
|
1163
1163
|
async getPromotionOffers(
|
|
@@ -1273,7 +1273,7 @@ class Cart {
|
|
|
1273
1273
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1274
1274
|
* @returns {Promise<DeleteAddressResponse>} - Success response
|
|
1275
1275
|
* @name removeAddress
|
|
1276
|
-
* @summary:
|
|
1276
|
+
* @summary: Removes an address from a customer's address list
|
|
1277
1277
|
* @description: Delete an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/).
|
|
1278
1278
|
*/
|
|
1279
1279
|
async removeAddress(
|
|
@@ -1373,7 +1373,7 @@ class Cart {
|
|
|
1373
1373
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1374
1374
|
* @returns {Promise<CartDetailResponse>} - Success response
|
|
1375
1375
|
* @name selectAddress
|
|
1376
|
-
* @summary: Select
|
|
1376
|
+
* @summary: Select customer address for order processing
|
|
1377
1377
|
* @description: Select an address from the saved customer addresses and validates the availability of items in the cart. Additionally, it verifies and updates the delivery promise based on the selected address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectAddress/).
|
|
1378
1378
|
*/
|
|
1379
1379
|
async selectAddress(
|
|
@@ -1422,7 +1422,7 @@ class Cart {
|
|
|
1422
1422
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1423
1423
|
* @returns {Promise<CartDetailResponse>} - Success response
|
|
1424
1424
|
* @name selectPaymentMode
|
|
1425
|
-
* @summary:
|
|
1425
|
+
* @summary: Select payment mode
|
|
1426
1426
|
* @description: Select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectPaymentMode/).
|
|
1427
1427
|
*/
|
|
1428
1428
|
async selectPaymentMode(
|
|
@@ -1470,7 +1470,7 @@ class Cart {
|
|
|
1470
1470
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1471
1471
|
* @returns {Promise<UpdateAddressResponse>} - Success response
|
|
1472
1472
|
* @name updateAddress
|
|
1473
|
-
* @summary:
|
|
1473
|
+
* @summary: Updates an existing customer address
|
|
1474
1474
|
* @description: Customer can modify the details of a previously saved addresses. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateAddress/).
|
|
1475
1475
|
*/
|
|
1476
1476
|
async updateAddress(
|
|
@@ -1631,7 +1631,7 @@ class Cart {
|
|
|
1631
1631
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1632
1632
|
* @returns {Promise<SharedCartResponse>} - Success response
|
|
1633
1633
|
* @name updateCartWithSharedItems
|
|
1634
|
-
* @summary:
|
|
1634
|
+
* @summary: Update with shared items
|
|
1635
1635
|
* @description: Merge or replace shared cart items with existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartWithSharedItems/).
|
|
1636
1636
|
*/
|
|
1637
1637
|
async updateCartWithSharedItems(
|
|
@@ -1690,7 +1690,7 @@ class Cart {
|
|
|
1690
1690
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1691
1691
|
* @returns {Promise<PaymentCouponValidate>} - Success response
|
|
1692
1692
|
* @name validateCouponForPayment
|
|
1693
|
-
* @summary: Validate coupon
|
|
1693
|
+
* @summary: Validate applied coupon
|
|
1694
1694
|
* @description: Validate the applicability of a coupon code for the selected payment mode for the existing cart. This ensures the coupon's validity before proceeding with the payment process, enhancing user experience and preventing potential errors during transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/validateCouponForPayment/).
|
|
1695
1695
|
*/
|
|
1696
1696
|
async validateCouponForPayment(
|
|
@@ -26,6 +26,7 @@ declare class Content {
|
|
|
26
26
|
getSEOMarkupSchemas: string;
|
|
27
27
|
getSupportInformation: string;
|
|
28
28
|
getTags: string;
|
|
29
|
+
getWellKnownUrl: string;
|
|
29
30
|
};
|
|
30
31
|
_urls: {};
|
|
31
32
|
updateUrls(urls: any): void;
|
|
@@ -236,4 +237,13 @@ declare class Content {
|
|
|
236
237
|
* @description: Lists HTML tags to power additional functionalities within an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getTags/).
|
|
237
238
|
*/
|
|
238
239
|
getTags({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<TagsSchema>;
|
|
240
|
+
/**
|
|
241
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
242
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
243
|
+
* @returns {Promise<WellKnownResponse>} - Success response
|
|
244
|
+
* @name getWellKnownUrl
|
|
245
|
+
* @summary: Get a specific well-known URL
|
|
246
|
+
* @description: Retrieves the details of a specific well-known URL by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getWellKnownUrl/).
|
|
247
|
+
*/
|
|
248
|
+
getWellKnownUrl({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<WellKnownResponse>;
|
|
239
249
|
}
|
|
@@ -39,6 +39,7 @@ class Content {
|
|
|
39
39
|
getSEOMarkupSchemas: "/service/application/content/v1.0/seo/schema",
|
|
40
40
|
getSupportInformation: "/service/application/content/v1.0/support",
|
|
41
41
|
getTags: "/service/application/content/v1.0/tags",
|
|
42
|
+
getWellKnownUrl: "/service/application/content/v1.0/well-known/{slug}",
|
|
42
43
|
};
|
|
43
44
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
44
45
|
(urls, [method, relativeUrl]) => {
|
|
@@ -1186,6 +1187,58 @@ class Content {
|
|
|
1186
1187
|
|
|
1187
1188
|
return response;
|
|
1188
1189
|
}
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1193
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1194
|
+
* @returns {Promise<WellKnownResponse>} - Success response
|
|
1195
|
+
* @name getWellKnownUrl
|
|
1196
|
+
* @summary: Get a specific well-known URL
|
|
1197
|
+
* @description: Retrieves the details of a specific well-known URL by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getWellKnownUrl/).
|
|
1198
|
+
*/
|
|
1199
|
+
async getWellKnownUrl(
|
|
1200
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
1201
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1202
|
+
) {
|
|
1203
|
+
let invalidInput = [];
|
|
1204
|
+
|
|
1205
|
+
if (!slug) {
|
|
1206
|
+
invalidInput.push({
|
|
1207
|
+
message: `The 'slug' field is required.`,
|
|
1208
|
+
path: ["slug"],
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
if (invalidInput.length) {
|
|
1212
|
+
const error = new Error();
|
|
1213
|
+
error.message = "Missing required field";
|
|
1214
|
+
error.details = invalidInput;
|
|
1215
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
const query_params = {};
|
|
1219
|
+
|
|
1220
|
+
const xHeaders = {};
|
|
1221
|
+
|
|
1222
|
+
const response = await ApplicationAPIClient.execute(
|
|
1223
|
+
this._conf,
|
|
1224
|
+
"get",
|
|
1225
|
+
constructUrl({
|
|
1226
|
+
url: this._urls["getWellKnownUrl"],
|
|
1227
|
+
params: { slug },
|
|
1228
|
+
}),
|
|
1229
|
+
query_params,
|
|
1230
|
+
undefined,
|
|
1231
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1232
|
+
{ responseHeaders }
|
|
1233
|
+
);
|
|
1234
|
+
|
|
1235
|
+
let responseData = response;
|
|
1236
|
+
if (responseHeaders) {
|
|
1237
|
+
responseData = response[0];
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
return response;
|
|
1241
|
+
}
|
|
1189
1242
|
}
|
|
1190
1243
|
|
|
1191
1244
|
module.exports = Content;
|
|
@@ -12,30 +12,30 @@ declare class FileStorage {
|
|
|
12
12
|
/**
|
|
13
13
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
14
14
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
15
|
-
* @returns {Promise<
|
|
15
|
+
* @returns {Promise<FileUploadComplete>} - Success response
|
|
16
16
|
* @name completeUpload
|
|
17
17
|
* @summary: Finalizes upload process.
|
|
18
18
|
* @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/completeUpload/).
|
|
19
19
|
*/
|
|
20
|
-
completeUpload({ namespace, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<
|
|
20
|
+
completeUpload({ namespace, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<FileUploadComplete>;
|
|
21
21
|
/**
|
|
22
22
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
23
23
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
24
|
-
* @returns {Promise<
|
|
24
|
+
* @returns {Promise<SignUrlResult>} - Success response
|
|
25
25
|
* @name signUrls
|
|
26
26
|
* @summary: Signs file URLs.
|
|
27
27
|
* @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/signUrls/).
|
|
28
28
|
*/
|
|
29
|
-
signUrls({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<
|
|
29
|
+
signUrls({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<SignUrlResult>;
|
|
30
30
|
/**
|
|
31
31
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
32
32
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
33
|
-
* @returns {Promise<
|
|
33
|
+
* @returns {Promise<FileUpload>} - Success response
|
|
34
34
|
* @name startUpload
|
|
35
35
|
* @summary: Initiates file upload
|
|
36
36
|
* @description: Starts the process of uploading a file to storage location, and returns a signed url in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/startUpload/).
|
|
37
37
|
*/
|
|
38
|
-
startUpload({ namespace, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<
|
|
38
|
+
startUpload({ namespace, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<FileUpload>;
|
|
39
39
|
/**
|
|
40
40
|
* @param data
|
|
41
41
|
* @param {string} file_name
|
|
@@ -38,7 +38,7 @@ class FileStorage {
|
|
|
38
38
|
/**
|
|
39
39
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
40
40
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
41
|
-
* @returns {Promise<
|
|
41
|
+
* @returns {Promise<FileUploadComplete>} - Success response
|
|
42
42
|
* @name completeUpload
|
|
43
43
|
* @summary: Finalizes upload process.
|
|
44
44
|
* @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/completeUpload/).
|
|
@@ -90,7 +90,7 @@ class FileStorage {
|
|
|
90
90
|
/**
|
|
91
91
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
92
92
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
93
|
-
* @returns {Promise<
|
|
93
|
+
* @returns {Promise<SignUrlResult>} - Success response
|
|
94
94
|
* @name signUrls
|
|
95
95
|
* @summary: Signs file URLs.
|
|
96
96
|
* @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/signUrls/).
|
|
@@ -135,7 +135,7 @@ class FileStorage {
|
|
|
135
135
|
/**
|
|
136
136
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
137
137
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
138
|
-
* @returns {Promise<
|
|
138
|
+
* @returns {Promise<FileUpload>} - Success response
|
|
139
139
|
* @name startUpload
|
|
140
140
|
* @summary: Initiates file upload
|
|
141
141
|
* @description: Starts the process of uploading a file to storage location, and returns a signed url in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/startUpload/).
|
|
@@ -7,8 +7,10 @@ declare class Logistic {
|
|
|
7
7
|
getAllCountries: string;
|
|
8
8
|
getCountries: string;
|
|
9
9
|
getCountry: string;
|
|
10
|
+
getDeliveryPromise: string;
|
|
10
11
|
getGeoAreas: string;
|
|
11
12
|
getLocalities: string;
|
|
13
|
+
getLocalitiesByPrefix: string;
|
|
12
14
|
getLocality: string;
|
|
13
15
|
getPincodeCity: string;
|
|
14
16
|
getZones: string;
|
|
@@ -72,6 +74,15 @@ declare class Logistic {
|
|
|
72
74
|
* @description: Get details about a particular country and its address format customized for different business scenarios. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountry/).
|
|
73
75
|
*/
|
|
74
76
|
getCountry({ countryIsoCode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetCountry>;
|
|
77
|
+
/**
|
|
78
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
79
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
80
|
+
* @returns {Promise<GetPromiseDetails>} - Success response
|
|
81
|
+
* @name getDeliveryPromise
|
|
82
|
+
* @summary: Get delivery promise
|
|
83
|
+
* @description: Get delivery promises for both global and store levels based on a specific locality type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getDeliveryPromise/).
|
|
84
|
+
*/
|
|
85
|
+
getDeliveryPromise({ pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetPromiseDetails>;
|
|
75
86
|
/**
|
|
76
87
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
77
88
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -114,6 +125,29 @@ declare class Logistic {
|
|
|
114
125
|
q?: string;
|
|
115
126
|
name?: string;
|
|
116
127
|
}): Paginator<GetLocalities>;
|
|
128
|
+
/**
|
|
129
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
130
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
131
|
+
* @returns {Promise<GetLocalities>} - Success response
|
|
132
|
+
* @name getLocalitiesByPrefix
|
|
133
|
+
* @summary: Get Localities by Name Prefix
|
|
134
|
+
* @description: Get localities that start with a specified prefix. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalitiesByPrefix/).
|
|
135
|
+
*/
|
|
136
|
+
getLocalitiesByPrefix({ companyId, pageNo, pageSize, q, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<GetLocalities>;
|
|
137
|
+
/**
|
|
138
|
+
* @param {Object} arg - Arg object.
|
|
139
|
+
* @param {number} arg.companyId - The unique identifier of the company.
|
|
140
|
+
* @param {number} [arg.pageSize] - Number of items per page.
|
|
141
|
+
* @param {string} [arg.q] - Localities starting with the specified prefix.
|
|
142
|
+
* @returns {Paginator<GetLocalities>}
|
|
143
|
+
* @summary: Get Localities by Name Prefix
|
|
144
|
+
* @description: Get localities that start with a specified prefix.
|
|
145
|
+
*/
|
|
146
|
+
getLocalitiesByPrefixPaginator({ companyId, pageSize, q }?: {
|
|
147
|
+
companyId: number;
|
|
148
|
+
pageSize?: number;
|
|
149
|
+
q?: string;
|
|
150
|
+
}): Paginator<GetLocalities>;
|
|
117
151
|
/**
|
|
118
152
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
119
153
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -17,10 +17,13 @@ class Logistic {
|
|
|
17
17
|
getCountries: "/service/application/logistics/v2.0/countries",
|
|
18
18
|
getCountry:
|
|
19
19
|
"/service/application/logistics/v1.0/countries/{country_iso_code}",
|
|
20
|
+
getDeliveryPromise:
|
|
21
|
+
"/service/application/logistics/v1.0/delivery-promise",
|
|
20
22
|
getGeoAreas:
|
|
21
23
|
"/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/geoareas",
|
|
22
24
|
getLocalities:
|
|
23
25
|
"/service/application/logistics/v1.0/localities/{locality_type}",
|
|
26
|
+
getLocalitiesByPrefix: "/service/application/logistics/v1.0/localities",
|
|
24
27
|
getLocality:
|
|
25
28
|
"/service/application/logistics/v1.0/localities/{locality_type}/{locality_value}",
|
|
26
29
|
getPincodeCity: "/service/application/logistics/v1.0/pincode/{pincode}",
|
|
@@ -289,6 +292,53 @@ class Logistic {
|
|
|
289
292
|
return response;
|
|
290
293
|
}
|
|
291
294
|
|
|
295
|
+
/**
|
|
296
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
297
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
298
|
+
* @returns {Promise<GetPromiseDetails>} - Success response
|
|
299
|
+
* @name getDeliveryPromise
|
|
300
|
+
* @summary: Get delivery promise
|
|
301
|
+
* @description: Get delivery promises for both global and store levels based on a specific locality type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getDeliveryPromise/).
|
|
302
|
+
*/
|
|
303
|
+
async getDeliveryPromise(
|
|
304
|
+
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
305
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
306
|
+
) {
|
|
307
|
+
let invalidInput = [];
|
|
308
|
+
if (invalidInput.length) {
|
|
309
|
+
const error = new Error();
|
|
310
|
+
error.message = "Missing required field";
|
|
311
|
+
error.details = invalidInput;
|
|
312
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const query_params = {};
|
|
316
|
+
query_params["page_no"] = pageNo;
|
|
317
|
+
query_params["page_size"] = pageSize;
|
|
318
|
+
|
|
319
|
+
const xHeaders = {};
|
|
320
|
+
|
|
321
|
+
const response = await ApplicationAPIClient.execute(
|
|
322
|
+
this._conf,
|
|
323
|
+
"get",
|
|
324
|
+
constructUrl({
|
|
325
|
+
url: this._urls["getDeliveryPromise"],
|
|
326
|
+
params: {},
|
|
327
|
+
}),
|
|
328
|
+
query_params,
|
|
329
|
+
undefined,
|
|
330
|
+
{ ...xHeaders, ...requestHeaders },
|
|
331
|
+
{ responseHeaders }
|
|
332
|
+
);
|
|
333
|
+
|
|
334
|
+
let responseData = response;
|
|
335
|
+
if (responseHeaders) {
|
|
336
|
+
responseData = response[0];
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
return response;
|
|
340
|
+
}
|
|
341
|
+
|
|
292
342
|
/**
|
|
293
343
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
294
344
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
@@ -489,6 +539,92 @@ class Logistic {
|
|
|
489
539
|
return paginator;
|
|
490
540
|
}
|
|
491
541
|
|
|
542
|
+
/**
|
|
543
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
544
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
545
|
+
* @returns {Promise<GetLocalities>} - Success response
|
|
546
|
+
* @name getLocalitiesByPrefix
|
|
547
|
+
* @summary: Get Localities by Name Prefix
|
|
548
|
+
* @description: Get localities that start with a specified prefix. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalitiesByPrefix/).
|
|
549
|
+
*/
|
|
550
|
+
async getLocalitiesByPrefix(
|
|
551
|
+
{ companyId, pageNo, pageSize, q, requestHeaders } = { requestHeaders: {} },
|
|
552
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
553
|
+
) {
|
|
554
|
+
let invalidInput = [];
|
|
555
|
+
|
|
556
|
+
if (!companyId) {
|
|
557
|
+
invalidInput.push({
|
|
558
|
+
message: `The 'companyId' field is required.`,
|
|
559
|
+
path: ["companyId"],
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
if (invalidInput.length) {
|
|
563
|
+
const error = new Error();
|
|
564
|
+
error.message = "Missing required field";
|
|
565
|
+
error.details = invalidInput;
|
|
566
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
const query_params = {};
|
|
570
|
+
query_params["page_no"] = pageNo;
|
|
571
|
+
query_params["page_size"] = pageSize;
|
|
572
|
+
query_params["q"] = q;
|
|
573
|
+
|
|
574
|
+
const xHeaders = {};
|
|
575
|
+
|
|
576
|
+
const response = await ApplicationAPIClient.execute(
|
|
577
|
+
this._conf,
|
|
578
|
+
"get",
|
|
579
|
+
constructUrl({
|
|
580
|
+
url: this._urls["getLocalitiesByPrefix"],
|
|
581
|
+
params: { companyId },
|
|
582
|
+
}),
|
|
583
|
+
query_params,
|
|
584
|
+
undefined,
|
|
585
|
+
{ ...xHeaders, ...requestHeaders },
|
|
586
|
+
{ responseHeaders }
|
|
587
|
+
);
|
|
588
|
+
|
|
589
|
+
let responseData = response;
|
|
590
|
+
if (responseHeaders) {
|
|
591
|
+
responseData = response[0];
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
return response;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* @param {Object} arg - Arg object.
|
|
599
|
+
* @param {number} arg.companyId - The unique identifier of the company.
|
|
600
|
+
* @param {number} [arg.pageSize] - Number of items per page.
|
|
601
|
+
* @param {string} [arg.q] - Localities starting with the specified prefix.
|
|
602
|
+
* @returns {Paginator<GetLocalities>}
|
|
603
|
+
* @summary: Get Localities by Name Prefix
|
|
604
|
+
* @description: Get localities that start with a specified prefix.
|
|
605
|
+
*/
|
|
606
|
+
getLocalitiesByPrefixPaginator({ companyId, pageSize, q } = {}) {
|
|
607
|
+
const paginator = new Paginator();
|
|
608
|
+
const callback = async () => {
|
|
609
|
+
const pageId = paginator.nextId;
|
|
610
|
+
const pageNo = paginator.pageNo;
|
|
611
|
+
const pageType = "number";
|
|
612
|
+
const data = await this.getLocalitiesByPrefix({
|
|
613
|
+
companyId: companyId,
|
|
614
|
+
pageNo: pageNo,
|
|
615
|
+
pageSize: pageSize,
|
|
616
|
+
q: q,
|
|
617
|
+
});
|
|
618
|
+
paginator.setPaginator({
|
|
619
|
+
hasNext: data.page.has_next ? true : false,
|
|
620
|
+
nextId: data.page.next_id,
|
|
621
|
+
});
|
|
622
|
+
return data;
|
|
623
|
+
};
|
|
624
|
+
paginator.setCallback(callback.bind(this));
|
|
625
|
+
return paginator;
|
|
626
|
+
}
|
|
627
|
+
|
|
492
628
|
/**
|
|
493
629
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
494
630
|
* @param {import("../ApplicationAPIClient").Options} - Options
|