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