@ikas/storefront-api 4.0.0-alpha.19 → 4.0.0-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront-api",
3
- "version": "4.0.0-alpha.19",
3
+ "version": "4.0.0-alpha.2",
4
4
  "author": "Umut Ozan Yıldırım",
5
5
  "license": "ISC",
6
6
  "description": "API functions that returns models from the ikas-storefront-models package.",
@@ -16,13 +16,12 @@
16
16
  "generate": "api-generator --generate --url=https://api.myikas.dev/api/sf/graphql --modelPath=./models.json --generatePath=./src/__api && prettier --write ./src/__api"
17
17
  },
18
18
  "dependencies": {
19
- "@ikas/fe-api-client": "^1.0.16",
20
- "ts-essentials": "^7.0.1"
19
+ "@ikas/fe-api-client": "^1.0.13"
21
20
  },
22
21
  "devDependencies": {
23
22
  "@rollup/plugin-commonjs": "^22.0.0",
24
- "@ikas/storefront-config": "^4.0.0-alpha.19",
25
- "@ikas/storefront-models": "^4.0.0-alpha.19",
23
+ "@ikas/storefront-config": "^4.0.0-alpha.2",
24
+ "@ikas/storefront-models": "^4.0.0-alpha.2",
26
25
  "@rollup/plugin-node-resolve": "^13.3.0",
27
26
  "prettier": "^2.2.1",
28
27
  "rollup": "^2.75.6",
@@ -32,11 +31,12 @@
32
31
  "typescript": "^4.7.2",
33
32
  "ttypescript": "^1.5.12",
34
33
  "typescript-transform-paths": "^2.2.2",
34
+ "ts-essentials": "^7.0.1",
35
35
  "axios": "^0.26.0"
36
36
  },
37
37
  "peerDependencies": {
38
- "@ikas/storefront-config": "^4.0.0-alpha.19",
39
- "@ikas/storefront-models": "^4.0.0-alpha.19",
38
+ "@ikas/storefront-config": "^4.0.0-alpha.2",
39
+ "@ikas/storefront-models": "^4.0.0-alpha.2",
40
40
  "axios": "^0.26.0"
41
41
  }
42
42
  }
@@ -31,7 +31,6 @@ import {
31
31
  IkasFavoriteProduct,
32
32
  IkasLastViewedProduct,
33
33
  IkasOrder,
34
- IkasOrderLineItem,
35
34
  IkasOrderRefundSettings,
36
35
  IkasOrderTransaction,
37
36
  initIkasCustomerAttribute,
@@ -193,14 +192,6 @@ export async function getOrders(params: GetCustomerOrdersQueryParams) {
193
192
  const response = await _getCustomerOrders(params);
194
193
  const data: IkasOrder[] | undefined = response.data as any;
195
194
 
196
- data?.forEach((order) => {
197
- if (order.orderLineItems?.length) {
198
- order.orderLineItems = order.orderLineItems.filter(
199
- (orderLineItem: IkasOrderLineItem) => !orderLineItem.deleted
200
- );
201
- }
202
- });
203
-
204
195
  return new APIResponse(data, response.graphQLErrors);
205
196
  }
206
197
 
@@ -1,12 +1,12 @@
1
- import { QueryParams as GetMasterPassRequestTokenQueryParams } from "../../__api/queries/getMasterPassRequestToken";
1
+ import { QueryParams as GetMasterpassRequestTokenQueryParams } from "../../__api/queries/getMasterpassRequestToken";
2
2
 
3
- export type { GetMasterPassRequestTokenQueryParams };
3
+ export type { GetMasterpassRequestTokenQueryParams };
4
4
 
5
- export async function getMasterPassRequestToken(
6
- data: GetMasterPassRequestTokenQueryParams
5
+ export async function getMasterpassRequestToken(
6
+ data: GetMasterpassRequestTokenQueryParams
7
7
  ) {
8
- const _getMasterPassRequestToken = (
9
- await import("../../__api/queries/getMasterPassRequestToken")
8
+ const _getMasterpassRequestToken = (
9
+ await import("../../__api/queries/getMasterpassRequestToken")
10
10
  ).default;
11
- return await _getMasterPassRequestToken(data);
11
+ return await _getMasterpassRequestToken(data);
12
12
  }
@@ -266,7 +266,6 @@ function simpleToProduct(simple: SearchProduct): IkasProduct {
266
266
  shortDescription: simple.shortDescription || "",
267
267
  productOptionSetId: simple.productOptionSetId,
268
268
  variantTypes: simple.productVariantTypes.map((pvt) => ({
269
- order: pvt.order,
270
269
  variantType: {
271
270
  id: pvt.variantType.id,
272
271
  name: pvt.variantType.name,
package/src/index.ts CHANGED
@@ -7,8 +7,6 @@ const onConfigChange = () => {
7
7
  "x-api-key": IkasStorefrontConfig.getApiKey() || "",
8
8
  "x-sfid": IkasStorefrontConfig.getStorefrontId() || "",
9
9
  "x-sfrid": IkasStorefrontConfig.getStorefrontRoutingId() || "",
10
- "x-sid": IkasStorefrontConfig.getSessionId() || "",
11
- "x-vid": IkasStorefrontConfig.getVisitorId() || "",
12
10
  };
13
11
 
14
12
  if (IkasStorefrontConfig.getCustomerToken()) {
@@ -50,19 +48,5 @@ export * from "./api/storefront";
50
48
  export { SaveMyCustomerInput } from "./__api/models/SaveMyCustomerInput";
51
49
  export { SaveCartInput } from "./__api/models/SaveCartInput";
52
50
  export { CheckStocksLineInput } from "./__api/models/CheckStocksLineInput";
53
- export {
54
- SortByDirectionEnum,
55
- SortByTypeEnum,
56
- MasterPassOperationTypeEnum,
57
- } from "./__api/types";
58
- export type {
59
- SearchInputOrderByInput,
60
- CreateStripePaymentIntentResponse,
61
- RetrieveInstallmentInfoResponse,
62
- TransactionResponse,
63
- UpdateCartCampaignOfferInput,
64
- CartLineOptionInput,
65
- } from "./__api/types";
66
-
67
51
  export { APIResponse } from "@ikas/fe-api-client";
68
52
  export { Config as IkasAPIClientConfig };