@gofynd/fdk-client-javascript 1.0.3 → 1.0.4

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 (175) hide show
  1. package/README.md +31 -2
  2. package/index.d.ts +4 -4
  3. package/index.js +9 -10
  4. package/package.json +14 -14
  5. package/sdk/APIClient.d.ts +11 -0
  6. package/sdk/APIClient.js +35 -0
  7. package/sdk/Client.d.ts +6 -0
  8. package/sdk/Client.js +17 -0
  9. package/sdk/Config.d.ts +9 -0
  10. package/sdk/Config.js +17 -0
  11. package/sdk/application/Cart/CartApplicationClient.js +29 -28
  12. package/sdk/application/Cart/CartApplicationModel.js +3 -1
  13. package/sdk/application/Catalog/CatalogApplicationClient.js +43 -42
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +1 -1
  15. package/sdk/application/Common/CommonApplicationClient.js +5 -4
  16. package/sdk/application/Communication/CommunicationApplicationClient.js +6 -5
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.js +21 -20
  18. package/sdk/application/Content/ContentApplicationClient.js +26 -25
  19. package/sdk/application/Content/ContentApplicationModel.js +1 -0
  20. package/sdk/application/FileStorage/FileStorageApplicationClient.js +6 -5
  21. package/sdk/application/Lead/LeadApplicationClient.js +10 -9
  22. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -3
  23. package/sdk/application/Logistic/LogisticApplicationClient.js +11 -12
  24. package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -1
  25. package/sdk/application/Order/OrderApplicationClient.js +15 -14
  26. package/sdk/application/Order/OrderApplicationModel.js +9 -0
  27. package/sdk/application/Payment/PaymentApplicationClient.js +42 -41
  28. package/sdk/application/PosCart/PosCartApplicationClient.js +30 -29
  29. package/sdk/application/PosCart/PosCartApplicationModel.js +3 -1
  30. package/sdk/application/Rewards/RewardsApplicationClient.js +11 -10
  31. package/sdk/application/Share/ShareApplicationClient.js +10 -9
  32. package/sdk/application/Theme/ThemeApplicationClient.js +7 -6
  33. package/sdk/application/User/UserApplicationClient.js +38 -37
  34. package/sdk/common/AxiosHelper.js +17 -6
  35. package/sdk/constructUrl.d.ts +5 -0
  36. package/sdk/constructUrl.js +13 -0
  37. package/sdk/index.d.ts +3 -0
  38. package/sdk/index.js +5 -0
  39. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +3 -1
  40. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  41. package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
  42. package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
  43. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -2
  44. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +1 -0
  45. package/sdk/platform/Billing/BillingPlatformClient.js +3 -2
  46. package/sdk/platform/Billing/BillingPlatformValidator.js +1 -0
  47. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +27 -0
  48. package/sdk/platform/Cart/CartPlatformApplicationClient.js +177 -1
  49. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
  50. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +17 -1
  51. package/sdk/platform/Cart/CartPlatformModel.js +7 -3
  52. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +3 -1
  53. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -1
  54. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
  55. package/sdk/platform/Catalog/CatalogPlatformClient.js +6 -9
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +7 -7
  57. package/sdk/platform/Catalog/CatalogPlatformValidator.js +2 -1
  58. package/sdk/platform/Common/CommonPlatformClient.js +7 -18
  59. package/sdk/platform/Common/CommonPlatformValidator.js +1 -0
  60. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3 -1
  61. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -1
  62. package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
  63. package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
  64. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +5 -4
  65. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +1 -0
  66. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -1
  67. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +1 -1
  68. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +9 -8
  69. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +1 -0
  70. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -10
  71. package/sdk/platform/Content/ContentPlatformApplicationClient.js +3 -62
  72. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +0 -1
  73. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +1 -7
  74. package/sdk/platform/Content/ContentPlatformModel.js +1 -0
  75. package/sdk/platform/Discount/DiscountPlatformClient.js +3 -2
  76. package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -0
  77. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +3 -3
  78. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +27 -5
  79. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
  80. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +3 -3
  81. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +28 -6
  82. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +1 -0
  83. package/sdk/platform/Inventory/InventoryPlatformClient.js +3 -2
  84. package/sdk/platform/Inventory/InventoryPlatformValidator.js +1 -0
  85. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +3 -1
  86. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +1 -1
  87. package/sdk/platform/Lead/LeadPlatformClient.js +4 -3
  88. package/sdk/platform/Lead/LeadPlatformValidator.js +1 -0
  89. package/sdk/platform/Order/OrderPlatformApplicationClient.js +3 -1
  90. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -1
  91. package/sdk/platform/Order/OrderPlatformClient.d.ts +1 -1
  92. package/sdk/platform/Order/OrderPlatformClient.js +16 -3
  93. package/sdk/platform/Order/OrderPlatformModel.js +1 -0
  94. package/sdk/platform/Order/OrderPlatformValidator.js +1 -0
  95. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
  96. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
  97. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +1 -1
  98. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +14 -14
  99. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +1 -1
  100. package/sdk/platform/Payment/PaymentPlatformClient.js +3 -2
  101. package/sdk/platform/Payment/PaymentPlatformValidator.js +1 -0
  102. package/sdk/platform/PlatformClient.d.ts +13 -9
  103. package/sdk/platform/PlatformClient.js +13 -9
  104. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +4 -4
  105. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +36 -17
  106. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +1 -1
  107. package/sdk/platform/Share/SharePlatformApplicationClient.js +3 -1
  108. package/sdk/platform/Share/SharePlatformApplicationValidator.js +1 -1
  109. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +3 -1
  110. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +1 -1
  111. package/sdk/platform/User/UserPlatformApplicationClient.js +3 -1
  112. package/sdk/platform/User/UserPlatformApplicationValidator.js +1 -1
  113. package/sdk/platform/Webhook/WebhookPlatformClient.js +3 -2
  114. package/sdk/platform/Webhook/WebhookPlatformValidator.js +1 -0
  115. package/sdk/public/Configuration/ConfigurationPublicClient.js +2 -0
  116. package/sdk/public/Inventory/InventoryPublicClient.js +2 -0
  117. package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
  118. package/.github/workflows/on_create_release.yml +0 -23
  119. package/.github/workflows/on_merge_main.yml +0 -38
  120. package/.github/workflows/on_pull_request.yml +0 -35
  121. package/.prettierrc +0 -5
  122. package/documentation/application/CART.md +0 -8771
  123. package/documentation/application/CATALOG.md +0 -8690
  124. package/documentation/application/COMMON.md +0 -325
  125. package/documentation/application/COMMUNICATION.md +0 -387
  126. package/documentation/application/CONFIGURATION.md +0 -2212
  127. package/documentation/application/CONTENT.md +0 -2629
  128. package/documentation/application/FILESTORAGE.md +0 -442
  129. package/documentation/application/LEAD.md +0 -1549
  130. package/documentation/application/LOGISTIC.md +0 -689
  131. package/documentation/application/ORDER.md +0 -2937
  132. package/documentation/application/PAYMENT.md +0 -4475
  133. package/documentation/application/POSCART.md +0 -9375
  134. package/documentation/application/README.md +0 -21
  135. package/documentation/application/REWARDS.md +0 -554
  136. package/documentation/application/SHARE.md +0 -635
  137. package/documentation/application/THEME.md +0 -5517
  138. package/documentation/application/USER.md +0 -3798
  139. package/documentation/platform/ANALYTICS.md +0 -1012
  140. package/documentation/platform/AUDITTRAIL.md +0 -493
  141. package/documentation/platform/BILLING.md +0 -1889
  142. package/documentation/platform/CART.md +0 -4711
  143. package/documentation/platform/CATALOG.md +0 -20522
  144. package/documentation/platform/COMMON.md +0 -325
  145. package/documentation/platform/COMMUNICATION.md +0 -4970
  146. package/documentation/platform/COMPANYPROFILE.md +0 -1646
  147. package/documentation/platform/CONFIGURATION.md +0 -6316
  148. package/documentation/platform/CONTENT.md +0 -8364
  149. package/documentation/platform/DISCOUNT.md +0 -767
  150. package/documentation/platform/FILESTORAGE.md +0 -945
  151. package/documentation/platform/INVENTORY.md +0 -1136
  152. package/documentation/platform/LEAD.md +0 -4394
  153. package/documentation/platform/ORDER.md +0 -6525
  154. package/documentation/platform/PARTNER.md +0 -193
  155. package/documentation/platform/PAYMENT.md +0 -3138
  156. package/documentation/platform/README.md +0 -27
  157. package/documentation/platform/REWARDS.md +0 -919
  158. package/documentation/platform/SHARE.md +0 -513
  159. package/documentation/platform/THEME.md +0 -35446
  160. package/documentation/platform/USER.md +0 -2174
  161. package/documentation/platform/WEBHOOK.md +0 -485
  162. package/documentation/public/CONFIGURATION.md +0 -325
  163. package/documentation/public/INVENTORY.md +0 -508
  164. package/documentation/public/WEBHOOK.md +0 -246
  165. package/jest.config.d.ts +0 -4
  166. package/jest.config.js +0 -6
  167. package/tests/application/catalog.spec.js +0 -54
  168. package/tests/common/action-url.spec.js +0 -35
  169. package/tests/common/schema/action-url.json +0 -178
  170. package/tests/common/schema/url-action.json +0 -683
  171. package/tests/common/url-action.spec.js +0 -48
  172. package/tests/helpers/cookie.helper.js +0 -31
  173. package/tests/helpers/oauth.helper.js +0 -43
  174. package/tests/platform/catalog.spec.js +0 -49
  175. package/tests/public/location.spec.js +0 -39
package/README.md CHANGED
@@ -103,6 +103,33 @@ async function getData() {
103
103
 
104
104
  getData();
105
105
  ```
106
+ ---
107
+ ### Cookie
108
+
109
+ Following code snippet will read and write cookies on behalf of you <br />
110
+ Cookies will get appended in subsequent requests.
111
+
112
+ ```javascript
113
+ const { FdkAxios } = require('@gofynd/fdk-client-javascript');
114
+ const { wrapper } = require("axios-cookiejar-support");
115
+ const { CookieJar } = require("tough-cookie");
116
+
117
+
118
+ wrapper(FdkAxios);
119
+ const cookieJar = new CookieJar();
120
+ FdkAxios.defaults.jar = cookieJar;
121
+
122
+
123
+ module.exports = cookieJar
124
+ ```
125
+
126
+ get the stored cookie from the CookieJar instance
127
+ ```javascript
128
+ const cookieJar = require('path/to/cookieJar') // replace with actual path
129
+
130
+ let cookies = await cookieJar.getCookies("https://api.fynd.com");
131
+ ```
132
+ ---
106
133
 
107
134
  ### Log Curl
108
135
  To print the curl command in the console for all network calls made using `applicationClient` or `platformClient`, set the logger level to debug.
@@ -127,7 +154,7 @@ The above code will log the curl command in the console
127
154
  curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 0.1.36' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
128
155
  Active Theme: Emerge
129
156
  ```
130
-
157
+ ---
131
158
  ### TypeScript
132
159
 
133
160
  fdk-client-javascript includes Typescript definitions.
@@ -135,8 +162,10 @@ fdk-client-javascript includes Typescript definitions.
135
162
  ```typescript
136
163
  import { ApplicationConfig, ApplicationClient } from "fdk-client-javascript";
137
164
  ```
138
-
165
+ ---
139
166
  ### Documentation
140
167
 
168
+ - [Public Front](documentation/public/README.md)
141
169
  - [Application Front](documentation/application/README.md)
142
170
  - [Platform Front](documentation/platform/README.md)
171
+
package/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
+ import { PublicConfig } from "./sdk/public";
2
+ import { PublicClient } from "./sdk/public";
3
+ import { PublicModel } from "./sdk/public";
1
4
  import { ApplicationConfig } from "./sdk/application";
2
5
  import { ApplicationClient } from "./sdk/application";
3
6
  import { ApplicationModel } from "./sdk/application";
4
7
  import { PlatformConfig } from "./sdk/platform";
5
8
  import { PlatformClient } from "./sdk/platform";
6
9
  import { PlatformModel } from "./sdk/platform";
7
- import { PublicConfig } from "./sdk/public";
8
- import { PublicClient } from "./sdk/public";
9
- import { PublicModel } from "./sdk/public";
10
10
  import { fdkAxios } from "./sdk/common/AxiosHelper";
11
11
  import Utility = require("./sdk/common/Utility");
12
12
  import Constant = require("./sdk/common/Constant");
13
- export { ApplicationConfig, ApplicationClient, ApplicationModel, PlatformConfig, PlatformClient, PlatformModel, PublicConfig, PublicClient, PublicModel, fdkAxios as FdkAxios, Utility, Constant };
13
+ export { PublicConfig, PublicClient, PublicModel, ApplicationConfig, ApplicationClient, ApplicationModel, PlatformConfig, PlatformClient, PlatformModel, fdkAxios as FdkAxios, Utility, Constant };
package/index.js CHANGED
@@ -1,25 +1,24 @@
1
- const {ApplicationConfig, ApplicationClient, ApplicationModel } = require('./sdk/application');
2
- const {PlatformConfig, PlatformClient, PlatformModel } = require('./sdk/platform');
3
- const {PublicConfig, PublicClient, PublicModel } = require('./sdk/public');
4
-
5
-
6
1
 
2
+ const { PublicConfig, PublicClient, PublicModel } = require('./sdk/public');
3
+ const { ApplicationConfig, ApplicationClient, ApplicationModel } = require('./sdk/application');
4
+ const { PlatformConfig, PlatformClient, PlatformModel } = require('./sdk/platform');
7
5
  const {fdkAxios} = require('./sdk/common/AxiosHelper');
8
6
  const Utility = require('./sdk/common/Utility');
9
7
  const Constant = require('./sdk/common/Constant');
10
8
 
11
9
  module.exports = {
10
+
11
+ PublicConfig,
12
+ PublicClient,
13
+ PublicModel,
14
+
12
15
  ApplicationConfig,
13
16
  ApplicationClient,
14
17
  ApplicationModel,
18
+
15
19
  PlatformConfig,
16
20
  PlatformClient,
17
21
  PlatformModel,
18
- PublicConfig,
19
- PublicClient,
20
- PublicModel,
21
-
22
-
23
22
 
24
23
  FdkAxios: fdkAxios,
25
24
  Utility,
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "1.0.3",
3
+ "version": "v1.0.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "jest --coverage",
8
8
  "prettier": "npx prettier -w ./sdk ./tests && npx tsc"
9
9
  },
10
- "jest": {
11
- "coverageThreshold": {
12
- "global": {
13
- "branches": 0,
14
- "functions": 0,
15
- "lines": 0
16
- }
17
- }
18
- },
19
10
  "author": "Jigar Dafda<jigar.dafda@gmail.com>",
20
11
  "license": "ISC",
21
12
  "dependencies": {
22
13
  "axios": "^0.27.2",
14
+ "camelcase": "^6.3.0",
23
15
  "crypto-js": "^4.1.1",
24
16
  "joi": "^17.7.0",
25
- "query-string": "^6.14.1",
26
17
  "loglevel": "^1.8.1",
27
- "camelcase": "^6.3.0"
18
+ "query-string": "^6.14.1"
28
19
  },
29
20
  "devDependencies": {
21
+ "axios-cookiejar-support": "^4.0.6",
30
22
  "axios-mock-adapter": "^1.21.2",
31
23
  "coveralls": "^3.1.1",
32
24
  "dotenv": "^16.0.3",
33
- "jest": "^26.6.3"
34
- }
25
+ "jest": "^29.5.0",
26
+ "tough-cookie": "^4.1.2"
27
+ },
28
+ "files": [
29
+ "sdk/**/*.js",
30
+ "sdk/**/*.d.ts",
31
+ "./*.js",
32
+ "./*.d.ts",
33
+ "!jest.config.*"
34
+ ]
35
35
  }
@@ -0,0 +1,11 @@
1
+ export = APIClient;
2
+ declare class APIClient {
3
+ /**
4
+ * @param {object} conf
5
+ * @param {string} method
6
+ * @param {string} url
7
+ * @param {object} query
8
+ * @param {object} body
9
+ */
10
+ static execute(conf: object, method: string, url: string, query: object, body: object, xHeaders: any): any;
11
+ }
@@ -0,0 +1,35 @@
1
+ const { fdkAxios } = require("../common/AxiosHelper");
2
+
3
+ class APIClient {
4
+ /**
5
+ * @param {object} conf
6
+ * @param {string} method
7
+ * @param {string} url
8
+ * @param {object} query
9
+ * @param {object} body
10
+ */
11
+
12
+ static execute(conf, method, url, query, body, xHeaders) {
13
+ let headers = {};
14
+
15
+ const extraHeaders = conf.extraHeaders.reduce((acc, curr) => {
16
+ acc = { ...acc, ...curr };
17
+ return acc;
18
+ }, {});
19
+
20
+ const rawRequest = {
21
+ method: method,
22
+ url: url,
23
+ params: query,
24
+ data: body,
25
+ headers: {
26
+ ...headers,
27
+ ...extraHeaders,
28
+ ...xHeaders,
29
+ },
30
+ };
31
+ return fdkAxios.request(rawRequest);
32
+ }
33
+ }
34
+
35
+ module.exports = APIClient;
@@ -0,0 +1,6 @@
1
+ export = Client;
2
+ declare class Client {
3
+ constructor(config: any);
4
+ config: any;
5
+ setExtraHeaders(header: any): void;
6
+ }
package/sdk/Client.js ADDED
@@ -0,0 +1,17 @@
1
+ const { FDKClientValidationError } = require("../common/FDKError");
2
+
3
+ class Client {
4
+ constructor(config) {
5
+ this.config = config;
6
+ }
7
+
8
+ setExtraHeaders(header) {
9
+ if (typeof header === "object") {
10
+ this.config.extraHeaders.push(header);
11
+ } else {
12
+ throw new FDKClientValidationError("Context value should be an object");
13
+ }
14
+ }
15
+ }
16
+
17
+ module.exports = Client;
@@ -0,0 +1,9 @@
1
+ export = Config;
2
+ declare class Config {
3
+ /** @param {object} _conf */
4
+ constructor(_conf: object);
5
+ domain: any;
6
+ extraHeaders: any[];
7
+ logLevel: any;
8
+ setLogLevel(level: any): void;
9
+ }
package/sdk/Config.js ADDED
@@ -0,0 +1,17 @@
1
+ const { Logger, setLoggerLevel } = require("../common/Logger");
2
+
3
+ class Config {
4
+ /** @param {object} _conf */
5
+ constructor(_conf) {
6
+ this.domain = _conf.domain || "https://api.fynd.com";
7
+ this.extraHeaders = [];
8
+ this.logLevel = _conf.logLevel || "ERROR";
9
+ this.setLogLevel(this.logLevel);
10
+ }
11
+
12
+ setLogLevel(level) {
13
+ setLoggerLevel(level);
14
+ }
15
+ }
16
+
17
+ module.exports = Config;
@@ -1,10 +1,11 @@
1
- const APIClient = require("../ApplicationAPIClient");
1
+ const ApplicationAPIClient = require("../ApplicationAPIClient");
2
+ const { FDKClientValidationError } = require("../../common/FDKError");
2
3
  const constructUrl = require("../constructUrl");
3
4
  const Paginator = require("../../common/Paginator");
4
- const { FDKClientValidationError } = require("../../common/FDKError");
5
5
  const CartValidator = require("./CartApplicationValidator");
6
6
  const CartModel = require("./CartApplicationModel");
7
7
  const { Logger } = require("./../../common/Logger");
8
+ const Joi = require("joi");
8
9
 
9
10
  class Cart {
10
11
  constructor(_conf) {
@@ -88,7 +89,7 @@ class Cart {
88
89
 
89
90
  const xHeaders = {};
90
91
 
91
- const response = await APIClient.execute(
92
+ const response = await ApplicationAPIClient.execute(
92
93
  this._conf,
93
94
  "post",
94
95
  constructUrl({
@@ -159,7 +160,7 @@ class Cart {
159
160
 
160
161
  const xHeaders = {};
161
162
 
162
- const response = await APIClient.execute(
163
+ const response = await ApplicationAPIClient.execute(
163
164
  this._conf,
164
165
  "post",
165
166
  constructUrl({
@@ -232,7 +233,7 @@ class Cart {
232
233
 
233
234
  const xHeaders = {};
234
235
 
235
- const response = await APIClient.execute(
236
+ const response = await ApplicationAPIClient.execute(
236
237
  this._conf,
237
238
  "post",
238
239
  constructUrl({
@@ -303,7 +304,7 @@ class Cart {
303
304
 
304
305
  const xHeaders = {};
305
306
 
306
- const response = await APIClient.execute(
307
+ const response = await ApplicationAPIClient.execute(
307
308
  this._conf,
308
309
  "post",
309
310
  constructUrl({
@@ -368,7 +369,7 @@ class Cart {
368
369
 
369
370
  const xHeaders = {};
370
371
 
371
- const response = await APIClient.execute(
372
+ const response = await ApplicationAPIClient.execute(
372
373
  this._conf,
373
374
  "post",
374
375
  constructUrl({
@@ -451,7 +452,7 @@ class Cart {
451
452
 
452
453
  const xHeaders = {};
453
454
 
454
- const response = await APIClient.execute(
455
+ const response = await ApplicationAPIClient.execute(
455
456
  this._conf,
456
457
  "get",
457
458
  constructUrl({
@@ -530,7 +531,7 @@ class Cart {
530
531
 
531
532
  const xHeaders = {};
532
533
 
533
- const response = await APIClient.execute(
534
+ const response = await ApplicationAPIClient.execute(
534
535
  this._conf,
535
536
  "get",
536
537
  constructUrl({
@@ -602,7 +603,7 @@ class Cart {
602
603
 
603
604
  const xHeaders = {};
604
605
 
605
- const response = await APIClient.execute(
606
+ const response = await ApplicationAPIClient.execute(
606
607
  this._conf,
607
608
  "get",
608
609
  constructUrl({
@@ -676,7 +677,7 @@ class Cart {
676
677
 
677
678
  const xHeaders = {};
678
679
 
679
- const response = await APIClient.execute(
680
+ const response = await ApplicationAPIClient.execute(
680
681
  this._conf,
681
682
  "get",
682
683
  constructUrl({
@@ -740,7 +741,7 @@ class Cart {
740
741
 
741
742
  const xHeaders = {};
742
743
 
743
- const response = await APIClient.execute(
744
+ const response = await ApplicationAPIClient.execute(
744
745
  this._conf,
745
746
  "head",
746
747
  constructUrl({
@@ -800,7 +801,7 @@ class Cart {
800
801
 
801
802
  const xHeaders = {};
802
803
 
803
- const response = await APIClient.execute(
804
+ const response = await ApplicationAPIClient.execute(
804
805
  this._conf,
805
806
  "post",
806
807
  constructUrl({
@@ -863,7 +864,7 @@ class Cart {
863
864
 
864
865
  const xHeaders = {};
865
866
 
866
- const response = await APIClient.execute(
867
+ const response = await ApplicationAPIClient.execute(
867
868
  this._conf,
868
869
  "get",
869
870
  constructUrl({
@@ -929,7 +930,7 @@ class Cart {
929
930
 
930
931
  const xHeaders = {};
931
932
 
932
- const response = await APIClient.execute(
933
+ const response = await ApplicationAPIClient.execute(
933
934
  this._conf,
934
935
  "get",
935
936
  constructUrl({
@@ -995,7 +996,7 @@ class Cart {
995
996
 
996
997
  const xHeaders = {};
997
998
 
998
- const response = await APIClient.execute(
999
+ const response = await ApplicationAPIClient.execute(
999
1000
  this._conf,
1000
1001
  "get",
1001
1002
  constructUrl({
@@ -1069,7 +1070,7 @@ class Cart {
1069
1070
 
1070
1071
  const xHeaders = {};
1071
1072
 
1072
- const response = await APIClient.execute(
1073
+ const response = await ApplicationAPIClient.execute(
1073
1074
  this._conf,
1074
1075
  "get",
1075
1076
  constructUrl({
@@ -1139,7 +1140,7 @@ class Cart {
1139
1140
 
1140
1141
  const xHeaders = {};
1141
1142
 
1142
- const response = await APIClient.execute(
1143
+ const response = await ApplicationAPIClient.execute(
1143
1144
  this._conf,
1144
1145
  "get",
1145
1146
  constructUrl({
@@ -1213,7 +1214,7 @@ class Cart {
1213
1214
 
1214
1215
  const xHeaders = {};
1215
1216
 
1216
- const response = await APIClient.execute(
1217
+ const response = await ApplicationAPIClient.execute(
1217
1218
  this._conf,
1218
1219
  "get",
1219
1220
  constructUrl({
@@ -1276,7 +1277,7 @@ class Cart {
1276
1277
 
1277
1278
  const xHeaders = {};
1278
1279
 
1279
- const response = await APIClient.execute(
1280
+ const response = await ApplicationAPIClient.execute(
1280
1281
  this._conf,
1281
1282
  "delete",
1282
1283
  constructUrl({
@@ -1342,7 +1343,7 @@ class Cart {
1342
1343
 
1343
1344
  const xHeaders = {};
1344
1345
 
1345
- const response = await APIClient.execute(
1346
+ const response = await ApplicationAPIClient.execute(
1346
1347
  this._conf,
1347
1348
  "delete",
1348
1349
  constructUrl({
@@ -1413,7 +1414,7 @@ class Cart {
1413
1414
 
1414
1415
  const xHeaders = {};
1415
1416
 
1416
- const response = await APIClient.execute(
1417
+ const response = await ApplicationAPIClient.execute(
1417
1418
  this._conf,
1418
1419
  "post",
1419
1420
  constructUrl({
@@ -1480,7 +1481,7 @@ class Cart {
1480
1481
 
1481
1482
  const xHeaders = {};
1482
1483
 
1483
- const response = await APIClient.execute(
1484
+ const response = await ApplicationAPIClient.execute(
1484
1485
  this._conf,
1485
1486
  "put",
1486
1487
  constructUrl({
@@ -1544,7 +1545,7 @@ class Cart {
1544
1545
 
1545
1546
  const xHeaders = {};
1546
1547
 
1547
- const response = await APIClient.execute(
1548
+ const response = await ApplicationAPIClient.execute(
1548
1549
  this._conf,
1549
1550
  "put",
1550
1551
  constructUrl({
@@ -1617,7 +1618,7 @@ class Cart {
1617
1618
 
1618
1619
  const xHeaders = {};
1619
1620
 
1620
- const response = await APIClient.execute(
1621
+ const response = await ApplicationAPIClient.execute(
1621
1622
  this._conf,
1622
1623
  "put",
1623
1624
  constructUrl({
@@ -1684,7 +1685,7 @@ class Cart {
1684
1685
 
1685
1686
  const xHeaders = {};
1686
1687
 
1687
- const response = await APIClient.execute(
1688
+ const response = await ApplicationAPIClient.execute(
1688
1689
  this._conf,
1689
1690
  "put",
1690
1691
  constructUrl({
@@ -1749,7 +1750,7 @@ class Cart {
1749
1750
 
1750
1751
  const xHeaders = {};
1751
1752
 
1752
- const response = await APIClient.execute(
1753
+ const response = await ApplicationAPIClient.execute(
1753
1754
  this._conf,
1754
1755
  "post",
1755
1756
  constructUrl({
@@ -1851,7 +1852,7 @@ class Cart {
1851
1852
 
1852
1853
  const xHeaders = {};
1853
1854
 
1854
- const response = await APIClient.execute(
1855
+ const response = await ApplicationAPIClient.execute(
1855
1856
  this._conf,
1856
1857
  "get",
1857
1858
  constructUrl({
@@ -28,7 +28,9 @@ class CartModel {
28
28
  extra_meta: Joi.any(),
29
29
  item_id: Joi.number(),
30
30
  item_size: Joi.string().allow(""),
31
- parent_item_identifiers: Joi.any(),
31
+ parent_item_identifiers: Joi.array().items(
32
+ Joi.object().pattern(/\S/, Joi.string().allow(""))
33
+ ),
32
34
  pos: Joi.boolean(),
33
35
  product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)),
34
36
  quantity: Joi.number(),