@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,64 +1,96 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @typedef
|
|
5
|
-
* @property {
|
|
6
|
-
* @property {
|
|
7
|
-
* @property {
|
|
8
|
-
* @property {number} [lte]
|
|
4
|
+
* @typedef BulkRegionServiceabilityTatRequest
|
|
5
|
+
* @property {string} country
|
|
6
|
+
* @property {string} region
|
|
7
|
+
* @property {string} type
|
|
9
8
|
*/
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
|
-
* @typedef
|
|
13
|
-
* @property {string}
|
|
14
|
-
* @property {string}
|
|
11
|
+
* @typedef BulkRegionServiceabilityTatResponseItemData
|
|
12
|
+
* @property {string} [country]
|
|
13
|
+
* @property {string} [region]
|
|
14
|
+
* @property {string} [type]
|
|
15
|
+
* @property {string} [batch_id]
|
|
16
|
+
* @property {string} [status]
|
|
17
|
+
* @property {Object[]} [failed_records]
|
|
15
18
|
* @property {string} [file_path]
|
|
16
|
-
* @property {string} region
|
|
17
19
|
*/
|
|
18
20
|
|
|
19
21
|
/**
|
|
20
|
-
* @typedef
|
|
21
|
-
* @property {
|
|
22
|
-
* @property {
|
|
22
|
+
* @typedef ErrorResponse
|
|
23
|
+
* @property {string} value
|
|
24
|
+
* @property {string} message
|
|
25
|
+
* @property {string} type
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @typedef FailureResponse
|
|
30
|
+
* @property {boolean} success
|
|
31
|
+
* @property {ErrorResponse[]} error
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @typedef BulkRegionServiceabilityTatResponse
|
|
36
|
+
* @property {BulkRegionServiceabilityTatResponseItemData[]} [items]
|
|
37
|
+
* @property {Page} [page]
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @typedef Page
|
|
42
|
+
* @property {number} [item_total]
|
|
43
|
+
* @property {string} [next_id]
|
|
44
|
+
* @property {boolean} [has_previous]
|
|
45
|
+
* @property {boolean} [has_next]
|
|
46
|
+
* @property {number} [current]
|
|
47
|
+
* @property {string} type
|
|
48
|
+
* @property {number} [size]
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @typedef BulkRegionJobSerializer
|
|
53
|
+
* @property {string} [file_path]
|
|
54
|
+
* @property {string} country
|
|
55
|
+
* @property {string} action
|
|
56
|
+
* @property {string} region
|
|
23
57
|
*/
|
|
24
58
|
|
|
25
59
|
/**
|
|
26
60
|
* @typedef BulkRegionResponseItemData
|
|
61
|
+
* @property {string} file_path
|
|
62
|
+
* @property {number} [failed]
|
|
63
|
+
* @property {Object[]} [failed_records]
|
|
27
64
|
* @property {string} action
|
|
28
65
|
* @property {string} batch_id
|
|
29
66
|
* @property {string} country
|
|
30
|
-
* @property {
|
|
31
|
-
* @property {number} [failed]
|
|
32
|
-
* @property {Object[]} [failed_records]
|
|
33
|
-
* @property {string} file_path
|
|
67
|
+
* @property {number} [success]
|
|
34
68
|
* @property {string} region
|
|
35
69
|
* @property {string} status
|
|
36
|
-
* @property {number} [success]
|
|
37
70
|
* @property {number} [total]
|
|
71
|
+
* @property {string} [error_file_path]
|
|
38
72
|
*/
|
|
39
73
|
|
|
40
74
|
/**
|
|
41
|
-
* @typedef
|
|
42
|
-
* @property {
|
|
43
|
-
* @property {
|
|
44
|
-
* @property {string} type
|
|
75
|
+
* @typedef BulkRegionResponse
|
|
76
|
+
* @property {BulkRegionResponseItemData[]} items
|
|
77
|
+
* @property {Page} page
|
|
45
78
|
*/
|
|
46
79
|
|
|
47
80
|
/**
|
|
48
|
-
* @typedef
|
|
49
|
-
* @property {
|
|
50
|
-
* @property {
|
|
81
|
+
* @typedef CourierAccount
|
|
82
|
+
* @property {string} extension_id
|
|
83
|
+
* @property {string} account_id
|
|
84
|
+
* @property {string} scheme_id
|
|
85
|
+
* @property {boolean} is_self_ship
|
|
86
|
+
* @property {string} stage
|
|
87
|
+
* @property {boolean} is_own_account
|
|
51
88
|
*/
|
|
52
89
|
|
|
53
90
|
/**
|
|
54
|
-
* @typedef
|
|
55
|
-
* @property {
|
|
56
|
-
* @property {
|
|
57
|
-
* @property {Object[]} [failed_records]
|
|
58
|
-
* @property {string} [file_path]
|
|
59
|
-
* @property {string} [region]
|
|
60
|
-
* @property {string} [status]
|
|
61
|
-
* @property {string} [type]
|
|
91
|
+
* @typedef CourierPartnerAccountFailureResponse
|
|
92
|
+
* @property {boolean} success
|
|
93
|
+
* @property {ErrorResponse[]} error
|
|
62
94
|
*/
|
|
63
95
|
|
|
64
96
|
/**
|
|
@@ -68,90 +100,69 @@ const Joi = require("joi");
|
|
|
68
100
|
*/
|
|
69
101
|
|
|
70
102
|
/**
|
|
71
|
-
* @typedef
|
|
103
|
+
* @typedef CourierAccountResponse
|
|
72
104
|
* @property {string} account_id
|
|
73
|
-
* @property {string} extension_id
|
|
74
|
-
* @property {boolean} is_own_account
|
|
75
|
-
* @property {boolean} is_self_ship
|
|
76
105
|
* @property {string} scheme_id
|
|
106
|
+
* @property {boolean} is_self_ship
|
|
77
107
|
* @property {string} stage
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* @typedef CourierAccountResponse
|
|
82
|
-
* @property {string} account_id
|
|
83
108
|
* @property {boolean} is_own_account
|
|
84
|
-
* @property {boolean} is_self_ship
|
|
85
|
-
* @property {string} scheme_id
|
|
86
109
|
* @property {CourierPartnerSchemeModel} scheme_rules
|
|
87
|
-
* @property {string} stage
|
|
88
110
|
*/
|
|
89
111
|
|
|
90
112
|
/**
|
|
91
|
-
* @typedef
|
|
92
|
-
* @property {
|
|
93
|
-
* @property {
|
|
113
|
+
* @typedef CourierPartnerSchemeModel
|
|
114
|
+
* @property {string} extension_id
|
|
115
|
+
* @property {string} scheme_id
|
|
116
|
+
* @property {string} name
|
|
117
|
+
* @property {ArithmeticOperations} weight
|
|
118
|
+
* @property {string} transport_type
|
|
119
|
+
* @property {string} region
|
|
120
|
+
* @property {string} delivery_type
|
|
121
|
+
* @property {string[]} payment_mode
|
|
122
|
+
* @property {string} stage
|
|
123
|
+
* @property {CourierPartnerSchemeFeatures} feature
|
|
94
124
|
*/
|
|
95
125
|
|
|
96
126
|
/**
|
|
97
127
|
* @typedef CourierPartnerSchemeFeatures
|
|
98
|
-
* @property {boolean} [cold_storage_goods]
|
|
99
|
-
* @property {boolean} [dangerous_goods]
|
|
100
|
-
* @property {boolean} [doorstep_exchange]
|
|
101
128
|
* @property {boolean} [doorstep_qc]
|
|
102
|
-
* @property {boolean} [
|
|
103
|
-
* @property {boolean} [ewaybill]
|
|
104
|
-
* @property {boolean} [fragile_goods]
|
|
129
|
+
* @property {boolean} [qr]
|
|
105
130
|
* @property {boolean} [mps]
|
|
106
|
-
* @property {boolean} [multi_pick_multi_drop]
|
|
107
|
-
* @property {boolean} [multi_pick_single_drop]
|
|
108
131
|
* @property {boolean} [ndr]
|
|
109
132
|
* @property {number} [ndr_attempts]
|
|
110
|
-
* @property {boolean} [
|
|
111
|
-
* @property {boolean} [
|
|
112
|
-
* @property {boolean} [qr]
|
|
133
|
+
* @property {boolean} [dangerous_goods]
|
|
134
|
+
* @property {boolean} [fragile_goods]
|
|
113
135
|
* @property {boolean} [restricted_goods]
|
|
114
|
-
* @property {boolean} [
|
|
136
|
+
* @property {boolean} [cold_storage_goods]
|
|
137
|
+
* @property {boolean} [doorstep_exchange]
|
|
138
|
+
* @property {boolean} [doorstep_return]
|
|
139
|
+
* @property {boolean} [product_installation]
|
|
140
|
+
* @property {boolean} [openbox_delivery]
|
|
115
141
|
* @property {string} [status_updates]
|
|
142
|
+
* @property {boolean} [multi_pick_single_drop]
|
|
143
|
+
* @property {boolean} [single_pick_multi_drop]
|
|
144
|
+
* @property {boolean} [multi_pick_multi_drop]
|
|
145
|
+
* @property {boolean} [ewaybill]
|
|
116
146
|
*/
|
|
117
147
|
|
|
118
148
|
/**
|
|
119
|
-
* @typedef
|
|
120
|
-
* @property {
|
|
121
|
-
* @property {
|
|
122
|
-
* @property {
|
|
123
|
-
* @property {
|
|
124
|
-
* @property {string[]} payment_mode
|
|
125
|
-
* @property {string} region
|
|
126
|
-
* @property {string} scheme_id
|
|
127
|
-
* @property {string} stage
|
|
128
|
-
* @property {string} transport_type
|
|
129
|
-
* @property {ArithmeticOperations} weight
|
|
149
|
+
* @typedef ArithmeticOperations
|
|
150
|
+
* @property {number} [lt]
|
|
151
|
+
* @property {number} [gt]
|
|
152
|
+
* @property {number} [lte]
|
|
153
|
+
* @property {number} [gte]
|
|
130
154
|
*/
|
|
131
155
|
|
|
132
156
|
/**
|
|
133
157
|
* @typedef CourierPartnerSchemeUpdateRequest
|
|
134
|
-
* @property {string} delivery_type
|
|
135
|
-
* @property {CourierPartnerSchemeFeatures} feature
|
|
136
158
|
* @property {string} name
|
|
137
|
-
* @property {
|
|
159
|
+
* @property {ArithmeticOperations} weight
|
|
160
|
+
* @property {string} transport_type
|
|
138
161
|
* @property {string} region
|
|
162
|
+
* @property {string} delivery_type
|
|
163
|
+
* @property {string[]} payment_mode
|
|
139
164
|
* @property {string} stage
|
|
140
|
-
* @property {
|
|
141
|
-
* @property {ArithmeticOperations} weight
|
|
142
|
-
*/
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* @typedef ErrorResponse
|
|
146
|
-
* @property {string} message
|
|
147
|
-
* @property {string} type
|
|
148
|
-
* @property {string} value
|
|
149
|
-
*/
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* @typedef FailureResponse
|
|
153
|
-
* @property {ErrorResponse[]} error
|
|
154
|
-
* @property {boolean} success
|
|
165
|
+
* @property {CourierPartnerSchemeFeatures} feature
|
|
155
166
|
*/
|
|
156
167
|
|
|
157
168
|
/**
|
|
@@ -162,18 +173,18 @@ const Joi = require("joi");
|
|
|
162
173
|
|
|
163
174
|
/**
|
|
164
175
|
* @typedef GetCountriesItems
|
|
165
|
-
* @property {string} [currency]
|
|
166
|
-
* @property {string} [display_name]
|
|
167
|
-
* @property {HierarchyItems[]} [hierarchy]
|
|
168
176
|
* @property {string} [id]
|
|
177
|
+
* @property {string} [name]
|
|
169
178
|
* @property {string} [iso2]
|
|
170
179
|
* @property {string} [iso3]
|
|
171
|
-
* @property {string} [latitude]
|
|
172
|
-
* @property {string} [longitude]
|
|
173
|
-
* @property {string} [name]
|
|
174
|
-
* @property {string} [phone_code]
|
|
175
180
|
* @property {string[]} [timezones]
|
|
181
|
+
* @property {HierarchyItems[]} [hierarchy]
|
|
182
|
+
* @property {string} [phone_code]
|
|
183
|
+
* @property {string} [currency]
|
|
176
184
|
* @property {string} [type]
|
|
185
|
+
* @property {string} [latitude]
|
|
186
|
+
* @property {string} [longitude]
|
|
187
|
+
* @property {string} [display_name]
|
|
177
188
|
*/
|
|
178
189
|
|
|
179
190
|
/**
|
|
@@ -182,71 +193,45 @@ const Joi = require("joi");
|
|
|
182
193
|
* @property {string} [slug]
|
|
183
194
|
*/
|
|
184
195
|
|
|
185
|
-
/**
|
|
186
|
-
* @typedef Page
|
|
187
|
-
* @property {number} [current]
|
|
188
|
-
* @property {boolean} [has_next]
|
|
189
|
-
* @property {boolean} [has_previous]
|
|
190
|
-
* @property {number} [item_total]
|
|
191
|
-
* @property {string} [next_id]
|
|
192
|
-
* @property {number} [size]
|
|
193
|
-
* @property {string} type
|
|
194
|
-
*/
|
|
195
|
-
|
|
196
196
|
class LogisticsPartnerModel {
|
|
197
|
-
/** @returns {
|
|
198
|
-
static
|
|
199
|
-
return Joi.object({
|
|
200
|
-
gt: Joi.number(),
|
|
201
|
-
gte: Joi.number(),
|
|
202
|
-
lt: Joi.number(),
|
|
203
|
-
lte: Joi.number(),
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/** @returns {BulkRegionJobSerializer} */
|
|
208
|
-
static BulkRegionJobSerializer() {
|
|
197
|
+
/** @returns {BulkRegionServiceabilityTatRequest} */
|
|
198
|
+
static BulkRegionServiceabilityTatRequest() {
|
|
209
199
|
return Joi.object({
|
|
210
|
-
action: Joi.string().allow("").required(),
|
|
211
200
|
country: Joi.string().allow("").required(),
|
|
212
|
-
file_path: Joi.string().allow(""),
|
|
213
201
|
region: Joi.string().allow("").required(),
|
|
202
|
+
type: Joi.string().allow("").required(),
|
|
214
203
|
});
|
|
215
204
|
}
|
|
216
205
|
|
|
217
|
-
/** @returns {
|
|
218
|
-
static
|
|
206
|
+
/** @returns {BulkRegionServiceabilityTatResponseItemData} */
|
|
207
|
+
static BulkRegionServiceabilityTatResponseItemData() {
|
|
219
208
|
return Joi.object({
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
209
|
+
country: Joi.string().allow(""),
|
|
210
|
+
region: Joi.string().allow(""),
|
|
211
|
+
type: Joi.string().allow(""),
|
|
212
|
+
batch_id: Joi.string().allow(""),
|
|
213
|
+
status: Joi.string().allow(""),
|
|
214
|
+
failed_records: Joi.array().items(Joi.any()),
|
|
215
|
+
file_path: Joi.string().allow(""),
|
|
224
216
|
});
|
|
225
217
|
}
|
|
226
218
|
|
|
227
|
-
/** @returns {
|
|
228
|
-
static
|
|
219
|
+
/** @returns {ErrorResponse} */
|
|
220
|
+
static ErrorResponse() {
|
|
229
221
|
return Joi.object({
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
error_file_path: Joi.string().allow(""),
|
|
234
|
-
failed: Joi.number(),
|
|
235
|
-
failed_records: Joi.array().items(Joi.any()),
|
|
236
|
-
file_path: Joi.string().allow("").required(),
|
|
237
|
-
region: Joi.string().allow("").required(),
|
|
238
|
-
status: Joi.string().allow("").required(),
|
|
239
|
-
success: Joi.number(),
|
|
240
|
-
total: Joi.number(),
|
|
222
|
+
value: Joi.string().allow("").required(),
|
|
223
|
+
message: Joi.string().allow("").required(),
|
|
224
|
+
type: Joi.string().allow("").required(),
|
|
241
225
|
});
|
|
242
226
|
}
|
|
243
227
|
|
|
244
|
-
/** @returns {
|
|
245
|
-
static
|
|
228
|
+
/** @returns {FailureResponse} */
|
|
229
|
+
static FailureResponse() {
|
|
246
230
|
return Joi.object({
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
231
|
+
success: Joi.boolean().required(),
|
|
232
|
+
error: Joi.array()
|
|
233
|
+
.items(LogisticsPartnerModel.ErrorResponse())
|
|
234
|
+
.required(),
|
|
250
235
|
});
|
|
251
236
|
}
|
|
252
237
|
|
|
@@ -260,24 +245,51 @@ class LogisticsPartnerModel {
|
|
|
260
245
|
});
|
|
261
246
|
}
|
|
262
247
|
|
|
263
|
-
/** @returns {
|
|
264
|
-
static
|
|
248
|
+
/** @returns {Page} */
|
|
249
|
+
static Page() {
|
|
250
|
+
return Joi.object({
|
|
251
|
+
item_total: Joi.number(),
|
|
252
|
+
next_id: Joi.string().allow(""),
|
|
253
|
+
has_previous: Joi.boolean(),
|
|
254
|
+
has_next: Joi.boolean(),
|
|
255
|
+
current: Joi.number(),
|
|
256
|
+
type: Joi.string().allow("").required(),
|
|
257
|
+
size: Joi.number(),
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/** @returns {BulkRegionJobSerializer} */
|
|
262
|
+
static BulkRegionJobSerializer() {
|
|
265
263
|
return Joi.object({
|
|
266
|
-
batch_id: Joi.string().allow(""),
|
|
267
|
-
country: Joi.string().allow(""),
|
|
268
|
-
failed_records: Joi.array().items(Joi.any()),
|
|
269
264
|
file_path: Joi.string().allow(""),
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
265
|
+
country: Joi.string().allow("").required(),
|
|
266
|
+
action: Joi.string().allow("").required(),
|
|
267
|
+
region: Joi.string().allow("").required(),
|
|
273
268
|
});
|
|
274
269
|
}
|
|
275
270
|
|
|
276
|
-
/** @returns {
|
|
277
|
-
static
|
|
271
|
+
/** @returns {BulkRegionResponseItemData} */
|
|
272
|
+
static BulkRegionResponseItemData() {
|
|
273
|
+
return Joi.object({
|
|
274
|
+
file_path: Joi.string().allow("").required(),
|
|
275
|
+
failed: Joi.number(),
|
|
276
|
+
failed_records: Joi.array().items(Joi.any()),
|
|
277
|
+
action: Joi.string().allow("").required(),
|
|
278
|
+
batch_id: Joi.string().allow("").required(),
|
|
279
|
+
country: Joi.string().allow("").required(),
|
|
280
|
+
success: Joi.number(),
|
|
281
|
+
region: Joi.string().allow("").required(),
|
|
282
|
+
status: Joi.string().allow("").required(),
|
|
283
|
+
total: Joi.number(),
|
|
284
|
+
error_file_path: Joi.string().allow(""),
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/** @returns {BulkRegionResponse} */
|
|
289
|
+
static BulkRegionResponse() {
|
|
278
290
|
return Joi.object({
|
|
279
291
|
items: Joi.array()
|
|
280
|
-
.items(LogisticsPartnerModel.
|
|
292
|
+
.items(LogisticsPartnerModel.BulkRegionResponseItemData())
|
|
281
293
|
.required(),
|
|
282
294
|
page: LogisticsPartnerModel.Page().required(),
|
|
283
295
|
});
|
|
@@ -286,12 +298,32 @@ class LogisticsPartnerModel {
|
|
|
286
298
|
/** @returns {CourierAccount} */
|
|
287
299
|
static CourierAccount() {
|
|
288
300
|
return Joi.object({
|
|
289
|
-
account_id: Joi.string().allow("").required(),
|
|
290
301
|
extension_id: Joi.string().allow("").required(),
|
|
291
|
-
|
|
292
|
-
is_self_ship: Joi.boolean().required(),
|
|
302
|
+
account_id: Joi.string().allow("").required(),
|
|
293
303
|
scheme_id: Joi.string().allow("").required(),
|
|
304
|
+
is_self_ship: Joi.boolean().required(),
|
|
294
305
|
stage: Joi.string().allow("").required(),
|
|
306
|
+
is_own_account: Joi.boolean().required(),
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/** @returns {CourierPartnerAccountFailureResponse} */
|
|
311
|
+
static CourierPartnerAccountFailureResponse() {
|
|
312
|
+
return Joi.object({
|
|
313
|
+
success: Joi.boolean().required(),
|
|
314
|
+
error: Joi.array()
|
|
315
|
+
.items(LogisticsPartnerModel.ErrorResponse())
|
|
316
|
+
.required(),
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/** @returns {CompanyCourierPartnerAccountListResponse} */
|
|
321
|
+
static CompanyCourierPartnerAccountListResponse() {
|
|
322
|
+
return Joi.object({
|
|
323
|
+
items: Joi.array()
|
|
324
|
+
.items(LogisticsPartnerModel.CourierAccountResponse())
|
|
325
|
+
.required(),
|
|
326
|
+
page: LogisticsPartnerModel.Page().required(),
|
|
295
327
|
});
|
|
296
328
|
}
|
|
297
329
|
|
|
@@ -299,94 +331,75 @@ class LogisticsPartnerModel {
|
|
|
299
331
|
static CourierAccountResponse() {
|
|
300
332
|
return Joi.object({
|
|
301
333
|
account_id: Joi.string().allow("").required(),
|
|
302
|
-
is_own_account: Joi.boolean().required(),
|
|
303
|
-
is_self_ship: Joi.boolean().required(),
|
|
304
334
|
scheme_id: Joi.string().allow("").required(),
|
|
305
|
-
|
|
335
|
+
is_self_ship: Joi.boolean().required(),
|
|
306
336
|
stage: Joi.string().allow("").required(),
|
|
337
|
+
is_own_account: Joi.boolean().required(),
|
|
338
|
+
scheme_rules: LogisticsPartnerModel.CourierPartnerSchemeModel().required(),
|
|
307
339
|
});
|
|
308
340
|
}
|
|
309
341
|
|
|
310
|
-
/** @returns {
|
|
311
|
-
static
|
|
342
|
+
/** @returns {CourierPartnerSchemeModel} */
|
|
343
|
+
static CourierPartnerSchemeModel() {
|
|
312
344
|
return Joi.object({
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
345
|
+
extension_id: Joi.string().allow("").required(),
|
|
346
|
+
scheme_id: Joi.string().allow("").required(),
|
|
347
|
+
name: Joi.string().allow("").required(),
|
|
348
|
+
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
349
|
+
transport_type: Joi.string().allow("").required(),
|
|
350
|
+
region: Joi.string().allow("").required(),
|
|
351
|
+
delivery_type: Joi.string().allow("").required(),
|
|
352
|
+
payment_mode: Joi.array().items(Joi.string().allow("")).required(),
|
|
353
|
+
stage: Joi.string().allow("").required(),
|
|
354
|
+
feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
|
|
317
355
|
});
|
|
318
356
|
}
|
|
319
357
|
|
|
320
358
|
/** @returns {CourierPartnerSchemeFeatures} */
|
|
321
359
|
static CourierPartnerSchemeFeatures() {
|
|
322
360
|
return Joi.object({
|
|
323
|
-
cold_storage_goods: Joi.boolean(),
|
|
324
|
-
dangerous_goods: Joi.boolean(),
|
|
325
|
-
doorstep_exchange: Joi.boolean(),
|
|
326
361
|
doorstep_qc: Joi.boolean(),
|
|
327
|
-
|
|
328
|
-
ewaybill: Joi.boolean(),
|
|
329
|
-
fragile_goods: Joi.boolean(),
|
|
362
|
+
qr: Joi.boolean(),
|
|
330
363
|
mps: Joi.boolean(),
|
|
331
|
-
multi_pick_multi_drop: Joi.boolean(),
|
|
332
|
-
multi_pick_single_drop: Joi.boolean(),
|
|
333
364
|
ndr: Joi.boolean(),
|
|
334
365
|
ndr_attempts: Joi.number(),
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
qr: Joi.boolean(),
|
|
366
|
+
dangerous_goods: Joi.boolean(),
|
|
367
|
+
fragile_goods: Joi.boolean(),
|
|
338
368
|
restricted_goods: Joi.boolean(),
|
|
339
|
-
|
|
369
|
+
cold_storage_goods: Joi.boolean(),
|
|
370
|
+
doorstep_exchange: Joi.boolean(),
|
|
371
|
+
doorstep_return: Joi.boolean(),
|
|
372
|
+
product_installation: Joi.boolean(),
|
|
373
|
+
openbox_delivery: Joi.boolean(),
|
|
340
374
|
status_updates: Joi.string().allow(""),
|
|
375
|
+
multi_pick_single_drop: Joi.boolean(),
|
|
376
|
+
single_pick_multi_drop: Joi.boolean(),
|
|
377
|
+
multi_pick_multi_drop: Joi.boolean(),
|
|
378
|
+
ewaybill: Joi.boolean(),
|
|
341
379
|
});
|
|
342
380
|
}
|
|
343
381
|
|
|
344
|
-
/** @returns {
|
|
345
|
-
static
|
|
382
|
+
/** @returns {ArithmeticOperations} */
|
|
383
|
+
static ArithmeticOperations() {
|
|
346
384
|
return Joi.object({
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
payment_mode: Joi.array().items(Joi.string().allow("")).required(),
|
|
352
|
-
region: Joi.string().allow("").required(),
|
|
353
|
-
scheme_id: Joi.string().allow("").required(),
|
|
354
|
-
stage: Joi.string().allow("").required(),
|
|
355
|
-
transport_type: Joi.string().allow("").required(),
|
|
356
|
-
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
385
|
+
lt: Joi.number(),
|
|
386
|
+
gt: Joi.number(),
|
|
387
|
+
lte: Joi.number(),
|
|
388
|
+
gte: Joi.number(),
|
|
357
389
|
});
|
|
358
390
|
}
|
|
359
391
|
|
|
360
392
|
/** @returns {CourierPartnerSchemeUpdateRequest} */
|
|
361
393
|
static CourierPartnerSchemeUpdateRequest() {
|
|
362
394
|
return Joi.object({
|
|
363
|
-
delivery_type: Joi.string().allow("").required(),
|
|
364
|
-
feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
|
|
365
395
|
name: Joi.string().allow("").required(),
|
|
366
|
-
|
|
396
|
+
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
397
|
+
transport_type: Joi.string().allow("").required(),
|
|
367
398
|
region: Joi.string().allow("").required(),
|
|
399
|
+
delivery_type: Joi.string().allow("").required(),
|
|
400
|
+
payment_mode: Joi.array().items(Joi.string().allow("")).required(),
|
|
368
401
|
stage: Joi.string().allow("").required(),
|
|
369
|
-
|
|
370
|
-
weight: LogisticsPartnerModel.ArithmeticOperations().required(),
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
/** @returns {ErrorResponse} */
|
|
375
|
-
static ErrorResponse() {
|
|
376
|
-
return Joi.object({
|
|
377
|
-
message: Joi.string().allow("").required(),
|
|
378
|
-
type: Joi.string().allow("").required(),
|
|
379
|
-
value: Joi.string().allow("").required(),
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/** @returns {FailureResponse} */
|
|
384
|
-
static FailureResponse() {
|
|
385
|
-
return Joi.object({
|
|
386
|
-
error: Joi.array()
|
|
387
|
-
.items(LogisticsPartnerModel.ErrorResponse())
|
|
388
|
-
.required(),
|
|
389
|
-
success: Joi.boolean().required(),
|
|
402
|
+
feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(),
|
|
390
403
|
});
|
|
391
404
|
}
|
|
392
405
|
|
|
@@ -403,18 +416,18 @@ class LogisticsPartnerModel {
|
|
|
403
416
|
/** @returns {GetCountriesItems} */
|
|
404
417
|
static GetCountriesItems() {
|
|
405
418
|
return Joi.object({
|
|
406
|
-
currency: Joi.string().allow(""),
|
|
407
|
-
display_name: Joi.string().allow(""),
|
|
408
|
-
hierarchy: Joi.array().items(LogisticsPartnerModel.HierarchyItems()),
|
|
409
419
|
id: Joi.string().allow(""),
|
|
420
|
+
name: Joi.string().allow(""),
|
|
410
421
|
iso2: Joi.string().allow(""),
|
|
411
422
|
iso3: Joi.string().allow(""),
|
|
412
|
-
latitude: Joi.string().allow(""),
|
|
413
|
-
longitude: Joi.string().allow(""),
|
|
414
|
-
name: Joi.string().allow(""),
|
|
415
|
-
phone_code: Joi.string().allow(""),
|
|
416
423
|
timezones: Joi.array().items(Joi.string().allow("")),
|
|
424
|
+
hierarchy: Joi.array().items(LogisticsPartnerModel.HierarchyItems()),
|
|
425
|
+
phone_code: Joi.string().allow(""),
|
|
426
|
+
currency: Joi.string().allow(""),
|
|
417
427
|
type: Joi.string().allow(""),
|
|
428
|
+
latitude: Joi.string().allow(""),
|
|
429
|
+
longitude: Joi.string().allow(""),
|
|
430
|
+
display_name: Joi.string().allow(""),
|
|
418
431
|
});
|
|
419
432
|
}
|
|
420
433
|
|
|
@@ -425,18 +438,5 @@ class LogisticsPartnerModel {
|
|
|
425
438
|
slug: Joi.string().allow(""),
|
|
426
439
|
});
|
|
427
440
|
}
|
|
428
|
-
|
|
429
|
-
/** @returns {Page} */
|
|
430
|
-
static Page() {
|
|
431
|
-
return Joi.object({
|
|
432
|
-
current: Joi.number(),
|
|
433
|
-
has_next: Joi.boolean(),
|
|
434
|
-
has_previous: Joi.boolean(),
|
|
435
|
-
item_total: Joi.number(),
|
|
436
|
-
next_id: Joi.string().allow(""),
|
|
437
|
-
size: Joi.number(),
|
|
438
|
-
type: Joi.string().allow("").required(),
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
441
|
}
|
|
442
442
|
module.exports = LogisticsPartnerModel;
|