@gofynd/fdk-client-javascript 1.4.13 → 1.4.15-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/Order/OrderApplicationModel.d.ts +18 -2
- package/sdk/application/Order/OrderApplicationModel.js +8 -1
- package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformClient.js +8 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +0 -2
- package/sdk/platform/Order/OrderPlatformModel.js +0 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +18 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +8 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +5 -2
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +45 -16
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +22 -14
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +195 -60
- package/sdk/platform/Payment/PaymentPlatformModel.js +104 -41
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +2 -2
- package/sdk/platform/Payment/PaymentPlatformValidator.js +2 -2
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:
|
|
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: v1.4.15-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
|
@@ -168,7 +168,12 @@ export = OrderApplicationModel;
|
|
|
168
168
|
/**
|
|
169
169
|
* @typedef Item
|
|
170
170
|
* @property {string[]} [image] - An array of URLs pointing to images of the item.
|
|
171
|
-
* @property {string[]} [l1_categories] - An array of level 1 categories
|
|
171
|
+
* @property {string[]} [l1_categories] - An array of level 1 categories to
|
|
172
|
+
* which the item belongs.
|
|
173
|
+
* @property {string[]} [l2_category] - An array of level 2 categories to which
|
|
174
|
+
* the item belongs.
|
|
175
|
+
* @property {number} [l2_category_id] - ID representing the level 2 category
|
|
176
|
+
* classification of the item
|
|
172
177
|
* @property {ItemBrand} [brand]
|
|
173
178
|
* @property {string} [seller_identifier] - The identifier for the seller .
|
|
174
179
|
* @property {string} [code] - The code or SKU of the item.
|
|
@@ -1086,9 +1091,20 @@ type Item = {
|
|
|
1086
1091
|
*/
|
|
1087
1092
|
image?: string[];
|
|
1088
1093
|
/**
|
|
1089
|
-
* - An array of level 1 categories
|
|
1094
|
+
* - An array of level 1 categories to
|
|
1095
|
+
* which the item belongs.
|
|
1090
1096
|
*/
|
|
1091
1097
|
l1_categories?: string[];
|
|
1098
|
+
/**
|
|
1099
|
+
* - An array of level 2 categories to which
|
|
1100
|
+
* the item belongs.
|
|
1101
|
+
*/
|
|
1102
|
+
l2_category?: string[];
|
|
1103
|
+
/**
|
|
1104
|
+
* - ID representing the level 2 category
|
|
1105
|
+
* classification of the item
|
|
1106
|
+
*/
|
|
1107
|
+
l2_category_id?: number;
|
|
1092
1108
|
brand?: ItemBrand;
|
|
1093
1109
|
/**
|
|
1094
1110
|
* - The identifier for the seller .
|
|
@@ -185,7 +185,12 @@ const Joi = require("joi");
|
|
|
185
185
|
/**
|
|
186
186
|
* @typedef Item
|
|
187
187
|
* @property {string[]} [image] - An array of URLs pointing to images of the item.
|
|
188
|
-
* @property {string[]} [l1_categories] - An array of level 1 categories
|
|
188
|
+
* @property {string[]} [l1_categories] - An array of level 1 categories to
|
|
189
|
+
* which the item belongs.
|
|
190
|
+
* @property {string[]} [l2_category] - An array of level 2 categories to which
|
|
191
|
+
* the item belongs.
|
|
192
|
+
* @property {number} [l2_category_id] - ID representing the level 2 category
|
|
193
|
+
* classification of the item
|
|
189
194
|
* @property {ItemBrand} [brand]
|
|
190
195
|
* @property {string} [seller_identifier] - The identifier for the seller .
|
|
191
196
|
* @property {string} [code] - The code or SKU of the item.
|
|
@@ -888,6 +893,8 @@ class OrderApplicationModel {
|
|
|
888
893
|
return Joi.object({
|
|
889
894
|
image: Joi.array().items(Joi.string().allow("")),
|
|
890
895
|
l1_categories: Joi.array().items(Joi.string().allow("")),
|
|
896
|
+
l2_category: Joi.array().items(Joi.string().allow("")),
|
|
897
|
+
l2_category_id: Joi.number(),
|
|
891
898
|
brand: OrderApplicationModel.ItemBrand(),
|
|
892
899
|
seller_identifier: Joi.string().allow(""),
|
|
893
900
|
code: Joi.string().allow(""),
|
|
@@ -308,7 +308,7 @@ declare class Order {
|
|
|
308
308
|
* @summary: List orders
|
|
309
309
|
* @description: Get a list of orders based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/).
|
|
310
310
|
*/
|
|
311
|
-
getOrders({ lane, searchType, bagStatus, timeToDispatch, paymentMethods, tags, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageNo, pageSize, isPrioritySort, customMeta, myOrders, showCrossCompanyData, customerId, orderType, allowInactive, requestHeaders, }?: OrderPlatformValidator.GetOrdersParam, { responseHeaders }?: object): Promise<OrderPlatformModel.OrderListingResponse>;
|
|
311
|
+
getOrders({ lane, searchType, bagStatus, timeToDispatch, paymentMethods, tags, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageNo, pageSize, isPrioritySort, customMeta, myOrders, showCrossCompanyData, customerId, orderType, allowInactive, enforceDateFilter, requestHeaders, }?: OrderPlatformValidator.GetOrdersParam, { responseHeaders }?: object): Promise<OrderPlatformModel.OrderListingResponse>;
|
|
312
312
|
/**
|
|
313
313
|
* @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object
|
|
314
314
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -361,7 +361,7 @@ declare class Order {
|
|
|
361
361
|
* @summary: List shipments
|
|
362
362
|
* @description: Get a list of shipments based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/).
|
|
363
363
|
*/
|
|
364
|
-
getShipments({ lane, bagStatus, statusOverrideLane, timeToDispatch, searchType, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageNo, pageSize, fetchActiveShipment, allowInactive, excludeLockedShipments, paymentMethods, channelShipmentId, channelOrderId, customMeta, orderingChannel, companyAffiliateTag, myOrders, platformUserId, sortType, showCrossCompanyData, tags, customerId, orderType, requestHeaders, }?: OrderPlatformValidator.GetShipmentsParam, { responseHeaders }?: object): Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponse>;
|
|
364
|
+
getShipments({ lane, bagStatus, statusOverrideLane, timeToDispatch, searchType, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageNo, pageSize, fetchActiveShipment, allowInactive, excludeLockedShipments, paymentMethods, channelShipmentId, channelOrderId, customMeta, orderingChannel, companyAffiliateTag, myOrders, platformUserId, sortType, showCrossCompanyData, tags, customerId, orderType, enforceDateFilter, requestHeaders, }?: OrderPlatformValidator.GetShipmentsParam, { responseHeaders }?: object): Promise<OrderPlatformModel.ShipmentInternalPlatformViewResponse>;
|
|
365
365
|
/**
|
|
366
366
|
* @param {OrderPlatformValidator.GetStateManagerConfigParam} arg - Arg object
|
|
367
367
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -2664,6 +2664,7 @@ class Order {
|
|
|
2664
2664
|
customerId,
|
|
2665
2665
|
orderType,
|
|
2666
2666
|
allowInactive,
|
|
2667
|
+
enforceDateFilter,
|
|
2667
2668
|
requestHeaders,
|
|
2668
2669
|
} = { requestHeaders: {} },
|
|
2669
2670
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -2693,6 +2694,7 @@ class Order {
|
|
|
2693
2694
|
customerId,
|
|
2694
2695
|
orderType,
|
|
2695
2696
|
allowInactive,
|
|
2697
|
+
enforceDateFilter,
|
|
2696
2698
|
},
|
|
2697
2699
|
{ abortEarly: false, allowUnknown: true }
|
|
2698
2700
|
);
|
|
@@ -2726,6 +2728,7 @@ class Order {
|
|
|
2726
2728
|
customerId,
|
|
2727
2729
|
orderType,
|
|
2728
2730
|
allowInactive,
|
|
2731
|
+
enforceDateFilter,
|
|
2729
2732
|
},
|
|
2730
2733
|
{ abortEarly: false, allowUnknown: false }
|
|
2731
2734
|
);
|
|
@@ -2760,6 +2763,7 @@ class Order {
|
|
|
2760
2763
|
query_params["customer_id"] = customerId;
|
|
2761
2764
|
query_params["order_type"] = orderType;
|
|
2762
2765
|
query_params["allow_inactive"] = allowInactive;
|
|
2766
|
+
query_params["enforce_date_filter"] = enforceDateFilter;
|
|
2763
2767
|
|
|
2764
2768
|
const xHeaders = {};
|
|
2765
2769
|
|
|
@@ -3180,6 +3184,7 @@ class Order {
|
|
|
3180
3184
|
tags,
|
|
3181
3185
|
customerId,
|
|
3182
3186
|
orderType,
|
|
3187
|
+
enforceDateFilter,
|
|
3183
3188
|
requestHeaders,
|
|
3184
3189
|
} = { requestHeaders: {} },
|
|
3185
3190
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -3217,6 +3222,7 @@ class Order {
|
|
|
3217
3222
|
tags,
|
|
3218
3223
|
customerId,
|
|
3219
3224
|
orderType,
|
|
3225
|
+
enforceDateFilter,
|
|
3220
3226
|
},
|
|
3221
3227
|
{ abortEarly: false, allowUnknown: true }
|
|
3222
3228
|
);
|
|
@@ -3258,6 +3264,7 @@ class Order {
|
|
|
3258
3264
|
tags,
|
|
3259
3265
|
customerId,
|
|
3260
3266
|
orderType,
|
|
3267
|
+
enforceDateFilter,
|
|
3261
3268
|
},
|
|
3262
3269
|
{ abortEarly: false, allowUnknown: false }
|
|
3263
3270
|
);
|
|
@@ -3300,6 +3307,7 @@ class Order {
|
|
|
3300
3307
|
query_params["tags"] = tags;
|
|
3301
3308
|
query_params["customer_id"] = customerId;
|
|
3302
3309
|
query_params["order_type"] = orderType;
|
|
3310
|
+
query_params["enforce_date_filter"] = enforceDateFilter;
|
|
3303
3311
|
|
|
3304
3312
|
const xHeaders = {};
|
|
3305
3313
|
|
|
@@ -1560,7 +1560,6 @@ export = OrderPlatformModel;
|
|
|
1560
1560
|
*/
|
|
1561
1561
|
/**
|
|
1562
1562
|
* @typedef FlagData
|
|
1563
|
-
* @property {Object} [value]
|
|
1564
1563
|
* @property {Object} [filter]
|
|
1565
1564
|
*/
|
|
1566
1565
|
/**
|
|
@@ -6497,7 +6496,6 @@ type ConfigUpdatedResponse = {
|
|
|
6497
6496
|
/** @returns {FlagData} */
|
|
6498
6497
|
declare function FlagData(): FlagData;
|
|
6499
6498
|
type FlagData = {
|
|
6500
|
-
value?: any;
|
|
6501
6499
|
filter?: any;
|
|
6502
6500
|
};
|
|
6503
6501
|
/** @returns {Flags} */
|
|
@@ -1717,7 +1717,6 @@ const Joi = require("joi");
|
|
|
1717
1717
|
|
|
1718
1718
|
/**
|
|
1719
1719
|
* @typedef FlagData
|
|
1720
|
-
* @property {Object} [value]
|
|
1721
1720
|
* @property {Object} [filter]
|
|
1722
1721
|
*/
|
|
1723
1722
|
|
|
@@ -5168,7 +5167,6 @@ class OrderPlatformModel {
|
|
|
5168
5167
|
/** @returns {FlagData} */
|
|
5169
5168
|
static FlagData() {
|
|
5170
5169
|
return Joi.object({
|
|
5171
|
-
value: Joi.any(),
|
|
5172
5170
|
filter: Joi.any(),
|
|
5173
5171
|
});
|
|
5174
5172
|
}
|
|
@@ -229,6 +229,9 @@ export = OrderPlatformValidator;
|
|
|
229
229
|
* @property {string} [orderType]
|
|
230
230
|
* @property {boolean} [allowInactive] - Flag indicating whether inactive
|
|
231
231
|
* shipments are allowed
|
|
232
|
+
* @property {boolean} [enforceDateFilter] - Applies a date filter for listing
|
|
233
|
+
* orders. This is useful when fetching data for a specific date range while
|
|
234
|
+
* performing searches.
|
|
232
235
|
*/
|
|
233
236
|
/** @typedef GetRoleBasedActionsParam */
|
|
234
237
|
/**
|
|
@@ -289,6 +292,9 @@ export = OrderPlatformValidator;
|
|
|
289
292
|
* @property {string} [tags] - Comma separated values of tags
|
|
290
293
|
* @property {string} [customerId]
|
|
291
294
|
* @property {string} [orderType]
|
|
295
|
+
* @property {boolean} [enforceDateFilter] - Applies a date filter for listing
|
|
296
|
+
* shipments. This is useful when fetching data for a specific date range
|
|
297
|
+
* while performing searches.
|
|
292
298
|
*/
|
|
293
299
|
/**
|
|
294
300
|
* @typedef GetStateManagerConfigParam
|
|
@@ -952,6 +958,12 @@ type GetOrdersParam = {
|
|
|
952
958
|
* shipments are allowed
|
|
953
959
|
*/
|
|
954
960
|
allowInactive?: boolean;
|
|
961
|
+
/**
|
|
962
|
+
* - Applies a date filter for listing
|
|
963
|
+
* orders. This is useful when fetching data for a specific date range while
|
|
964
|
+
* performing searches.
|
|
965
|
+
*/
|
|
966
|
+
enforceDateFilter?: boolean;
|
|
955
967
|
};
|
|
956
968
|
type GetShipmentByIdParam = {
|
|
957
969
|
/**
|
|
@@ -1103,6 +1115,12 @@ type GetShipmentsParam = {
|
|
|
1103
1115
|
tags?: string;
|
|
1104
1116
|
customerId?: string;
|
|
1105
1117
|
orderType?: string;
|
|
1118
|
+
/**
|
|
1119
|
+
* - Applies a date filter for listing
|
|
1120
|
+
* shipments. This is useful when fetching data for a specific date range
|
|
1121
|
+
* while performing searches.
|
|
1122
|
+
*/
|
|
1123
|
+
enforceDateFilter?: boolean;
|
|
1106
1124
|
};
|
|
1107
1125
|
type GetStateManagerConfigParam = {
|
|
1108
1126
|
/**
|
|
@@ -261,6 +261,9 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
261
261
|
* @property {string} [orderType]
|
|
262
262
|
* @property {boolean} [allowInactive] - Flag indicating whether inactive
|
|
263
263
|
* shipments are allowed
|
|
264
|
+
* @property {boolean} [enforceDateFilter] - Applies a date filter for listing
|
|
265
|
+
* orders. This is useful when fetching data for a specific date range while
|
|
266
|
+
* performing searches.
|
|
264
267
|
*/
|
|
265
268
|
|
|
266
269
|
/** @typedef GetRoleBasedActionsParam */
|
|
@@ -326,6 +329,9 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
326
329
|
* @property {string} [tags] - Comma separated values of tags
|
|
327
330
|
* @property {string} [customerId]
|
|
328
331
|
* @property {string} [orderType]
|
|
332
|
+
* @property {boolean} [enforceDateFilter] - Applies a date filter for listing
|
|
333
|
+
* shipments. This is useful when fetching data for a specific date range
|
|
334
|
+
* while performing searches.
|
|
329
335
|
*/
|
|
330
336
|
|
|
331
337
|
/**
|
|
@@ -740,6 +746,7 @@ class OrderPlatformValidator {
|
|
|
740
746
|
customerId: Joi.string().allow(""),
|
|
741
747
|
orderType: Joi.string().allow(""),
|
|
742
748
|
allowInactive: Joi.boolean(),
|
|
749
|
+
enforceDateFilter: Joi.boolean(),
|
|
743
750
|
}).required();
|
|
744
751
|
}
|
|
745
752
|
|
|
@@ -809,6 +816,7 @@ class OrderPlatformValidator {
|
|
|
809
816
|
tags: Joi.string().allow(""),
|
|
810
817
|
customerId: Joi.string().allow(""),
|
|
811
818
|
orderType: Joi.string().allow(""),
|
|
819
|
+
enforceDateFilter: Joi.boolean(),
|
|
812
820
|
}).required();
|
|
813
821
|
}
|
|
814
822
|
|
|
@@ -295,9 +295,9 @@ declare class Payment {
|
|
|
295
295
|
* @returns {Promise<PaymentPlatformModel.PaymentOptionsResponse>} - Success response
|
|
296
296
|
* @name getPaymentModeRoutes
|
|
297
297
|
* @summary: Get payment modes
|
|
298
|
-
* @description:
|
|
298
|
+
* @description: Get available payment methods on the payment page, specifying the aggregator for each option, such as 'Netbanking powered by Juspay' and 'Card powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeRoutes/).
|
|
299
299
|
*/
|
|
300
|
-
getPaymentModeRoutes({ refresh, requestType, orderId, shipmentId, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentModeRoutesParam, { responseHeaders }?: object): Promise<PaymentPlatformModel.PaymentOptionsResponse>;
|
|
300
|
+
getPaymentModeRoutes({ refresh, requestType, orderId, shipmentId, amount, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentModeRoutesParam, { responseHeaders }?: object): Promise<PaymentPlatformModel.PaymentOptionsResponse>;
|
|
301
301
|
/**
|
|
302
302
|
* @param {PaymentPlatformApplicationValidator.GetPaymentSessionParam} arg
|
|
303
303
|
* - Arg object
|
|
@@ -1931,10 +1931,10 @@ class Payment {
|
|
|
1931
1931
|
* @returns {Promise<PaymentPlatformModel.PaymentOptionsResponse>} - Success response
|
|
1932
1932
|
* @name getPaymentModeRoutes
|
|
1933
1933
|
* @summary: Get payment modes
|
|
1934
|
-
* @description:
|
|
1934
|
+
* @description: Get available payment methods on the payment page, specifying the aggregator for each option, such as 'Netbanking powered by Juspay' and 'Card powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeRoutes/).
|
|
1935
1935
|
*/
|
|
1936
1936
|
async getPaymentModeRoutes(
|
|
1937
|
-
{ refresh, requestType, orderId, shipmentId, requestHeaders } = {
|
|
1937
|
+
{ refresh, requestType, orderId, shipmentId, amount, requestHeaders } = {
|
|
1938
1938
|
requestHeaders: {},
|
|
1939
1939
|
},
|
|
1940
1940
|
{ responseHeaders } = { responseHeaders: false }
|
|
@@ -1947,6 +1947,7 @@ class Payment {
|
|
|
1947
1947
|
requestType,
|
|
1948
1948
|
orderId,
|
|
1949
1949
|
shipmentId,
|
|
1950
|
+
amount,
|
|
1950
1951
|
},
|
|
1951
1952
|
{ abortEarly: false, allowUnknown: true }
|
|
1952
1953
|
);
|
|
@@ -1963,6 +1964,7 @@ class Payment {
|
|
|
1963
1964
|
requestType,
|
|
1964
1965
|
orderId,
|
|
1965
1966
|
shipmentId,
|
|
1967
|
+
amount,
|
|
1966
1968
|
},
|
|
1967
1969
|
{ abortEarly: false, allowUnknown: false }
|
|
1968
1970
|
);
|
|
@@ -1978,6 +1980,7 @@ class Payment {
|
|
|
1978
1980
|
query_params["request_type"] = requestType;
|
|
1979
1981
|
query_params["order_id"] = orderId;
|
|
1980
1982
|
query_params["shipment_id"] = shipmentId;
|
|
1983
|
+
query_params["amount"] = amount;
|
|
1981
1984
|
|
|
1982
1985
|
const response = await PlatformAPIClient.execute(
|
|
1983
1986
|
this.config,
|
|
@@ -50,7 +50,7 @@ export = PaymentPlatformApplicationValidator;
|
|
|
50
50
|
*/
|
|
51
51
|
/**
|
|
52
52
|
* @typedef GetBrandPaymentGatewayConfigParam
|
|
53
|
-
* @property {string}
|
|
53
|
+
* @property {string} aggregator - Aggregator slug
|
|
54
54
|
* @property {string} [configType]
|
|
55
55
|
*/
|
|
56
56
|
/**
|
|
@@ -80,7 +80,7 @@ export = PaymentPlatformApplicationValidator;
|
|
|
80
80
|
/** @typedef GetPaymentCodeOptionParam */
|
|
81
81
|
/**
|
|
82
82
|
* @typedef GetPaymentLinkParam
|
|
83
|
-
* @property {string}
|
|
83
|
+
* @property {string} paymentLinkId
|
|
84
84
|
*/
|
|
85
85
|
/**
|
|
86
86
|
* @typedef GetPaymentModeControlRoutesParam
|
|
@@ -92,18 +92,25 @@ export = PaymentPlatformApplicationValidator;
|
|
|
92
92
|
*/
|
|
93
93
|
/**
|
|
94
94
|
* @typedef GetPaymentModeRoutesParam
|
|
95
|
-
* @property {boolean} refresh
|
|
96
|
-
*
|
|
97
|
-
* @property {string} [
|
|
98
|
-
* @property {string} [
|
|
95
|
+
* @property {boolean} [refresh] - Flag to refresh the cache and retrieve the
|
|
96
|
+
* updated payment option
|
|
97
|
+
* @property {string} [requestType] - Type of payment request, i.e. self
|
|
98
|
+
* @property {string} [orderId] - Order id for the payment
|
|
99
|
+
* @property {string} [shipmentId] - Shipment id for the payment
|
|
100
|
+
* @property {number} [amount] - Amount for the payment
|
|
99
101
|
*/
|
|
100
102
|
/**
|
|
101
103
|
* @typedef GetPaymentSessionParam
|
|
102
104
|
* @property {string} gid - Global identifier of the entity (e.g. order, cart
|
|
103
105
|
* etc.) against which payment session was initiated. This is generated by
|
|
104
106
|
* Fynd payments platform and is unique.
|
|
105
|
-
* @property {boolean} [lineItem] -
|
|
106
|
-
*
|
|
107
|
+
* @property {boolean} [lineItem] - A boolean flag to include detailed cart and
|
|
108
|
+
* line item information in the response. When set to true, the response will
|
|
109
|
+
* contain comprehensive details about the cart, including each line item's
|
|
110
|
+
* product or service descriptions, quantities, unit prices, applicable taxes,
|
|
111
|
+
* discounts, total cart value, and total quantity. This provides a clear
|
|
112
|
+
* breakdown of charges to the customer, helping to understand the total
|
|
113
|
+
* amount billed in a more granular way.
|
|
107
114
|
*/
|
|
108
115
|
/**
|
|
109
116
|
* @typedef GetPosPaymentModeRoutesParam
|
|
@@ -171,7 +178,7 @@ export = PaymentPlatformApplicationValidator;
|
|
|
171
178
|
*/
|
|
172
179
|
/**
|
|
173
180
|
* @typedef PollingPaymentLinkParam
|
|
174
|
-
* @property {string}
|
|
181
|
+
* @property {string} paymentLinkId
|
|
175
182
|
*/
|
|
176
183
|
/**
|
|
177
184
|
* @typedef RepaymentDetailsParam
|
|
@@ -388,7 +395,7 @@ type GetBrandPaymentGatewayConfigParam = {
|
|
|
388
395
|
/**
|
|
389
396
|
* - Aggregator slug
|
|
390
397
|
*/
|
|
391
|
-
aggregator
|
|
398
|
+
aggregator: string;
|
|
392
399
|
configType?: string;
|
|
393
400
|
};
|
|
394
401
|
type GetEdcDeviceParam = {
|
|
@@ -422,7 +429,7 @@ type GetMerchantRefundPriorityParam = {
|
|
|
422
429
|
configType: string;
|
|
423
430
|
};
|
|
424
431
|
type GetPaymentLinkParam = {
|
|
425
|
-
paymentLinkId
|
|
432
|
+
paymentLinkId: string;
|
|
426
433
|
};
|
|
427
434
|
type GetPaymentModeControlRoutesParam = {
|
|
428
435
|
/**
|
|
@@ -437,10 +444,27 @@ type GetPaymentModeCustomConfigParam = {
|
|
|
437
444
|
mode: string;
|
|
438
445
|
};
|
|
439
446
|
type GetPaymentModeRoutesParam = {
|
|
440
|
-
|
|
441
|
-
|
|
447
|
+
/**
|
|
448
|
+
* - Flag to refresh the cache and retrieve the
|
|
449
|
+
* updated payment option
|
|
450
|
+
*/
|
|
451
|
+
refresh?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* - Type of payment request, i.e. self
|
|
454
|
+
*/
|
|
455
|
+
requestType?: string;
|
|
456
|
+
/**
|
|
457
|
+
* - Order id for the payment
|
|
458
|
+
*/
|
|
442
459
|
orderId?: string;
|
|
460
|
+
/**
|
|
461
|
+
* - Shipment id for the payment
|
|
462
|
+
*/
|
|
443
463
|
shipmentId?: string;
|
|
464
|
+
/**
|
|
465
|
+
* - Amount for the payment
|
|
466
|
+
*/
|
|
467
|
+
amount?: number;
|
|
444
468
|
};
|
|
445
469
|
type GetPaymentSessionParam = {
|
|
446
470
|
/**
|
|
@@ -450,8 +474,13 @@ type GetPaymentSessionParam = {
|
|
|
450
474
|
*/
|
|
451
475
|
gid: string;
|
|
452
476
|
/**
|
|
453
|
-
* -
|
|
454
|
-
*
|
|
477
|
+
* - A boolean flag to include detailed cart and
|
|
478
|
+
* line item information in the response. When set to true, the response will
|
|
479
|
+
* contain comprehensive details about the cart, including each line item's
|
|
480
|
+
* product or service descriptions, quantities, unit prices, applicable taxes,
|
|
481
|
+
* discounts, total cart value, and total quantity. This provides a clear
|
|
482
|
+
* breakdown of charges to the customer, helping to understand the total
|
|
483
|
+
* amount billed in a more granular way.
|
|
455
484
|
*/
|
|
456
485
|
lineItem?: boolean;
|
|
457
486
|
};
|
|
@@ -548,7 +577,7 @@ type PaymentStatusBulkParam = {
|
|
|
548
577
|
body: PaymentPlatformModel.PaymentStatusBulkHandlerRequest;
|
|
549
578
|
};
|
|
550
579
|
type PollingPaymentLinkParam = {
|
|
551
|
-
paymentLinkId
|
|
580
|
+
paymentLinkId: string;
|
|
552
581
|
};
|
|
553
582
|
type RepaymentDetailsParam = {
|
|
554
583
|
body: PaymentPlatformModel.RepaymentDetailsSerialiserPayAll;
|
|
@@ -65,7 +65,7 @@ const PaymentPlatformModel = require("./PaymentPlatformModel");
|
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* @typedef GetBrandPaymentGatewayConfigParam
|
|
68
|
-
* @property {string}
|
|
68
|
+
* @property {string} aggregator - Aggregator slug
|
|
69
69
|
* @property {string} [configType]
|
|
70
70
|
*/
|
|
71
71
|
|
|
@@ -103,7 +103,7 @@ const PaymentPlatformModel = require("./PaymentPlatformModel");
|
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
* @typedef GetPaymentLinkParam
|
|
106
|
-
* @property {string}
|
|
106
|
+
* @property {string} paymentLinkId
|
|
107
107
|
*/
|
|
108
108
|
|
|
109
109
|
/**
|
|
@@ -118,10 +118,12 @@ const PaymentPlatformModel = require("./PaymentPlatformModel");
|
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
120
|
* @typedef GetPaymentModeRoutesParam
|
|
121
|
-
* @property {boolean} refresh
|
|
122
|
-
*
|
|
123
|
-
* @property {string} [
|
|
124
|
-
* @property {string} [
|
|
121
|
+
* @property {boolean} [refresh] - Flag to refresh the cache and retrieve the
|
|
122
|
+
* updated payment option
|
|
123
|
+
* @property {string} [requestType] - Type of payment request, i.e. self
|
|
124
|
+
* @property {string} [orderId] - Order id for the payment
|
|
125
|
+
* @property {string} [shipmentId] - Shipment id for the payment
|
|
126
|
+
* @property {number} [amount] - Amount for the payment
|
|
125
127
|
*/
|
|
126
128
|
|
|
127
129
|
/**
|
|
@@ -129,8 +131,13 @@ const PaymentPlatformModel = require("./PaymentPlatformModel");
|
|
|
129
131
|
* @property {string} gid - Global identifier of the entity (e.g. order, cart
|
|
130
132
|
* etc.) against which payment session was initiated. This is generated by
|
|
131
133
|
* Fynd payments platform and is unique.
|
|
132
|
-
* @property {boolean} [lineItem] -
|
|
133
|
-
*
|
|
134
|
+
* @property {boolean} [lineItem] - A boolean flag to include detailed cart and
|
|
135
|
+
* line item information in the response. When set to true, the response will
|
|
136
|
+
* contain comprehensive details about the cart, including each line item's
|
|
137
|
+
* product or service descriptions, quantities, unit prices, applicable taxes,
|
|
138
|
+
* discounts, total cart value, and total quantity. This provides a clear
|
|
139
|
+
* breakdown of charges to the customer, helping to understand the total
|
|
140
|
+
* amount billed in a more granular way.
|
|
134
141
|
*/
|
|
135
142
|
|
|
136
143
|
/**
|
|
@@ -210,7 +217,7 @@ const PaymentPlatformModel = require("./PaymentPlatformModel");
|
|
|
210
217
|
|
|
211
218
|
/**
|
|
212
219
|
* @typedef PollingPaymentLinkParam
|
|
213
|
-
* @property {string}
|
|
220
|
+
* @property {string} paymentLinkId
|
|
214
221
|
*/
|
|
215
222
|
|
|
216
223
|
/**
|
|
@@ -380,7 +387,7 @@ class PaymentPlatformApplicationValidator {
|
|
|
380
387
|
/** @returns {GetBrandPaymentGatewayConfigParam} */
|
|
381
388
|
static getBrandPaymentGatewayConfig() {
|
|
382
389
|
return Joi.object({
|
|
383
|
-
aggregator: Joi.string().allow(""),
|
|
390
|
+
aggregator: Joi.string().allow("").required(),
|
|
384
391
|
configType: Joi.string().allow(""),
|
|
385
392
|
}).required();
|
|
386
393
|
}
|
|
@@ -437,7 +444,7 @@ class PaymentPlatformApplicationValidator {
|
|
|
437
444
|
/** @returns {GetPaymentLinkParam} */
|
|
438
445
|
static getPaymentLink() {
|
|
439
446
|
return Joi.object({
|
|
440
|
-
paymentLinkId: Joi.string().allow(""),
|
|
447
|
+
paymentLinkId: Joi.string().allow("").required(),
|
|
441
448
|
}).required();
|
|
442
449
|
}
|
|
443
450
|
|
|
@@ -458,10 +465,11 @@ class PaymentPlatformApplicationValidator {
|
|
|
458
465
|
/** @returns {GetPaymentModeRoutesParam} */
|
|
459
466
|
static getPaymentModeRoutes() {
|
|
460
467
|
return Joi.object({
|
|
461
|
-
refresh: Joi.boolean()
|
|
462
|
-
requestType: Joi.string().allow("")
|
|
468
|
+
refresh: Joi.boolean(),
|
|
469
|
+
requestType: Joi.string().allow(""),
|
|
463
470
|
orderId: Joi.string().allow(""),
|
|
464
471
|
shipmentId: Joi.string().allow(""),
|
|
472
|
+
amount: Joi.number(),
|
|
465
473
|
}).required();
|
|
466
474
|
}
|
|
467
475
|
|
|
@@ -569,7 +577,7 @@ class PaymentPlatformApplicationValidator {
|
|
|
569
577
|
/** @returns {PollingPaymentLinkParam} */
|
|
570
578
|
static pollingPaymentLink() {
|
|
571
579
|
return Joi.object({
|
|
572
|
-
paymentLinkId: Joi.string().allow(""),
|
|
580
|
+
paymentLinkId: Joi.string().allow("").required(),
|
|
573
581
|
}).required();
|
|
574
582
|
}
|
|
575
583
|
|