@ikas/storefront 0.0.107 → 0.0.109
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/build/__generated__/global-types.d.ts +12 -0
- package/build/api/checkout/__generated__/listCheckoutSettings.d.ts +25 -0
- package/build/api/checkout/index.d.ts +2 -0
- package/build/api/country/__generated__/getAvailableShippingCountries.d.ts +1 -1
- package/build/api/country/index.d.ts +1 -1
- package/build/components/checkout/components/address-form/model.d.ts +2 -0
- package/build/components/checkout/components/checkbox/index.d.ts +1 -1
- package/build/components/checkout/index.d.ts +2 -0
- package/build/components/checkout/model.d.ts +9 -2
- package/build/index.es.js +193 -57
- package/build/index.js +194 -58
- package/build/models/data/checkout-settings/index.d.ts +17 -0
- package/build/models/data/order/address/index.d.ts +4 -0
- package/build/pages/checkout/[id].d.ts +1 -0
- package/build/storefront/index.d.ts +4 -0
- package/build/utils/providers/page-data.d.ts +9 -7
- package/build/utils/settings.d.ts +12 -0
- package/package.json +1 -1
|
@@ -42,6 +42,14 @@ export declare enum CheckoutRecoveryStatusEnum {
|
|
|
42
42
|
NOT_RECOVERED = "NOT_RECOVERED",
|
|
43
43
|
RECOVERED = "RECOVERED"
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Checkout Requirement Enum
|
|
47
|
+
*/
|
|
48
|
+
export declare enum CheckoutRequirementEnum {
|
|
49
|
+
INVISIBLE = "INVISIBLE",
|
|
50
|
+
MANDATORY = "MANDATORY",
|
|
51
|
+
OPTIONAL = "OPTIONAL"
|
|
52
|
+
}
|
|
45
53
|
/**
|
|
46
54
|
* Checkout Status Enum
|
|
47
55
|
*/
|
|
@@ -92,6 +100,7 @@ export declare enum OrderPackageFulfillStatusEnum {
|
|
|
92
100
|
DELIVERED = "DELIVERED",
|
|
93
101
|
ERROR = "ERROR",
|
|
94
102
|
FULFILLED = "FULFILLED",
|
|
103
|
+
READY_FOR_SHIPMENT = "READY_FOR_SHIPMENT",
|
|
95
104
|
REFUNDED = "REFUNDED",
|
|
96
105
|
REFUND_REJECTED = "REFUND_REJECTED",
|
|
97
106
|
REFUND_REQUESTED = "REFUND_REQUESTED",
|
|
@@ -110,6 +119,7 @@ export declare enum OrderPackageStatusEnum {
|
|
|
110
119
|
PARTIALLY_DELIVERED = "PARTIALLY_DELIVERED",
|
|
111
120
|
PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED",
|
|
112
121
|
PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
|
|
122
|
+
READY_FOR_SHIPMENT = "READY_FOR_SHIPMENT",
|
|
113
123
|
REFUNDED = "REFUNDED",
|
|
114
124
|
REFUND_REJECTED = "REFUND_REJECTED",
|
|
115
125
|
REFUND_REQUESTED = "REFUND_REQUESTED",
|
|
@@ -363,6 +373,7 @@ export interface OrderAddressInput {
|
|
|
363
373
|
country: OrderAddressCountryInput;
|
|
364
374
|
district?: OrderAddressDistrictInput | null;
|
|
365
375
|
firstName: string;
|
|
376
|
+
identityNumber?: string | null;
|
|
366
377
|
isDefault: boolean;
|
|
367
378
|
lastName: string;
|
|
368
379
|
phone?: string | null;
|
|
@@ -452,6 +463,7 @@ export interface SearchInput {
|
|
|
452
463
|
priceListId?: string | null;
|
|
453
464
|
productIdList?: string[] | null;
|
|
454
465
|
query?: string | null;
|
|
466
|
+
salesChannelId?: string | null;
|
|
455
467
|
slug?: string | null;
|
|
456
468
|
}
|
|
457
469
|
export interface SearchInputFilterListInput {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StringFilterInput, CheckoutRequirementEnum } from "../../../__generated__/global-types";
|
|
2
|
+
export interface listCheckoutSettings_listCheckoutSettings_options {
|
|
3
|
+
__typename: "CheckoutOption";
|
|
4
|
+
name: string;
|
|
5
|
+
required: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface listCheckoutSettings_listCheckoutSettings {
|
|
8
|
+
__typename: "CheckoutSettings";
|
|
9
|
+
createdAt: any | null;
|
|
10
|
+
id: string;
|
|
11
|
+
identityNumberRequirement: CheckoutRequirementEnum;
|
|
12
|
+
isAccountRequired: boolean;
|
|
13
|
+
isTermsAndConditionsDefaultChecked: boolean | null;
|
|
14
|
+
options: listCheckoutSettings_listCheckoutSettings_options[] | null;
|
|
15
|
+
phoneRequirement: CheckoutRequirementEnum;
|
|
16
|
+
showTermsAndConditionsCheckbox: boolean;
|
|
17
|
+
storefrontId: string;
|
|
18
|
+
updatedAt: any | null;
|
|
19
|
+
}
|
|
20
|
+
export interface listCheckoutSettings {
|
|
21
|
+
listCheckoutSettings: listCheckoutSettings_listCheckoutSettings[];
|
|
22
|
+
}
|
|
23
|
+
export interface listCheckoutSettingsVariables {
|
|
24
|
+
storefrontId: StringFilterInput;
|
|
25
|
+
}
|
|
@@ -2,6 +2,7 @@ import { IkasCheckout, IkasPaymentMethodDetail, IkasInstallmentInfo, IkasInstall
|
|
|
2
2
|
import * as SaleTransactionTypes from "./__generated__/createSaleTransactionWithCheckout";
|
|
3
3
|
import * as CheckStocksTypes from "./__generated__/checkStocks";
|
|
4
4
|
import { IkasPaymentGateway } from "../../models/data/payment-gateway/index";
|
|
5
|
+
import { IkasCheckoutSettings } from "../../models/data/checkout-settings/index";
|
|
5
6
|
export declare class IkasCheckoutAPI {
|
|
6
7
|
static getCheckoutId(cartId: string): Promise<string | undefined>;
|
|
7
8
|
static getCheckoutById(id: string): Promise<IkasCheckout | undefined>;
|
|
@@ -10,6 +11,7 @@ export declare class IkasCheckoutAPI {
|
|
|
10
11
|
static listPaymentGateway(): Promise<IkasPaymentGateway[] | undefined>;
|
|
11
12
|
static retrieveInstallmentInfo(input: IkasInstallmentInfoInput): Promise<IkasInstallmentInfo | undefined>;
|
|
12
13
|
static checkStocks(lines: CheckStocksLineInput[], stockLocationIdList: string[]): Promise<CheckStocksTypes.checkStocks_checkStocks | undefined>;
|
|
14
|
+
static listCheckoutSettings(): Promise<IkasCheckoutSettings[] | undefined>;
|
|
13
15
|
}
|
|
14
16
|
declare type CheckStocksLineInput = {
|
|
15
17
|
quantity: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IkasCountry } from "../../models/index";
|
|
2
2
|
export declare class IkasCountryAPI {
|
|
3
3
|
static listCountries(): Promise<IkasCountry[]>;
|
|
4
|
-
static listShippingCountries(
|
|
4
|
+
static listShippingCountries(salesChannelId: string): Promise<string[]>;
|
|
5
5
|
static getMyCountry(): Promise<string | null | undefined>;
|
|
6
6
|
}
|
|
@@ -12,6 +12,7 @@ export default class AddressFormViewModel {
|
|
|
12
12
|
get firstName(): string | null | undefined;
|
|
13
13
|
get lastName(): string | null | undefined;
|
|
14
14
|
get phone(): string | null | undefined;
|
|
15
|
+
get identityNumber(): string | null | undefined;
|
|
15
16
|
get country(): {
|
|
16
17
|
id?: string | undefined;
|
|
17
18
|
name?: string | undefined;
|
|
@@ -61,6 +62,7 @@ export default class AddressFormViewModel {
|
|
|
61
62
|
onFirstNameChange: (value: string) => void;
|
|
62
63
|
onLastNameChange: (value: string) => void;
|
|
63
64
|
onPhoneChange: (value: string) => void;
|
|
65
|
+
onIdentityNumberChange: (value: string) => void;
|
|
64
66
|
onAddressLine1Change: (value: string) => void;
|
|
65
67
|
onAddressLine2Change: (value: string) => void;
|
|
66
68
|
onAddressPostalCodeChange: (value: string) => void;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { ParsedUrlQuery } from "querystring";
|
|
4
4
|
import { IkasCheckout } from "../../models/index";
|
|
5
|
+
import { IkasCheckoutSettings } from "../../models/data/checkout-settings/index";
|
|
5
6
|
declare type Props = {
|
|
6
7
|
checkout: IkasCheckout;
|
|
8
|
+
checkoutSettings: IkasCheckoutSettings;
|
|
7
9
|
returnPolicy: string;
|
|
8
10
|
privacyPolicy: string;
|
|
9
11
|
termsOfService: string;
|
|
@@ -7,14 +7,17 @@ import { IkasOrderLineVariant } from "../../models/data/order/line-item/variant/
|
|
|
7
7
|
import { IkasStorefront } from "../../models/data/storefront/index";
|
|
8
8
|
import { IkasCustomerStore } from "../../store/customer";
|
|
9
9
|
import CreditCardData from "./components/credit-card-form/model";
|
|
10
|
+
import { IkasCheckoutSettings } from "../../models/data/checkout-settings/index";
|
|
10
11
|
export default class CheckoutViewModel {
|
|
11
12
|
checkout: IkasCheckout;
|
|
13
|
+
checkoutSettings: IkasCheckoutSettings;
|
|
12
14
|
storefront?: IkasStorefront | null;
|
|
13
15
|
customerStore: IkasCustomerStore;
|
|
14
16
|
router: NextRouter;
|
|
15
17
|
isCheckoutLoaded: boolean;
|
|
16
18
|
isErrorsVisible: boolean;
|
|
17
19
|
isStepLoading: boolean;
|
|
20
|
+
isTermsAndConditionsChecked: boolean;
|
|
18
21
|
step: CheckoutStep;
|
|
19
22
|
merchantSettings?: IkasMerchantSettings;
|
|
20
23
|
cardData?: CreditCardData | null;
|
|
@@ -30,11 +33,14 @@ export default class CheckoutViewModel {
|
|
|
30
33
|
returnPolicy: string;
|
|
31
34
|
privacyPolicy: string;
|
|
32
35
|
termsOfService: string;
|
|
36
|
+
policyModalTitle: string;
|
|
37
|
+
policyModalText: string;
|
|
33
38
|
error?: CheckoutError | null;
|
|
34
|
-
constructor(checkout: IkasCheckout, queryParams: ParsedUrlQuery, router: NextRouter, returnPolicy: string, privacyPolicy: string, termsOfService: string);
|
|
39
|
+
constructor(checkout: IkasCheckout, checkoutSettings: IkasCheckoutSettings, queryParams: ParsedUrlQuery, router: NextRouter, returnPolicy: string, privacyPolicy: string, termsOfService: string);
|
|
35
40
|
init: (queryParams: ParsedUrlQuery) => Promise<void>;
|
|
36
41
|
get cart(): import("../../models/data/cart/index").IkasCart | null | undefined;
|
|
37
42
|
get selectedPaymentGatewayIndex(): number;
|
|
43
|
+
get selectedPaymentGateway(): IkasPaymentGateway | undefined;
|
|
38
44
|
get selectedInstallmentIndex(): number;
|
|
39
45
|
get checkoutUrl(): string;
|
|
40
46
|
get customerAddressOptions(): {
|
|
@@ -45,7 +51,7 @@ export default class CheckoutViewModel {
|
|
|
45
51
|
get installmentExtraPrice(): number | undefined;
|
|
46
52
|
get canProceedToShipping(): boolean;
|
|
47
53
|
get canProceedToPayment(): boolean;
|
|
48
|
-
get canPerformPayment(): boolean;
|
|
54
|
+
get canPerformPayment(): boolean | undefined;
|
|
49
55
|
saveCheckout: () => Promise<void>;
|
|
50
56
|
checkStocks: () => Promise<void>;
|
|
51
57
|
getShippingCountries: () => Promise<void>;
|
|
@@ -61,6 +67,7 @@ export default class CheckoutViewModel {
|
|
|
61
67
|
onCouponCodeChange: (value: string) => void;
|
|
62
68
|
onSelectedShippingAddressIdChange: (value: string) => void;
|
|
63
69
|
onSelectedBillingAddressIdChange: (value: string) => void;
|
|
70
|
+
onTermsAndConditionsCheckedChange: (value: boolean) => void;
|
|
64
71
|
onCardNumberChange: (value: string) => void;
|
|
65
72
|
onCardHolderNameChange: (value: string) => void;
|
|
66
73
|
onExpirationDateChange: (value: string) => void;
|