@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.
Files changed (56) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +40 -0
  4. package/sdk/application/Cart/CartApplicationClient.js +176 -0
  5. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +18 -4
  6. package/sdk/application/Catalog/CatalogApplicationClient.js +47 -4
  7. package/sdk/application/Content/ContentApplicationClient.d.ts +11 -1
  8. package/sdk/application/Content/ContentApplicationClient.js +40 -2
  9. package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
  10. package/sdk/application/Payment/PaymentApplicationClient.js +2 -0
  11. package/sdk/common/Constant.d.ts +9 -0
  12. package/sdk/common/Constant.js +11 -0
  13. package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -2
  14. package/sdk/partner/Theme/ThemePartnerModel.js +5 -2
  15. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +72 -10
  16. package/sdk/platform/Cart/CartPlatformApplicationClient.js +634 -33
  17. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +225 -1
  18. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +147 -0
  19. package/sdk/platform/Cart/CartPlatformModel.d.ts +951 -1
  20. package/sdk/platform/Cart/CartPlatformModel.js +597 -1
  21. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +123 -3
  22. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +829 -39
  23. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +205 -7
  24. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +154 -3
  25. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +5 -5
  26. package/sdk/platform/Catalog/CatalogPlatformClient.js +8 -5
  27. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1023 -31
  28. package/sdk/platform/Catalog/CatalogPlatformModel.js +841 -26
  29. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +7 -0
  30. package/sdk/platform/Catalog/CatalogPlatformValidator.js +3 -0
  31. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +7 -0
  32. package/sdk/platform/Communication/CommunicationPlatformModel.js +3 -0
  33. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +92 -1
  34. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +54 -0
  35. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +5 -5
  36. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +3 -3
  37. package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -8
  38. package/sdk/platform/Content/ContentPlatformModel.js +11 -8
  39. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +21 -0
  40. package/sdk/platform/Discount/DiscountPlatformModel.js +9 -0
  41. package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
  42. package/sdk/platform/Order/OrderPlatformClient.js +2 -2
  43. package/sdk/platform/Order/OrderPlatformModel.d.ts +20 -2
  44. package/sdk/platform/Order/OrderPlatformModel.js +9 -1
  45. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +14 -3
  46. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +88 -6
  47. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +28 -3
  48. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +22 -2
  49. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +356 -1
  50. package/sdk/platform/Payment/PaymentPlatformModel.js +229 -0
  51. package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -2
  52. package/sdk/platform/Theme/ThemePlatformModel.js +5 -2
  53. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +29 -0
  54. package/sdk/platform/Webhook/WebhookPlatformModel.js +13 -0
  55. package/sdk/public/Webhook/WebhookPublicModel.d.ts +29 -0
  56. package/sdk/public/Webhook/WebhookPublicModel.js +13 -0
@@ -1,4 +1,19 @@
1
1
  export = PaymentPlatformModel;
2
+ /**
3
+ * @typedef AggregatorToken
4
+ * @property {number} payment_mode_id - Payment mode identifier Supported values are:
5
+ *
6
+ * - **4**: Wallet
7
+ * - **3**: Net Banking
8
+ * - **2**: Card
9
+ * - **1**: Pay Later
10
+ *
11
+ * @property {string} sub_payment_mode_code - Sub-payment method code
12
+ * @property {string} token - Token value to be saved for the aggregator
13
+ * @property {string} status - Status of the token verification
14
+ * @property {boolean} is_active - Enable or Disable Flag
15
+ * @property {string} domain - Name of domain
16
+ */
2
17
  /**
3
18
  * @typedef PaymentGatewayConfigDetails
4
19
  * @property {Object[]} [aggregators] - List of all config specific to the
@@ -734,6 +749,92 @@ export = PaymentPlatformModel;
734
749
  * @property {Object[]} [items] - List of all aggregator and payment mode details.
735
750
  * @property {boolean} success - Response is successful or not.
736
751
  */
752
+ /**
753
+ * @typedef PaymentModeConfig
754
+ * @property {string} [business_unit] - Business unit for which the configuration applies.
755
+ * @property {string} [device] - Device type for which the configuration applies.
756
+ * @property {boolean} [is_active] - Indicates if the payment configuration is
757
+ * currently active.
758
+ * @property {PaymentModeItems[]} [items] - List of payment modes available for
759
+ * the given business unit and device. This list is dynamic and can contain
760
+ * one or more payment modes.
761
+ */
762
+ /**
763
+ * @typedef PaymentModeItems
764
+ * @property {number} [id] - Unique identifier for the payment mode.
765
+ * @property {string} [name] - Display name of the payment mode.
766
+ * @property {string} [short_code] - Short code for the payment mode.
767
+ * @property {LogoSet} [logos]
768
+ * @property {boolean} [is_active] - Indicates if this payment mode is active in
769
+ * the system.
770
+ * @property {SubPaymentMode[]} [sub_payment_mode] - Dynamic list of sub-payment
771
+ * modes under this payment mode.
772
+ * @property {boolean} [is_active_at_pg] - Indicates if this payment mode is
773
+ * active at the payment gateway (PG) side.
774
+ * @property {Object} [fulfillment_options] - Fulfillment options applicable for
775
+ * these payment modes. Keys are option slugs and values indicate whether the
776
+ * option is enabled.
777
+ */
778
+ /**
779
+ * @typedef SubPaymentMode
780
+ * @property {string} [code] - Unique code of the sub-payment mode.
781
+ * @property {boolean} [is_active] - Indicates if this sub-payment mode is
782
+ * active in the system.
783
+ * @property {number} [priority] - Priority used for ordering in UI. Lower
784
+ * numbers can represent higher priority, depending on implementation.
785
+ * @property {LogoSet} [logos]
786
+ * @property {string} [name] - Human-readable name of the sub-payment mode.
787
+ * @property {boolean} [is_active_at_pg] - Indicates if this sub-payment mode is
788
+ * active at the payment gateway (PG) side.
789
+ */
790
+ /**
791
+ * @typedef LogoSet
792
+ * @property {string} [large] - URL of the large-sized logo.
793
+ * @property {string} [small] - URL of the small-sized logo.
794
+ */
795
+ /**
796
+ * @typedef PlatformLogoSet
797
+ * @property {string} [large] - URL of the large-sized logo.
798
+ * @property {string} [small] - URL of the small-sized logo.
799
+ */
800
+ /**
801
+ * @typedef PlatformConfigPaymentModeDetails
802
+ * @property {string} [business_unit] - Business unit for which the
803
+ * configuration applies (e.g. "storefront", "pos").
804
+ * @property {string} [device] - Device or channel for which the configuration
805
+ * applies (e.g. "desktop", "android", "ios").
806
+ * @property {Object} [fulfillment_options] - Fulfillment options applicable for
807
+ * these payment modes. Keys are option slugs (e.g. "self-pickup", "delivery")
808
+ * and values indicate whether the option is enabled.
809
+ * @property {boolean} [is_active] - Overall active status for this aggregator
810
+ * payment configuration for the given application and device.
811
+ * @property {PlatformPaymentModeItem[]} [items] - List of payment modes and
812
+ * their configuration.
813
+ */
814
+ /**
815
+ * @typedef PlatformPaymentModeItem
816
+ * @property {number} [id] - Unique identifier of the payment mode.
817
+ * @property {string} [name] - Human readable name of the payment mode.
818
+ * @property {string} [short_code] - Short code representing the payment mode.
819
+ * @property {PlatformLogoSet} [logos]
820
+ * @property {boolean} [is_active] - Indicates if the payment mode is enabled on
821
+ * the platform.
822
+ * @property {boolean} [is_active_at_pg] - Indicates if the payment mode is
823
+ * active at the payment gateway.
824
+ * @property {PlatformSubPaymentMode[]} [sub_payment_mode] - List of sub payment
825
+ * modes (e.g. card networks like VISA, MASTERCARD).
826
+ */
827
+ /**
828
+ * @typedef PlatformSubPaymentMode
829
+ * @property {string} [code] - Code of the sub payment mode (e.g. "VISA", "AMEX").
830
+ * @property {string} [name] - Human readable name of the sub payment mode.
831
+ * @property {boolean} [is_active] - Indicates if the sub payment mode is enabled.
832
+ * @property {boolean} [is_active_at_pg] - Indicates if the sub payment mode is
833
+ * active at payment gateway.
834
+ * @property {number} [priority] - Display priority for the sub payment mode.
835
+ * Lower numbers indicate higher priority.
836
+ * @property {PlatformLogoSet} [logos]
837
+ */
737
838
  /**
738
839
  * @typedef MerchnatPaymentModeCreation
739
840
  * @property {Object} [offline] - Details to be updated for online payment configuration.
@@ -1159,11 +1260,50 @@ export = PaymentPlatformModel;
1159
1260
  * @property {string} [cart_id] - Unique identifier for the shopping cart.
1160
1261
  * @property {CreditAccountSummary} [account]
1161
1262
  */
1263
+ /**
1264
+ * @typedef OperationResponseSchema
1265
+ * @property {boolean} success - Indicates if the operation was successful
1266
+ * @property {string} [message] - Optional message providing additional
1267
+ * information about the operation
1268
+ */
1162
1269
  declare class PaymentPlatformModel {
1163
1270
  }
1164
1271
  declare namespace PaymentPlatformModel {
1165
- export { PaymentGatewayConfigDetails, ErrorCodeDescription, PaymentGatewayConfig, PaymentGatewayConfigCreation, PaymentGatewayToBeReviewed, ErrorCodeAndDescription, HttpErrorDetails, IntentAppErrorList, ProductCODData, CODChargesLimitsDetails, PaymentModeLogo, IntentApp, PaymentModeList, PaymentConfirmationElement, 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, PaymentInitializationCreation, PaymentInitializationDetails, PaymentStatusUpdateCreation, PaymentStatusUpdateDetails, ResendOrCancelPaymentCreation, LinkStatus, ResendOrCancelPaymentDetails, PaymentStatusBulkHandlerCreation, PaymentObjectList, PaymentStatusObject, PaymentStatusBulkHandlerDetails, GetOauthUrlDetails, RevokeOAuthToken, ValidateCustomerCreation, ValidateCustomerDetails, GetPaymentLinkDetails, ErrorDescription, ErrorDetails, CreatePaymentLinkMeta, CreatePaymentLinkCreation, CreatePaymentLinkDetails, PollingPaymentLinkDetails, CancelOrResendPaymentLinkCreation, ResendPaymentLinkDetails, CancelPaymentLinkDetails, Code, PaymentCode, GetPaymentCode, GetPaymentCodeDetails, PlatformPaymentModeDetails, MerchnatPaymentModeCreation, SkuDetails, AppliedOffer, 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 };
1272
+ export { AggregatorToken, PaymentGatewayConfigDetails, ErrorCodeDescription, PaymentGatewayConfig, PaymentGatewayConfigCreation, PaymentGatewayToBeReviewed, ErrorCodeAndDescription, HttpErrorDetails, IntentAppErrorList, ProductCODData, CODChargesLimitsDetails, PaymentModeLogo, IntentApp, PaymentModeList, PaymentConfirmationElement, 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, PaymentInitializationCreation, PaymentInitializationDetails, PaymentStatusUpdateCreation, PaymentStatusUpdateDetails, ResendOrCancelPaymentCreation, LinkStatus, ResendOrCancelPaymentDetails, PaymentStatusBulkHandlerCreation, PaymentObjectList, PaymentStatusObject, PaymentStatusBulkHandlerDetails, GetOauthUrlDetails, RevokeOAuthToken, ValidateCustomerCreation, ValidateCustomerDetails, GetPaymentLinkDetails, ErrorDescription, ErrorDetails, CreatePaymentLinkMeta, CreatePaymentLinkCreation, CreatePaymentLinkDetails, PollingPaymentLinkDetails, CancelOrResendPaymentLinkCreation, ResendPaymentLinkDetails, CancelPaymentLinkDetails, Code, PaymentCode, GetPaymentCode, GetPaymentCodeDetails, PlatformPaymentModeDetails, PaymentModeConfig, PaymentModeItems, SubPaymentMode, LogoSet, PlatformLogoSet, PlatformConfigPaymentModeDetails, PlatformPaymentModeItem, PlatformSubPaymentMode, MerchnatPaymentModeCreation, SkuDetails, AppliedOffer, 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, OperationResponseSchema };
1166
1273
  }
1274
+ /** @returns {AggregatorToken} */
1275
+ declare function AggregatorToken(): AggregatorToken;
1276
+ type AggregatorToken = {
1277
+ /**
1278
+ * - Payment mode identifier Supported values are:
1279
+ *
1280
+ * - **4**: Wallet
1281
+ * - **3**: Net Banking
1282
+ * - **2**: Card
1283
+ * - **1**: Pay Later
1284
+ */
1285
+ payment_mode_id: number;
1286
+ /**
1287
+ * - Sub-payment method code
1288
+ */
1289
+ sub_payment_mode_code: string;
1290
+ /**
1291
+ * - Token value to be saved for the aggregator
1292
+ */
1293
+ token: string;
1294
+ /**
1295
+ * - Status of the token verification
1296
+ */
1297
+ status: string;
1298
+ /**
1299
+ * - Enable or Disable Flag
1300
+ */
1301
+ is_active: boolean;
1302
+ /**
1303
+ * - Name of domain
1304
+ */
1305
+ domain: string;
1306
+ };
1167
1307
  /** @returns {PaymentGatewayConfigDetails} */
1168
1308
  declare function PaymentGatewayConfigDetails(): PaymentGatewayConfigDetails;
1169
1309
  type PaymentGatewayConfigDetails = {
@@ -3110,6 +3250,208 @@ type PlatformPaymentModeDetails = {
3110
3250
  */
3111
3251
  success: boolean;
3112
3252
  };
3253
+ /** @returns {PaymentModeConfig} */
3254
+ declare function PaymentModeConfig(): PaymentModeConfig;
3255
+ type PaymentModeConfig = {
3256
+ /**
3257
+ * - Business unit for which the configuration applies.
3258
+ */
3259
+ business_unit?: string;
3260
+ /**
3261
+ * - Device type for which the configuration applies.
3262
+ */
3263
+ device?: string;
3264
+ /**
3265
+ * - Indicates if the payment configuration is
3266
+ * currently active.
3267
+ */
3268
+ is_active?: boolean;
3269
+ /**
3270
+ * - List of payment modes available for
3271
+ * the given business unit and device. This list is dynamic and can contain
3272
+ * one or more payment modes.
3273
+ */
3274
+ items?: PaymentModeItems[];
3275
+ };
3276
+ /** @returns {PaymentModeItems} */
3277
+ declare function PaymentModeItems(): PaymentModeItems;
3278
+ type PaymentModeItems = {
3279
+ /**
3280
+ * - Unique identifier for the payment mode.
3281
+ */
3282
+ id?: number;
3283
+ /**
3284
+ * - Display name of the payment mode.
3285
+ */
3286
+ name?: string;
3287
+ /**
3288
+ * - Short code for the payment mode.
3289
+ */
3290
+ short_code?: string;
3291
+ logos?: LogoSet;
3292
+ /**
3293
+ * - Indicates if this payment mode is active in
3294
+ * the system.
3295
+ */
3296
+ is_active?: boolean;
3297
+ /**
3298
+ * - Dynamic list of sub-payment
3299
+ * modes under this payment mode.
3300
+ */
3301
+ sub_payment_mode?: SubPaymentMode[];
3302
+ /**
3303
+ * - Indicates if this payment mode is
3304
+ * active at the payment gateway (PG) side.
3305
+ */
3306
+ is_active_at_pg?: boolean;
3307
+ /**
3308
+ * - Fulfillment options applicable for
3309
+ * these payment modes. Keys are option slugs and values indicate whether the
3310
+ * option is enabled.
3311
+ */
3312
+ fulfillment_options?: any;
3313
+ };
3314
+ /** @returns {SubPaymentMode} */
3315
+ declare function SubPaymentMode(): SubPaymentMode;
3316
+ type SubPaymentMode = {
3317
+ /**
3318
+ * - Unique code of the sub-payment mode.
3319
+ */
3320
+ code?: string;
3321
+ /**
3322
+ * - Indicates if this sub-payment mode is
3323
+ * active in the system.
3324
+ */
3325
+ is_active?: boolean;
3326
+ /**
3327
+ * - Priority used for ordering in UI. Lower
3328
+ * numbers can represent higher priority, depending on implementation.
3329
+ */
3330
+ priority?: number;
3331
+ logos?: LogoSet;
3332
+ /**
3333
+ * - Human-readable name of the sub-payment mode.
3334
+ */
3335
+ name?: string;
3336
+ /**
3337
+ * - Indicates if this sub-payment mode is
3338
+ * active at the payment gateway (PG) side.
3339
+ */
3340
+ is_active_at_pg?: boolean;
3341
+ };
3342
+ /** @returns {LogoSet} */
3343
+ declare function LogoSet(): LogoSet;
3344
+ type LogoSet = {
3345
+ /**
3346
+ * - URL of the large-sized logo.
3347
+ */
3348
+ large?: string;
3349
+ /**
3350
+ * - URL of the small-sized logo.
3351
+ */
3352
+ small?: string;
3353
+ };
3354
+ /** @returns {PlatformLogoSet} */
3355
+ declare function PlatformLogoSet(): PlatformLogoSet;
3356
+ type PlatformLogoSet = {
3357
+ /**
3358
+ * - URL of the large-sized logo.
3359
+ */
3360
+ large?: string;
3361
+ /**
3362
+ * - URL of the small-sized logo.
3363
+ */
3364
+ small?: string;
3365
+ };
3366
+ /** @returns {PlatformConfigPaymentModeDetails} */
3367
+ declare function PlatformConfigPaymentModeDetails(): PlatformConfigPaymentModeDetails;
3368
+ type PlatformConfigPaymentModeDetails = {
3369
+ /**
3370
+ * - Business unit for which the
3371
+ * configuration applies (e.g. "storefront", "pos").
3372
+ */
3373
+ business_unit?: string;
3374
+ /**
3375
+ * - Device or channel for which the configuration
3376
+ * applies (e.g. "desktop", "android", "ios").
3377
+ */
3378
+ device?: string;
3379
+ /**
3380
+ * - Fulfillment options applicable for
3381
+ * these payment modes. Keys are option slugs (e.g. "self-pickup", "delivery")
3382
+ * and values indicate whether the option is enabled.
3383
+ */
3384
+ fulfillment_options?: any;
3385
+ /**
3386
+ * - Overall active status for this aggregator
3387
+ * payment configuration for the given application and device.
3388
+ */
3389
+ is_active?: boolean;
3390
+ /**
3391
+ * - List of payment modes and
3392
+ * their configuration.
3393
+ */
3394
+ items?: PlatformPaymentModeItem[];
3395
+ };
3396
+ /** @returns {PlatformPaymentModeItem} */
3397
+ declare function PlatformPaymentModeItem(): PlatformPaymentModeItem;
3398
+ type PlatformPaymentModeItem = {
3399
+ /**
3400
+ * - Unique identifier of the payment mode.
3401
+ */
3402
+ id?: number;
3403
+ /**
3404
+ * - Human readable name of the payment mode.
3405
+ */
3406
+ name?: string;
3407
+ /**
3408
+ * - Short code representing the payment mode.
3409
+ */
3410
+ short_code?: string;
3411
+ logos?: PlatformLogoSet;
3412
+ /**
3413
+ * - Indicates if the payment mode is enabled on
3414
+ * the platform.
3415
+ */
3416
+ is_active?: boolean;
3417
+ /**
3418
+ * - Indicates if the payment mode is
3419
+ * active at the payment gateway.
3420
+ */
3421
+ is_active_at_pg?: boolean;
3422
+ /**
3423
+ * - List of sub payment
3424
+ * modes (e.g. card networks like VISA, MASTERCARD).
3425
+ */
3426
+ sub_payment_mode?: PlatformSubPaymentMode[];
3427
+ };
3428
+ /** @returns {PlatformSubPaymentMode} */
3429
+ declare function PlatformSubPaymentMode(): PlatformSubPaymentMode;
3430
+ type PlatformSubPaymentMode = {
3431
+ /**
3432
+ * - Code of the sub payment mode (e.g. "VISA", "AMEX").
3433
+ */
3434
+ code?: string;
3435
+ /**
3436
+ * - Human readable name of the sub payment mode.
3437
+ */
3438
+ name?: string;
3439
+ /**
3440
+ * - Indicates if the sub payment mode is enabled.
3441
+ */
3442
+ is_active?: boolean;
3443
+ /**
3444
+ * - Indicates if the sub payment mode is
3445
+ * active at payment gateway.
3446
+ */
3447
+ is_active_at_pg?: boolean;
3448
+ /**
3449
+ * - Display priority for the sub payment mode.
3450
+ * Lower numbers indicate higher priority.
3451
+ */
3452
+ priority?: number;
3453
+ logos?: PlatformLogoSet;
3454
+ };
3113
3455
  /** @returns {MerchnatPaymentModeCreation} */
3114
3456
  declare function MerchnatPaymentModeCreation(): MerchnatPaymentModeCreation;
3115
3457
  type MerchnatPaymentModeCreation = {
@@ -4221,3 +4563,16 @@ type ValidateCustomerCreditSchema = {
4221
4563
  cart_id?: string;
4222
4564
  account?: CreditAccountSummary;
4223
4565
  };
4566
+ /** @returns {OperationResponseSchema} */
4567
+ declare function OperationResponseSchema(): OperationResponseSchema;
4568
+ type OperationResponseSchema = {
4569
+ /**
4570
+ * - Indicates if the operation was successful
4571
+ */
4572
+ success: boolean;
4573
+ /**
4574
+ * - Optional message providing additional
4575
+ * information about the operation
4576
+ */
4577
+ message?: string;
4578
+ };
@@ -1,5 +1,21 @@
1
1
  const Joi = require("joi");
2
2
 
3
+ /**
4
+ * @typedef AggregatorToken
5
+ * @property {number} payment_mode_id - Payment mode identifier Supported values are:
6
+ *
7
+ * - **4**: Wallet
8
+ * - **3**: Net Banking
9
+ * - **2**: Card
10
+ * - **1**: Pay Later
11
+ *
12
+ * @property {string} sub_payment_mode_code - Sub-payment method code
13
+ * @property {string} token - Token value to be saved for the aggregator
14
+ * @property {string} status - Status of the token verification
15
+ * @property {boolean} is_active - Enable or Disable Flag
16
+ * @property {string} domain - Name of domain
17
+ */
18
+
3
19
  /**
4
20
  * @typedef PaymentGatewayConfigDetails
5
21
  * @property {Object[]} [aggregators] - List of all config specific to the
@@ -824,6 +840,100 @@ const Joi = require("joi");
824
840
  * @property {boolean} success - Response is successful or not.
825
841
  */
826
842
 
843
+ /**
844
+ * @typedef PaymentModeConfig
845
+ * @property {string} [business_unit] - Business unit for which the configuration applies.
846
+ * @property {string} [device] - Device type for which the configuration applies.
847
+ * @property {boolean} [is_active] - Indicates if the payment configuration is
848
+ * currently active.
849
+ * @property {PaymentModeItems[]} [items] - List of payment modes available for
850
+ * the given business unit and device. This list is dynamic and can contain
851
+ * one or more payment modes.
852
+ */
853
+
854
+ /**
855
+ * @typedef PaymentModeItems
856
+ * @property {number} [id] - Unique identifier for the payment mode.
857
+ * @property {string} [name] - Display name of the payment mode.
858
+ * @property {string} [short_code] - Short code for the payment mode.
859
+ * @property {LogoSet} [logos]
860
+ * @property {boolean} [is_active] - Indicates if this payment mode is active in
861
+ * the system.
862
+ * @property {SubPaymentMode[]} [sub_payment_mode] - Dynamic list of sub-payment
863
+ * modes under this payment mode.
864
+ * @property {boolean} [is_active_at_pg] - Indicates if this payment mode is
865
+ * active at the payment gateway (PG) side.
866
+ * @property {Object} [fulfillment_options] - Fulfillment options applicable for
867
+ * these payment modes. Keys are option slugs and values indicate whether the
868
+ * option is enabled.
869
+ */
870
+
871
+ /**
872
+ * @typedef SubPaymentMode
873
+ * @property {string} [code] - Unique code of the sub-payment mode.
874
+ * @property {boolean} [is_active] - Indicates if this sub-payment mode is
875
+ * active in the system.
876
+ * @property {number} [priority] - Priority used for ordering in UI. Lower
877
+ * numbers can represent higher priority, depending on implementation.
878
+ * @property {LogoSet} [logos]
879
+ * @property {string} [name] - Human-readable name of the sub-payment mode.
880
+ * @property {boolean} [is_active_at_pg] - Indicates if this sub-payment mode is
881
+ * active at the payment gateway (PG) side.
882
+ */
883
+
884
+ /**
885
+ * @typedef LogoSet
886
+ * @property {string} [large] - URL of the large-sized logo.
887
+ * @property {string} [small] - URL of the small-sized logo.
888
+ */
889
+
890
+ /**
891
+ * @typedef PlatformLogoSet
892
+ * @property {string} [large] - URL of the large-sized logo.
893
+ * @property {string} [small] - URL of the small-sized logo.
894
+ */
895
+
896
+ /**
897
+ * @typedef PlatformConfigPaymentModeDetails
898
+ * @property {string} [business_unit] - Business unit for which the
899
+ * configuration applies (e.g. "storefront", "pos").
900
+ * @property {string} [device] - Device or channel for which the configuration
901
+ * applies (e.g. "desktop", "android", "ios").
902
+ * @property {Object} [fulfillment_options] - Fulfillment options applicable for
903
+ * these payment modes. Keys are option slugs (e.g. "self-pickup", "delivery")
904
+ * and values indicate whether the option is enabled.
905
+ * @property {boolean} [is_active] - Overall active status for this aggregator
906
+ * payment configuration for the given application and device.
907
+ * @property {PlatformPaymentModeItem[]} [items] - List of payment modes and
908
+ * their configuration.
909
+ */
910
+
911
+ /**
912
+ * @typedef PlatformPaymentModeItem
913
+ * @property {number} [id] - Unique identifier of the payment mode.
914
+ * @property {string} [name] - Human readable name of the payment mode.
915
+ * @property {string} [short_code] - Short code representing the payment mode.
916
+ * @property {PlatformLogoSet} [logos]
917
+ * @property {boolean} [is_active] - Indicates if the payment mode is enabled on
918
+ * the platform.
919
+ * @property {boolean} [is_active_at_pg] - Indicates if the payment mode is
920
+ * active at the payment gateway.
921
+ * @property {PlatformSubPaymentMode[]} [sub_payment_mode] - List of sub payment
922
+ * modes (e.g. card networks like VISA, MASTERCARD).
923
+ */
924
+
925
+ /**
926
+ * @typedef PlatformSubPaymentMode
927
+ * @property {string} [code] - Code of the sub payment mode (e.g. "VISA", "AMEX").
928
+ * @property {string} [name] - Human readable name of the sub payment mode.
929
+ * @property {boolean} [is_active] - Indicates if the sub payment mode is enabled.
930
+ * @property {boolean} [is_active_at_pg] - Indicates if the sub payment mode is
931
+ * active at payment gateway.
932
+ * @property {number} [priority] - Display priority for the sub payment mode.
933
+ * Lower numbers indicate higher priority.
934
+ * @property {PlatformLogoSet} [logos]
935
+ */
936
+
827
937
  /**
828
938
  * @typedef MerchnatPaymentModeCreation
829
939
  * @property {Object} [offline] - Details to be updated for online payment configuration.
@@ -1293,7 +1403,26 @@ const Joi = require("joi");
1293
1403
  * @property {CreditAccountSummary} [account]
1294
1404
  */
1295
1405
 
1406
+ /**
1407
+ * @typedef OperationResponseSchema
1408
+ * @property {boolean} success - Indicates if the operation was successful
1409
+ * @property {string} [message] - Optional message providing additional
1410
+ * information about the operation
1411
+ */
1412
+
1296
1413
  class PaymentPlatformModel {
1414
+ /** @returns {AggregatorToken} */
1415
+ static AggregatorToken() {
1416
+ return Joi.object({
1417
+ payment_mode_id: Joi.number().required(),
1418
+ sub_payment_mode_code: Joi.string().allow("").required(),
1419
+ token: Joi.string().allow("").required(),
1420
+ status: Joi.string().allow("").required(),
1421
+ is_active: Joi.boolean().required(),
1422
+ domain: Joi.string().allow("").required(),
1423
+ });
1424
+ }
1425
+
1297
1426
  /** @returns {PaymentGatewayConfigDetails} */
1298
1427
  static PaymentGatewayConfigDetails() {
1299
1428
  return Joi.object({
@@ -2305,6 +2434,98 @@ class PaymentPlatformModel {
2305
2434
  });
2306
2435
  }
2307
2436
 
2437
+ /** @returns {PaymentModeConfig} */
2438
+ static PaymentModeConfig() {
2439
+ return Joi.object({
2440
+ business_unit: Joi.string().allow(""),
2441
+ device: Joi.string().allow(""),
2442
+ is_active: Joi.boolean(),
2443
+ items: Joi.array().items(PaymentPlatformModel.PaymentModeItems()),
2444
+ });
2445
+ }
2446
+
2447
+ /** @returns {PaymentModeItems} */
2448
+ static PaymentModeItems() {
2449
+ return Joi.object({
2450
+ id: Joi.number(),
2451
+ name: Joi.string().allow(""),
2452
+ short_code: Joi.string().allow(""),
2453
+ logos: PaymentPlatformModel.LogoSet(),
2454
+ is_active: Joi.boolean(),
2455
+ sub_payment_mode: Joi.array().items(
2456
+ PaymentPlatformModel.SubPaymentMode()
2457
+ ),
2458
+ is_active_at_pg: Joi.boolean(),
2459
+ fulfillment_options: Joi.object().pattern(/\S/, Joi.any()),
2460
+ });
2461
+ }
2462
+
2463
+ /** @returns {SubPaymentMode} */
2464
+ static SubPaymentMode() {
2465
+ return Joi.object({
2466
+ code: Joi.string().allow(""),
2467
+ is_active: Joi.boolean(),
2468
+ priority: Joi.number(),
2469
+ logos: PaymentPlatformModel.LogoSet(),
2470
+ name: Joi.string().allow(""),
2471
+ is_active_at_pg: Joi.boolean(),
2472
+ });
2473
+ }
2474
+
2475
+ /** @returns {LogoSet} */
2476
+ static LogoSet() {
2477
+ return Joi.object({
2478
+ large: Joi.string().allow(""),
2479
+ small: Joi.string().allow(""),
2480
+ });
2481
+ }
2482
+
2483
+ /** @returns {PlatformLogoSet} */
2484
+ static PlatformLogoSet() {
2485
+ return Joi.object({
2486
+ large: Joi.string().allow(""),
2487
+ small: Joi.string().allow(""),
2488
+ });
2489
+ }
2490
+
2491
+ /** @returns {PlatformConfigPaymentModeDetails} */
2492
+ static PlatformConfigPaymentModeDetails() {
2493
+ return Joi.object({
2494
+ business_unit: Joi.string().allow(""),
2495
+ device: Joi.string().allow(""),
2496
+ fulfillment_options: Joi.object().pattern(/\S/, Joi.any()),
2497
+ is_active: Joi.boolean(),
2498
+ items: Joi.array().items(PaymentPlatformModel.PlatformPaymentModeItem()),
2499
+ });
2500
+ }
2501
+
2502
+ /** @returns {PlatformPaymentModeItem} */
2503
+ static PlatformPaymentModeItem() {
2504
+ return Joi.object({
2505
+ id: Joi.number(),
2506
+ name: Joi.string().allow(""),
2507
+ short_code: Joi.string().allow(""),
2508
+ logos: PaymentPlatformModel.PlatformLogoSet(),
2509
+ is_active: Joi.boolean(),
2510
+ is_active_at_pg: Joi.boolean(),
2511
+ sub_payment_mode: Joi.array().items(
2512
+ PaymentPlatformModel.PlatformSubPaymentMode()
2513
+ ),
2514
+ });
2515
+ }
2516
+
2517
+ /** @returns {PlatformSubPaymentMode} */
2518
+ static PlatformSubPaymentMode() {
2519
+ return Joi.object({
2520
+ code: Joi.string().allow(""),
2521
+ name: Joi.string().allow(""),
2522
+ is_active: Joi.boolean(),
2523
+ is_active_at_pg: Joi.boolean(),
2524
+ priority: Joi.number(),
2525
+ logos: PaymentPlatformModel.PlatformLogoSet(),
2526
+ });
2527
+ }
2528
+
2308
2529
  /** @returns {MerchnatPaymentModeCreation} */
2309
2530
  static MerchnatPaymentModeCreation() {
2310
2531
  return Joi.object({
@@ -2831,5 +3052,13 @@ class PaymentPlatformModel {
2831
3052
  account: PaymentPlatformModel.CreditAccountSummary(),
2832
3053
  });
2833
3054
  }
3055
+
3056
+ /** @returns {OperationResponseSchema} */
3057
+ static OperationResponseSchema() {
3058
+ return Joi.object({
3059
+ success: Joi.boolean().required(),
3060
+ message: Joi.string().allow(""),
3061
+ });
3062
+ }
2834
3063
  }
2835
3064
  module.exports = PaymentPlatformModel;
@@ -603,7 +603,8 @@ export = ThemePlatformModel;
603
603
  * | "order-status"
604
604
  * | "locate-us"
605
605
  * | "single-page-checkout"
606
- * | "request-reattempt"} PageType
606
+ * | "request-reattempt"
607
+ * | "files"} PageType
607
608
  */
608
609
  declare class ThemePlatformModel {
609
610
  }
@@ -1666,4 +1667,4 @@ type ActionPage = {
1666
1667
  * @returns {PageType}
1667
1668
  */
1668
1669
  declare function PageType(): PageType;
1669
- type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-email" | "profile-phone" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us" | "single-page-checkout" | "request-reattempt";
1670
+ type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-email" | "profile-phone" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us" | "single-page-checkout" | "request-reattempt" | "files";
@@ -686,7 +686,8 @@ const Joi = require("joi");
686
686
  * | "order-status"
687
687
  * | "locate-us"
688
688
  * | "single-page-checkout"
689
- * | "request-reattempt"} PageType
689
+ * | "request-reattempt"
690
+ * | "files"} PageType
690
691
  */
691
692
 
692
693
  class ThemePlatformModel {
@@ -1598,7 +1599,9 @@ class ThemePlatformModel {
1598
1599
 
1599
1600
  "single-page-checkout",
1600
1601
 
1601
- "request-reattempt"
1602
+ "request-reattempt",
1603
+
1604
+ "files"
1602
1605
  );
1603
1606
  }
1604
1607
  }