@gofynd/fdk-client-javascript 1.5.2 → 1.6.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.js +293 -0
- package/sdk/application/Catalog/CatalogApplicationClient.js +408 -0
- package/sdk/application/Common/CommonApplicationClient.js +21 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +147 -0
- package/sdk/application/Content/ContentApplicationClient.js +226 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +43 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +21 -0
- package/sdk/application/Lead/LeadApplicationClient.js +73 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -1
- package/sdk/application/Logistic/LogisticApplicationClient.js +192 -3
- package/sdk/application/Order/OrderApplicationClient.js +202 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +454 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +68 -0
- package/sdk/application/Share/ShareApplicationClient.js +96 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +64 -0
- package/sdk/application/User/UserApplicationClient.js +412 -0
- package/sdk/application/Webhook/WebhookApplicationClient.js +13 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +75 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +6 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +16 -3
- package/sdk/partner/Webhook/WebhookPartnerModel.js +5 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +46 -23
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -23
- package/sdk/platform/Cart/CartPlatformModel.d.ts +90 -1
- package/sdk/platform/Cart/CartPlatformModel.js +51 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -12
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +0 -81
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +1 -10
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +0 -12
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +13 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +82 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +10 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +12 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +108 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +77 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +2 -2
- package/sdk/platform/User/UserPlatformModel.js +2 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +58 -14
- package/sdk/platform/Webhook/WebhookPlatformModel.js +15 -14
- package/sdk/public/Catalog/CatalogPublicClient.js +15 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +16 -0
- package/sdk/public/Content/ContentPublicClient.js +116 -0
- package/sdk/public/Partner/PartnerPublicClient.js +15 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +40 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +194 -46
- package/sdk/public/Webhook/WebhookPublicModel.js +51 -46
|
@@ -1225,10 +1225,42 @@ export = PaymentPlatformModel;
|
|
|
1225
1225
|
* @property {string} message
|
|
1226
1226
|
* @property {PaymentModeCustomConfigSchema[]} items
|
|
1227
1227
|
*/
|
|
1228
|
+
/**
|
|
1229
|
+
* @typedef CustomerValidationSchema
|
|
1230
|
+
* @property {string} aggregator - Aggregator name of the payment gateway.
|
|
1231
|
+
* @property {number} transaction_amount - Payable amount
|
|
1232
|
+
* @property {string} [cart_id] - Unique identifier for the shopping cart.
|
|
1233
|
+
*/
|
|
1234
|
+
/**
|
|
1235
|
+
* @typedef UserCreditSchema
|
|
1236
|
+
* @property {number} amount - The monetary value, which can represent available
|
|
1237
|
+
* balance, redeemed balance, or hold amount, depending on the context.
|
|
1238
|
+
* @property {string} currency - The currency code (e.g., INR, USD).
|
|
1239
|
+
* @property {string} [unique_id] - A unique identifier for the payment transaction.
|
|
1240
|
+
*/
|
|
1241
|
+
/**
|
|
1242
|
+
* @typedef CreditAccountSummary
|
|
1243
|
+
* @property {string} account_id - Unique identifier associated with the
|
|
1244
|
+
* customer's account
|
|
1245
|
+
* @property {string} status - Current state of the account, indicating whether
|
|
1246
|
+
* it is ACTIVE, INACTIVE, or UNREGISTERED.
|
|
1247
|
+
* @property {UserCreditSchema} [redeemable_balance]
|
|
1248
|
+
* @property {UserCreditSchema} [available_balance]
|
|
1249
|
+
* @property {UserCreditSchema} [amount_on_hold]
|
|
1250
|
+
*/
|
|
1251
|
+
/**
|
|
1252
|
+
* @typedef ValidateCustomerCreditSchema
|
|
1253
|
+
* @property {boolean} success - Successful or failure of API
|
|
1254
|
+
* @property {boolean} is_eligible - The customer is eligible to make a transaction or not
|
|
1255
|
+
* @property {boolean} [is_applied] - Credit is applied to the user's account or not
|
|
1256
|
+
* @property {string} message - Detailed message about the user credt eligibility.
|
|
1257
|
+
* @property {string} [cart_id] - Unique identifier for the shopping cart.
|
|
1258
|
+
* @property {CreditAccountSummary} [account]
|
|
1259
|
+
*/
|
|
1228
1260
|
declare class PaymentPlatformModel {
|
|
1229
1261
|
}
|
|
1230
1262
|
declare namespace PaymentPlatformModel {
|
|
1231
|
-
export { PaymentGatewayConfigDetails, ErrorCodeDescription, PaymentGatewayConfig, PaymentGatewayConfigCreation, PaymentGatewayToBeReviewed, ErrorCodeAndDescription, HttpErrorDetails, IntentAppErrorList, ProductCODData, CODChargesLimitsDetails, PaymentModeLogo, IntentApp, PaymentModeList, RootPaymentMode, PaymentOptions, AggregatorRoute, PaymentDefaultSelection, PaymentFlow, PaymentOptionAndFlow, AdvanceObject, SplitObject, AdvancePaymentObject, PaymentModeRouteDetails, PaymentOptionsDetails, PayoutCustomer, PayoutMoreAttributes, PayoutAggregator, Payout, PayoutsDetails, PayoutBankDetails, PayoutCreation, PayoutDetails, UpdatePayoutDetails, UpdatePayoutCreation, DeletePayoutDetails, SubscriptionPaymentMethodDetails, DeleteSubscriptionPaymentMethodDetails, SubscriptionConfigDetails, SaveSubscriptionSetupIntentCreation, SaveSubscriptionSetupIntentDetails, RefundAccountDetails, NotFoundResourceError, BankDetailsForOTP, AddBeneficiaryDetailsOTPCreation, IfscCodeDetails, OrderBeneficiaryDetails, OrderBeneficiaryFetchResults, MultiTenderPaymentMeta, MultiTenderPaymentMethod, PaymentConfirmationCreation, PaymentConfirmationDetails, CODdata, CODLimitConfig, CODPaymentLimitConfig, GetUserBULimitResponseSchema, GetUserCODLimitDetails, SetCODForUserCreation, SetCODOptionDetails, EdcModelData, EdcAggregatorAndModelListDetails, StatisticsData, EdcDeviceStatsDetails, EdcAddCreation, EdcDevice, EdcDeviceAddDetails, EdcDeviceDetails, EdcUpdate, EdcDeviceUpdateDetails, Page, EdcDeviceListDetails, PaymentInitializationCreation, PaymentInitializationDetails, PaymentStatusUpdateCreation, PaymentStatusUpdateDetails, ResendOrCancelPaymentCreation, LinkStatus, ResendOrCancelPaymentDetails, PaymentStatusBulkHandlerCreation, PaymentObjectList, PaymentStatusObject, PaymentStatusBulkHandlerDetails, GetOauthUrlDetails, RevokeOAuthToken, RepaymentRequestDetails, RepaymentDetailsSerialiserPayAll, RepaymentDetails, MerchantOnBoardingCreation, MerchantOnBoardingDetails, ValidateCustomerCreation, ValidateCustomerDetails, GetPaymentLinkDetails, ErrorDescription, ErrorDetails, CreatePaymentLinkMeta, CreatePaymentLinkCreation, CreatePaymentLinkDetails, PollingPaymentLinkDetails, CancelOrResendPaymentLinkCreation, ResendPaymentLinkDetails, CancelPaymentLinkDetails, Code, PaymentCode, GetPaymentCode, GetPaymentCodeDetails, PlatformPaymentModeDetails, MerchnatPaymentModeCreation, OrderDetail, AddressDetail, ReasonDetail, PaymentSessionDetail, PaymentSessionCreation, PaymentSessionPutDetails, RefundSessionDetail, RefundSessionCreation, RefundSessionDetails, PaymentDetails, CartDetails, RefundDetails, PaymentSessionFetchDetails, RefundSourcesPriority, RefundPriorityDetails, RefundPriorityCreation, MerchantPaymentModeCreation, FromConfig, ToConfig, PlatformPaymentModeCopyConfigCreation, PaymentMethodsMetaOrder, PaymentOrderMethods, PaymentOrderCreation, PaymentOrderData, PaymentOrderDetails, AggregatorVersionItemSchema, AggregatorVersionDetails, AggregatorVersionRequestSchema, PatchAggregatorControl, PaymentModeCustomConfigSchema, PaymentCustomConfigDetailsSchema, PaymentCustomConfigCustomerSchema, PaymentCustomConfigModeSchema, PaymentCustomConfigDetailsRequestSchema, PaymentCustomConfigCustomerRequestSchema, PaymentCustomConfigRequestSchema, PaymentCustomConfigResponseSchema };
|
|
1263
|
+
export { PaymentGatewayConfigDetails, ErrorCodeDescription, PaymentGatewayConfig, PaymentGatewayConfigCreation, PaymentGatewayToBeReviewed, ErrorCodeAndDescription, HttpErrorDetails, IntentAppErrorList, ProductCODData, CODChargesLimitsDetails, PaymentModeLogo, IntentApp, PaymentModeList, RootPaymentMode, PaymentOptions, AggregatorRoute, PaymentDefaultSelection, PaymentFlow, PaymentOptionAndFlow, AdvanceObject, SplitObject, AdvancePaymentObject, PaymentModeRouteDetails, PaymentOptionsDetails, PayoutCustomer, PayoutMoreAttributes, PayoutAggregator, Payout, PayoutsDetails, PayoutBankDetails, PayoutCreation, PayoutDetails, UpdatePayoutDetails, UpdatePayoutCreation, DeletePayoutDetails, SubscriptionPaymentMethodDetails, DeleteSubscriptionPaymentMethodDetails, SubscriptionConfigDetails, SaveSubscriptionSetupIntentCreation, SaveSubscriptionSetupIntentDetails, RefundAccountDetails, NotFoundResourceError, BankDetailsForOTP, AddBeneficiaryDetailsOTPCreation, IfscCodeDetails, OrderBeneficiaryDetails, OrderBeneficiaryFetchResults, MultiTenderPaymentMeta, MultiTenderPaymentMethod, PaymentConfirmationCreation, PaymentConfirmationDetails, CODdata, CODLimitConfig, CODPaymentLimitConfig, GetUserBULimitResponseSchema, GetUserCODLimitDetails, SetCODForUserCreation, SetCODOptionDetails, EdcModelData, EdcAggregatorAndModelListDetails, StatisticsData, EdcDeviceStatsDetails, EdcAddCreation, EdcDevice, EdcDeviceAddDetails, EdcDeviceDetails, EdcUpdate, EdcDeviceUpdateDetails, Page, EdcDeviceListDetails, PaymentInitializationCreation, PaymentInitializationDetails, PaymentStatusUpdateCreation, PaymentStatusUpdateDetails, ResendOrCancelPaymentCreation, LinkStatus, ResendOrCancelPaymentDetails, PaymentStatusBulkHandlerCreation, PaymentObjectList, PaymentStatusObject, PaymentStatusBulkHandlerDetails, GetOauthUrlDetails, RevokeOAuthToken, RepaymentRequestDetails, RepaymentDetailsSerialiserPayAll, RepaymentDetails, MerchantOnBoardingCreation, MerchantOnBoardingDetails, ValidateCustomerCreation, ValidateCustomerDetails, GetPaymentLinkDetails, ErrorDescription, ErrorDetails, CreatePaymentLinkMeta, CreatePaymentLinkCreation, CreatePaymentLinkDetails, PollingPaymentLinkDetails, CancelOrResendPaymentLinkCreation, ResendPaymentLinkDetails, CancelPaymentLinkDetails, Code, PaymentCode, GetPaymentCode, GetPaymentCodeDetails, PlatformPaymentModeDetails, MerchnatPaymentModeCreation, OrderDetail, AddressDetail, ReasonDetail, PaymentSessionDetail, PaymentSessionCreation, PaymentSessionPutDetails, RefundSessionDetail, RefundSessionCreation, RefundSessionDetails, PaymentDetails, CartDetails, RefundDetails, PaymentSessionFetchDetails, RefundSourcesPriority, RefundPriorityDetails, RefundPriorityCreation, MerchantPaymentModeCreation, FromConfig, ToConfig, PlatformPaymentModeCopyConfigCreation, PaymentMethodsMetaOrder, PaymentOrderMethods, PaymentOrderCreation, PaymentOrderData, PaymentOrderDetails, AggregatorVersionItemSchema, AggregatorVersionDetails, AggregatorVersionRequestSchema, PatchAggregatorControl, PaymentModeCustomConfigSchema, PaymentCustomConfigDetailsSchema, PaymentCustomConfigCustomerSchema, PaymentCustomConfigModeSchema, PaymentCustomConfigDetailsRequestSchema, PaymentCustomConfigCustomerRequestSchema, PaymentCustomConfigRequestSchema, PaymentCustomConfigResponseSchema, CustomerValidationSchema, UserCreditSchema, CreditAccountSummary, ValidateCustomerCreditSchema };
|
|
1232
1264
|
}
|
|
1233
1265
|
/** @returns {PaymentGatewayConfigDetails} */
|
|
1234
1266
|
declare function PaymentGatewayConfigDetails(): PaymentGatewayConfigDetails;
|
|
@@ -4471,3 +4503,78 @@ type PaymentCustomConfigResponseSchema = {
|
|
|
4471
4503
|
message: string;
|
|
4472
4504
|
items: PaymentModeCustomConfigSchema[];
|
|
4473
4505
|
};
|
|
4506
|
+
/** @returns {CustomerValidationSchema} */
|
|
4507
|
+
declare function CustomerValidationSchema(): CustomerValidationSchema;
|
|
4508
|
+
type CustomerValidationSchema = {
|
|
4509
|
+
/**
|
|
4510
|
+
* - Aggregator name of the payment gateway.
|
|
4511
|
+
*/
|
|
4512
|
+
aggregator: string;
|
|
4513
|
+
/**
|
|
4514
|
+
* - Payable amount
|
|
4515
|
+
*/
|
|
4516
|
+
transaction_amount: number;
|
|
4517
|
+
/**
|
|
4518
|
+
* - Unique identifier for the shopping cart.
|
|
4519
|
+
*/
|
|
4520
|
+
cart_id?: string;
|
|
4521
|
+
};
|
|
4522
|
+
/** @returns {UserCreditSchema} */
|
|
4523
|
+
declare function UserCreditSchema(): UserCreditSchema;
|
|
4524
|
+
type UserCreditSchema = {
|
|
4525
|
+
/**
|
|
4526
|
+
* - The monetary value, which can represent available
|
|
4527
|
+
* balance, redeemed balance, or hold amount, depending on the context.
|
|
4528
|
+
*/
|
|
4529
|
+
amount: number;
|
|
4530
|
+
/**
|
|
4531
|
+
* - The currency code (e.g., INR, USD).
|
|
4532
|
+
*/
|
|
4533
|
+
currency: string;
|
|
4534
|
+
/**
|
|
4535
|
+
* - A unique identifier for the payment transaction.
|
|
4536
|
+
*/
|
|
4537
|
+
unique_id?: string;
|
|
4538
|
+
};
|
|
4539
|
+
/** @returns {CreditAccountSummary} */
|
|
4540
|
+
declare function CreditAccountSummary(): CreditAccountSummary;
|
|
4541
|
+
type CreditAccountSummary = {
|
|
4542
|
+
/**
|
|
4543
|
+
* - Unique identifier associated with the
|
|
4544
|
+
* customer's account
|
|
4545
|
+
*/
|
|
4546
|
+
account_id: string;
|
|
4547
|
+
/**
|
|
4548
|
+
* - Current state of the account, indicating whether
|
|
4549
|
+
* it is ACTIVE, INACTIVE, or UNREGISTERED.
|
|
4550
|
+
*/
|
|
4551
|
+
status: string;
|
|
4552
|
+
redeemable_balance?: UserCreditSchema;
|
|
4553
|
+
available_balance?: UserCreditSchema;
|
|
4554
|
+
amount_on_hold?: UserCreditSchema;
|
|
4555
|
+
};
|
|
4556
|
+
/** @returns {ValidateCustomerCreditSchema} */
|
|
4557
|
+
declare function ValidateCustomerCreditSchema(): ValidateCustomerCreditSchema;
|
|
4558
|
+
type ValidateCustomerCreditSchema = {
|
|
4559
|
+
/**
|
|
4560
|
+
* - Successful or failure of API
|
|
4561
|
+
*/
|
|
4562
|
+
success: boolean;
|
|
4563
|
+
/**
|
|
4564
|
+
* - The customer is eligible to make a transaction or not
|
|
4565
|
+
*/
|
|
4566
|
+
is_eligible: boolean;
|
|
4567
|
+
/**
|
|
4568
|
+
* - Credit is applied to the user's account or not
|
|
4569
|
+
*/
|
|
4570
|
+
is_applied?: boolean;
|
|
4571
|
+
/**
|
|
4572
|
+
* - Detailed message about the user credt eligibility.
|
|
4573
|
+
*/
|
|
4574
|
+
message: string;
|
|
4575
|
+
/**
|
|
4576
|
+
* - Unique identifier for the shopping cart.
|
|
4577
|
+
*/
|
|
4578
|
+
cart_id?: string;
|
|
4579
|
+
account?: CreditAccountSummary;
|
|
4580
|
+
};
|
|
@@ -1369,6 +1369,42 @@ const Joi = require("joi");
|
|
|
1369
1369
|
* @property {PaymentModeCustomConfigSchema[]} items
|
|
1370
1370
|
*/
|
|
1371
1371
|
|
|
1372
|
+
/**
|
|
1373
|
+
* @typedef CustomerValidationSchema
|
|
1374
|
+
* @property {string} aggregator - Aggregator name of the payment gateway.
|
|
1375
|
+
* @property {number} transaction_amount - Payable amount
|
|
1376
|
+
* @property {string} [cart_id] - Unique identifier for the shopping cart.
|
|
1377
|
+
*/
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* @typedef UserCreditSchema
|
|
1381
|
+
* @property {number} amount - The monetary value, which can represent available
|
|
1382
|
+
* balance, redeemed balance, or hold amount, depending on the context.
|
|
1383
|
+
* @property {string} currency - The currency code (e.g., INR, USD).
|
|
1384
|
+
* @property {string} [unique_id] - A unique identifier for the payment transaction.
|
|
1385
|
+
*/
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* @typedef CreditAccountSummary
|
|
1389
|
+
* @property {string} account_id - Unique identifier associated with the
|
|
1390
|
+
* customer's account
|
|
1391
|
+
* @property {string} status - Current state of the account, indicating whether
|
|
1392
|
+
* it is ACTIVE, INACTIVE, or UNREGISTERED.
|
|
1393
|
+
* @property {UserCreditSchema} [redeemable_balance]
|
|
1394
|
+
* @property {UserCreditSchema} [available_balance]
|
|
1395
|
+
* @property {UserCreditSchema} [amount_on_hold]
|
|
1396
|
+
*/
|
|
1397
|
+
|
|
1398
|
+
/**
|
|
1399
|
+
* @typedef ValidateCustomerCreditSchema
|
|
1400
|
+
* @property {boolean} success - Successful or failure of API
|
|
1401
|
+
* @property {boolean} is_eligible - The customer is eligible to make a transaction or not
|
|
1402
|
+
* @property {boolean} [is_applied] - Credit is applied to the user's account or not
|
|
1403
|
+
* @property {string} message - Detailed message about the user credt eligibility.
|
|
1404
|
+
* @property {string} [cart_id] - Unique identifier for the shopping cart.
|
|
1405
|
+
* @property {CreditAccountSummary} [account]
|
|
1406
|
+
*/
|
|
1407
|
+
|
|
1372
1408
|
class PaymentPlatformModel {
|
|
1373
1409
|
/** @returns {PaymentGatewayConfigDetails} */
|
|
1374
1410
|
static PaymentGatewayConfigDetails() {
|
|
@@ -3007,5 +3043,46 @@ class PaymentPlatformModel {
|
|
|
3007
3043
|
.required(),
|
|
3008
3044
|
});
|
|
3009
3045
|
}
|
|
3046
|
+
|
|
3047
|
+
/** @returns {CustomerValidationSchema} */
|
|
3048
|
+
static CustomerValidationSchema() {
|
|
3049
|
+
return Joi.object({
|
|
3050
|
+
aggregator: Joi.string().allow("").required(),
|
|
3051
|
+
transaction_amount: Joi.number().required(),
|
|
3052
|
+
cart_id: Joi.string().allow(""),
|
|
3053
|
+
});
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3056
|
+
/** @returns {UserCreditSchema} */
|
|
3057
|
+
static UserCreditSchema() {
|
|
3058
|
+
return Joi.object({
|
|
3059
|
+
amount: Joi.number().required(),
|
|
3060
|
+
currency: Joi.string().allow("").required(),
|
|
3061
|
+
unique_id: Joi.string().allow(""),
|
|
3062
|
+
});
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3065
|
+
/** @returns {CreditAccountSummary} */
|
|
3066
|
+
static CreditAccountSummary() {
|
|
3067
|
+
return Joi.object({
|
|
3068
|
+
account_id: Joi.string().allow("").required(),
|
|
3069
|
+
status: Joi.string().allow("").required(),
|
|
3070
|
+
redeemable_balance: PaymentPlatformModel.UserCreditSchema(),
|
|
3071
|
+
available_balance: PaymentPlatformModel.UserCreditSchema(),
|
|
3072
|
+
amount_on_hold: PaymentPlatformModel.UserCreditSchema(),
|
|
3073
|
+
});
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
/** @returns {ValidateCustomerCreditSchema} */
|
|
3077
|
+
static ValidateCustomerCreditSchema() {
|
|
3078
|
+
return Joi.object({
|
|
3079
|
+
success: Joi.boolean().required(),
|
|
3080
|
+
is_eligible: Joi.boolean().required(),
|
|
3081
|
+
is_applied: Joi.boolean(),
|
|
3082
|
+
message: Joi.string().allow("").required(),
|
|
3083
|
+
cart_id: Joi.string().allow(""),
|
|
3084
|
+
account: PaymentPlatformModel.CreditAccountSummary(),
|
|
3085
|
+
});
|
|
3086
|
+
}
|
|
3010
3087
|
}
|
|
3011
3088
|
module.exports = PaymentPlatformModel;
|
|
@@ -211,7 +211,7 @@ export = UserPlatformModel;
|
|
|
211
211
|
* @property {string} [first_name]
|
|
212
212
|
* @property {string} [last_name]
|
|
213
213
|
* @property {string} [gender]
|
|
214
|
-
* @property {string} username
|
|
214
|
+
* @property {string} [username]
|
|
215
215
|
* @property {Object} [meta]
|
|
216
216
|
* @property {string} [external_id]
|
|
217
217
|
* @property {string} [rr_id]
|
|
@@ -835,7 +835,7 @@ type CreateUserRequestSchema = {
|
|
|
835
835
|
first_name?: string;
|
|
836
836
|
last_name?: string;
|
|
837
837
|
gender?: string;
|
|
838
|
-
username
|
|
838
|
+
username?: string;
|
|
839
839
|
meta?: any;
|
|
840
840
|
external_id?: string;
|
|
841
841
|
rr_id?: string;
|
|
@@ -239,7 +239,7 @@ const Joi = require("joi");
|
|
|
239
239
|
* @property {string} [first_name]
|
|
240
240
|
* @property {string} [last_name]
|
|
241
241
|
* @property {string} [gender]
|
|
242
|
-
* @property {string} username
|
|
242
|
+
* @property {string} [username]
|
|
243
243
|
* @property {Object} [meta]
|
|
244
244
|
* @property {string} [external_id]
|
|
245
245
|
* @property {string} [rr_id]
|
|
@@ -827,7 +827,7 @@ class UserPlatformModel {
|
|
|
827
827
|
first_name: Joi.string().allow(""),
|
|
828
828
|
last_name: Joi.string().allow(""),
|
|
829
829
|
gender: Joi.string().allow(""),
|
|
830
|
-
username: Joi.string().allow("")
|
|
830
|
+
username: Joi.string().allow(""),
|
|
831
831
|
meta: Joi.object().pattern(/\S/, Joi.any()),
|
|
832
832
|
external_id: Joi.string().allow(""),
|
|
833
833
|
rr_id: Joi.string().allow(""),
|
|
@@ -55,7 +55,7 @@ export = WebhookPlatformModel;
|
|
|
55
55
|
*/
|
|
56
56
|
/**
|
|
57
57
|
* @typedef EventConfigResult
|
|
58
|
-
* @property {EventConfig[]} [event_configs]
|
|
58
|
+
* @property {EventConfig[]} [event_configs] - List of event configurations.
|
|
59
59
|
*/
|
|
60
60
|
/**
|
|
61
61
|
* @typedef Association
|
|
@@ -96,7 +96,7 @@ export = WebhookPlatformModel;
|
|
|
96
96
|
* @property {string} [created_on] - The date and time when the subscriber was created.
|
|
97
97
|
* @property {string} [type] - The type of subscriber, which can either be passed as null.
|
|
98
98
|
* @property {AuthMeta} [auth_meta]
|
|
99
|
-
* @property {EventConfig[]} [event_configs]
|
|
99
|
+
* @property {EventConfig[]} [event_configs] - List of event configurations.
|
|
100
100
|
*/
|
|
101
101
|
/**
|
|
102
102
|
* @typedef Events
|
|
@@ -183,7 +183,7 @@ export = WebhookPlatformModel;
|
|
|
183
183
|
*/
|
|
184
184
|
/**
|
|
185
185
|
* @typedef SubscriberConfigList
|
|
186
|
-
* @property {SubscriberDetails[]} [items]
|
|
186
|
+
* @property {SubscriberDetails[]} [items] - List of subscriber details.
|
|
187
187
|
* @property {Page} [page]
|
|
188
188
|
*/
|
|
189
189
|
/**
|
|
@@ -199,7 +199,7 @@ export = WebhookPlatformModel;
|
|
|
199
199
|
* @property {string} type - The type of the configuration.
|
|
200
200
|
* @property {Object} [custom_headers] - Custom headers for the configuration.
|
|
201
201
|
* @property {AuthMeta} [auth_meta]
|
|
202
|
-
* @property {RestEventData[]} events
|
|
202
|
+
* @property {RestEventData[]} events - List of event data for configuration.
|
|
203
203
|
*/
|
|
204
204
|
/**
|
|
205
205
|
* @typedef QueueEventData
|
|
@@ -211,13 +211,13 @@ export = WebhookPlatformModel;
|
|
|
211
211
|
*/
|
|
212
212
|
/**
|
|
213
213
|
* @typedef KafkaConfig
|
|
214
|
-
* @property {string} [type]
|
|
215
|
-
* @property {QueueEventData[]} events
|
|
214
|
+
* @property {string} [type] - Type of Kafka configuration (optional).
|
|
215
|
+
* @property {QueueEventData[]} events - List of event data for configuration.
|
|
216
216
|
*/
|
|
217
217
|
/**
|
|
218
218
|
* @typedef PubSubConfig
|
|
219
|
-
* @property {string} [type]
|
|
220
|
-
* @property {QueueEventData[]} events
|
|
219
|
+
* @property {string} [type] - Type of Pub/Sub configuration (optional).
|
|
220
|
+
* @property {QueueEventData[]} events - List of event data for configuration.
|
|
221
221
|
*/
|
|
222
222
|
/**
|
|
223
223
|
* @typedef TemporalEventData
|
|
@@ -230,8 +230,8 @@ export = WebhookPlatformModel;
|
|
|
230
230
|
*/
|
|
231
231
|
/**
|
|
232
232
|
* @typedef TemporalConfig
|
|
233
|
-
* @property {string} [type]
|
|
234
|
-
* @property {TemporalEventData[]} events
|
|
233
|
+
* @property {string} [type] - Type of Temporal configuration (optional).
|
|
234
|
+
* @property {TemporalEventData[]} events - List of event data for configuration.
|
|
235
235
|
*/
|
|
236
236
|
/**
|
|
237
237
|
* @typedef SqsEventData
|
|
@@ -243,8 +243,8 @@ export = WebhookPlatformModel;
|
|
|
243
243
|
*/
|
|
244
244
|
/**
|
|
245
245
|
* @typedef SqsConfig
|
|
246
|
-
* @property {string} [type]
|
|
247
|
-
* @property {SqsEventData[]} events
|
|
246
|
+
* @property {string} [type] - Type of SQS configuration (optional).
|
|
247
|
+
* @property {SqsEventData[]} events - List of event data for configuration.
|
|
248
248
|
*/
|
|
249
249
|
/**
|
|
250
250
|
* @typedef EventBridgeData
|
|
@@ -257,8 +257,9 @@ export = WebhookPlatformModel;
|
|
|
257
257
|
*/
|
|
258
258
|
/**
|
|
259
259
|
* @typedef EventBridgeConfig
|
|
260
|
-
* @property {string} [type]
|
|
261
|
-
* @property {EventBridgeData[]} events
|
|
260
|
+
* @property {string} [type] - Type of event configuration (optional).
|
|
261
|
+
* @property {EventBridgeData[]} events - List of event data for EventBridge
|
|
262
|
+
* configuration.
|
|
262
263
|
*/
|
|
263
264
|
/**
|
|
264
265
|
* @typedef EventMapBody
|
|
@@ -445,6 +446,9 @@ type EventConfig = {
|
|
|
445
446
|
/** @returns {EventConfigResult} */
|
|
446
447
|
declare function EventConfigResult(): EventConfigResult;
|
|
447
448
|
type EventConfigResult = {
|
|
449
|
+
/**
|
|
450
|
+
* - List of event configurations.
|
|
451
|
+
*/
|
|
448
452
|
event_configs?: EventConfig[];
|
|
449
453
|
};
|
|
450
454
|
/** @returns {Association} */
|
|
@@ -547,6 +551,9 @@ type SubscriberDetails = {
|
|
|
547
551
|
*/
|
|
548
552
|
type?: string;
|
|
549
553
|
auth_meta?: AuthMeta;
|
|
554
|
+
/**
|
|
555
|
+
* - List of event configurations.
|
|
556
|
+
*/
|
|
550
557
|
event_configs?: EventConfig[];
|
|
551
558
|
};
|
|
552
559
|
/** @returns {Events} */
|
|
@@ -776,6 +783,9 @@ type SubscriberConfigResult = {
|
|
|
776
783
|
/** @returns {SubscriberConfigList} */
|
|
777
784
|
declare function SubscriberConfigList(): SubscriberConfigList;
|
|
778
785
|
type SubscriberConfigList = {
|
|
786
|
+
/**
|
|
787
|
+
* - List of subscriber details.
|
|
788
|
+
*/
|
|
779
789
|
items?: SubscriberDetails[];
|
|
780
790
|
page?: Page;
|
|
781
791
|
};
|
|
@@ -815,6 +825,9 @@ type RestConfig = {
|
|
|
815
825
|
*/
|
|
816
826
|
custom_headers?: any;
|
|
817
827
|
auth_meta?: AuthMeta;
|
|
828
|
+
/**
|
|
829
|
+
* - List of event data for configuration.
|
|
830
|
+
*/
|
|
818
831
|
events: RestEventData[];
|
|
819
832
|
};
|
|
820
833
|
/** @returns {QueueEventData} */
|
|
@@ -844,13 +857,25 @@ type QueueEventData = {
|
|
|
844
857
|
/** @returns {KafkaConfig} */
|
|
845
858
|
declare function KafkaConfig(): KafkaConfig;
|
|
846
859
|
type KafkaConfig = {
|
|
860
|
+
/**
|
|
861
|
+
* - Type of Kafka configuration (optional).
|
|
862
|
+
*/
|
|
847
863
|
type?: string;
|
|
864
|
+
/**
|
|
865
|
+
* - List of event data for configuration.
|
|
866
|
+
*/
|
|
848
867
|
events: QueueEventData[];
|
|
849
868
|
};
|
|
850
869
|
/** @returns {PubSubConfig} */
|
|
851
870
|
declare function PubSubConfig(): PubSubConfig;
|
|
852
871
|
type PubSubConfig = {
|
|
872
|
+
/**
|
|
873
|
+
* - Type of Pub/Sub configuration (optional).
|
|
874
|
+
*/
|
|
853
875
|
type?: string;
|
|
876
|
+
/**
|
|
877
|
+
* - List of event data for configuration.
|
|
878
|
+
*/
|
|
854
879
|
events: QueueEventData[];
|
|
855
880
|
};
|
|
856
881
|
/** @returns {TemporalEventData} */
|
|
@@ -884,7 +909,13 @@ type TemporalEventData = {
|
|
|
884
909
|
/** @returns {TemporalConfig} */
|
|
885
910
|
declare function TemporalConfig(): TemporalConfig;
|
|
886
911
|
type TemporalConfig = {
|
|
912
|
+
/**
|
|
913
|
+
* - Type of Temporal configuration (optional).
|
|
914
|
+
*/
|
|
887
915
|
type?: string;
|
|
916
|
+
/**
|
|
917
|
+
* - List of event data for configuration.
|
|
918
|
+
*/
|
|
888
919
|
events: TemporalEventData[];
|
|
889
920
|
};
|
|
890
921
|
/** @returns {SqsEventData} */
|
|
@@ -914,7 +945,13 @@ type SqsEventData = {
|
|
|
914
945
|
/** @returns {SqsConfig} */
|
|
915
946
|
declare function SqsConfig(): SqsConfig;
|
|
916
947
|
type SqsConfig = {
|
|
948
|
+
/**
|
|
949
|
+
* - Type of SQS configuration (optional).
|
|
950
|
+
*/
|
|
917
951
|
type?: string;
|
|
952
|
+
/**
|
|
953
|
+
* - List of event data for configuration.
|
|
954
|
+
*/
|
|
918
955
|
events: SqsEventData[];
|
|
919
956
|
};
|
|
920
957
|
/** @returns {EventBridgeData} */
|
|
@@ -945,7 +982,14 @@ type EventBridgeData = {
|
|
|
945
982
|
/** @returns {EventBridgeConfig} */
|
|
946
983
|
declare function EventBridgeConfig(): EventBridgeConfig;
|
|
947
984
|
type EventBridgeConfig = {
|
|
985
|
+
/**
|
|
986
|
+
* - Type of event configuration (optional).
|
|
987
|
+
*/
|
|
948
988
|
type?: string;
|
|
989
|
+
/**
|
|
990
|
+
* - List of event data for EventBridge
|
|
991
|
+
* configuration.
|
|
992
|
+
*/
|
|
949
993
|
events: EventBridgeData[];
|
|
950
994
|
};
|
|
951
995
|
/** @returns {EventMapBody} */
|
|
@@ -60,7 +60,7 @@ const Joi = require("joi");
|
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* @typedef EventConfigResult
|
|
63
|
-
* @property {EventConfig[]} [event_configs]
|
|
63
|
+
* @property {EventConfig[]} [event_configs] - List of event configurations.
|
|
64
64
|
*/
|
|
65
65
|
|
|
66
66
|
/**
|
|
@@ -105,7 +105,7 @@ const Joi = require("joi");
|
|
|
105
105
|
* @property {string} [created_on] - The date and time when the subscriber was created.
|
|
106
106
|
* @property {string} [type] - The type of subscriber, which can either be passed as null.
|
|
107
107
|
* @property {AuthMeta} [auth_meta]
|
|
108
|
-
* @property {EventConfig[]} [event_configs]
|
|
108
|
+
* @property {EventConfig[]} [event_configs] - List of event configurations.
|
|
109
109
|
*/
|
|
110
110
|
|
|
111
111
|
/**
|
|
@@ -199,7 +199,7 @@ const Joi = require("joi");
|
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
201
|
* @typedef SubscriberConfigList
|
|
202
|
-
* @property {SubscriberDetails[]} [items]
|
|
202
|
+
* @property {SubscriberDetails[]} [items] - List of subscriber details.
|
|
203
203
|
* @property {Page} [page]
|
|
204
204
|
*/
|
|
205
205
|
|
|
@@ -217,7 +217,7 @@ const Joi = require("joi");
|
|
|
217
217
|
* @property {string} type - The type of the configuration.
|
|
218
218
|
* @property {Object} [custom_headers] - Custom headers for the configuration.
|
|
219
219
|
* @property {AuthMeta} [auth_meta]
|
|
220
|
-
* @property {RestEventData[]} events
|
|
220
|
+
* @property {RestEventData[]} events - List of event data for configuration.
|
|
221
221
|
*/
|
|
222
222
|
|
|
223
223
|
/**
|
|
@@ -231,14 +231,14 @@ const Joi = require("joi");
|
|
|
231
231
|
|
|
232
232
|
/**
|
|
233
233
|
* @typedef KafkaConfig
|
|
234
|
-
* @property {string} [type]
|
|
235
|
-
* @property {QueueEventData[]} events
|
|
234
|
+
* @property {string} [type] - Type of Kafka configuration (optional).
|
|
235
|
+
* @property {QueueEventData[]} events - List of event data for configuration.
|
|
236
236
|
*/
|
|
237
237
|
|
|
238
238
|
/**
|
|
239
239
|
* @typedef PubSubConfig
|
|
240
|
-
* @property {string} [type]
|
|
241
|
-
* @property {QueueEventData[]} events
|
|
240
|
+
* @property {string} [type] - Type of Pub/Sub configuration (optional).
|
|
241
|
+
* @property {QueueEventData[]} events - List of event data for configuration.
|
|
242
242
|
*/
|
|
243
243
|
|
|
244
244
|
/**
|
|
@@ -253,8 +253,8 @@ const Joi = require("joi");
|
|
|
253
253
|
|
|
254
254
|
/**
|
|
255
255
|
* @typedef TemporalConfig
|
|
256
|
-
* @property {string} [type]
|
|
257
|
-
* @property {TemporalEventData[]} events
|
|
256
|
+
* @property {string} [type] - Type of Temporal configuration (optional).
|
|
257
|
+
* @property {TemporalEventData[]} events - List of event data for configuration.
|
|
258
258
|
*/
|
|
259
259
|
|
|
260
260
|
/**
|
|
@@ -268,8 +268,8 @@ const Joi = require("joi");
|
|
|
268
268
|
|
|
269
269
|
/**
|
|
270
270
|
* @typedef SqsConfig
|
|
271
|
-
* @property {string} [type]
|
|
272
|
-
* @property {SqsEventData[]} events
|
|
271
|
+
* @property {string} [type] - Type of SQS configuration (optional).
|
|
272
|
+
* @property {SqsEventData[]} events - List of event data for configuration.
|
|
273
273
|
*/
|
|
274
274
|
|
|
275
275
|
/**
|
|
@@ -284,8 +284,9 @@ const Joi = require("joi");
|
|
|
284
284
|
|
|
285
285
|
/**
|
|
286
286
|
* @typedef EventBridgeConfig
|
|
287
|
-
* @property {string} [type]
|
|
288
|
-
* @property {EventBridgeData[]} events
|
|
287
|
+
* @property {string} [type] - Type of event configuration (optional).
|
|
288
|
+
* @property {EventBridgeData[]} events - List of event data for EventBridge
|
|
289
|
+
* configuration.
|
|
289
290
|
*/
|
|
290
291
|
|
|
291
292
|
/**
|
|
@@ -49,6 +49,21 @@ class Catalog {
|
|
|
49
49
|
},
|
|
50
50
|
{ responseHeaders } = { responseHeaders: false }
|
|
51
51
|
) {
|
|
52
|
+
let invalidInput = [];
|
|
53
|
+
|
|
54
|
+
if (!level) {
|
|
55
|
+
invalidInput.push({
|
|
56
|
+
message: `The 'level' field is required.`,
|
|
57
|
+
path: ["level"],
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (invalidInput.length) {
|
|
61
|
+
const error = new Error();
|
|
62
|
+
error.message = "Missing required field";
|
|
63
|
+
error.details = invalidInput;
|
|
64
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
65
|
+
}
|
|
66
|
+
|
|
52
67
|
const { error } = CatalogPublicValidator.getTaxonomyByLevel().validate(
|
|
53
68
|
{ level, l0Slug, l1Slug, l2Slug, l3Slug, limit },
|
|
54
69
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -49,6 +49,14 @@ class Configuration {
|
|
|
49
49
|
{ locationType, id, requestHeaders } = { requestHeaders: {} },
|
|
50
50
|
{ responseHeaders } = { responseHeaders: false }
|
|
51
51
|
) {
|
|
52
|
+
let invalidInput = [];
|
|
53
|
+
if (invalidInput.length) {
|
|
54
|
+
const error = new Error();
|
|
55
|
+
error.message = "Missing required field";
|
|
56
|
+
error.details = invalidInput;
|
|
57
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
58
|
+
}
|
|
59
|
+
|
|
52
60
|
const { error } = ConfigurationPublicValidator.getLocations().validate(
|
|
53
61
|
{ locationType, id },
|
|
54
62
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -130,6 +138,14 @@ class Configuration {
|
|
|
130
138
|
{ authorization, query, requestHeaders } = { requestHeaders: {} },
|
|
131
139
|
{ responseHeaders } = { responseHeaders: false }
|
|
132
140
|
) {
|
|
141
|
+
let invalidInput = [];
|
|
142
|
+
if (invalidInput.length) {
|
|
143
|
+
const error = new Error();
|
|
144
|
+
error.message = "Missing required field";
|
|
145
|
+
error.details = invalidInput;
|
|
146
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
147
|
+
}
|
|
148
|
+
|
|
133
149
|
const { error } = ConfigurationPublicValidator.searchApplication().validate(
|
|
134
150
|
{ authorization, query },
|
|
135
151
|
{ abortEarly: false, allowUnknown: true }
|