@gofynd/fdk-client-javascript 1.6.3 → 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.
Files changed (146) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +5 -5
  4. package/sdk/application/Cart/CartApplicationClient.js +26 -268
  5. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +20 -20
  6. package/sdk/application/Catalog/CatalogApplicationClient.js +98 -347
  7. package/sdk/application/Common/CommonApplicationClient.js +1 -16
  8. package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
  9. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +24 -2
  10. package/sdk/application/Configuration/ConfigurationApplicationClient.js +58 -137
  11. package/sdk/application/Content/ContentApplicationClient.d.ts +47 -7
  12. package/sdk/application/Content/ContentApplicationClient.js +222 -191
  13. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
  14. package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
  15. package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
  16. package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
  17. package/sdk/application/Lead/LeadApplicationClient.js +21 -52
  18. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +16 -56
  19. package/sdk/application/Logistic/LogisticApplicationClient.js +57 -332
  20. package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
  21. package/sdk/application/Order/OrderApplicationClient.js +68 -153
  22. package/sdk/application/Payment/PaymentApplicationClient.d.ts +2 -12
  23. package/sdk/application/Payment/PaymentApplicationClient.js +7 -487
  24. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
  25. package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
  26. package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
  27. package/sdk/application/Share/ShareApplicationClient.js +21 -75
  28. package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
  29. package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
  30. package/sdk/application/User/UserApplicationClient.js +1 -407
  31. package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
  32. package/sdk/common/Utility.d.ts +1 -1
  33. package/sdk/common/Utility.js +4 -4
  34. package/sdk/common/Validator.d.ts +1 -0
  35. package/sdk/common/Validator.js +20 -0
  36. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +1 -55
  37. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +1 -408
  38. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -5
  39. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -37
  40. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -0
  41. package/sdk/partner/Lead/LeadPartnerModel.js +2 -0
  42. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +29 -25
  43. package/sdk/partner/Logistics/LogisticsPartnerClient.js +65 -42
  44. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1008 -794
  45. package/sdk/partner/Logistics/LogisticsPartnerModel.js +573 -460
  46. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +10 -5
  47. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +64 -1
  48. package/sdk/partner/Webhook/WebhookPartnerModel.js +36 -0
  49. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
  50. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +2 -0
  51. package/sdk/platform/Cart/CartPlatformModel.d.ts +67 -9
  52. package/sdk/platform/Cart/CartPlatformModel.js +38 -5
  53. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
  54. package/sdk/platform/Catalog/CatalogPlatformClient.js +4 -4
  55. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +47 -13
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +29 -7
  57. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +2 -2
  58. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +7 -4
  59. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +71 -7
  60. package/sdk/platform/Communication/CommunicationPlatformModel.js +70 -6
  61. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +0 -27
  62. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +8 -60
  63. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +31 -20
  64. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +18 -18
  65. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +1 -1
  66. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -3
  67. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +13 -0
  68. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -1
  69. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +68 -11
  70. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +49 -7
  71. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +169 -0
  72. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1279 -132
  73. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +156 -1
  74. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +180 -0
  75. package/sdk/platform/Content/ContentPlatformClient.d.ts +162 -0
  76. package/sdk/platform/Content/ContentPlatformClient.js +1697 -497
  77. package/sdk/platform/Content/ContentPlatformModel.d.ts +1053 -35
  78. package/sdk/platform/Content/ContentPlatformModel.js +717 -34
  79. package/sdk/platform/Content/ContentPlatformValidator.d.ts +127 -1
  80. package/sdk/platform/Content/ContentPlatformValidator.js +171 -0
  81. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +34 -0
  82. package/sdk/platform/Discount/DiscountPlatformClient.js +59 -0
  83. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +365 -93
  84. package/sdk/platform/Discount/DiscountPlatformModel.js +98 -93
  85. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +54 -34
  86. package/sdk/platform/Discount/DiscountPlatformValidator.js +27 -17
  87. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +0 -156
  88. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +0 -1072
  89. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -137
  90. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +0 -173
  91. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +1 -1105
  92. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +0 -1125
  93. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -0
  94. package/sdk/platform/Lead/LeadPlatformModel.js +2 -0
  95. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
  96. package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
  97. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
  98. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
  99. package/sdk/platform/Order/OrderPlatformClient.d.ts +212 -0
  100. package/sdk/platform/Order/OrderPlatformClient.js +397 -0
  101. package/sdk/platform/Order/OrderPlatformModel.d.ts +66 -10
  102. package/sdk/platform/Order/OrderPlatformModel.js +39 -7
  103. package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
  104. package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
  105. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +58 -10
  106. package/sdk/platform/Partner/PartnerPlatformModel.js +19 -10
  107. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -2
  108. package/sdk/platform/Payment/PaymentPlatformModel.js +8 -2
  109. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +5 -0
  110. package/sdk/platform/Rewards/RewardsPlatformModel.js +2 -0
  111. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +240 -24
  112. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +1753 -277
  113. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +320 -22
  114. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +269 -19
  115. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +53 -104
  116. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +201 -629
  117. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +5720 -2891
  118. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3414 -2181
  119. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +138 -216
  120. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +81 -148
  121. package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
  122. package/sdk/platform/Share/SharePlatformModel.js +2 -0
  123. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +73 -0
  124. package/sdk/platform/User/UserPlatformApplicationClient.js +543 -0
  125. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +129 -1
  126. package/sdk/platform/User/UserPlatformApplicationValidator.js +97 -0
  127. package/sdk/platform/User/UserPlatformModel.d.ts +269 -6
  128. package/sdk/platform/User/UserPlatformModel.js +187 -5
  129. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +64 -1
  130. package/sdk/platform/Webhook/WebhookPlatformModel.js +36 -0
  131. package/sdk/public/Catalog/CatalogPublicClient.d.ts +1 -1
  132. package/sdk/public/Catalog/CatalogPublicClient.js +6 -11
  133. package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
  134. package/sdk/public/Content/ContentPublicClient.d.ts +36 -3
  135. package/sdk/public/Content/ContentPublicClient.js +261 -104
  136. package/sdk/public/Content/ContentPublicModel.d.ts +155 -1
  137. package/sdk/public/Content/ContentPublicModel.js +102 -0
  138. package/sdk/public/Content/ContentPublicValidator.d.ts +18 -1
  139. package/sdk/public/Content/ContentPublicValidator.js +26 -0
  140. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  141. package/sdk/public/Partner/PartnerPublicClient.js +6 -11
  142. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  143. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  144. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  145. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  146. 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 - Name of the country.
6
- * @property {string} region - Name of the region for which the
7
- * tat/serviceability file needs to be downloaded.
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] - Unique identifier identifying the perticular request.
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 ErrorResult
25
- * @property {string} value - Fields containing the error.
26
- * @property {string} message - Description of the error.
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 FailureResult
32
- * @property {boolean} success - Denotes if the request was successfully executed.
33
- * @property {ErrorResult[]} error
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 BulkRegionServiceabilityTatResult
38
- * @property {BulkRegionServiceabilityTatResultItemData[]} [items]
39
- * @property {Page} [page]
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 CourierAccountUpdateDetails
55
- * @property {string} extension_id - Unique identifier of courier partner extension.
56
- * @property {string} scheme_id - Unique identifier of courier partner scheme.
57
- * @property {boolean} is_self_ship - Denotes if the account is of self delivery type.
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} [pickup_cutoff] - Time of day by which pickups must be
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] - Unique identifier for the serviceability record.
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} [pickup_cutoff] - Time of day by which pickups must be
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] - Postal or ZIP code for the specific area
131
- * within the city where the serviceability is being specified.
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 {string} [pickup_cutoff] - Time of day by which pickups must be
147
- * scheduled to be processed on the same day.
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 - Unique identifier for the serviceability record.
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] - Postal or ZIP code for the specific area
164
- * within the city where the serviceability is being specified.
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] - Postal or ZIP code of the origin area.
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] - Postal or ZIP code of the destination area.
204
- * @property {number} [max_delivery_time] - Maximum time required for delivery
205
- * from the origin to the destination in seconds.
206
- * @property {number} [min_delivery_time] - Minimum time required for delivery
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 RegionTatUpdateDetails
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] - Postal or ZIP code of the origin area.
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] - Postal or ZIP code of the destination area.
237
- * @property {number} [max_delivery_time] - Maximum time required for delivery
238
- * from the origin to the destination in seconds.
239
- * @property {number} [min_delivery_time] - Minimum time required for delivery
240
- * from the origin to the destination in seconds.
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] - CDN path of the uploaded csv file for bulk import.
247
- * @property {string} country - Country for which the tat or serviceability is
248
- * to be imported or exported.
249
- * @property {string} action - Denotes the import or export action to be performed.
250
- * @property {string} region - Region of the country for which import or export
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} [file_path] - CDN path of the file which was used for bulk import.
257
- * @property {number} [failed] - Count of the failed records.
258
- * @property {Object[]} [failed_records] - Information of records which failed.
259
- * @property {string} action - Denotes the import or export action performed.
260
- * @property {string} batch_id - Unique id to identify the import or export query.
261
- * @property {string} country - Country for which the import or export action is
262
- * performed.
263
- * @property {number} [success] - Denoted if the import or export was successful
264
- * or failure.
265
- * @property {string} region - Region of the country for which import or export
266
- * is triggered.
267
- * @property {string} status - Current status of the import or export action performed.
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 - Unique identifier of courier partner extension.
293
- * @property {string} [account_id] - Unique identifier of courier partner scheme
294
- * and company id combination.
295
- * @property {string} scheme_id - Unique identifier of courier account.
296
- * @property {boolean} is_self_ship - Denotes if the account is of self delivery type.
297
- * @property {string} stage - Denotes whether the courier account is in enabled
298
- * or disabled stage.
299
- * @property {boolean} is_own_account - Denotes whether it is the seller's own
300
- * account or not.
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 - Unique identifier of courier partner scheme
318
- * and company id combination.
319
- * @property {string} scheme_id - Unique identifier of courier partner scheme.
320
- * @property {boolean} is_self_ship
321
- * @property {string} stage - Denotes whether the courier account is in enabled
322
- * or disabled stage.
323
- * @property {boolean} is_own_account - Denotes whether it is the seller's own
324
- * account or not.
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 CourierPartnerSchemeModel
377
+ * @typedef CourierPartnerSchemeDetailsModel
330
378
  * @property {string} extension_id - Unique identifier of courier partner extension.
331
- * @property {string} scheme_id - Unique identifier of courier partner scheme.
332
- * @property {string} name - Name of the scheme
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 CourierPartnerSchemeDetailsModel
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} name - Name of the courier partner scheme.
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 CourierPartnerSchemeFeatures
368
- * @property {boolean} [doorstep_qc] - Indicates if the courier partner offers
369
- * doorstep quality check services.
370
- * @property {boolean} [qr] - Specifies whether the courier partner supports QR
371
- * code-based operations.
372
- * @property {boolean} [mps] - Denotes if the courier partner supports
373
- * multi-part shipment services.
374
- * @property {boolean} [ndr] - Indicates if the Non-Delivery Report (NDR)
375
- * feature is supported by the courier partner.
376
- * @property {number} [ndr_attempts] - Number of attempts allowed for resolving
377
- * Non-Delivery Reports (NDR).
378
- * @property {boolean} [dangerous_goods] - Specifies if the courier partner
379
- * handles the transportation of dangerous goods.
380
- * @property {boolean} [fragile_goods] - Indicates whether the courier partner
381
- * manages the shipment of fragile goods.
382
- * @property {boolean} [restricted_goods] - Indicates if the courier partner
383
- * handles restricted goods, as per regulatory guidelines.
384
- * @property {boolean} [cold_storage_goods] - Denotes if the courier partner
385
- * provides cold storage facilities for goods.
386
- * @property {boolean} [doorstep_exchange] - Indicates if the courier partner
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 {boolean} [multi_pick_single_drop] - Indicates if the courier
398
- * partner supports multiple pickups to a single drop location.
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 CourierPartnerSchemeV2Features
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 CourierPartnerV2SchemeModel
478
- * @property {string} extension_id - Unique identifier of courier partner extension.
479
- * @property {string} scheme_id - Unique identifier of courier partner scheme.
480
- * @property {string} [company_id] - Unique identifier of company.
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 courierPartnerSchemeV2List
507
- * @property {CourierPartnerV2SchemeModel[]} items - List of courier partner schemes
508
- * @property {Page} page
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 ArithmeticOperations
513
- * @property {number} [lt]
514
- * @property {number} [gt]
515
- * @property {number} [lte]
516
- * @property {number} [gte]
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 CourierPartnerSchemeV2UpdateDetails
521
- * @property {string} name - Name of the scheme.
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 - Mode of transport associated with the
525
- * courier partner scheme.
526
- * @property {string} region - Serviceable region associated with the courier
527
- * partner scheme.
528
- * @property {string} delivery_type - Type of delivery associated with the
529
- * courier partner scheme.
530
- * @property {string[]} payment_mode - Mode of payment associated with the
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] - Unique identifier of the country.
554
- * @property {string} [name] - Name of the country.
555
- * @property {string} [iso2] - Two-letter ISO code representing the country.
556
- * @property {string} [iso3] - Three-letter ISO code representing the country.
557
- * @property {string[]} [timezones] - List of time zones used in the country
558
- * (e.g., ["America/New_York", "America/Los_Angeles"]).
559
- * @property {HierarchyItems[]} [hierarchy] - Levels within the country (e.g.,
560
- * states, cities) and their slugs (e.g., [{"name": "State", "slug": "state"},
561
- * {"name": "City", "slug": "city"}]).
562
- * @property {string} [phone_code] - International dialing code for the country
563
- * (e.g., "+1").
564
- * @property {string} [currency] - Indicates currency for the country (e.g., "INR").
565
- * @property {string} [type] - Indicates the type of object (e.g., "country").
566
- * @property {string} [latitude] - Geographical latitude of the country (e.g., "37.0902").
567
- * @property {string} [longitude] - Geographical longitude of the country (e.g.,
568
- * "-95.7129").
569
- * @property {string} [display_name] - User-friendly version of the geographical
570
- * data, which may be more descriptive or formatted differently.
571
- * @property {boolean} [has_next_hierarchy] - More detailed hierarchical data is
572
- * available, meaning states, cities, or other regions within the country have
573
- * been populated in the system.
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 URL-friendly version of the name, often used
580
- * for referencing or querying purposes.
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
- * @typedef StandardError
591
- * @property {string} message - A brief description of the error.
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 {ErrorResult} */
618
- static ErrorResult() {
705
+ /** @returns {CommonErrorResult} */
706
+ static CommonErrorResult() {
619
707
  return Joi.object({
620
- value: Joi.string().allow("").required(),
621
- message: Joi.string().allow("").required(),
622
- type: Joi.string().allow("").required(),
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().required(),
630
- error: Joi.array().items(LogisticsPartnerModel.ErrorResult()).required(),
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
- pickup_cutoff: Joi.string().allow(""),
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
- pickup_cutoff: Joi.string().allow(""),
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
- pickup_cutoff: Joi.string().allow(""),
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
- pickup_cutoff: Joi.string().allow(""),
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
- max_delivery_time: Joi.number(),
770
- min_delivery_time: Joi.number(),
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
- max_delivery_time: Joi.number(),
796
- min_delivery_time: Joi.number(),
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("").allow(null),
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
- multi_pick_single_drop: Joi.boolean(),
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 {CourierPartnerSchemeV2Features} */
951
- static CourierPartnerSchemeV2Features() {
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("").required(),
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.CourierPartnerSchemeV2Features().required(),
1005
+ feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
990
1006
  });
991
1007
  }
992
1008
 
993
- /** @returns {CourierPartnerV2SchemeModel} */
994
- static CourierPartnerV2SchemeModel() {
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.CourierPartnerSchemeV2Features().required(),
1034
+ feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
1012
1035
  });
1013
1036
  }
1014
1037
 
1015
- /** @returns {courierPartnerSchemeV2List} */
1016
- static courierPartnerSchemeV2List() {
1038
+ /** @returns {GetCountries} */
1039
+ static GetCountries() {
1017
1040
  return Joi.object({
1018
1041
  items: Joi.array()
1019
- .items(LogisticsPartnerModel.CourierPartnerV2SchemeModel())
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 {CourierPartnerSchemeV2UpdateDetails} */
1036
- static CourierPartnerSchemeV2UpdateDetails() {
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
- status_updates: Joi.string().allow(""),
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: Joi.string().allow(""),
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 {ValidationError} */
1092
- static ValidationError() {
1202
+ /** @returns {CurrencyObject} */
1203
+ static CurrencyObject() {
1093
1204
  return Joi.object({
1094
- message: Joi.string().allow("").required(),
1095
- field: Joi.string().allow("").required(),
1205
+ code: Joi.string().allow(""),
1206
+ name: Joi.string().allow(""),
1207
+ symbol: Joi.string().allow(""),
1096
1208
  });
1097
1209
  }
1098
1210
 
1099
- /** @returns {StandardError} */
1100
- static StandardError() {
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
  }