@gofynd/fdk-client-javascript 3.4.0 → 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.
- package/README.md +23 -26
- package/package.json +1 -1
- package/sdk/application/ApplicationClient.d.ts +3 -2
- package/sdk/application/ApplicationClient.js +25 -19
- package/sdk/common/utils.js +6 -3
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +111 -43
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +65 -33
- package/sdk/partner/PartnerClient.d.ts +5 -2
- package/sdk/partner/PartnerClient.js +21 -7
- package/sdk/platform/Cart/CartPlatformModel.d.ts +181 -10
- package/sdk/platform/Cart/CartPlatformModel.js +95 -8
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +40 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +260 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +68 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +49 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +26 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +27 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +2 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +2 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +14 -19
- package/sdk/platform/Content/ContentPlatformModel.js +6 -20
- package/sdk/platform/Order/OrderPlatformModel.d.ts +218 -17
- package/sdk/platform/Order/OrderPlatformModel.js +366 -14
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +15 -15
- package/sdk/platform/Order/OrderPlatformValidator.js +9 -9
- package/sdk/platform/PlatformClient.d.ts +5 -2
- package/sdk/platform/PlatformClient.js +32 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +50 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +22 -2
- package/sdk/public/PublicClient.d.ts +3 -2
- package/sdk/public/PublicClient.js +13 -7
|
@@ -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
|
-
|
|
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;
|
|
@@ -338,6 +338,7 @@ export = ServiceabilityPlatformModel;
|
|
|
338
338
|
*/
|
|
339
339
|
/**
|
|
340
340
|
* @typedef GeoAreaRequestBody
|
|
341
|
+
* @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
|
|
341
342
|
* @property {boolean} is_active - Indicates whether the geo area is active or not.
|
|
342
343
|
* @property {string} name - The name of the geo area.
|
|
343
344
|
* @property {string} slug - A slug is a human-readable URL segment, typically
|
|
@@ -362,6 +363,7 @@ export = ServiceabilityPlatformModel;
|
|
|
362
363
|
* @property {Area[]} areas - A list of areas included in the geo area.
|
|
363
364
|
* @property {string} [region_type] - Defines whether the region is based on
|
|
364
365
|
* pincode or non-pincode.
|
|
366
|
+
* @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
|
|
365
367
|
* @property {string} type - Specifies whether the geo area is for price or
|
|
366
368
|
* delivery purposes.
|
|
367
369
|
* @property {string} created_on - The timestamp when the record was created.
|
|
@@ -374,6 +376,7 @@ export = ServiceabilityPlatformModel;
|
|
|
374
376
|
* @typedef GeoAreaPutResponseBody
|
|
375
377
|
* @property {string} [name] - Name of the geo area.
|
|
376
378
|
* @property {string} [geoarea_id] - Unique identifier for the geo area.
|
|
379
|
+
* @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
|
|
377
380
|
* @property {string} [slug] - A slug is a human-readable URL segment, typically
|
|
378
381
|
* generated from a title with special characters removed.
|
|
379
382
|
* @property {boolean} [is_active] - Indicates whether the geo area is active or not.
|
|
@@ -401,6 +404,7 @@ export = ServiceabilityPlatformModel;
|
|
|
401
404
|
* generated from a title with special characters removed.
|
|
402
405
|
* @property {string} [application_id] - The unique identifier of the application.
|
|
403
406
|
* @property {number} [company_id] - The unique identifier of the company.
|
|
407
|
+
* @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
|
|
404
408
|
* @property {string} geoarea_id - A unique identifier for the geoarea.
|
|
405
409
|
* @property {boolean} is_active - Indicates whether the geoarea is active.
|
|
406
410
|
* @property {string} type - The type of geoarea (e.g., city, country).
|
|
@@ -850,9 +854,10 @@ export = ServiceabilityPlatformModel;
|
|
|
850
854
|
* fetch or modify scheme details.
|
|
851
855
|
* @property {string} name - Name of the scheme.
|
|
852
856
|
* @property {string} [default_forward_pickup_cutoff] - Default cutoff time for
|
|
853
|
-
* forward pickup (nullable).
|
|
857
|
+
* forward pickup (nullable), having 24hour time format HH:MM.
|
|
854
858
|
* @property {string} [default_reverse_pickup_cutoff] - Default cutoff time for
|
|
855
|
-
* reverse pickup (nullable).
|
|
859
|
+
* reverse pickup (nullable), having 24hour time format HH:MM.
|
|
860
|
+
* @property {string} [default_cutoff_timezone] - Timezone for default cutoff time.
|
|
856
861
|
* @property {CourierPartnerSchemeDefaultTat} [default_tat]
|
|
857
862
|
* @property {ArithmeticOperations} weight
|
|
858
863
|
* @property {ArithmeticOperations} [volumetric_weight]
|
|
@@ -908,6 +913,12 @@ export = ServiceabilityPlatformModel;
|
|
|
908
913
|
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
909
914
|
* quantity of items allowed in a non-quality check shipment.
|
|
910
915
|
* @property {CourierPartnerSchemeFeatures} feature
|
|
916
|
+
* @property {string} [default_forward_pickup_cutoff] - Default cutoff time for
|
|
917
|
+
* forward pickup (nullable), having 24hour time format HH:MM.
|
|
918
|
+
* @property {string} [default_reverse_pickup_cutoff] - Default cutoff time for
|
|
919
|
+
* reverse pickup (nullable), having 24hour time format HH:MM.
|
|
920
|
+
* @property {string} [default_cutoff_timezone] - Timezone for default cutoff time.
|
|
921
|
+
* @property {CourierPartnerSchemeDefaultTat} [default_tat]
|
|
911
922
|
*/
|
|
912
923
|
/**
|
|
913
924
|
* @typedef CourierPartnerSchemeUpdateDetailsSchema
|
|
@@ -3123,6 +3134,10 @@ type GeoAreaBulkExportResult = {
|
|
|
3123
3134
|
/** @returns {GeoAreaRequestBody} */
|
|
3124
3135
|
declare function GeoAreaRequestBody(): GeoAreaRequestBody;
|
|
3125
3136
|
type GeoAreaRequestBody = {
|
|
3137
|
+
/**
|
|
3138
|
+
* - Indicates whether geo area is polygon or not.
|
|
3139
|
+
*/
|
|
3140
|
+
is_polygon?: boolean;
|
|
3126
3141
|
/**
|
|
3127
3142
|
* - Indicates whether the geo area is active or not.
|
|
3128
3143
|
*/
|
|
@@ -3185,6 +3200,10 @@ type GeoAreaResponseBody = {
|
|
|
3185
3200
|
* pincode or non-pincode.
|
|
3186
3201
|
*/
|
|
3187
3202
|
region_type?: string;
|
|
3203
|
+
/**
|
|
3204
|
+
* - Indicates whether geo area is polygon or not.
|
|
3205
|
+
*/
|
|
3206
|
+
is_polygon?: boolean;
|
|
3188
3207
|
/**
|
|
3189
3208
|
* - Specifies whether the geo area is for price or
|
|
3190
3209
|
* delivery purposes.
|
|
@@ -3216,6 +3235,10 @@ type GeoAreaPutResponseBody = {
|
|
|
3216
3235
|
* - Unique identifier for the geo area.
|
|
3217
3236
|
*/
|
|
3218
3237
|
geoarea_id?: string;
|
|
3238
|
+
/**
|
|
3239
|
+
* - Indicates whether geo area is polygon or not.
|
|
3240
|
+
*/
|
|
3241
|
+
is_polygon?: boolean;
|
|
3219
3242
|
/**
|
|
3220
3243
|
* - A slug is a human-readable URL segment, typically
|
|
3221
3244
|
* generated from a title with special characters removed.
|
|
@@ -3284,6 +3307,10 @@ type GeoAreaDetails = {
|
|
|
3284
3307
|
* - The unique identifier of the company.
|
|
3285
3308
|
*/
|
|
3286
3309
|
company_id?: number;
|
|
3310
|
+
/**
|
|
3311
|
+
* - Indicates whether geo area is polygon or not.
|
|
3312
|
+
*/
|
|
3313
|
+
is_polygon?: boolean;
|
|
3287
3314
|
/**
|
|
3288
3315
|
* - A unique identifier for the geoarea.
|
|
3289
3316
|
*/
|
|
@@ -4432,14 +4459,18 @@ type CourierPartnerSchemeDetailsModel = {
|
|
|
4432
4459
|
name: string;
|
|
4433
4460
|
/**
|
|
4434
4461
|
* - Default cutoff time for
|
|
4435
|
-
* forward pickup (nullable).
|
|
4462
|
+
* forward pickup (nullable), having 24hour time format HH:MM.
|
|
4436
4463
|
*/
|
|
4437
4464
|
default_forward_pickup_cutoff?: string;
|
|
4438
4465
|
/**
|
|
4439
4466
|
* - Default cutoff time for
|
|
4440
|
-
* reverse pickup (nullable).
|
|
4467
|
+
* reverse pickup (nullable), having 24hour time format HH:MM.
|
|
4441
4468
|
*/
|
|
4442
4469
|
default_reverse_pickup_cutoff?: string;
|
|
4470
|
+
/**
|
|
4471
|
+
* - Timezone for default cutoff time.
|
|
4472
|
+
*/
|
|
4473
|
+
default_cutoff_timezone?: string;
|
|
4443
4474
|
default_tat?: CourierPartnerSchemeDefaultTat;
|
|
4444
4475
|
weight: ArithmeticOperations;
|
|
4445
4476
|
volumetric_weight?: ArithmeticOperations;
|
|
@@ -4568,6 +4599,21 @@ type CourierPartnerSchemeModelSchema = {
|
|
|
4568
4599
|
*/
|
|
4569
4600
|
non_qc_shipment_item_quantity?: number;
|
|
4570
4601
|
feature: CourierPartnerSchemeFeatures;
|
|
4602
|
+
/**
|
|
4603
|
+
* - Default cutoff time for
|
|
4604
|
+
* forward pickup (nullable), having 24hour time format HH:MM.
|
|
4605
|
+
*/
|
|
4606
|
+
default_forward_pickup_cutoff?: string;
|
|
4607
|
+
/**
|
|
4608
|
+
* - Default cutoff time for
|
|
4609
|
+
* reverse pickup (nullable), having 24hour time format HH:MM.
|
|
4610
|
+
*/
|
|
4611
|
+
default_reverse_pickup_cutoff?: string;
|
|
4612
|
+
/**
|
|
4613
|
+
* - Timezone for default cutoff time.
|
|
4614
|
+
*/
|
|
4615
|
+
default_cutoff_timezone?: string;
|
|
4616
|
+
default_tat?: CourierPartnerSchemeDefaultTat;
|
|
4571
4617
|
};
|
|
4572
4618
|
/** @returns {CourierPartnerSchemeUpdateDetailsSchema} */
|
|
4573
4619
|
declare function CourierPartnerSchemeUpdateDetailsSchema(): CourierPartnerSchemeUpdateDetailsSchema;
|
|
@@ -379,6 +379,7 @@ const Joi = require("joi");
|
|
|
379
379
|
|
|
380
380
|
/**
|
|
381
381
|
* @typedef GeoAreaRequestBody
|
|
382
|
+
* @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
|
|
382
383
|
* @property {boolean} is_active - Indicates whether the geo area is active or not.
|
|
383
384
|
* @property {string} name - The name of the geo area.
|
|
384
385
|
* @property {string} slug - A slug is a human-readable URL segment, typically
|
|
@@ -405,6 +406,7 @@ const Joi = require("joi");
|
|
|
405
406
|
* @property {Area[]} areas - A list of areas included in the geo area.
|
|
406
407
|
* @property {string} [region_type] - Defines whether the region is based on
|
|
407
408
|
* pincode or non-pincode.
|
|
409
|
+
* @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
|
|
408
410
|
* @property {string} type - Specifies whether the geo area is for price or
|
|
409
411
|
* delivery purposes.
|
|
410
412
|
* @property {string} created_on - The timestamp when the record was created.
|
|
@@ -418,6 +420,7 @@ const Joi = require("joi");
|
|
|
418
420
|
* @typedef GeoAreaPutResponseBody
|
|
419
421
|
* @property {string} [name] - Name of the geo area.
|
|
420
422
|
* @property {string} [geoarea_id] - Unique identifier for the geo area.
|
|
423
|
+
* @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
|
|
421
424
|
* @property {string} [slug] - A slug is a human-readable URL segment, typically
|
|
422
425
|
* generated from a title with special characters removed.
|
|
423
426
|
* @property {boolean} [is_active] - Indicates whether the geo area is active or not.
|
|
@@ -447,6 +450,7 @@ const Joi = require("joi");
|
|
|
447
450
|
* generated from a title with special characters removed.
|
|
448
451
|
* @property {string} [application_id] - The unique identifier of the application.
|
|
449
452
|
* @property {number} [company_id] - The unique identifier of the company.
|
|
453
|
+
* @property {boolean} [is_polygon] - Indicates whether geo area is polygon or not.
|
|
450
454
|
* @property {string} geoarea_id - A unique identifier for the geoarea.
|
|
451
455
|
* @property {boolean} is_active - Indicates whether the geoarea is active.
|
|
452
456
|
* @property {string} type - The type of geoarea (e.g., city, country).
|
|
@@ -934,9 +938,10 @@ const Joi = require("joi");
|
|
|
934
938
|
* fetch or modify scheme details.
|
|
935
939
|
* @property {string} name - Name of the scheme.
|
|
936
940
|
* @property {string} [default_forward_pickup_cutoff] - Default cutoff time for
|
|
937
|
-
* forward pickup (nullable).
|
|
941
|
+
* forward pickup (nullable), having 24hour time format HH:MM.
|
|
938
942
|
* @property {string} [default_reverse_pickup_cutoff] - Default cutoff time for
|
|
939
|
-
* reverse pickup (nullable).
|
|
943
|
+
* reverse pickup (nullable), having 24hour time format HH:MM.
|
|
944
|
+
* @property {string} [default_cutoff_timezone] - Timezone for default cutoff time.
|
|
940
945
|
* @property {CourierPartnerSchemeDefaultTat} [default_tat]
|
|
941
946
|
* @property {ArithmeticOperations} weight
|
|
942
947
|
* @property {ArithmeticOperations} [volumetric_weight]
|
|
@@ -993,6 +998,12 @@ const Joi = require("joi");
|
|
|
993
998
|
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
994
999
|
* quantity of items allowed in a non-quality check shipment.
|
|
995
1000
|
* @property {CourierPartnerSchemeFeatures} feature
|
|
1001
|
+
* @property {string} [default_forward_pickup_cutoff] - Default cutoff time for
|
|
1002
|
+
* forward pickup (nullable), having 24hour time format HH:MM.
|
|
1003
|
+
* @property {string} [default_reverse_pickup_cutoff] - Default cutoff time for
|
|
1004
|
+
* reverse pickup (nullable), having 24hour time format HH:MM.
|
|
1005
|
+
* @property {string} [default_cutoff_timezone] - Timezone for default cutoff time.
|
|
1006
|
+
* @property {CourierPartnerSchemeDefaultTat} [default_tat]
|
|
996
1007
|
*/
|
|
997
1008
|
|
|
998
1009
|
/**
|
|
@@ -2946,6 +2957,7 @@ class ServiceabilityPlatformModel {
|
|
|
2946
2957
|
/** @returns {GeoAreaRequestBody} */
|
|
2947
2958
|
static GeoAreaRequestBody() {
|
|
2948
2959
|
return Joi.object({
|
|
2960
|
+
is_polygon: Joi.boolean().allow(null),
|
|
2949
2961
|
is_active: Joi.boolean().required(),
|
|
2950
2962
|
name: Joi.string().allow("").required(),
|
|
2951
2963
|
slug: Joi.string().allow("").required(),
|
|
@@ -2972,6 +2984,7 @@ class ServiceabilityPlatformModel {
|
|
|
2972
2984
|
is_active: Joi.boolean().required(),
|
|
2973
2985
|
areas: Joi.array().items(ServiceabilityPlatformModel.Area()).required(),
|
|
2974
2986
|
region_type: Joi.string().allow("").allow(null),
|
|
2987
|
+
is_polygon: Joi.boolean().allow(null),
|
|
2975
2988
|
type: Joi.string().allow("").required(),
|
|
2976
2989
|
created_on: Joi.string().allow("").required(),
|
|
2977
2990
|
modified_on: Joi.string().allow("").required(),
|
|
@@ -2986,6 +2999,7 @@ class ServiceabilityPlatformModel {
|
|
|
2986
2999
|
return Joi.object({
|
|
2987
3000
|
name: Joi.string().allow(""),
|
|
2988
3001
|
geoarea_id: Joi.string().allow(""),
|
|
3002
|
+
is_polygon: Joi.boolean().allow(null),
|
|
2989
3003
|
slug: Joi.string().allow(""),
|
|
2990
3004
|
is_active: Joi.boolean(),
|
|
2991
3005
|
areas: Joi.array().items(ServiceabilityPlatformModel.Area()),
|
|
@@ -3014,6 +3028,7 @@ class ServiceabilityPlatformModel {
|
|
|
3014
3028
|
slug: Joi.string().allow("").required(),
|
|
3015
3029
|
application_id: Joi.string().allow(""),
|
|
3016
3030
|
company_id: Joi.number(),
|
|
3031
|
+
is_polygon: Joi.boolean().allow(null),
|
|
3017
3032
|
geoarea_id: Joi.string().allow("").required(),
|
|
3018
3033
|
is_active: Joi.boolean().required(),
|
|
3019
3034
|
type: Joi.string().allow("").required(),
|
|
@@ -3539,6 +3554,7 @@ class ServiceabilityPlatformModel {
|
|
|
3539
3554
|
name: Joi.string().allow("").required(),
|
|
3540
3555
|
default_forward_pickup_cutoff: Joi.string().allow("").allow(null),
|
|
3541
3556
|
default_reverse_pickup_cutoff: Joi.string().allow("").allow(null),
|
|
3557
|
+
default_cutoff_timezone: Joi.string().allow("").allow(null),
|
|
3542
3558
|
default_tat: ServiceabilityPlatformModel.CourierPartnerSchemeDefaultTat(),
|
|
3543
3559
|
weight: ServiceabilityPlatformModel.ArithmeticOperations().required(),
|
|
3544
3560
|
volumetric_weight: ServiceabilityPlatformModel.ArithmeticOperations(),
|
|
@@ -3578,6 +3594,10 @@ class ServiceabilityPlatformModel {
|
|
|
3578
3594
|
qc_shipment_item_quantity: Joi.number().allow(null),
|
|
3579
3595
|
non_qc_shipment_item_quantity: Joi.number().allow(null),
|
|
3580
3596
|
feature: ServiceabilityPlatformModel.CourierPartnerSchemeFeatures().required(),
|
|
3597
|
+
default_forward_pickup_cutoff: Joi.string().allow("").allow(null),
|
|
3598
|
+
default_reverse_pickup_cutoff: Joi.string().allow("").allow(null),
|
|
3599
|
+
default_cutoff_timezone: Joi.string().allow("").allow(null),
|
|
3600
|
+
default_tat: ServiceabilityPlatformModel.CourierPartnerSchemeDefaultTat(),
|
|
3581
3601
|
});
|
|
3582
3602
|
}
|
|
3583
3603
|
|
|
@@ -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:
|
|
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
|
-
|
|
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
|
/**
|