@gofynd/fdk-client-javascript 3.17.0 → 3.17.2
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 +40 -0
- package/sdk/application/Cart/CartApplicationClient.js +176 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +18 -4
- package/sdk/application/Catalog/CatalogApplicationClient.js +47 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +11 -1
- package/sdk/application/Content/ContentApplicationClient.js +40 -2
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +2 -0
- package/sdk/common/Constant.d.ts +9 -0
- package/sdk/common/Constant.js +11 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -2
- package/sdk/partner/Theme/ThemePartnerModel.js +5 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +72 -10
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +634 -33
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +225 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +147 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +951 -1
- package/sdk/platform/Cart/CartPlatformModel.js +597 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +123 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +829 -39
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +205 -7
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +154 -3
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +5 -5
- package/sdk/platform/Catalog/CatalogPlatformClient.js +8 -5
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1023 -31
- package/sdk/platform/Catalog/CatalogPlatformModel.js +841 -26
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +7 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +3 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +7 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +3 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +92 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +54 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +5 -5
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +3 -3
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -8
- package/sdk/platform/Content/ContentPlatformModel.js +11 -8
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +21 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +9 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformClient.js +2 -2
- package/sdk/platform/Order/OrderPlatformModel.d.ts +20 -2
- package/sdk/platform/Order/OrderPlatformModel.js +9 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +14 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +88 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +28 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +22 -2
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +356 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +229 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -2
- package/sdk/platform/Theme/ThemePlatformModel.js +5 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +29 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +13 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +29 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -0
|
@@ -604,7 +604,7 @@ class Order {
|
|
|
604
604
|
* @returns {Promise<Object>} - Success response
|
|
605
605
|
* @name createOrder
|
|
606
606
|
* @summary: Create Order
|
|
607
|
-
* @description: Creates an order in the OMS.
|
|
607
|
+
* @description: Creates an order in the OMS. Use the (<a href='https://docs.fynd.com/partners/commerce/sdk/latest/platform/application/serviceability#createShipments'>createShipments API</a>) to determine shipments before creating an order. Click <a href='https://docs.fynd.com/partners/commerce/miscellaneous/createOrder-useCases'>here</a> to get the use case details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/createOrder/).
|
|
608
608
|
*/
|
|
609
609
|
async createOrder(
|
|
610
610
|
{ xOrderingSource, body, xApplicationId, xExtensionId, requestHeaders } = {
|
|
@@ -5765,7 +5765,7 @@ class Order {
|
|
|
5765
5765
|
*
|
|
5766
5766
|
* @name updateShipmentStatus
|
|
5767
5767
|
* @summary: Update a shipment's status
|
|
5768
|
-
* @description: It is used for updating the shipment in the following scenarios: Full Confirmation, Partial Confirmation, Change the status of a shipment, Full Cancellation, Partial Cancellation, Assign the shipment to DP. Click <a href='/commerce/miscellaneous/updateShipmentStatus'>here</a> to get the
|
|
5768
|
+
* @description: It is used for updating the shipment in the following scenarios: Full Confirmation, Partial Confirmation, Change the status of a shipment, Full Cancellation, Partial Cancellation, Assign the shipment to DP. Click <a href='/commerce/miscellaneous/updateShipmentStatus'>here</a> to get the use case details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateShipmentStatus/).
|
|
5769
5769
|
*/
|
|
5770
5770
|
async updateShipmentStatus(
|
|
5771
5771
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -382,7 +382,9 @@ export = OrderPlatformModel;
|
|
|
382
382
|
*/
|
|
383
383
|
/**
|
|
384
384
|
* @typedef StatuesRequestSchema
|
|
385
|
-
* @property {string} [status] - The new status to be assigned to
|
|
385
|
+
* @property {string} [status] - The new status to be assigned to a shipment.
|
|
386
|
+
* Also, refer to the <a href='/commerce/getting-started/oms-states/'>OMS
|
|
387
|
+
* States</a> for the complete status list.
|
|
386
388
|
* @property {ShipmentsRequestSchema[]} [shipments] - A list of shipments to
|
|
387
389
|
* which the new status will be applied.
|
|
388
390
|
* @property {string} [exclude_bags_next_state] - Specifies the state to which
|
|
@@ -2852,6 +2854,8 @@ export = OrderPlatformModel;
|
|
|
2852
2854
|
* @property {string} [external_shipment_id] - Unique identifier for the
|
|
2853
2855
|
* shipment as assigned by an external system. Use this to map the external ID
|
|
2854
2856
|
* to Fynd's generated ID.
|
|
2857
|
+
* @property {string} [invoice_id] - Indicates whether the order was created in
|
|
2858
|
+
* offline mode. Used to enable offline-specific processing and sync behavior.
|
|
2855
2859
|
* @property {LineItemSchema[]} [line_items] - A list of items included in the shipment.
|
|
2856
2860
|
* @property {OrderFulfillmentTimelineSchema} [order_fulfillment_timeline]
|
|
2857
2861
|
* @property {number} [location_id] - The location ID from which this shipment
|
|
@@ -3041,6 +3045,8 @@ export = OrderPlatformModel;
|
|
|
3041
3045
|
* placed. Required when the order is placed from one company but fulfilled by another.
|
|
3042
3046
|
* @property {boolean} [is_draft] - Indicates whether the order is a draft.
|
|
3043
3047
|
* Draft orders will be moved to upcoming state instead of placed status.
|
|
3048
|
+
* @property {boolean} [is_offline_order] - Indicates whether the order is an
|
|
3049
|
+
* offline order placed through a physical store or offline channel.
|
|
3044
3050
|
* @property {Object} [meta] - Metadata related to the order may include
|
|
3045
3051
|
* additional, dynamic information that provides further context about the
|
|
3046
3052
|
* order. This information can also be viewed on the Order or Shipment Details page.
|
|
@@ -6433,7 +6439,9 @@ type UpdateAddressRequestBody = {
|
|
|
6433
6439
|
declare function StatuesRequestSchema(): StatuesRequestSchema;
|
|
6434
6440
|
type StatuesRequestSchema = {
|
|
6435
6441
|
/**
|
|
6436
|
-
* - The new status to be assigned to
|
|
6442
|
+
* - The new status to be assigned to a shipment.
|
|
6443
|
+
* Also, refer to the <a href='/commerce/getting-started/oms-states/'>OMS
|
|
6444
|
+
* States</a> for the complete status list.
|
|
6437
6445
|
*/
|
|
6438
6446
|
status?: string;
|
|
6439
6447
|
/**
|
|
@@ -11325,6 +11333,11 @@ type CreateOrderShipmentSchema = {
|
|
|
11325
11333
|
* to Fynd's generated ID.
|
|
11326
11334
|
*/
|
|
11327
11335
|
external_shipment_id?: string;
|
|
11336
|
+
/**
|
|
11337
|
+
* - Indicates whether the order was created in
|
|
11338
|
+
* offline mode. Used to enable offline-specific processing and sync behavior.
|
|
11339
|
+
*/
|
|
11340
|
+
invoice_id?: string;
|
|
11328
11341
|
/**
|
|
11329
11342
|
* - A list of items included in the shipment.
|
|
11330
11343
|
*/
|
|
@@ -11783,6 +11796,11 @@ type CreateOrderRequestSchema = {
|
|
|
11783
11796
|
* Draft orders will be moved to upcoming state instead of placed status.
|
|
11784
11797
|
*/
|
|
11785
11798
|
is_draft?: boolean;
|
|
11799
|
+
/**
|
|
11800
|
+
* - Indicates whether the order is an
|
|
11801
|
+
* offline order placed through a physical store or offline channel.
|
|
11802
|
+
*/
|
|
11803
|
+
is_offline_order?: boolean;
|
|
11786
11804
|
/**
|
|
11787
11805
|
* - Metadata related to the order may include
|
|
11788
11806
|
* additional, dynamic information that provides further context about the
|
|
@@ -420,7 +420,9 @@ const Joi = require("joi");
|
|
|
420
420
|
|
|
421
421
|
/**
|
|
422
422
|
* @typedef StatuesRequestSchema
|
|
423
|
-
* @property {string} [status] - The new status to be assigned to
|
|
423
|
+
* @property {string} [status] - The new status to be assigned to a shipment.
|
|
424
|
+
* Also, refer to the <a href='/commerce/getting-started/oms-states/'>OMS
|
|
425
|
+
* States</a> for the complete status list.
|
|
424
426
|
* @property {ShipmentsRequestSchema[]} [shipments] - A list of shipments to
|
|
425
427
|
* which the new status will be applied.
|
|
426
428
|
* @property {string} [exclude_bags_next_state] - Specifies the state to which
|
|
@@ -3111,6 +3113,8 @@ const Joi = require("joi");
|
|
|
3111
3113
|
* @property {string} [external_shipment_id] - Unique identifier for the
|
|
3112
3114
|
* shipment as assigned by an external system. Use this to map the external ID
|
|
3113
3115
|
* to Fynd's generated ID.
|
|
3116
|
+
* @property {string} [invoice_id] - Indicates whether the order was created in
|
|
3117
|
+
* offline mode. Used to enable offline-specific processing and sync behavior.
|
|
3114
3118
|
* @property {LineItemSchema[]} [line_items] - A list of items included in the shipment.
|
|
3115
3119
|
* @property {OrderFulfillmentTimelineSchema} [order_fulfillment_timeline]
|
|
3116
3120
|
* @property {number} [location_id] - The location ID from which this shipment
|
|
@@ -3311,6 +3315,8 @@ const Joi = require("joi");
|
|
|
3311
3315
|
* placed. Required when the order is placed from one company but fulfilled by another.
|
|
3312
3316
|
* @property {boolean} [is_draft] - Indicates whether the order is a draft.
|
|
3313
3317
|
* Draft orders will be moved to upcoming state instead of placed status.
|
|
3318
|
+
* @property {boolean} [is_offline_order] - Indicates whether the order is an
|
|
3319
|
+
* offline order placed through a physical store or offline channel.
|
|
3314
3320
|
* @property {Object} [meta] - Metadata related to the order may include
|
|
3315
3321
|
* additional, dynamic information that provides further context about the
|
|
3316
3322
|
* order. This information can also be viewed on the Order or Shipment Details page.
|
|
@@ -8889,6 +8895,7 @@ class OrderPlatformModel {
|
|
|
8889
8895
|
type: Joi.string().allow(""),
|
|
8890
8896
|
fulfillment_option: OrderPlatformModel.FulfillmentOptionSchema(),
|
|
8891
8897
|
external_shipment_id: Joi.string().allow(""),
|
|
8898
|
+
invoice_id: Joi.string().allow(""),
|
|
8892
8899
|
line_items: Joi.array().items(OrderPlatformModel.LineItemSchema()),
|
|
8893
8900
|
order_fulfillment_timeline: OrderPlatformModel.OrderFulfillmentTimelineSchema(),
|
|
8894
8901
|
location_id: Joi.number(),
|
|
@@ -9064,6 +9071,7 @@ class OrderPlatformModel {
|
|
|
9064
9071
|
b2b_gstin_number: Joi.string().allow(""),
|
|
9065
9072
|
channel_company_id: Joi.string().allow(""),
|
|
9066
9073
|
is_draft: Joi.boolean(),
|
|
9074
|
+
is_offline_order: Joi.boolean(),
|
|
9067
9075
|
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
9068
9076
|
});
|
|
9069
9077
|
}
|
|
@@ -133,13 +133,12 @@ declare class Payment {
|
|
|
133
133
|
*
|
|
134
134
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
135
135
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
136
|
-
* @returns {Promise<PaymentPlatformModel.
|
|
137
|
-
* Success response
|
|
136
|
+
* @returns {Promise<PaymentPlatformModel.PaymentModeConfig>} - Success response
|
|
138
137
|
* @name getMerchantAggregatorPaymentModeDetails
|
|
139
138
|
* @summary: Get merchant aggregator and their payment mode
|
|
140
139
|
* @description: Get available payment gateways and payment mode and it's sub payment mode details like for razorpay their active/inactive payment modes netbanking , wallet, upi are shown. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/payment/getMerchantAggregatorPaymentModeDetails/).
|
|
141
140
|
*/
|
|
142
|
-
getMerchantAggregatorPaymentModeDetails({ aggregatorId, businessUnit, device, requestHeaders }?: PaymentPlatformApplicationValidator.GetMerchantAggregatorPaymentModeDetailsParam, { responseHeaders }?: object): Promise<PaymentPlatformModel.
|
|
141
|
+
getMerchantAggregatorPaymentModeDetails({ aggregatorId, businessUnit, device, requestHeaders }?: PaymentPlatformApplicationValidator.GetMerchantAggregatorPaymentModeDetailsParam, { responseHeaders }?: object): Promise<PaymentPlatformModel.PaymentModeConfig>;
|
|
143
142
|
/**
|
|
144
143
|
* @param {PaymentPlatformApplicationValidator.GetMerchantPaymentOptionParam} arg
|
|
145
144
|
* - Arg object
|
|
@@ -440,6 +439,18 @@ declare class Payment {
|
|
|
440
439
|
* @description: Store and update configuration settings for brand payment gateways i.e required for payment for a payment gateway like key, secret, merchant salt. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/payment/saveBrandPaymentGatewayConfig/).
|
|
441
440
|
*/
|
|
442
441
|
saveBrandPaymentGatewayConfig({ body, requestHeaders }?: PaymentPlatformApplicationValidator.SaveBrandPaymentGatewayConfigParam, { responseHeaders }?: object): Promise<PaymentPlatformModel.PaymentGatewayToBeReviewed>;
|
|
442
|
+
/**
|
|
443
|
+
* @param {PaymentPlatformApplicationValidator.SaveTokenForAggregatorParam} arg
|
|
444
|
+
* - Arg object
|
|
445
|
+
*
|
|
446
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
447
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
448
|
+
* @returns {Promise<PaymentPlatformModel.OperationResponseSchema>} - Success response
|
|
449
|
+
* @name saveTokenForAggregator
|
|
450
|
+
* @summary: Save token details for a payment aggregator
|
|
451
|
+
* @description: Save token and verification status for a specific payment aggregator, such as Apple Pay or others. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/payment/saveTokenForAggregator/).
|
|
452
|
+
*/
|
|
453
|
+
saveTokenForAggregator({ aggregatorId, body, requestHeaders }?: PaymentPlatformApplicationValidator.SaveTokenForAggregatorParam, { responseHeaders }?: object): Promise<PaymentPlatformModel.OperationResponseSchema>;
|
|
443
454
|
/**
|
|
444
455
|
* @param {PaymentPlatformApplicationValidator.SetMerchantModeControlRoutesParam} arg
|
|
445
456
|
* - Arg object
|
|
@@ -866,8 +866,7 @@ class Payment {
|
|
|
866
866
|
*
|
|
867
867
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
868
868
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
869
|
-
* @returns {Promise<PaymentPlatformModel.
|
|
870
|
-
* Success response
|
|
869
|
+
* @returns {Promise<PaymentPlatformModel.PaymentModeConfig>} - Success response
|
|
871
870
|
* @name getMerchantAggregatorPaymentModeDetails
|
|
872
871
|
* @summary: Get merchant aggregator and their payment mode
|
|
873
872
|
* @description: Get available payment gateways and payment mode and it's sub payment mode details like for razorpay their active/inactive payment modes netbanking , wallet, upi are shown. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/payment/getMerchantAggregatorPaymentModeDetails/).
|
|
@@ -931,10 +930,10 @@ class Payment {
|
|
|
931
930
|
|
|
932
931
|
const {
|
|
933
932
|
error: res_error,
|
|
934
|
-
} = PaymentPlatformModel.
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
);
|
|
933
|
+
} = PaymentPlatformModel.PaymentModeConfig().validate(responseData, {
|
|
934
|
+
abortEarly: false,
|
|
935
|
+
allowUnknown: true,
|
|
936
|
+
});
|
|
938
937
|
|
|
939
938
|
if (res_error) {
|
|
940
939
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2979,6 +2978,89 @@ class Payment {
|
|
|
2979
2978
|
return response;
|
|
2980
2979
|
}
|
|
2981
2980
|
|
|
2981
|
+
/**
|
|
2982
|
+
* @param {PaymentPlatformApplicationValidator.SaveTokenForAggregatorParam} arg
|
|
2983
|
+
* - Arg object
|
|
2984
|
+
*
|
|
2985
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2986
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2987
|
+
* @returns {Promise<PaymentPlatformModel.OperationResponseSchema>} - Success response
|
|
2988
|
+
* @name saveTokenForAggregator
|
|
2989
|
+
* @summary: Save token details for a payment aggregator
|
|
2990
|
+
* @description: Save token and verification status for a specific payment aggregator, such as Apple Pay or others. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/payment/saveTokenForAggregator/).
|
|
2991
|
+
*/
|
|
2992
|
+
async saveTokenForAggregator(
|
|
2993
|
+
{ aggregatorId, body, requestHeaders } = { requestHeaders: {} },
|
|
2994
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
2995
|
+
) {
|
|
2996
|
+
const {
|
|
2997
|
+
error,
|
|
2998
|
+
} = PaymentPlatformApplicationValidator.saveTokenForAggregator().validate(
|
|
2999
|
+
{
|
|
3000
|
+
aggregatorId,
|
|
3001
|
+
body,
|
|
3002
|
+
},
|
|
3003
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3004
|
+
);
|
|
3005
|
+
if (error) {
|
|
3006
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3007
|
+
}
|
|
3008
|
+
|
|
3009
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3010
|
+
const {
|
|
3011
|
+
error: warrning,
|
|
3012
|
+
} = PaymentPlatformApplicationValidator.saveTokenForAggregator().validate(
|
|
3013
|
+
{
|
|
3014
|
+
aggregatorId,
|
|
3015
|
+
body,
|
|
3016
|
+
},
|
|
3017
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3018
|
+
);
|
|
3019
|
+
if (warrning) {
|
|
3020
|
+
Logger({
|
|
3021
|
+
level: "WARN",
|
|
3022
|
+
message: `Parameter Validation warrnings for platform > Payment > saveTokenForAggregator \n ${warrning}`,
|
|
3023
|
+
});
|
|
3024
|
+
}
|
|
3025
|
+
|
|
3026
|
+
const query_params = {};
|
|
3027
|
+
|
|
3028
|
+
const response = await PlatformAPIClient.execute(
|
|
3029
|
+
this.config,
|
|
3030
|
+
"post",
|
|
3031
|
+
`/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/aggregators/${aggregatorId}/token`,
|
|
3032
|
+
query_params,
|
|
3033
|
+
body,
|
|
3034
|
+
requestHeaders,
|
|
3035
|
+
{ responseHeaders }
|
|
3036
|
+
);
|
|
3037
|
+
|
|
3038
|
+
let responseData = response;
|
|
3039
|
+
if (responseHeaders) {
|
|
3040
|
+
responseData = response[0];
|
|
3041
|
+
}
|
|
3042
|
+
|
|
3043
|
+
const {
|
|
3044
|
+
error: res_error,
|
|
3045
|
+
} = PaymentPlatformModel.OperationResponseSchema().validate(responseData, {
|
|
3046
|
+
abortEarly: false,
|
|
3047
|
+
allowUnknown: true,
|
|
3048
|
+
});
|
|
3049
|
+
|
|
3050
|
+
if (res_error) {
|
|
3051
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3052
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3053
|
+
} else {
|
|
3054
|
+
Logger({
|
|
3055
|
+
level: "WARN",
|
|
3056
|
+
message: `Response Validation Warnings for platform > Payment > saveTokenForAggregator \n ${res_error}`,
|
|
3057
|
+
});
|
|
3058
|
+
}
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
return response;
|
|
3062
|
+
}
|
|
3063
|
+
|
|
2982
3064
|
/**
|
|
2983
3065
|
* @param {PaymentPlatformApplicationValidator.SetMerchantModeControlRoutesParam} arg
|
|
2984
3066
|
* - Arg object
|
|
@@ -141,7 +141,7 @@ export = PaymentPlatformApplicationValidator;
|
|
|
141
141
|
/**
|
|
142
142
|
* @typedef PatchMerchantAggregatorPaymentModeDetailsParam
|
|
143
143
|
* @property {number} aggregatorId - Aggregators Id
|
|
144
|
-
* @property {PaymentPlatformModel.
|
|
144
|
+
* @property {PaymentPlatformModel.PlatformConfigPaymentModeDetails} body
|
|
145
145
|
*/
|
|
146
146
|
/**
|
|
147
147
|
* @typedef PatchMerchantPaymentOptionParam
|
|
@@ -176,6 +176,17 @@ export = PaymentPlatformApplicationValidator;
|
|
|
176
176
|
* @typedef SaveBrandPaymentGatewayConfigParam
|
|
177
177
|
* @property {PaymentPlatformModel.PaymentGatewayConfigCreation} body
|
|
178
178
|
*/
|
|
179
|
+
/**
|
|
180
|
+
* @typedef SaveTokenForAggregatorParam
|
|
181
|
+
* @property {string} aggregatorId - Payment aggregator identifier. Supported values are:
|
|
182
|
+
*
|
|
183
|
+
* - **1**: Razorpay
|
|
184
|
+
* - **2**: Juspay
|
|
185
|
+
* - **3**: Checkout Extension
|
|
186
|
+
* - **4**: PayU India Extension
|
|
187
|
+
*
|
|
188
|
+
* @property {PaymentPlatformModel.AggregatorToken} body
|
|
189
|
+
*/
|
|
179
190
|
/**
|
|
180
191
|
* @typedef SetMerchantModeControlRoutesParam
|
|
181
192
|
* @property {string} mode - Offline / advance payment mode
|
|
@@ -290,6 +301,8 @@ declare class PaymentPlatformApplicationValidator {
|
|
|
290
301
|
static revokeOauthToken(): RevokeOauthTokenParam;
|
|
291
302
|
/** @returns {SaveBrandPaymentGatewayConfigParam} */
|
|
292
303
|
static saveBrandPaymentGatewayConfig(): SaveBrandPaymentGatewayConfigParam;
|
|
304
|
+
/** @returns {SaveTokenForAggregatorParam} */
|
|
305
|
+
static saveTokenForAggregator(): SaveTokenForAggregatorParam;
|
|
293
306
|
/** @returns {SetMerchantModeControlRoutesParam} */
|
|
294
307
|
static setMerchantModeControlRoutes(): SetMerchantModeControlRoutesParam;
|
|
295
308
|
/** @returns {SetPaymentModeCustomConfigParam} */
|
|
@@ -308,7 +321,7 @@ declare class PaymentPlatformApplicationValidator {
|
|
|
308
321
|
static verifyCustomerForPayment(): VerifyCustomerForPaymentParam;
|
|
309
322
|
}
|
|
310
323
|
declare namespace PaymentPlatformApplicationValidator {
|
|
311
|
-
export { AddRefundBankAccountUsingOTPParam, CancelPaymentLinkParam, CheckAndUpdatePaymentStatusParam, ConfirmPaymentParam, CreateMerchantRefundPriorityParam, CreatePaymentLinkParam, CreatePaymentOrderParam, GetBankAccountDetailsOpenAPIParam, GetBrandPaymentGatewayConfigParam, GetMerchantAggregatorAppVersionParam, GetMerchantAggregatorPaymentModeDetailsParam, GetMerchantPaymentOptionParam, GetMerchantRefundPriorityParam, GetPGConfigAggregatorsParam, GetPaymentCodeOptionParam, GetPaymentLinkParam, GetPaymentModeControlRoutesParam, GetPaymentModeCustomConfigParam, GetPaymentModeRoutesParam, GetPaymentSessionParam, GetPosPaymentModeRoutesParam, GetUserBeneficiariesParam, GetUserCODlimitRoutesParam, GetUserOrderBeneficiariesParam, InitialisePaymentParam, OauthGetUrlParam, PatchMerchantAggregatorPaymentModeDetailsParam, PatchMerchantPaymentOptionParam, PatchMerchantPaymentOptionVersionParam, PaymentStatusBulkParam, PollingPaymentLinkParam, ResendOrCancelPaymentParam, ResendPaymentLinkParam, RevokeOauthTokenParam, SaveBrandPaymentGatewayConfigParam, SetMerchantModeControlRoutesParam, SetPaymentModeCustomConfigParam, SetUserCODlimitRoutesParam, UpdateMerchantRefundPriorityParam, UpdatePaymentSessionParam, UpdateRefundSessionParam, ValidateCustomerAndCreditSummaryParam, VerifyCustomerForPaymentParam };
|
|
324
|
+
export { AddRefundBankAccountUsingOTPParam, CancelPaymentLinkParam, CheckAndUpdatePaymentStatusParam, ConfirmPaymentParam, CreateMerchantRefundPriorityParam, CreatePaymentLinkParam, CreatePaymentOrderParam, GetBankAccountDetailsOpenAPIParam, GetBrandPaymentGatewayConfigParam, GetMerchantAggregatorAppVersionParam, GetMerchantAggregatorPaymentModeDetailsParam, GetMerchantPaymentOptionParam, GetMerchantRefundPriorityParam, GetPGConfigAggregatorsParam, GetPaymentCodeOptionParam, GetPaymentLinkParam, GetPaymentModeControlRoutesParam, GetPaymentModeCustomConfigParam, GetPaymentModeRoutesParam, GetPaymentSessionParam, GetPosPaymentModeRoutesParam, GetUserBeneficiariesParam, GetUserCODlimitRoutesParam, GetUserOrderBeneficiariesParam, InitialisePaymentParam, OauthGetUrlParam, PatchMerchantAggregatorPaymentModeDetailsParam, PatchMerchantPaymentOptionParam, PatchMerchantPaymentOptionVersionParam, PaymentStatusBulkParam, PollingPaymentLinkParam, ResendOrCancelPaymentParam, ResendPaymentLinkParam, RevokeOauthTokenParam, SaveBrandPaymentGatewayConfigParam, SaveTokenForAggregatorParam, SetMerchantModeControlRoutesParam, SetPaymentModeCustomConfigParam, SetUserCODlimitRoutesParam, UpdateMerchantRefundPriorityParam, UpdatePaymentSessionParam, UpdateRefundSessionParam, ValidateCustomerAndCreditSummaryParam, VerifyCustomerForPaymentParam };
|
|
312
325
|
}
|
|
313
326
|
type AddRefundBankAccountUsingOTPParam = {
|
|
314
327
|
body: PaymentPlatformModel.AddBeneficiaryDetailsOTPCreation;
|
|
@@ -506,7 +519,7 @@ type PatchMerchantAggregatorPaymentModeDetailsParam = {
|
|
|
506
519
|
* - Aggregators Id
|
|
507
520
|
*/
|
|
508
521
|
aggregatorId: number;
|
|
509
|
-
body: PaymentPlatformModel.
|
|
522
|
+
body: PaymentPlatformModel.PlatformConfigPaymentModeDetails;
|
|
510
523
|
};
|
|
511
524
|
type PatchMerchantPaymentOptionParam = {
|
|
512
525
|
body: PaymentPlatformModel.MerchnatPaymentModeCreation;
|
|
@@ -539,6 +552,18 @@ type RevokeOauthTokenParam = {
|
|
|
539
552
|
type SaveBrandPaymentGatewayConfigParam = {
|
|
540
553
|
body: PaymentPlatformModel.PaymentGatewayConfigCreation;
|
|
541
554
|
};
|
|
555
|
+
type SaveTokenForAggregatorParam = {
|
|
556
|
+
/**
|
|
557
|
+
* - Payment aggregator identifier. Supported values are:
|
|
558
|
+
*
|
|
559
|
+
* - **1**: Razorpay
|
|
560
|
+
* - **2**: Juspay
|
|
561
|
+
* - **3**: Checkout Extension
|
|
562
|
+
* - **4**: PayU India Extension
|
|
563
|
+
*/
|
|
564
|
+
aggregatorId: string;
|
|
565
|
+
body: PaymentPlatformModel.AggregatorToken;
|
|
566
|
+
};
|
|
542
567
|
type SetMerchantModeControlRoutesParam = {
|
|
543
568
|
/**
|
|
544
569
|
* - Offline / advance payment mode
|
|
@@ -170,7 +170,7 @@ const PaymentPlatformModel = require("./PaymentPlatformModel");
|
|
|
170
170
|
/**
|
|
171
171
|
* @typedef PatchMerchantAggregatorPaymentModeDetailsParam
|
|
172
172
|
* @property {number} aggregatorId - Aggregators Id
|
|
173
|
-
* @property {PaymentPlatformModel.
|
|
173
|
+
* @property {PaymentPlatformModel.PlatformConfigPaymentModeDetails} body
|
|
174
174
|
*/
|
|
175
175
|
|
|
176
176
|
/**
|
|
@@ -214,6 +214,18 @@ const PaymentPlatformModel = require("./PaymentPlatformModel");
|
|
|
214
214
|
* @property {PaymentPlatformModel.PaymentGatewayConfigCreation} body
|
|
215
215
|
*/
|
|
216
216
|
|
|
217
|
+
/**
|
|
218
|
+
* @typedef SaveTokenForAggregatorParam
|
|
219
|
+
* @property {string} aggregatorId - Payment aggregator identifier. Supported values are:
|
|
220
|
+
*
|
|
221
|
+
* - **1**: Razorpay
|
|
222
|
+
* - **2**: Juspay
|
|
223
|
+
* - **3**: Checkout Extension
|
|
224
|
+
* - **4**: PayU India Extension
|
|
225
|
+
*
|
|
226
|
+
* @property {PaymentPlatformModel.AggregatorToken} body
|
|
227
|
+
*/
|
|
228
|
+
|
|
217
229
|
/**
|
|
218
230
|
* @typedef SetMerchantModeControlRoutesParam
|
|
219
231
|
* @property {string} mode - Offline / advance payment mode
|
|
@@ -477,7 +489,7 @@ class PaymentPlatformApplicationValidator {
|
|
|
477
489
|
static patchMerchantAggregatorPaymentModeDetails() {
|
|
478
490
|
return Joi.object({
|
|
479
491
|
aggregatorId: Joi.number().required(),
|
|
480
|
-
body: PaymentPlatformModel.
|
|
492
|
+
body: PaymentPlatformModel.PlatformConfigPaymentModeDetails().required(),
|
|
481
493
|
}).required();
|
|
482
494
|
}
|
|
483
495
|
|
|
@@ -538,6 +550,14 @@ class PaymentPlatformApplicationValidator {
|
|
|
538
550
|
}).required();
|
|
539
551
|
}
|
|
540
552
|
|
|
553
|
+
/** @returns {SaveTokenForAggregatorParam} */
|
|
554
|
+
static saveTokenForAggregator() {
|
|
555
|
+
return Joi.object({
|
|
556
|
+
aggregatorId: Joi.string().allow("").required(),
|
|
557
|
+
body: PaymentPlatformModel.AggregatorToken().required(),
|
|
558
|
+
}).required();
|
|
559
|
+
}
|
|
560
|
+
|
|
541
561
|
/** @returns {SetMerchantModeControlRoutesParam} */
|
|
542
562
|
static setMerchantModeControlRoutes() {
|
|
543
563
|
return Joi.object({
|