@gofynd/fdk-client-javascript 1.3.11-beta.7 → 1.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +5 -3
- package/sdk/application/Cart/CartApplicationModel.d.ts +107 -1
- package/sdk/application/Cart/CartApplicationModel.js +74 -0
- package/sdk/application/Cart/CartApplicationValidator.d.ts +4 -0
- package/sdk/application/Cart/CartApplicationValidator.js +4 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +3 -6
- package/sdk/application/Catalog/CatalogApplicationClient.js +7 -20
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2 -2
- package/sdk/application/Catalog/CatalogApplicationModel.js +2 -2
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -14
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -6
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +183 -49
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +173 -31
- package/sdk/application/Content/ContentApplicationClient.d.ts +36 -0
- package/sdk/application/Content/ContentApplicationClient.js +246 -0
- package/sdk/application/Content/ContentApplicationModel.d.ts +208 -1
- package/sdk/application/Content/ContentApplicationModel.js +252 -0
- package/sdk/application/Content/ContentApplicationValidator.d.ts +40 -1
- package/sdk/application/Content/ContentApplicationValidator.js +41 -0
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +67 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +547 -0
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +456 -1
- package/sdk/application/Logistic/LogisticApplicationModel.js +488 -0
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +211 -1
- package/sdk/application/Logistic/LogisticApplicationValidator.js +131 -0
- package/sdk/application/Order/OrderApplicationClient.d.ts +3 -3
- package/sdk/application/Order/OrderApplicationClient.js +32 -8
- package/sdk/application/Order/OrderApplicationModel.d.ts +6 -0
- package/sdk/application/Order/OrderApplicationModel.js +6 -0
- package/sdk/application/Order/OrderApplicationValidator.d.ts +20 -0
- package/sdk/application/Order/OrderApplicationValidator.js +8 -0
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +46 -2
- package/sdk/application/Payment/PaymentApplicationClient.js +341 -10
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +493 -186
- package/sdk/application/Payment/PaymentApplicationModel.js +341 -70
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +59 -14
- package/sdk/application/Payment/PaymentApplicationValidator.js +64 -10
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +34 -1
- package/sdk/application/PosCart/PosCartApplicationModel.js +24 -0
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationClient.js +7 -3
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +222 -36
- package/sdk/application/Theme/ThemeApplicationModel.js +322 -26
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +10 -0
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -0
- package/sdk/application/User/UserApplicationClient.d.ts +33 -0
- package/sdk/application/User/UserApplicationClient.js +239 -0
- package/sdk/application/User/UserApplicationModel.d.ts +28 -13
- package/sdk/application/User/UserApplicationModel.js +36 -12
- package/sdk/application/User/UserApplicationValidator.d.ts +34 -1
- package/sdk/application/User/UserApplicationValidator.js +36 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +3 -15
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +2 -14
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +125 -0
- package/sdk/partner/Lead/LeadPartnerClient.js +785 -0
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +1127 -0
- package/sdk/partner/Lead/LeadPartnerModel.js +896 -0
- package/sdk/partner/Lead/LeadPartnerValidator.d.ts +12 -0
- package/sdk/partner/Lead/LeadPartnerValidator.js +67 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +155 -0
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1195 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +372 -0
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +442 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +16 -0
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +123 -0
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +80 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +100 -43
- package/sdk/partner/Theme/ThemePartnerModel.js +74 -30
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +9 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +99 -0
- package/sdk/partner/Webhook/WebhookPartnerClient.js +753 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +566 -0
- package/sdk/partner/Webhook/WebhookPartnerModel.js +583 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +12 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +74 -0
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +2 -2
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +11 -1
- package/sdk/platform/Billing/BillingPlatformClient.js +110 -3
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +67 -1
- package/sdk/platform/Billing/BillingPlatformModel.js +78 -0
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +43 -4
- package/sdk/platform/Billing/BillingPlatformValidator.js +29 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +7 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +4 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +4 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +100 -5
- package/sdk/platform/Cart/CartPlatformModel.js +71 -4
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +15 -11
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +52 -21
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +27 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +11 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +26 -4
- package/sdk/platform/Catalog/CatalogPlatformClient.js +173 -7
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +304 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +335 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -3
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +27 -2
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +138 -36
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +739 -57
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +128 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +111 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +150 -1
- package/sdk/platform/Communication/CommunicationPlatformModel.js +172 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +8 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +32 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +38 -9
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +42 -8
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +14 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +6 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +8 -8
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +4 -4
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +371 -132
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +288 -77
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +2 -2
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +2 -2
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +391 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +3641 -1059
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +351 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +410 -0
- package/sdk/platform/Content/ContentPlatformClient.d.ts +277 -0
- package/sdk/platform/Content/ContentPlatformClient.js +2011 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1100 -1
- package/sdk/platform/Content/ContentPlatformModel.js +1362 -46
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +247 -0
- package/sdk/platform/Content/ContentPlatformValidator.js +319 -0
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformClient.js +2 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +96 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +104 -12
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +16 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +117 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +55 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +39 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +18 -19
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +20 -18
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +33 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +240 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +151 -5
- package/sdk/platform/Finance/FinancePlatformModel.js +190 -4
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +38 -1
- package/sdk/platform/Finance/FinancePlatformValidator.js +38 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +38 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +137 -56
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +41 -29
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +33 -21
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +12 -3
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +23 -1
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +178 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +39 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +202 -31
- package/sdk/platform/Order/OrderPlatformClient.js +2010 -586
- package/sdk/platform/Order/OrderPlatformModel.d.ts +1032 -470
- package/sdk/platform/Order/OrderPlatformModel.js +1187 -534
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +318 -35
- package/sdk/platform/Order/OrderPlatformValidator.js +292 -29
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +119 -13
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +749 -39
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +143 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +133 -6
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +996 -134
- package/sdk/platform/Payment/PaymentPlatformModel.js +721 -58
- package/sdk/platform/PlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/PlatformApplicationClient.js +4 -4
- package/sdk/platform/PlatformClient.d.ts +4 -2
- package/sdk/platform/PlatformClient.js +8 -4
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +142 -66
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +645 -147
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +131 -63
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +126 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +217 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1136 -347
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +912 -313
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1071 -355
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +382 -133
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +266 -102
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +11 -1
- package/sdk/platform/Theme/ThemePlatformClient.js +87 -3
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +333 -47
- package/sdk/platform/Theme/ThemePlatformModel.js +395 -35
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +28 -4
- package/sdk/platform/Theme/ThemePlatformValidator.js +21 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +116 -1
- package/sdk/platform/User/UserPlatformApplicationClient.js +931 -85
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +224 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +173 -5
- package/sdk/platform/User/UserPlatformModel.d.ts +344 -7
- package/sdk/platform/User/UserPlatformModel.js +256 -5
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +47 -39
- package/sdk/platform/Webhook/WebhookPlatformClient.js +63 -61
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +264 -156
- package/sdk/platform/Webhook/WebhookPlatformModel.js +276 -153
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +7 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +6 -6
- package/sdk/platform/index.d.ts +1 -1
- package/sdk/platform/index.js +2 -2
- package/sdk/public/Billing/BillingPublicClient.d.ts +23 -0
- package/sdk/public/Billing/BillingPublicClient.js +116 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +92 -0
- package/sdk/public/Billing/BillingPublicModel.js +96 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +18 -0
- package/sdk/public/Billing/BillingPublicValidator.js +19 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +114 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +53 -0
- package/sdk/public/Content/ContentPublicModel.js +60 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -0
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +4 -0
- package/sdk/public/PublicClient.js +8 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +33 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +242 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +147 -1
- package/sdk/public/Webhook/WebhookPublicModel.js +177 -1
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +23 -1
- package/sdk/public/Webhook/WebhookPublicValidator.js +31 -0
- package/sdk/public/index.d.ts +2 -0
- package/sdk/public/index.js +4 -0
|
@@ -13,6 +13,12 @@ const Joi = require("joi");
|
|
|
13
13
|
* @property {string} [uid]
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @typedef CountryHierarchy
|
|
18
|
+
* @property {string} [name]
|
|
19
|
+
* @property {string} [slug]
|
|
20
|
+
*/
|
|
21
|
+
|
|
16
22
|
/**
|
|
17
23
|
* @typedef CountryListResponse
|
|
18
24
|
* @property {CountryEntityResponse[]} [results]
|
|
@@ -24,6 +30,29 @@ const Joi = require("joi");
|
|
|
24
30
|
* @property {string} [isd_code]
|
|
25
31
|
*/
|
|
26
32
|
|
|
33
|
+
/**
|
|
34
|
+
* @typedef CountryObject
|
|
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]
|
|
46
|
+
* @property {string} [type]
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @typedef CurrencyObject
|
|
51
|
+
* @property {string} [code]
|
|
52
|
+
* @property {string} [name]
|
|
53
|
+
* @property {string} [symbol]
|
|
54
|
+
*/
|
|
55
|
+
|
|
27
56
|
/**
|
|
28
57
|
* @typedef DP
|
|
29
58
|
* @property {string} [area_code]
|
|
@@ -38,6 +67,126 @@ const Joi = require("joi");
|
|
|
38
67
|
* @property {string} [transport_mode]
|
|
39
68
|
*/
|
|
40
69
|
|
|
70
|
+
/**
|
|
71
|
+
* @typedef ErrorResponse
|
|
72
|
+
* @property {string} [error]
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @typedef FieldValidation
|
|
77
|
+
* @property {FieldValidationRegex} [regex]
|
|
78
|
+
* @property {string} [type]
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @typedef FieldValidationRegex
|
|
83
|
+
* @property {LengthValidation} [length]
|
|
84
|
+
* @property {string} [value]
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @typedef GetCountries
|
|
89
|
+
* @property {CountryObject[]} [items]
|
|
90
|
+
* @property {Page} [page]
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @typedef GetCountry
|
|
95
|
+
* @property {CurrencyObject} [currency]
|
|
96
|
+
* @property {string} [display_name]
|
|
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]
|
|
107
|
+
* @property {string} [type]
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @typedef GetCountryFields
|
|
112
|
+
* @property {GetCountryFieldsAddress[]} address
|
|
113
|
+
* @property {GetCountryFieldsAddressTemplate} address_template
|
|
114
|
+
* @property {string[]} serviceability_fields
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @typedef GetCountryFieldsAddress
|
|
119
|
+
* @property {string} display_name
|
|
120
|
+
* @property {boolean} [edit]
|
|
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]
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @typedef GetCountryFieldsAddressTemplate
|
|
131
|
+
* @property {string} checkout_form
|
|
132
|
+
* @property {string} default_display
|
|
133
|
+
* @property {string} store_os_form
|
|
134
|
+
*/
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @typedef GetCountryFieldsAddressValues
|
|
138
|
+
* @property {GetOneOrAll} [get_all]
|
|
139
|
+
* @property {GetOneOrAll} [get_one]
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @typedef GetLocalities
|
|
144
|
+
* @property {Localities[]} [items]
|
|
145
|
+
* @property {Page} [page]
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @typedef GetLocality
|
|
150
|
+
* @property {string} [display_name]
|
|
151
|
+
* @property {string} [id]
|
|
152
|
+
* @property {LocalityParent[]} [localities]
|
|
153
|
+
* @property {string} [name]
|
|
154
|
+
* @property {string[]} [parent_ids]
|
|
155
|
+
* @property {string} [type]
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @typedef GetOneOrAll
|
|
160
|
+
* @property {string} [operation_id]
|
|
161
|
+
* @property {GetOneOrAllParams} [params]
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @typedef GetOneOrAllParams
|
|
166
|
+
* @property {GetOneOrAllPath} [path]
|
|
167
|
+
* @property {GetOneOrAllQuery} [query]
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @typedef GetOneOrAllPath
|
|
172
|
+
* @property {string} [locality_type]
|
|
173
|
+
* @property {string} [locality_value]
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @typedef GetOneOrAllQuery
|
|
178
|
+
* @property {string} [city]
|
|
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]
|
|
188
|
+
*/
|
|
189
|
+
|
|
41
190
|
/**
|
|
42
191
|
* @typedef GetZoneFromPincodeViewRequest
|
|
43
192
|
* @property {string} country
|
|
@@ -50,11 +199,46 @@ const Joi = require("joi");
|
|
|
50
199
|
* @property {string[]} zones
|
|
51
200
|
*/
|
|
52
201
|
|
|
202
|
+
/**
|
|
203
|
+
* @typedef LengthValidation
|
|
204
|
+
* @property {number} [max]
|
|
205
|
+
* @property {number} [min]
|
|
206
|
+
*/
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @typedef Localities
|
|
210
|
+
* @property {string} [display_name]
|
|
211
|
+
* @property {string} [id]
|
|
212
|
+
* @property {string} [name]
|
|
213
|
+
* @property {string[]} [parent_ids]
|
|
214
|
+
* @property {string} [type]
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* @typedef LocalityParent
|
|
219
|
+
* @property {string} [display_name]
|
|
220
|
+
* @property {string} [id]
|
|
221
|
+
* @property {string} [name]
|
|
222
|
+
* @property {string[]} [parent_ids]
|
|
223
|
+
* @property {string} [type]
|
|
224
|
+
*/
|
|
225
|
+
|
|
53
226
|
/**
|
|
54
227
|
* @typedef LogisticsResponse
|
|
55
228
|
* @property {Object} [dp]
|
|
56
229
|
*/
|
|
57
230
|
|
|
231
|
+
/**
|
|
232
|
+
* @typedef Page
|
|
233
|
+
* @property {number} [current]
|
|
234
|
+
* @property {boolean} [has_next]
|
|
235
|
+
* @property {boolean} [has_previous]
|
|
236
|
+
* @property {number} [item_total]
|
|
237
|
+
* @property {string} [next_id]
|
|
238
|
+
* @property {number} [size]
|
|
239
|
+
* @property {string} type
|
|
240
|
+
*/
|
|
241
|
+
|
|
58
242
|
/**
|
|
59
243
|
* @typedef PincodeApiResponse
|
|
60
244
|
* @property {PincodeDataResponse[]} [data]
|
|
@@ -120,6 +304,18 @@ const Joi = require("joi");
|
|
|
120
304
|
* @property {string} to_pincode
|
|
121
305
|
*/
|
|
122
306
|
|
|
307
|
+
/**
|
|
308
|
+
* @typedef StoreItemResponse
|
|
309
|
+
* @property {number} [company_id]
|
|
310
|
+
* @property {string} [fulfillment_type]
|
|
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]
|
|
317
|
+
*/
|
|
318
|
+
|
|
123
319
|
/**
|
|
124
320
|
* @typedef TATArticlesRequest
|
|
125
321
|
* @property {TATCategoryRequest} [category]
|
|
@@ -210,6 +406,32 @@ const Joi = require("joi");
|
|
|
210
406
|
* @property {string} [to_pincode]
|
|
211
407
|
*/
|
|
212
408
|
|
|
409
|
+
/**
|
|
410
|
+
* @typedef ValidateAddressRequest
|
|
411
|
+
* @property {string} [address] - A string representing the complete address,
|
|
412
|
+
* combining address line 1, address line 2, area, landmark, sector, city,
|
|
413
|
+
* state, and pincode. This provides a comprehensive view of the address details.
|
|
414
|
+
* @property {string} [address1] - A string representing the first line of the
|
|
415
|
+
* address, typically containing street or building information.
|
|
416
|
+
* @property {string} [address2] - A string representing the second line of the
|
|
417
|
+
* address, which can be used for additional address details if needed.
|
|
418
|
+
* @property {string} [area] - A string specifying the locality or area
|
|
419
|
+
* associated with the address.
|
|
420
|
+
* @property {string} [city] - A string denoting the city or municipality of the address.
|
|
421
|
+
* @property {string} [email] - A string containing the recipient's email address.
|
|
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
|
+
*/
|
|
434
|
+
|
|
213
435
|
class LogisticApplicationModel {
|
|
214
436
|
/** @returns {CountryEntityResponse} */
|
|
215
437
|
static CountryEntityResponse() {
|
|
@@ -226,6 +448,14 @@ class LogisticApplicationModel {
|
|
|
226
448
|
});
|
|
227
449
|
}
|
|
228
450
|
|
|
451
|
+
/** @returns {CountryHierarchy} */
|
|
452
|
+
static CountryHierarchy() {
|
|
453
|
+
return Joi.object({
|
|
454
|
+
name: Joi.string().allow(""),
|
|
455
|
+
slug: Joi.string().allow(""),
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
|
|
229
459
|
/** @returns {CountryListResponse} */
|
|
230
460
|
static CountryListResponse() {
|
|
231
461
|
return Joi.object({
|
|
@@ -243,6 +473,33 @@ class LogisticApplicationModel {
|
|
|
243
473
|
});
|
|
244
474
|
}
|
|
245
475
|
|
|
476
|
+
/** @returns {CountryObject} */
|
|
477
|
+
static CountryObject() {
|
|
478
|
+
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
|
+
type: Joi.string().allow(""),
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/** @returns {CurrencyObject} */
|
|
495
|
+
static CurrencyObject() {
|
|
496
|
+
return Joi.object({
|
|
497
|
+
code: Joi.string().allow(""),
|
|
498
|
+
name: Joi.string().allow(""),
|
|
499
|
+
symbol: Joi.string().allow(""),
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
|
|
246
503
|
/** @returns {DP} */
|
|
247
504
|
static DP() {
|
|
248
505
|
return Joi.object({
|
|
@@ -259,6 +516,162 @@ class LogisticApplicationModel {
|
|
|
259
516
|
});
|
|
260
517
|
}
|
|
261
518
|
|
|
519
|
+
/** @returns {ErrorResponse} */
|
|
520
|
+
static ErrorResponse() {
|
|
521
|
+
return Joi.object({
|
|
522
|
+
error: Joi.string().allow(""),
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/** @returns {FieldValidation} */
|
|
527
|
+
static FieldValidation() {
|
|
528
|
+
return Joi.object({
|
|
529
|
+
regex: LogisticApplicationModel.FieldValidationRegex(),
|
|
530
|
+
type: Joi.string().allow(""),
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/** @returns {FieldValidationRegex} */
|
|
535
|
+
static FieldValidationRegex() {
|
|
536
|
+
return Joi.object({
|
|
537
|
+
length: LogisticApplicationModel.LengthValidation(),
|
|
538
|
+
value: Joi.string().allow(""),
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/** @returns {GetCountries} */
|
|
543
|
+
static GetCountries() {
|
|
544
|
+
return Joi.object({
|
|
545
|
+
items: Joi.array().items(LogisticApplicationModel.CountryObject()),
|
|
546
|
+
page: LogisticApplicationModel.Page(),
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/** @returns {GetCountry} */
|
|
551
|
+
static GetCountry() {
|
|
552
|
+
return Joi.object({
|
|
553
|
+
currency: LogisticApplicationModel.CurrencyObject(),
|
|
554
|
+
display_name: Joi.string().allow(""),
|
|
555
|
+
fields: LogisticApplicationModel.GetCountryFields(),
|
|
556
|
+
hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()),
|
|
557
|
+
id: Joi.string().allow(""),
|
|
558
|
+
iso2: Joi.string().allow(""),
|
|
559
|
+
iso3: Joi.string().allow(""),
|
|
560
|
+
latitude: Joi.string().allow(""),
|
|
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(""),
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
/** @returns {GetCountryFields} */
|
|
570
|
+
static GetCountryFields() {
|
|
571
|
+
return Joi.object({
|
|
572
|
+
address: Joi.array()
|
|
573
|
+
.items(LogisticApplicationModel.GetCountryFieldsAddress())
|
|
574
|
+
.required(),
|
|
575
|
+
address_template: LogisticApplicationModel.GetCountryFieldsAddressTemplate().required(),
|
|
576
|
+
serviceability_fields: Joi.array()
|
|
577
|
+
.items(Joi.string().allow(""))
|
|
578
|
+
.required(),
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/** @returns {GetCountryFieldsAddress} */
|
|
583
|
+
static GetCountryFieldsAddress() {
|
|
584
|
+
return Joi.object({
|
|
585
|
+
display_name: Joi.string().allow("").required(),
|
|
586
|
+
edit: Joi.boolean(),
|
|
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(),
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/** @returns {GetCountryFieldsAddressTemplate} */
|
|
597
|
+
static GetCountryFieldsAddressTemplate() {
|
|
598
|
+
return Joi.object({
|
|
599
|
+
checkout_form: Joi.string().allow("").required(),
|
|
600
|
+
default_display: Joi.string().allow("").required(),
|
|
601
|
+
store_os_form: Joi.string().allow("").required(),
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/** @returns {GetCountryFieldsAddressValues} */
|
|
606
|
+
static GetCountryFieldsAddressValues() {
|
|
607
|
+
return Joi.object({
|
|
608
|
+
get_all: LogisticApplicationModel.GetOneOrAll(),
|
|
609
|
+
get_one: LogisticApplicationModel.GetOneOrAll(),
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/** @returns {GetLocalities} */
|
|
614
|
+
static GetLocalities() {
|
|
615
|
+
return Joi.object({
|
|
616
|
+
items: Joi.array().items(LogisticApplicationModel.Localities()),
|
|
617
|
+
page: LogisticApplicationModel.Page(),
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/** @returns {GetLocality} */
|
|
622
|
+
static GetLocality() {
|
|
623
|
+
return Joi.object({
|
|
624
|
+
display_name: Joi.string().allow(""),
|
|
625
|
+
id: Joi.string().allow(""),
|
|
626
|
+
localities: Joi.array().items(LogisticApplicationModel.LocalityParent()),
|
|
627
|
+
name: Joi.string().allow(""),
|
|
628
|
+
parent_ids: Joi.array().items(Joi.string().allow("")),
|
|
629
|
+
type: Joi.string().allow(""),
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/** @returns {GetOneOrAll} */
|
|
634
|
+
static GetOneOrAll() {
|
|
635
|
+
return Joi.object({
|
|
636
|
+
operation_id: Joi.string().allow(""),
|
|
637
|
+
params: LogisticApplicationModel.GetOneOrAllParams(),
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/** @returns {GetOneOrAllParams} */
|
|
642
|
+
static GetOneOrAllParams() {
|
|
643
|
+
return Joi.object({
|
|
644
|
+
path: LogisticApplicationModel.GetOneOrAllPath(),
|
|
645
|
+
query: LogisticApplicationModel.GetOneOrAllQuery(),
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
/** @returns {GetOneOrAllPath} */
|
|
650
|
+
static GetOneOrAllPath() {
|
|
651
|
+
return Joi.object({
|
|
652
|
+
locality_type: Joi.string().allow(""),
|
|
653
|
+
locality_value: Joi.string().allow(""),
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
/** @returns {GetOneOrAllQuery} */
|
|
658
|
+
static GetOneOrAllQuery() {
|
|
659
|
+
return Joi.object({
|
|
660
|
+
city: Joi.string().allow("").allow(null),
|
|
661
|
+
country: Joi.string().allow("").allow(null),
|
|
662
|
+
sector: Joi.string().allow("").allow(null),
|
|
663
|
+
state: Joi.string().allow("").allow(null),
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/** @returns {GetStoreResponse} */
|
|
668
|
+
static GetStoreResponse() {
|
|
669
|
+
return Joi.object({
|
|
670
|
+
items: Joi.array().items(LogisticApplicationModel.StoreItemResponse()),
|
|
671
|
+
page: LogisticApplicationModel.Page(),
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
|
|
262
675
|
/** @returns {GetZoneFromPincodeViewRequest} */
|
|
263
676
|
static GetZoneFromPincodeViewRequest() {
|
|
264
677
|
return Joi.object({
|
|
@@ -275,6 +688,36 @@ class LogisticApplicationModel {
|
|
|
275
688
|
});
|
|
276
689
|
}
|
|
277
690
|
|
|
691
|
+
/** @returns {LengthValidation} */
|
|
692
|
+
static LengthValidation() {
|
|
693
|
+
return Joi.object({
|
|
694
|
+
max: Joi.number().allow(null),
|
|
695
|
+
min: Joi.number().allow(null),
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/** @returns {Localities} */
|
|
700
|
+
static Localities() {
|
|
701
|
+
return Joi.object({
|
|
702
|
+
display_name: Joi.string().allow(""),
|
|
703
|
+
id: Joi.string().allow(""),
|
|
704
|
+
name: Joi.string().allow(""),
|
|
705
|
+
parent_ids: Joi.array().items(Joi.string().allow("")),
|
|
706
|
+
type: Joi.string().allow(""),
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/** @returns {LocalityParent} */
|
|
711
|
+
static LocalityParent() {
|
|
712
|
+
return Joi.object({
|
|
713
|
+
display_name: Joi.string().allow(""),
|
|
714
|
+
id: Joi.string().allow(""),
|
|
715
|
+
name: Joi.string().allow(""),
|
|
716
|
+
parent_ids: Joi.array().items(Joi.string().allow("")),
|
|
717
|
+
type: Joi.string().allow(""),
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
|
|
278
721
|
/** @returns {LogisticsResponse} */
|
|
279
722
|
static LogisticsResponse() {
|
|
280
723
|
return Joi.object({
|
|
@@ -282,6 +725,19 @@ class LogisticApplicationModel {
|
|
|
282
725
|
});
|
|
283
726
|
}
|
|
284
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(),
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
|
|
285
741
|
/** @returns {PincodeApiResponse} */
|
|
286
742
|
static PincodeApiResponse() {
|
|
287
743
|
return Joi.object({
|
|
@@ -365,6 +821,20 @@ class LogisticApplicationModel {
|
|
|
365
821
|
});
|
|
366
822
|
}
|
|
367
823
|
|
|
824
|
+
/** @returns {StoreItemResponse} */
|
|
825
|
+
static StoreItemResponse() {
|
|
826
|
+
return Joi.object({
|
|
827
|
+
company_id: Joi.number(),
|
|
828
|
+
fulfillment_type: Joi.string().allow(""),
|
|
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("")),
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
|
|
368
838
|
/** @returns {TATArticlesRequest} */
|
|
369
839
|
static TATArticlesRequest() {
|
|
370
840
|
return Joi.object({
|
|
@@ -484,5 +954,23 @@ class LogisticApplicationModel {
|
|
|
484
954
|
to_pincode: Joi.string().allow(""),
|
|
485
955
|
});
|
|
486
956
|
}
|
|
957
|
+
|
|
958
|
+
/** @returns {ValidateAddressRequest} */
|
|
959
|
+
static ValidateAddressRequest() {
|
|
960
|
+
return Joi.object({
|
|
961
|
+
address: Joi.string().allow(""),
|
|
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(""),
|
|
973
|
+
});
|
|
974
|
+
}
|
|
487
975
|
}
|
|
488
976
|
module.exports = LogisticApplicationModel;
|