@gofynd/fdk-client-javascript 1.6.4 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +5 -5
- package/sdk/application/Cart/CartApplicationClient.js +26 -268
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +20 -20
- package/sdk/application/Catalog/CatalogApplicationClient.js +98 -347
- package/sdk/application/Common/CommonApplicationClient.js +1 -16
- package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +24 -2
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +58 -137
- package/sdk/application/Content/ContentApplicationClient.d.ts +47 -7
- package/sdk/application/Content/ContentApplicationClient.js +222 -191
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
- package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
- package/sdk/application/Lead/LeadApplicationClient.js +21 -52
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +16 -56
- package/sdk/application/Logistic/LogisticApplicationClient.js +57 -332
- package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
- package/sdk/application/Order/OrderApplicationClient.js +68 -153
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -12
- package/sdk/application/Payment/PaymentApplicationClient.js +7 -487
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
- package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationClient.js +21 -75
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
- package/sdk/application/User/UserApplicationClient.js +1 -407
- package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +4 -4
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +1 -55
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +1 -408
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -37
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -0
- package/sdk/partner/Lead/LeadPartnerModel.js +2 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +29 -25
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +65 -42
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1008 -794
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +573 -460
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +10 -5
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +5 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.js +2 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +2 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +67 -9
- package/sdk/platform/Cart/CartPlatformModel.js +38 -5
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.js +4 -4
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +47 -13
- package/sdk/platform/Catalog/CatalogPlatformModel.js +29 -7
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +7 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +71 -7
- package/sdk/platform/Communication/CommunicationPlatformModel.js +70 -6
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +0 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +8 -60
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +31 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -3
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +13 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +68 -11
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +49 -7
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +169 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1279 -132
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +156 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +180 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +162 -0
- package/sdk/platform/Content/ContentPlatformClient.js +1697 -497
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1053 -35
- package/sdk/platform/Content/ContentPlatformModel.js +717 -34
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +127 -1
- package/sdk/platform/Content/ContentPlatformValidator.js +171 -0
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +34 -0
- package/sdk/platform/Discount/DiscountPlatformClient.js +59 -0
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +365 -93
- package/sdk/platform/Discount/DiscountPlatformModel.js +98 -93
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +54 -34
- package/sdk/platform/Discount/DiscountPlatformValidator.js +27 -17
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +0 -156
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +0 -1072
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -137
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +0 -173
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +1 -1105
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +0 -1125
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -0
- package/sdk/platform/Lead/LeadPlatformModel.js +2 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
- package/sdk/platform/Order/OrderPlatformClient.d.ts +212 -0
- package/sdk/platform/Order/OrderPlatformClient.js +397 -0
- package/sdk/platform/Order/OrderPlatformModel.d.ts +41 -9
- package/sdk/platform/Order/OrderPlatformModel.js +20 -7
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +58 -10
- package/sdk/platform/Partner/PartnerPlatformModel.js +19 -10
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -2
- package/sdk/platform/Payment/PaymentPlatformModel.js +8 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +5 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.js +2 -0
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +240 -24
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +1753 -277
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +320 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +269 -19
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +53 -104
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +201 -629
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +5720 -2891
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3414 -2181
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +138 -216
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +81 -148
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
- package/sdk/platform/Share/SharePlatformModel.js +2 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +10 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +79 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +13 -1
- package/sdk/platform/User/UserPlatformApplicationValidator.js +12 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +52 -1
- package/sdk/platform/User/UserPlatformModel.js +36 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +5 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +2 -0
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +1 -1
- package/sdk/public/Catalog/CatalogPublicClient.js +6 -11
- package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -3
- package/sdk/public/Content/ContentPublicClient.js +261 -104
- package/sdk/public/Content/ContentPublicModel.d.ts +155 -1
- package/sdk/public/Content/ContentPublicModel.js +102 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -1
- package/sdk/public/Content/ContentPublicValidator.js +26 -0
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
|
@@ -1,11 +1,44 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef CourierPartnerSchemeModelSchema
|
|
5
|
+
* @property {CreatedBy} [created_by]
|
|
6
|
+
* @property {string} [created_on] - The timestamp when the record was created.
|
|
7
|
+
* @property {ModifiedBy} [modified_by]
|
|
8
|
+
* @property {string} [modified_on] - The timestamp when the record last modified.
|
|
9
|
+
* @property {string} [extension_id] - Unique identifier of courier partner extension.
|
|
10
|
+
* @property {string} [scheme_id] - Unique identifier for the scheme, used to
|
|
11
|
+
* fetch or modify scheme details.
|
|
12
|
+
* @property {string} [company_id] - Unique identifier of company.
|
|
13
|
+
* @property {string} name - Name of the scheme.
|
|
14
|
+
* @property {ArithmeticOperations} weight
|
|
15
|
+
* @property {ArithmeticOperations} [volumetric_weight]
|
|
16
|
+
* @property {string} transport_type - Mode of transport associated with the
|
|
17
|
+
* courier partner scheme.
|
|
18
|
+
* @property {string} region - Serviceable region associated with the courier
|
|
19
|
+
* partner scheme.
|
|
20
|
+
* @property {string} delivery_type - Type of delivery associated with the
|
|
21
|
+
* courier partner scheme.
|
|
22
|
+
* @property {string[]} payment_mode - Mode of payment associated with the
|
|
23
|
+
* courier partner scheme.
|
|
24
|
+
* @property {string} stage - Indicates if the courier partner scheme is
|
|
25
|
+
* currently active or inactive.
|
|
26
|
+
* @property {string} [status_updates] - Describes the type of status updates
|
|
27
|
+
* provided by the courier partner (e.g., real-time, periodic).
|
|
28
|
+
* @property {number} [ndr_attempts] - Indicates if the Non-Delivery Report
|
|
29
|
+
* (NDR) feature is supported by the courier partner.
|
|
30
|
+
* @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity
|
|
31
|
+
* of items allowed in a quality check shipment.
|
|
32
|
+
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
33
|
+
* quantity of items allowed in a non-quality check shipment.
|
|
34
|
+
* @property {CourierPartnerSchemeFeatures} feature
|
|
35
|
+
*/
|
|
36
|
+
|
|
3
37
|
/**
|
|
4
38
|
* @typedef BulkRegionServiceabilityTatDetails
|
|
5
|
-
* @property {string} country -
|
|
6
|
-
* @property {string} region -
|
|
7
|
-
*
|
|
8
|
-
* @property {string} type - Denotes the type of file.
|
|
39
|
+
* @property {string} country - Country involved in the operation.
|
|
40
|
+
* @property {string} region - Region involved in the operation.
|
|
41
|
+
* @property {string} type - Type of operation, either serviceability or TAT.
|
|
9
42
|
*/
|
|
10
43
|
|
|
11
44
|
/**
|
|
@@ -14,85 +47,91 @@ const Joi = require("joi");
|
|
|
14
47
|
* @property {string} [region] - Name of the region for which the
|
|
15
48
|
* tat/serviceability file needs to be downloaded.
|
|
16
49
|
* @property {string} [type] - Denotes the type of data.
|
|
17
|
-
* @property {string} [batch_id] -
|
|
50
|
+
* @property {string} [batch_id] - A unique identifier for the performed batch operation.
|
|
18
51
|
* @property {string} [status] - Current status of the request.
|
|
19
52
|
* @property {Object[]} [failed_records] - Information of records which failed
|
|
20
53
|
* @property {string} [file_path] - CDN path of the file.
|
|
21
54
|
*/
|
|
22
55
|
|
|
23
56
|
/**
|
|
24
|
-
* @typedef
|
|
25
|
-
* @property {
|
|
26
|
-
*
|
|
27
|
-
* @property {string} type - Type of the error.
|
|
57
|
+
* @typedef CommonErrorResult
|
|
58
|
+
* @property {Error[]} [error] - An array of items referencing the ErrorResult
|
|
59
|
+
* schema, which likely contains detailed information about the errors.
|
|
28
60
|
*/
|
|
29
61
|
|
|
30
62
|
/**
|
|
31
|
-
* @typedef
|
|
32
|
-
* @property {boolean} success -
|
|
33
|
-
* @property {
|
|
63
|
+
* @typedef BulkFailureResult
|
|
64
|
+
* @property {boolean} [success] - Whether operation was successful.
|
|
65
|
+
* @property {Error[]} error - An array containing error details.
|
|
34
66
|
*/
|
|
35
67
|
|
|
36
68
|
/**
|
|
37
|
-
* @typedef
|
|
38
|
-
* @property {
|
|
39
|
-
* @property {
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @typedef Page
|
|
44
|
-
* @property {number} [item_total] - The total number of items on the page.
|
|
45
|
-
* @property {string} [next_id] - The identifier for the next page.
|
|
46
|
-
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
47
|
-
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
48
|
-
* @property {number} [current] - The current page number.
|
|
49
|
-
* @property {string} type - The type of the page, such as 'PageType'.
|
|
50
|
-
* @property {number} [size] - The number of items per page.
|
|
69
|
+
* @typedef FailureResult
|
|
70
|
+
* @property {boolean} [success] - Whether operation was successful.
|
|
71
|
+
* @property {Error[]} [error] - Array of error details.
|
|
51
72
|
*/
|
|
52
73
|
|
|
53
74
|
/**
|
|
54
|
-
* @typedef
|
|
55
|
-
* @property {
|
|
56
|
-
*
|
|
57
|
-
* @property {
|
|
58
|
-
* @property {string} stage - Denotes whether the account is in enabled or disabled stage.
|
|
59
|
-
* @property {boolean} is_own_account - Denotes whether it is the seller's own
|
|
60
|
-
* account or not.
|
|
75
|
+
* @typedef BulkRegionServiceabilityTatResult
|
|
76
|
+
* @property {BulkRegionServiceabilityTatResultItemData[]} [items] - Array of
|
|
77
|
+
* bulk region serviceability or TAT result items.
|
|
78
|
+
* @property {Page} [page]
|
|
61
79
|
*/
|
|
62
80
|
|
|
63
81
|
/**
|
|
64
82
|
* @typedef RegionTatItemResult
|
|
65
|
-
* @property {RegionTatResult[]} items
|
|
83
|
+
* @property {RegionTatResult[]} items - An array that contains items of region tat.
|
|
66
84
|
* @property {Page} page
|
|
67
85
|
*/
|
|
68
86
|
|
|
69
87
|
/**
|
|
70
88
|
* @typedef RegionServiceabilityItemResult
|
|
71
|
-
* @property {RegionServiceabilityResult[]} items
|
|
89
|
+
* @property {RegionServiceabilityResult[]} items - An array that contains items
|
|
90
|
+
* of region serviceability.
|
|
72
91
|
* @property {Page} page
|
|
73
92
|
*/
|
|
74
93
|
|
|
75
94
|
/**
|
|
76
95
|
* @typedef ServiceabilityDetailsResult
|
|
96
|
+
* @property {string} [pickup_cutoff] - Time of day by which pickups must be
|
|
97
|
+
* scheduled to be processed on the same day.
|
|
98
|
+
* @property {string} [country_code] - ISO2 code representing the country where
|
|
99
|
+
* the serviceability is being specified.
|
|
100
|
+
* @property {string} [state_code] - Code representing the state or province
|
|
101
|
+
* within the country where the serviceability is being specified.
|
|
102
|
+
* @property {string} [city_code] - Code representing the city within the state
|
|
103
|
+
* where the serviceability is being specified.
|
|
104
|
+
* @property {string} [sector_code] - Code representing a specific sector or
|
|
105
|
+
* district within the city where the serviceability is being specified.
|
|
106
|
+
* @property {string} [pincode] - A string indicating the postal code or PIN
|
|
107
|
+
* code of the address area.
|
|
77
108
|
* @property {boolean} [first_mile] - Boolean value indicating whether
|
|
78
109
|
* first-mile service is available or not.
|
|
79
110
|
* @property {boolean} [last_mile] - Boolean value indicating whether last-mile
|
|
80
111
|
* service is available or not.
|
|
81
|
-
* @property {boolean} [reverse_pickup] - Boolean value indicating whether a
|
|
82
|
-
* region is first-mile serviceable or not in return pickup.
|
|
83
112
|
* @property {number} [cod_limit] - Limit on the amount of cash on delivery
|
|
84
113
|
* (COD) payments allowed in the specified region.
|
|
114
|
+
* @property {number} [prepaid_limit] - Limit on the amount of prepaid payments
|
|
115
|
+
* allowed in the specified region.
|
|
85
116
|
* @property {boolean} [doorstep_return] - Indicates if doorstep return service
|
|
86
117
|
* is available. This refers to the ability to return items directly from the
|
|
87
118
|
* customer's doorstep.
|
|
88
119
|
* @property {boolean} [doorstep_qc] - Indicates if doorstep quality check
|
|
89
120
|
* service is available. This refers to the ability to perform quality checks
|
|
90
121
|
* on items at the customer's doorstep.
|
|
91
|
-
* @property {string} [
|
|
92
|
-
* scheduled to be processed on the same day.
|
|
122
|
+
* @property {string} [forward_pickup_cutoff] - Time of day by which pickups
|
|
123
|
+
* must be scheduled to be processed on the same day in the forward journey.
|
|
124
|
+
* @property {string} [reverse_pickup_cutoff] - Time of day by which pickups
|
|
125
|
+
* must be scheduled to be processed on the same day in the reverse journey.
|
|
126
|
+
* @property {boolean} [hand_to_hand_exchange] - Indicates whether the product
|
|
127
|
+
* exchange happens directly between the buyer and seller (e.g., in person),
|
|
128
|
+
* instead of through a third-party service.
|
|
129
|
+
* @property {string[]} [holiday_list] - List of holidays for a courier partner scheme.
|
|
130
|
+
* @property {boolean} [reverse_pickup] - Boolean value indicating whether
|
|
131
|
+
* reverse pickup services is available.
|
|
93
132
|
* @property {boolean} [installation] - Boolean value indicating whether
|
|
94
133
|
* installation services are available in the specified region or not.
|
|
95
|
-
* @property {string} [id] -
|
|
134
|
+
* @property {string} [id] - A string serving as the unique identifier.
|
|
96
135
|
*/
|
|
97
136
|
|
|
98
137
|
/**
|
|
@@ -101,8 +140,6 @@ const Joi = require("joi");
|
|
|
101
140
|
* first-mile service is available or not.
|
|
102
141
|
* @property {boolean} [last_mile] - Boolean value indicating whether last-mile
|
|
103
142
|
* service is available or not.
|
|
104
|
-
* @property {boolean} [reverse_pickup] - Boolean value indicating whether a
|
|
105
|
-
* region is first-mile serviceable or not in return pickup.
|
|
106
143
|
* @property {number} [cod_limit] - Limit on the amount of cash on delivery
|
|
107
144
|
* (COD) payments allowed in the specified region.
|
|
108
145
|
* @property {boolean} [doorstep_return] - Indicates if doorstep return service
|
|
@@ -111,14 +148,24 @@ const Joi = require("joi");
|
|
|
111
148
|
* @property {boolean} [doorstep_qc] - Indicates if doorstep quality check
|
|
112
149
|
* service is available. This refers to the ability to perform quality checks
|
|
113
150
|
* on items at the customer's doorstep.
|
|
114
|
-
* @property {string} [
|
|
115
|
-
* scheduled to be processed on the same day.
|
|
151
|
+
* @property {string} [forward_pickup_cutoff] - Time of day by which pickups
|
|
152
|
+
* must be scheduled to be processed on the same day in the forward journey.
|
|
153
|
+
* @property {string} [reverse_pickup_cutoff] - Time of day by which pickups
|
|
154
|
+
* must be scheduled to be processed on the same day in the reverse journey.
|
|
155
|
+
* @property {boolean} [hand_to_hand_exchange] - Indicates whether the product
|
|
156
|
+
* exchange happens directly between the buyer and seller (e.g., in person),
|
|
157
|
+
* instead of through a third-party service.
|
|
158
|
+
* @property {string[]} [holiday_list] - List of holidays for a courier partner scheme.
|
|
116
159
|
* @property {boolean} [installation] - Boolean value indicating whether
|
|
117
160
|
* installation services are available in the specified region or not.
|
|
161
|
+
* @property {string} [pickup_cutoff] - Time of day by which pickups must be
|
|
162
|
+
* scheduled to be processed on the same day.
|
|
118
163
|
*/
|
|
119
164
|
|
|
120
165
|
/**
|
|
121
166
|
* @typedef RegionServiceabilityResult
|
|
167
|
+
* @property {string} [pickup_cutoff] - Time of day by which pickups must be
|
|
168
|
+
* scheduled to be processed on the same day.
|
|
122
169
|
* @property {string} country_code - ISO2 code representing the country where
|
|
123
170
|
* the serviceability is being specified.
|
|
124
171
|
* @property {string} [state_code] - Code representing the state or province
|
|
@@ -127,27 +174,34 @@ const Joi = require("joi");
|
|
|
127
174
|
* where the serviceability is being specified.
|
|
128
175
|
* @property {string} [sector_code] - Code representing a specific sector or
|
|
129
176
|
* district within the city where the serviceability is being specified.
|
|
130
|
-
* @property {string} [pincode] -
|
|
131
|
-
*
|
|
177
|
+
* @property {string} [pincode] - A string indicating the postal code or PIN
|
|
178
|
+
* code of the address area.
|
|
132
179
|
* @property {boolean} [first_mile] - Boolean value indicating whether
|
|
133
180
|
* first-mile service is available or not.
|
|
134
181
|
* @property {boolean} [last_mile] - Boolean value indicating whether last-mile
|
|
135
182
|
* service is available or not.
|
|
136
|
-
* @property {boolean} [reverse_pickup] - Boolean value indicating whether a
|
|
137
|
-
* region is first-mile serviceable or not in return pickup.
|
|
138
183
|
* @property {number} [cod_limit] - Limit on the amount of cash on delivery
|
|
139
184
|
* (COD) payments allowed in the specified region.
|
|
185
|
+
* @property {number} [prepaid_limit] - Limit on the amount of prepaid payments
|
|
186
|
+
* allowed in the specified region.
|
|
140
187
|
* @property {boolean} [doorstep_return] - Indicates if doorstep return service
|
|
141
188
|
* is available. This refers to the ability to return items directly from the
|
|
142
189
|
* customer's doorstep.
|
|
143
190
|
* @property {boolean} [doorstep_qc] - Indicates if doorstep quality check
|
|
144
191
|
* service is available. This refers to the ability to perform quality checks
|
|
145
192
|
* on items at the customer's doorstep.
|
|
146
|
-
* @property {
|
|
147
|
-
*
|
|
193
|
+
* @property {boolean} [reverse_pickup] - Indicates if reverse pickup is available.
|
|
194
|
+
* @property {string} [forward_pickup_cutoff] - Time of day by which pickups
|
|
195
|
+
* must be scheduled to be processed on the same day in the forward journey.
|
|
196
|
+
* @property {string} [reverse_pickup_cutoff] - Time of day by which pickups
|
|
197
|
+
* must be scheduled to be processed on the same day in the reverse journey.
|
|
198
|
+
* @property {boolean} [hand_to_hand_exchange] - Indicates whether the product
|
|
199
|
+
* exchange happens directly between the buyer and seller (e.g., in person),
|
|
200
|
+
* instead of through a third-party service.
|
|
201
|
+
* @property {string[]} [holiday_list] - List of holidays for a courier partner scheme.
|
|
148
202
|
* @property {boolean} [installation] - Boolean value indicating whether
|
|
149
203
|
* installation services are available in the specified region or not.
|
|
150
|
-
* @property {string} id -
|
|
204
|
+
* @property {string} id - A string serving as the unique identifier.
|
|
151
205
|
*/
|
|
152
206
|
|
|
153
207
|
/**
|
|
@@ -160,14 +214,12 @@ const Joi = require("joi");
|
|
|
160
214
|
* where the serviceability is being specified.
|
|
161
215
|
* @property {string} [sector_code] - Code representing a specific sector or
|
|
162
216
|
* district within the city where the serviceability is being specified.
|
|
163
|
-
* @property {string} [pincode] -
|
|
164
|
-
*
|
|
217
|
+
* @property {string} [pincode] - A string indicating the postal code or PIN
|
|
218
|
+
* code of the address area.
|
|
165
219
|
* @property {boolean} [first_mile] - Boolean value indicating whether
|
|
166
220
|
* first-mile service is available or not.
|
|
167
221
|
* @property {boolean} [last_mile] - Boolean value indicating whether last-mile
|
|
168
222
|
* service is available or not.
|
|
169
|
-
* @property {boolean} [reverse_pickup] - Boolean value indicating whether a
|
|
170
|
-
* region is first-mile serviceable or not in return pickup.
|
|
171
223
|
* @property {number} [cod_limit] - Limit on the amount of cash on delivery
|
|
172
224
|
* (COD) payments allowed in the specified region.
|
|
173
225
|
* @property {boolean} [doorstep_return] - Indicates if doorstep return service
|
|
@@ -176,14 +228,28 @@ const Joi = require("joi");
|
|
|
176
228
|
* @property {boolean} [doorstep_qc] - Indicates if doorstep quality check
|
|
177
229
|
* service is available. This refers to the ability to perform quality checks
|
|
178
230
|
* on items at the customer's doorstep.
|
|
231
|
+
* @property {string} [forward_pickup_cutoff] - Time of day by which pickups
|
|
232
|
+
* must be scheduled to be processed on the same day in the forward journey.
|
|
179
233
|
* @property {string} [pickup_cutoff] - Time of day by which pickups must be
|
|
180
234
|
* scheduled to be processed on the same day.
|
|
235
|
+
* @property {string} [reverse_pickup_cutoff] - Time of day by which pickups
|
|
236
|
+
* must be scheduled to be processed on the same day in the reverse journey.
|
|
237
|
+
* @property {boolean} [hand_to_hand_exchange] - Indicates whether the product
|
|
238
|
+
* exchange happens directly between the buyer and seller (e.g., in person),
|
|
239
|
+
* instead of through a third-party service.
|
|
240
|
+
* @property {number} [prepaid_limit] - Limit on the amount of prepaid payments
|
|
241
|
+
* allowed in the specified region.
|
|
242
|
+
* @property {string[]} [holiday_list] - List of holidays for a courier partner scheme.
|
|
181
243
|
* @property {boolean} [installation] - Boolean value indicating whether
|
|
182
244
|
* installation services are available in the specified region or not.
|
|
183
245
|
*/
|
|
184
246
|
|
|
185
247
|
/**
|
|
186
248
|
* @typedef RegionTatDetails
|
|
249
|
+
* @property {number} [max_delivery_time] - Maximum time required for delivery
|
|
250
|
+
* from the origin to the destination in seconds.
|
|
251
|
+
* @property {number} [min_delivery_time] - Minimum time required for delivery
|
|
252
|
+
* from the origin to the destination in seconds.
|
|
187
253
|
* @property {string} from_country_code - ISO2 code representing the country of
|
|
188
254
|
* origin for the delivery.
|
|
189
255
|
* @property {string} [from_state_code] - Code representing the state or
|
|
@@ -192,7 +258,8 @@ const Joi = require("joi");
|
|
|
192
258
|
* within the state.
|
|
193
259
|
* @property {string} [from_sector_code] - Code representing a specific sector
|
|
194
260
|
* or district within the city of origin.
|
|
195
|
-
* @property {string} [from_pincode] -
|
|
261
|
+
* @property {string} [from_pincode] - A string indicating the postal code or
|
|
262
|
+
* PIN code of the address area.
|
|
196
263
|
* @property {string} to_country_code - ISO2 code representing the destination country.
|
|
197
264
|
* @property {string} [to_state_code] - Code representing the state or province
|
|
198
265
|
* of the destination within the country.
|
|
@@ -200,23 +267,18 @@ const Joi = require("joi");
|
|
|
200
267
|
* within the state.
|
|
201
268
|
* @property {string} [to_sector_code] - Code representing a specific sector or
|
|
202
269
|
* district within the city of destination.
|
|
203
|
-
* @property {string} [to_pincode] -
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* @property {
|
|
207
|
-
* from the origin to the destination in seconds.
|
|
270
|
+
* @property {string} [to_pincode] - A string indicating the postal code or PIN
|
|
271
|
+
* code of the address area.
|
|
272
|
+
* @property {TATDetails} [forward]
|
|
273
|
+
* @property {TATDetails} [reverse]
|
|
208
274
|
*/
|
|
209
275
|
|
|
210
276
|
/**
|
|
211
|
-
* @typedef
|
|
212
|
-
* @property {number} [max_delivery_time] - Maximum time required for delivery
|
|
213
|
-
* from the origin to the destination in seconds.
|
|
277
|
+
* @typedef RegionTatResult
|
|
214
278
|
* @property {number} [min_delivery_time] - Minimum time required for delivery
|
|
215
279
|
* from the origin to the destination in seconds.
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* @typedef RegionTatResult
|
|
280
|
+
* @property {number} [max_delivery_time] - Maximum time required for delivery
|
|
281
|
+
* from the origin to the destination in seconds.
|
|
220
282
|
* @property {string} from_country_code - ISO2 code representing the country of
|
|
221
283
|
* origin for the delivery.
|
|
222
284
|
* @property {string} [from_state_code] - Code representing the state or
|
|
@@ -225,7 +287,8 @@ const Joi = require("joi");
|
|
|
225
287
|
* within the state.
|
|
226
288
|
* @property {string} [from_sector_code] - Code representing a specific sector
|
|
227
289
|
* or district within the city of origin.
|
|
228
|
-
* @property {string} [from_pincode] -
|
|
290
|
+
* @property {string} [from_pincode] - A string indicating the postal code or
|
|
291
|
+
* PIN code of the address area.
|
|
229
292
|
* @property {string} to_country_code - ISO2 code representing the destination country.
|
|
230
293
|
* @property {string} [to_state_code] - Code representing the state or province
|
|
231
294
|
* of the destination within the country.
|
|
@@ -233,104 +296,91 @@ const Joi = require("joi");
|
|
|
233
296
|
* within the state.
|
|
234
297
|
* @property {string} [to_sector_code] - Code representing a specific sector or
|
|
235
298
|
* district within the city of destination.
|
|
236
|
-
* @property {string} [to_pincode] -
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* @property {
|
|
240
|
-
*
|
|
241
|
-
* @property {string} id - Unique identifier for the delivery time record.
|
|
299
|
+
* @property {string} [to_pincode] - A string indicating the postal code or PIN
|
|
300
|
+
* code of the address area.
|
|
301
|
+
* @property {TATDetails} [forward]
|
|
302
|
+
* @property {TATDetails} [reverse]
|
|
303
|
+
* @property {string} id - A string serving as the unique identifier.
|
|
242
304
|
*/
|
|
243
305
|
|
|
244
306
|
/**
|
|
245
307
|
* @typedef BulkRegionJobDetails
|
|
246
|
-
* @property {string} [file_path] -
|
|
247
|
-
* @property {string} country - Country
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
* @property {string} region - Region
|
|
251
|
-
* is triggered.
|
|
308
|
+
* @property {string} [file_path] - Path to the file used in the bulk operation.
|
|
309
|
+
* @property {string} country - Country involved in the bulk operation.
|
|
310
|
+
* @property {string} action - Action type for the bulk operation, either import
|
|
311
|
+
* or export.
|
|
312
|
+
* @property {string} region - Region involved in the bulk operation.
|
|
252
313
|
*/
|
|
253
314
|
|
|
254
315
|
/**
|
|
255
316
|
* @typedef BulkRegionResultItemData
|
|
256
|
-
* @property {string}
|
|
257
|
-
* @property {number} [failed] -
|
|
258
|
-
* @property {Object[]} [failed_records] -
|
|
259
|
-
*
|
|
260
|
-
* @property {string}
|
|
261
|
-
* @property {string}
|
|
262
|
-
*
|
|
263
|
-
* @property {number} [success] -
|
|
264
|
-
*
|
|
265
|
-
* @property {string}
|
|
266
|
-
*
|
|
267
|
-
* @property {string}
|
|
268
|
-
* @property {number} [total] - Count of total records.
|
|
269
|
-
* @property {string} [error_file_path] - Path of the error file.
|
|
317
|
+
* @property {string} file_path - Path to the file associated with the result item.
|
|
318
|
+
* @property {number} [failed] - Number of failed records in the operation.
|
|
319
|
+
* @property {Object[]} [failed_records] - Array of failed records with
|
|
320
|
+
* additional properties.
|
|
321
|
+
* @property {string} action - Action type for the result item.
|
|
322
|
+
* @property {string} batch_id - A unique identifier for the performed batch operation.
|
|
323
|
+
* @property {string} country - Country associated with the result item.
|
|
324
|
+
* @property {number} [success] - Number of successful records in the operation.
|
|
325
|
+
* @property {string} region - Region associated with the result item.
|
|
326
|
+
* @property {string} status - Current status of the result item.
|
|
327
|
+
* @property {number} [total] - Total number of records processed.
|
|
328
|
+
* @property {string} [error_file_path] - Path to the file containing error details.
|
|
270
329
|
*/
|
|
271
330
|
|
|
272
331
|
/**
|
|
273
332
|
* @typedef BulkRegionResult
|
|
274
|
-
* @property {BulkRegionResultItemData[]} items
|
|
333
|
+
* @property {BulkRegionResultItemData[]} items - Array of bulk region result items.
|
|
275
334
|
* @property {Page} page
|
|
276
335
|
*/
|
|
277
336
|
|
|
278
|
-
/**
|
|
279
|
-
* @typedef CourierAccount
|
|
280
|
-
* @property {string} extension_id - Unique identifier of courier partner extension.
|
|
281
|
-
* @property {string} account_id - Unique identifier of courier partner scheme
|
|
282
|
-
* and company id combination.
|
|
283
|
-
* @property {string} scheme_id - Unique identifier of courier partner scheme.
|
|
284
|
-
* @property {boolean} is_self_ship - Denotes if the account is of self delivery type.
|
|
285
|
-
* @property {string} stage - Denotes whether the account is in enabled or disabled stage.
|
|
286
|
-
* @property {boolean} is_own_account - Denotes whether it is the seller's own
|
|
287
|
-
* account or not.
|
|
288
|
-
*/
|
|
289
|
-
|
|
290
337
|
/**
|
|
291
338
|
* @typedef CourierAccountDetailsBody
|
|
292
|
-
* @property {string} extension_id -
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
* @property {string} scheme_id -
|
|
296
|
-
*
|
|
297
|
-
* @property {
|
|
298
|
-
*
|
|
299
|
-
* @property {
|
|
300
|
-
*
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* @typedef CourierPartnerAccountFailureResult
|
|
305
|
-
* @property {boolean} success
|
|
306
|
-
* @property {ErrorResult[]} error
|
|
339
|
+
* @property {string} extension_id - The unique identifier for the extension
|
|
340
|
+
* linked to the courier account.
|
|
341
|
+
* @property {string} [account_id] - The unique identifier for the courier account.
|
|
342
|
+
* @property {string} scheme_id - The identifier for the scheme associated with
|
|
343
|
+
* the courier account.
|
|
344
|
+
* @property {boolean} is_self_ship - Indicates whether the courier account
|
|
345
|
+
* supports self-shipping (true if it does, false otherwise).
|
|
346
|
+
* @property {string} stage - The current stage of the courier account, either
|
|
347
|
+
* 'enabled' or 'disabled'.
|
|
348
|
+
* @property {boolean} is_own_account - Indicates whether the courier account is
|
|
349
|
+
* an own account (true if it is, false otherwise).
|
|
307
350
|
*/
|
|
308
351
|
|
|
309
352
|
/**
|
|
310
353
|
* @typedef CompanyCourierPartnerAccountListResult
|
|
311
|
-
* @property {CourierAccountResult[]} items
|
|
354
|
+
* @property {CourierAccountResult[]} items - An array containing multiple
|
|
355
|
+
* instances of CourierAccountResult, which details individual courier accounts.
|
|
312
356
|
* @property {Page} page
|
|
313
357
|
*/
|
|
314
358
|
|
|
315
359
|
/**
|
|
316
360
|
* @typedef CourierAccountResult
|
|
317
|
-
* @property {string} account_id -
|
|
318
|
-
*
|
|
319
|
-
* @property {string} scheme_id -
|
|
320
|
-
*
|
|
321
|
-
* @property {string}
|
|
322
|
-
*
|
|
323
|
-
* @property {boolean}
|
|
324
|
-
*
|
|
361
|
+
* @property {string} account_id - A string that uniquely identifies the courier account.
|
|
362
|
+
* @property {number} [company_id] - The unique identifier of the company.
|
|
363
|
+
* @property {string} scheme_id - A string that specifies the unique identifier
|
|
364
|
+
* for the scheme associated with the account
|
|
365
|
+
* @property {string} [extension_id] - A string that uniquely identifies the
|
|
366
|
+
* courier partner extension.
|
|
367
|
+
* @property {boolean} is_self_ship - A boolean indicating whether the account
|
|
368
|
+
* is for self-shipping.
|
|
369
|
+
* @property {string} stage - A string indicating the current stage of the
|
|
370
|
+
* account, which can be either enabled or disabled.
|
|
371
|
+
* @property {boolean} is_own_account - A boolean indicating whether the account
|
|
372
|
+
* is owned by the company.
|
|
325
373
|
* @property {CourierPartnerSchemeModel} scheme_rules
|
|
326
374
|
*/
|
|
327
375
|
|
|
328
376
|
/**
|
|
329
|
-
* @typedef
|
|
377
|
+
* @typedef CourierPartnerSchemeDetailsModel
|
|
330
378
|
* @property {string} extension_id - Unique identifier of courier partner extension.
|
|
331
|
-
* @property {string} scheme_id - Unique identifier
|
|
332
|
-
*
|
|
379
|
+
* @property {string} [scheme_id] - Unique identifier for the scheme, used to
|
|
380
|
+
* fetch or modify scheme details.
|
|
381
|
+
* @property {string} name - Name of the scheme.
|
|
333
382
|
* @property {ArithmeticOperations} weight
|
|
383
|
+
* @property {ArithmeticOperations} [volumetric_weight]
|
|
334
384
|
* @property {string} transport_type - Mode of transport associated with the
|
|
335
385
|
* courier partner scheme.
|
|
336
386
|
* @property {string} region - Serviceable region associated with the courier
|
|
@@ -341,15 +391,29 @@ const Joi = require("joi");
|
|
|
341
391
|
* courier partner scheme.
|
|
342
392
|
* @property {string} stage - Indicates if the courier partner scheme is
|
|
343
393
|
* currently active or inactive.
|
|
394
|
+
* @property {string} [status_updates] - Describes the type of status updates
|
|
395
|
+
* provided by the courier partner (e.g., real-time, periodic).
|
|
396
|
+
* @property {number} [ndr_attempts] - Indicates if the Non-Delivery Report
|
|
397
|
+
* (NDR) feature is supported by the courier partner.
|
|
398
|
+
* @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity
|
|
399
|
+
* of items allowed in a quality check shipment.
|
|
400
|
+
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
401
|
+
* quantity of items allowed in a non-quality check shipment.
|
|
344
402
|
* @property {CourierPartnerSchemeFeatures} feature
|
|
345
403
|
*/
|
|
346
404
|
|
|
347
405
|
/**
|
|
348
|
-
* @typedef
|
|
349
|
-
* @property {string} extension_id - Unique identifier of courier partner extension.
|
|
406
|
+
* @typedef CourierPartnerPutSchema
|
|
407
|
+
* @property {string} [extension_id] - Unique identifier of courier partner extension.
|
|
408
|
+
* @property {CreatedBy} [created_by]
|
|
409
|
+
* @property {ModifiedBy} [modified_by]
|
|
410
|
+
* @property {string} [created_on] - The timestamp when the record was created.
|
|
411
|
+
* @property {string} [modified_on] - The timestamp when the record last modified.
|
|
350
412
|
* @property {string} [scheme_id] - Unique identifier of courier partner scheme.
|
|
351
|
-
* @property {string}
|
|
413
|
+
* @property {string} [company_id] - Unique identifier of company.
|
|
414
|
+
* @property {string} name - Name of the scheme.
|
|
352
415
|
* @property {ArithmeticOperations} weight
|
|
416
|
+
* @property {ArithmeticOperations} [volumetric_weight]
|
|
353
417
|
* @property {string} transport_type - Mode of transport associated with the
|
|
354
418
|
* courier partner scheme.
|
|
355
419
|
* @property {string} region - Serviceable region associated with the courier
|
|
@@ -360,56 +424,100 @@ const Joi = require("joi");
|
|
|
360
424
|
* courier partner scheme.
|
|
361
425
|
* @property {string} stage - Indicates if the courier partner scheme is
|
|
362
426
|
* currently active or inactive.
|
|
427
|
+
* @property {string} [status_updates] - Describes the type of status updates
|
|
428
|
+
* provided by the courier partner (e.g., real-time, periodic).
|
|
429
|
+
* @property {number} [ndr_attempts] - Indicates if the Non-Delivery Report
|
|
430
|
+
* (NDR) feature is supported by the courier partner.
|
|
431
|
+
* @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity
|
|
432
|
+
* of items allowed in a quality check shipment.
|
|
433
|
+
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
434
|
+
* quantity of items allowed in a non-quality check shipment.
|
|
363
435
|
* @property {CourierPartnerSchemeFeatures} feature
|
|
364
436
|
*/
|
|
365
437
|
|
|
366
438
|
/**
|
|
367
|
-
* @typedef
|
|
368
|
-
* @property {
|
|
369
|
-
*
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
*
|
|
374
|
-
* @property {
|
|
375
|
-
*
|
|
376
|
-
* @property {
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
* supports doorstep exchange services.
|
|
388
|
-
* @property {boolean} [doorstep_return] - Specifies if the courier partner
|
|
389
|
-
* offers doorstep return services.
|
|
390
|
-
* @property {boolean} [product_installation] - Indicates if the courier partner
|
|
391
|
-
* provides product installation services upon delivery.
|
|
392
|
-
* @property {boolean} [openbox_delivery] - Specifies whether the courier
|
|
393
|
-
* partner supports open-box delivery, allowing customers to inspect goods
|
|
394
|
-
* before accepting.
|
|
439
|
+
* @typedef CourierPartnerSchemeList
|
|
440
|
+
* @property {CourierPartnerSchemeModelSchema[]} items - List of courier partner schemes
|
|
441
|
+
* @property {Page} page
|
|
442
|
+
*/
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* @typedef CourierPartnerSchemeUpdateDetails
|
|
446
|
+
* @property {string} name - Name of the scheme.
|
|
447
|
+
* @property {ArithmeticOperations} weight
|
|
448
|
+
* @property {ArithmeticOperations} [volumetric_weight]
|
|
449
|
+
* @property {string} transport_type - Mode of transport associated with the
|
|
450
|
+
* courier partner scheme.
|
|
451
|
+
* @property {string} region - Serviceable region associated with the courier
|
|
452
|
+
* partner scheme.
|
|
453
|
+
* @property {string} delivery_type - Type of delivery associated with the
|
|
454
|
+
* courier partner scheme.
|
|
455
|
+
* @property {string[]} payment_mode - Mode of payment associated with the
|
|
456
|
+
* courier partner scheme.
|
|
457
|
+
* @property {string} stage - Indicates if the courier partner scheme is
|
|
458
|
+
* currently active or inactive.
|
|
395
459
|
* @property {string} [status_updates] - Describes the type of status updates
|
|
396
460
|
* provided by the courier partner (e.g., real-time, periodic).
|
|
397
|
-
* @property {
|
|
398
|
-
*
|
|
399
|
-
* @property {boolean} [single_pick_multi_drop] - Indicates whether the courier
|
|
400
|
-
* partner supports single pickup to multiple drop locations.
|
|
401
|
-
* @property {boolean} [multi_pick_multi_drop] - Denotes if the courier partner
|
|
402
|
-
* offers services for multiple pickups to multiple drop locations.
|
|
403
|
-
* @property {boolean} [ewaybill] - Specifies if the courier partner requires or
|
|
404
|
-
* supports the generation of e-waybills for shipments.
|
|
461
|
+
* @property {number} [ndr_attempts] - Indicates if the Non-Delivery Report
|
|
462
|
+
* (NDR) feature is supported by the courier partner.
|
|
405
463
|
* @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity
|
|
406
464
|
* of items allowed in a quality check shipment.
|
|
407
465
|
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
408
466
|
* quantity of items allowed in a non-quality check shipment.
|
|
467
|
+
* @property {CourierPartnerSchemeFeatures} feature
|
|
468
|
+
*/
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* @typedef GetCountries
|
|
472
|
+
* @property {GetCountriesItems[]} items - A list of country objects containing
|
|
473
|
+
* detailed information about each country.
|
|
474
|
+
* @property {Page} page
|
|
475
|
+
*/
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* @typedef TATUpdateDetails
|
|
479
|
+
* @property {number} [max_delivery_time] - Maximum time required for delivery
|
|
480
|
+
* from the origin to the destination in seconds.
|
|
481
|
+
* @property {number} [min_delivery_time] - Minimum time required for delivery
|
|
482
|
+
* from the origin to the destination in seconds.
|
|
483
|
+
* @property {TATDetails} [forward]
|
|
484
|
+
* @property {TATDetails} [reverse]
|
|
485
|
+
*/
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* @typedef StandardError
|
|
489
|
+
* @property {string} message - A brief description of the error.
|
|
490
|
+
*/
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* @typedef ValidationErrors
|
|
494
|
+
* @property {ValidationError[]} errors
|
|
495
|
+
*/
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* @typedef CreatedBy
|
|
499
|
+
* @property {string} [id] - Identifier of the user or system that created the object.
|
|
500
|
+
*/
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* @typedef ModifiedBy
|
|
504
|
+
* @property {string} [id] - Identifier of the user or system that created the object.
|
|
409
505
|
*/
|
|
410
506
|
|
|
411
507
|
/**
|
|
412
|
-
* @typedef
|
|
508
|
+
* @typedef ArithmeticOperations
|
|
509
|
+
* @property {number} [lt] - Specifies a less than operation, comparing values
|
|
510
|
+
* smaller than the provided value.
|
|
511
|
+
* @property {number} [gt] - Specifies a greater than operation, comparing
|
|
512
|
+
* values larger than the provided value.
|
|
513
|
+
* @property {number} [lte] - Specifies a less than or equal to operation,
|
|
514
|
+
* comparing values smaller than or equal to the provided value.
|
|
515
|
+
* @property {number} [gte] - Specifies a greater than or equal to operation,
|
|
516
|
+
* comparing values larger than or equal to the provided value.
|
|
517
|
+
*/
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* @typedef CourierPartnerSchemeFeatures
|
|
413
521
|
* @property {boolean} [doorstep_qc] - Indicates if the courier partner offers
|
|
414
522
|
* doorstep quality check services.
|
|
415
523
|
* @property {boolean} [qr] - Specifies whether the courier partner supports QR
|
|
@@ -418,6 +526,8 @@ const Joi = require("joi");
|
|
|
418
526
|
* multi-part shipment services.
|
|
419
527
|
* @property {boolean} [ndr] - Indicates if the Non-Delivery Report (NDR)
|
|
420
528
|
* feature is supported by the courier partner.
|
|
529
|
+
* @property {number} [ndr_attempts] - Number of attempts allowed for resolving
|
|
530
|
+
* Non-Delivery Reports (NDR).
|
|
421
531
|
* @property {boolean} [dangerous_goods] - Specifies if the courier partner
|
|
422
532
|
* handles the transportation of dangerous goods.
|
|
423
533
|
* @property {boolean} [fragile_goods] - Indicates whether the courier partner
|
|
@@ -435,6 +545,8 @@ const Joi = require("joi");
|
|
|
435
545
|
* @property {boolean} [openbox_delivery] - Specifies whether the courier
|
|
436
546
|
* partner supports open-box delivery, allowing customers to inspect goods
|
|
437
547
|
* before accepting.
|
|
548
|
+
* @property {string} [status_updates] - Describes the type of status updates
|
|
549
|
+
* provided by the courier partner (e.g., real-time, periodic).
|
|
438
550
|
* @property {boolean} [multi_pick_single_drop] - Indicates if the courier
|
|
439
551
|
* partner supports multiple pickups to a single drop location.
|
|
440
552
|
* @property {boolean} [single_pick_multi_drop] - Indicates whether the courier
|
|
@@ -443,141 +555,96 @@ const Joi = require("joi");
|
|
|
443
555
|
* offers services for multiple pickups to multiple drop locations.
|
|
444
556
|
* @property {boolean} [ewaybill] - Specifies if the courier partner requires or
|
|
445
557
|
* supports the generation of e-waybills for shipments.
|
|
446
|
-
*/
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* @typedef CourierPartnerSchemeV2DetailsModel
|
|
450
|
-
* @property {string} extension_id - Unique identifier of courier partner extension.
|
|
451
|
-
* @property {string} [scheme_id] - Unique identifier of courier partner scheme.
|
|
452
|
-
* @property {string} name - Name of the scheme.
|
|
453
|
-
* @property {ArithmeticOperations} weight
|
|
454
|
-
* @property {ArithmeticOperations} [volumetric_weight]
|
|
455
|
-
* @property {string} transport_type - Mode of transport associated with the
|
|
456
|
-
* courier partner scheme.
|
|
457
|
-
* @property {string} region - Serviceable region associated with the courier
|
|
458
|
-
* partner scheme.
|
|
459
|
-
* @property {string} delivery_type - Type of delivery associated with the
|
|
460
|
-
* courier partner scheme.
|
|
461
|
-
* @property {string[]} payment_mode - Mode of payment associated with the
|
|
462
|
-
* courier partner scheme.
|
|
463
|
-
* @property {string} stage - Indicates if the courier partner scheme is
|
|
464
|
-
* currently active or inactive.
|
|
465
|
-
* @property {string} [status_updates] - Describes the type of status updates
|
|
466
|
-
* provided by the courier partner (e.g., real-time, periodic).
|
|
467
|
-
* @property {number} [ndr_attempts] - Indicates if the Non-Delivery Report
|
|
468
|
-
* (NDR) feature is supported by the courier partner.
|
|
469
558
|
* @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity
|
|
470
559
|
* of items allowed in a quality check shipment.
|
|
471
560
|
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
472
561
|
* quantity of items allowed in a non-quality check shipment.
|
|
473
|
-
* @property {CourierPartnerSchemeV2Features} feature
|
|
474
562
|
*/
|
|
475
563
|
|
|
476
564
|
/**
|
|
477
|
-
* @typedef
|
|
478
|
-
* @property {string}
|
|
479
|
-
* @property {string}
|
|
480
|
-
* @property {string} [
|
|
481
|
-
* @property {string} name - Name of the scheme.
|
|
482
|
-
* @property {ArithmeticOperations} weight
|
|
483
|
-
* @property {ArithmeticOperations} [volumetric_weight]
|
|
484
|
-
* @property {string} transport_type - Mode of transport associated with the
|
|
485
|
-
* courier partner scheme.
|
|
486
|
-
* @property {string} region - Serviceable region associated with the courier
|
|
487
|
-
* partner scheme.
|
|
488
|
-
* @property {string} delivery_type - Type of delivery associated with the
|
|
489
|
-
* courier partner scheme.
|
|
490
|
-
* @property {string[]} payment_mode - Mode of payment associated with the
|
|
491
|
-
* courier partner scheme.
|
|
492
|
-
* @property {string} stage - Indicates if the courier partner scheme is
|
|
493
|
-
* currently active or inactive.
|
|
494
|
-
* @property {string} [status_updates] - Describes the type of status updates
|
|
495
|
-
* provided by the courier partner (e.g., real-time, periodic).
|
|
496
|
-
* @property {number} [ndr_attempts] - Indicates if the Non-Delivery Report
|
|
497
|
-
* (NDR) feature is supported by the courier partner.
|
|
498
|
-
* @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity
|
|
499
|
-
* of items allowed in a quality check shipment.
|
|
500
|
-
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
501
|
-
* quantity of items allowed in a non-quality check shipment.
|
|
502
|
-
* @property {CourierPartnerSchemeV2Features} feature
|
|
565
|
+
* @typedef Error
|
|
566
|
+
* @property {string} [type] - The type of the error.
|
|
567
|
+
* @property {string} [value] - The value associated with the error.
|
|
568
|
+
* @property {string} [message] - The error message describing the issue.
|
|
503
569
|
*/
|
|
504
570
|
|
|
505
571
|
/**
|
|
506
|
-
* @typedef
|
|
507
|
-
* @property {
|
|
508
|
-
* @property {
|
|
572
|
+
* @typedef Page
|
|
573
|
+
* @property {number} [item_total] - The total number of items on the page.
|
|
574
|
+
* @property {string} [next_id] - The identifier for the next page.
|
|
575
|
+
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
576
|
+
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
577
|
+
* @property {number} [current] - The current page number.
|
|
578
|
+
* @property {string} type - The type of the page, such as 'PageType'.
|
|
579
|
+
* @property {number} [size] - The number of items per page.
|
|
580
|
+
* @property {number} [page_size] - The number of items per page.
|
|
509
581
|
*/
|
|
510
582
|
|
|
511
583
|
/**
|
|
512
|
-
* @typedef
|
|
513
|
-
* @property {number} [
|
|
514
|
-
*
|
|
515
|
-
* @property {number} [
|
|
516
|
-
*
|
|
584
|
+
* @typedef TATDetails
|
|
585
|
+
* @property {number} [max_delivery_time] - Maximum time required for delivery
|
|
586
|
+
* from the origin to the destination in seconds.
|
|
587
|
+
* @property {number} [min_delivery_time] - Minimum time required for delivery
|
|
588
|
+
* from the origin to the destination in seconds.
|
|
517
589
|
*/
|
|
518
590
|
|
|
519
591
|
/**
|
|
520
|
-
* @typedef
|
|
521
|
-
* @property {string}
|
|
592
|
+
* @typedef CourierPartnerSchemeModel
|
|
593
|
+
* @property {string} extension_id - Unique identifier of courier partner extension.
|
|
594
|
+
* @property {string} scheme_id - A string representing the unique identifier
|
|
595
|
+
* for the scheme. This is a required field.
|
|
596
|
+
* @property {string} name - A string that specifies the name of the scheme.
|
|
597
|
+
* This is a required field.
|
|
522
598
|
* @property {ArithmeticOperations} weight
|
|
523
599
|
* @property {ArithmeticOperations} [volumetric_weight]
|
|
524
|
-
* @property {string} transport_type -
|
|
525
|
-
*
|
|
526
|
-
* @property {string}
|
|
527
|
-
*
|
|
528
|
-
*
|
|
529
|
-
*
|
|
530
|
-
* @property {
|
|
531
|
-
* courier partner scheme.
|
|
532
|
-
* @property {string} stage - Indicates if the courier partner scheme is
|
|
533
|
-
* currently active or inactive.
|
|
534
|
-
* @property {string} [status_updates] - Describes the type of status updates
|
|
535
|
-
* provided by the courier partner (e.g., real-time, periodic).
|
|
536
|
-
* @property {number} [ndr_attempts] - Indicates if the Non-Delivery Report
|
|
537
|
-
* (NDR) feature is supported by the courier partner.
|
|
538
|
-
* @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity
|
|
539
|
-
* of items allowed in a quality check shipment.
|
|
540
|
-
* @property {number} [non_qc_shipment_item_quantity] - Defines the maximum
|
|
541
|
-
* quantity of items allowed in a non-quality check shipment.
|
|
542
|
-
* @property {CourierPartnerSchemeV2Features} feature
|
|
543
|
-
*/
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* @typedef GetCountries
|
|
547
|
-
* @property {GetCountriesItems[]} items
|
|
548
|
-
* @property {Page} page
|
|
600
|
+
* @property {string} transport_type - A string that specifies the type of transport.
|
|
601
|
+
* @property {string} region - A string that indicates the region type.
|
|
602
|
+
* @property {string} delivery_type - A string that defines the delivery type.
|
|
603
|
+
* @property {string[]} payment_mode - An array of strings specifying the
|
|
604
|
+
* payment modes available.
|
|
605
|
+
* @property {string} stage - A string indicating the current stage of the scheme.
|
|
606
|
+
* @property {CourierPartnerSchemeFeatures} feature
|
|
549
607
|
*/
|
|
550
608
|
|
|
551
609
|
/**
|
|
552
610
|
* @typedef GetCountriesItems
|
|
553
|
-
* @property {string} [id] -
|
|
554
|
-
* @property {string} [
|
|
555
|
-
*
|
|
556
|
-
* @property {string} [
|
|
557
|
-
* @property {string
|
|
558
|
-
*
|
|
559
|
-
* @property {
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
* @property {
|
|
563
|
-
*
|
|
564
|
-
* @property {string} [
|
|
565
|
-
* @property {
|
|
566
|
-
* @property {string} [
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
* @property {string} [
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
*
|
|
611
|
+
* @property {string} [id] - A string serving as the unique identifier.
|
|
612
|
+
* @property {string} [sub_type] - A category for classifying the country into a
|
|
613
|
+
* specific subtype.
|
|
614
|
+
* @property {string} [uid] - A globally unique identifier for the country.
|
|
615
|
+
* @property {string} [name] - The official or widely recognized name of the
|
|
616
|
+
* country used in general contexts.
|
|
617
|
+
* @property {string} [iso2] - The 2-letter ISO code for the country.
|
|
618
|
+
* @property {string} [iso3] - The 3-letter ISO code for the country.
|
|
619
|
+
* @property {string[]} [timezones] - A list of timezones associated with the country.
|
|
620
|
+
* @property {HierarchyItems[]} [hierarchy] - A hierarchical list of items
|
|
621
|
+
* representing organizational levels within the country.
|
|
622
|
+
* @property {string} [phone_code] - A country-specific phone code.
|
|
623
|
+
* @property {CurrencyObject} [currency]
|
|
624
|
+
* @property {string} [type] - The type or classification of the country (e.g.,
|
|
625
|
+
* sovereign or dependent).
|
|
626
|
+
* @property {string} [latitude] - The latitude of the central point of the country.
|
|
627
|
+
* @property {string} [longitude] - The longitude of the central point of the country.
|
|
628
|
+
* @property {string} [display_name] - A user-friendly name for the country,
|
|
629
|
+
* typically for display purposes.
|
|
630
|
+
* @property {boolean} [has_next_hierarchy] - A boolean indicating whether
|
|
631
|
+
* additional hierarchical regions or divisions are present.
|
|
574
632
|
*/
|
|
575
633
|
|
|
576
634
|
/**
|
|
577
635
|
* @typedef HierarchyItems
|
|
636
|
+
* @property {string} [name] - The name of the item as displayed to the user,
|
|
637
|
+
* usually in a UI or listing.
|
|
578
638
|
* @property {string} [display_name] - It represent a country display name.
|
|
579
|
-
* @property {string} [slug] - A
|
|
580
|
-
*
|
|
639
|
+
* @property {string} [slug] - A slug is a human-readable URL segment, typically
|
|
640
|
+
* generated from a title with special characters removed.
|
|
641
|
+
*/
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* @typedef CurrencyObject
|
|
645
|
+
* @property {string} [code] - A string representing the currency code.
|
|
646
|
+
* @property {string} [name] - A string representing the currency name.
|
|
647
|
+
* @property {string} [symbol] - A string representing the currency symbol.
|
|
581
648
|
*/
|
|
582
649
|
|
|
583
650
|
/**
|
|
@@ -586,12 +653,33 @@ const Joi = require("joi");
|
|
|
586
653
|
* @property {string} field - The field in the request that caused the error.
|
|
587
654
|
*/
|
|
588
655
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
656
|
+
class LogisticsPartnerModel {
|
|
657
|
+
/** @returns {CourierPartnerSchemeModelSchema} */
|
|
658
|
+
static CourierPartnerSchemeModelSchema() {
|
|
659
|
+
return Joi.object({
|
|
660
|
+
created_by: LogisticsPartnerModel.CreatedBy(),
|
|
661
|
+
created_on: Joi.string().allow(""),
|
|
662
|
+
modified_by: LogisticsPartnerModel.ModifiedBy(),
|
|
663
|
+
modified_on: Joi.string().allow(""),
|
|
664
|
+
extension_id: Joi.string().allow(""),
|
|
665
|
+
scheme_id: Joi.string().allow(""),
|
|
666
|
+
company_id: Joi.string().allow(""),
|
|
667
|
+
name: Joi.string().allow("").required(),
|
|
668
|
+
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
669
|
+
volumetric_weight: LogisticsPartnerModel.ArithmeticOperations(),
|
|
670
|
+
transport_type: Joi.string().allow("").required(),
|
|
671
|
+
region: Joi.string().allow("").required(),
|
|
672
|
+
delivery_type: Joi.string().allow("").required(),
|
|
673
|
+
payment_mode: Joi.array().items(Joi.string().allow("")).required(),
|
|
674
|
+
stage: Joi.string().allow("").required(),
|
|
675
|
+
status_updates: Joi.string().allow(""),
|
|
676
|
+
ndr_attempts: Joi.number(),
|
|
677
|
+
qc_shipment_item_quantity: Joi.number().allow(null),
|
|
678
|
+
non_qc_shipment_item_quantity: Joi.number().allow(null),
|
|
679
|
+
feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
|
|
680
|
+
});
|
|
681
|
+
}
|
|
593
682
|
|
|
594
|
-
class LogisticsPartnerModel {
|
|
595
683
|
/** @returns {BulkRegionServiceabilityTatDetails} */
|
|
596
684
|
static BulkRegionServiceabilityTatDetails() {
|
|
597
685
|
return Joi.object({
|
|
@@ -614,20 +702,26 @@ class LogisticsPartnerModel {
|
|
|
614
702
|
});
|
|
615
703
|
}
|
|
616
704
|
|
|
617
|
-
/** @returns {
|
|
618
|
-
static
|
|
705
|
+
/** @returns {CommonErrorResult} */
|
|
706
|
+
static CommonErrorResult() {
|
|
619
707
|
return Joi.object({
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
708
|
+
error: Joi.array().items(LogisticsPartnerModel.Error()),
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/** @returns {BulkFailureResult} */
|
|
713
|
+
static BulkFailureResult() {
|
|
714
|
+
return Joi.object({
|
|
715
|
+
success: Joi.boolean(),
|
|
716
|
+
error: Joi.array().items(LogisticsPartnerModel.Error()).required(),
|
|
623
717
|
});
|
|
624
718
|
}
|
|
625
719
|
|
|
626
720
|
/** @returns {FailureResult} */
|
|
627
721
|
static FailureResult() {
|
|
628
722
|
return Joi.object({
|
|
629
|
-
success: Joi.boolean()
|
|
630
|
-
error: Joi.array().items(LogisticsPartnerModel.
|
|
723
|
+
success: Joi.boolean(),
|
|
724
|
+
error: Joi.array().items(LogisticsPartnerModel.Error()),
|
|
631
725
|
});
|
|
632
726
|
}
|
|
633
727
|
|
|
@@ -641,30 +735,6 @@ class LogisticsPartnerModel {
|
|
|
641
735
|
});
|
|
642
736
|
}
|
|
643
737
|
|
|
644
|
-
/** @returns {Page} */
|
|
645
|
-
static Page() {
|
|
646
|
-
return Joi.object({
|
|
647
|
-
item_total: Joi.number(),
|
|
648
|
-
next_id: Joi.string().allow(""),
|
|
649
|
-
has_previous: Joi.boolean(),
|
|
650
|
-
has_next: Joi.boolean(),
|
|
651
|
-
current: Joi.number(),
|
|
652
|
-
type: Joi.string().allow("").required(),
|
|
653
|
-
size: Joi.number(),
|
|
654
|
-
});
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
/** @returns {CourierAccountUpdateDetails} */
|
|
658
|
-
static CourierAccountUpdateDetails() {
|
|
659
|
-
return Joi.object({
|
|
660
|
-
extension_id: Joi.string().allow("").required(),
|
|
661
|
-
scheme_id: Joi.string().allow("").required(),
|
|
662
|
-
is_self_ship: Joi.boolean().required(),
|
|
663
|
-
stage: Joi.string().allow("").required(),
|
|
664
|
-
is_own_account: Joi.boolean().required(),
|
|
665
|
-
});
|
|
666
|
-
}
|
|
667
|
-
|
|
668
738
|
/** @returns {RegionTatItemResult} */
|
|
669
739
|
static RegionTatItemResult() {
|
|
670
740
|
return Joi.object({
|
|
@@ -688,13 +758,23 @@ class LogisticsPartnerModel {
|
|
|
688
758
|
/** @returns {ServiceabilityDetailsResult} */
|
|
689
759
|
static ServiceabilityDetailsResult() {
|
|
690
760
|
return Joi.object({
|
|
761
|
+
pickup_cutoff: Joi.string().allow("").allow(null),
|
|
762
|
+
country_code: Joi.string().allow(""),
|
|
763
|
+
state_code: Joi.string().allow(""),
|
|
764
|
+
city_code: Joi.string().allow(""),
|
|
765
|
+
sector_code: Joi.string().allow(""),
|
|
766
|
+
pincode: Joi.string().allow(""),
|
|
691
767
|
first_mile: Joi.boolean(),
|
|
692
768
|
last_mile: Joi.boolean(),
|
|
693
|
-
reverse_pickup: Joi.boolean().allow(null),
|
|
694
769
|
cod_limit: Joi.number(),
|
|
770
|
+
prepaid_limit: Joi.number(),
|
|
695
771
|
doorstep_return: Joi.boolean(),
|
|
696
772
|
doorstep_qc: Joi.boolean(),
|
|
697
|
-
|
|
773
|
+
forward_pickup_cutoff: Joi.string().allow(""),
|
|
774
|
+
reverse_pickup_cutoff: Joi.string().allow(""),
|
|
775
|
+
hand_to_hand_exchange: Joi.boolean(),
|
|
776
|
+
holiday_list: Joi.array().items(Joi.string().allow("")),
|
|
777
|
+
reverse_pickup: Joi.boolean().allow(null),
|
|
698
778
|
installation: Joi.boolean(),
|
|
699
779
|
id: Joi.string().allow(""),
|
|
700
780
|
});
|
|
@@ -705,18 +785,22 @@ class LogisticsPartnerModel {
|
|
|
705
785
|
return Joi.object({
|
|
706
786
|
first_mile: Joi.boolean(),
|
|
707
787
|
last_mile: Joi.boolean(),
|
|
708
|
-
reverse_pickup: Joi.boolean().allow(null),
|
|
709
788
|
cod_limit: Joi.number(),
|
|
710
789
|
doorstep_return: Joi.boolean(),
|
|
711
790
|
doorstep_qc: Joi.boolean(),
|
|
712
|
-
|
|
791
|
+
forward_pickup_cutoff: Joi.string().allow(""),
|
|
792
|
+
reverse_pickup_cutoff: Joi.string().allow(""),
|
|
793
|
+
hand_to_hand_exchange: Joi.boolean(),
|
|
794
|
+
holiday_list: Joi.array().items(Joi.string().allow("")),
|
|
713
795
|
installation: Joi.boolean(),
|
|
796
|
+
pickup_cutoff: Joi.string().allow("").allow(null),
|
|
714
797
|
});
|
|
715
798
|
}
|
|
716
799
|
|
|
717
800
|
/** @returns {RegionServiceabilityResult} */
|
|
718
801
|
static RegionServiceabilityResult() {
|
|
719
802
|
return Joi.object({
|
|
803
|
+
pickup_cutoff: Joi.string().allow("").allow(null),
|
|
720
804
|
country_code: Joi.string().allow("").required(),
|
|
721
805
|
state_code: Joi.string().allow(""),
|
|
722
806
|
city_code: Joi.string().allow(""),
|
|
@@ -724,11 +808,15 @@ class LogisticsPartnerModel {
|
|
|
724
808
|
pincode: Joi.string().allow(""),
|
|
725
809
|
first_mile: Joi.boolean(),
|
|
726
810
|
last_mile: Joi.boolean(),
|
|
727
|
-
reverse_pickup: Joi.boolean().allow(null),
|
|
728
811
|
cod_limit: Joi.number(),
|
|
812
|
+
prepaid_limit: Joi.number(),
|
|
729
813
|
doorstep_return: Joi.boolean(),
|
|
730
814
|
doorstep_qc: Joi.boolean(),
|
|
731
|
-
|
|
815
|
+
reverse_pickup: Joi.boolean().allow(null),
|
|
816
|
+
forward_pickup_cutoff: Joi.string().allow(""),
|
|
817
|
+
reverse_pickup_cutoff: Joi.string().allow(""),
|
|
818
|
+
hand_to_hand_exchange: Joi.boolean(),
|
|
819
|
+
holiday_list: Joi.array().items(Joi.string().allow("")),
|
|
732
820
|
installation: Joi.boolean(),
|
|
733
821
|
id: Joi.string().allow("").required(),
|
|
734
822
|
});
|
|
@@ -744,11 +832,15 @@ class LogisticsPartnerModel {
|
|
|
744
832
|
pincode: Joi.string().allow(""),
|
|
745
833
|
first_mile: Joi.boolean(),
|
|
746
834
|
last_mile: Joi.boolean(),
|
|
747
|
-
reverse_pickup: Joi.boolean().allow(null),
|
|
748
835
|
cod_limit: Joi.number(),
|
|
749
836
|
doorstep_return: Joi.boolean(),
|
|
750
837
|
doorstep_qc: Joi.boolean(),
|
|
751
|
-
|
|
838
|
+
forward_pickup_cutoff: Joi.string().allow(""),
|
|
839
|
+
pickup_cutoff: Joi.string().allow("").allow(null),
|
|
840
|
+
reverse_pickup_cutoff: Joi.string().allow(""),
|
|
841
|
+
hand_to_hand_exchange: Joi.boolean(),
|
|
842
|
+
prepaid_limit: Joi.number(),
|
|
843
|
+
holiday_list: Joi.array().items(Joi.string().allow("")),
|
|
752
844
|
installation: Joi.boolean(),
|
|
753
845
|
});
|
|
754
846
|
}
|
|
@@ -756,6 +848,8 @@ class LogisticsPartnerModel {
|
|
|
756
848
|
/** @returns {RegionTatDetails} */
|
|
757
849
|
static RegionTatDetails() {
|
|
758
850
|
return Joi.object({
|
|
851
|
+
max_delivery_time: Joi.number().allow(null),
|
|
852
|
+
min_delivery_time: Joi.number().allow(null),
|
|
759
853
|
from_country_code: Joi.string().allow("").required(),
|
|
760
854
|
from_state_code: Joi.string().allow(""),
|
|
761
855
|
from_city_code: Joi.string().allow(""),
|
|
@@ -766,22 +860,16 @@ class LogisticsPartnerModel {
|
|
|
766
860
|
to_city_code: Joi.string().allow(""),
|
|
767
861
|
to_sector_code: Joi.string().allow(""),
|
|
768
862
|
to_pincode: Joi.string().allow(""),
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
});
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
/** @returns {RegionTatUpdateDetails} */
|
|
775
|
-
static RegionTatUpdateDetails() {
|
|
776
|
-
return Joi.object({
|
|
777
|
-
max_delivery_time: Joi.number(),
|
|
778
|
-
min_delivery_time: Joi.number(),
|
|
863
|
+
forward: LogisticsPartnerModel.TATDetails(),
|
|
864
|
+
reverse: LogisticsPartnerModel.TATDetails(),
|
|
779
865
|
});
|
|
780
866
|
}
|
|
781
867
|
|
|
782
868
|
/** @returns {RegionTatResult} */
|
|
783
869
|
static RegionTatResult() {
|
|
784
870
|
return Joi.object({
|
|
871
|
+
min_delivery_time: Joi.number().allow(null),
|
|
872
|
+
max_delivery_time: Joi.number().allow(null),
|
|
785
873
|
from_country_code: Joi.string().allow("").required(),
|
|
786
874
|
from_state_code: Joi.string().allow(""),
|
|
787
875
|
from_city_code: Joi.string().allow(""),
|
|
@@ -792,8 +880,8 @@ class LogisticsPartnerModel {
|
|
|
792
880
|
to_city_code: Joi.string().allow(""),
|
|
793
881
|
to_sector_code: Joi.string().allow(""),
|
|
794
882
|
to_pincode: Joi.string().allow(""),
|
|
795
|
-
|
|
796
|
-
|
|
883
|
+
forward: LogisticsPartnerModel.TATDetails(),
|
|
884
|
+
reverse: LogisticsPartnerModel.TATDetails(),
|
|
797
885
|
id: Joi.string().allow("").required(),
|
|
798
886
|
});
|
|
799
887
|
}
|
|
@@ -801,7 +889,7 @@ class LogisticsPartnerModel {
|
|
|
801
889
|
/** @returns {BulkRegionJobDetails} */
|
|
802
890
|
static BulkRegionJobDetails() {
|
|
803
891
|
return Joi.object({
|
|
804
|
-
file_path: Joi.string().allow("")
|
|
892
|
+
file_path: Joi.string().allow(""),
|
|
805
893
|
country: Joi.string().allow("").required(),
|
|
806
894
|
action: Joi.string().allow("").required(),
|
|
807
895
|
region: Joi.string().allow("").required(),
|
|
@@ -811,7 +899,7 @@ class LogisticsPartnerModel {
|
|
|
811
899
|
/** @returns {BulkRegionResultItemData} */
|
|
812
900
|
static BulkRegionResultItemData() {
|
|
813
901
|
return Joi.object({
|
|
814
|
-
file_path: Joi.string().allow(""),
|
|
902
|
+
file_path: Joi.string().allow("").required(),
|
|
815
903
|
failed: Joi.number(),
|
|
816
904
|
failed_records: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())),
|
|
817
905
|
action: Joi.string().allow("").required(),
|
|
@@ -835,18 +923,6 @@ class LogisticsPartnerModel {
|
|
|
835
923
|
});
|
|
836
924
|
}
|
|
837
925
|
|
|
838
|
-
/** @returns {CourierAccount} */
|
|
839
|
-
static CourierAccount() {
|
|
840
|
-
return Joi.object({
|
|
841
|
-
extension_id: Joi.string().allow("").required(),
|
|
842
|
-
account_id: Joi.string().allow("").required(),
|
|
843
|
-
scheme_id: Joi.string().allow("").required(),
|
|
844
|
-
is_self_ship: Joi.boolean().required(),
|
|
845
|
-
stage: Joi.string().allow("").required(),
|
|
846
|
-
is_own_account: Joi.boolean().required(),
|
|
847
|
-
});
|
|
848
|
-
}
|
|
849
|
-
|
|
850
926
|
/** @returns {CourierAccountDetailsBody} */
|
|
851
927
|
static CourierAccountDetailsBody() {
|
|
852
928
|
return Joi.object({
|
|
@@ -859,14 +935,6 @@ class LogisticsPartnerModel {
|
|
|
859
935
|
});
|
|
860
936
|
}
|
|
861
937
|
|
|
862
|
-
/** @returns {CourierPartnerAccountFailureResult} */
|
|
863
|
-
static CourierPartnerAccountFailureResult() {
|
|
864
|
-
return Joi.object({
|
|
865
|
-
success: Joi.boolean().required(),
|
|
866
|
-
error: Joi.array().items(LogisticsPartnerModel.ErrorResult()).required(),
|
|
867
|
-
});
|
|
868
|
-
}
|
|
869
|
-
|
|
870
938
|
/** @returns {CompanyCourierPartnerAccountListResult} */
|
|
871
939
|
static CompanyCourierPartnerAccountListResult() {
|
|
872
940
|
return Joi.object({
|
|
@@ -881,7 +949,9 @@ class LogisticsPartnerModel {
|
|
|
881
949
|
static CourierAccountResult() {
|
|
882
950
|
return Joi.object({
|
|
883
951
|
account_id: Joi.string().allow("").required(),
|
|
952
|
+
company_id: Joi.number(),
|
|
884
953
|
scheme_id: Joi.string().allow("").required(),
|
|
954
|
+
extension_id: Joi.string().allow(""),
|
|
885
955
|
is_self_ship: Joi.boolean().required(),
|
|
886
956
|
stage: Joi.string().allow("").required(),
|
|
887
957
|
is_own_account: Joi.boolean().required(),
|
|
@@ -889,22 +959,6 @@ class LogisticsPartnerModel {
|
|
|
889
959
|
});
|
|
890
960
|
}
|
|
891
961
|
|
|
892
|
-
/** @returns {CourierPartnerSchemeModel} */
|
|
893
|
-
static CourierPartnerSchemeModel() {
|
|
894
|
-
return Joi.object({
|
|
895
|
-
extension_id: Joi.string().allow("").required(),
|
|
896
|
-
scheme_id: Joi.string().allow("").required(),
|
|
897
|
-
name: Joi.string().allow("").required(),
|
|
898
|
-
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
899
|
-
transport_type: Joi.string().allow("").required(),
|
|
900
|
-
region: Joi.string().allow("").required(),
|
|
901
|
-
delivery_type: Joi.string().allow("").required(),
|
|
902
|
-
payment_mode: Joi.array().items(Joi.string().allow("")).required(),
|
|
903
|
-
stage: Joi.string().allow("").required(),
|
|
904
|
-
feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
|
|
908
962
|
/** @returns {CourierPartnerSchemeDetailsModel} */
|
|
909
963
|
static CourierPartnerSchemeDetailsModel() {
|
|
910
964
|
return Joi.object({
|
|
@@ -912,68 +966,30 @@ class LogisticsPartnerModel {
|
|
|
912
966
|
scheme_id: Joi.string().allow(""),
|
|
913
967
|
name: Joi.string().allow("").required(),
|
|
914
968
|
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
969
|
+
volumetric_weight: LogisticsPartnerModel.ArithmeticOperations(),
|
|
915
970
|
transport_type: Joi.string().allow("").required(),
|
|
916
971
|
region: Joi.string().allow("").required(),
|
|
917
972
|
delivery_type: Joi.string().allow("").required(),
|
|
918
973
|
payment_mode: Joi.array().items(Joi.string().allow("")).required(),
|
|
919
974
|
stage: Joi.string().allow("").required(),
|
|
920
|
-
feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
|
|
921
|
-
});
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
/** @returns {CourierPartnerSchemeFeatures} */
|
|
925
|
-
static CourierPartnerSchemeFeatures() {
|
|
926
|
-
return Joi.object({
|
|
927
|
-
doorstep_qc: Joi.boolean(),
|
|
928
|
-
qr: Joi.boolean(),
|
|
929
|
-
mps: Joi.boolean(),
|
|
930
|
-
ndr: Joi.boolean(),
|
|
931
|
-
ndr_attempts: Joi.number(),
|
|
932
|
-
dangerous_goods: Joi.boolean(),
|
|
933
|
-
fragile_goods: Joi.boolean(),
|
|
934
|
-
restricted_goods: Joi.boolean(),
|
|
935
|
-
cold_storage_goods: Joi.boolean(),
|
|
936
|
-
doorstep_exchange: Joi.boolean(),
|
|
937
|
-
doorstep_return: Joi.boolean(),
|
|
938
|
-
product_installation: Joi.boolean(),
|
|
939
|
-
openbox_delivery: Joi.boolean(),
|
|
940
975
|
status_updates: Joi.string().allow(""),
|
|
941
|
-
|
|
942
|
-
single_pick_multi_drop: Joi.boolean(),
|
|
943
|
-
multi_pick_multi_drop: Joi.boolean(),
|
|
944
|
-
ewaybill: Joi.boolean(),
|
|
976
|
+
ndr_attempts: Joi.number(),
|
|
945
977
|
qc_shipment_item_quantity: Joi.number().allow(null),
|
|
946
978
|
non_qc_shipment_item_quantity: Joi.number().allow(null),
|
|
979
|
+
feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
|
|
947
980
|
});
|
|
948
981
|
}
|
|
949
982
|
|
|
950
|
-
/** @returns {
|
|
951
|
-
static
|
|
952
|
-
return Joi.object({
|
|
953
|
-
doorstep_qc: Joi.boolean(),
|
|
954
|
-
qr: Joi.boolean(),
|
|
955
|
-
mps: Joi.boolean(),
|
|
956
|
-
ndr: Joi.boolean(),
|
|
957
|
-
dangerous_goods: Joi.boolean(),
|
|
958
|
-
fragile_goods: Joi.boolean(),
|
|
959
|
-
restricted_goods: Joi.boolean(),
|
|
960
|
-
cold_storage_goods: Joi.boolean(),
|
|
961
|
-
doorstep_exchange: Joi.boolean(),
|
|
962
|
-
doorstep_return: Joi.boolean(),
|
|
963
|
-
product_installation: Joi.boolean(),
|
|
964
|
-
openbox_delivery: Joi.boolean(),
|
|
965
|
-
multi_pick_single_drop: Joi.boolean(),
|
|
966
|
-
single_pick_multi_drop: Joi.boolean(),
|
|
967
|
-
multi_pick_multi_drop: Joi.boolean(),
|
|
968
|
-
ewaybill: Joi.boolean(),
|
|
969
|
-
});
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
/** @returns {CourierPartnerSchemeV2DetailsModel} */
|
|
973
|
-
static CourierPartnerSchemeV2DetailsModel() {
|
|
983
|
+
/** @returns {CourierPartnerPutSchema} */
|
|
984
|
+
static CourierPartnerPutSchema() {
|
|
974
985
|
return Joi.object({
|
|
975
|
-
extension_id: Joi.string().allow("")
|
|
986
|
+
extension_id: Joi.string().allow(""),
|
|
987
|
+
created_by: LogisticsPartnerModel.CreatedBy(),
|
|
988
|
+
modified_by: LogisticsPartnerModel.ModifiedBy(),
|
|
989
|
+
created_on: Joi.string().allow(""),
|
|
990
|
+
modified_on: Joi.string().allow(""),
|
|
976
991
|
scheme_id: Joi.string().allow(""),
|
|
992
|
+
company_id: Joi.string().allow(""),
|
|
977
993
|
name: Joi.string().allow("").required(),
|
|
978
994
|
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
979
995
|
volumetric_weight: LogisticsPartnerModel.ArithmeticOperations(),
|
|
@@ -986,16 +1002,23 @@ class LogisticsPartnerModel {
|
|
|
986
1002
|
ndr_attempts: Joi.number(),
|
|
987
1003
|
qc_shipment_item_quantity: Joi.number().allow(null),
|
|
988
1004
|
non_qc_shipment_item_quantity: Joi.number().allow(null),
|
|
989
|
-
feature: LogisticsPartnerModel.
|
|
1005
|
+
feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
|
|
990
1006
|
});
|
|
991
1007
|
}
|
|
992
1008
|
|
|
993
|
-
/** @returns {
|
|
994
|
-
static
|
|
1009
|
+
/** @returns {CourierPartnerSchemeList} */
|
|
1010
|
+
static CourierPartnerSchemeList() {
|
|
1011
|
+
return Joi.object({
|
|
1012
|
+
items: Joi.array()
|
|
1013
|
+
.items(LogisticsPartnerModel.CourierPartnerSchemeModelSchema())
|
|
1014
|
+
.required(),
|
|
1015
|
+
page: LogisticsPartnerModel.Page().required(),
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
/** @returns {CourierPartnerSchemeUpdateDetails} */
|
|
1020
|
+
static CourierPartnerSchemeUpdateDetails() {
|
|
995
1021
|
return Joi.object({
|
|
996
|
-
extension_id: Joi.string().allow("").required(),
|
|
997
|
-
scheme_id: Joi.string().allow("").required(),
|
|
998
|
-
company_id: Joi.string().allow(""),
|
|
999
1022
|
name: Joi.string().allow("").required(),
|
|
1000
1023
|
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
1001
1024
|
volumetric_weight: LogisticsPartnerModel.ArithmeticOperations(),
|
|
@@ -1008,20 +1031,60 @@ class LogisticsPartnerModel {
|
|
|
1008
1031
|
ndr_attempts: Joi.number(),
|
|
1009
1032
|
qc_shipment_item_quantity: Joi.number().allow(null),
|
|
1010
1033
|
non_qc_shipment_item_quantity: Joi.number().allow(null),
|
|
1011
|
-
feature: LogisticsPartnerModel.
|
|
1034
|
+
feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
|
|
1012
1035
|
});
|
|
1013
1036
|
}
|
|
1014
1037
|
|
|
1015
|
-
/** @returns {
|
|
1016
|
-
static
|
|
1038
|
+
/** @returns {GetCountries} */
|
|
1039
|
+
static GetCountries() {
|
|
1017
1040
|
return Joi.object({
|
|
1018
1041
|
items: Joi.array()
|
|
1019
|
-
.items(LogisticsPartnerModel.
|
|
1042
|
+
.items(LogisticsPartnerModel.GetCountriesItems())
|
|
1020
1043
|
.required(),
|
|
1021
1044
|
page: LogisticsPartnerModel.Page().required(),
|
|
1022
1045
|
});
|
|
1023
1046
|
}
|
|
1024
1047
|
|
|
1048
|
+
/** @returns {TATUpdateDetails} */
|
|
1049
|
+
static TATUpdateDetails() {
|
|
1050
|
+
return Joi.object({
|
|
1051
|
+
max_delivery_time: Joi.number().allow(null),
|
|
1052
|
+
min_delivery_time: Joi.number().allow(null),
|
|
1053
|
+
forward: LogisticsPartnerModel.TATDetails(),
|
|
1054
|
+
reverse: LogisticsPartnerModel.TATDetails(),
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
/** @returns {StandardError} */
|
|
1059
|
+
static StandardError() {
|
|
1060
|
+
return Joi.object({
|
|
1061
|
+
message: Joi.string().allow("").required(),
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/** @returns {ValidationErrors} */
|
|
1066
|
+
static ValidationErrors() {
|
|
1067
|
+
return Joi.object({
|
|
1068
|
+
errors: Joi.array()
|
|
1069
|
+
.items(LogisticsPartnerModel.ValidationError())
|
|
1070
|
+
.required(),
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/** @returns {CreatedBy} */
|
|
1075
|
+
static CreatedBy() {
|
|
1076
|
+
return Joi.object({
|
|
1077
|
+
id: Joi.string().allow("").allow(null),
|
|
1078
|
+
}).allow(null);
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
/** @returns {ModifiedBy} */
|
|
1082
|
+
static ModifiedBy() {
|
|
1083
|
+
return Joi.object({
|
|
1084
|
+
id: Joi.string().allow("").allow(null),
|
|
1085
|
+
}).allow(null);
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1025
1088
|
/** @returns {ArithmeticOperations} */
|
|
1026
1089
|
static ArithmeticOperations() {
|
|
1027
1090
|
return Joi.object({
|
|
@@ -1032,9 +1095,68 @@ class LogisticsPartnerModel {
|
|
|
1032
1095
|
});
|
|
1033
1096
|
}
|
|
1034
1097
|
|
|
1035
|
-
/** @returns {
|
|
1036
|
-
static
|
|
1098
|
+
/** @returns {CourierPartnerSchemeFeatures} */
|
|
1099
|
+
static CourierPartnerSchemeFeatures() {
|
|
1100
|
+
return Joi.object({
|
|
1101
|
+
doorstep_qc: Joi.boolean(),
|
|
1102
|
+
qr: Joi.boolean(),
|
|
1103
|
+
mps: Joi.boolean(),
|
|
1104
|
+
ndr: Joi.boolean(),
|
|
1105
|
+
ndr_attempts: Joi.number(),
|
|
1106
|
+
dangerous_goods: Joi.boolean(),
|
|
1107
|
+
fragile_goods: Joi.boolean(),
|
|
1108
|
+
restricted_goods: Joi.boolean(),
|
|
1109
|
+
cold_storage_goods: Joi.boolean(),
|
|
1110
|
+
doorstep_exchange: Joi.boolean(),
|
|
1111
|
+
doorstep_return: Joi.boolean(),
|
|
1112
|
+
product_installation: Joi.boolean(),
|
|
1113
|
+
openbox_delivery: Joi.boolean(),
|
|
1114
|
+
status_updates: Joi.string().allow(""),
|
|
1115
|
+
multi_pick_single_drop: Joi.boolean(),
|
|
1116
|
+
single_pick_multi_drop: Joi.boolean(),
|
|
1117
|
+
multi_pick_multi_drop: Joi.boolean(),
|
|
1118
|
+
ewaybill: Joi.boolean(),
|
|
1119
|
+
qc_shipment_item_quantity: Joi.number().allow(null),
|
|
1120
|
+
non_qc_shipment_item_quantity: Joi.number().allow(null),
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
/** @returns {Error} */
|
|
1125
|
+
static Error() {
|
|
1126
|
+
return Joi.object({
|
|
1127
|
+
type: Joi.string().allow("").allow(null),
|
|
1128
|
+
value: Joi.string().allow("").allow(null),
|
|
1129
|
+
message: Joi.string().allow("").allow(null),
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
/** @returns {Page} */
|
|
1134
|
+
static Page() {
|
|
1135
|
+
return Joi.object({
|
|
1136
|
+
item_total: Joi.number(),
|
|
1137
|
+
next_id: Joi.string().allow(""),
|
|
1138
|
+
has_previous: Joi.boolean(),
|
|
1139
|
+
has_next: Joi.boolean(),
|
|
1140
|
+
current: Joi.number(),
|
|
1141
|
+
type: Joi.string().allow("").required(),
|
|
1142
|
+
size: Joi.number(),
|
|
1143
|
+
page_size: Joi.number(),
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
/** @returns {TATDetails} */
|
|
1148
|
+
static TATDetails() {
|
|
1149
|
+
return Joi.object({
|
|
1150
|
+
max_delivery_time: Joi.number(),
|
|
1151
|
+
min_delivery_time: Joi.number(),
|
|
1152
|
+
});
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
/** @returns {CourierPartnerSchemeModel} */
|
|
1156
|
+
static CourierPartnerSchemeModel() {
|
|
1037
1157
|
return Joi.object({
|
|
1158
|
+
extension_id: Joi.string().allow("").required(),
|
|
1159
|
+
scheme_id: Joi.string().allow("").required(),
|
|
1038
1160
|
name: Joi.string().allow("").required(),
|
|
1039
1161
|
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
1040
1162
|
volumetric_weight: LogisticsPartnerModel.ArithmeticOperations(),
|
|
@@ -1043,21 +1165,7 @@ class LogisticsPartnerModel {
|
|
|
1043
1165
|
delivery_type: Joi.string().allow("").required(),
|
|
1044
1166
|
payment_mode: Joi.array().items(Joi.string().allow("")).required(),
|
|
1045
1167
|
stage: Joi.string().allow("").required(),
|
|
1046
|
-
|
|
1047
|
-
ndr_attempts: Joi.number(),
|
|
1048
|
-
qc_shipment_item_quantity: Joi.number().allow(null),
|
|
1049
|
-
non_qc_shipment_item_quantity: Joi.number().allow(null),
|
|
1050
|
-
feature: LogisticsPartnerModel.CourierPartnerSchemeV2Features().required(),
|
|
1051
|
-
});
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
/** @returns {GetCountries} */
|
|
1055
|
-
static GetCountries() {
|
|
1056
|
-
return Joi.object({
|
|
1057
|
-
items: Joi.array()
|
|
1058
|
-
.items(LogisticsPartnerModel.GetCountriesItems())
|
|
1059
|
-
.required(),
|
|
1060
|
-
page: LogisticsPartnerModel.Page().required(),
|
|
1168
|
+
feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
|
|
1061
1169
|
});
|
|
1062
1170
|
}
|
|
1063
1171
|
|
|
@@ -1065,13 +1173,15 @@ class LogisticsPartnerModel {
|
|
|
1065
1173
|
static GetCountriesItems() {
|
|
1066
1174
|
return Joi.object({
|
|
1067
1175
|
id: Joi.string().allow(""),
|
|
1176
|
+
sub_type: Joi.string().allow(""),
|
|
1177
|
+
uid: Joi.string().allow(""),
|
|
1068
1178
|
name: Joi.string().allow(""),
|
|
1069
1179
|
iso2: Joi.string().allow(""),
|
|
1070
1180
|
iso3: Joi.string().allow(""),
|
|
1071
1181
|
timezones: Joi.array().items(Joi.string().allow("")),
|
|
1072
1182
|
hierarchy: Joi.array().items(LogisticsPartnerModel.HierarchyItems()),
|
|
1073
1183
|
phone_code: Joi.string().allow(""),
|
|
1074
|
-
currency:
|
|
1184
|
+
currency: LogisticsPartnerModel.CurrencyObject(),
|
|
1075
1185
|
type: Joi.string().allow(""),
|
|
1076
1186
|
latitude: Joi.string().allow(""),
|
|
1077
1187
|
longitude: Joi.string().allow(""),
|
|
@@ -1083,23 +1193,26 @@ class LogisticsPartnerModel {
|
|
|
1083
1193
|
/** @returns {HierarchyItems} */
|
|
1084
1194
|
static HierarchyItems() {
|
|
1085
1195
|
return Joi.object({
|
|
1196
|
+
name: Joi.string().allow(""),
|
|
1086
1197
|
display_name: Joi.string().allow(""),
|
|
1087
1198
|
slug: Joi.string().allow(""),
|
|
1088
1199
|
});
|
|
1089
1200
|
}
|
|
1090
1201
|
|
|
1091
|
-
/** @returns {
|
|
1092
|
-
static
|
|
1202
|
+
/** @returns {CurrencyObject} */
|
|
1203
|
+
static CurrencyObject() {
|
|
1093
1204
|
return Joi.object({
|
|
1094
|
-
|
|
1095
|
-
|
|
1205
|
+
code: Joi.string().allow(""),
|
|
1206
|
+
name: Joi.string().allow(""),
|
|
1207
|
+
symbol: Joi.string().allow(""),
|
|
1096
1208
|
});
|
|
1097
1209
|
}
|
|
1098
1210
|
|
|
1099
|
-
/** @returns {
|
|
1100
|
-
static
|
|
1211
|
+
/** @returns {ValidationError} */
|
|
1212
|
+
static ValidationError() {
|
|
1101
1213
|
return Joi.object({
|
|
1102
1214
|
message: Joi.string().allow("").required(),
|
|
1215
|
+
field: Joi.string().allow("").required(),
|
|
1103
1216
|
});
|
|
1104
1217
|
}
|
|
1105
1218
|
}
|