@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
|
@@ -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
|
|
@@ -388,16 +404,18 @@ const Joi = require("joi");
|
|
|
388
404
|
|
|
389
405
|
/**
|
|
390
406
|
* @typedef BankDetailsForOTP
|
|
391
|
-
* @property {string} ifsc_code - IFSC code of account
|
|
392
|
-
* @property {string} account_no - Account number
|
|
393
|
-
* @property {string} branch_name - Branch name of account
|
|
394
|
-
* @property {string} bank_name - Bank name of account
|
|
395
|
-
* @property {string} account_holder - Accountg holder name of account
|
|
407
|
+
* @property {string} [ifsc_code] - IFSC code of account
|
|
408
|
+
* @property {string} [account_no] - Account number
|
|
409
|
+
* @property {string} [branch_name] - Branch name of account
|
|
410
|
+
* @property {string} [bank_name] - Bank name of account
|
|
411
|
+
* @property {string} [account_holder] - Accountg holder name of account
|
|
412
|
+
* @property {string} [upi] - UPI ID of account holder
|
|
396
413
|
*/
|
|
397
414
|
|
|
398
415
|
/**
|
|
399
416
|
* @typedef AddBeneficiaryDetailsOTPCreation
|
|
400
417
|
* @property {string} order_id - Order_id for which account will be added
|
|
418
|
+
* @property {string} [shipment_id] - Shipment_id for which account will be added
|
|
401
419
|
* @property {BankDetailsForOTP} details
|
|
402
420
|
*/
|
|
403
421
|
|
|
@@ -822,6 +840,100 @@ const Joi = require("joi");
|
|
|
822
840
|
* @property {boolean} success - Response is successful or not.
|
|
823
841
|
*/
|
|
824
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
|
+
|
|
825
937
|
/**
|
|
826
938
|
* @typedef MerchnatPaymentModeCreation
|
|
827
939
|
* @property {Object} [offline] - Details to be updated for online payment configuration.
|
|
@@ -1291,7 +1403,26 @@ const Joi = require("joi");
|
|
|
1291
1403
|
* @property {CreditAccountSummary} [account]
|
|
1292
1404
|
*/
|
|
1293
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
|
+
|
|
1294
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
|
+
|
|
1295
1426
|
/** @returns {PaymentGatewayConfigDetails} */
|
|
1296
1427
|
static PaymentGatewayConfigDetails() {
|
|
1297
1428
|
return Joi.object({
|
|
@@ -1778,11 +1909,12 @@ class PaymentPlatformModel {
|
|
|
1778
1909
|
/** @returns {BankDetailsForOTP} */
|
|
1779
1910
|
static BankDetailsForOTP() {
|
|
1780
1911
|
return Joi.object({
|
|
1781
|
-
ifsc_code: Joi.string().allow("")
|
|
1782
|
-
account_no: Joi.string().allow("")
|
|
1783
|
-
branch_name: Joi.string().allow("")
|
|
1784
|
-
bank_name: Joi.string().allow("")
|
|
1785
|
-
account_holder: Joi.string().allow("")
|
|
1912
|
+
ifsc_code: Joi.string().allow(""),
|
|
1913
|
+
account_no: Joi.string().allow(""),
|
|
1914
|
+
branch_name: Joi.string().allow(""),
|
|
1915
|
+
bank_name: Joi.string().allow(""),
|
|
1916
|
+
account_holder: Joi.string().allow(""),
|
|
1917
|
+
upi: Joi.string().allow("").allow(null),
|
|
1786
1918
|
});
|
|
1787
1919
|
}
|
|
1788
1920
|
|
|
@@ -1790,6 +1922,7 @@ class PaymentPlatformModel {
|
|
|
1790
1922
|
static AddBeneficiaryDetailsOTPCreation() {
|
|
1791
1923
|
return Joi.object({
|
|
1792
1924
|
order_id: Joi.string().allow("").required(),
|
|
1925
|
+
shipment_id: Joi.string().allow(""),
|
|
1793
1926
|
details: PaymentPlatformModel.BankDetailsForOTP().required(),
|
|
1794
1927
|
});
|
|
1795
1928
|
}
|
|
@@ -2301,6 +2434,98 @@ class PaymentPlatformModel {
|
|
|
2301
2434
|
});
|
|
2302
2435
|
}
|
|
2303
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
|
+
|
|
2304
2529
|
/** @returns {MerchnatPaymentModeCreation} */
|
|
2305
2530
|
static MerchnatPaymentModeCreation() {
|
|
2306
2531
|
return Joi.object({
|
|
@@ -2827,5 +3052,13 @@ class PaymentPlatformModel {
|
|
|
2827
3052
|
account: PaymentPlatformModel.CreditAccountSummary(),
|
|
2828
3053
|
});
|
|
2829
3054
|
}
|
|
3055
|
+
|
|
3056
|
+
/** @returns {OperationResponseSchema} */
|
|
3057
|
+
static OperationResponseSchema() {
|
|
3058
|
+
return Joi.object({
|
|
3059
|
+
success: Joi.boolean().required(),
|
|
3060
|
+
message: Joi.string().allow(""),
|
|
3061
|
+
});
|
|
3062
|
+
}
|
|
2830
3063
|
}
|
|
2831
3064
|
module.exports = PaymentPlatformModel;
|
|
@@ -27,7 +27,6 @@ declare class PlatformApplicationClient {
|
|
|
27
27
|
order: Order;
|
|
28
28
|
partner: Partner;
|
|
29
29
|
payment: Payment;
|
|
30
|
-
rewards: Rewards;
|
|
31
30
|
share: Share;
|
|
32
31
|
theme: Theme;
|
|
33
32
|
user: User;
|
|
@@ -51,7 +50,6 @@ import Serviceability = require("./Serviceability/ServiceabilityPlatformApplicat
|
|
|
51
50
|
import Order = require("./Order/OrderPlatformApplicationClient");
|
|
52
51
|
import Partner = require("./Partner/PartnerPlatformApplicationClient");
|
|
53
52
|
import Payment = require("./Payment/PaymentPlatformApplicationClient");
|
|
54
|
-
import Rewards = require("./Rewards/RewardsPlatformApplicationClient");
|
|
55
53
|
import Share = require("./Share/SharePlatformApplicationClient");
|
|
56
54
|
import Theme = require("./Theme/ThemePlatformApplicationClient");
|
|
57
55
|
import User = require("./User/UserPlatformApplicationClient");
|
|
@@ -22,8 +22,6 @@ const Partner = require("./Partner/PartnerPlatformApplicationClient");
|
|
|
22
22
|
|
|
23
23
|
const Payment = require("./Payment/PaymentPlatformApplicationClient");
|
|
24
24
|
|
|
25
|
-
const Rewards = require("./Rewards/RewardsPlatformApplicationClient");
|
|
26
|
-
|
|
27
25
|
const Share = require("./Share/SharePlatformApplicationClient");
|
|
28
26
|
|
|
29
27
|
const Theme = require("./Theme/ThemePlatformApplicationClient");
|
|
@@ -73,8 +71,6 @@ class PlatformApplicationClient {
|
|
|
73
71
|
|
|
74
72
|
this.payment = new Payment(config, applicationId);
|
|
75
73
|
|
|
76
|
-
this.rewards = new Rewards(config, applicationId);
|
|
77
|
-
|
|
78
74
|
this.share = new Share(config, applicationId);
|
|
79
75
|
|
|
80
76
|
this.theme = new Theme(config, applicationId);
|
|
@@ -450,19 +450,6 @@ declare class Serviceability {
|
|
|
450
450
|
* @description: Updates the details of an existing fulfillment option for the specified company and application - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/putFulfillmentOption/).
|
|
451
451
|
*/
|
|
452
452
|
putFulfillmentOption({ slug, body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.PutFulfillmentOptionParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.FulfillmentOption>;
|
|
453
|
-
/**
|
|
454
|
-
* @param {ServiceabilityPlatformApplicationValidator.UpdateApplicationConfigurationParam} arg
|
|
455
|
-
* - Arg object
|
|
456
|
-
*
|
|
457
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
458
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
459
|
-
* @returns {Promise<ServiceabilityPlatformModel.ApplicationConfigPut>} -
|
|
460
|
-
* Success response
|
|
461
|
-
* @name updateApplicationConfiguration
|
|
462
|
-
* @summary: Apply configuration to an application
|
|
463
|
-
* @description: Apply configuration to application to set DP rules and Zone configuration - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateApplicationConfiguration/).
|
|
464
|
-
*/
|
|
465
|
-
updateApplicationConfiguration({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateApplicationConfigurationParam, { responseHeaders }?: object): Promise<ServiceabilityPlatformModel.ApplicationConfigPut>;
|
|
466
453
|
/**
|
|
467
454
|
* @param {ServiceabilityPlatformApplicationValidator.UpdateBulkGeoAreaParam} arg
|
|
468
455
|
* - Arg object
|
|
@@ -2917,88 +2917,6 @@ class Serviceability {
|
|
|
2917
2917
|
return response;
|
|
2918
2918
|
}
|
|
2919
2919
|
|
|
2920
|
-
/**
|
|
2921
|
-
* @param {ServiceabilityPlatformApplicationValidator.UpdateApplicationConfigurationParam} arg
|
|
2922
|
-
* - Arg object
|
|
2923
|
-
*
|
|
2924
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2925
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2926
|
-
* @returns {Promise<ServiceabilityPlatformModel.ApplicationConfigPut>} -
|
|
2927
|
-
* Success response
|
|
2928
|
-
* @name updateApplicationConfiguration
|
|
2929
|
-
* @summary: Apply configuration to an application
|
|
2930
|
-
* @description: Apply configuration to application to set DP rules and Zone configuration - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/serviceability/updateApplicationConfiguration/).
|
|
2931
|
-
*/
|
|
2932
|
-
async updateApplicationConfiguration(
|
|
2933
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
2934
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
2935
|
-
) {
|
|
2936
|
-
const {
|
|
2937
|
-
error,
|
|
2938
|
-
} = ServiceabilityPlatformApplicationValidator.updateApplicationConfiguration().validate(
|
|
2939
|
-
{
|
|
2940
|
-
body,
|
|
2941
|
-
},
|
|
2942
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2943
|
-
);
|
|
2944
|
-
if (error) {
|
|
2945
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
2946
|
-
}
|
|
2947
|
-
|
|
2948
|
-
// Showing warrnings if extra unknown parameters are found
|
|
2949
|
-
const {
|
|
2950
|
-
error: warrning,
|
|
2951
|
-
} = ServiceabilityPlatformApplicationValidator.updateApplicationConfiguration().validate(
|
|
2952
|
-
{
|
|
2953
|
-
body,
|
|
2954
|
-
},
|
|
2955
|
-
{ abortEarly: false, allowUnknown: false }
|
|
2956
|
-
);
|
|
2957
|
-
if (warrning) {
|
|
2958
|
-
Logger({
|
|
2959
|
-
level: "WARN",
|
|
2960
|
-
message: `Parameter Validation warrnings for platform > Serviceability > updateApplicationConfiguration \n ${warrning}`,
|
|
2961
|
-
});
|
|
2962
|
-
}
|
|
2963
|
-
|
|
2964
|
-
const query_params = {};
|
|
2965
|
-
|
|
2966
|
-
const response = await PlatformAPIClient.execute(
|
|
2967
|
-
this.config,
|
|
2968
|
-
"put",
|
|
2969
|
-
`/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
|
|
2970
|
-
query_params,
|
|
2971
|
-
body,
|
|
2972
|
-
requestHeaders,
|
|
2973
|
-
{ responseHeaders }
|
|
2974
|
-
);
|
|
2975
|
-
|
|
2976
|
-
let responseData = response;
|
|
2977
|
-
if (responseHeaders) {
|
|
2978
|
-
responseData = response[0];
|
|
2979
|
-
}
|
|
2980
|
-
|
|
2981
|
-
const {
|
|
2982
|
-
error: res_error,
|
|
2983
|
-
} = ServiceabilityPlatformModel.ApplicationConfigPut().validate(
|
|
2984
|
-
responseData,
|
|
2985
|
-
{ abortEarly: false, allowUnknown: true }
|
|
2986
|
-
);
|
|
2987
|
-
|
|
2988
|
-
if (res_error) {
|
|
2989
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
2990
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
2991
|
-
} else {
|
|
2992
|
-
Logger({
|
|
2993
|
-
level: "WARN",
|
|
2994
|
-
message: `Response Validation Warnings for platform > Serviceability > updateApplicationConfiguration \n ${res_error}`,
|
|
2995
|
-
});
|
|
2996
|
-
}
|
|
2997
|
-
}
|
|
2998
|
-
|
|
2999
|
-
return response;
|
|
3000
|
-
}
|
|
3001
|
-
|
|
3002
2920
|
/**
|
|
3003
2921
|
* @param {ServiceabilityPlatformApplicationValidator.UpdateBulkGeoAreaParam} arg
|
|
3004
2922
|
* - Arg object
|
|
@@ -164,10 +164,6 @@ export = ServiceabilityPlatformApplicationValidator;
|
|
|
164
164
|
* @property {string} slug - Slug of the fulfillment option for retrieving details.
|
|
165
165
|
* @property {ServiceabilityPlatformModel.FulfillmentOption} body
|
|
166
166
|
*/
|
|
167
|
-
/**
|
|
168
|
-
* @typedef UpdateApplicationConfigurationParam
|
|
169
|
-
* @property {ServiceabilityPlatformModel.ApplicationConfigPutDetail} body
|
|
170
|
-
*/
|
|
171
167
|
/**
|
|
172
168
|
* @typedef UpdateBulkGeoAreaParam
|
|
173
169
|
* @property {string} geoareaId - A unique identifier for the GeoArea.
|
|
@@ -304,8 +300,6 @@ declare class ServiceabilityPlatformApplicationValidator {
|
|
|
304
300
|
static patchApplicationConfiguration(): PatchApplicationConfigurationParam;
|
|
305
301
|
/** @returns {PutFulfillmentOptionParam} */
|
|
306
302
|
static putFulfillmentOption(): PutFulfillmentOptionParam;
|
|
307
|
-
/** @returns {UpdateApplicationConfigurationParam} */
|
|
308
|
-
static updateApplicationConfiguration(): UpdateApplicationConfigurationParam;
|
|
309
303
|
/** @returns {UpdateBulkGeoAreaParam} */
|
|
310
304
|
static updateBulkGeoArea(): UpdateBulkGeoAreaParam;
|
|
311
305
|
/** @returns {UpdateCourierPartnerRulePriorityParam} */
|
|
@@ -336,7 +330,7 @@ declare class ServiceabilityPlatformApplicationValidator {
|
|
|
336
330
|
static validateBulkFulfillmentOptions(): ValidateBulkFulfillmentOptionsParam;
|
|
337
331
|
}
|
|
338
332
|
declare namespace ServiceabilityPlatformApplicationValidator {
|
|
339
|
-
export { CreateBulkExportParam, CreateBulkGeoAreaParam, CreateCourierPartnerRuleParam, CreateFulfillmentOptionParam, CreateGeoAreaParam, CreateGeoAreaExportJobParam, CreateShipmentsParam, CreateStoreRulesParam, CreateZoneParam, DeleteFulfillmentOptionsParam, DeleteZoneParam, DownloadGeoareaSampleFileParam, GetApplicationConfigParam, GetApplicationConfigurationParam, GetBulkExportParam, GetBulkFulfillmentValidationStatusParam, GetBulkGeoAreaParam, GetCourierPartnerRuleParam, GetCourierPartnerRulesParam, GetCourierPartnersParam, GetFulfillmentOptionProductsParam, GetFulfillmentOptionStoresParam, GetFulfillmentOptionsParam, GetFulfillmentOptionsListParam, GetGeoAreaParam, GetGeoAreaExportJobStatusParam, GetGeoAreasParam, GetStoreRuleParam, GetStoreRulesParam, GetZoneParam, GetZonesParam, InsertApplicationConfigParam, PatchApplicationConfigurationParam, PutFulfillmentOptionParam,
|
|
333
|
+
export { CreateBulkExportParam, CreateBulkGeoAreaParam, CreateCourierPartnerRuleParam, CreateFulfillmentOptionParam, CreateGeoAreaParam, CreateGeoAreaExportJobParam, CreateShipmentsParam, CreateStoreRulesParam, CreateZoneParam, DeleteFulfillmentOptionsParam, DeleteZoneParam, DownloadGeoareaSampleFileParam, GetApplicationConfigParam, GetApplicationConfigurationParam, GetBulkExportParam, GetBulkFulfillmentValidationStatusParam, GetBulkGeoAreaParam, GetCourierPartnerRuleParam, GetCourierPartnerRulesParam, GetCourierPartnersParam, GetFulfillmentOptionProductsParam, GetFulfillmentOptionStoresParam, GetFulfillmentOptionsParam, GetFulfillmentOptionsListParam, GetGeoAreaParam, GetGeoAreaExportJobStatusParam, GetGeoAreasParam, GetStoreRuleParam, GetStoreRulesParam, GetZoneParam, GetZonesParam, InsertApplicationConfigParam, PatchApplicationConfigurationParam, PutFulfillmentOptionParam, UpdateBulkGeoAreaParam, UpdateCourierPartnerRulePriorityParam, UpdateCourierRuleParam, UpdateGeoAreaParam, UpdatePincodeAuditHistoryParam, UpdatePincodeBulkViewParam, UpdatePincodeCoDListingParam, UpdatePincodeMopViewParam, UpdateStoreRulePriorityParam, UpdateStoreRulesParam, UpdateStoreRulesConfigParam, UpdateZoneParam, UploadBulkFulfillmentOptionsParam, ValidateBulkFulfillmentOptionsParam };
|
|
340
334
|
}
|
|
341
335
|
type CreateBulkExportParam = {
|
|
342
336
|
body: ServiceabilityPlatformModel.BulkCreateZoneExport;
|
|
@@ -622,9 +616,6 @@ type PutFulfillmentOptionParam = {
|
|
|
622
616
|
slug: string;
|
|
623
617
|
body: ServiceabilityPlatformModel.FulfillmentOption;
|
|
624
618
|
};
|
|
625
|
-
type UpdateApplicationConfigurationParam = {
|
|
626
|
-
body: ServiceabilityPlatformModel.ApplicationConfigPutDetail;
|
|
627
|
-
};
|
|
628
619
|
type UpdateBulkGeoAreaParam = {
|
|
629
620
|
/**
|
|
630
621
|
* - A unique identifier for the GeoArea.
|
|
@@ -201,11 +201,6 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel");
|
|
|
201
201
|
* @property {ServiceabilityPlatformModel.FulfillmentOption} body
|
|
202
202
|
*/
|
|
203
203
|
|
|
204
|
-
/**
|
|
205
|
-
* @typedef UpdateApplicationConfigurationParam
|
|
206
|
-
* @property {ServiceabilityPlatformModel.ApplicationConfigPutDetail} body
|
|
207
|
-
*/
|
|
208
|
-
|
|
209
204
|
/**
|
|
210
205
|
* @typedef UpdateBulkGeoAreaParam
|
|
211
206
|
* @property {string} geoareaId - A unique identifier for the GeoArea.
|
|
@@ -553,13 +548,6 @@ class ServiceabilityPlatformApplicationValidator {
|
|
|
553
548
|
}).required();
|
|
554
549
|
}
|
|
555
550
|
|
|
556
|
-
/** @returns {UpdateApplicationConfigurationParam} */
|
|
557
|
-
static updateApplicationConfiguration() {
|
|
558
|
-
return Joi.object({
|
|
559
|
-
body: ServiceabilityPlatformModel.ApplicationConfigPutDetail().required(),
|
|
560
|
-
}).required();
|
|
561
|
-
}
|
|
562
|
-
|
|
563
551
|
/** @returns {UpdateBulkGeoAreaParam} */
|
|
564
552
|
static updateBulkGeoArea() {
|
|
565
553
|
return Joi.object({
|