@ikas/storefront-api 4.5.1-beta.17 → 4.5.1-beta.19

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.
@@ -0,0 +1,13 @@
1
+ import { DeepReadonly } from "ts-essentials";
2
+ import { StorefrontShippingZoneStateData } from "./StorefrontShippingZoneState";
3
+ export declare class StorefrontShippingZoneData {
4
+ countryId: string;
5
+ postalCodes: string[] | null;
6
+ showAllStates: boolean;
7
+ states: StorefrontShippingZoneStateData[] | null;
8
+ constructor(data?: Partial<StorefrontShippingZoneData>);
9
+ }
10
+ export declare class StorefrontShippingZone extends StorefrontShippingZoneData {
11
+ }
12
+ export declare type PartialStorefrontShippingZone = Partial<StorefrontShippingZone>;
13
+ export declare type ReadOnlyStorefrontShippingZone = DeepReadonly<StorefrontShippingZone>;
@@ -0,0 +1,12 @@
1
+ import { DeepReadonly } from "ts-essentials";
2
+ import { StorefrontShippingZoneDistrictData } from "./StorefrontShippingZoneDistrict";
3
+ export declare class StorefrontShippingZoneCityData {
4
+ districts: StorefrontShippingZoneDistrictData[] | null;
5
+ id: string;
6
+ showAllDistricts: boolean;
7
+ constructor(data?: Partial<StorefrontShippingZoneCityData>);
8
+ }
9
+ export declare class StorefrontShippingZoneCity extends StorefrontShippingZoneCityData {
10
+ }
11
+ export declare type PartialStorefrontShippingZoneCity = Partial<StorefrontShippingZoneCity>;
12
+ export declare type ReadOnlyStorefrontShippingZoneCity = DeepReadonly<StorefrontShippingZoneCity>;
@@ -0,0 +1,11 @@
1
+ import { DeepReadonly } from "ts-essentials";
2
+ import { StorefrontShippingZoneRegionData } from "./StorefrontShippingZoneRegion";
3
+ export declare class StorefrontShippingZoneDistrictData {
4
+ id: string;
5
+ regions: StorefrontShippingZoneRegionData[];
6
+ constructor(data?: Partial<StorefrontShippingZoneDistrictData>);
7
+ }
8
+ export declare class StorefrontShippingZoneDistrict extends StorefrontShippingZoneDistrictData {
9
+ }
10
+ export declare type PartialStorefrontShippingZoneDistrict = Partial<StorefrontShippingZoneDistrict>;
11
+ export declare type ReadOnlyStorefrontShippingZoneDistrict = DeepReadonly<StorefrontShippingZoneDistrict>;
@@ -0,0 +1,10 @@
1
+ import { DeepReadonly } from "ts-essentials";
2
+ import BaseModelData from "./_base";
3
+ export declare class StorefrontShippingZoneRegionData extends BaseModelData {
4
+ name: string;
5
+ constructor(data?: Partial<StorefrontShippingZoneRegionData>);
6
+ }
7
+ export declare class StorefrontShippingZoneRegion extends StorefrontShippingZoneRegionData {
8
+ }
9
+ export declare type PartialStorefrontShippingZoneRegion = Partial<StorefrontShippingZoneRegion>;
10
+ export declare type ReadOnlyStorefrontShippingZoneRegion = DeepReadonly<StorefrontShippingZoneRegion>;
@@ -0,0 +1,13 @@
1
+ import { DeepReadonly } from "ts-essentials";
2
+ import { StorefrontShippingZoneCityData } from "./StorefrontShippingZoneCity";
3
+ export declare class StorefrontShippingZoneStateData {
4
+ cities: StorefrontShippingZoneCityData[] | null;
5
+ id: string;
6
+ postalCodes: string[] | null;
7
+ showAllCities: boolean;
8
+ constructor(data?: Partial<StorefrontShippingZoneStateData>);
9
+ }
10
+ export declare class StorefrontShippingZoneState extends StorefrontShippingZoneStateData {
11
+ }
12
+ export declare type PartialStorefrontShippingZoneState = Partial<StorefrontShippingZoneState>;
13
+ export declare type ReadOnlyStorefrontShippingZoneState = DeepReadonly<StorefrontShippingZoneState>;
@@ -1,6 +1,6 @@
1
1
  import { ConfigType, APIResponse } from "@ikas/fe-api-client";
2
- import { ShippingZone } from "../types";
3
- declare const getAvailableShippingZones: (variables: QueryParams, fields?: string[], config?: ConfigType) => Promise<APIResponse<ShippingZone[]> | APIResponse<undefined>>;
2
+ import { StorefrontShippingZone } from "../types";
3
+ declare const getAvailableShippingZones: (variables: QueryParams, fields?: string[], config?: ConfigType) => Promise<APIResponse<StorefrontShippingZone[]> | APIResponse<undefined>>;
4
4
  export default getAvailableShippingZones;
5
5
  export declare type QueryParams = {
6
6
  salesChannelId?: string | null;
@@ -8,6 +8,7 @@ export declare type QueryParams = {
8
8
  export declare enum ResponseField {
9
9
  COUNTRY_ID = "countryId",
10
10
  POSTAL_CODES = "postalCodes",
11
+ SHOW_ALL_STATES = "showAllStates",
11
12
  STATES__CITIES__DISTRICTS__ID = "states.cities.districts.id",
12
13
  STATES__CITIES__DISTRICTS__REGIONS__CREATED_AT = "states.cities.districts.regions.createdAt",
13
14
  STATES__CITIES__DISTRICTS__REGIONS__DELETED = "states.cities.districts.regions.deleted",
@@ -15,6 +16,8 @@ export declare enum ResponseField {
15
16
  STATES__CITIES__DISTRICTS__REGIONS__NAME = "states.cities.districts.regions.name",
16
17
  STATES__CITIES__DISTRICTS__REGIONS__UPDATED_AT = "states.cities.districts.regions.updatedAt",
17
18
  STATES__CITIES__ID = "states.cities.id",
19
+ STATES__CITIES__SHOW_ALL_DISTRICTS = "states.cities.showAllDistricts",
18
20
  STATES__ID = "states.id",
19
- STATES__POSTAL_CODES = "states.postalCodes"
21
+ STATES__POSTAL_CODES = "states.postalCodes",
22
+ STATES__SHOW_ALL_CITIES = "states.showAllCities"
20
23
  }
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as s,APIResponse as i,fetchQuery as n}from"@ikas/fe-api-client";var _,a=function(_,a,r){return t(void 0,void 0,void 0,(function(){var t,T,d,o;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,n({operationName:"getAvailableShippingZones",config:r,variables:_,allReturnFields:S,fields:a,query:function(t){return"\n\t\t\t\tquery getAvailableShippingZones (\n\t\t\t\t\t$salesChannelId: String,\n\t\t\t\t) {\n\t\t\t\t\tgetAvailableShippingZones (\n\t\t\t\t\t\tsalesChannelId: $salesChannelId,\n\t\t\t\t\t) ".concat(t,"\n\t\t\t\t}\n\t\t\t")}})];case 1:return t=e.sent(),T=t.data,d=t.errors,[2,new i(null==T?void 0:T.getAvailableShippingZones,d)];case 2:return o=e.sent(),[2,s(o)];case 3:return[2]}}))}))},S="{countryId postalCodes states {cities {districts {id regions {createdAt deleted id name updatedAt } } id } id postalCodes } }";!function(t){t.COUNTRY_ID="countryId",t.POSTAL_CODES="postalCodes",t.STATES__CITIES__DISTRICTS__ID="states.cities.districts.id",t.STATES__CITIES__DISTRICTS__REGIONS__CREATED_AT="states.cities.districts.regions.createdAt",t.STATES__CITIES__DISTRICTS__REGIONS__DELETED="states.cities.districts.regions.deleted",t.STATES__CITIES__DISTRICTS__REGIONS__ID="states.cities.districts.regions.id",t.STATES__CITIES__DISTRICTS__REGIONS__NAME="states.cities.districts.regions.name",t.STATES__CITIES__DISTRICTS__REGIONS__UPDATED_AT="states.cities.districts.regions.updatedAt",t.STATES__CITIES__ID="states.cities.id",t.STATES__ID="states.id",t.STATES__POSTAL_CODES="states.postalCodes"}(_||(_={}));export{_ as ResponseField,a as default};
1
+ import{__awaiter as t,__generator as s}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as e,APIResponse as i,fetchQuery as _}from"@ikas/fe-api-client";var S,n=function(S,n,T){return t(void 0,void 0,void 0,(function(){var t,r,o,I;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,_({operationName:"getAvailableShippingZones",config:T,variables:S,allReturnFields:a,fields:n,query:function(t){return"\n\t\t\t\tquery getAvailableShippingZones (\n\t\t\t\t\t$salesChannelId: String,\n\t\t\t\t) {\n\t\t\t\t\tgetAvailableShippingZones (\n\t\t\t\t\t\tsalesChannelId: $salesChannelId,\n\t\t\t\t\t) ".concat(t,"\n\t\t\t\t}\n\t\t\t")}})];case 1:return t=s.sent(),r=t.data,o=t.errors,[2,new i(null==r?void 0:r.getAvailableShippingZones,o)];case 2:return I=s.sent(),[2,e(I)];case 3:return[2]}}))}))},a="{countryId postalCodes showAllStates states {cities {districts {id regions {createdAt deleted id name updatedAt } } id showAllDistricts } id postalCodes showAllCities } }";!function(t){t.COUNTRY_ID="countryId",t.POSTAL_CODES="postalCodes",t.SHOW_ALL_STATES="showAllStates",t.STATES__CITIES__DISTRICTS__ID="states.cities.districts.id",t.STATES__CITIES__DISTRICTS__REGIONS__CREATED_AT="states.cities.districts.regions.createdAt",t.STATES__CITIES__DISTRICTS__REGIONS__DELETED="states.cities.districts.regions.deleted",t.STATES__CITIES__DISTRICTS__REGIONS__ID="states.cities.districts.regions.id",t.STATES__CITIES__DISTRICTS__REGIONS__NAME="states.cities.districts.regions.name",t.STATES__CITIES__DISTRICTS__REGIONS__UPDATED_AT="states.cities.districts.regions.updatedAt",t.STATES__CITIES__ID="states.cities.id",t.STATES__CITIES__SHOW_ALL_DISTRICTS="states.cities.showAllDistricts",t.STATES__ID="states.id",t.STATES__POSTAL_CODES="states.postalCodes",t.STATES__SHOW_ALL_CITIES="states.showAllCities"}(S||(S={}));export{S as ResponseField,n as default};
@@ -2330,31 +2330,6 @@ export interface SearchVariationValueRelation {
2330
2330
  variantTypeId: string;
2331
2331
  variantValueId: string;
2332
2332
  }
2333
- export interface ShippingZone {
2334
- countryId: string;
2335
- postalCodes: string[] | null;
2336
- states: ShippingZoneState[] | null;
2337
- }
2338
- export interface ShippingZoneCity {
2339
- districts: ShippingZoneDistrict[] | null;
2340
- id: string;
2341
- }
2342
- export interface ShippingZoneDistrict {
2343
- id: string;
2344
- regions: ShippingZoneRegion[];
2345
- }
2346
- export interface ShippingZoneRegion {
2347
- createdAt: any | null;
2348
- deleted: boolean | null;
2349
- id: string;
2350
- name: string;
2351
- updatedAt: any | null;
2352
- }
2353
- export interface ShippingZoneState {
2354
- cities: ShippingZoneCity[] | null;
2355
- id: string;
2356
- postalCodes: string[] | null;
2357
- }
2358
2333
  export interface SocialLoginSettings {
2359
2334
  apiKey: string | null;
2360
2335
  apiSecret: string | null;
@@ -2588,6 +2563,34 @@ export interface StorefrontRouting {
2588
2563
  priceListId: string | null;
2589
2564
  updatedAt: any | null;
2590
2565
  }
2566
+ export interface StorefrontShippingZone {
2567
+ countryId: string;
2568
+ postalCodes: string[] | null;
2569
+ showAllStates: boolean;
2570
+ states: StorefrontShippingZoneState[] | null;
2571
+ }
2572
+ export interface StorefrontShippingZoneCity {
2573
+ districts: StorefrontShippingZoneDistrict[] | null;
2574
+ id: string;
2575
+ showAllDistricts: boolean;
2576
+ }
2577
+ export interface StorefrontShippingZoneDistrict {
2578
+ id: string;
2579
+ regions: StorefrontShippingZoneRegion[];
2580
+ }
2581
+ export interface StorefrontShippingZoneRegion {
2582
+ createdAt: any | null;
2583
+ deleted: boolean | null;
2584
+ id: string;
2585
+ name: string;
2586
+ updatedAt: any | null;
2587
+ }
2588
+ export interface StorefrontShippingZoneState {
2589
+ cities: StorefrontShippingZoneCity[] | null;
2590
+ id: string;
2591
+ postalCodes: string[] | null;
2592
+ showAllCities: boolean;
2593
+ }
2591
2594
  export interface StorefrontTheme {
2592
2595
  createdAt: any | null;
2593
2596
  deleted: boolean | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront-api",
3
- "version": "4.5.1-beta.17",
3
+ "version": "4.5.1-beta.19",
4
4
  "author": "ikas",
5
5
  "license": "ISC",
6
6
  "description": "API functions that returns models from the ikas-storefront-models package.",
@@ -17,8 +17,8 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@rollup/plugin-commonjs": "^22.0.0",
20
- "@ikas/storefront-config": "^4.5.1-beta.17",
21
- "@ikas/storefront-models": "^4.5.1-beta.17",
20
+ "@ikas/storefront-config": "^4.5.1-beta.19",
21
+ "@ikas/storefront-models": "^4.5.1-beta.19",
22
22
  "@rollup/plugin-node-resolve": "^13.3.0",
23
23
  "rollup-plugin-rename-node-modules": "^1.2.0",
24
24
  "prettier": "^2.2.1",
@@ -34,8 +34,8 @@
34
34
  "@ikas/fe-api-client": "^1.0.19"
35
35
  },
36
36
  "peerDependencies": {
37
- "@ikas/storefront-config": "^4.5.1-beta.17",
38
- "@ikas/storefront-models": "^4.5.1-beta.17",
37
+ "@ikas/storefront-config": "^4.5.1-beta.19",
38
+ "@ikas/storefront-models": "^4.5.1-beta.19",
39
39
  "@ikas/fe-api-client": "^1.0.18",
40
40
  "axios": "^0.26.0",
41
41
  "ts-essentials": "^7.0.1"
@@ -1,12 +0,0 @@
1
- import { DeepReadonly } from "ts-essentials";
2
- import { ShippingZoneStateData } from "./ShippingZoneState";
3
- export declare class ShippingZoneData {
4
- countryId: string;
5
- postalCodes: string[] | null;
6
- states: ShippingZoneStateData[] | null;
7
- constructor(data?: Partial<ShippingZoneData>);
8
- }
9
- export declare class ShippingZone extends ShippingZoneData {
10
- }
11
- export declare type PartialShippingZone = Partial<ShippingZone>;
12
- export declare type ReadOnlyShippingZone = DeepReadonly<ShippingZone>;
@@ -1,11 +0,0 @@
1
- import { DeepReadonly } from "ts-essentials";
2
- import { ShippingZoneDistrictData } from "./ShippingZoneDistrict";
3
- export declare class ShippingZoneCityData {
4
- districts: ShippingZoneDistrictData[] | null;
5
- id: string;
6
- constructor(data?: Partial<ShippingZoneCityData>);
7
- }
8
- export declare class ShippingZoneCity extends ShippingZoneCityData {
9
- }
10
- export declare type PartialShippingZoneCity = Partial<ShippingZoneCity>;
11
- export declare type ReadOnlyShippingZoneCity = DeepReadonly<ShippingZoneCity>;
@@ -1,11 +0,0 @@
1
- import { DeepReadonly } from "ts-essentials";
2
- import { ShippingZoneRegionData } from "./ShippingZoneRegion";
3
- export declare class ShippingZoneDistrictData {
4
- id: string;
5
- regions: ShippingZoneRegionData[];
6
- constructor(data?: Partial<ShippingZoneDistrictData>);
7
- }
8
- export declare class ShippingZoneDistrict extends ShippingZoneDistrictData {
9
- }
10
- export declare type PartialShippingZoneDistrict = Partial<ShippingZoneDistrict>;
11
- export declare type ReadOnlyShippingZoneDistrict = DeepReadonly<ShippingZoneDistrict>;
@@ -1,10 +0,0 @@
1
- import { DeepReadonly } from "ts-essentials";
2
- import BaseModelData from "./_base";
3
- export declare class ShippingZoneRegionData extends BaseModelData {
4
- name: string;
5
- constructor(data?: Partial<ShippingZoneRegionData>);
6
- }
7
- export declare class ShippingZoneRegion extends ShippingZoneRegionData {
8
- }
9
- export declare type PartialShippingZoneRegion = Partial<ShippingZoneRegion>;
10
- export declare type ReadOnlyShippingZoneRegion = DeepReadonly<ShippingZoneRegion>;
@@ -1,12 +0,0 @@
1
- import { DeepReadonly } from "ts-essentials";
2
- import { ShippingZoneCityData } from "./ShippingZoneCity";
3
- export declare class ShippingZoneStateData {
4
- cities: ShippingZoneCityData[] | null;
5
- id: string;
6
- postalCodes: string[] | null;
7
- constructor(data?: Partial<ShippingZoneStateData>);
8
- }
9
- export declare class ShippingZoneState extends ShippingZoneStateData {
10
- }
11
- export declare type PartialShippingZoneState = Partial<ShippingZoneState>;
12
- export declare type ReadOnlyShippingZoneState = DeepReadonly<ShippingZoneState>;