@gofynd/fdk-client-javascript 1.4.2-beta.5 → 1.4.2-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
214
214
  The above code will log the curl command in the console
215
215
 
216
216
  ```bash
217
- curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.2-beta.5' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
217
+ curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.4.2-beta.6' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
218
218
  Active Theme: Emerge
219
219
  ```
220
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "1.4.2-beta.5",
3
+ "version": "1.4.2-beta.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,8 @@
17
17
  "joi": "^17.7.0",
18
18
  "loglevel": "^1.8.1",
19
19
  "query-string": "^7.1.3",
20
- "@gofynd/fp-signature": "^1.0.1"
20
+ "@gofynd/fp-signature": "^1.0.1",
21
+ "@gofynd/flick": "^1.0.3"
21
22
  },
22
23
  "devDependencies": {
23
24
  "axios-cookiejar-support": "^4.0.6",
@@ -15,6 +15,8 @@ const Share = require("./Share/ShareApplicationClient");
15
15
  const Theme = require("./Theme/ThemeApplicationClient");
16
16
  const User = require("./User/UserApplicationClient");
17
17
  const { FDKClientValidationError } = require("../common/FDKError");
18
+ const { Logger } = require("../common/Logger");
19
+ const { convertStringToBase64 } = require("../common/utils");
18
20
 
19
21
  /**
20
22
  * Represents the client for the application.
@@ -41,6 +43,24 @@ class ApplicationClient {
41
43
  this.share = new Share(config);
42
44
  this.theme = new Theme(config);
43
45
  this.user = new User(config);
46
+ if (
47
+ typeof window != "undefined" &&
48
+ config.options &&
49
+ config.options.enable_clickstream
50
+ ) {
51
+ const Clickstream = require("@gofynd/flick");
52
+ Logger({
53
+ level: "DEBUG",
54
+ message: `initializing clickstream with base url ${config.domain}`,
55
+ });
56
+ Clickstream.initialize(
57
+ config.domain,
58
+ convertStringToBase64(
59
+ config.applicationID + ":" + config.applicationToken
60
+ )
61
+ );
62
+ require("../common/Clickstream");
63
+ }
44
64
  }
45
65
 
46
66
  /**
@@ -455,7 +455,7 @@ class LeadApplicationModel {
455
455
  sub_categories: Joi.link("#TicketCategory"),
456
456
  group_id: Joi.number(),
457
457
  feedback_form: LeadApplicationModel.FeedbackForm(),
458
- });
458
+ }).id("TicketCategory");
459
459
  }
460
460
 
461
461
  /** @returns {TicketHistory} */
@@ -53,8 +53,6 @@ export = ShareApplicationModel;
53
53
  */
54
54
  /**
55
55
  * @typedef UrlInfo
56
- * @property {string} [original]
57
- * @property {string} [short]
58
56
  * @property {string} [hash]
59
57
  */
60
58
  /**
@@ -161,8 +159,6 @@ type ShortLinkReq = {
161
159
  /** @returns {UrlInfo} */
162
160
  declare function UrlInfo(): UrlInfo;
163
161
  type UrlInfo = {
164
- original?: string;
165
- short?: string;
166
162
  hash?: string;
167
163
  };
168
164
  /** @returns {ShortLinkRes} */
@@ -62,8 +62,6 @@ const Joi = require("joi");
62
62
 
63
63
  /**
64
64
  * @typedef UrlInfo
65
- * @property {string} [original]
66
- * @property {string} [short]
67
65
  * @property {string} [hash]
68
66
  */
69
67
 
@@ -176,8 +174,6 @@ class ShareApplicationModel {
176
174
  /** @returns {UrlInfo} */
177
175
  static UrlInfo() {
178
176
  return Joi.object({
179
- original: Joi.string().allow(""),
180
- short: Joi.string().allow(""),
181
177
  hash: Joi.string().allow(""),
182
178
  });
183
179
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,246 @@
1
+ const Clickstream = require("@gofynd/flick");
2
+ const { Logger } = require("../common/Logger");
3
+
4
+ /**
5
+ * Safely extracts a value from an Object of n-depth
6
+ *
7
+ * @author Nikhil Kakade
8
+ * @param {function} fn
9
+ * @param {any} [defaultValue] - Null
10
+ * @returns {any}
11
+ */
12
+ const sg = function safeGet(fn, defaultValue = null) {
13
+ try {
14
+ return fn();
15
+ } catch (err) {
16
+ return defaultValue;
17
+ }
18
+ };
19
+
20
+ if (typeof window != "undefined") {
21
+ window.FPI.event.on("user.login", (eventData) => {
22
+ Logger({ level: "DEBUG", message: eventData });
23
+ Clickstream.identify(eventData["user_id"], { ...eventData }).catch(
24
+ (err) => {
25
+ Logger({ level: "ERROR", message: err });
26
+ }
27
+ );
28
+ });
29
+
30
+ window.FPI.event.on("user.update", (eventData) => {
31
+ Logger({ level: "DEBUG", message: eventData });
32
+ Clickstream.identify(eventData["used_id"], { ...eventData }).catch(
33
+ (err) => {
34
+ Logger({ level: "ERROR", message: err });
35
+ }
36
+ );
37
+ });
38
+
39
+ window.FPI.event.on("user.logout", (eventData) => {
40
+ Logger({ level: "DEBUG", message: eventData });
41
+ Clickstream.reset().catch((err) => {
42
+ Logger({ level: "ERROR", message: err });
43
+ });
44
+ });
45
+
46
+ window.FPI.event.on("wishlist.add", (eventData) => {
47
+ Logger({ level: "DEBUG", message: eventData });
48
+ Clickstream.sendEvent("product_wishlist_add", {
49
+ wishlist_name: "TODO",
50
+ wishlist_id: "TODO",
51
+ event_type: "click",
52
+ product_id: sg(() => eventData.item["uid"]),
53
+ brand: sg(() => eventData.item.brand["name"]),
54
+ l3_category: sg(() => eventData.item.categories[0]["name"]),
55
+ mrp: sg(() => eventData.item.price.marked.max),
56
+ quantity: "TODO",
57
+ esp: sg(() => eventData.item.price.effective.min),
58
+ currency: sg(() => eventData.item.price.effective.currency_code),
59
+ value: "TODO",
60
+ source_url: "TODO",
61
+ })
62
+ .then((resp) => {
63
+ Logger({ level: "DEBUG", message: "Click event sent" });
64
+ })
65
+ .catch((err) => {
66
+ Logger({ level: "ERROR", message: err });
67
+ });
68
+ });
69
+
70
+ window.FPI.event.on("wishlist.remove", (eventData) => {
71
+ Logger({ level: "DEBUG", message: eventData });
72
+ Clickstream.sendEvent("product_wishlist_remove", {
73
+ wishlist_name: "TODO",
74
+ wishlist_id: "TODO",
75
+ event_type: "click",
76
+ product_id: sg(() => eventData.item["uid"]),
77
+ brand: sg(() => eventData.item.brand["name"]),
78
+ l3_category: sg(() => eventData.item.categories[0]["name"]),
79
+ mrp: sg(() => eventData.item.price.marked.max),
80
+ quantity: "TODO",
81
+ esp: sg(() => eventData.item.price.effective.min),
82
+ currency: sg(() => eventData.item.price.effective.currency_code),
83
+ value: "TODO",
84
+ source_url: "TODO",
85
+ })
86
+ .then((resp) => {
87
+ Logger({ level: "DEBUG", message: "Click event sent" });
88
+ })
89
+ .catch((err) => {
90
+ Logger({ level: "ERROR", message: err });
91
+ });
92
+ });
93
+
94
+ window.FPI.event.on("cart.newProduct", (eventData) => {
95
+ Logger({ level: "DEBUG", message: eventData });
96
+ Clickstream.sendEvent("add_to_cart", {
97
+ cart_id: eventData.cart_id,
98
+ event_type: "click",
99
+ product_id: sg(() => eventData.products[0]["uid"]),
100
+ brand: sg(() => eventData.products[0]["brand"]["name"]),
101
+ l3_category: sg(() => eventData.products[0]["category"]["name"]),
102
+ l1_category: "TODO",
103
+ currency: sg(() => eventData.products[0]["price"]["currency_code"]),
104
+ price: sg(() => eventData.products[0]["price"]["selling"]),
105
+ quantity: sg(() => eventData.products[0]["quantity"]["current"]),
106
+ source_url: "TODO",
107
+ position: "TODO",
108
+ value: "TODO",
109
+ })
110
+ .then((resp) => {
111
+ Logger({ level: "DEBUG", message: "Click event sent" });
112
+ })
113
+ .catch((err) => {
114
+ Logger({ level: "ERROR", message: err });
115
+ });
116
+ });
117
+
118
+ window.FPI.event.on("cart.remove", (eventData) => {
119
+ Logger({ level: "DEBUG", message: eventData });
120
+ Clickstream.sendEvent("remove_from_cart", {
121
+ cart_id: eventData.cart_id,
122
+ event_type: "click",
123
+ product_id: sg(() => eventData.products[0]["uid"]),
124
+ brand: sg(() => eventData.products[0]["brand"]["name"]),
125
+ l3_category: sg(() => eventData.products[0]["category"]["name"]),
126
+ l1_category: "TODO",
127
+ currency: sg(() => eventData.products[0]["price"]["currency_code"]),
128
+ price: sg(() => eventData.products[0]["price"]["selling"]),
129
+ quantity: sg(() => eventData.products[0]["quantity"]["current"]),
130
+ source_url: "TODO",
131
+ position: "TODO",
132
+ value: "TODO",
133
+ })
134
+ .then((resp) => {
135
+ Logger({ level: "DEBUG", message: "Click event sent" });
136
+ })
137
+ .catch((err) => {
138
+ Logger({ level: "ERROR", message: err });
139
+ });
140
+ });
141
+
142
+ window.FPI.event.on("order.processed", (eventData) => {
143
+ Logger({ level: "DEBUG", message: eventData });
144
+ Clickstream.sendEvent("order_complete", {
145
+ event_type: "click",
146
+ ...eventData,
147
+ })
148
+ .then((resp) => {
149
+ Logger({ level: "DEBUG", message: "Click event sent" });
150
+ })
151
+ .catch((err) => {
152
+ Logger({ level: "ERROR", message: err });
153
+ });
154
+ });
155
+
156
+ window.FPI.event.on("refund.success", (eventData) => {
157
+ Logger({ level: "DEBUG", message: eventData });
158
+ Clickstream.sendEvent("order_refunded", {
159
+ event_type: "click",
160
+ ...eventData,
161
+ })
162
+ .then((resp) => {
163
+ Logger({ level: "DEBUG", message: "Click event sent" });
164
+ })
165
+ .catch((err) => {
166
+ Logger({ level: "ERROR", message: err });
167
+ });
168
+ });
169
+
170
+ window.FPI.event.on("order.checkout", (eventData) => {
171
+ Logger({ level: "DEBUG", message: eventData });
172
+ Clickstream.sendEvent("order_checkout", {
173
+ event_type: "click",
174
+ cart_id: eventData.cart_id,
175
+ cart_total: sg(() => eventData.breakup_values_raw["mrp_total"]),
176
+ items: sg(() => eventData.products.lenght),
177
+ shipping: sg(() => eventData.breakup_values_raw["delivery_charge"]),
178
+ tax: sg(() => eventData.breakup_values_raw["gst_charges"]),
179
+ order_total: sg(() => eventData.breakup_values_raw["total"]),
180
+ currency: sg(() => eventData.products[0]["price"]["currency_code"]),
181
+ products: eventData.products.map((p) => {
182
+ return {
183
+ product_id: p.uid,
184
+ l3_category: sg(() => p.category["name"]),
185
+ l1_category: "TODO",
186
+ quantity: sg(() => p.quantity["current"]),
187
+ price: sg(() => p.price["marked"]),
188
+ value: sg(() => p.price["effective"]),
189
+ currency: sg(() => p.price["currency_code"]),
190
+ };
191
+ }),
192
+ })
193
+ .then((resp) => {
194
+ Logger({ level: "DEBUG", message: "Click event sent" });
195
+ })
196
+ .catch((err) => {
197
+ Logger({ level: "ERROR", message: err });
198
+ });
199
+ });
200
+
201
+ window.FPI.event.on("product.view", (eventData) => {
202
+ Logger({ level: "DEBUG", message: eventData });
203
+ Clickstream.sendEvent("product_view", {
204
+ event_type: "click",
205
+ product_id: sg(() => eventData.product["uid"]),
206
+ currency: sg(() => eventData.product.price["currency"]),
207
+ brand: sg(() => eventData.product.brand["name"]),
208
+ l3_category: sg(() => eventData.product.l3_category),
209
+ mrp: sg(() => eventData.product.price.max),
210
+ esp: sg(() => eventData.product.price.min),
211
+ l1_category: sg(() => eventData.product.l1_category),
212
+ source_url: sg(() => eventData.product.source_url),
213
+ quantity: sg(() => eventData.product.sizes[0]["quantity"]),
214
+ position: "TODO",
215
+ })
216
+ .then((resp) => {
217
+ Logger({ level: "DEBUG", message: "Click event sent" });
218
+ })
219
+ .catch((err) => {
220
+ Logger({ level: "ERROR", message: err });
221
+ });
222
+ });
223
+
224
+ window.FPI.event.on("search.products", (eventData) => {
225
+ Logger({ level: "DEBUG", message: eventData });
226
+ Clickstream.sendEvent("product_search", {
227
+ type: "search",
228
+ query: eventData.search_text,
229
+ })
230
+ .then((resp) => {
231
+ Logger({ level: "DEBUG", message: "Click event sent" });
232
+ })
233
+ .catch((err) => {
234
+ Logger({ level: "ERROR", message: err });
235
+ });
236
+ });
237
+
238
+ window.FPI.event.on("product_list.filter", (eventData) => {
239
+ Logger({ level: "DEBUG", message: eventData });
240
+ // Clickstream.sendEvent("add_to_cart", { event_type: "conversion", product_uid: eventData.products[0]['uid'], user_id: eventData.user['user_id'], brand: eventData.products[0]['brand']['name'], category: eventData.products[0]['category']['name'], currency: eventData.products[0]['price']['currency_code'], price: eventData.products[0]['price']['selling'], quantity: eventData.products[0]['quantity']['current'], cart: [] }).then((resp) => {
241
+ // console.log("Event sent succesfully")
242
+ // }).catch(err => {
243
+ // console.error(err)
244
+ // })
245
+ });
246
+ }
@@ -30,10 +30,7 @@ function convertUrlToAction(url) {
30
30
  const closestMatchingNavLink = Object.keys(typeLink).find((pageType) => {
31
31
  return utils.trimChar(pageType) === bestMatchingLink.value;
32
32
  });
33
- const closestMatchingNavKey = typeLink[closestMatchingNavLink];
34
- if (!closestMatchingNavKey) {
35
- closestMatchingNavKey = "home";
36
- }
33
+ const closestMatchingNavKey = typeLink[closestMatchingNavLink] || "home";
37
34
  return {
38
35
  type: "page",
39
36
  page: {
@@ -755,7 +755,7 @@ class LeadPartnerModel {
755
755
  sub_categories: Joi.link("#TicketCategory"),
756
756
  group_id: Joi.number(),
757
757
  feedback_form: LeadPartnerModel.FeedbackForm(),
758
- });
758
+ }).id("TicketCategory");
759
759
  }
760
760
 
761
761
  /** @returns {FeedbackResponseItem} */
@@ -117,7 +117,7 @@ declare class FileStorage {
117
117
  * @summary: Get PDF types.
118
118
  * @description: Retrieve a list of available PDF types. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
119
119
  */
120
- getPdfTypes({ storeOs, countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetPdfTypesParam, { responseHeaders }?: object): Promise<FileStoragePlatformModel.InvoiceTypesResponse>;
120
+ getPdfTypes({ countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetPdfTypesParam, { responseHeaders }?: object): Promise<FileStoragePlatformModel.InvoiceTypesResponse>;
121
121
  /**
122
122
  * @param {FileStoragePlatformApplicationValidator.SaveHtmlTemplateParam} arg
123
123
  * - Arg object
@@ -800,14 +800,13 @@ class FileStorage {
800
800
  * @description: Retrieve a list of available PDF types. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/).
801
801
  */
802
802
  async getPdfTypes(
803
- { storeOs, countryCode, requestHeaders } = { requestHeaders: {} },
803
+ { countryCode, requestHeaders } = { requestHeaders: {} },
804
804
  { responseHeaders } = { responseHeaders: false }
805
805
  ) {
806
806
  const {
807
807
  error,
808
808
  } = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
809
809
  {
810
- storeOs,
811
810
  countryCode,
812
811
  },
813
812
  { abortEarly: false, allowUnknown: true }
@@ -821,7 +820,6 @@ class FileStorage {
821
820
  error: warrning,
822
821
  } = FileStoragePlatformApplicationValidator.getPdfTypes().validate(
823
822
  {
824
- storeOs,
825
823
  countryCode,
826
824
  },
827
825
  { abortEarly: false, allowUnknown: false }
@@ -835,7 +833,6 @@ class FileStorage {
835
833
 
836
834
  const query_params = {};
837
835
  query_params["country_code"] = countryCode;
838
- query_params["store_os"] = storeOs;
839
836
 
840
837
  const response = await PlatformAPIClient.execute(
841
838
  this.config,
@@ -65,7 +65,6 @@ export = FileStoragePlatformApplicationValidator;
65
65
  /**
66
66
  * @typedef GetPdfTypesParam
67
67
  * @property {string} [countryCode]
68
- * @property {boolean} storeOs
69
68
  */
70
69
  /**
71
70
  * @typedef SaveHtmlTemplateParam
@@ -194,7 +193,6 @@ type GetDefaultPdfTemplateParam = {
194
193
  };
195
194
  type GetPdfTypesParam = {
196
195
  countryCode?: string;
197
- storeOs: boolean;
198
196
  };
199
197
  type SaveHtmlTemplateParam = {
200
198
  body: FileStoragePlatformModel.PdfConfig;
@@ -77,7 +77,6 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel");
77
77
  /**
78
78
  * @typedef GetPdfTypesParam
79
79
  * @property {string} [countryCode]
80
- * @property {boolean} storeOs
81
80
  */
82
81
 
83
82
  /**
@@ -179,7 +178,6 @@ class FileStoragePlatformApplicationValidator {
179
178
  static getPdfTypes() {
180
179
  return Joi.object({
181
180
  countryCode: Joi.string().allow(""),
182
- storeOs: Joi.boolean().required(),
183
181
  }).required();
184
182
  }
185
183
 
@@ -94,7 +94,6 @@ export = FileStoragePlatformModel;
94
94
  * @property {string[]} format
95
95
  * @property {number} __v
96
96
  * @property {boolean} visibility
97
- * @property {boolean} store_os
98
97
  * @property {string} country_code
99
98
  */
100
99
  /**
@@ -671,7 +670,6 @@ type InvoiceTypesDataResponse = {
671
670
  format: string[];
672
671
  __v: number;
673
672
  visibility: boolean;
674
- store_os: boolean;
675
673
  country_code: string;
676
674
  };
677
675
  /** @returns {InvoiceTypesResponse} */
@@ -108,7 +108,6 @@ const Joi = require("joi");
108
108
  * @property {string[]} format
109
109
  * @property {number} __v
110
110
  * @property {boolean} visibility
111
- * @property {boolean} store_os
112
111
  * @property {string} country_code
113
112
  */
114
113
 
@@ -757,7 +756,6 @@ class FileStoragePlatformModel {
757
756
  format: Joi.array().items(Joi.string().allow("")).required(),
758
757
  __v: Joi.number().required(),
759
758
  visibility: Joi.boolean().required(),
760
- store_os: Joi.boolean().required(),
761
759
  country_code: Joi.string().allow("").required(),
762
760
  });
763
761
  }
@@ -712,7 +712,7 @@ class LeadPlatformModel {
712
712
  sub_categories: Joi.link("#TicketCategory"),
713
713
  group_id: Joi.number(),
714
714
  feedback_form: LeadPlatformModel.FeedbackForm(),
715
- });
715
+ }).id("TicketCategory");
716
716
  }
717
717
 
718
718
  /** @returns {FeedbackResponseItem} */
@@ -955,11 +955,13 @@ export = ServiceabilityPlatformModel;
955
955
  * @property {number[]} ignore_locations
956
956
  * @property {number[]} assign_locations
957
957
  * @property {number} [seller_id]
958
+ * @property {number} [store_id]
958
959
  */
959
960
  /**
960
961
  * @typedef OptimlLocationsRequestSchema
961
962
  * @property {string} channel_id
962
963
  * @property {string} channel_type
964
+ * @property {string} [channel_identifier]
963
965
  * @property {LocationDetailsServiceability} to_serviceability
964
966
  * @property {OptimalLocationsArticles} [article]
965
967
  */
@@ -2103,12 +2105,14 @@ type OptimalLocationsArticles = {
2103
2105
  ignore_locations: number[];
2104
2106
  assign_locations: number[];
2105
2107
  seller_id?: number;
2108
+ store_id?: number;
2106
2109
  };
2107
2110
  /** @returns {OptimlLocationsRequestSchema} */
2108
2111
  declare function OptimlLocationsRequestSchema(): OptimlLocationsRequestSchema;
2109
2112
  type OptimlLocationsRequestSchema = {
2110
2113
  channel_id: string;
2111
2114
  channel_type: string;
2115
+ channel_identifier?: string;
2112
2116
  to_serviceability: LocationDetailsServiceability;
2113
2117
  article?: OptimalLocationsArticles;
2114
2118
  };
@@ -1081,12 +1081,14 @@ const Joi = require("joi");
1081
1081
  * @property {number[]} ignore_locations
1082
1082
  * @property {number[]} assign_locations
1083
1083
  * @property {number} [seller_id]
1084
+ * @property {number} [store_id]
1084
1085
  */
1085
1086
 
1086
1087
  /**
1087
1088
  * @typedef OptimlLocationsRequestSchema
1088
1089
  * @property {string} channel_id
1089
1090
  * @property {string} channel_type
1091
+ * @property {string} [channel_identifier]
1090
1092
  * @property {LocationDetailsServiceability} to_serviceability
1091
1093
  * @property {OptimalLocationsArticles} [article]
1092
1094
  */
@@ -1783,7 +1785,7 @@ class ServiceabilityPlatformModel {
1783
1785
  errors: Joi.array().items(ServiceabilityPlatformModel.Error()),
1784
1786
  page: ServiceabilityPlatformModel.PincodeCodStatusListingPage().required(),
1785
1787
  summary: ServiceabilityPlatformModel.PincodeCodStatusListingSummary().required(),
1786
- });
1788
+ }).id("PincodeCodStatusListingResponse");
1787
1789
  }
1788
1790
 
1789
1791
  /** @returns {Error} */
@@ -2530,6 +2532,7 @@ class ServiceabilityPlatformModel {
2530
2532
  ignore_locations: Joi.array().items(Joi.number()).required(),
2531
2533
  assign_locations: Joi.array().items(Joi.number()).required(),
2532
2534
  seller_id: Joi.number(),
2535
+ store_id: Joi.number(),
2533
2536
  });
2534
2537
  }
2535
2538
 
@@ -2538,6 +2541,7 @@ class ServiceabilityPlatformModel {
2538
2541
  return Joi.object({
2539
2542
  channel_id: Joi.string().allow("").required(),
2540
2543
  channel_type: Joi.string().allow("").required(),
2544
+ channel_identifier: Joi.string().allow(""),
2541
2545
  to_serviceability: ServiceabilityPlatformModel.LocationDetailsServiceability().required(),
2542
2546
  article: ServiceabilityPlatformModel.OptimalLocationsArticles(),
2543
2547
  });
@@ -58,8 +58,6 @@ export = SharePlatformModel;
58
58
  */
59
59
  /**
60
60
  * @typedef UrlInfo
61
- * @property {string} [original]
62
- * @property {string} [short]
63
61
  * @property {string} [hash]
64
62
  */
65
63
  /**
@@ -196,8 +194,6 @@ type ShortLinkReq = {
196
194
  /** @returns {UrlInfo} */
197
195
  declare function UrlInfo(): UrlInfo;
198
196
  type UrlInfo = {
199
- original?: string;
200
- short?: string;
201
197
  hash?: string;
202
198
  };
203
199
  /** @returns {ShortLinkRes} */
@@ -68,8 +68,6 @@ const Joi = require("joi");
68
68
 
69
69
  /**
70
70
  * @typedef UrlInfo
71
- * @property {string} [original]
72
- * @property {string} [short]
73
71
  * @property {string} [hash]
74
72
  */
75
73
 
@@ -208,8 +206,6 @@ class SharePlatformModel {
208
206
  /** @returns {UrlInfo} */
209
207
  static UrlInfo() {
210
208
  return Joi.object({
211
- original: Joi.string().allow(""),
212
- short: Joi.string().allow(""),
213
209
  hash: Joi.string().allow(""),
214
210
  });
215
211
  }
@@ -112,7 +112,7 @@ export = UserPlatformModel;
112
112
  */
113
113
  /**
114
114
  * @typedef CustomerListResponseSchema
115
- * @property {UserSchema[]} [items]
115
+ * @property {UserSearchSchema[]} [items]
116
116
  * @property {PaginationSchema} [page]
117
117
  */
118
118
  /**
@@ -717,7 +717,7 @@ type UserSearchResponseSchema = {
717
717
  /** @returns {CustomerListResponseSchema} */
718
718
  declare function CustomerListResponseSchema(): CustomerListResponseSchema;
719
719
  type CustomerListResponseSchema = {
720
- items?: UserSchema[];
720
+ items?: UserSearchSchema[];
721
721
  page?: PaginationSchema;
722
722
  };
723
723
  /** @returns {PaginationSchema} */
@@ -127,7 +127,7 @@ const Joi = require("joi");
127
127
 
128
128
  /**
129
129
  * @typedef CustomerListResponseSchema
130
- * @property {UserSchema[]} [items]
130
+ * @property {UserSearchSchema[]} [items]
131
131
  * @property {PaginationSchema} [page]
132
132
  */
133
133
 
@@ -686,7 +686,7 @@ class UserPlatformModel {
686
686
  /** @returns {CustomerListResponseSchema} */
687
687
  static CustomerListResponseSchema() {
688
688
  return Joi.object({
689
- items: Joi.array().items(UserPlatformModel.UserSchema()),
689
+ items: Joi.array().items(UserPlatformModel.UserSearchSchema()),
690
690
  page: UserPlatformModel.PaginationSchema(),
691
691
  });
692
692
  }