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