@ikas/storefront 0.0.88 → 0.0.90

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.
@@ -1,6 +1,7 @@
1
1
  import { IkasOrderAddress } from "./address/index";
2
2
  import { IkasOrderShippingLine } from "./shipping-line/index";
3
3
  import { IkasOrderLineItem } from "./line-item/index";
4
+ import { IkasCustomerStore } from "../../../store/customer";
4
5
  export declare class IkasOrder {
5
6
  id: string;
6
7
  orderNumber: string;
@@ -24,8 +25,12 @@ export declare class IkasOrder {
24
25
  taxLines: IkasOrderTaxLine[] | null;
25
26
  orderPackages: IkasOrderPackage[] | null;
26
27
  currencyRates: IkasOrderCurrencyRate[] | null;
28
+ customerStore: IkasCustomerStore;
27
29
  constructor(data: IkasOrder);
28
- get unfullfilledOrderLineItems(): IkasOrderLineItem[];
30
+ get refundableItems(): IkasOrderLineItem[];
31
+ get unfullfilledItems(): IkasOrderLineItem[];
32
+ get refundedItems(): IkasOrderLineItem[];
33
+ refund: () => Promise<boolean>;
29
34
  }
30
35
  export declare type IkasOrderAdjustment = {
31
36
  amount: number;
@@ -106,4 +111,16 @@ export declare type IkasOrderCurrencyRate = {
106
111
  originalRate: number;
107
112
  rate: number;
108
113
  };
114
+ export declare enum OrderLineItemStatusEnum {
115
+ FULFILLED = "FULFILLED",
116
+ UNFULFILLED = "UNFULFILLED",
117
+ DELIVERED = "DELIVERED",
118
+ CANCELLED = "CANCELLED",
119
+ CANCEL_REQUESTED = "CANCEL_REQUESTED",
120
+ CANCEL_REJECTED = "CANCEL_REJECTED",
121
+ REFUND_REQUESTED = "REFUND_REQUESTED",
122
+ REFUND_REQUEST_ACCEPTED = "REFUND_REQUEST_ACCEPTED",
123
+ REFUNDED = "REFUNDED",
124
+ REFUND_REJECTED = "REFUND_REJECTED"
125
+ }
109
126
  export {};
@@ -13,8 +13,24 @@ export declare class IkasOrderLineItem {
13
13
  price: number;
14
14
  quantity: number;
15
15
  taxValue?: number | null;
16
+ private _refundQuantity?;
16
17
  variant: IkasOrderLineVariant;
18
+ status: OrderLineItemStatusEnum;
17
19
  constructor(data: Partial<IkasOrderLineItem>);
18
20
  get finalPriceWithQuantity(): number;
19
21
  get tax(): number;
22
+ get refundQuantity(): number | null | undefined;
23
+ set refundQuantity(value: number | null | undefined);
24
+ }
25
+ export declare enum OrderLineItemStatusEnum {
26
+ FULFILLED = "FULFILLED",
27
+ UNFULFILLED = "UNFULFILLED",
28
+ DELIVERED = "DELIVERED",
29
+ CANCELLED = "CANCELLED",
30
+ CANCEL_REQUESTED = "CANCEL_REQUESTED",
31
+ CANCEL_REJECTED = "CANCEL_REJECTED",
32
+ REFUND_REQUESTED = "REFUND_REQUESTED",
33
+ REFUND_REQUEST_ACCEPTED = "REFUND_REQUEST_ACCEPTED",
34
+ REFUNDED = "REFUNDED",
35
+ REFUND_REJECTED = "REFUND_REJECTED"
20
36
  }
@@ -0,0 +1,6 @@
1
+ import { IkasOrderRefundOrderLineInput } from "./refund-line-item/index";
2
+ export declare class IkasRefund {
3
+ orderId: string;
4
+ orderLineItems: IkasOrderRefundOrderLineInput[];
5
+ constructor(data: Partial<IkasRefund>);
6
+ }
@@ -0,0 +1,5 @@
1
+ export declare class IkasOrderRefundOrderLineInput {
2
+ quantity: number;
3
+ orderLineItemId: string;
4
+ constructor(data: Partial<IkasOrderRefundOrderLineInput>);
5
+ }
@@ -1,8 +1,8 @@
1
1
  import { IkasCategory, IkasCategoryPropValue } from "../../../models/index";
2
2
  import IkasPropValueProvider from "./index";
3
- export declare class IkasCategoryPropValueProvider implements IkasPropValueProvider<IkasCategory> {
3
+ export declare class IkasCategoryPropValueProvider implements IkasPropValueProvider<IkasCategory | null> {
4
4
  private categoryPropValue;
5
5
  private pageSpecificData?;
6
6
  constructor(prop: IkasCategoryPropValue, pageSpecificData?: any);
7
- getValue(): Promise<IkasCategory>;
7
+ getValue(): Promise<IkasCategory | null>;
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.88",
3
+ "version": "0.0.90",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",
@@ -1,92 +0,0 @@
1
- import { StringFilterInput, PaginationInput, CategoryFilterInput, ProductTypeEnum, HTMLMetaDataTargetTypeEnum } from "../../../__generated__/global-types";
2
- export interface listProduct_listProduct_data_metaData {
3
- __typename: "HTMLMetaData";
4
- slug: string;
5
- pageTitle: string | null;
6
- description: string | null;
7
- targetId: string | null;
8
- targetType: HTMLMetaDataTargetTypeEnum | null;
9
- redirectTo: string | null;
10
- }
11
- export interface listProduct_listProduct_data_productVariantTypes {
12
- __typename: "ProductVariantType";
13
- order: number;
14
- variantTypeId: string;
15
- variantValueIds: string[] | null;
16
- }
17
- export interface listProduct_listProduct_data_variants_variantValueIds {
18
- __typename: "VariantValueRelation";
19
- variantTypeId: string;
20
- variantValueId: string;
21
- }
22
- export interface listProduct_listProduct_data_variants_attributes {
23
- __typename: "ProductAttributeValue";
24
- value: string | null;
25
- productAttributeId: string | null;
26
- productAttributeOptionId: string | null;
27
- }
28
- export interface listProduct_listProduct_data_variants_images {
29
- __typename: "ProductImage";
30
- order: number;
31
- isMain: boolean;
32
- imageId: string | null;
33
- }
34
- export interface listProduct_listProduct_data_variants_prices {
35
- __typename: "ProductPrice";
36
- sellPrice: number;
37
- discountPrice: number | null;
38
- buyPrice: number | null;
39
- currency: string | null;
40
- }
41
- export interface listProduct_listProduct_data_variants {
42
- __typename: "Variant";
43
- id: string;
44
- createdAt: any | null;
45
- updatedAt: any | null;
46
- deleted: boolean | null;
47
- sku: string | null;
48
- barcodeList: string[] | null;
49
- isActive: boolean | null;
50
- variantValueIds: listProduct_listProduct_data_variants_variantValueIds[] | null;
51
- attributes: listProduct_listProduct_data_variants_attributes[] | null;
52
- images: listProduct_listProduct_data_variants_images[] | null;
53
- prices: listProduct_listProduct_data_variants_prices[];
54
- }
55
- export interface listProduct_listProduct_data_attributes {
56
- __typename: "ProductAttributeValue";
57
- value: string | null;
58
- productAttributeId: string | null;
59
- productAttributeOptionId: string | null;
60
- }
61
- export interface listProduct_listProduct_data {
62
- __typename: "Product";
63
- id: string;
64
- createdAt: any | null;
65
- updatedAt: any | null;
66
- deleted: boolean | null;
67
- name: string;
68
- type: ProductTypeEnum;
69
- shortDescription: string | null;
70
- description: string | null;
71
- metaData: listProduct_listProduct_data_metaData | null;
72
- brandId: string | null;
73
- categoryIds: string[] | null;
74
- productVariantTypes: listProduct_listProduct_data_productVariantTypes[] | null;
75
- variants: listProduct_listProduct_data_variants[];
76
- attributes: listProduct_listProduct_data_attributes[] | null;
77
- }
78
- export interface listProduct_listProduct {
79
- __typename: "ProductPaginationResponse";
80
- data: listProduct_listProduct_data[];
81
- count: number;
82
- }
83
- export interface listProduct {
84
- listProduct: listProduct_listProduct;
85
- }
86
- export interface listProductVariables {
87
- id?: StringFilterInput | null;
88
- pagination?: PaginationInput | null;
89
- search?: string | null;
90
- brandId?: StringFilterInput | null;
91
- categoryIds?: CategoryFilterInput | null;
92
- }
@@ -1,17 +0,0 @@
1
- import { IkasProduct } from "../../models/index";
2
- export declare class IkasProductAPI {
3
- static listProducts(params?: ListProductsParams): Promise<ListProductsResponse>;
4
- }
5
- declare type ListProductsParams = {
6
- idList?: string[];
7
- page?: number;
8
- limit?: number;
9
- search?: string;
10
- brandId?: string;
11
- categoryIds?: string[];
12
- };
13
- declare type ListProductsResponse = {
14
- products: IkasProduct[];
15
- count: number;
16
- };
17
- export {};