@gofynd/fdk-client-javascript 1.0.0 → 1.0.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/documentation/application/CATALOG.md +371 -371
- package/documentation/application/ORDER.md +272 -272
- package/documentation/application/PAYMENT.md +269 -269
- package/documentation/platform/CATALOG.md +1678 -1664
- package/documentation/platform/COMPANYPROFILE.md +201 -201
- package/documentation/platform/ORDER.md +1442 -1323
- package/documentation/platform/PAYMENT.md +88 -88
- package/index.js +7 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.js +302 -0
- package/sdk/application/Cart/CartApplicationValidator.js +1 -0
- package/sdk/application/Catalog/CatalogApplicationClient.js +378 -0
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +17 -17
- package/sdk/application/Catalog/CatalogApplicationModel.js +500 -500
- package/sdk/application/Catalog/CatalogApplicationValidator.js +1 -0
- package/sdk/application/Common/CommonApplicationClient.js +22 -0
- package/sdk/application/Common/CommonApplicationValidator.js +1 -0
- package/sdk/application/Communication/CommunicationApplicationClient.js +41 -0
- package/sdk/application/Communication/CommunicationApplicationValidator.js +1 -0
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +200 -0
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
- package/sdk/application/Content/ContentApplicationClient.js +215 -0
- package/sdk/application/Content/ContentApplicationValidator.js +1 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +33 -0
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +1 -0
- package/sdk/application/Lead/LeadApplicationClient.js +81 -0
- package/sdk/application/Lead/LeadApplicationValidator.js +1 -0
- package/sdk/application/Logistic/LogisticApplicationClient.js +44 -0
- package/sdk/application/Logistic/LogisticApplicationValidator.js +1 -0
- package/sdk/application/Order/OrderApplicationClient.js +146 -0
- package/sdk/application/Order/OrderApplicationModel.d.ts +20 -20
- package/sdk/application/Order/OrderApplicationModel.js +329 -329
- package/sdk/application/Order/OrderApplicationValidator.js +1 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +528 -0
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +5 -5
- package/sdk/application/Payment/PaymentApplicationModel.js +391 -391
- package/sdk/application/Payment/PaymentApplicationValidator.js +1 -0
- package/sdk/application/PosCart/PosCartApplicationClient.js +329 -0
- package/sdk/application/PosCart/PosCartApplicationValidator.js +1 -0
- package/sdk/application/Rewards/RewardsApplicationClient.js +81 -0
- package/sdk/application/Rewards/RewardsApplicationValidator.js +1 -0
- package/sdk/application/Share/ShareApplicationClient.js +87 -0
- package/sdk/application/Share/ShareApplicationValidator.js +1 -0
- package/sdk/application/Theme/ThemeApplicationClient.js +44 -0
- package/sdk/application/Theme/ThemeApplicationValidator.js +1 -0
- package/sdk/application/User/UserApplicationClient.js +405 -0
- package/sdk/application/User/UserApplicationValidator.js +1 -0
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +114 -0
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +58 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +46 -0
- package/sdk/platform/Billing/BillingPlatformClient.js +160 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +246 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +29 -29
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +839 -48
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +3 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +9 -9
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +54 -54
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1149 -96
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +58 -57
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1626 -1614
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +6 -6
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +20 -20
- package/sdk/platform/Common/CommonPlatformClient.js +26 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +587 -0
- package/sdk/platform/Communication/CommunicationPlatformClient.js +15 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +179 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +11 -11
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +269 -269
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +382 -0
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +282 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +866 -0
- package/sdk/platform/Discount/DiscountPlatformClient.js +152 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +54 -0
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +76 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.js +161 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +162 -0
- package/sdk/platform/Lead/LeadPlatformClient.js +140 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +55 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +15 -6
- package/sdk/platform/Order/OrderPlatformClient.js +674 -15
- package/sdk/platform/Order/OrderPlatformModel.d.ts +67 -60
- package/sdk/platform/Order/OrderPlatformModel.js +1559 -1623
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +2 -1
- package/sdk/platform/Order/OrderPlatformValidator.js +10 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +26 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +165 -0
- package/sdk/platform/Payment/PaymentPlatformClient.js +139 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +137 -137
- package/sdk/platform/PlatformApplicationClient.d.ts +2217 -2243
- package/sdk/platform/PlatformApplicationClient.js +2514 -2524
- package/sdk/platform/PlatformClient.d.ts +2217 -2243
- package/sdk/platform/PlatformClient.js +2514 -2524
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +169 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.js +53 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +293 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +145 -0
- package/sdk/platform/Webhook/WebhookPlatformClient.js +90 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +25 -0
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +3 -1
- package/sdk/public/Inventory/InventoryPublicClient.js +75 -0
- package/sdk/public/Inventory/InventoryPublicValidator.js +3 -1
- package/sdk/public/Webhook/WebhookPublicClient.js +29 -0
- package/sdk/public/Webhook/WebhookPublicValidator.js +3 -1
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
2
|
|
|
3
3
|
class CompanyProfileModel {
|
|
4
|
-
static
|
|
4
|
+
static BusinessCountryInfo() {
|
|
5
5
|
return Joi.object({
|
|
6
|
-
|
|
6
|
+
country_code: Joi.string().allow(""),
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
country: Joi.string().allow(""),
|
|
9
|
+
});
|
|
10
|
+
}
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
static SellerPhoneNumber() {
|
|
13
|
+
return Joi.object({
|
|
14
|
+
number: Joi.string().allow("").required(),
|
|
15
|
+
|
|
16
|
+
country_code: Joi.number().required(),
|
|
11
17
|
});
|
|
12
18
|
}
|
|
13
19
|
|
|
14
|
-
static
|
|
20
|
+
static ContactDetails() {
|
|
15
21
|
return Joi.object({
|
|
16
|
-
|
|
22
|
+
emails: Joi.array().items(Joi.string().allow("")),
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
phone: Joi.array().items(CompanyProfileModel.SellerPhoneNumber()),
|
|
25
|
+
});
|
|
26
|
+
}
|
|
19
27
|
|
|
20
|
-
|
|
28
|
+
static UserSerializer() {
|
|
29
|
+
return Joi.object({
|
|
30
|
+
user_id: Joi.string().allow(""),
|
|
21
31
|
|
|
22
|
-
|
|
32
|
+
contact: Joi.string().allow(""),
|
|
23
33
|
|
|
24
|
-
|
|
34
|
+
username: Joi.string().allow(""),
|
|
25
35
|
});
|
|
26
36
|
}
|
|
27
37
|
|
|
@@ -37,113 +47,103 @@ class CompanyProfileModel {
|
|
|
37
47
|
});
|
|
38
48
|
}
|
|
39
49
|
|
|
40
|
-
static
|
|
50
|
+
static GetAddressSerializer() {
|
|
41
51
|
return Joi.object({
|
|
42
52
|
country_code: Joi.string().allow(""),
|
|
43
53
|
|
|
44
54
|
country: Joi.string().allow(""),
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
55
|
|
|
48
|
-
|
|
49
|
-
return Joi.object({
|
|
50
|
-
country_code: Joi.number().required(),
|
|
56
|
+
pincode: Joi.number(),
|
|
51
57
|
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
}
|
|
58
|
+
state: Joi.string().allow(""),
|
|
55
59
|
|
|
56
|
-
|
|
57
|
-
return Joi.object({
|
|
58
|
-
phone: Joi.array().items(CompanyProfileModel.SellerPhoneNumber()),
|
|
60
|
+
landmark: Joi.string().allow(""),
|
|
59
61
|
|
|
60
|
-
|
|
61
|
-
});
|
|
62
|
-
}
|
|
62
|
+
address_type: Joi.string().allow(""),
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
return Joi.object({
|
|
66
|
-
enable: Joi.boolean(),
|
|
64
|
+
longitude: Joi.number().required(),
|
|
67
65
|
|
|
68
|
-
|
|
66
|
+
address2: Joi.string().allow(""),
|
|
69
67
|
|
|
70
|
-
|
|
68
|
+
address1: Joi.string().allow(""),
|
|
69
|
+
|
|
70
|
+
latitude: Joi.number().required(),
|
|
71
|
+
|
|
72
|
+
city: Joi.string().allow(""),
|
|
71
73
|
});
|
|
72
74
|
}
|
|
73
75
|
|
|
74
|
-
static
|
|
76
|
+
static Document() {
|
|
75
77
|
return Joi.object({
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
pincode: Joi.number(),
|
|
79
|
-
|
|
80
|
-
longitude: Joi.number().required(),
|
|
81
|
-
|
|
82
|
-
landmark: Joi.string().allow(""),
|
|
78
|
+
url: Joi.string().allow(""),
|
|
83
79
|
|
|
84
|
-
|
|
80
|
+
legal_name: Joi.string().allow(""),
|
|
85
81
|
|
|
86
|
-
|
|
82
|
+
verified: Joi.boolean(),
|
|
87
83
|
|
|
88
|
-
|
|
84
|
+
type: Joi.string().allow("").required(),
|
|
89
85
|
|
|
90
|
-
|
|
86
|
+
value: Joi.string().allow("").required(),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
91
89
|
|
|
92
|
-
|
|
90
|
+
static CompanyTaxesSerializer() {
|
|
91
|
+
return Joi.object({
|
|
92
|
+
rate: Joi.number(),
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
enable: Joi.boolean(),
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
effective_date: Joi.string().allow(""),
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
static GetCompanyProfileSerializerResponse() {
|
|
101
101
|
return Joi.object({
|
|
102
|
-
|
|
102
|
+
business_info: Joi.string().allow(""),
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
business_country_info: CompanyProfileModel.BusinessCountryInfo(),
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
verified_on: Joi.string().allow(""),
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
contact_details: CompanyProfileModel.ContactDetails(),
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
stage: Joi.string().allow(""),
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
company_type: Joi.string().allow("").required(),
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
_custom_json: Joi.any(),
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
business_type: Joi.string().allow("").required(),
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
warnings: Joi.any(),
|
|
119
|
+
|
|
120
|
+
name: Joi.string().allow(""),
|
|
121
|
+
|
|
122
|
+
notification_emails: Joi.array().items(Joi.string().allow("")),
|
|
119
123
|
|
|
120
124
|
created_by: CompanyProfileModel.UserSerializer(),
|
|
121
125
|
|
|
122
|
-
|
|
126
|
+
modified_by: CompanyProfileModel.UserSerializer(),
|
|
123
127
|
|
|
124
|
-
|
|
128
|
+
franchise_enabled: Joi.boolean(),
|
|
125
129
|
|
|
126
|
-
|
|
130
|
+
verified_by: CompanyProfileModel.UserSerializer(),
|
|
131
|
+
|
|
132
|
+
mode: Joi.string().allow(""),
|
|
127
133
|
|
|
128
134
|
business_details: CompanyProfileModel.BusinessDetails(),
|
|
129
135
|
|
|
130
|
-
|
|
136
|
+
modified_on: Joi.string().allow(""),
|
|
131
137
|
|
|
132
|
-
|
|
138
|
+
addresses: Joi.array().items(CompanyProfileModel.GetAddressSerializer()),
|
|
133
139
|
|
|
134
|
-
|
|
140
|
+
documents: Joi.array().items(CompanyProfileModel.Document()),
|
|
135
141
|
|
|
136
142
|
uid: Joi.number().required(),
|
|
137
143
|
|
|
138
|
-
modified_on: Joi.string().allow(""),
|
|
139
|
-
|
|
140
|
-
mode: Joi.string().allow(""),
|
|
141
|
-
|
|
142
144
|
taxes: Joi.array().items(CompanyProfileModel.CompanyTaxesSerializer()),
|
|
143
145
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
addresses: Joi.array().items(CompanyProfileModel.GetAddressSerializer()),
|
|
146
|
+
created_on: Joi.string().allow(""),
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -151,20 +151,20 @@ class CompanyProfileModel {
|
|
|
151
151
|
return Joi.object({
|
|
152
152
|
message: Joi.string().allow(""),
|
|
153
153
|
|
|
154
|
-
status: Joi.number(),
|
|
155
|
-
|
|
156
154
|
meta: Joi.any(),
|
|
157
155
|
|
|
158
156
|
code: Joi.string().allow(""),
|
|
157
|
+
|
|
158
|
+
status: Joi.number(),
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
static CompanyTaxesSerializer1() {
|
|
163
163
|
return Joi.object({
|
|
164
|
-
enable: Joi.boolean(),
|
|
165
|
-
|
|
166
164
|
rate: Joi.number(),
|
|
167
165
|
|
|
166
|
+
enable: Joi.boolean(),
|
|
167
|
+
|
|
168
168
|
effective_date: Joi.string().allow(""),
|
|
169
169
|
});
|
|
170
170
|
}
|
|
@@ -173,56 +173,56 @@ class CompanyProfileModel {
|
|
|
173
173
|
return Joi.object({
|
|
174
174
|
country_code: Joi.string().allow(""),
|
|
175
175
|
|
|
176
|
+
country: Joi.string().allow("").required(),
|
|
177
|
+
|
|
176
178
|
pincode: Joi.number().required(),
|
|
177
179
|
|
|
178
|
-
|
|
180
|
+
state: Joi.string().allow("").required(),
|
|
179
181
|
|
|
180
182
|
landmark: Joi.string().allow(""),
|
|
181
183
|
|
|
182
|
-
|
|
184
|
+
address_type: Joi.string().allow("").required(),
|
|
183
185
|
|
|
184
|
-
|
|
186
|
+
longitude: Joi.number().required(),
|
|
185
187
|
|
|
186
|
-
|
|
188
|
+
address2: Joi.string().allow(""),
|
|
187
189
|
|
|
188
|
-
|
|
190
|
+
address1: Joi.string().allow("").required(),
|
|
189
191
|
|
|
190
|
-
|
|
192
|
+
latitude: Joi.number().required(),
|
|
191
193
|
|
|
192
194
|
city: Joi.string().allow("").required(),
|
|
193
|
-
|
|
194
|
-
address1: Joi.string().allow("").required(),
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
static UpdateCompany() {
|
|
199
199
|
return Joi.object({
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
company_type: Joi.string().allow(""),
|
|
203
|
-
|
|
204
|
-
reject_reason: Joi.string().allow(""),
|
|
205
|
-
|
|
206
|
-
notification_emails: Joi.array().items(Joi.string().allow("")),
|
|
200
|
+
business_info: Joi.string().allow(""),
|
|
207
201
|
|
|
208
|
-
|
|
202
|
+
franchise_enabled: Joi.boolean(),
|
|
209
203
|
|
|
210
204
|
warnings: Joi.any(),
|
|
211
205
|
|
|
212
|
-
|
|
206
|
+
contact_details: CompanyProfileModel.ContactDetails(),
|
|
213
207
|
|
|
214
|
-
|
|
208
|
+
reject_reason: Joi.string().allow(""),
|
|
215
209
|
|
|
216
|
-
|
|
210
|
+
name: Joi.string().allow(""),
|
|
217
211
|
|
|
218
212
|
business_details: CompanyProfileModel.BusinessDetails(),
|
|
219
213
|
|
|
220
|
-
|
|
214
|
+
company_type: Joi.string().allow(""),
|
|
221
215
|
|
|
222
|
-
|
|
216
|
+
documents: Joi.array().items(CompanyProfileModel.Document()),
|
|
217
|
+
|
|
218
|
+
taxes: Joi.array().items(CompanyProfileModel.CompanyTaxesSerializer1()),
|
|
219
|
+
|
|
220
|
+
_custom_json: Joi.any(),
|
|
223
221
|
|
|
224
222
|
business_type: Joi.string().allow(""),
|
|
225
223
|
|
|
224
|
+
notification_emails: Joi.array().items(Joi.string().allow("")),
|
|
225
|
+
|
|
226
226
|
addresses: Joi.array().items(
|
|
227
227
|
CompanyProfileModel.CreateUpdateAddressSerializer()
|
|
228
228
|
),
|
|
@@ -231,35 +231,35 @@ class CompanyProfileModel {
|
|
|
231
231
|
|
|
232
232
|
static ProfileSuccessResponse() {
|
|
233
233
|
return Joi.object({
|
|
234
|
-
success: Joi.boolean(),
|
|
235
|
-
|
|
236
234
|
uid: Joi.number(),
|
|
235
|
+
|
|
236
|
+
success: Joi.boolean(),
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
static DocumentsObj() {
|
|
241
241
|
return Joi.object({
|
|
242
|
-
verified: Joi.number(),
|
|
243
|
-
|
|
244
242
|
pending: Joi.number(),
|
|
243
|
+
|
|
244
|
+
verified: Joi.number(),
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
static MetricsSerializer() {
|
|
249
249
|
return Joi.object({
|
|
250
|
-
stage: Joi.string().allow(""),
|
|
251
|
-
|
|
252
|
-
uid: Joi.number(),
|
|
253
|
-
|
|
254
250
|
store_documents: CompanyProfileModel.DocumentsObj(),
|
|
255
251
|
|
|
252
|
+
product: CompanyProfileModel.DocumentsObj(),
|
|
253
|
+
|
|
256
254
|
brand: CompanyProfileModel.DocumentsObj(),
|
|
257
255
|
|
|
258
256
|
company_documents: CompanyProfileModel.DocumentsObj(),
|
|
259
257
|
|
|
260
|
-
|
|
258
|
+
stage: Joi.string().allow(""),
|
|
261
259
|
|
|
262
|
-
|
|
260
|
+
uid: Joi.number(),
|
|
261
|
+
|
|
262
|
+
store: CompanyProfileModel.DocumentsObj(),
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -273,71 +273,89 @@ class CompanyProfileModel {
|
|
|
273
273
|
|
|
274
274
|
static GetBrandResponseSerializer() {
|
|
275
275
|
return Joi.object({
|
|
276
|
-
|
|
276
|
+
verified_on: Joi.string().allow(""),
|
|
277
277
|
|
|
278
|
-
|
|
278
|
+
stage: Joi.string().allow(""),
|
|
279
279
|
|
|
280
|
-
|
|
280
|
+
_custom_json: Joi.any(),
|
|
281
|
+
|
|
282
|
+
synonyms: Joi.array().items(Joi.string().allow("")),
|
|
281
283
|
|
|
282
284
|
logo: Joi.string().allow(""),
|
|
283
285
|
|
|
284
286
|
warnings: Joi.any(),
|
|
285
287
|
|
|
286
|
-
_locale_language: Joi.any(),
|
|
287
|
-
|
|
288
288
|
name: Joi.string().allow("").required(),
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
created_by: CompanyProfileModel.UserSerializer(),
|
|
291
291
|
|
|
292
|
-
|
|
292
|
+
modified_by: CompanyProfileModel.UserSerializer(),
|
|
293
293
|
|
|
294
|
-
|
|
294
|
+
verified_by: CompanyProfileModel.UserSerializer(),
|
|
295
295
|
|
|
296
|
-
|
|
296
|
+
mode: Joi.string().allow(""),
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
reject_reason: Joi.string().allow(""),
|
|
299
299
|
|
|
300
|
-
|
|
300
|
+
modified_on: Joi.string().allow(""),
|
|
301
301
|
|
|
302
|
-
|
|
302
|
+
slug_key: Joi.string().allow(""),
|
|
303
303
|
|
|
304
|
-
|
|
304
|
+
description: Joi.string().allow(""),
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
banner: CompanyProfileModel.BrandBannerSerializer(),
|
|
307
307
|
|
|
308
|
-
|
|
308
|
+
uid: Joi.number(),
|
|
309
309
|
|
|
310
|
-
|
|
310
|
+
created_on: Joi.string().allow(""),
|
|
311
311
|
|
|
312
|
-
|
|
312
|
+
_locale_language: Joi.any(),
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
static CreateUpdateBrandRequestSerializer() {
|
|
317
317
|
return Joi.object({
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
synonyms: Joi.array().items(Joi.string().allow("")),
|
|
318
|
+
description: Joi.string().allow(""),
|
|
321
319
|
|
|
322
|
-
|
|
320
|
+
brand_tier: Joi.string().allow(""),
|
|
323
321
|
|
|
324
322
|
logo: Joi.string().allow("").required(),
|
|
325
323
|
|
|
326
|
-
|
|
324
|
+
name: Joi.string().allow("").required(),
|
|
327
325
|
|
|
328
326
|
company_id: Joi.number(),
|
|
329
327
|
|
|
330
|
-
|
|
328
|
+
banner: CompanyProfileModel.BrandBannerSerializer(),
|
|
331
329
|
|
|
332
|
-
|
|
330
|
+
uid: Joi.number(),
|
|
331
|
+
|
|
332
|
+
_custom_json: Joi.any(),
|
|
333
333
|
|
|
334
334
|
_locale_language: Joi.any(),
|
|
335
335
|
|
|
336
|
-
|
|
336
|
+
synonyms: Joi.array().items(Joi.string().allow("")),
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
static
|
|
340
|
+
static Page() {
|
|
341
|
+
return Joi.object({
|
|
342
|
+
item_total: Joi.number(),
|
|
343
|
+
|
|
344
|
+
next_id: Joi.string().allow(""),
|
|
345
|
+
|
|
346
|
+
has_previous: Joi.boolean(),
|
|
347
|
+
|
|
348
|
+
has_next: Joi.boolean(),
|
|
349
|
+
|
|
350
|
+
current: Joi.number(),
|
|
351
|
+
|
|
352
|
+
type: Joi.string().allow("").required(),
|
|
353
|
+
|
|
354
|
+
size: Joi.number(),
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
static CompanySocialAccounts() {
|
|
341
359
|
return Joi.object({
|
|
342
360
|
name: Joi.string().allow("").required(),
|
|
343
361
|
|
|
@@ -355,39 +373,39 @@ class CompanyProfileModel {
|
|
|
355
373
|
|
|
356
374
|
static CompanySerializer() {
|
|
357
375
|
return Joi.object({
|
|
358
|
-
|
|
376
|
+
details: CompanyProfileModel.CompanyDetails(),
|
|
359
377
|
|
|
360
|
-
|
|
378
|
+
business_country_info: CompanyProfileModel.BusinessCountryInfo(),
|
|
361
379
|
|
|
362
|
-
|
|
380
|
+
created_by: CompanyProfileModel.UserSerializer(),
|
|
363
381
|
|
|
364
|
-
|
|
382
|
+
verified_on: Joi.string().allow(""),
|
|
365
383
|
|
|
366
|
-
|
|
384
|
+
verified_by: CompanyProfileModel.UserSerializer(),
|
|
367
385
|
|
|
368
|
-
|
|
386
|
+
reject_reason: Joi.string().allow(""),
|
|
369
387
|
|
|
370
|
-
|
|
388
|
+
stage: Joi.string().allow(""),
|
|
371
389
|
|
|
372
|
-
|
|
390
|
+
name: Joi.string().allow(""),
|
|
373
391
|
|
|
374
|
-
|
|
392
|
+
company_type: Joi.string().allow("").required(),
|
|
375
393
|
|
|
376
|
-
|
|
394
|
+
uid: Joi.number(),
|
|
377
395
|
|
|
378
396
|
_custom_json: Joi.any(),
|
|
379
397
|
|
|
380
|
-
|
|
398
|
+
modified_on: Joi.string().allow(""),
|
|
381
399
|
|
|
382
|
-
|
|
400
|
+
business_type: Joi.string().allow("").required(),
|
|
383
401
|
|
|
384
402
|
created_on: Joi.string().allow(""),
|
|
385
403
|
|
|
386
|
-
|
|
404
|
+
notification_emails: Joi.array().items(Joi.string().allow("")),
|
|
387
405
|
|
|
388
|
-
|
|
406
|
+
market_channels: Joi.array().items(Joi.string().allow("")),
|
|
389
407
|
|
|
390
|
-
|
|
408
|
+
modified_by: CompanyProfileModel.UserSerializer(),
|
|
391
409
|
|
|
392
410
|
addresses: Joi.array().items(CompanyProfileModel.GetAddressSerializer()),
|
|
393
411
|
});
|
|
@@ -395,55 +413,37 @@ class CompanyProfileModel {
|
|
|
395
413
|
|
|
396
414
|
static CompanyBrandSerializer() {
|
|
397
415
|
return Joi.object({
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
modified_by: CompanyProfileModel.UserSerializer(),
|
|
401
|
-
|
|
402
|
-
stage: Joi.string().allow(""),
|
|
416
|
+
company: CompanyProfileModel.CompanySerializer(),
|
|
403
417
|
|
|
404
418
|
created_by: CompanyProfileModel.UserSerializer(),
|
|
405
419
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
modified_on: Joi.string().allow(""),
|
|
420
|
+
brand: CompanyProfileModel.GetBrandResponseSerializer(),
|
|
409
421
|
|
|
410
422
|
verified_on: Joi.string().allow(""),
|
|
411
423
|
|
|
412
|
-
|
|
424
|
+
verified_by: CompanyProfileModel.UserSerializer(),
|
|
413
425
|
|
|
414
426
|
warnings: Joi.any(),
|
|
415
427
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
created_on: Joi.string().allow(""),
|
|
419
|
-
|
|
420
|
-
company: CompanyProfileModel.CompanySerializer(),
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
static Page() {
|
|
425
|
-
return Joi.object({
|
|
426
|
-
item_total: Joi.number(),
|
|
427
|
-
|
|
428
|
-
next_id: Joi.string().allow(""),
|
|
428
|
+
reject_reason: Joi.string().allow(""),
|
|
429
429
|
|
|
430
|
-
|
|
430
|
+
stage: Joi.string().allow(""),
|
|
431
431
|
|
|
432
|
-
|
|
432
|
+
uid: Joi.number(),
|
|
433
433
|
|
|
434
|
-
|
|
434
|
+
modified_on: Joi.string().allow(""),
|
|
435
435
|
|
|
436
|
-
|
|
436
|
+
created_on: Joi.string().allow(""),
|
|
437
437
|
|
|
438
|
-
|
|
438
|
+
modified_by: CompanyProfileModel.UserSerializer(),
|
|
439
439
|
});
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
static CompanyBrandListSerializer() {
|
|
443
443
|
return Joi.object({
|
|
444
|
-
items: Joi.array().items(CompanyProfileModel.CompanyBrandSerializer()),
|
|
445
|
-
|
|
446
444
|
page: CompanyProfileModel.Page(),
|
|
445
|
+
|
|
446
|
+
items: Joi.array().items(CompanyProfileModel.CompanyBrandSerializer()),
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
449
|
|
|
@@ -451,29 +451,17 @@ class CompanyProfileModel {
|
|
|
451
451
|
return Joi.object({
|
|
452
452
|
company: Joi.number().required(),
|
|
453
453
|
|
|
454
|
-
brands: Joi.array().items(Joi.number()).required(),
|
|
455
|
-
|
|
456
454
|
uid: Joi.number(),
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
455
|
|
|
460
|
-
|
|
461
|
-
return Joi.object({
|
|
462
|
-
hour: Joi.number().required(),
|
|
463
|
-
|
|
464
|
-
minute: Joi.number().required(),
|
|
456
|
+
brands: Joi.array().items(Joi.number()).required(),
|
|
465
457
|
});
|
|
466
458
|
}
|
|
467
459
|
|
|
468
|
-
static
|
|
460
|
+
static ProductReturnConfigSerializer() {
|
|
469
461
|
return Joi.object({
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
weekday: Joi.string().allow("").required(),
|
|
473
|
-
|
|
474
|
-
open: Joi.boolean().required(),
|
|
462
|
+
on_same_store: Joi.boolean(),
|
|
475
463
|
|
|
476
|
-
|
|
464
|
+
store_uid: Joi.number(),
|
|
477
465
|
});
|
|
478
466
|
}
|
|
479
467
|
|
|
@@ -487,143 +475,155 @@ class CompanyProfileModel {
|
|
|
487
475
|
|
|
488
476
|
static HolidaySchemaSerializer() {
|
|
489
477
|
return Joi.object({
|
|
490
|
-
|
|
478
|
+
title: Joi.string().allow("").required(),
|
|
491
479
|
|
|
492
480
|
holiday_type: Joi.string().allow("").required(),
|
|
493
481
|
|
|
494
|
-
|
|
482
|
+
date: CompanyProfileModel.HolidayDateSerializer().required(),
|
|
495
483
|
});
|
|
496
484
|
}
|
|
497
485
|
|
|
498
|
-
static
|
|
486
|
+
static LocationTimingSerializer() {
|
|
499
487
|
return Joi.object({
|
|
500
|
-
|
|
488
|
+
minute: Joi.number().required(),
|
|
501
489
|
|
|
502
|
-
|
|
490
|
+
hour: Joi.number().required(),
|
|
491
|
+
});
|
|
492
|
+
}
|
|
503
493
|
|
|
504
|
-
|
|
494
|
+
static LocationDayWiseSerializer() {
|
|
495
|
+
return Joi.object({
|
|
496
|
+
closing: CompanyProfileModel.LocationTimingSerializer(),
|
|
497
|
+
|
|
498
|
+
opening: CompanyProfileModel.LocationTimingSerializer(),
|
|
499
|
+
|
|
500
|
+
open: Joi.boolean().required(),
|
|
501
|
+
|
|
502
|
+
weekday: Joi.string().allow("").required(),
|
|
505
503
|
});
|
|
506
504
|
}
|
|
507
505
|
|
|
508
|
-
static
|
|
506
|
+
static LocationManagerSerializer() {
|
|
509
507
|
return Joi.object({
|
|
510
|
-
|
|
508
|
+
email: Joi.string().allow(""),
|
|
511
509
|
|
|
512
|
-
|
|
510
|
+
name: Joi.string().allow(""),
|
|
511
|
+
|
|
512
|
+
mobile_no: CompanyProfileModel.SellerPhoneNumber().required(),
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
515
|
|
|
516
516
|
static GetCompanySerializer() {
|
|
517
517
|
return Joi.object({
|
|
518
|
+
created_by: CompanyProfileModel.UserSerializer(),
|
|
519
|
+
|
|
520
|
+
verified_on: Joi.string().allow(""),
|
|
521
|
+
|
|
518
522
|
verified_by: CompanyProfileModel.UserSerializer(),
|
|
519
523
|
|
|
520
|
-
|
|
524
|
+
reject_reason: Joi.string().allow(""),
|
|
521
525
|
|
|
522
526
|
stage: Joi.string().allow(""),
|
|
523
527
|
|
|
524
|
-
|
|
528
|
+
name: Joi.string().allow(""),
|
|
525
529
|
|
|
526
|
-
|
|
530
|
+
company_type: Joi.string().allow(""),
|
|
527
531
|
|
|
528
532
|
uid: Joi.number(),
|
|
529
533
|
|
|
530
534
|
modified_on: Joi.string().allow(""),
|
|
531
535
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
reject_reason: Joi.string().allow(""),
|
|
536
|
+
business_type: Joi.string().allow(""),
|
|
535
537
|
|
|
536
538
|
created_on: Joi.string().allow(""),
|
|
537
539
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
business_type: Joi.string().allow(""),
|
|
540
|
+
modified_by: CompanyProfileModel.UserSerializer(),
|
|
541
541
|
|
|
542
542
|
addresses: Joi.array().items(CompanyProfileModel.GetAddressSerializer()),
|
|
543
543
|
});
|
|
544
544
|
}
|
|
545
545
|
|
|
546
|
-
static
|
|
546
|
+
static InvoiceCredSerializer() {
|
|
547
547
|
return Joi.object({
|
|
548
|
-
|
|
548
|
+
password: Joi.string().allow(""),
|
|
549
549
|
|
|
550
|
-
|
|
550
|
+
enabled: Joi.boolean(),
|
|
551
|
+
|
|
552
|
+
username: Joi.string().allow(""),
|
|
551
553
|
});
|
|
552
554
|
}
|
|
553
555
|
|
|
554
|
-
static
|
|
556
|
+
static InvoiceDetailsSerializer() {
|
|
555
557
|
return Joi.object({
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
name: Joi.string().allow(""),
|
|
558
|
+
e_waybill: CompanyProfileModel.InvoiceCredSerializer(),
|
|
559
559
|
|
|
560
|
-
|
|
560
|
+
e_invoice: CompanyProfileModel.InvoiceCredSerializer(),
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
563
|
|
|
564
564
|
static GetLocationSerializer() {
|
|
565
565
|
return Joi.object({
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
notification_emails: Joi.array().items(Joi.string().allow("")),
|
|
566
|
+
verified_on: Joi.string().allow(""),
|
|
569
567
|
|
|
570
|
-
|
|
568
|
+
stage: Joi.string().allow(""),
|
|
571
569
|
|
|
572
|
-
|
|
570
|
+
display_name: Joi.string().allow("").required(),
|
|
573
571
|
|
|
574
|
-
|
|
572
|
+
_custom_json: Joi.any(),
|
|
575
573
|
|
|
576
|
-
|
|
577
|
-
CompanyProfileModel.LocationDayWiseSerializer()
|
|
578
|
-
),
|
|
574
|
+
phone_number: Joi.string().allow(""),
|
|
579
575
|
|
|
580
|
-
|
|
576
|
+
warnings: Joi.any(),
|
|
581
577
|
|
|
582
|
-
|
|
578
|
+
product_return_config: CompanyProfileModel.ProductReturnConfigSerializer(),
|
|
583
579
|
|
|
584
|
-
|
|
585
|
-
CompanyProfileModel.SellerPhoneNumber()
|
|
586
|
-
),
|
|
580
|
+
name: Joi.string().allow("").required(),
|
|
587
581
|
|
|
588
582
|
holiday: Joi.array().items(CompanyProfileModel.HolidaySchemaSerializer()),
|
|
589
583
|
|
|
590
|
-
|
|
584
|
+
notification_emails: Joi.array().items(Joi.string().allow("")),
|
|
591
585
|
|
|
592
|
-
|
|
586
|
+
created_by: CompanyProfileModel.UserSerializer(),
|
|
593
587
|
|
|
594
|
-
|
|
588
|
+
modified_by: CompanyProfileModel.UserSerializer(),
|
|
595
589
|
|
|
596
|
-
|
|
590
|
+
verified_by: CompanyProfileModel.UserSerializer(),
|
|
597
591
|
|
|
598
|
-
|
|
592
|
+
timing: Joi.array().items(
|
|
593
|
+
CompanyProfileModel.LocationDayWiseSerializer()
|
|
594
|
+
),
|
|
599
595
|
|
|
600
|
-
|
|
596
|
+
code: Joi.string().allow("").required(),
|
|
601
597
|
|
|
602
|
-
|
|
598
|
+
modified_on: Joi.string().allow(""),
|
|
603
599
|
|
|
604
|
-
|
|
600
|
+
manager: CompanyProfileModel.LocationManagerSerializer(),
|
|
605
601
|
|
|
606
602
|
address: CompanyProfileModel.GetAddressSerializer().required(),
|
|
607
603
|
|
|
608
|
-
|
|
604
|
+
company: CompanyProfileModel.GetCompanySerializer(),
|
|
609
605
|
|
|
610
|
-
|
|
606
|
+
store_type: Joi.string().allow(""),
|
|
611
607
|
|
|
612
|
-
|
|
608
|
+
gst_credentials: CompanyProfileModel.InvoiceDetailsSerializer(),
|
|
613
609
|
|
|
614
|
-
|
|
610
|
+
documents: Joi.array().items(CompanyProfileModel.Document()),
|
|
615
611
|
|
|
616
|
-
|
|
612
|
+
uid: Joi.number(),
|
|
617
613
|
|
|
618
|
-
|
|
614
|
+
contact_numbers: Joi.array().items(
|
|
615
|
+
CompanyProfileModel.SellerPhoneNumber()
|
|
616
|
+
),
|
|
617
|
+
|
|
618
|
+
created_on: Joi.string().allow(""),
|
|
619
619
|
});
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
static LocationListSerializer() {
|
|
623
623
|
return Joi.object({
|
|
624
|
-
items: Joi.array().items(CompanyProfileModel.GetLocationSerializer()),
|
|
625
|
-
|
|
626
624
|
page: CompanyProfileModel.Page(),
|
|
625
|
+
|
|
626
|
+
items: Joi.array().items(CompanyProfileModel.GetLocationSerializer()),
|
|
627
627
|
});
|
|
628
628
|
}
|
|
629
629
|
|
|
@@ -631,69 +631,69 @@ class CompanyProfileModel {
|
|
|
631
631
|
return Joi.object({
|
|
632
632
|
country_code: Joi.string().allow(""),
|
|
633
633
|
|
|
634
|
+
country: Joi.string().allow(""),
|
|
635
|
+
|
|
634
636
|
pincode: Joi.number(),
|
|
635
637
|
|
|
636
|
-
|
|
638
|
+
state: Joi.string().allow(""),
|
|
637
639
|
|
|
638
640
|
landmark: Joi.string().allow(""),
|
|
639
641
|
|
|
640
|
-
latitude: Joi.number().required(),
|
|
641
|
-
|
|
642
|
-
country: Joi.string().allow(""),
|
|
643
|
-
|
|
644
642
|
address_type: Joi.string().allow(""),
|
|
645
643
|
|
|
646
|
-
|
|
644
|
+
longitude: Joi.number().required(),
|
|
647
645
|
|
|
648
646
|
address2: Joi.string().allow(""),
|
|
649
647
|
|
|
650
|
-
city: Joi.string().allow(""),
|
|
651
|
-
|
|
652
648
|
address1: Joi.string().allow(""),
|
|
649
|
+
|
|
650
|
+
latitude: Joi.number().required(),
|
|
651
|
+
|
|
652
|
+
city: Joi.string().allow(""),
|
|
653
653
|
});
|
|
654
654
|
}
|
|
655
655
|
|
|
656
656
|
static LocationSerializer() {
|
|
657
657
|
return Joi.object({
|
|
658
|
-
|
|
658
|
+
company: Joi.number().required(),
|
|
659
659
|
|
|
660
|
-
|
|
660
|
+
product_return_config: CompanyProfileModel.ProductReturnConfigSerializer(),
|
|
661
661
|
|
|
662
|
-
|
|
662
|
+
store_type: Joi.string().allow(""),
|
|
663
|
+
|
|
664
|
+
warnings: Joi.any(),
|
|
663
665
|
|
|
664
666
|
timing: Joi.array().items(
|
|
665
667
|
CompanyProfileModel.LocationDayWiseSerializer()
|
|
666
668
|
),
|
|
667
669
|
|
|
668
|
-
product_return_config: CompanyProfileModel.ProductReturnConfigSerializer(),
|
|
669
|
-
|
|
670
|
-
manager: CompanyProfileModel.LocationManagerSerializer(),
|
|
671
|
-
|
|
672
670
|
code: Joi.string().allow("").required(),
|
|
673
671
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
_custom_json: Joi.any(),
|
|
672
|
+
name: Joi.string().allow("").required(),
|
|
677
673
|
|
|
678
|
-
|
|
674
|
+
holiday: Joi.array().items(CompanyProfileModel.HolidaySchemaSerializer()),
|
|
679
675
|
|
|
680
|
-
|
|
676
|
+
stage: Joi.string().allow(""),
|
|
681
677
|
|
|
682
678
|
display_name: Joi.string().allow("").required(),
|
|
683
679
|
|
|
684
|
-
store_type: Joi.string().allow(""),
|
|
685
|
-
|
|
686
680
|
documents: Joi.array().items(CompanyProfileModel.Document()),
|
|
687
681
|
|
|
682
|
+
uid: Joi.number(),
|
|
683
|
+
|
|
688
684
|
contact_numbers: Joi.array().items(
|
|
689
685
|
CompanyProfileModel.SellerPhoneNumber()
|
|
690
686
|
),
|
|
691
687
|
|
|
692
|
-
|
|
688
|
+
manager: CompanyProfileModel.LocationManagerSerializer(),
|
|
693
689
|
|
|
694
|
-
|
|
690
|
+
_custom_json: Joi.any(),
|
|
695
691
|
|
|
696
|
-
|
|
692
|
+
gst_credentials: CompanyProfileModel.InvoiceDetailsSerializer(),
|
|
693
|
+
|
|
694
|
+
notification_emails: Joi.array().items(Joi.string().allow("")),
|
|
695
|
+
|
|
696
|
+
address: CompanyProfileModel.AddressSerializer().required(),
|
|
697
697
|
});
|
|
698
698
|
}
|
|
699
699
|
|