@gofynd/fdk-client-javascript 1.4.2-beta.2 → 1.4.2-beta.4
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/CartApplicationModel.d.ts +1742 -1726
- package/sdk/application/Cart/CartApplicationModel.js +1497 -1481
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1917 -1917
- package/sdk/application/Catalog/CatalogApplicationModel.js +1611 -1611
- package/sdk/application/Common/CommonApplicationModel.d.ts +235 -235
- package/sdk/application/Common/CommonApplicationModel.js +172 -172
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +72 -72
- package/sdk/application/Communication/CommunicationApplicationModel.js +64 -64
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1614 -1614
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1151 -1151
- package/sdk/application/Content/ContentApplicationModel.d.ts +797 -797
- package/sdk/application/Content/ContentApplicationModel.js +757 -757
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +79 -79
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +84 -84
- package/sdk/application/Lead/LeadApplicationModel.d.ts +417 -417
- package/sdk/application/Lead/LeadApplicationModel.js +301 -301
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +666 -666
- package/sdk/application/Logistic/LogisticApplicationModel.js +601 -601
- package/sdk/application/Order/OrderApplicationModel.d.ts +852 -846
- package/sdk/application/Order/OrderApplicationModel.js +828 -822
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationClient.js +10 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +2176 -2145
- package/sdk/application/Payment/PaymentApplicationModel.js +1474 -1453
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationValidator.js +3 -3
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1462 -1462
- package/sdk/application/PosCart/PosCartApplicationModel.js +1260 -1260
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +214 -214
- package/sdk/application/Rewards/RewardsApplicationModel.js +211 -211
- package/sdk/application/Share/ShareApplicationModel.d.ts +114 -114
- package/sdk/application/Share/ShareApplicationModel.js +121 -121
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +895 -895
- package/sdk/application/Theme/ThemeApplicationModel.js +684 -684
- package/sdk/application/User/UserApplicationClient.d.ts +2 -2
- package/sdk/application/User/UserApplicationClient.js +4 -7
- package/sdk/application/User/UserApplicationModel.d.ts +769 -764
- package/sdk/application/User/UserApplicationModel.js +731 -741
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +63 -63
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +65 -65
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +661 -661
- package/sdk/partner/Lead/LeadPartnerModel.js +491 -491
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +223 -223
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +235 -235
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1087 -1087
- package/sdk/partner/Theme/ThemePartnerModel.js +819 -819
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +386 -386
- package/sdk/partner/Webhook/WebhookPartnerModel.js +342 -342
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +123 -123
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +109 -109
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +801 -801
- package/sdk/platform/Billing/BillingPlatformModel.js +783 -783
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3333 -3317
- package/sdk/platform/Cart/CartPlatformModel.js +2936 -2920
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +26 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +182 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +70 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +44 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1013 -980
- package/sdk/platform/Catalog/CatalogPlatformModel.js +977 -933
- package/sdk/platform/Common/CommonPlatformModel.d.ts +255 -255
- package/sdk/platform/Common/CommonPlatformModel.js +187 -187
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1238 -1238
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1273 -1273
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +661 -661
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +692 -692
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +3198 -3198
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2247 -2247
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1842 -1825
- package/sdk/platform/Content/ContentPlatformModel.js +1868 -1848
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +245 -245
- package/sdk/platform/Discount/DiscountPlatformModel.js +248 -248
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +2 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +7 -4
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +882 -869
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +894 -878
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1044 -1044
- package/sdk/platform/Finance/FinancePlatformModel.js +974 -974
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +942 -942
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1003 -1003
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +608 -608
- package/sdk/platform/Lead/LeadPlatformModel.js +465 -465
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5192 -5176
- package/sdk/platform/Order/OrderPlatformModel.js +4752 -4736
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +22 -22
- package/sdk/platform/Partner/PartnerPlatformModel.js +22 -22
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2693 -2657
- package/sdk/platform/Payment/PaymentPlatformModel.js +1842 -1819
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +204 -204
- package/sdk/platform/Rewards/RewardsPlatformModel.js +199 -199
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +7 -6
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +11 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1674 -1539
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1663 -1534
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +4 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +4 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationClient.js +19 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +13 -3
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +147 -147
- package/sdk/platform/Share/SharePlatformModel.js +139 -139
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1046 -1046
- package/sdk/platform/Theme/ThemePlatformModel.js +789 -789
- package/sdk/platform/User/UserPlatformModel.d.ts +823 -753
- package/sdk/platform/User/UserPlatformModel.js +731 -661
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +439 -439
- package/sdk/platform/Webhook/WebhookPlatformModel.js +364 -364
- package/sdk/public/Billing/BillingPublicModel.d.ts +55 -55
- package/sdk/public/Billing/BillingPublicModel.js +51 -51
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +237 -237
- package/sdk/public/Configuration/ConfigurationPublicModel.js +174 -174
- package/sdk/public/Content/ContentPublicModel.d.ts +26 -26
- package/sdk/public/Content/ContentPublicModel.js +28 -28
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +237 -237
- package/sdk/public/Inventory/InventoryPublicModel.js +257 -257
- package/sdk/public/Partner/PartnerPublicModel.d.ts +104 -104
- package/sdk/public/Partner/PartnerPublicModel.js +113 -113
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +87 -87
- package/sdk/public/Webhook/WebhookPublicModel.js +93 -93
|
@@ -1,27 +1,68 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
4
|
+
* @typedef GetStoreResponse
|
|
5
|
+
* @property {StoreItemResponse[]} [items]
|
|
6
|
+
* @property {Page} [page]
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @typedef StoreItemResponse
|
|
11
|
+
* @property {number} [id]
|
|
12
|
+
* @property {string} [store_type]
|
|
13
|
+
* @property {string} [fulfillment_type]
|
|
14
|
+
* @property {number} [processing_time]
|
|
15
|
+
* @property {string[]} [tags]
|
|
16
|
+
* @property {number} [company_id]
|
|
17
|
+
* @property {number} [latitude]
|
|
18
|
+
* @property {number} [longitude]
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @typedef ValidateAddressRequest
|
|
23
|
+
* @property {string} [address] - A string representing the complete address,
|
|
24
|
+
* combining address line 1, address line 2, area, landmark, sector, city,
|
|
25
|
+
* state, and pincode. This provides a comprehensive view of the address details.
|
|
26
|
+
* @property {string} [address1] - A string representing the first line of the
|
|
27
|
+
* address, typically containing street or building information.
|
|
28
|
+
* @property {string} [address2] - A string representing the second line of the
|
|
29
|
+
* address, which can be used for additional address details if needed.
|
|
30
|
+
* @property {string} [area] - A string specifying the locality or area
|
|
31
|
+
* associated with the address.
|
|
32
|
+
* @property {string} [landmark] - A string representing a prominent nearby
|
|
33
|
+
* landmark that aids in locating the address.
|
|
34
|
+
* @property {string} [pincode] - A string indicating the postal code or PIN
|
|
35
|
+
* code of the address area.
|
|
36
|
+
* @property {string} [sector] - A string specifying the sector or district of
|
|
37
|
+
* the address if applicable.
|
|
38
|
+
* @property {string} [city] - A string denoting the city or municipality of the address.
|
|
39
|
+
* @property {string} [state] - A string indicating the state or province of the address.
|
|
40
|
+
* @property {string} [name] - A string representing the recipient's name or the
|
|
41
|
+
* organization name associated with the address.
|
|
42
|
+
* @property {string} [phone] - An integer representing the recipient's contact
|
|
43
|
+
* phone number.
|
|
44
|
+
* @property {string} [email] - A string containing the recipient's email address.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @typedef PincodeParentsResponse
|
|
49
|
+
* @property {string} [sub_type]
|
|
5
50
|
* @property {string} [display_name]
|
|
6
|
-
* @property {boolean} [is_active]
|
|
7
|
-
* @property {LogisticsResponse} [logistics]
|
|
8
|
-
* @property {CountryMetaResponse} [meta]
|
|
9
51
|
* @property {string} [name]
|
|
10
|
-
* @property {string} [parent_id]
|
|
11
|
-
* @property {string} [sub_type]
|
|
12
|
-
* @property {string} [type]
|
|
13
52
|
* @property {string} [uid]
|
|
14
53
|
*/
|
|
15
54
|
|
|
16
55
|
/**
|
|
17
|
-
* @typedef
|
|
18
|
-
* @property {string} [
|
|
19
|
-
* @property {
|
|
56
|
+
* @typedef PincodeMetaResponse
|
|
57
|
+
* @property {string} [zone]
|
|
58
|
+
* @property {number} [internal_zone_id]
|
|
20
59
|
*/
|
|
21
60
|
|
|
22
61
|
/**
|
|
23
|
-
* @typedef
|
|
24
|
-
* @property {
|
|
62
|
+
* @typedef PincodeErrorSchemaResponse
|
|
63
|
+
* @property {string} [message]
|
|
64
|
+
* @property {string} [value]
|
|
65
|
+
* @property {string} [type]
|
|
25
66
|
*/
|
|
26
67
|
|
|
27
68
|
/**
|
|
@@ -31,166 +72,162 @@ const Joi = require("joi");
|
|
|
31
72
|
*/
|
|
32
73
|
|
|
33
74
|
/**
|
|
34
|
-
* @typedef
|
|
35
|
-
* @property {CurrencyObject} [currency]
|
|
36
|
-
* @property {string} [display_name]
|
|
37
|
-
* @property {CountryHierarchy[]} [hierarchy]
|
|
38
|
-
* @property {string} [id]
|
|
39
|
-
* @property {string} [iso2]
|
|
40
|
-
* @property {string} [iso3]
|
|
41
|
-
* @property {string} [latitude]
|
|
42
|
-
* @property {string} [longitude]
|
|
43
|
-
* @property {string} [name]
|
|
44
|
-
* @property {string} [phone_code]
|
|
45
|
-
* @property {string[]} [timezones]
|
|
75
|
+
* @typedef PincodeLatLongData
|
|
46
76
|
* @property {string} [type]
|
|
77
|
+
* @property {string[]} [coordinates]
|
|
47
78
|
*/
|
|
48
79
|
|
|
49
80
|
/**
|
|
50
|
-
* @typedef
|
|
51
|
-
* @property {
|
|
81
|
+
* @typedef PincodeDataResponse
|
|
82
|
+
* @property {PincodeParentsResponse[]} [parents]
|
|
83
|
+
* @property {PincodeMetaResponse} [meta]
|
|
84
|
+
* @property {string} [display_name]
|
|
85
|
+
* @property {PincodeErrorSchemaResponse} error
|
|
86
|
+
* @property {CountryMetaResponse} [meta_code]
|
|
87
|
+
* @property {PincodeLatLongData} [lat_long]
|
|
88
|
+
* @property {string} [sub_type]
|
|
52
89
|
* @property {string} [name]
|
|
53
|
-
* @property {string} [
|
|
90
|
+
* @property {string} [uid]
|
|
54
91
|
*/
|
|
55
92
|
|
|
56
93
|
/**
|
|
57
|
-
* @typedef
|
|
58
|
-
* @property {
|
|
59
|
-
* @property {
|
|
60
|
-
* @property {
|
|
61
|
-
* @property {number} fm_priority
|
|
62
|
-
* @property {string} [internal_account_id]
|
|
63
|
-
* @property {number} lm_priority
|
|
64
|
-
* @property {string[]} operations
|
|
65
|
-
* @property {string} payment_mode
|
|
66
|
-
* @property {number} rvp_priority
|
|
67
|
-
* @property {string} [transport_mode]
|
|
94
|
+
* @typedef PincodeApiResponse
|
|
95
|
+
* @property {boolean} success
|
|
96
|
+
* @property {PincodeDataResponse[]} [data]
|
|
97
|
+
* @property {PincodeErrorSchemaResponse} error
|
|
68
98
|
*/
|
|
69
99
|
|
|
70
100
|
/**
|
|
71
|
-
* @typedef
|
|
72
|
-
* @property {string} [
|
|
101
|
+
* @typedef TATCategoryRequest
|
|
102
|
+
* @property {string} [level]
|
|
103
|
+
* @property {number} [id]
|
|
73
104
|
*/
|
|
74
105
|
|
|
75
106
|
/**
|
|
76
|
-
* @typedef
|
|
77
|
-
* @property {
|
|
78
|
-
* @property {string} [
|
|
107
|
+
* @typedef TATArticlesRequest
|
|
108
|
+
* @property {TATCategoryRequest} [category]
|
|
109
|
+
* @property {string} [manufacturing_time_unit]
|
|
110
|
+
* @property {number} [manufacturing_time]
|
|
79
111
|
*/
|
|
80
112
|
|
|
81
113
|
/**
|
|
82
|
-
* @typedef
|
|
83
|
-
* @property {
|
|
84
|
-
* @property {string} [
|
|
114
|
+
* @typedef TATLocationDetailsRequest
|
|
115
|
+
* @property {number} [fulfillment_id]
|
|
116
|
+
* @property {string} [from_pincode]
|
|
117
|
+
* @property {TATArticlesRequest[]} [articles]
|
|
85
118
|
*/
|
|
86
119
|
|
|
87
120
|
/**
|
|
88
|
-
* @typedef
|
|
89
|
-
* @property {
|
|
90
|
-
* @property {
|
|
121
|
+
* @typedef TATViewRequest
|
|
122
|
+
* @property {string} [to_pincode]
|
|
123
|
+
* @property {string} [source]
|
|
124
|
+
* @property {string} [action]
|
|
125
|
+
* @property {string} [identifier]
|
|
126
|
+
* @property {TATLocationDetailsRequest[]} [location_details]
|
|
127
|
+
* @property {string} [journey]
|
|
91
128
|
*/
|
|
92
129
|
|
|
93
130
|
/**
|
|
94
|
-
* @typedef
|
|
95
|
-
* @property {
|
|
96
|
-
* @property {string} [
|
|
97
|
-
* @property {GetCountryFields} [fields]
|
|
98
|
-
* @property {CountryHierarchy[]} [hierarchy]
|
|
99
|
-
* @property {string} [id]
|
|
100
|
-
* @property {string} [iso2]
|
|
101
|
-
* @property {string} [iso3]
|
|
102
|
-
* @property {string} [latitude]
|
|
103
|
-
* @property {string} [longitude]
|
|
104
|
-
* @property {string} [name]
|
|
105
|
-
* @property {string} [phone_code]
|
|
106
|
-
* @property {string[]} [timezones]
|
|
131
|
+
* @typedef TATErrorSchemaResponse
|
|
132
|
+
* @property {string} [message]
|
|
133
|
+
* @property {string} [value]
|
|
107
134
|
* @property {string} [type]
|
|
108
135
|
*/
|
|
109
136
|
|
|
110
137
|
/**
|
|
111
|
-
* @typedef
|
|
112
|
-
* @property {
|
|
113
|
-
* @property {
|
|
114
|
-
* @property {string[]} serviceability_fields
|
|
138
|
+
* @typedef TATTimestampResponse
|
|
139
|
+
* @property {number} [min]
|
|
140
|
+
* @property {number} [max]
|
|
115
141
|
*/
|
|
116
142
|
|
|
117
143
|
/**
|
|
118
|
-
* @typedef
|
|
119
|
-
* @property {string}
|
|
120
|
-
* @property {
|
|
121
|
-
* @property {string} [error_text]
|
|
122
|
-
* @property {string} input
|
|
123
|
-
* @property {boolean} required
|
|
124
|
-
* @property {string} slug
|
|
125
|
-
* @property {FieldValidation} [validation]
|
|
126
|
-
* @property {GetCountryFieldsAddressValues} [values]
|
|
144
|
+
* @typedef TATFormattedResponse
|
|
145
|
+
* @property {string} [min]
|
|
146
|
+
* @property {string} [max]
|
|
127
147
|
*/
|
|
128
148
|
|
|
129
149
|
/**
|
|
130
|
-
* @typedef
|
|
131
|
-
* @property {
|
|
132
|
-
* @property {
|
|
133
|
-
* @property {string} store_os_form
|
|
150
|
+
* @typedef TATPromiseResponse
|
|
151
|
+
* @property {TATTimestampResponse} [timestamp]
|
|
152
|
+
* @property {TATFormattedResponse} [formatted]
|
|
134
153
|
*/
|
|
135
154
|
|
|
136
155
|
/**
|
|
137
|
-
* @typedef
|
|
138
|
-
* @property {
|
|
139
|
-
* @property {
|
|
156
|
+
* @typedef TATArticlesResponse
|
|
157
|
+
* @property {string} [manufacturing_time_unit]
|
|
158
|
+
* @property {TATErrorSchemaResponse} [error]
|
|
159
|
+
* @property {boolean} [is_cod_available]
|
|
160
|
+
* @property {TATPromiseResponse} [promise]
|
|
161
|
+
* @property {number} [manufacturing_time]
|
|
162
|
+
* @property {TATCategoryRequest} [category]
|
|
163
|
+
* @property {number} [_manufacturing_time_seconds]
|
|
140
164
|
*/
|
|
141
165
|
|
|
142
166
|
/**
|
|
143
|
-
* @typedef
|
|
144
|
-
* @property {
|
|
145
|
-
* @property {
|
|
167
|
+
* @typedef TATLocationDetailsResponse
|
|
168
|
+
* @property {number} [fulfillment_id]
|
|
169
|
+
* @property {string} [from_pincode]
|
|
170
|
+
* @property {TATArticlesResponse[]} [articles]
|
|
146
171
|
*/
|
|
147
172
|
|
|
148
173
|
/**
|
|
149
|
-
* @typedef
|
|
150
|
-
* @property {string} [
|
|
151
|
-
* @property {string} [
|
|
152
|
-
* @property {
|
|
153
|
-
* @property {
|
|
154
|
-
* @property {
|
|
155
|
-
* @property {
|
|
174
|
+
* @typedef TATViewResponse
|
|
175
|
+
* @property {string} [to_pincode]
|
|
176
|
+
* @property {string} [request_uuid]
|
|
177
|
+
* @property {string} [payment_mode]
|
|
178
|
+
* @property {boolean} [success]
|
|
179
|
+
* @property {TATErrorSchemaResponse} [error]
|
|
180
|
+
* @property {boolean} [is_cod_available]
|
|
181
|
+
* @property {string} [source]
|
|
182
|
+
* @property {string} [action]
|
|
183
|
+
* @property {string} [stormbreaker_uuid]
|
|
184
|
+
* @property {string} [to_city]
|
|
185
|
+
* @property {string} [identifier]
|
|
186
|
+
* @property {TATLocationDetailsResponse[]} [location_details]
|
|
187
|
+
* @property {string} [journey]
|
|
156
188
|
*/
|
|
157
189
|
|
|
158
190
|
/**
|
|
159
|
-
* @typedef
|
|
160
|
-
* @property {
|
|
161
|
-
* @property {
|
|
191
|
+
* @typedef DP
|
|
192
|
+
* @property {number} fm_priority
|
|
193
|
+
* @property {number} lm_priority
|
|
194
|
+
* @property {number} rvp_priority
|
|
195
|
+
* @property {string} payment_mode
|
|
196
|
+
* @property {string[]} operations
|
|
197
|
+
* @property {string} [area_code]
|
|
198
|
+
* @property {boolean} [assign_dp_from_sb]
|
|
199
|
+
* @property {string} [internal_account_id]
|
|
200
|
+
* @property {string} [external_account_id]
|
|
201
|
+
* @property {string} [transport_mode]
|
|
162
202
|
*/
|
|
163
203
|
|
|
164
204
|
/**
|
|
165
|
-
* @typedef
|
|
166
|
-
* @property {
|
|
167
|
-
* @property {GetOneOrAllQuery} [query]
|
|
205
|
+
* @typedef LogisticsResponse
|
|
206
|
+
* @property {Object} [dp]
|
|
168
207
|
*/
|
|
169
208
|
|
|
170
209
|
/**
|
|
171
|
-
* @typedef
|
|
172
|
-
* @property {
|
|
173
|
-
* @property {
|
|
210
|
+
* @typedef CountryEntityResponse
|
|
211
|
+
* @property {CountryMetaResponse} [meta]
|
|
212
|
+
* @property {LogisticsResponse} [logistics]
|
|
213
|
+
* @property {string} [display_name]
|
|
214
|
+
* @property {string} [type]
|
|
215
|
+
* @property {boolean} [is_active]
|
|
216
|
+
* @property {string} [parent_id]
|
|
217
|
+
* @property {string} [sub_type]
|
|
218
|
+
* @property {string} [name]
|
|
219
|
+
* @property {string} [uid]
|
|
174
220
|
*/
|
|
175
221
|
|
|
176
222
|
/**
|
|
177
|
-
* @typedef
|
|
178
|
-
* @property {
|
|
179
|
-
* @property {string} [country]
|
|
180
|
-
* @property {string} [sector]
|
|
181
|
-
* @property {string} [state]
|
|
182
|
-
*/
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* @typedef GetStoreResponse
|
|
186
|
-
* @property {StoreItemResponse[]} [items]
|
|
187
|
-
* @property {Page} [page]
|
|
223
|
+
* @typedef CountryListResponse
|
|
224
|
+
* @property {CountryEntityResponse[]} [results]
|
|
188
225
|
*/
|
|
189
226
|
|
|
190
227
|
/**
|
|
191
228
|
* @typedef GetZoneFromPincodeViewRequest
|
|
192
|
-
* @property {string} country
|
|
193
229
|
* @property {string} pincode
|
|
230
|
+
* @property {string} country
|
|
194
231
|
*/
|
|
195
232
|
|
|
196
233
|
/**
|
|
@@ -200,268 +237,266 @@ const Joi = require("joi");
|
|
|
200
237
|
*/
|
|
201
238
|
|
|
202
239
|
/**
|
|
203
|
-
* @typedef
|
|
204
|
-
* @property {
|
|
205
|
-
* @property {
|
|
240
|
+
* @typedef ReAssignStoreRequest
|
|
241
|
+
* @property {Object} configuration
|
|
242
|
+
* @property {string} to_pincode
|
|
243
|
+
* @property {number[]} ignored_locations
|
|
244
|
+
* @property {string} identifier
|
|
245
|
+
* @property {Object[]} articles
|
|
206
246
|
*/
|
|
207
247
|
|
|
208
248
|
/**
|
|
209
|
-
* @typedef
|
|
210
|
-
* @property {string}
|
|
211
|
-
* @property {string}
|
|
212
|
-
* @property {
|
|
213
|
-
* @property {
|
|
214
|
-
* @property {
|
|
249
|
+
* @typedef ReAssignStoreResponse
|
|
250
|
+
* @property {string} to_pincode
|
|
251
|
+
* @property {string} pystormbreaker_uuid
|
|
252
|
+
* @property {boolean} success
|
|
253
|
+
* @property {Object} error
|
|
254
|
+
* @property {Object[]} [assigned_stores]
|
|
215
255
|
*/
|
|
216
256
|
|
|
217
257
|
/**
|
|
218
|
-
* @typedef
|
|
219
|
-
* @property {string} [display_name]
|
|
220
|
-
* @property {string} [id]
|
|
258
|
+
* @typedef CountryHierarchy
|
|
221
259
|
* @property {string} [name]
|
|
222
|
-
* @property {string
|
|
223
|
-
* @property {string} [type]
|
|
260
|
+
* @property {string} [slug]
|
|
224
261
|
*/
|
|
225
262
|
|
|
226
263
|
/**
|
|
227
|
-
* @typedef
|
|
228
|
-
* @property {
|
|
264
|
+
* @typedef CurrencyObject
|
|
265
|
+
* @property {string} [code]
|
|
266
|
+
* @property {string} [name]
|
|
267
|
+
* @property {string} [symbol]
|
|
229
268
|
*/
|
|
230
269
|
|
|
231
270
|
/**
|
|
232
|
-
* @typedef
|
|
233
|
-
* @property {
|
|
234
|
-
* @property {
|
|
235
|
-
* @property {
|
|
236
|
-
* @property {
|
|
237
|
-
* @property {string} [
|
|
238
|
-
* @property {
|
|
239
|
-
* @property {
|
|
271
|
+
* @typedef CountryObject
|
|
272
|
+
* @property {string} [id]
|
|
273
|
+
* @property {string} [name]
|
|
274
|
+
* @property {string} [display_name]
|
|
275
|
+
* @property {string} [iso2]
|
|
276
|
+
* @property {string} [iso3]
|
|
277
|
+
* @property {string[]} [timezones]
|
|
278
|
+
* @property {CountryHierarchy[]} [hierarchy]
|
|
279
|
+
* @property {string} [phone_code]
|
|
280
|
+
* @property {string} [latitude]
|
|
281
|
+
* @property {string} [longitude]
|
|
282
|
+
* @property {CurrencyObject} [currency]
|
|
283
|
+
* @property {string} [type]
|
|
240
284
|
*/
|
|
241
285
|
|
|
242
286
|
/**
|
|
243
|
-
* @typedef
|
|
244
|
-
* @property {
|
|
245
|
-
* @property {
|
|
246
|
-
* @property {boolean} success
|
|
287
|
+
* @typedef GetCountries
|
|
288
|
+
* @property {CountryObject[]} [items]
|
|
289
|
+
* @property {Page} [page]
|
|
247
290
|
*/
|
|
248
291
|
|
|
249
292
|
/**
|
|
250
|
-
* @typedef
|
|
251
|
-
* @property {string} [
|
|
252
|
-
* @property {
|
|
253
|
-
* @property {PincodeLatLongData} [lat_long]
|
|
254
|
-
* @property {PincodeMetaResponse} [meta]
|
|
255
|
-
* @property {CountryMetaResponse} [meta_code]
|
|
256
|
-
* @property {string} [name]
|
|
257
|
-
* @property {PincodeParentsResponse[]} [parents]
|
|
258
|
-
* @property {string} [sub_type]
|
|
259
|
-
* @property {string} [uid]
|
|
293
|
+
* @typedef GetOneOrAllPath
|
|
294
|
+
* @property {string} [locality_type]
|
|
295
|
+
* @property {string} [locality_value]
|
|
260
296
|
*/
|
|
261
297
|
|
|
262
298
|
/**
|
|
263
|
-
* @typedef
|
|
264
|
-
* @property {string} [
|
|
265
|
-
* @property {string} [
|
|
266
|
-
* @property {string} [
|
|
299
|
+
* @typedef GetOneOrAllQuery
|
|
300
|
+
* @property {string} [country]
|
|
301
|
+
* @property {string} [state]
|
|
302
|
+
* @property {string} [city]
|
|
303
|
+
* @property {string} [sector]
|
|
267
304
|
*/
|
|
268
305
|
|
|
269
306
|
/**
|
|
270
|
-
* @typedef
|
|
271
|
-
* @property {
|
|
272
|
-
* @property {
|
|
307
|
+
* @typedef GetOneOrAllParams
|
|
308
|
+
* @property {GetOneOrAllPath} [path]
|
|
309
|
+
* @property {GetOneOrAllQuery} [query]
|
|
273
310
|
*/
|
|
274
311
|
|
|
275
312
|
/**
|
|
276
|
-
* @typedef
|
|
277
|
-
* @property {
|
|
278
|
-
* @property {
|
|
313
|
+
* @typedef GetOneOrAll
|
|
314
|
+
* @property {string} [operation_id]
|
|
315
|
+
* @property {GetOneOrAllParams} [params]
|
|
279
316
|
*/
|
|
280
317
|
|
|
281
318
|
/**
|
|
282
|
-
* @typedef
|
|
283
|
-
* @property {
|
|
284
|
-
* @property {
|
|
285
|
-
* @property {string} [sub_type]
|
|
286
|
-
* @property {string} [uid]
|
|
319
|
+
* @typedef LengthValidation
|
|
320
|
+
* @property {number} [min]
|
|
321
|
+
* @property {number} [max]
|
|
287
322
|
*/
|
|
288
323
|
|
|
289
324
|
/**
|
|
290
|
-
* @typedef
|
|
291
|
-
* @property {
|
|
292
|
-
* @property {
|
|
293
|
-
* @property {string} identifier
|
|
294
|
-
* @property {number[]} ignored_locations
|
|
295
|
-
* @property {string} to_pincode
|
|
325
|
+
* @typedef FieldValidationRegex
|
|
326
|
+
* @property {string} [value]
|
|
327
|
+
* @property {LengthValidation} [length]
|
|
296
328
|
*/
|
|
297
329
|
|
|
298
330
|
/**
|
|
299
|
-
* @typedef
|
|
300
|
-
* @property {
|
|
301
|
-
* @property {
|
|
302
|
-
* @property {string} pystormbreaker_uuid
|
|
303
|
-
* @property {boolean} success
|
|
304
|
-
* @property {string} to_pincode
|
|
331
|
+
* @typedef FieldValidation
|
|
332
|
+
* @property {string} [type]
|
|
333
|
+
* @property {FieldValidationRegex} [regex]
|
|
305
334
|
*/
|
|
306
335
|
|
|
307
336
|
/**
|
|
308
|
-
* @typedef
|
|
309
|
-
* @property {
|
|
310
|
-
* @property {
|
|
311
|
-
* @property {number} [id]
|
|
312
|
-
* @property {number} [latitude]
|
|
313
|
-
* @property {number} [longitude]
|
|
314
|
-
* @property {number} [processing_time]
|
|
315
|
-
* @property {string} [store_type]
|
|
316
|
-
* @property {string[]} [tags]
|
|
337
|
+
* @typedef GetCountryFieldsAddressValues
|
|
338
|
+
* @property {GetOneOrAll} [get_one]
|
|
339
|
+
* @property {GetOneOrAll} [get_all]
|
|
317
340
|
*/
|
|
318
341
|
|
|
319
342
|
/**
|
|
320
|
-
* @typedef
|
|
321
|
-
* @property {
|
|
322
|
-
* @property {
|
|
323
|
-
* @property {
|
|
343
|
+
* @typedef GetCountryFieldsAddress
|
|
344
|
+
* @property {string} display_name
|
|
345
|
+
* @property {string} slug
|
|
346
|
+
* @property {boolean} required
|
|
347
|
+
* @property {boolean} [edit]
|
|
348
|
+
* @property {string} input
|
|
349
|
+
* @property {FieldValidation} [validation]
|
|
350
|
+
* @property {GetCountryFieldsAddressValues} [values]
|
|
351
|
+
* @property {string} [error_text]
|
|
324
352
|
*/
|
|
325
353
|
|
|
326
354
|
/**
|
|
327
|
-
* @typedef
|
|
328
|
-
* @property {
|
|
329
|
-
* @property {
|
|
330
|
-
* @property {
|
|
331
|
-
* @property {boolean} [is_cod_available]
|
|
332
|
-
* @property {number} [manufacturing_time]
|
|
333
|
-
* @property {string} [manufacturing_time_unit]
|
|
334
|
-
* @property {TATPromiseResponse} [promise]
|
|
355
|
+
* @typedef GetCountryFieldsAddressTemplate
|
|
356
|
+
* @property {string} checkout_form
|
|
357
|
+
* @property {string} store_os_form
|
|
358
|
+
* @property {string} default_display
|
|
335
359
|
*/
|
|
336
360
|
|
|
337
361
|
/**
|
|
338
|
-
* @typedef
|
|
339
|
-
* @property {
|
|
340
|
-
* @property {string}
|
|
362
|
+
* @typedef GetCountryFields
|
|
363
|
+
* @property {GetCountryFieldsAddress[]} address
|
|
364
|
+
* @property {string[]} serviceability_fields
|
|
365
|
+
* @property {GetCountryFieldsAddressTemplate} address_template
|
|
341
366
|
*/
|
|
342
367
|
|
|
343
368
|
/**
|
|
344
|
-
* @typedef
|
|
345
|
-
* @property {string} [
|
|
369
|
+
* @typedef GetCountry
|
|
370
|
+
* @property {string} [id]
|
|
371
|
+
* @property {string} [name]
|
|
372
|
+
* @property {string} [display_name]
|
|
373
|
+
* @property {string} [iso2]
|
|
374
|
+
* @property {string} [iso3]
|
|
375
|
+
* @property {string[]} [timezones]
|
|
376
|
+
* @property {CountryHierarchy[]} [hierarchy]
|
|
377
|
+
* @property {string} [phone_code]
|
|
378
|
+
* @property {string} [latitude]
|
|
379
|
+
* @property {string} [longitude]
|
|
380
|
+
* @property {CurrencyObject} [currency]
|
|
346
381
|
* @property {string} [type]
|
|
347
|
-
* @property {
|
|
382
|
+
* @property {GetCountryFields} [fields]
|
|
348
383
|
*/
|
|
349
384
|
|
|
350
385
|
/**
|
|
351
|
-
* @typedef
|
|
352
|
-
* @property {
|
|
353
|
-
* @property {string} [
|
|
386
|
+
* @typedef Page
|
|
387
|
+
* @property {number} [item_total]
|
|
388
|
+
* @property {string} [next_id]
|
|
389
|
+
* @property {boolean} [has_previous]
|
|
390
|
+
* @property {boolean} [has_next]
|
|
391
|
+
* @property {number} [current]
|
|
392
|
+
* @property {string} type
|
|
393
|
+
* @property {number} [size]
|
|
354
394
|
*/
|
|
355
395
|
|
|
356
396
|
/**
|
|
357
|
-
* @typedef
|
|
358
|
-
* @property {
|
|
359
|
-
* @property {string} [
|
|
360
|
-
* @property {
|
|
397
|
+
* @typedef Localities
|
|
398
|
+
* @property {string} [id]
|
|
399
|
+
* @property {string} [name]
|
|
400
|
+
* @property {string} [display_name]
|
|
401
|
+
* @property {string[]} [parent_ids]
|
|
402
|
+
* @property {string} [type]
|
|
361
403
|
*/
|
|
362
404
|
|
|
363
405
|
/**
|
|
364
|
-
* @typedef
|
|
365
|
-
* @property {
|
|
366
|
-
* @property {string} [
|
|
367
|
-
* @property {
|
|
406
|
+
* @typedef LocalityParent
|
|
407
|
+
* @property {string} [id]
|
|
408
|
+
* @property {string} [name]
|
|
409
|
+
* @property {string} [display_name]
|
|
410
|
+
* @property {string[]} [parent_ids]
|
|
411
|
+
* @property {string} [type]
|
|
368
412
|
*/
|
|
369
413
|
|
|
370
414
|
/**
|
|
371
|
-
* @typedef
|
|
372
|
-
* @property {
|
|
373
|
-
* @property {
|
|
415
|
+
* @typedef GetLocalities
|
|
416
|
+
* @property {Localities[]} [items]
|
|
417
|
+
* @property {Page} [page]
|
|
374
418
|
*/
|
|
375
419
|
|
|
376
420
|
/**
|
|
377
|
-
* @typedef
|
|
378
|
-
* @property {
|
|
379
|
-
* @property {
|
|
421
|
+
* @typedef GetLocality
|
|
422
|
+
* @property {string} [id]
|
|
423
|
+
* @property {string} [name]
|
|
424
|
+
* @property {string} [display_name]
|
|
425
|
+
* @property {string[]} [parent_ids]
|
|
426
|
+
* @property {string} [type]
|
|
427
|
+
* @property {LocalityParent[]} [localities]
|
|
380
428
|
*/
|
|
381
429
|
|
|
382
430
|
/**
|
|
383
|
-
* @typedef
|
|
384
|
-
* @property {string} [
|
|
385
|
-
* @property {string} [identifier]
|
|
386
|
-
* @property {string} [journey]
|
|
387
|
-
* @property {TATLocationDetailsRequest[]} [location_details]
|
|
388
|
-
* @property {string} [source]
|
|
389
|
-
* @property {string} [to_pincode]
|
|
431
|
+
* @typedef ErrorResponse
|
|
432
|
+
* @property {string} [error]
|
|
390
433
|
*/
|
|
391
434
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
* @property {string} [payment_mode]
|
|
401
|
-
* @property {string} [request_uuid]
|
|
402
|
-
* @property {string} [source]
|
|
403
|
-
* @property {string} [stormbreaker_uuid]
|
|
404
|
-
* @property {boolean} [success]
|
|
405
|
-
* @property {string} [to_city]
|
|
406
|
-
* @property {string} [to_pincode]
|
|
407
|
-
*/
|
|
435
|
+
class LogisticApplicationModel {
|
|
436
|
+
/** @returns {GetStoreResponse} */
|
|
437
|
+
static GetStoreResponse() {
|
|
438
|
+
return Joi.object({
|
|
439
|
+
items: Joi.array().items(LogisticApplicationModel.StoreItemResponse()),
|
|
440
|
+
page: LogisticApplicationModel.Page(),
|
|
441
|
+
});
|
|
442
|
+
}
|
|
408
443
|
|
|
409
|
-
/**
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
* @property {string} [landmark] - A string representing a prominent nearby
|
|
423
|
-
* landmark that aids in locating the address.
|
|
424
|
-
* @property {string} [name] - A string representing the recipient's name or the
|
|
425
|
-
* organization name associated with the address.
|
|
426
|
-
* @property {string} [phone] - An integer representing the recipient's contact
|
|
427
|
-
* phone number.
|
|
428
|
-
* @property {string} [pincode] - A string indicating the postal code or PIN
|
|
429
|
-
* code of the address area.
|
|
430
|
-
* @property {string} [sector] - A string specifying the sector or district of
|
|
431
|
-
* the address if applicable.
|
|
432
|
-
* @property {string} [state] - A string indicating the state or province of the address.
|
|
433
|
-
*/
|
|
444
|
+
/** @returns {StoreItemResponse} */
|
|
445
|
+
static StoreItemResponse() {
|
|
446
|
+
return Joi.object({
|
|
447
|
+
id: Joi.number(),
|
|
448
|
+
store_type: Joi.string().allow(""),
|
|
449
|
+
fulfillment_type: Joi.string().allow(""),
|
|
450
|
+
processing_time: Joi.number(),
|
|
451
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
452
|
+
company_id: Joi.number(),
|
|
453
|
+
latitude: Joi.number(),
|
|
454
|
+
longitude: Joi.number(),
|
|
455
|
+
});
|
|
456
|
+
}
|
|
434
457
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
static CountryEntityResponse() {
|
|
458
|
+
/** @returns {ValidateAddressRequest} */
|
|
459
|
+
static ValidateAddressRequest() {
|
|
438
460
|
return Joi.object({
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
461
|
+
address: Joi.string().allow(""),
|
|
462
|
+
address1: Joi.string().allow(""),
|
|
463
|
+
address2: Joi.string().allow(""),
|
|
464
|
+
area: Joi.string().allow(""),
|
|
465
|
+
landmark: Joi.string().allow(""),
|
|
466
|
+
pincode: Joi.string().allow(""),
|
|
467
|
+
sector: Joi.string().allow(""),
|
|
468
|
+
city: Joi.string().allow(""),
|
|
469
|
+
state: Joi.string().allow(""),
|
|
443
470
|
name: Joi.string().allow(""),
|
|
444
|
-
|
|
471
|
+
phone: Joi.string().allow(""),
|
|
472
|
+
email: Joi.string().allow(""),
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/** @returns {PincodeParentsResponse} */
|
|
477
|
+
static PincodeParentsResponse() {
|
|
478
|
+
return Joi.object({
|
|
445
479
|
sub_type: Joi.string().allow(""),
|
|
446
|
-
|
|
480
|
+
display_name: Joi.string().allow(""),
|
|
481
|
+
name: Joi.string().allow(""),
|
|
447
482
|
uid: Joi.string().allow(""),
|
|
448
483
|
});
|
|
449
484
|
}
|
|
450
485
|
|
|
451
|
-
/** @returns {
|
|
452
|
-
static
|
|
486
|
+
/** @returns {PincodeMetaResponse} */
|
|
487
|
+
static PincodeMetaResponse() {
|
|
453
488
|
return Joi.object({
|
|
454
|
-
|
|
455
|
-
|
|
489
|
+
zone: Joi.string().allow(""),
|
|
490
|
+
internal_zone_id: Joi.number(),
|
|
456
491
|
});
|
|
457
492
|
}
|
|
458
493
|
|
|
459
|
-
/** @returns {
|
|
460
|
-
static
|
|
494
|
+
/** @returns {PincodeErrorSchemaResponse} */
|
|
495
|
+
static PincodeErrorSchemaResponse() {
|
|
461
496
|
return Joi.object({
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
),
|
|
497
|
+
message: Joi.string().allow("").allow(null),
|
|
498
|
+
value: Joi.string().allow("").allow(null),
|
|
499
|
+
type: Joi.string().allow("").allow(null),
|
|
465
500
|
});
|
|
466
501
|
}
|
|
467
502
|
|
|
@@ -473,210 +508,212 @@ class LogisticApplicationModel {
|
|
|
473
508
|
});
|
|
474
509
|
}
|
|
475
510
|
|
|
476
|
-
/** @returns {
|
|
477
|
-
static
|
|
511
|
+
/** @returns {PincodeLatLongData} */
|
|
512
|
+
static PincodeLatLongData() {
|
|
478
513
|
return Joi.object({
|
|
479
|
-
currency: LogisticApplicationModel.CurrencyObject(),
|
|
480
|
-
display_name: Joi.string().allow(""),
|
|
481
|
-
hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()),
|
|
482
|
-
id: Joi.string().allow(""),
|
|
483
|
-
iso2: Joi.string().allow(""),
|
|
484
|
-
iso3: Joi.string().allow(""),
|
|
485
|
-
latitude: Joi.string().allow(""),
|
|
486
|
-
longitude: Joi.string().allow(""),
|
|
487
|
-
name: Joi.string().allow(""),
|
|
488
|
-
phone_code: Joi.string().allow(""),
|
|
489
|
-
timezones: Joi.array().items(Joi.string().allow("")),
|
|
490
514
|
type: Joi.string().allow(""),
|
|
515
|
+
coordinates: Joi.array().items(Joi.string().allow("")),
|
|
491
516
|
});
|
|
492
517
|
}
|
|
493
518
|
|
|
494
|
-
/** @returns {
|
|
495
|
-
static
|
|
519
|
+
/** @returns {PincodeDataResponse} */
|
|
520
|
+
static PincodeDataResponse() {
|
|
496
521
|
return Joi.object({
|
|
497
|
-
|
|
522
|
+
parents: Joi.array().items(
|
|
523
|
+
LogisticApplicationModel.PincodeParentsResponse()
|
|
524
|
+
),
|
|
525
|
+
meta: LogisticApplicationModel.PincodeMetaResponse(),
|
|
526
|
+
display_name: Joi.string().allow(""),
|
|
527
|
+
error: LogisticApplicationModel.PincodeErrorSchemaResponse().required(),
|
|
528
|
+
meta_code: LogisticApplicationModel.CountryMetaResponse(),
|
|
529
|
+
lat_long: LogisticApplicationModel.PincodeLatLongData(),
|
|
530
|
+
sub_type: Joi.string().allow(""),
|
|
498
531
|
name: Joi.string().allow(""),
|
|
499
|
-
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
/** @returns {DP} */
|
|
504
|
-
static DP() {
|
|
505
|
-
return Joi.object({
|
|
506
|
-
area_code: Joi.string().allow("").allow(null),
|
|
507
|
-
assign_dp_from_sb: Joi.boolean(),
|
|
508
|
-
external_account_id: Joi.string().allow("").allow(null),
|
|
509
|
-
fm_priority: Joi.number().required(),
|
|
510
|
-
internal_account_id: Joi.string().allow(""),
|
|
511
|
-
lm_priority: Joi.number().required(),
|
|
512
|
-
operations: Joi.array().items(Joi.string().allow("")).required(),
|
|
513
|
-
payment_mode: Joi.string().allow("").required(),
|
|
514
|
-
rvp_priority: Joi.number().required(),
|
|
515
|
-
transport_mode: Joi.string().allow(""),
|
|
532
|
+
uid: Joi.string().allow(""),
|
|
516
533
|
});
|
|
517
534
|
}
|
|
518
535
|
|
|
519
|
-
/** @returns {
|
|
520
|
-
static
|
|
536
|
+
/** @returns {PincodeApiResponse} */
|
|
537
|
+
static PincodeApiResponse() {
|
|
521
538
|
return Joi.object({
|
|
522
|
-
|
|
539
|
+
success: Joi.boolean().required(),
|
|
540
|
+
data: Joi.array().items(LogisticApplicationModel.PincodeDataResponse()),
|
|
541
|
+
error: LogisticApplicationModel.PincodeErrorSchemaResponse().required(),
|
|
523
542
|
});
|
|
524
543
|
}
|
|
525
544
|
|
|
526
|
-
/** @returns {
|
|
527
|
-
static
|
|
545
|
+
/** @returns {TATCategoryRequest} */
|
|
546
|
+
static TATCategoryRequest() {
|
|
528
547
|
return Joi.object({
|
|
529
|
-
|
|
530
|
-
|
|
548
|
+
level: Joi.string().allow(""),
|
|
549
|
+
id: Joi.number(),
|
|
531
550
|
});
|
|
532
551
|
}
|
|
533
552
|
|
|
534
|
-
/** @returns {
|
|
535
|
-
static
|
|
553
|
+
/** @returns {TATArticlesRequest} */
|
|
554
|
+
static TATArticlesRequest() {
|
|
536
555
|
return Joi.object({
|
|
537
|
-
|
|
538
|
-
|
|
556
|
+
category: LogisticApplicationModel.TATCategoryRequest(),
|
|
557
|
+
manufacturing_time_unit: Joi.string().allow(""),
|
|
558
|
+
manufacturing_time: Joi.number(),
|
|
539
559
|
});
|
|
540
560
|
}
|
|
541
561
|
|
|
542
|
-
/** @returns {
|
|
543
|
-
static
|
|
562
|
+
/** @returns {TATLocationDetailsRequest} */
|
|
563
|
+
static TATLocationDetailsRequest() {
|
|
544
564
|
return Joi.object({
|
|
545
|
-
|
|
546
|
-
|
|
565
|
+
fulfillment_id: Joi.number(),
|
|
566
|
+
from_pincode: Joi.string().allow(""),
|
|
567
|
+
articles: Joi.array().items(
|
|
568
|
+
LogisticApplicationModel.TATArticlesRequest()
|
|
569
|
+
),
|
|
547
570
|
});
|
|
548
571
|
}
|
|
549
572
|
|
|
550
|
-
/** @returns {
|
|
551
|
-
static
|
|
573
|
+
/** @returns {TATViewRequest} */
|
|
574
|
+
static TATViewRequest() {
|
|
552
575
|
return Joi.object({
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
longitude: Joi.string().allow(""),
|
|
562
|
-
name: Joi.string().allow(""),
|
|
563
|
-
phone_code: Joi.string().allow(""),
|
|
564
|
-
timezones: Joi.array().items(Joi.string().allow("")),
|
|
565
|
-
type: Joi.string().allow(""),
|
|
576
|
+
to_pincode: Joi.string().allow(""),
|
|
577
|
+
source: Joi.string().allow(""),
|
|
578
|
+
action: Joi.string().allow(""),
|
|
579
|
+
identifier: Joi.string().allow(""),
|
|
580
|
+
location_details: Joi.array().items(
|
|
581
|
+
LogisticApplicationModel.TATLocationDetailsRequest()
|
|
582
|
+
),
|
|
583
|
+
journey: Joi.string().allow(""),
|
|
566
584
|
});
|
|
567
585
|
}
|
|
568
586
|
|
|
569
|
-
/** @returns {
|
|
570
|
-
static
|
|
587
|
+
/** @returns {TATErrorSchemaResponse} */
|
|
588
|
+
static TATErrorSchemaResponse() {
|
|
571
589
|
return Joi.object({
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
address_template: LogisticApplicationModel.GetCountryFieldsAddressTemplate().required(),
|
|
576
|
-
serviceability_fields: Joi.array()
|
|
577
|
-
.items(Joi.string().allow(""))
|
|
578
|
-
.required(),
|
|
590
|
+
message: Joi.string().allow("").allow(null),
|
|
591
|
+
value: Joi.string().allow("").allow(null),
|
|
592
|
+
type: Joi.string().allow("").allow(null),
|
|
579
593
|
});
|
|
580
594
|
}
|
|
581
595
|
|
|
582
|
-
/** @returns {
|
|
583
|
-
static
|
|
596
|
+
/** @returns {TATTimestampResponse} */
|
|
597
|
+
static TATTimestampResponse() {
|
|
584
598
|
return Joi.object({
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
error_text: Joi.string().allow("").allow(null),
|
|
588
|
-
input: Joi.string().allow("").required(),
|
|
589
|
-
required: Joi.boolean().required(),
|
|
590
|
-
slug: Joi.string().allow("").required(),
|
|
591
|
-
validation: LogisticApplicationModel.FieldValidation(),
|
|
592
|
-
values: LogisticApplicationModel.GetCountryFieldsAddressValues(),
|
|
599
|
+
min: Joi.number(),
|
|
600
|
+
max: Joi.number(),
|
|
593
601
|
});
|
|
594
602
|
}
|
|
595
603
|
|
|
596
|
-
/** @returns {
|
|
597
|
-
static
|
|
604
|
+
/** @returns {TATFormattedResponse} */
|
|
605
|
+
static TATFormattedResponse() {
|
|
598
606
|
return Joi.object({
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
store_os_form: Joi.string().allow("").required(),
|
|
607
|
+
min: Joi.string().allow(""),
|
|
608
|
+
max: Joi.string().allow(""),
|
|
602
609
|
});
|
|
603
610
|
}
|
|
604
611
|
|
|
605
|
-
/** @returns {
|
|
606
|
-
static
|
|
612
|
+
/** @returns {TATPromiseResponse} */
|
|
613
|
+
static TATPromiseResponse() {
|
|
607
614
|
return Joi.object({
|
|
608
|
-
|
|
609
|
-
|
|
615
|
+
timestamp: LogisticApplicationModel.TATTimestampResponse(),
|
|
616
|
+
formatted: LogisticApplicationModel.TATFormattedResponse(),
|
|
610
617
|
});
|
|
611
618
|
}
|
|
612
619
|
|
|
613
|
-
/** @returns {
|
|
614
|
-
static
|
|
620
|
+
/** @returns {TATArticlesResponse} */
|
|
621
|
+
static TATArticlesResponse() {
|
|
615
622
|
return Joi.object({
|
|
616
|
-
|
|
617
|
-
|
|
623
|
+
manufacturing_time_unit: Joi.string().allow(""),
|
|
624
|
+
error: LogisticApplicationModel.TATErrorSchemaResponse(),
|
|
625
|
+
is_cod_available: Joi.boolean(),
|
|
626
|
+
promise: LogisticApplicationModel.TATPromiseResponse(),
|
|
627
|
+
manufacturing_time: Joi.number(),
|
|
628
|
+
category: LogisticApplicationModel.TATCategoryRequest(),
|
|
629
|
+
_manufacturing_time_seconds: Joi.number(),
|
|
618
630
|
});
|
|
619
631
|
}
|
|
620
632
|
|
|
621
|
-
/** @returns {
|
|
622
|
-
static
|
|
633
|
+
/** @returns {TATLocationDetailsResponse} */
|
|
634
|
+
static TATLocationDetailsResponse() {
|
|
623
635
|
return Joi.object({
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
type: Joi.string().allow(""),
|
|
636
|
+
fulfillment_id: Joi.number(),
|
|
637
|
+
from_pincode: Joi.string().allow(""),
|
|
638
|
+
articles: Joi.array().items(
|
|
639
|
+
LogisticApplicationModel.TATArticlesResponse()
|
|
640
|
+
),
|
|
630
641
|
});
|
|
631
642
|
}
|
|
632
643
|
|
|
633
|
-
/** @returns {
|
|
634
|
-
static
|
|
644
|
+
/** @returns {TATViewResponse} */
|
|
645
|
+
static TATViewResponse() {
|
|
635
646
|
return Joi.object({
|
|
636
|
-
|
|
637
|
-
|
|
647
|
+
to_pincode: Joi.string().allow(""),
|
|
648
|
+
request_uuid: Joi.string().allow(""),
|
|
649
|
+
payment_mode: Joi.string().allow(""),
|
|
650
|
+
success: Joi.boolean(),
|
|
651
|
+
error: LogisticApplicationModel.TATErrorSchemaResponse(),
|
|
652
|
+
is_cod_available: Joi.boolean(),
|
|
653
|
+
source: Joi.string().allow(""),
|
|
654
|
+
action: Joi.string().allow(""),
|
|
655
|
+
stormbreaker_uuid: Joi.string().allow(""),
|
|
656
|
+
to_city: Joi.string().allow(""),
|
|
657
|
+
identifier: Joi.string().allow(""),
|
|
658
|
+
location_details: Joi.array().items(
|
|
659
|
+
LogisticApplicationModel.TATLocationDetailsResponse()
|
|
660
|
+
),
|
|
661
|
+
journey: Joi.string().allow(""),
|
|
638
662
|
});
|
|
639
663
|
}
|
|
640
664
|
|
|
641
|
-
/** @returns {
|
|
642
|
-
static
|
|
665
|
+
/** @returns {DP} */
|
|
666
|
+
static DP() {
|
|
643
667
|
return Joi.object({
|
|
644
|
-
|
|
645
|
-
|
|
668
|
+
fm_priority: Joi.number().required(),
|
|
669
|
+
lm_priority: Joi.number().required(),
|
|
670
|
+
rvp_priority: Joi.number().required(),
|
|
671
|
+
payment_mode: Joi.string().allow("").required(),
|
|
672
|
+
operations: Joi.array().items(Joi.string().allow("")).required(),
|
|
673
|
+
area_code: Joi.string().allow("").allow(null),
|
|
674
|
+
assign_dp_from_sb: Joi.boolean(),
|
|
675
|
+
internal_account_id: Joi.string().allow(""),
|
|
676
|
+
external_account_id: Joi.string().allow("").allow(null),
|
|
677
|
+
transport_mode: Joi.string().allow(""),
|
|
646
678
|
});
|
|
647
679
|
}
|
|
648
680
|
|
|
649
|
-
/** @returns {
|
|
650
|
-
static
|
|
681
|
+
/** @returns {LogisticsResponse} */
|
|
682
|
+
static LogisticsResponse() {
|
|
651
683
|
return Joi.object({
|
|
652
|
-
|
|
653
|
-
locality_value: Joi.string().allow(""),
|
|
684
|
+
dp: Joi.object().pattern(/\S/, LogisticApplicationModel.DP()),
|
|
654
685
|
});
|
|
655
686
|
}
|
|
656
687
|
|
|
657
|
-
/** @returns {
|
|
658
|
-
static
|
|
688
|
+
/** @returns {CountryEntityResponse} */
|
|
689
|
+
static CountryEntityResponse() {
|
|
659
690
|
return Joi.object({
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
691
|
+
meta: LogisticApplicationModel.CountryMetaResponse(),
|
|
692
|
+
logistics: LogisticApplicationModel.LogisticsResponse(),
|
|
693
|
+
display_name: Joi.string().allow(""),
|
|
694
|
+
type: Joi.string().allow(""),
|
|
695
|
+
is_active: Joi.boolean(),
|
|
696
|
+
parent_id: Joi.string().allow(""),
|
|
697
|
+
sub_type: Joi.string().allow(""),
|
|
698
|
+
name: Joi.string().allow(""),
|
|
699
|
+
uid: Joi.string().allow(""),
|
|
664
700
|
});
|
|
665
701
|
}
|
|
666
702
|
|
|
667
|
-
/** @returns {
|
|
668
|
-
static
|
|
703
|
+
/** @returns {CountryListResponse} */
|
|
704
|
+
static CountryListResponse() {
|
|
669
705
|
return Joi.object({
|
|
670
|
-
|
|
671
|
-
|
|
706
|
+
results: Joi.array().items(
|
|
707
|
+
LogisticApplicationModel.CountryEntityResponse()
|
|
708
|
+
),
|
|
672
709
|
});
|
|
673
710
|
}
|
|
674
711
|
|
|
675
712
|
/** @returns {GetZoneFromPincodeViewRequest} */
|
|
676
713
|
static GetZoneFromPincodeViewRequest() {
|
|
677
714
|
return Joi.object({
|
|
678
|
-
country: Joi.string().allow("").required(),
|
|
679
715
|
pincode: Joi.string().allow("").required(),
|
|
716
|
+
country: Joi.string().allow("").required(),
|
|
680
717
|
});
|
|
681
718
|
}
|
|
682
719
|
|
|
@@ -688,288 +725,251 @@ class LogisticApplicationModel {
|
|
|
688
725
|
});
|
|
689
726
|
}
|
|
690
727
|
|
|
691
|
-
/** @returns {
|
|
692
|
-
static
|
|
728
|
+
/** @returns {ReAssignStoreRequest} */
|
|
729
|
+
static ReAssignStoreRequest() {
|
|
693
730
|
return Joi.object({
|
|
694
|
-
|
|
695
|
-
|
|
731
|
+
configuration: Joi.any().required(),
|
|
732
|
+
to_pincode: Joi.string().allow("").required(),
|
|
733
|
+
ignored_locations: Joi.array().items(Joi.number()).required(),
|
|
734
|
+
identifier: Joi.string().allow("").required(),
|
|
735
|
+
articles: Joi.array().items(Joi.any()).required(),
|
|
696
736
|
});
|
|
697
737
|
}
|
|
698
738
|
|
|
699
|
-
/** @returns {
|
|
700
|
-
static
|
|
739
|
+
/** @returns {ReAssignStoreResponse} */
|
|
740
|
+
static ReAssignStoreResponse() {
|
|
701
741
|
return Joi.object({
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
742
|
+
to_pincode: Joi.string().allow("").required(),
|
|
743
|
+
pystormbreaker_uuid: Joi.string().allow("").required(),
|
|
744
|
+
success: Joi.boolean().required(),
|
|
745
|
+
error: Joi.any().required(),
|
|
746
|
+
assigned_stores: Joi.array().items(Joi.any()),
|
|
707
747
|
});
|
|
708
748
|
}
|
|
709
749
|
|
|
710
|
-
/** @returns {
|
|
711
|
-
static
|
|
750
|
+
/** @returns {CountryHierarchy} */
|
|
751
|
+
static CountryHierarchy() {
|
|
712
752
|
return Joi.object({
|
|
713
|
-
display_name: Joi.string().allow(""),
|
|
714
|
-
id: Joi.string().allow(""),
|
|
715
753
|
name: Joi.string().allow(""),
|
|
716
|
-
|
|
717
|
-
type: Joi.string().allow(""),
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
/** @returns {LogisticsResponse} */
|
|
722
|
-
static LogisticsResponse() {
|
|
723
|
-
return Joi.object({
|
|
724
|
-
dp: Joi.object().pattern(/\S/, LogisticApplicationModel.DP()),
|
|
725
|
-
});
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
/** @returns {Page} */
|
|
729
|
-
static Page() {
|
|
730
|
-
return Joi.object({
|
|
731
|
-
current: Joi.number(),
|
|
732
|
-
has_next: Joi.boolean(),
|
|
733
|
-
has_previous: Joi.boolean(),
|
|
734
|
-
item_total: Joi.number(),
|
|
735
|
-
next_id: Joi.string().allow(""),
|
|
736
|
-
size: Joi.number(),
|
|
737
|
-
type: Joi.string().allow("").required(),
|
|
754
|
+
slug: Joi.string().allow(""),
|
|
738
755
|
});
|
|
739
756
|
}
|
|
740
757
|
|
|
741
|
-
/** @returns {
|
|
742
|
-
static
|
|
758
|
+
/** @returns {CurrencyObject} */
|
|
759
|
+
static CurrencyObject() {
|
|
743
760
|
return Joi.object({
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
761
|
+
code: Joi.string().allow(""),
|
|
762
|
+
name: Joi.string().allow(""),
|
|
763
|
+
symbol: Joi.string().allow(""),
|
|
747
764
|
});
|
|
748
765
|
}
|
|
749
766
|
|
|
750
|
-
/** @returns {
|
|
751
|
-
static
|
|
767
|
+
/** @returns {CountryObject} */
|
|
768
|
+
static CountryObject() {
|
|
752
769
|
return Joi.object({
|
|
753
|
-
|
|
754
|
-
error: LogisticApplicationModel.PincodeErrorSchemaResponse().required(),
|
|
755
|
-
lat_long: LogisticApplicationModel.PincodeLatLongData(),
|
|
756
|
-
meta: LogisticApplicationModel.PincodeMetaResponse(),
|
|
757
|
-
meta_code: LogisticApplicationModel.CountryMetaResponse(),
|
|
770
|
+
id: Joi.string().allow(""),
|
|
758
771
|
name: Joi.string().allow(""),
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
),
|
|
762
|
-
|
|
763
|
-
|
|
772
|
+
display_name: Joi.string().allow(""),
|
|
773
|
+
iso2: Joi.string().allow(""),
|
|
774
|
+
iso3: Joi.string().allow(""),
|
|
775
|
+
timezones: Joi.array().items(Joi.string().allow("")),
|
|
776
|
+
hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()),
|
|
777
|
+
phone_code: Joi.string().allow(""),
|
|
778
|
+
latitude: Joi.string().allow(""),
|
|
779
|
+
longitude: Joi.string().allow(""),
|
|
780
|
+
currency: LogisticApplicationModel.CurrencyObject(),
|
|
781
|
+
type: Joi.string().allow(""),
|
|
764
782
|
});
|
|
765
783
|
}
|
|
766
784
|
|
|
767
|
-
/** @returns {
|
|
768
|
-
static
|
|
785
|
+
/** @returns {GetCountries} */
|
|
786
|
+
static GetCountries() {
|
|
769
787
|
return Joi.object({
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
value: Joi.string().allow("").allow(null),
|
|
788
|
+
items: Joi.array().items(LogisticApplicationModel.CountryObject()),
|
|
789
|
+
page: LogisticApplicationModel.Page(),
|
|
773
790
|
});
|
|
774
791
|
}
|
|
775
792
|
|
|
776
|
-
/** @returns {
|
|
777
|
-
static
|
|
793
|
+
/** @returns {GetOneOrAllPath} */
|
|
794
|
+
static GetOneOrAllPath() {
|
|
778
795
|
return Joi.object({
|
|
779
|
-
|
|
780
|
-
|
|
796
|
+
locality_type: Joi.string().allow(""),
|
|
797
|
+
locality_value: Joi.string().allow(""),
|
|
781
798
|
});
|
|
782
799
|
}
|
|
783
800
|
|
|
784
|
-
/** @returns {
|
|
785
|
-
static
|
|
801
|
+
/** @returns {GetOneOrAllQuery} */
|
|
802
|
+
static GetOneOrAllQuery() {
|
|
786
803
|
return Joi.object({
|
|
787
|
-
|
|
788
|
-
|
|
804
|
+
country: Joi.string().allow("").allow(null),
|
|
805
|
+
state: Joi.string().allow("").allow(null),
|
|
806
|
+
city: Joi.string().allow("").allow(null),
|
|
807
|
+
sector: Joi.string().allow("").allow(null),
|
|
789
808
|
});
|
|
790
809
|
}
|
|
791
810
|
|
|
792
|
-
/** @returns {
|
|
793
|
-
static
|
|
811
|
+
/** @returns {GetOneOrAllParams} */
|
|
812
|
+
static GetOneOrAllParams() {
|
|
794
813
|
return Joi.object({
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
sub_type: Joi.string().allow(""),
|
|
798
|
-
uid: Joi.string().allow(""),
|
|
814
|
+
path: LogisticApplicationModel.GetOneOrAllPath(),
|
|
815
|
+
query: LogisticApplicationModel.GetOneOrAllQuery(),
|
|
799
816
|
});
|
|
800
817
|
}
|
|
801
818
|
|
|
802
|
-
/** @returns {
|
|
803
|
-
static
|
|
819
|
+
/** @returns {GetOneOrAll} */
|
|
820
|
+
static GetOneOrAll() {
|
|
804
821
|
return Joi.object({
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
identifier: Joi.string().allow("").required(),
|
|
808
|
-
ignored_locations: Joi.array().items(Joi.number()).required(),
|
|
809
|
-
to_pincode: Joi.string().allow("").required(),
|
|
822
|
+
operation_id: Joi.string().allow(""),
|
|
823
|
+
params: LogisticApplicationModel.GetOneOrAllParams(),
|
|
810
824
|
});
|
|
811
825
|
}
|
|
812
826
|
|
|
813
|
-
/** @returns {
|
|
814
|
-
static
|
|
827
|
+
/** @returns {LengthValidation} */
|
|
828
|
+
static LengthValidation() {
|
|
815
829
|
return Joi.object({
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
pystormbreaker_uuid: Joi.string().allow("").required(),
|
|
819
|
-
success: Joi.boolean().required(),
|
|
820
|
-
to_pincode: Joi.string().allow("").required(),
|
|
830
|
+
min: Joi.number().allow(null),
|
|
831
|
+
max: Joi.number().allow(null),
|
|
821
832
|
});
|
|
822
833
|
}
|
|
823
834
|
|
|
824
|
-
/** @returns {
|
|
825
|
-
static
|
|
835
|
+
/** @returns {FieldValidationRegex} */
|
|
836
|
+
static FieldValidationRegex() {
|
|
826
837
|
return Joi.object({
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
id: Joi.number(),
|
|
830
|
-
latitude: Joi.number(),
|
|
831
|
-
longitude: Joi.number(),
|
|
832
|
-
processing_time: Joi.number(),
|
|
833
|
-
store_type: Joi.string().allow(""),
|
|
834
|
-
tags: Joi.array().items(Joi.string().allow("")),
|
|
838
|
+
value: Joi.string().allow(""),
|
|
839
|
+
length: LogisticApplicationModel.LengthValidation(),
|
|
835
840
|
});
|
|
836
841
|
}
|
|
837
842
|
|
|
838
|
-
/** @returns {
|
|
839
|
-
static
|
|
843
|
+
/** @returns {FieldValidation} */
|
|
844
|
+
static FieldValidation() {
|
|
840
845
|
return Joi.object({
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
manufacturing_time_unit: Joi.string().allow(""),
|
|
846
|
+
type: Joi.string().allow(""),
|
|
847
|
+
regex: LogisticApplicationModel.FieldValidationRegex(),
|
|
844
848
|
});
|
|
845
849
|
}
|
|
846
850
|
|
|
847
|
-
/** @returns {
|
|
848
|
-
static
|
|
851
|
+
/** @returns {GetCountryFieldsAddressValues} */
|
|
852
|
+
static GetCountryFieldsAddressValues() {
|
|
849
853
|
return Joi.object({
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
error: LogisticApplicationModel.TATErrorSchemaResponse(),
|
|
853
|
-
is_cod_available: Joi.boolean(),
|
|
854
|
-
manufacturing_time: Joi.number(),
|
|
855
|
-
manufacturing_time_unit: Joi.string().allow(""),
|
|
856
|
-
promise: LogisticApplicationModel.TATPromiseResponse(),
|
|
854
|
+
get_one: LogisticApplicationModel.GetOneOrAll(),
|
|
855
|
+
get_all: LogisticApplicationModel.GetOneOrAll(),
|
|
857
856
|
});
|
|
858
857
|
}
|
|
859
858
|
|
|
860
|
-
/** @returns {
|
|
861
|
-
static
|
|
859
|
+
/** @returns {GetCountryFieldsAddress} */
|
|
860
|
+
static GetCountryFieldsAddress() {
|
|
862
861
|
return Joi.object({
|
|
863
|
-
|
|
864
|
-
|
|
862
|
+
display_name: Joi.string().allow("").required(),
|
|
863
|
+
slug: Joi.string().allow("").required(),
|
|
864
|
+
required: Joi.boolean().required(),
|
|
865
|
+
edit: Joi.boolean(),
|
|
866
|
+
input: Joi.string().allow("").required(),
|
|
867
|
+
validation: LogisticApplicationModel.FieldValidation(),
|
|
868
|
+
values: LogisticApplicationModel.GetCountryFieldsAddressValues(),
|
|
869
|
+
error_text: Joi.string().allow("").allow(null),
|
|
865
870
|
});
|
|
866
871
|
}
|
|
867
872
|
|
|
868
|
-
/** @returns {
|
|
869
|
-
static
|
|
873
|
+
/** @returns {GetCountryFieldsAddressTemplate} */
|
|
874
|
+
static GetCountryFieldsAddressTemplate() {
|
|
870
875
|
return Joi.object({
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
876
|
+
checkout_form: Joi.string().allow("").required(),
|
|
877
|
+
store_os_form: Joi.string().allow("").required(),
|
|
878
|
+
default_display: Joi.string().allow("").required(),
|
|
874
879
|
});
|
|
875
880
|
}
|
|
876
881
|
|
|
877
|
-
/** @returns {
|
|
878
|
-
static
|
|
882
|
+
/** @returns {GetCountryFields} */
|
|
883
|
+
static GetCountryFields() {
|
|
879
884
|
return Joi.object({
|
|
880
|
-
|
|
881
|
-
|
|
885
|
+
address: Joi.array()
|
|
886
|
+
.items(LogisticApplicationModel.GetCountryFieldsAddress())
|
|
887
|
+
.required(),
|
|
888
|
+
serviceability_fields: Joi.array()
|
|
889
|
+
.items(Joi.string().allow(""))
|
|
890
|
+
.required(),
|
|
891
|
+
address_template: LogisticApplicationModel.GetCountryFieldsAddressTemplate().required(),
|
|
882
892
|
});
|
|
883
893
|
}
|
|
884
894
|
|
|
885
|
-
/** @returns {
|
|
886
|
-
static
|
|
895
|
+
/** @returns {GetCountry} */
|
|
896
|
+
static GetCountry() {
|
|
887
897
|
return Joi.object({
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
),
|
|
891
|
-
|
|
892
|
-
|
|
898
|
+
id: Joi.string().allow(""),
|
|
899
|
+
name: Joi.string().allow(""),
|
|
900
|
+
display_name: Joi.string().allow(""),
|
|
901
|
+
iso2: Joi.string().allow(""),
|
|
902
|
+
iso3: Joi.string().allow(""),
|
|
903
|
+
timezones: Joi.array().items(Joi.string().allow("")),
|
|
904
|
+
hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()),
|
|
905
|
+
phone_code: Joi.string().allow(""),
|
|
906
|
+
latitude: Joi.string().allow(""),
|
|
907
|
+
longitude: Joi.string().allow(""),
|
|
908
|
+
currency: LogisticApplicationModel.CurrencyObject(),
|
|
909
|
+
type: Joi.string().allow(""),
|
|
910
|
+
fields: LogisticApplicationModel.GetCountryFields(),
|
|
893
911
|
});
|
|
894
912
|
}
|
|
895
913
|
|
|
896
|
-
/** @returns {
|
|
897
|
-
static
|
|
914
|
+
/** @returns {Page} */
|
|
915
|
+
static Page() {
|
|
898
916
|
return Joi.object({
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
),
|
|
902
|
-
|
|
903
|
-
|
|
917
|
+
item_total: Joi.number(),
|
|
918
|
+
next_id: Joi.string().allow(""),
|
|
919
|
+
has_previous: Joi.boolean(),
|
|
920
|
+
has_next: Joi.boolean(),
|
|
921
|
+
current: Joi.number(),
|
|
922
|
+
type: Joi.string().allow("").required(),
|
|
923
|
+
size: Joi.number(),
|
|
904
924
|
});
|
|
905
925
|
}
|
|
906
926
|
|
|
907
|
-
/** @returns {
|
|
908
|
-
static
|
|
927
|
+
/** @returns {Localities} */
|
|
928
|
+
static Localities() {
|
|
909
929
|
return Joi.object({
|
|
910
|
-
|
|
911
|
-
|
|
930
|
+
id: Joi.string().allow(""),
|
|
931
|
+
name: Joi.string().allow(""),
|
|
932
|
+
display_name: Joi.string().allow(""),
|
|
933
|
+
parent_ids: Joi.array().items(Joi.string().allow("")),
|
|
934
|
+
type: Joi.string().allow(""),
|
|
912
935
|
});
|
|
913
936
|
}
|
|
914
937
|
|
|
915
|
-
/** @returns {
|
|
916
|
-
static
|
|
938
|
+
/** @returns {LocalityParent} */
|
|
939
|
+
static LocalityParent() {
|
|
917
940
|
return Joi.object({
|
|
918
|
-
|
|
919
|
-
|
|
941
|
+
id: Joi.string().allow(""),
|
|
942
|
+
name: Joi.string().allow(""),
|
|
943
|
+
display_name: Joi.string().allow(""),
|
|
944
|
+
parent_ids: Joi.array().items(Joi.string().allow("")),
|
|
945
|
+
type: Joi.string().allow(""),
|
|
920
946
|
});
|
|
921
947
|
}
|
|
922
948
|
|
|
923
|
-
/** @returns {
|
|
924
|
-
static
|
|
949
|
+
/** @returns {GetLocalities} */
|
|
950
|
+
static GetLocalities() {
|
|
925
951
|
return Joi.object({
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
journey: Joi.string().allow(""),
|
|
929
|
-
location_details: Joi.array().items(
|
|
930
|
-
LogisticApplicationModel.TATLocationDetailsRequest()
|
|
931
|
-
),
|
|
932
|
-
source: Joi.string().allow(""),
|
|
933
|
-
to_pincode: Joi.string().allow(""),
|
|
952
|
+
items: Joi.array().items(LogisticApplicationModel.Localities()),
|
|
953
|
+
page: LogisticApplicationModel.Page(),
|
|
934
954
|
});
|
|
935
955
|
}
|
|
936
956
|
|
|
937
|
-
/** @returns {
|
|
938
|
-
static
|
|
957
|
+
/** @returns {GetLocality} */
|
|
958
|
+
static GetLocality() {
|
|
939
959
|
return Joi.object({
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
LogisticApplicationModel.TATLocationDetailsResponse()
|
|
947
|
-
),
|
|
948
|
-
payment_mode: Joi.string().allow(""),
|
|
949
|
-
request_uuid: Joi.string().allow(""),
|
|
950
|
-
source: Joi.string().allow(""),
|
|
951
|
-
stormbreaker_uuid: Joi.string().allow(""),
|
|
952
|
-
success: Joi.boolean(),
|
|
953
|
-
to_city: Joi.string().allow(""),
|
|
954
|
-
to_pincode: Joi.string().allow(""),
|
|
960
|
+
id: Joi.string().allow(""),
|
|
961
|
+
name: Joi.string().allow(""),
|
|
962
|
+
display_name: Joi.string().allow(""),
|
|
963
|
+
parent_ids: Joi.array().items(Joi.string().allow("")),
|
|
964
|
+
type: Joi.string().allow(""),
|
|
965
|
+
localities: Joi.array().items(LogisticApplicationModel.LocalityParent()),
|
|
955
966
|
});
|
|
956
967
|
}
|
|
957
968
|
|
|
958
|
-
/** @returns {
|
|
959
|
-
static
|
|
969
|
+
/** @returns {ErrorResponse} */
|
|
970
|
+
static ErrorResponse() {
|
|
960
971
|
return Joi.object({
|
|
961
|
-
|
|
962
|
-
address1: Joi.string().allow(""),
|
|
963
|
-
address2: Joi.string().allow(""),
|
|
964
|
-
area: Joi.string().allow(""),
|
|
965
|
-
city: Joi.string().allow(""),
|
|
966
|
-
email: Joi.string().allow(""),
|
|
967
|
-
landmark: Joi.string().allow(""),
|
|
968
|
-
name: Joi.string().allow(""),
|
|
969
|
-
phone: Joi.string().allow(""),
|
|
970
|
-
pincode: Joi.string().allow(""),
|
|
971
|
-
sector: Joi.string().allow(""),
|
|
972
|
-
state: Joi.string().allow(""),
|
|
972
|
+
error: Joi.string().allow(""),
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
975
|
}
|