@gofynd/fdk-client-javascript 3.16.3 → 3.17.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/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- 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 +21 -1
- package/sdk/application/Content/ContentApplicationClient.js +93 -2
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -21
- package/sdk/application/Logistic/LogisticApplicationClient.js +34 -83
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -0
- package/sdk/application/Order/OrderApplicationClient.js +50 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationClient.js +5 -4
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +84 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +712 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +237 -1
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +157 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +8 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +70 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +74 -12
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +637 -36
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +225 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +147 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +952 -5
- package/sdk/platform/Cart/CartPlatformModel.js +598 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +125 -5
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +831 -41
- 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 -16
- package/sdk/platform/Catalog/CatalogPlatformClient.js +8 -85
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1025 -159
- package/sdk/platform/Catalog/CatalogPlatformModel.js +840 -165
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +8 -10
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +3 -12
- package/sdk/platform/Common/CommonPlatformModel.d.ts +18 -1
- package/sdk/platform/Common/CommonPlatformModel.js +14 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +1 -73
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +4 -462
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +7 -45
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +4 -55
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +10 -2
- package/sdk/platform/Communication/CommunicationPlatformModel.js +3 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +14 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +6 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +92 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +54 -0
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +21 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +9 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +27 -19
- package/sdk/platform/Order/OrderPlatformClient.js +176 -108
- package/sdk/platform/Order/OrderPlatformModel.d.ts +359 -45
- package/sdk/platform/Order/OrderPlatformModel.js +218 -44
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +40 -43
- package/sdk/platform/Order/OrderPlatformValidator.js +35 -30
- 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 +376 -11
- package/sdk/platform/Payment/PaymentPlatformModel.js +243 -10
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -82
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +212 -28
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +133 -13
- package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
- package/sdk/platform/User/UserPlatformModel.js +4 -4
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +29 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +13 -0
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +27 -1
- package/sdk/public/Configuration/ConfigurationPublicModel.js +19 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +29 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -0
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
- package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -387
- package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -410
|
@@ -61,18 +61,9 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
61
61
|
*/
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* @typedef
|
|
65
|
-
* @property {string}
|
|
66
|
-
*
|
|
67
|
-
* @property {string} [xApplicationId] - The Application ID is a unique
|
|
68
|
-
* identifier assigned to a storefront that typically follows a 24-character
|
|
69
|
-
* hexadecimal string. Either `x-application-id` or `x-extension-id` header is
|
|
70
|
-
* mandatory. At least one of them must be provided.
|
|
71
|
-
* @property {string} [xExtensionId] - The Extension ID is a unique identifier
|
|
72
|
-
* assigned to an extension that typically follows a 24-character hexadecimal
|
|
73
|
-
* string. Either `x-application-id` or `x-extension-id` header is mandatory.
|
|
74
|
-
* At least one of them must be provided.
|
|
75
|
-
* @property {OrderPlatformModel.CreateOrderAPI} body
|
|
64
|
+
* @typedef CreateShipmentPackagesParam
|
|
65
|
+
* @property {string} shipmentId - Unique identifier of the shipment.
|
|
66
|
+
* @property {OrderPlatformModel.PackagesSchema} body
|
|
76
67
|
*/
|
|
77
68
|
|
|
78
69
|
/**
|
|
@@ -370,6 +361,12 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
370
361
|
* @property {number} [bagId] - Identifier for a bag or product.
|
|
371
362
|
*/
|
|
372
363
|
|
|
364
|
+
/**
|
|
365
|
+
* @typedef GetShipmentPackagesParam
|
|
366
|
+
* @property {string} shipmentId - Unique identifier for the shipment whose
|
|
367
|
+
* packages are being retrieved.
|
|
368
|
+
*/
|
|
369
|
+
|
|
373
370
|
/**
|
|
374
371
|
* @typedef GetShipmentReasonsParam
|
|
375
372
|
* @property {string} shipmentId - ID of the shipment. An order may contain
|
|
@@ -485,11 +482,6 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
485
482
|
* @property {string} [groupEntity] - Name of group entity
|
|
486
483
|
*/
|
|
487
484
|
|
|
488
|
-
/**
|
|
489
|
-
* @typedef InvalidateShipmentCacheParam
|
|
490
|
-
* @property {OrderPlatformModel.InvalidateShipmentCachePayload} body
|
|
491
|
-
*/
|
|
492
|
-
|
|
493
485
|
/**
|
|
494
486
|
* @typedef JobDetailsParam
|
|
495
487
|
* @property {string} batchId - A unique identifier for the batch associated
|
|
@@ -564,6 +556,13 @@ const OrderPlatformModel = require("./OrderPlatformModel");
|
|
|
564
556
|
* @property {OrderPlatformModel.UpdateShipmentLockPayload} body
|
|
565
557
|
*/
|
|
566
558
|
|
|
559
|
+
/**
|
|
560
|
+
* @typedef UpdateShipmentPackagesParam
|
|
561
|
+
* @property {string} shipmentId - Unique identifier for the shipment whose
|
|
562
|
+
* packages will be updated.
|
|
563
|
+
* @property {OrderPlatformModel.PackagesSchema} body
|
|
564
|
+
*/
|
|
565
|
+
|
|
567
566
|
/**
|
|
568
567
|
* @typedef UpdateShipmentStatusParam
|
|
569
568
|
* @property {OrderPlatformModel.UpdateShipmentStatusRequestSchema} body
|
|
@@ -650,13 +649,11 @@ class OrderPlatformValidator {
|
|
|
650
649
|
}).required();
|
|
651
650
|
}
|
|
652
651
|
|
|
653
|
-
/** @returns {
|
|
654
|
-
static
|
|
652
|
+
/** @returns {CreateShipmentPackagesParam} */
|
|
653
|
+
static createShipmentPackages() {
|
|
655
654
|
return Joi.object({
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
xExtensionId: Joi.string().allow(""),
|
|
659
|
-
body: OrderPlatformModel.CreateOrderAPI().required(),
|
|
655
|
+
shipmentId: Joi.string().allow("").required(),
|
|
656
|
+
body: OrderPlatformModel.PackagesSchema().required(),
|
|
660
657
|
}).required();
|
|
661
658
|
}
|
|
662
659
|
|
|
@@ -968,6 +965,13 @@ class OrderPlatformValidator {
|
|
|
968
965
|
}).required();
|
|
969
966
|
}
|
|
970
967
|
|
|
968
|
+
/** @returns {GetShipmentPackagesParam} */
|
|
969
|
+
static getShipmentPackages() {
|
|
970
|
+
return Joi.object({
|
|
971
|
+
shipmentId: Joi.string().allow("").required(),
|
|
972
|
+
}).required();
|
|
973
|
+
}
|
|
974
|
+
|
|
971
975
|
/** @returns {GetShipmentReasonsParam} */
|
|
972
976
|
static getShipmentReasons() {
|
|
973
977
|
return Joi.object({
|
|
@@ -1052,13 +1056,6 @@ class OrderPlatformValidator {
|
|
|
1052
1056
|
}).required();
|
|
1053
1057
|
}
|
|
1054
1058
|
|
|
1055
|
-
/** @returns {InvalidateShipmentCacheParam} */
|
|
1056
|
-
static invalidateShipmentCache() {
|
|
1057
|
-
return Joi.object({
|
|
1058
|
-
body: OrderPlatformModel.InvalidateShipmentCachePayload().required(),
|
|
1059
|
-
}).required();
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
1059
|
/** @returns {JobDetailsParam} */
|
|
1063
1060
|
static jobDetails() {
|
|
1064
1061
|
return Joi.object({
|
|
@@ -1156,6 +1153,14 @@ class OrderPlatformValidator {
|
|
|
1156
1153
|
}).required();
|
|
1157
1154
|
}
|
|
1158
1155
|
|
|
1156
|
+
/** @returns {UpdateShipmentPackagesParam} */
|
|
1157
|
+
static updateShipmentPackages() {
|
|
1158
|
+
return Joi.object({
|
|
1159
|
+
shipmentId: Joi.string().allow("").required(),
|
|
1160
|
+
body: OrderPlatformModel.PackagesSchema().required(),
|
|
1161
|
+
}).required();
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1159
1164
|
/** @returns {UpdateShipmentStatusParam} */
|
|
1160
1165
|
static updateShipmentStatus() {
|
|
1161
1166
|
return Joi.object({
|
|
@@ -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({
|