@gofynd/fdk-client-javascript 3.4.1 → 3.4.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.
@@ -114,9 +114,8 @@ export = PaymentPlatformApplicationValidator;
114
114
  */
115
115
  /**
116
116
  * @typedef GetPosPaymentModeRoutesParam
117
- * @property {PaymentPlatformModel.OrderingSource} [xOrderingSource] - Optional
118
- * header to identify the ordering source used to determine\ applicable
119
- * payment options for business unit.
117
+ * @property {string} [xOrderingSource] - Optional header to identify the
118
+ * ordering source used to determine\ applicable payment options for business unit.
120
119
  * @property {number} amount - Payable amount.
121
120
  * @property {string} [cartId] - Identifier of the cart.
122
121
  * @property {string} pincode - The PIN Code of the destination address, e.g. 400059
@@ -496,11 +495,10 @@ type GetPaymentSessionParam = {
496
495
  };
497
496
  type GetPosPaymentModeRoutesParam = {
498
497
  /**
499
- * - Optional
500
- * header to identify the ordering source used to determine\ applicable
501
- * payment options for business unit.
498
+ * - Optional header to identify the
499
+ * ordering source used to determine\ applicable payment options for business unit.
502
500
  */
503
- xOrderingSource?: PaymentPlatformModel.OrderingSource;
501
+ xOrderingSource?: string;
504
502
  /**
505
503
  * - Payable amount.
506
504
  */
@@ -142,9 +142,8 @@ const PaymentPlatformModel = require("./PaymentPlatformModel");
142
142
 
143
143
  /**
144
144
  * @typedef GetPosPaymentModeRoutesParam
145
- * @property {PaymentPlatformModel.OrderingSource} [xOrderingSource] - Optional
146
- * header to identify the ordering source used to determine\ applicable
147
- * payment options for business unit.
145
+ * @property {string} [xOrderingSource] - Optional header to identify the
146
+ * ordering source used to determine\ applicable payment options for business unit.
148
147
  * @property {number} amount - Payable amount.
149
148
  * @property {string} [cartId] - Identifier of the cart.
150
149
  * @property {string} pincode - The PIN Code of the destination address, e.g. 400059
@@ -493,7 +492,7 @@ class PaymentPlatformApplicationValidator {
493
492
  /** @returns {GetPosPaymentModeRoutesParam} */
494
493
  static getPosPaymentModeRoutes() {
495
494
  return Joi.object({
496
- xOrderingSource: PaymentPlatformModel.OrderingSource(),
495
+ xOrderingSource: Joi.string().allow(""),
497
496
 
498
497
  amount: Joi.number().required(),
499
498
  cartId: Joi.string().allow(""),
@@ -1290,99 +1290,10 @@ export = PaymentPlatformModel;
1290
1290
  * @property {string} [cart_id] - Unique identifier for the shopping cart.
1291
1291
  * @property {CreditAccountSummary} [account]
1292
1292
  */
1293
- /**
1294
- * @typedef {| "storefront"
1295
- * | "store_os_pos"
1296
- * | "kiosk"
1297
- * | "scan_go"
1298
- * | "smart_trolley"
1299
- * | "gofynd"
1300
- * | "uniket"
1301
- * | "marketplace"
1302
- * | "social_commerce"
1303
- * | "ondc"
1304
- * | "nexus"
1305
- * | "nykaa_fashion"
1306
- * | "etsy"
1307
- * | "vuivui"
1308
- * | "zilingo"
1309
- * | "firstcry"
1310
- * | "bukalapak"
1311
- * | "myntra_ppmp"
1312
- * | "lazada"
1313
- * | "tiktok"
1314
- * | "sfcc"
1315
- * | "debenhams"
1316
- * | "prestomall"
1317
- * | "meesho"
1318
- * | "amazon_vdf"
1319
- * | "bigcommerce"
1320
- * | "sendo"
1321
- * | "storehippo"
1322
- * | "cdiscount"
1323
- * | "nykaa"
1324
- * | "trendyol"
1325
- * | "weloveshopping"
1326
- * | "jollee"
1327
- * | "wish"
1328
- * | "tiki"
1329
- * | "central_online"
1330
- * | "q10"
1331
- * | "cred"
1332
- * | "walmart"
1333
- * | "snapdeal"
1334
- * | "flipkart"
1335
- * | "blibli"
1336
- * | "ajio_jit"
1337
- * | "pharmeasy"
1338
- * | "ezmall"
1339
- * | "adobe_commerce"
1340
- * | "kartmax"
1341
- * | "shopee"
1342
- * | "zalora"
1343
- * | "prestashop"
1344
- * | "smytten"
1345
- * | "amazon_sc"
1346
- * | "urbanpiper"
1347
- * | "flipkart_quick"
1348
- * | "woocommerce"
1349
- * | "zivame"
1350
- * | "lelong"
1351
- * | "facebook"
1352
- * | "jiomart"
1353
- * | "gmc"
1354
- * | "robins"
1355
- * | "akulaku"
1356
- * | "noon"
1357
- * | "tatacliq"
1358
- * | "kartrocket"
1359
- * | "inorbit"
1360
- * | "ajio_business"
1361
- * | "swiggy"
1362
- * | "asos"
1363
- * | "tokopedia"
1364
- * | "limeroad"
1365
- * | "myntra_omni"
1366
- * | "spoyl"
1367
- * | "amazon_mlf"
1368
- * | "fulfilled_by_lazada"
1369
- * | "ebay"
1370
- * | "jd"
1371
- * | "amazon_pharmacy"
1372
- * | "ajio_vms"
1373
- * | "daraz"
1374
- * | "oker"
1375
- * | "flipkart_b2b"
1376
- * | "amazon_mlf_ss"
1377
- * | "woovly"
1378
- * | "tata1mg"
1379
- * | "zomato"
1380
- * | "shopify"} OrderingSource
1381
- */
1382
1293
  declare class PaymentPlatformModel {
1383
1294
  }
1384
1295
  declare namespace PaymentPlatformModel {
1385
- 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, 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, 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, OrderingSource };
1296
+ 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, 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, 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 };
1386
1297
  }
1387
1298
  /** @returns {PaymentGatewayConfigDetails} */
1388
1299
  declare function PaymentGatewayConfigDetails(): PaymentGatewayConfigDetails;
@@ -4781,10 +4692,3 @@ type ValidateCustomerCreditSchema = {
4781
4692
  cart_id?: string;
4782
4693
  account?: CreditAccountSummary;
4783
4694
  };
4784
- /**
4785
- * Enum: OrderingSource Used By: Payment
4786
- *
4787
- * @returns {OrderingSource}
4788
- */
4789
- declare function OrderingSource(): OrderingSource;
4790
- type OrderingSource = "storefront" | "store_os_pos" | "kiosk" | "scan_go" | "smart_trolley" | "gofynd" | "uniket" | "marketplace" | "social_commerce" | "ondc" | "nexus" | "nykaa_fashion" | "etsy" | "vuivui" | "zilingo" | "firstcry" | "bukalapak" | "myntra_ppmp" | "lazada" | "tiktok" | "sfcc" | "debenhams" | "prestomall" | "meesho" | "amazon_vdf" | "bigcommerce" | "sendo" | "storehippo" | "cdiscount" | "nykaa" | "trendyol" | "weloveshopping" | "jollee" | "wish" | "tiki" | "central_online" | "q10" | "cred" | "walmart" | "snapdeal" | "flipkart" | "blibli" | "ajio_jit" | "pharmeasy" | "ezmall" | "adobe_commerce" | "kartmax" | "shopee" | "zalora" | "prestashop" | "smytten" | "amazon_sc" | "urbanpiper" | "flipkart_quick" | "woocommerce" | "zivame" | "lelong" | "facebook" | "jiomart" | "gmc" | "robins" | "akulaku" | "noon" | "tatacliq" | "kartrocket" | "inorbit" | "ajio_business" | "swiggy" | "asos" | "tokopedia" | "limeroad" | "myntra_omni" | "spoyl" | "amazon_mlf" | "fulfilled_by_lazada" | "ebay" | "jd" | "amazon_pharmacy" | "ajio_vms" | "daraz" | "oker" | "flipkart_b2b" | "amazon_mlf_ss" | "woovly" | "tata1mg" | "zomato" | "shopify";
@@ -1441,96 +1441,6 @@ const Joi = require("joi");
1441
1441
  * @property {CreditAccountSummary} [account]
1442
1442
  */
1443
1443
 
1444
- /**
1445
- * @typedef {| "storefront"
1446
- * | "store_os_pos"
1447
- * | "kiosk"
1448
- * | "scan_go"
1449
- * | "smart_trolley"
1450
- * | "gofynd"
1451
- * | "uniket"
1452
- * | "marketplace"
1453
- * | "social_commerce"
1454
- * | "ondc"
1455
- * | "nexus"
1456
- * | "nykaa_fashion"
1457
- * | "etsy"
1458
- * | "vuivui"
1459
- * | "zilingo"
1460
- * | "firstcry"
1461
- * | "bukalapak"
1462
- * | "myntra_ppmp"
1463
- * | "lazada"
1464
- * | "tiktok"
1465
- * | "sfcc"
1466
- * | "debenhams"
1467
- * | "prestomall"
1468
- * | "meesho"
1469
- * | "amazon_vdf"
1470
- * | "bigcommerce"
1471
- * | "sendo"
1472
- * | "storehippo"
1473
- * | "cdiscount"
1474
- * | "nykaa"
1475
- * | "trendyol"
1476
- * | "weloveshopping"
1477
- * | "jollee"
1478
- * | "wish"
1479
- * | "tiki"
1480
- * | "central_online"
1481
- * | "q10"
1482
- * | "cred"
1483
- * | "walmart"
1484
- * | "snapdeal"
1485
- * | "flipkart"
1486
- * | "blibli"
1487
- * | "ajio_jit"
1488
- * | "pharmeasy"
1489
- * | "ezmall"
1490
- * | "adobe_commerce"
1491
- * | "kartmax"
1492
- * | "shopee"
1493
- * | "zalora"
1494
- * | "prestashop"
1495
- * | "smytten"
1496
- * | "amazon_sc"
1497
- * | "urbanpiper"
1498
- * | "flipkart_quick"
1499
- * | "woocommerce"
1500
- * | "zivame"
1501
- * | "lelong"
1502
- * | "facebook"
1503
- * | "jiomart"
1504
- * | "gmc"
1505
- * | "robins"
1506
- * | "akulaku"
1507
- * | "noon"
1508
- * | "tatacliq"
1509
- * | "kartrocket"
1510
- * | "inorbit"
1511
- * | "ajio_business"
1512
- * | "swiggy"
1513
- * | "asos"
1514
- * | "tokopedia"
1515
- * | "limeroad"
1516
- * | "myntra_omni"
1517
- * | "spoyl"
1518
- * | "amazon_mlf"
1519
- * | "fulfilled_by_lazada"
1520
- * | "ebay"
1521
- * | "jd"
1522
- * | "amazon_pharmacy"
1523
- * | "ajio_vms"
1524
- * | "daraz"
1525
- * | "oker"
1526
- * | "flipkart_b2b"
1527
- * | "amazon_mlf_ss"
1528
- * | "woovly"
1529
- * | "tata1mg"
1530
- * | "zomato"
1531
- * | "shopify"} OrderingSource
1532
- */
1533
-
1534
1444
  class PaymentPlatformModel {
1535
1445
  /** @returns {PaymentGatewayConfigDetails} */
1536
1446
  static PaymentGatewayConfigDetails() {
@@ -3250,188 +3160,5 @@ class PaymentPlatformModel {
3250
3160
  account: PaymentPlatformModel.CreditAccountSummary(),
3251
3161
  });
3252
3162
  }
3253
-
3254
- /**
3255
- * Enum: OrderingSource Used By: Payment
3256
- *
3257
- * @returns {OrderingSource}
3258
- */
3259
- static OrderingSource() {
3260
- return Joi.string().valid(
3261
- "storefront",
3262
-
3263
- "store_os_pos",
3264
-
3265
- "kiosk",
3266
-
3267
- "scan_go",
3268
-
3269
- "smart_trolley",
3270
-
3271
- "gofynd",
3272
-
3273
- "uniket",
3274
-
3275
- "marketplace",
3276
-
3277
- "social_commerce",
3278
-
3279
- "ondc",
3280
-
3281
- "nexus",
3282
-
3283
- "nykaa_fashion",
3284
-
3285
- "etsy",
3286
-
3287
- "vuivui",
3288
-
3289
- "zilingo",
3290
-
3291
- "firstcry",
3292
-
3293
- "bukalapak",
3294
-
3295
- "myntra_ppmp",
3296
-
3297
- "lazada",
3298
-
3299
- "tiktok",
3300
-
3301
- "sfcc",
3302
-
3303
- "debenhams",
3304
-
3305
- "prestomall",
3306
-
3307
- "meesho",
3308
-
3309
- "amazon_vdf",
3310
-
3311
- "bigcommerce",
3312
-
3313
- "sendo",
3314
-
3315
- "storehippo",
3316
-
3317
- "cdiscount",
3318
-
3319
- "nykaa",
3320
-
3321
- "trendyol",
3322
-
3323
- "weloveshopping",
3324
-
3325
- "jollee",
3326
-
3327
- "wish",
3328
-
3329
- "tiki",
3330
-
3331
- "central_online",
3332
-
3333
- "q10",
3334
-
3335
- "cred",
3336
-
3337
- "walmart",
3338
-
3339
- "snapdeal",
3340
-
3341
- "flipkart",
3342
-
3343
- "blibli",
3344
-
3345
- "ajio_jit",
3346
-
3347
- "pharmeasy",
3348
-
3349
- "ezmall",
3350
-
3351
- "adobe_commerce",
3352
-
3353
- "kartmax",
3354
-
3355
- "shopee",
3356
-
3357
- "zalora",
3358
-
3359
- "prestashop",
3360
-
3361
- "smytten",
3362
-
3363
- "amazon_sc",
3364
-
3365
- "urbanpiper",
3366
-
3367
- "flipkart_quick",
3368
-
3369
- "woocommerce",
3370
-
3371
- "zivame",
3372
-
3373
- "lelong",
3374
-
3375
- "facebook",
3376
-
3377
- "jiomart",
3378
-
3379
- "gmc",
3380
-
3381
- "robins",
3382
-
3383
- "akulaku",
3384
-
3385
- "noon",
3386
-
3387
- "tatacliq",
3388
-
3389
- "kartrocket",
3390
-
3391
- "inorbit",
3392
-
3393
- "ajio_business",
3394
-
3395
- "swiggy",
3396
-
3397
- "asos",
3398
-
3399
- "tokopedia",
3400
-
3401
- "limeroad",
3402
-
3403
- "myntra_omni",
3404
-
3405
- "spoyl",
3406
-
3407
- "amazon_mlf",
3408
-
3409
- "fulfilled_by_lazada",
3410
-
3411
- "ebay",
3412
-
3413
- "jd",
3414
-
3415
- "amazon_pharmacy",
3416
-
3417
- "ajio_vms",
3418
-
3419
- "daraz",
3420
-
3421
- "oker",
3422
-
3423
- "flipkart_b2b",
3424
-
3425
- "amazon_mlf_ss",
3426
-
3427
- "woovly",
3428
-
3429
- "tata1mg",
3430
-
3431
- "zomato",
3432
-
3433
- "shopify"
3434
- );
3435
- }
3436
3163
  }
3437
3164
  module.exports = PaymentPlatformModel;
@@ -10,8 +10,8 @@ declare class PlatformClient {
10
10
  *
11
11
  * @param {import("./PlatformConfig")} config - The application configuration.
12
12
  */
13
- constructor(config: import("./PlatformConfig"));
14
- config: import("./PlatformConfig");
13
+ constructor(config: import("./PlatformConfig"), options: any);
14
+ config: PlatformConfig;
15
15
  auditTrail: AuditTrail;
16
16
  billing: Billing;
17
17
  catalog: Catalog;
@@ -53,7 +53,10 @@ declare class PlatformClient {
53
53
  headers: any;
54
54
  responseHeaders?: boolean;
55
55
  }): Promise<import("axios").AxiosResponse<any, any>>;
56
+ getAccesstokenObj(options: any): Promise<import("axios").AxiosResponse<any, any>>;
57
+ setToken(token: any): void;
56
58
  }
59
+ import PlatformConfig = require("./PlatformConfig");
57
60
  import AuditTrail = require("./AuditTrail/AuditTrailPlatformClient");
58
61
  import Billing = require("./Billing/BillingPlatformClient");
59
62
  import Catalog = require("./Catalog/CatalogPlatformClient");
@@ -33,6 +33,7 @@ const Webhook = require("./Webhook/WebhookPlatformClient");
33
33
  const PlatformApplicationClient = require("./PlatformApplicationClient");
34
34
  const { FDKClientValidationError } = require("../common/FDKError");
35
35
  const { execute } = require("./PlatformAPIClient");
36
+ const PlatformConfig = require("./PlatformConfig");
36
37
 
37
38
  /**
38
39
  * Represents the client for the platform.
@@ -45,40 +46,45 @@ class PlatformClient {
45
46
  *
46
47
  * @param {import("./PlatformConfig")} config - The application configuration.
47
48
  */
48
- constructor(config) {
49
- this.config = config;
49
+ constructor(config, options) {
50
+ if (config instanceof PlatformConfig) {
51
+ this.config = config;
52
+ } else {
53
+ let platformConfig = new PlatformConfig(config, options);
54
+ this.config = platformConfig;
55
+ }
50
56
 
51
- this.auditTrail = new AuditTrail(config);
57
+ this.auditTrail = new AuditTrail(this.config);
52
58
 
53
- this.billing = new Billing(config);
59
+ this.billing = new Billing(this.config);
54
60
 
55
- this.catalog = new Catalog(config);
61
+ this.catalog = new Catalog(this.config);
56
62
 
57
- this.common = new Common(config);
63
+ this.common = new Common(this.config);
58
64
 
59
- this.communication = new Communication(config);
65
+ this.communication = new Communication(this.config);
60
66
 
61
- this.companyProfile = new CompanyProfile(config);
67
+ this.companyProfile = new CompanyProfile(this.config);
62
68
 
63
- this.configuration = new Configuration(config);
69
+ this.configuration = new Configuration(this.config);
64
70
 
65
- this.content = new Content(config);
71
+ this.content = new Content(this.config);
66
72
 
67
- this.discount = new Discount(config);
73
+ this.discount = new Discount(this.config);
68
74
 
69
- this.fileStorage = new FileStorage(config);
75
+ this.fileStorage = new FileStorage(this.config);
70
76
 
71
- this.lead = new Lead(config);
77
+ this.lead = new Lead(this.config);
72
78
 
73
- this.serviceability = new Serviceability(config);
79
+ this.serviceability = new Serviceability(this.config);
74
80
 
75
- this.order = new Order(config);
81
+ this.order = new Order(this.config);
76
82
 
77
- this.payment = new Payment(config);
83
+ this.payment = new Payment(this.config);
78
84
 
79
- this.theme = new Theme(config);
85
+ this.theme = new Theme(this.config);
80
86
 
81
- this.webhook = new Webhook(config);
87
+ this.webhook = new Webhook(this.config);
82
88
  }
83
89
 
84
90
  /**
@@ -125,6 +131,14 @@ class PlatformClient {
125
131
  responseHeaders,
126
132
  });
127
133
  }
134
+
135
+ getAccesstokenObj(options) {
136
+ return this.config.oauthClient.getAccesstokenObj(options);
137
+ }
138
+
139
+ setToken(token) {
140
+ this.config.oauthClient.setToken(token);
141
+ }
128
142
  }
129
143
 
130
144
  module.exports = PlatformClient;
@@ -10,8 +10,8 @@ declare class PublicClient {
10
10
  *
11
11
  * @param {import("./PublicConfig")} config - The configuration for the public client.
12
12
  */
13
- constructor(config: import("./PublicConfig"));
14
- config: import("./PublicConfig");
13
+ constructor(config: import("./PublicConfig"), options: any);
14
+ config: PublicConfig;
15
15
  catalog: Catalog;
16
16
  configuration: Configuration;
17
17
  content: Content;
@@ -25,6 +25,7 @@ declare class PublicClient {
25
25
  */
26
26
  setExtraHeaders(header: object): void;
27
27
  }
28
+ import PublicConfig = require("./PublicConfig");
28
29
  import Catalog = require("./Catalog/CatalogPublicClient");
29
30
  import Configuration = require("./Configuration/ConfigurationPublicClient");
30
31
  import Content = require("./Content/ContentPublicClient");
@@ -9,6 +9,7 @@ const Partner = require("./Partner/PartnerPublicClient");
9
9
  const Webhook = require("./Webhook/WebhookPublicClient");
10
10
 
11
11
  const { FDKClientValidationError } = require("../common/FDKError");
12
+ const PublicConfig = require("./PublicConfig");
12
13
 
13
14
  /**
14
15
  * Represents the client for the public APIs.
@@ -21,18 +22,23 @@ class PublicClient {
21
22
  *
22
23
  * @param {import("./PublicConfig")} config - The configuration for the public client.
23
24
  */
24
- constructor(config) {
25
- this.config = config;
25
+ constructor(config, options) {
26
+ if (config instanceof PublicConfig) {
27
+ this.config = config;
28
+ } else {
29
+ let publicConfig = new PublicConfig(config, options);
30
+ this.config = publicConfig;
31
+ }
26
32
 
27
- this.catalog = new Catalog(config);
33
+ this.catalog = new Catalog(this.config);
28
34
 
29
- this.configuration = new Configuration(config);
35
+ this.configuration = new Configuration(this.config);
30
36
 
31
- this.content = new Content(config);
37
+ this.content = new Content(this.config);
32
38
 
33
- this.partner = new Partner(config);
39
+ this.partner = new Partner(this.config);
34
40
 
35
- this.webhook = new Webhook(config);
41
+ this.webhook = new Webhook(this.config);
36
42
  }
37
43
 
38
44
  /**