@ikas/storefront-api 6.1.0-beta.20 → 6.1.0-beta.200
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/__api/models/AddItemToCartInput.d.ts +2 -0
- package/build/__api/models/CartV2.d.ts +1 -0
- package/build/__api/models/CheckoutSettings.d.ts +1 -0
- package/build/__api/models/CustomerReview.d.ts +6 -0
- package/build/__api/models/CustomerReviewProductModel.d.ts +15 -0
- package/build/__api/models/CustomerReviewReplyInfo.d.ts +10 -0
- package/build/__api/models/GetCustomerReviewImageUploadUrlResponse.d.ts +11 -0
- package/build/__api/models/HepsipayFrameInitResponse.d.ts +11 -0
- package/build/__api/models/ListOrderTransactionWithPricesResponse.d.ts +1 -0
- package/build/__api/models/OrderLineItem.d.ts +5 -0
- package/build/__api/models/OrderLineItemCustomerSubscriptionPlan.d.ts +9 -0
- package/build/__api/models/OrderLineItemSubscriptionPlan.d.ts +12 -0
- package/build/__api/models/OrderLineItemSubscriptionPlanPeriod.d.ts +19 -0
- package/build/__api/models/ProductSearchResponse.d.ts +2 -0
- package/build/__api/models/SearchInput.d.ts +2 -0
- package/build/__api/models/SearchSuggestion.d.ts +12 -0
- package/build/__api/models/SubscriptionPlanDiscount.d.ts +11 -0
- package/build/__api/models/UpdatePaypalOrderAddressInput.d.ts +12 -0
- package/build/__api/models/UpdatePaypalOrderCustomerInput.d.ts +12 -0
- package/build/__api/models/UpdatePaypalOrderInput.d.ts +16 -0
- package/build/__api/mutations/addItemToCart.d.ts +13 -0
- package/build/__api/mutations/addItemToCart.js +1 -1
- package/build/__api/mutations/createPaypalOrder.d.ts +2 -0
- package/build/__api/mutations/createPaypalOrder.js +1 -1
- package/build/__api/mutations/customerLogin.d.ts +6 -2
- package/build/__api/mutations/customerLogin.js +1 -1
- package/build/__api/mutations/getCustomerReviewImageUploadUrl.d.ts +13 -0
- package/build/__api/mutations/getPaypalClientId.d.ts +1 -1
- package/build/__api/mutations/getPaypalClientId.js +1 -1
- package/build/__api/mutations/hepsipayFrameInit.d.ts +13 -0
- package/build/__api/mutations/hepsipayFrameInit.js +1 -0
- package/build/__api/mutations/registerCustomer.d.ts +8 -4
- package/build/__api/mutations/registerCustomer.js +1 -1
- package/build/__api/mutations/resendCustomerPhoneVerificationCode.d.ts +2 -5
- package/build/__api/mutations/resendCustomerPhoneVerificationCode.js +1 -1
- package/build/__api/mutations/updatePaypalOrder.d.ts +8 -0
- package/build/__api/mutations/updatePaypalOrder.js +1 -0
- package/build/__api/mutations/validateCustomerPhoneVerificationCode.d.ts +1 -0
- package/build/__api/mutations/validateCustomerPhoneVerificationCode.js +1 -1
- package/build/__api/mutations/validateOTPCode.d.ts +97 -0
- package/build/__api/mutations/validateOTPCode.js +1 -0
- package/build/__api/queries/getAvailableStockLocations.d.ts +1 -0
- package/build/__api/queries/getAvailableStockLocations.js +1 -1
- package/build/__api/queries/getCart.d.ts +13 -0
- package/build/__api/queries/getCartById.d.ts +18 -1
- package/build/__api/queries/getCartById.js +1 -1
- package/build/__api/queries/getCheckoutByCartId.d.ts +13 -0
- package/build/__api/queries/getCheckoutById.d.ts +13 -0
- package/build/__api/queries/getCustomerOrders.d.ts +19 -0
- package/build/__api/queries/getCustomerOrders.js +1 -1
- package/build/__api/queries/getOrder.d.ts +19 -0
- package/build/__api/queries/getStoreCreditBalance.d.ts +25 -0
- package/build/__api/queries/getStoreCreditBalance.js +1 -0
- package/build/__api/queries/listCheckoutSettings.d.ts +1 -0
- package/build/__api/queries/listCheckoutSettings.js +1 -1
- package/build/__api/queries/listCustomerReviewSummary.d.ts +1 -0
- package/build/__api/queries/listCustomerReviews.d.ts +12 -0
- package/build/__api/queries/listCustomerReviews.js +1 -1
- package/build/__api/queries/listOrderTransactionsWithPrices.d.ts +1 -0
- package/build/__api/queries/listOrderTransactionsWithPrices.js +1 -1
- package/build/__api/queries/searchProducts.d.ts +21 -0
- package/build/__api/queries/searchProducts.js +1 -1
- package/build/__api/types/index.d.ts +189 -12
- package/build/__api/types/index.js +1 -1
- package/build/api/checkout/index.d.ts +7 -2
- package/build/api/checkout/index.js +1 -1
- package/build/api/customer/index.d.ts +37 -6
- package/build/api/customer/index.js +1 -1
- package/build/api/product/index.d.ts +1 -0
- package/build/api/product/index.js +1 -1
- package/build/api/storefront/index.d.ts +5 -0
- package/build/index.d.ts +3 -2
- package/build/index.js +1 -1
- package/build/index2.js +1 -1
- package/package.json +5 -5
|
@@ -11,13 +11,16 @@ import { QueryParams as CreateStripePaymentIntentParams } from "../../__api/muta
|
|
|
11
11
|
import { QueryParams as CreateKlarnaClientTokenParams } from "../../__api/mutations/createKlarnaClientToken";
|
|
12
12
|
import { QueryParams as GetPayPalClientIdTokenParams } from "../../__api/mutations/getPaypalClientId";
|
|
13
13
|
import { QueryParams as CreatePayPalOrderParams } from "../../__api/mutations/createPaypalOrder";
|
|
14
|
+
import { QueryParams as UpdatePayPalOrderParams } from "../../__api/mutations/updatePaypalOrder";
|
|
15
|
+
import { QueryParams as HepsipayFrameInitParams } from "../../__api/mutations/hepsipayFrameInit";
|
|
14
16
|
import { QueryParams as ListProductFileQueryParams } from "../../__api/queries/listProductFile";
|
|
15
17
|
import { QueryParams as CheckCartStocksQueryParams } from "../../__api/queries/checkCartStocks";
|
|
16
18
|
import { QueryParams as CreateAdyenBalancePlatformPaymentParams } from "../../__api/mutations/createAdyenBalancePlatformPaymentSession";
|
|
17
|
-
import { IkasAvailableStockLocation, IkasCheckoutSettings, IkasPaymentGateway, IkasStockLocation } from "@ikas/storefront-models";
|
|
18
|
-
export type { CreateSaleTransactionQueryParams, ListPaymentGatewayQueryParams, RetrieveInstallmentInfoQueryParams, CheckStocksQueryParams, ListCheckoutSettingsQueryParams, GetAvailableShippingCountriesQueryParams, ListStockLocationQueryParams, GetAvailableStockLocationQueryParams, CreateStripePaymentIntentParams, CreateKlarnaClientTokenParams, GetPayPalClientIdTokenParams, CreatePayPalOrderParams, ListProductFileQueryParams, CheckCartStocksQueryParams, CreateAdyenBalancePlatformPaymentParams, };
|
|
19
|
+
import { IkasAvailableStockLocation, IkasCheckoutSettings, IkasPaymentGateway, IkasStockLocation, IkasStoreCreditBalance } from "@ikas/storefront-models";
|
|
20
|
+
export type { CreateSaleTransactionQueryParams, ListPaymentGatewayQueryParams, RetrieveInstallmentInfoQueryParams, CheckStocksQueryParams, ListCheckoutSettingsQueryParams, GetAvailableShippingCountriesQueryParams, ListStockLocationQueryParams, GetAvailableStockLocationQueryParams, CreateStripePaymentIntentParams, CreateKlarnaClientTokenParams, GetPayPalClientIdTokenParams, CreatePayPalOrderParams, UpdatePayPalOrderParams, HepsipayFrameInitParams, ListProductFileQueryParams, CheckCartStocksQueryParams, CreateAdyenBalancePlatformPaymentParams, };
|
|
19
21
|
export declare function createSaleTransactionWithCart(params: CreateSaleTransactionQueryParams): Promise<APIResponse<import("../..").TransactionResponse> | APIResponse<undefined>>;
|
|
20
22
|
export declare function listPaymentGateway(params: ListPaymentGatewayQueryParams): Promise<APIResponse<IkasPaymentGateway[]>>;
|
|
23
|
+
export declare function getStoreCreditBalance(): Promise<APIResponse<IkasStoreCreditBalance | null>>;
|
|
21
24
|
export declare function listProductFile(params: ListProductFileQueryParams): Promise<APIResponse<undefined> | APIResponse<import("../../__api/types").ProductFile[]>>;
|
|
22
25
|
export declare function retrieveInstallmentInfo(params: RetrieveInstallmentInfoQueryParams): Promise<APIResponse<undefined> | APIResponse<import("../..").RetrieveInstallmentInfoResponse>>;
|
|
23
26
|
export declare function checkStocks(params: CheckStocksQueryParams): Promise<APIResponse<undefined> | APIResponse<import("../../__api/types").CheckStocksResponse>>;
|
|
@@ -31,3 +34,5 @@ export declare function createKlarnaClientToken(params: CreateKlarnaClientTokenP
|
|
|
31
34
|
export declare function createAdyenBalancePlatformPaymentSession(params: CreateAdyenBalancePlatformPaymentParams): Promise<APIResponse<import("../..").CreateAdyenPlatformSessionResponse>>;
|
|
32
35
|
export declare function getPayPalClientId(params: GetPayPalClientIdTokenParams): Promise<APIResponse<import("../..").GetPaypalClientIdResponse>>;
|
|
33
36
|
export declare function createPayPalOrder(params: CreatePayPalOrderParams): Promise<APIResponse<import("../..").CreatePaypalOrderResponse>>;
|
|
37
|
+
export declare function updatePaypalOrder(params: UpdatePayPalOrderParams): Promise<APIResponse<boolean>>;
|
|
38
|
+
export declare function hepsipayFrameInit(params: HepsipayFrameInitParams): Promise<APIResponse<import("../..").HepsipayFrameInitResponse>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as r}from"@ikas/fe-api-client";function n(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/createSaleTransactionWithCart.js")];case 1:return[4,(0,t.sent().default)(r)];case 2:return[2,t.sent()]}}))}))}function i(n){return t(this,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listPaymentGateway.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),i=t.data||[],[2,new r(i,t.graphQLErrors)]}}))}))}function s(){return t(this,void 0,void 0,(function(){var t,n;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getStoreCreditBalance.js")];case 1:return[4,(0,e.sent().default)()];case 2:return t=e.sent(),n=t.data,[2,new r(n,t.graphQLErrors)]}}))}))}function a(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/listProductFile.js")];case 1:return[4,(0,t.sent().default)(r)];case 2:return[2,t.sent()]}}))}))}function u(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/retrieveInstallmentInfo.js")];case 1:return[4,(0,t.sent().default)(r)];case 2:return[2,t.sent()]}}))}))}function o(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/checkStocks.js")];case 1:return[4,(0,t.sent().default)(r)];case 2:return[2,t.sent()]}}))}))}function c(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/checkCartStocks.js")];case 1:return[4,(0,t.sent().default)(r)];case 2:return[2,t.sent()]}}))}))}function l(n){return t(this,void 0,void 0,(function(){var t,i,s,a,u;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listCheckoutSettings.js")];case 1:return t=e.sent().default,s=t,a=[n],[4,g()];case 2:return[4,s.apply(void 0,a.concat([e.sent()]))];case 3:return i=e.sent(),u=i.data||[],[2,new r(u,i.graphQLErrors)]}}))}))}function f(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/getAvailableShippingCountries.js")];case 1:return[4,(0,t.sent().default)(r)];case 2:return[2,t.sent()]}}))}))}function d(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listStockLocation.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))}function h(n){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getAvailableStockLocations.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.stockLocations,t.graphQLErrors)]}}))}))}function p(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/mutations/createStripePaymentIntent.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))}function v(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/mutations/createKlarnaClientToken.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))}function _(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/mutations/createAdyenBalancePlatformPaymentSession.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))}function m(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/mutations/getPaypalClientId.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))}function w(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/mutations/createPaypalOrder.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))}function b(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/mutations/updatePaypalOrder.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))}function j(n){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/mutations/hepsipayFrameInit.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))}function g(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listCheckoutSettings.js")];case 1:return t=e.sent().ResponseField,r=["IS_SHOW_POSTAL_CODE"],[2,Object.entries(t).filter((function(t){var e=t[0];return!r.includes(e)})).map((function(t){return t[1]}))]}}))}))}export{c as checkCartStocks,o as checkStocks,_ as createAdyenBalancePlatformPaymentSession,v as createKlarnaClientToken,w as createPayPalOrder,n as createSaleTransactionWithCart,p as createStripePaymentIntent,f as getAvailableShippingCountries,h as getAvailableStockLocations,m as getPayPalClientId,s as getStoreCreditBalance,j as hepsipayFrameInit,l as listCheckoutSettings,i as listPaymentGateway,a as listProductFile,d as listStockLocations,u as retrieveInstallmentInfo,b as updatePaypalOrder};
|
|
@@ -26,18 +26,27 @@ import { QueryParams as ListCustomerSettingsQueryParams } from "../../__api/quer
|
|
|
26
26
|
import { QueryParams as ActivateCustomerQueryParams } from "../../__api/mutations/activateCustomer";
|
|
27
27
|
import { QueryParams as ResendCustomerActivationMailQueryParams } from "../../__api/mutations/resendCustomerActivationMail";
|
|
28
28
|
import { QueryParams as ValidateCustomerPhoneVerificationCodeQueryParams } from "../../__api/mutations/validateCustomerPhoneVerificationCode";
|
|
29
|
-
import { QueryParams as
|
|
29
|
+
import { QueryParams as ValidateOTPCodeQueryParams } from "../../__api/mutations/validateOTPCode";
|
|
30
30
|
import { QueryParams as SaveCustomerFormDataQueryParams } from "../../__api/mutations/saveCustomerFormData";
|
|
31
31
|
import { QueryParams as CustomerDeactiveQueryParams } from "../../__api/mutations/customerDeactivate";
|
|
32
32
|
import { CustomerAttributeValueInput } from "../../__api/types";
|
|
33
33
|
import { IkasCustomer, IkasCustomerAttribute, IkasCustomerReview, IkasCustomerReviewSummary, IkasFavoriteProduct, IkasLastViewedProduct, IkasOrder, IkasOrderRefundSettings, IkasOrderTransaction, IkasCustomerSettings, IkasOrderTransactionWithPrices } from "@ikas/storefront-models";
|
|
34
|
-
export type { CustomerLoginQueryParams, CustomerSocialLoginQueryParams, RegisterCustomerQueryParams, CustomerRefreshTokenQueryParams, CustomerForgotPasswordQueryParams, CustomerRecoverPasswordQueryParams, CheckCustomerEmailQueryParams, SaveMyCustomerQueryParams, GetCustomerOrdersQueryParams, GetOrderByEmailQueryParams, ListOrderTransactionsQueryParams, ListOrderTransactionsWithPricesQueryParams, CreateOrderRefundRequestQueryParams, SubscribeToMarketingNotificationsQueryParams, GetLastViewedProductsQueryParams, SaveLastViewedProductsQueryParams, ListOrderRefundSettingsQueryParams, SendContactFormToMerchantQueryParams, SaveFavoriteProductQueryParams, IsFavoriteProductQueryParams, CreateCustomerReviewQueryParams, ListCustomerReviewsQueryParams, ListCustomerReviewSummaryQueryParams, CustomerAttributeValueInput, ActivateCustomerQueryParams, ResendCustomerActivationMailQueryParams, ValidateCustomerPhoneVerificationCodeQueryParams,
|
|
34
|
+
export type { CustomerLoginQueryParams, CustomerSocialLoginQueryParams, RegisterCustomerQueryParams, CustomerRefreshTokenQueryParams, CustomerForgotPasswordQueryParams, CustomerRecoverPasswordQueryParams, CheckCustomerEmailQueryParams, SaveMyCustomerQueryParams, GetCustomerOrdersQueryParams, GetOrderByEmailQueryParams, ListOrderTransactionsQueryParams, ListOrderTransactionsWithPricesQueryParams, CreateOrderRefundRequestQueryParams, SubscribeToMarketingNotificationsQueryParams, GetLastViewedProductsQueryParams, SaveLastViewedProductsQueryParams, ListOrderRefundSettingsQueryParams, SendContactFormToMerchantQueryParams, SaveFavoriteProductQueryParams, IsFavoriteProductQueryParams, CreateCustomerReviewQueryParams, ListCustomerReviewsQueryParams, ListCustomerReviewSummaryQueryParams, CustomerAttributeValueInput, ActivateCustomerQueryParams, ResendCustomerActivationMailQueryParams, ValidateCustomerPhoneVerificationCodeQueryParams, SaveCustomerFormDataQueryParams, CustomerDeactiveQueryParams, ValidateOTPCodeQueryParams, };
|
|
35
35
|
export declare enum IkasRegisterError {
|
|
36
36
|
EMAIL_IS_NOT_VERIFIED = "EMAIL_IS_NOT_VERIFIED",
|
|
37
37
|
CUSTOMER_EMAIL_ALREADY_EXISTS = "CUSTOMER_EMAIL_ALREADY_EXISTS",
|
|
38
38
|
UNKOWN = "UNKOWN",
|
|
39
39
|
B2B_CUSTOMER_ACCOUNT_DISABLED = "B2B_CUSTOMER_ACCOUNT_DISABLED",
|
|
40
|
-
PHONE_IS_NOT_VERIFIED = "PHONE_IS_NOT_VERIFIED"
|
|
40
|
+
PHONE_IS_NOT_VERIFIED = "PHONE_IS_NOT_VERIFIED",
|
|
41
|
+
FACEBOOK_SOCIAL_LOGIN_EXISTS = "FACEBOOK_SOCIAL_LOGIN_EXISTS",
|
|
42
|
+
GOOGLE_SOCIAL_LOGIN_EXISTS = "GOOGLE_SOCIAL_LOGIN_EXISTS",
|
|
43
|
+
APPLE_SOCIAL_LOGIN_EXISTS = "APPLE_SOCIAL_LOGIN_EXISTS",
|
|
44
|
+
TWITCH_SOCIAL_LOGIN_EXISTS = "TWITCH_SOCIAL_LOGIN_EXISTS",
|
|
45
|
+
SOCIAL_LOGIN_EXISTS = "SOCIAL_LOGIN_EXISTS",
|
|
46
|
+
INVALID_CODE = "INVALID_CODE",
|
|
47
|
+
OTP_CODE_ALREADY_SEND = "OTP_CODE_ALREADY_SEND",
|
|
48
|
+
CUSTOMER_PHONE_ALREADY_EXISTS = "CUSTOMER_PHONE_ALREADY_EXISTS",
|
|
49
|
+
PHONE_NUMBER_INVALID = "PHONE_NUMBER_INVALID"
|
|
41
50
|
}
|
|
42
51
|
export declare enum IkasLoginError {
|
|
43
52
|
CUSTOMER_ACCOUNT_DISABLED = "CUSTOMER_ACCOUNT_DISABLED",
|
|
@@ -46,20 +55,35 @@ export declare enum IkasLoginError {
|
|
|
46
55
|
B2B_CUSTOMER_ACCOUNT_DISABLED = "B2B_CUSTOMER_ACCOUNT_DISABLED",
|
|
47
56
|
UNKOWN = "UNKOWN",
|
|
48
57
|
PHONE_IS_NOT_VERIFIED = "PHONE_IS_NOT_VERIFIED",
|
|
49
|
-
WRONG_PASSWORD = "WRONG_PASSWORD"
|
|
58
|
+
WRONG_PASSWORD = "WRONG_PASSWORD",
|
|
59
|
+
FACEBOOK_SOCIAL_LOGIN_EXISTS = "FACEBOOK_SOCIAL_LOGIN_EXISTS",
|
|
60
|
+
GOOGLE_SOCIAL_LOGIN_EXISTS = "GOOGLE_SOCIAL_LOGIN_EXISTS",
|
|
61
|
+
APPLE_SOCIAL_LOGIN_EXISTS = "APPLE_SOCIAL_LOGIN_EXISTS",
|
|
62
|
+
TWITCH_SOCIAL_LOGIN_EXISTS = "TWITCH_SOCIAL_LOGIN_EXISTS",
|
|
63
|
+
SOCIAL_LOGIN_EXISTS = "SOCIAL_LOGIN_EXISTS",
|
|
64
|
+
INVALID_CODE = "INVALID_CODE",
|
|
65
|
+
OTP_CODE_ALREADY_SEND = "OTP_CODE_ALREADY_SEND",
|
|
66
|
+
CUSTOMER_PHONE_ALREADY_EXISTS = "CUSTOMER_PHONE_ALREADY_EXISTS",
|
|
67
|
+
PHONE_NUMBER_INVALID = "PHONE_NUMBER_INVALID"
|
|
50
68
|
}
|
|
51
69
|
export declare function login(params: CustomerLoginQueryParams): Promise<APIResponse<{
|
|
52
70
|
customer: IkasCustomer | null;
|
|
71
|
+
flowId: string | null;
|
|
72
|
+
otpSend: boolean | null;
|
|
53
73
|
token: string;
|
|
54
74
|
tokenExpiry: number;
|
|
55
75
|
} | null>>;
|
|
56
76
|
export declare function socialLogin(params: CustomerSocialLoginQueryParams): Promise<APIResponse<{
|
|
57
77
|
customer: IkasCustomer | null;
|
|
78
|
+
flowId: string | null;
|
|
79
|
+
otpSend: boolean | null;
|
|
58
80
|
token: string;
|
|
59
81
|
tokenExpiry: number;
|
|
60
82
|
} | null>>;
|
|
61
83
|
export declare function register(params: RegisterCustomerQueryParams): Promise<APIResponse<{
|
|
62
84
|
customer: IkasCustomer | null;
|
|
85
|
+
flowId: string | null;
|
|
86
|
+
otpSend: boolean | null;
|
|
63
87
|
token: string;
|
|
64
88
|
tokenExpiry: number;
|
|
65
89
|
} | null>>;
|
|
@@ -246,7 +270,14 @@ export declare function listCustomerSettings(params: ListCustomerSettingsQueryPa
|
|
|
246
270
|
}>>;
|
|
247
271
|
export declare function activateCustomer(params: ActivateCustomerQueryParams): Promise<APIResponse<undefined> | APIResponse<string>>;
|
|
248
272
|
export declare function resendCustomerActivationMail(params: ResendCustomerActivationMailQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
249
|
-
export declare function resendCustomerPhoneVerificationCode(
|
|
250
|
-
export declare function validateCustomerPhoneVerificationCode(params: ValidateCustomerPhoneVerificationCodeQueryParams): Promise<APIResponse<
|
|
273
|
+
export declare function resendCustomerPhoneVerificationCode(): Promise<APIResponse<boolean>>;
|
|
274
|
+
export declare function validateCustomerPhoneVerificationCode(params: ValidateCustomerPhoneVerificationCodeQueryParams): Promise<APIResponse<boolean>>;
|
|
275
|
+
export declare function validateOTPCode(params: ValidateOTPCodeQueryParams): Promise<APIResponse<{
|
|
276
|
+
customer: IkasCustomer | null;
|
|
277
|
+
flowId: string | null;
|
|
278
|
+
otpSend: boolean | null;
|
|
279
|
+
token: string;
|
|
280
|
+
tokenExpiry: number;
|
|
281
|
+
} | null>>;
|
|
251
282
|
export declare function deactivateCustomer(params: CustomerDeactiveQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
252
283
|
export declare function exportCustomerPersonelData(): Promise<APIResponse<undefined> | APIResponse<string>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as r,__assign as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as n}from"@ikas/fe-api-client";import{initIkasCustomerReview as i,initIkasCustomerAttribute as s}from"@ikas/storefront-models";import{IkasStorefrontConfig as u}from"@ikas/storefront-config";var a,o;function c(i){var s;return t(this,void 0,void 0,(function(){var t,u,a,o,c;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/customerLogin.js")];case 1:return t=r.sent().default,a=t,o=[i],[4,l()];case 2:return[4,a.apply(void 0,o.concat([r.sent()]))];case 3:return u=r.sent(),c=(null===(s=u.data)||void 0===s?void 0:s.customer)||null,[2,new n(u.data?e(e({},u.data),{customer:c}):null,u.graphQLErrors)]}}))}))}function d(i){var s;return t(this,void 0,void 0,(function(){var t,u,a,o,c;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/customerSocialLogin.js")];case 1:return t=r.sent().default,a=t,o=[i],[4,l()];case 2:return[4,a.apply(void 0,o.concat([r.sent()]))];case 3:return u=r.sent(),c=(null===(s=u.data)||void 0===s?void 0:s.customer)||null,[2,new n(u.data?e(e({},u.data),{customer:c}):null,u.graphQLErrors)]}}))}))}function _(i){var s;return t(this,void 0,void 0,(function(){var t,u,a,o,c;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/registerCustomer.js")];case 1:return t=r.sent().default,a=t,o=[i],[4,l()];case 2:return[4,a.apply(void 0,o.concat([r.sent()]))];case 3:return u=r.sent(),c=(null===(s=u.data)||void 0===s?void 0:s.customer)||null,[2,new n(u.data?e(e({},u.data),{customer:c}):null,u.graphQLErrors)]}}))}))}function l(){return t(this,void 0,void 0,(function(){var t,e;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/customerLogin.js")];case 1:return t=r.sent().ResponseField,e=["CUSTOMER__ADDRESSES__REGION__CREATED_AT","CUSTOMER__ADDRESSES__REGION__DELETED","CUSTOMER__ADDRESSES__REGION__UPDATED_AT"],[2,Object.entries(t).filter((function(t){var r=t[0];return!e.includes(r)})).map((function(t){return t[1]}))]}}))}))}function f(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/customerRefreshToken.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function v(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/customerForgotPassword.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function h(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/customerRecoverPassword.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function E(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/checkCustomerEmail.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function p(){return t(this,void 0,void 0,(function(){var t,i,s,u;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getMyCustomer.js")];case 1:return t=r.sent().default,s=t,[4,F()];case 2:return[4,s.apply(void 0,[r.sent()])];case 3:return i=r.sent(),u=i.data||null,[2,new n(i.data?e(e({},i.data),{customer:u}):null,i.graphQLErrors)]}}))}))}function m(i){return t(this,void 0,void 0,(function(){var t,s,u,a,o;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/saveMyCustomer.js")];case 1:return t=r.sent().default,u=t,a=[i],[4,F()];case 2:return[4,u.apply(void 0,a.concat([r.sent()]))];case 3:return s=r.sent(),o=s.data||null,[2,new n(s.data?e(e({},s.data),{customer:o}):null,s.graphQLErrors)]}}))}))}function D(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/saveCustomerFormData.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function S(e){return t(this,void 0,void 0,(function(){var t,i,s,u,a;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getCustomerOrders.js")];case 1:return t=r.sent().default,s=t,u=[e],[4,w()];case 2:return[4,s.apply(void 0,u.concat([r.sent()]))];case 3:return i=r.sent(),null==(a=i.data)||a.forEach((function(t){var r;(null===(r=t.orderLineItems)||void 0===r?void 0:r.length)&&(t.orderLineItems=t.orderLineItems.filter((function(t){return!t.deleted})))})),[2,new n(a,i.graphQLErrors)]}}))}))}function R(e){return t(this,void 0,void 0,(function(){var t,i,s,u,a;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getOrderByEmail.js")];case 1:return t=r.sent().default,s=t,u=[e],[4,w()];case 2:return[4,s.apply(void 0,u.concat([r.sent()]))];case 3:return i=r.sent(),a=i.data,[2,new n(a,i.graphQLErrors)]}}))}))}function O(e){return t(this,void 0,void 0,(function(){var t,i;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listOrderTransactions.js")];case 1:return[4,(0,r.sent().default)(e)];case 2:return t=r.sent(),i=t.data,[2,new n(i,t.graphQLErrors)]}}))}))}function I(e){return t(this,void 0,void 0,(function(){var t,i;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listOrderTransactionsWithPrices.js")];case 1:return[4,(0,r.sent().default)(e)];case 2:return t=r.sent(),i=t.data,[2,new n(i,t.graphQLErrors)]}}))}))}function T(e){return t(this,void 0,void 0,(function(){var t,i,s,u,a;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/createOrderRefundRequest.js")];case 1:return t=r.sent().default,s=t,u=[e],[4,w()];case 2:return[4,s.apply(void 0,u.concat([r.sent()]))];case 3:return i=r.sent(),a=i.data,[2,new n(a,i.graphQLErrors)]}}))}))}function w(){return t(this,void 0,void 0,(function(){var t,e;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getCustomerOrders.js")];case 1:return t=r.sent().ResponseField,e=["BILLING_ADDRESS__REGION__CREATED_AT","BILLING_ADDRESS__REGION__DELETED","BILLING_ADDRESS__REGION__UPDATED_AT","SHIPPING_ADDRESS__REGION__CREATED_AT","SHIPPING_ADDRESS__REGION__DELETED","SHIPPING_ADDRESS__REGION__UPDATED_AT"],[2,Object.entries(t).filter((function(t){var r=t[0];return!e.includes(r)})).map((function(t){return t[1]}))]}}))}))}function A(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/subscribeToMarketingNotifications.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function C(e){var i;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getLastViewedProducts.js")];case 1:return[4,(0,r.sent().default)(e)];case 2:return t=r.sent(),[2,new n(null===(i=t.data)||void 0===i?void 0:i.products,t.graphQLErrors)]}}))}))}function N(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/saveLastViewedProducts.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function L(i){var s;return t(this,void 0,void 0,(function(){var t,u;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listOrderRefundSettings.js")];case 1:return[4,(0,r.sent().default)(i)];case 2:return t=r.sent(),u=(null===(s=t.data)||void 0===s?void 0:s.map((function(t){return e({},t)})))||null,[2,new n(u,t.graphQLErrors)]}}))}))}function b(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/sendContactFormToMerchant.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function j(){return t(this,void 0,void 0,(function(){var t,e;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listFavoriteProducts.js")];case 1:return[4,(0,r.sent().default)()];case 2:return t=r.sent(),e=t.data||null,[2,new n(e,t.graphQLErrors)]}}))}))}function g(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/saveFavoriteProduct.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function U(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/isFavoriteProduct.js")];case 1:return[4,(0,t.sent().default)({productId:e.productId})];case 2:return[2,t.sent()]}}))}))}function P(e){return t(this,void 0,void 0,(function(){var t,s;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/createCustomerReview.js")];case 1:return[4,(0,r.sent().default)(e)];case 2:return t=r.sent(),(s=t.data)&&i(s),[2,new n(s,t.graphQLErrors)]}}))}))}function M(s){var u;return t(this,void 0,void 0,(function(){var t,a;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listCustomerReviews.js")];case 1:return[4,(0,r.sent().default)(s)];case 2:return t=r.sent(),(a=(null===(u=t.data)||void 0===u?void 0:u.data)||[]).forEach(i),[2,new n(t.data?e(e({},t.data),{data:a}):null,t.graphQLErrors)]}}))}))}function G(i){var s;return t(this,void 0,void 0,(function(){var t,u;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listCustomerReviewSummary.js")];case 1:return[4,(0,r.sent().default)(i)];case 2:return t=r.sent(),u=(null===(s=t.data)||void 0===s?void 0:s.data)||[],[2,new n(e(e({},t.data),{data:u}),t.graphQLErrors)]}}))}))}function q(){return t(this,void 0,void 0,(function(){var t,e;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listCustomerAttribute.js")];case 1:return[4,(0,r.sent().default)()];case 2:return t=r.sent(),(e=t.data||[]).sort((function(t,r){return t.order&&r.order?t.order-r.order:-1})).forEach((function(t){return s(t,u.getCurrentLocale())})),[2,new n(e,t.graphQLErrors)]}}))}))}function F(){return t(this,void 0,void 0,(function(){var t,e;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getMyCustomer.js")];case 1:return t=r.sent().ResponseField,e=["NOTE","TAG_IDS","CUSTOMER_GROUP_IDS","PASSWORD_UPDATE_DATE","ORDER_COUNT","REGISTRATION_SOURCE","ADDRESSES__REGION__CREATED_AT","ADDRESSES__REGION__DELETED","ADDRESSES__REGION__UPDATED_AT"],[2,Object.entries(t).filter((function(t){var r=t[0];return!e.includes(r)})).map((function(t){return t[1]}))]}}))}))}function B(i){return t(this,void 0,void 0,(function(){var t,s;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listCustomerSettings.js")];case 1:return[4,(0,r.sent().default)(i)];case 2:return t=r.sent(),s=t.data||[],[2,new n(e(e({},t.data),{data:s}),t.graphQLErrors)]}}))}))}function Q(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/activateCustomer.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function y(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/resendCustomerActivationMail.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function V(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/resendCustomerPhoneVerificationCode.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function W(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/validateCustomerPhoneVerificationCode.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function H(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/customerDeactivate.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function k(){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/exportCustomerPersonalData.js")];case 1:return[4,(0,t.sent().default)()];case 2:return[2,t.sent()]}}))}))}!function(t){t.EMAIL_IS_NOT_VERIFIED="EMAIL_IS_NOT_VERIFIED",t.CUSTOMER_EMAIL_ALREADY_EXISTS="CUSTOMER_EMAIL_ALREADY_EXISTS",t.UNKOWN="UNKOWN",t.B2B_CUSTOMER_ACCOUNT_DISABLED="B2B_CUSTOMER_ACCOUNT_DISABLED",t.PHONE_IS_NOT_VERIFIED="PHONE_IS_NOT_VERIFIED"}(a||(a={})),function(t){t.CUSTOMER_ACCOUNT_DISABLED="CUSTOMER_ACCOUNT_DISABLED",t.EMAIL_IS_NOT_VERIFIED="EMAIL_IS_NOT_VERIFIED",t.CUSTOMER_NOT_FOUND="CUSTOMER_NOT_FOUND",t.B2B_CUSTOMER_ACCOUNT_DISABLED="B2B_CUSTOMER_ACCOUNT_DISABLED",t.UNKOWN="UNKOWN",t.PHONE_IS_NOT_VERIFIED="PHONE_IS_NOT_VERIFIED",t.WRONG_PASSWORD="WRONG_PASSWORD"}(o||(o={}));export{o as IkasLoginError,a as IkasRegisterError,Q as activateCustomer,E as checkEmail,P as createCustomerReview,T as createOrderRefundRequest,H as deactivateCustomer,k as exportCustomerPersonelData,v as forgotPassword,p as getCustomer,C as getLastViewedProducts,R as getOrderByEmail,S as getOrders,U as isFavoriteProduct,q as listCustomerAttribute,G as listCustomerReviewSummary,M as listCustomerReviews,B as listCustomerSettings,j as listFavoriteProducts,L as listOrderRefundSettings,O as listOrderTransactions,I as listOrderTransactionsWithPrices,c as login,h as recoverPassword,f as refreshToken,_ as register,y as resendCustomerActivationMail,V as resendCustomerPhoneVerificationCode,m as saveCustomer,D as saveCustomerFormData,g as saveFavoriteProduct,N as saveLastViewedProducts,b as sendContactFormToMerchant,d as socialLogin,A as subscribeToMarketingNotifications,W as validateCustomerPhoneVerificationCode};
|
|
1
|
+
import{__awaiter as t,__generator as r,__assign as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as n}from"@ikas/fe-api-client";import{initIkasCustomerReview as i,initIkasCustomerAttribute as s}from"@ikas/storefront-models";import{IkasStorefrontConfig as u}from"@ikas/storefront-config";var a,o;function c(i){var s;return t(this,void 0,void 0,(function(){var t,u,a,o,c;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/customerLogin.js")];case 1:return t=r.sent().default,a=t,o=[i],[4,E()];case 2:return[4,a.apply(void 0,o.concat([r.sent()]))];case 3:return u=r.sent(),c=(null===(s=u.data)||void 0===s?void 0:s.customer)||null,[2,new n(u.data?e(e({},u.data),{customer:c}):null,u.graphQLErrors)]}}))}))}function _(i){var s;return t(this,void 0,void 0,(function(){var t,u,a,o,c;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/customerSocialLogin.js")];case 1:return t=r.sent().default,a=t,o=[i],[4,E()];case 2:return[4,a.apply(void 0,o.concat([r.sent()]))];case 3:return u=r.sent(),c=(null===(s=u.data)||void 0===s?void 0:s.customer)||null,[2,new n(u.data?e(e({},u.data),{customer:c}):null,u.graphQLErrors)]}}))}))}function d(i){var s;return t(this,void 0,void 0,(function(){var t,u,a,o,c;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/registerCustomer.js")];case 1:return t=r.sent().default,a=t,o=[i],[4,E()];case 2:return[4,a.apply(void 0,o.concat([r.sent()]))];case 3:return u=r.sent(),c=(null===(s=u.data)||void 0===s?void 0:s.customer)||null,[2,new n(u.data?e(e({},u.data),{customer:c}):null,u.graphQLErrors)]}}))}))}function E(){return t(this,void 0,void 0,(function(){var t,e;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/customerLogin.js")];case 1:return t=r.sent().ResponseField,e=["CUSTOMER__ADDRESSES__REGION__CREATED_AT","CUSTOMER__ADDRESSES__REGION__DELETED","CUSTOMER__ADDRESSES__REGION__UPDATED_AT"],[2,Object.entries(t).filter((function(t){var r=t[0];return!e.includes(r)})).map((function(t){return t[1]}))]}}))}))}function l(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/customerRefreshToken.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function f(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/customerForgotPassword.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function v(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/customerRecoverPassword.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function I(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/checkCustomerEmail.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function S(){return t(this,void 0,void 0,(function(){var t,i,s,u;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getMyCustomer.js")];case 1:return t=r.sent().default,s=t,[4,X()];case 2:return[4,s.apply(void 0,[r.sent()])];case 3:return i=r.sent(),u=i.data||null,[2,new n(i.data?e(e({},i.data),{customer:u}):null,i.graphQLErrors)]}}))}))}function O(i){return t(this,void 0,void 0,(function(){var t,s,u,a,o;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/saveMyCustomer.js")];case 1:return t=r.sent().default,u=t,a=[i],[4,X()];case 2:return[4,u.apply(void 0,a.concat([r.sent()]))];case 3:return s=r.sent(),o=s.data||null,[2,new n(s.data?e(e({},s.data),{customer:o}):null,s.graphQLErrors)]}}))}))}function h(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/saveCustomerFormData.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function p(e){return t(this,void 0,void 0,(function(){var t,i,s,u,a;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getCustomerOrders.js")];case 1:return t=r.sent().default,s=t,u=[e],[4,T()];case 2:return[4,s.apply(void 0,u.concat([r.sent()]))];case 3:return i=r.sent(),null==(a=i.data)||a.forEach((function(t){var r;(null===(r=t.orderLineItems)||void 0===r?void 0:r.length)&&(t.orderLineItems=t.orderLineItems.filter((function(t){return!t.deleted})))})),[2,new n(a,i.graphQLErrors)]}}))}))}function L(e){return t(this,void 0,void 0,(function(){var t,i,s,u,a;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getOrderByEmail.js")];case 1:return t=r.sent().default,s=t,u=[e],[4,T()];case 2:return[4,s.apply(void 0,u.concat([r.sent()]))];case 3:return i=r.sent(),a=i.data,[2,new n(a,i.graphQLErrors)]}}))}))}function m(e){return t(this,void 0,void 0,(function(){var t,i;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listOrderTransactions.js")];case 1:return[4,(0,r.sent().default)(e)];case 2:return t=r.sent(),i=t.data,[2,new n(i,t.graphQLErrors)]}}))}))}function A(e){return t(this,void 0,void 0,(function(){var t,i;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listOrderTransactionsWithPrices.js")];case 1:return[4,(0,r.sent().default)(e)];case 2:return t=r.sent(),i=t.data,[2,new n(i,t.graphQLErrors)]}}))}))}function D(e){return t(this,void 0,void 0,(function(){var t,i,s,u,a;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/createOrderRefundRequest.js")];case 1:return t=r.sent().default,s=t,u=[e],[4,T()];case 2:return[4,s.apply(void 0,u.concat([r.sent()]))];case 3:return i=r.sent(),a=i.data,[2,new n(a,i.graphQLErrors)]}}))}))}function T(){return t(this,void 0,void 0,(function(){var t,e;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getCustomerOrders.js")];case 1:return t=r.sent().ResponseField,e=["BILLING_ADDRESS__REGION__CREATED_AT","BILLING_ADDRESS__REGION__DELETED","BILLING_ADDRESS__REGION__UPDATED_AT","SHIPPING_ADDRESS__REGION__CREATED_AT","SHIPPING_ADDRESS__REGION__DELETED","SHIPPING_ADDRESS__REGION__UPDATED_AT"],[2,Object.entries(t).filter((function(t){var r=t[0];return!e.includes(r)})).map((function(t){return t[1]}))]}}))}))}function N(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/subscribeToMarketingNotifications.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function C(e){var i;return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getLastViewedProducts.js")];case 1:return[4,(0,r.sent().default)(e)];case 2:return t=r.sent(),[2,new n(null===(i=t.data)||void 0===i?void 0:i.products,t.graphQLErrors)]}}))}))}function R(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/saveLastViewedProducts.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function w(i){var s;return t(this,void 0,void 0,(function(){var t,u;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listOrderRefundSettings.js")];case 1:return[4,(0,r.sent().default)(i)];case 2:return t=r.sent(),u=(null===(s=t.data)||void 0===s?void 0:s.map((function(t){return e({},t)})))||null,[2,new n(u,t.graphQLErrors)]}}))}))}function G(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/sendContactFormToMerchant.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function P(){return t(this,void 0,void 0,(function(){var t,e;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listFavoriteProducts.js")];case 1:return[4,(0,r.sent().default)()];case 2:return t=r.sent(),e=t.data||null,[2,new n(e,t.graphQLErrors)]}}))}))}function b(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/saveFavoriteProduct.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function j(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/isFavoriteProduct.js")];case 1:return[4,(0,t.sent().default)({productId:e.productId})];case 2:return[2,t.sent()]}}))}))}function U(e){return t(this,void 0,void 0,(function(){var t,s;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/createCustomerReview.js")];case 1:return[4,(0,r.sent().default)(e)];case 2:return t=r.sent(),(s=t.data)&&i(s),[2,new n(s,t.graphQLErrors)]}}))}))}function g(s){var u;return t(this,void 0,void 0,(function(){var t,a;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listCustomerReviews.js")];case 1:return[4,(0,r.sent().default)(s)];case 2:return t=r.sent(),(a=(null===(u=t.data)||void 0===u?void 0:u.data)||[]).forEach(i),[2,new n(t.data?e(e({},t.data),{data:a}):null,t.graphQLErrors)]}}))}))}function M(i){var s;return t(this,void 0,void 0,(function(){var t,u;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listCustomerReviewSummary.js")];case 1:return[4,(0,r.sent().default)(i)];case 2:return t=r.sent(),u=(null===(s=t.data)||void 0===s?void 0:s.data)||[],[2,new n(e(e({},t.data),{data:u}),t.graphQLErrors)]}}))}))}function B(){return t(this,void 0,void 0,(function(){var t,e;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listCustomerAttribute.js")];case 1:return[4,(0,r.sent().default)()];case 2:return t=r.sent(),(e=t.data||[]).sort((function(t,r){return t.order&&r.order?t.order-r.order:-1})).forEach((function(t){return s(t,u.getCurrentLocale())})),[2,new n(e,t.graphQLErrors)]}}))}))}function X(){return t(this,void 0,void 0,(function(){var t,e;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getMyCustomer.js")];case 1:return t=r.sent().ResponseField,e=["NOTE","TAG_IDS","CUSTOMER_GROUP_IDS","PASSWORD_UPDATE_DATE","ORDER_COUNT","REGISTRATION_SOURCE","ADDRESSES__REGION__CREATED_AT","ADDRESSES__REGION__DELETED","ADDRESSES__REGION__UPDATED_AT"],[2,Object.entries(t).filter((function(t){var r=t[0];return!e.includes(r)})).map((function(t){return t[1]}))]}}))}))}function F(i){return t(this,void 0,void 0,(function(){var t,s;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listCustomerSettings.js")];case 1:return[4,(0,r.sent().default)(i)];case 2:return t=r.sent(),s=t.data||[],[2,new n(e(e({},t.data),{data:s}),t.graphQLErrors)]}}))}))}function Q(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/activateCustomer.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function V(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/resendCustomerActivationMail.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function q(){return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/resendCustomerPhoneVerificationCode.js")];case 1:return[4,(0,r.sent().default)()];case 2:return t=r.sent(),[2,new n(t.data,t.graphQLErrors)]}}))}))}function H(e){return t(this,void 0,void 0,(function(){var t;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/validateCustomerPhoneVerificationCode.js")];case 1:return[4,(0,r.sent().default)(e)];case 2:return t=r.sent(),[2,new n(t.data,t.graphQLErrors)]}}))}))}function W(i){var s;return t(this,void 0,void 0,(function(){var t,u;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/mutations/validateOTPCode.js")];case 1:return[4,(0,r.sent().default)(i)];case 2:return t=r.sent(),u=(null===(s=t.data)||void 0===s?void 0:s.customer)||null,[2,new n(t.data?e(e({},t.data),{customer:u}):null,t.graphQLErrors)]}}))}))}function y(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/customerDeactivate.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function Y(){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/exportCustomerPersonalData.js")];case 1:return[4,(0,t.sent().default)()];case 2:return[2,t.sent()]}}))}))}!function(t){t.EMAIL_IS_NOT_VERIFIED="EMAIL_IS_NOT_VERIFIED",t.CUSTOMER_EMAIL_ALREADY_EXISTS="CUSTOMER_EMAIL_ALREADY_EXISTS",t.UNKOWN="UNKOWN",t.B2B_CUSTOMER_ACCOUNT_DISABLED="B2B_CUSTOMER_ACCOUNT_DISABLED",t.PHONE_IS_NOT_VERIFIED="PHONE_IS_NOT_VERIFIED",t.FACEBOOK_SOCIAL_LOGIN_EXISTS="FACEBOOK_SOCIAL_LOGIN_EXISTS",t.GOOGLE_SOCIAL_LOGIN_EXISTS="GOOGLE_SOCIAL_LOGIN_EXISTS",t.APPLE_SOCIAL_LOGIN_EXISTS="APPLE_SOCIAL_LOGIN_EXISTS",t.TWITCH_SOCIAL_LOGIN_EXISTS="TWITCH_SOCIAL_LOGIN_EXISTS",t.SOCIAL_LOGIN_EXISTS="SOCIAL_LOGIN_EXISTS",t.INVALID_CODE="INVALID_CODE",t.OTP_CODE_ALREADY_SEND="OTP_CODE_ALREADY_SEND",t.CUSTOMER_PHONE_ALREADY_EXISTS="CUSTOMER_PHONE_ALREADY_EXISTS",t.PHONE_NUMBER_INVALID="PHONE_NUMBER_INVALID"}(a||(a={})),function(t){t.CUSTOMER_ACCOUNT_DISABLED="CUSTOMER_ACCOUNT_DISABLED",t.EMAIL_IS_NOT_VERIFIED="EMAIL_IS_NOT_VERIFIED",t.CUSTOMER_NOT_FOUND="CUSTOMER_NOT_FOUND",t.B2B_CUSTOMER_ACCOUNT_DISABLED="B2B_CUSTOMER_ACCOUNT_DISABLED",t.UNKOWN="UNKOWN",t.PHONE_IS_NOT_VERIFIED="PHONE_IS_NOT_VERIFIED",t.WRONG_PASSWORD="WRONG_PASSWORD",t.FACEBOOK_SOCIAL_LOGIN_EXISTS="FACEBOOK_SOCIAL_LOGIN_EXISTS",t.GOOGLE_SOCIAL_LOGIN_EXISTS="GOOGLE_SOCIAL_LOGIN_EXISTS",t.APPLE_SOCIAL_LOGIN_EXISTS="APPLE_SOCIAL_LOGIN_EXISTS",t.TWITCH_SOCIAL_LOGIN_EXISTS="TWITCH_SOCIAL_LOGIN_EXISTS",t.SOCIAL_LOGIN_EXISTS="SOCIAL_LOGIN_EXISTS",t.INVALID_CODE="INVALID_CODE",t.OTP_CODE_ALREADY_SEND="OTP_CODE_ALREADY_SEND",t.CUSTOMER_PHONE_ALREADY_EXISTS="CUSTOMER_PHONE_ALREADY_EXISTS",t.PHONE_NUMBER_INVALID="PHONE_NUMBER_INVALID"}(o||(o={}));export{o as IkasLoginError,a as IkasRegisterError,Q as activateCustomer,I as checkEmail,U as createCustomerReview,D as createOrderRefundRequest,y as deactivateCustomer,Y as exportCustomerPersonelData,f as forgotPassword,S as getCustomer,C as getLastViewedProducts,L as getOrderByEmail,p as getOrders,j as isFavoriteProduct,B as listCustomerAttribute,M as listCustomerReviewSummary,g as listCustomerReviews,F as listCustomerSettings,P as listFavoriteProducts,w as listOrderRefundSettings,m as listOrderTransactions,A as listOrderTransactionsWithPrices,c as login,v as recoverPassword,l as refreshToken,d as register,V as resendCustomerActivationMail,q as resendCustomerPhoneVerificationCode,O as saveCustomer,h as saveCustomerFormData,b as saveFavoriteProduct,R as saveLastViewedProducts,G as sendContactFormToMerchant,_ as socialLogin,N as subscribeToMarketingNotifications,H as validateCustomerPhoneVerificationCode,W as validateOTPCode};
|
|
@@ -24,6 +24,7 @@ export declare function searchProducts(params: SearchProductsQueryParams, exclud
|
|
|
24
24
|
limit: number;
|
|
25
25
|
page: number;
|
|
26
26
|
results: SearchProduct[];
|
|
27
|
+
suggestions: import("../../__api/types").SearchSuggestion[] | null;
|
|
27
28
|
totalCount: number;
|
|
28
29
|
} | null>>;
|
|
29
30
|
export declare function getProductFilterData(params: GetProductFilterDataQueryParams): Promise<APIResponse<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as n,__spreadArray as r}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as i}from"@ikas/fe-api-client";import{IkasStorefrontConfig as a}from"@ikas/storefront-config";import{initIkasCampaignOffer as u,initIkasProduct as o,IkasBrandOrderType as d,IkasCategoryProductsOrderType as l,initIkasProductAttribute as s,initIkasProductOptionSet as c}from"@ikas/storefront-models";function p(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/listProductBackInStockRemind.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function v(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/saveProductBackInStockRemind.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function m(n){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listCampaignOffer.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),null===(r=t.data)||void 0===r||r.forEach((function(t){u(t,a.getCurrentLocale())})),[2,new i(t.data||null,t.graphQLErrors)]}}))}))}function f(r,u){var d,l;return t(this,void 0,void 0,(function(){var t,s,c,p,v,m;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/searchProducts.js")];case 1:return t=e.sent().default,s=null===(d=a.getCurrentRouting())||void 0===d?void 0:d.dynamicCurrencySettings,p=t,v=[{input:n({locale:a.getCurrentLocale(),dynamicCurrencySettings:s?{roundingFormat:s.roundingFormat,targetCurrencyCode:s.targetCurrencyCode}:void 0},r.input)}],[4,L(u)];case 2:return[4,p.apply(void 0,v.concat([e.sent()]))];case 3:return c=e.sent(),null==(m=null===(l=c.data)||void 0===l?void 0:l.results.map(_))||m.forEach((function(t){return o(t,a.getCurrentLocale())})),[2,new i(c.data?n(n({},c.data),{data:m}):null,c.graphQLErrors)]}}))}))}function g(n){var r,a,u;return t(this,void 0,void 0,(function(){var t,o,d,l;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getProductFilterData.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),o=null===(r=t.data)||void 0===r?void 0:r.filters,d=(null===(a=t.data)||void 0===a?void 0:a.categories)||null,l=(null===(u=t.data)||void 0===u?void 0:u.disabledSortTypes)||null,[2,new i(t.data?{filters:o,categories:d,disabledSortTypes:l}:null,t.graphQLErrors)]}}))}))}function h(r){var u,d;return t(this,void 0,void 0,(function(){var t,l,s,c;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getRelatedProducts.js")];case 1:return t=e.sent().default,l=null===(u=a.getCurrentRouting())||void 0===u?void 0:u.dynamicCurrencySettings,[4,t(n({locale:a.getCurrentLocale(),dynamicCurrencySettings:l?{roundingFormat:l.roundingFormat,targetCurrencyCode:l.targetCurrencyCode}:void 0},r))];case 2:return s=e.sent(),(c=(null===(d=null==s?void 0:s.data)||void 0===d?void 0:d.map((function(t){return _(t)})))||[]).forEach((function(t){return o(t,a.getCurrentLocale())})),[2,new i(s.data?{data:c,count:s.data.length,facets:null,limit:20,page:1,totalCount:s.data.length}:null,s.graphQLErrors)]}}))}))}function b(r){var u,d;return t(this,void 0,void 0,(function(){var t,l,s,c;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getSuggestedProducts.js")];case 1:return t=e.sent().default,l=null===(u=a.getCurrentRouting())||void 0===u?void 0:u.dynamicCurrencySettings,[4,t(n({locale:a.getCurrentLocale(),dynamicCurrencySettings:l?{roundingFormat:l.roundingFormat,targetCurrencyCode:l.targetCurrencyCode}:void 0},r))];case 2:return s=e.sent(),(c=(null===(d=null==s?void 0:s.data)||void 0===d?void 0:d.map((function(t){return _(t)})))||[]).forEach((function(t){return o(t,a.getCurrentLocale())})),[2,new i(s.data?{data:c,count:s.data.length,facets:null,limit:20,page:1,totalCount:s.data.length}:null,s.graphQLErrors)]}}))}))}function y(n){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listProductAttribute.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),null==(r=t.data)||r.forEach((function(t){return s(t,a.getCurrentLocale())})),[2,new i(r,t.graphQLErrors)]}}))}))}function C(n){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getProductCampaigns.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return t})),t.graphQLErrors)]}}))}))}function I(n){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getVariantStockLocations.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.stockLocations.map((function(t){return t})),t.graphQLErrors)]}}))}))}function A(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/getOrderLineFile.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function T(n){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listProductOptionSet.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),null==(r=t.data)||r.forEach((function(t){return c(t,a.getCurrentLocale())})),[2,new i(r,t.graphQLErrors)]}}))}))}function L(n){return t(this,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/searchProducts.js")];case 1:return t=e.sent().ResponseField,i=["DATA"],n&&n.length&&n.map((function(e){var n=Object.keys(t).filter((function(t){return t.startsWith(e)}));i=r(r([],i,!0),n,!0)})),[2,Object.entries(t).filter((function(t){var e=t[0];return!i.includes(e)})).map((function(t){return t[1]}))]}}))}))}function _(t){var e,r,i,u,o,s="local"===process.env.NEXT_PUBLIC_ENV;return{id:t.id,type:t.type,groupVariantsByVariantTypeId:t.groupVariantsByVariantTypeId,deleted:t.deleted,attributes:(null===(e=t.attributes)||void 0===e?void 0:e.map((function(t){var e,r,i,a,u,o;return n(n({},t),{value:t.value,productAttributeId:(null===(e=t.productAttribute)||void 0===e?void 0:e.id)||null,productAttributeOptionId:(null===(r=t.productAttributeOption)||void 0===r?void 0:r.id)||null,productAttribute:{id:(null===(i=t.productAttribute)||void 0===i?void 0:i.id)||"",name:(null===(a=t.productAttribute)||void 0===a?void 0:a.name)||"",description:null,type:null===(u=t.productAttribute)||void 0===u?void 0:u.type,tableTemplate:(null===(o=t.productAttribute)||void 0===o?void 0:o.tableTemplate)?t.productAttribute.tableTemplate:null,options:null},productAttributeOption:t.productAttributeOption})})))||[],brand:t.brand?n(n({},t.brand),{id:t.brand.id,name:t.brand.name,createdAt:0,updatedAt:0,description:null,imageId:t.brand.imageId,orderType:d.BEST_SELLER,metaData:{id:"",createdAt:0,updatedAt:0,slug:t.brand.slug||""}}):null,campaigns:null===(r=t.campaigns)||void 0===r?void 0:r.map((function(t){return{campaign:t,variantIds:[]}})),campaignOffers:t.campaignOffers,categories:(null===(i=t.categories)||void 0===i?void 0:i.map((function(t){var e;return n(n({},t),{categoryPath:t.path.map((function(t){return t.name})),description:null,imageId:null,parentId:null,metaData:t.slug?{id:"",createdAt:0,updatedAt:0,name:t.name||"",slug:t.slug,translations:null===(e=t.translations)||void 0===e?void 0:e.map((function(t){return{pageTitle:t.name,slug:t.slug,locale:t.locale,description:null}}))}:null,categoryPathItems:t.path.map((function(t){return{metaData:{id:"",createdAt:0,updatedAt:0,name:t.name||"",slug:t.slug||""},description:null,name:t.name,translations:t.translations,imageId:null,id:t.id,createdAt:0,updatedAt:0}})),createdAt:0,updatedAt:0,orderType:l.BEST_SELLER,conditions:null,conditionValues:null})})))||[],tags:t.tags||[],description:t.description||"",averageRating:t.averageRating,reviewCount:t.reviewCount,stars:t.stars,baseUnit:t.baseUnit,metaData:n(n({},t.metaData),{id:"",createdAt:0,updatedAt:0,slug:(null===(u=t.metaData)||void 0===u?void 0:u.slug)||""})||null,name:t.name,shortDescription:t.shortDescription||"",productOptionSetId:t.productOptionSetId,variantTypes:t.productVariantTypes.map((function(t){return{order:t.order,variantType:{id:t.variantType.id,name:t.variantType.name,selectionType:t.variantType.selectionType,values:t.variantType.values.map((function(e){return{id:e.id,colorCode:e.colorCode,name:e.name,thumbnailImageId:e.thumbnailImageId,variantTypeId:t.variantType.id}})).filter((function(e){return t.variantValueIds.includes(e.id)}))},variantValueIds:t.variantValueIds}})),variants:t.variants.map((function(e){var r,i,u,o;return n(n({},e),{id:e.id,productId:t.id,images:(null===(r=e.images)||void 0===r?void 0:r.map((function(t){return{imageId:t.id,isMain:t.isMain||!1,isVideo:t.isVideo,order:t.order,fileName:t.fileName}})))||null,sellIfOutOfStock:e.sellIfOutOfStock||!1,unit:e.unit,attributes:(null===(i=e.attributes)||void 0===i?void 0:i.map((function(t){var e,r,i,a,u,o;return n(n({},t),{value:t.value,productAttributeId:(null===(e=t.productAttribute)||void 0===e?void 0:e.id)||null,productAttributeOptionId:(null===(r=t.productAttributeOption)||void 0===r?void 0:r.id)||null,productAttribute:{id:(null===(i=t.productAttribute)||void 0===i?void 0:i.id)||"",name:(null===(a=t.productAttribute)||void 0===a?void 0:a.name)||"",description:"",type:null===(u=t.productAttribute)||void 0===u?void 0:u.type,tableTemplate:(null===(o=t.productAttribute)||void 0===o?void 0:o.tableTemplate)?t.productAttribute.tableTemplate:null,options:null},productAttributeOption:t.productAttributeOption})})))||[],sku:e.sku,barcodeList:e.barcodeList||null,prices:e.prices||[],price:{buyPrice:null,campaignPrice:null,currency:"",currencyCode:"",currencySymbol:"",discountPrice:null,priceListId:null,sellPrice:0,unitPrice:null},stock:(null===(u=e.stocks)||void 0===u?void 0:u.filter((function(t){var e;return s||a.getIsEditor()||(null===(e=a.getStockLocationIds())||void 0===e?void 0:e.includes(t.stockLocationId))})).reduce((function(t,e){return e.stockCount+t}),0))||0,variantValues:(null===(o=e.variantValues)||void 0===o?void 0:o.map((function(e){var n=t.productVariantTypes.find((function(t){return t.variantType.id===e.variantTypeId})),r=null==n?void 0:n.variantType.values.find((function(t){return t.id===e.variantValueId}));return{id:e.variantValueId,name:(null==r?void 0:r.name)||"",colorCode:(null==r?void 0:r.colorCode)||"",thumbnailImageId:(null==r?void 0:r.thumbnailImageId)||"",variantTypeId:(null==n?void 0:n.variantType.id)||""}})))||[],isActive:e.isActive||!1,bundleSettings:e.bundleSettings||null})})),dynamicPriceListIds:null,productVolumeDiscountId:null,productGroup:t.productGroup,salesChannels:null===(o=t.salesChannels)||void 0===o?void 0:o.filter((function(t){return t.id===a.getSalesChannelId()}))}}export{A as getOrderLineFile,C as getProductCampaigns,g as getProductFilterData,h as getRelatedProducts,b as getSuggestedProducts,I as getVariantStockLocations,m as listCampaignOffer,y as listProductAttribute,p as listProductBackInStockRemind,T as listProductOptionSet,v as saveProductBackInStockRemind,f as searchProducts};
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as n,__spreadArray as r}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as i}from"@ikas/fe-api-client";import{IkasStorefrontConfig as a}from"@ikas/storefront-config";import{initIkasCampaignOffer as u,initIkasProduct as o,IkasBrandOrderType as d,IkasCategoryProductsOrderType as l,initIkasProductAttribute as s,initIkasProductOptionSet as c}from"@ikas/storefront-models";function p(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/queries/listProductBackInStockRemind.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function v(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/saveProductBackInStockRemind.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function m(n){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listCampaignOffer.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),null===(r=t.data)||void 0===r||r.forEach((function(t){u(t,a.getCurrentLocale())})),[2,new i(t.data||null,t.graphQLErrors)]}}))}))}function f(r,u){var d,l;return t(this,void 0,void 0,(function(){var t,s,c,p,v,m;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/searchProducts.js")];case 1:return t=e.sent().default,s=null===(d=a.getCurrentRouting())||void 0===d?void 0:d.dynamicCurrencySettings,p=t,v=[{input:n({locale:a.getCurrentLocale(),dynamicCurrencySettings:s?{roundingFormat:s.roundingFormat,targetCurrencyCode:s.targetCurrencyCode}:void 0},r.input)}],[4,L(u)];case 2:return[4,p.apply(void 0,v.concat([e.sent()]))];case 3:return c=e.sent(),null==(m=null===(l=c.data)||void 0===l?void 0:l.results.map(_))||m.forEach((function(t){return o(t,a.getCurrentLocale())})),[2,new i(c.data?n(n({},c.data),{data:m}):null,c.graphQLErrors)]}}))}))}function g(n){var r,a,u;return t(this,void 0,void 0,(function(){var t,o,d,l;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getProductFilterData.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),o=null===(r=t.data)||void 0===r?void 0:r.filters,d=(null===(a=t.data)||void 0===a?void 0:a.categories)||null,l=(null===(u=t.data)||void 0===u?void 0:u.disabledSortTypes)||null,[2,new i(t.data?{filters:o,categories:d,disabledSortTypes:l}:null,t.graphQLErrors)]}}))}))}function h(r){var u,d;return t(this,void 0,void 0,(function(){var t,l,s,c;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getRelatedProducts.js")];case 1:return t=e.sent().default,l=null===(u=a.getCurrentRouting())||void 0===u?void 0:u.dynamicCurrencySettings,[4,t(n({locale:a.getCurrentLocale(),dynamicCurrencySettings:l?{roundingFormat:l.roundingFormat,targetCurrencyCode:l.targetCurrencyCode}:void 0},r))];case 2:return s=e.sent(),(c=(null===(d=null==s?void 0:s.data)||void 0===d?void 0:d.map((function(t){return _(t)})))||[]).forEach((function(t){return o(t,a.getCurrentLocale())})),[2,new i(s.data?{data:c,count:s.data.length,facets:null,limit:20,page:1,totalCount:s.data.length}:null,s.graphQLErrors)]}}))}))}function b(r){var u,d;return t(this,void 0,void 0,(function(){var t,l,s,c;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getSuggestedProducts.js")];case 1:return t=e.sent().default,l=null===(u=a.getCurrentRouting())||void 0===u?void 0:u.dynamicCurrencySettings,[4,t(n({locale:a.getCurrentLocale(),dynamicCurrencySettings:l?{roundingFormat:l.roundingFormat,targetCurrencyCode:l.targetCurrencyCode}:void 0},r))];case 2:return s=e.sent(),(c=(null===(d=null==s?void 0:s.data)||void 0===d?void 0:d.map((function(t){return _(t)})))||[]).forEach((function(t){return o(t,a.getCurrentLocale())})),[2,new i(s.data?{data:c,count:s.data.length,facets:null,limit:20,page:1,totalCount:s.data.length}:null,s.graphQLErrors)]}}))}))}function y(n){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listProductAttribute.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),null==(r=t.data)||r.forEach((function(t){return s(t,a.getCurrentLocale())})),[2,new i(r,t.graphQLErrors)]}}))}))}function C(n){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getProductCampaigns.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.map((function(t){return t})),t.graphQLErrors)]}}))}))}function I(n){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/getVariantStockLocations.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),[2,new i(null===(r=t.data)||void 0===r?void 0:r.stockLocations.map((function(t){return t})),t.graphQLErrors)]}}))}))}function A(n){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/getOrderLineFile.js")];case 1:return[4,(0,t.sent().default)(n)];case 2:return[2,t.sent()]}}))}))}function T(n){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/listProductOptionSet.js")];case 1:return[4,(0,e.sent().default)(n)];case 2:return t=e.sent(),null==(r=t.data)||r.forEach((function(t){return c(t,a.getCurrentLocale())})),[2,new i(r,t.graphQLErrors)]}}))}))}function L(n){return t(this,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return[4,import("../../__api/queries/searchProducts.js")];case 1:return t=e.sent().ResponseField,i=["DATA"],n&&n.length&&n.map((function(e){var n=Object.keys(t).filter((function(t){return t.startsWith(e)}));i=r(r([],i,!0),n,!0)})),[2,Object.entries(t).filter((function(t){var e=t[0];return!i.includes(e)})).map((function(t){return t[1]}))]}}))}))}function _(t){var e,r,i,u,o,s="local"===process.env.NEXT_PUBLIC_ENV;return{id:t.id,type:t.type,groupVariantsByVariantTypeId:t.groupVariantsByVariantTypeId,deleted:t.deleted,attributes:(null===(e=t.attributes)||void 0===e?void 0:e.map((function(t){var e,r,i,a,u,o;return n(n({},t),{value:t.value,productAttributeId:(null===(e=t.productAttribute)||void 0===e?void 0:e.id)||null,productAttributeOptionId:(null===(r=t.productAttributeOption)||void 0===r?void 0:r.id)||null,productAttribute:{id:(null===(i=t.productAttribute)||void 0===i?void 0:i.id)||"",name:(null===(a=t.productAttribute)||void 0===a?void 0:a.name)||"",description:null,type:null===(u=t.productAttribute)||void 0===u?void 0:u.type,tableTemplate:(null===(o=t.productAttribute)||void 0===o?void 0:o.tableTemplate)?t.productAttribute.tableTemplate:null,options:null},productAttributeOption:t.productAttributeOption})})))||[],brand:t.brand?n(n({},t.brand),{id:t.brand.id,name:t.brand.name,createdAt:0,updatedAt:0,description:null,imageId:t.brand.imageId,orderType:d.BEST_SELLER,metaData:{id:"",createdAt:0,updatedAt:0,slug:t.brand.slug||""}}):null,campaigns:null===(r=t.campaigns)||void 0===r?void 0:r.map((function(t){return{campaign:t,variantIds:[]}})),campaignOffers:t.campaignOffers,categories:(null===(i=t.categories)||void 0===i?void 0:i.map((function(t){var e;return n(n({},t),{categoryPath:t.path.map((function(t){return t.name})),description:null,imageId:null,parentId:null,metaData:t.slug?{id:"",createdAt:0,updatedAt:0,name:t.name||"",slug:t.slug,translations:null===(e=t.translations)||void 0===e?void 0:e.map((function(t){return{pageTitle:t.name,slug:t.slug,locale:t.locale,description:null}}))}:null,categoryPathItems:t.path.map((function(t){return{metaData:{id:"",createdAt:0,updatedAt:0,name:t.name||"",slug:t.slug||""},description:null,name:t.name,translations:t.translations,imageId:null,id:t.id,createdAt:0,updatedAt:0}})),createdAt:0,updatedAt:0,orderType:l.BEST_SELLER,conditions:null,conditionValues:null})})))||[],tags:t.tags||[],description:t.description||"",averageRating:t.averageRating,reviewCount:t.reviewCount,stars:t.stars,baseUnit:t.baseUnit,metaData:n(n({},t.metaData),{id:"",createdAt:0,updatedAt:0,slug:(null===(u=t.metaData)||void 0===u?void 0:u.slug)||""})||null,name:t.name,shortDescription:t.shortDescription||"",productOptionSetId:t.productOptionSetId,variantTypes:t.productVariantTypes.map((function(t){return{order:t.order,variantType:{id:t.variantType.id,name:t.variantType.name,selectionType:t.variantType.selectionType,values:t.variantType.values.map((function(e){return{id:e.id,colorCode:e.colorCode,name:e.name,thumbnailImageId:e.thumbnailImageId,variantTypeId:t.variantType.id}})).filter((function(e){return t.variantValueIds.includes(e.id)}))},variantValueIds:t.variantValueIds}})),variants:t.variants.map((function(e){var r,i,u,o;return n(n({},e),{id:e.id,productId:t.id,images:(null===(r=e.images)||void 0===r?void 0:r.map((function(t){return{imageId:t.id,isMain:t.isMain||!1,isVideo:t.isVideo,order:t.order,fileName:t.fileName}})))||null,sellIfOutOfStock:e.sellIfOutOfStock||!1,unit:e.unit,attributes:(null===(i=e.attributes)||void 0===i?void 0:i.map((function(t){var e,r,i,a,u,o;return n(n({},t),{value:t.value,productAttributeId:(null===(e=t.productAttribute)||void 0===e?void 0:e.id)||null,productAttributeOptionId:(null===(r=t.productAttributeOption)||void 0===r?void 0:r.id)||null,productAttribute:{id:(null===(i=t.productAttribute)||void 0===i?void 0:i.id)||"",name:(null===(a=t.productAttribute)||void 0===a?void 0:a.name)||"",description:"",type:null===(u=t.productAttribute)||void 0===u?void 0:u.type,tableTemplate:(null===(o=t.productAttribute)||void 0===o?void 0:o.tableTemplate)?t.productAttribute.tableTemplate:null,options:null},productAttributeOption:t.productAttributeOption})})))||[],sku:e.sku,barcodeList:e.barcodeList||null,prices:e.prices||[],price:{buyPrice:null,campaignPrice:null,currency:"",currencyCode:"",currencySymbol:"",discountPrice:null,priceListId:null,sellPrice:0,unitPrice:null},stock:(null===(u=e.stocks)||void 0===u?void 0:u.filter((function(t){var e;return s||a.getIsEditor()||(null===(e=a.getStockLocationIds())||void 0===e?void 0:e.includes(t.stockLocationId))})).reduce((function(t,e){return e.stockCount+t}),0))||0,variantValues:(null===(o=e.variantValues)||void 0===o?void 0:o.map((function(e){var n=t.productVariantTypes.find((function(t){return t.variantType.id===e.variantTypeId})),r=null==n?void 0:n.variantType.values.find((function(t){return t.id===e.variantValueId}));return{id:e.variantValueId,name:(null==r?void 0:r.name)||"",colorCode:(null==r?void 0:r.colorCode)||"",thumbnailImageId:(null==r?void 0:r.thumbnailImageId)||"",variantTypeId:(null==n?void 0:n.variantType.id)||""}})))||[],isActive:e.isActive||!1,bundleSettings:e.bundleSettings||null})})),dynamicPriceListIds:null,productVolumeDiscountId:null,productGroup:t.productGroup,salesChannels:null===(o=t.salesChannels)||void 0===o?void 0:o.filter((function(t){return t.id===a.getSalesChannelId()})),translations:t.translations?t.translations.map((function(t){return t})):[]}}export{A as getOrderLineFile,C as getProductCampaigns,g as getProductFilterData,h as getRelatedProducts,b as getSuggestedProducts,I as getVariantStockLocations,m as listCampaignOffer,y as listProductAttribute,p as listProductBackInStockRemind,T as listProductOptionSet,v as saveProductBackInStockRemind,f as searchProducts};
|
|
@@ -13,4 +13,9 @@ export declare type IkasStorefrontSettings = {
|
|
|
13
13
|
merchantSettings: IkasMerchantSettings;
|
|
14
14
|
customerSettings?: IkasCustomerSettings;
|
|
15
15
|
storefrontPopups: IkasStorefrontPopup[];
|
|
16
|
+
paypalSettings: IkasPaypalSettings[] | null;
|
|
17
|
+
};
|
|
18
|
+
export declare type IkasPaypalSettings = {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string | null;
|
|
16
21
|
};
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Config } from "@ikas/fe-api-client";
|
|
2
|
+
export declare function getAutoAppyCouponCodeFromCookie(): string | null;
|
|
2
3
|
export declare function setAPIClientConfig(): void;
|
|
3
4
|
export * from "./api/blog";
|
|
4
5
|
export * from "./api/brand";
|
|
@@ -18,7 +19,7 @@ export * from "./api/storefront-popup";
|
|
|
18
19
|
export { SaveMyCustomerInput } from "./__api/models/SaveMyCustomerInput";
|
|
19
20
|
export { SaveCartInput } from "./__api/models/SaveCartInput";
|
|
20
21
|
export { CheckStocksLineInput } from "./__api/models/CheckStocksLineInput";
|
|
21
|
-
export { SortByDirectionEnum, SortByTypeEnum, MasterPassOperationTypeEnum, GetSuggestedProductsMethodEnum, TransactionCardAssociationEnum, } from "./__api/types";
|
|
22
|
-
export type { SearchInputOrderByInput, CreateStripePaymentIntentResponse, RetrieveInstallmentInfoResponse, TransactionResponse, UpdateCartCampaignOfferInput, CartLineOptionInput, CreateKlarnaTokenResponse, GetPaypalClientIdResponse, CreatePaypalOrderResponse, CreateAdyenPlatformSessionResponse, } from "./__api/types";
|
|
22
|
+
export { SortByDirectionEnum, SortByTypeEnum, MasterPassOperationTypeEnum, GetSuggestedProductsMethodEnum, TransactionCardAssociationEnum, CampaignOfferTargetPageTypeEnum, } from "./__api/types";
|
|
23
|
+
export type { SearchInputOrderByInput, CreateStripePaymentIntentResponse, RetrieveInstallmentInfoResponse, TransactionResponse, UpdateCartCampaignOfferInput, CartLineOptionInput, CreateKlarnaTokenResponse, GetPaypalClientIdResponse, CreatePaypalOrderResponse, CreateAdyenPlatformSessionResponse, HepsipayFrameInitResponse, } from "./__api/types";
|
|
23
24
|
export { APIResponse } from "@ikas/fe-api-client";
|
|
24
25
|
export { Config as IkasAPIClientConfig };
|
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{setAPIClientConfig}from"./index2.js";export{SaveMyCustomerInput}from"./__api/models/SaveMyCustomerInput.js";export{SaveCartInput}from"./__api/models/SaveCartInput.js";export{CheckStocksLineInput}from"./__api/models/CheckStocksLineInput.js";export{GetSuggestedProductsMethodEnum,MasterPassOperationTypeEnum,SortByDirectionEnum,SortByTypeEnum,TransactionCardAssociationEnum}from"./__api/types/index.js";export{APIResponse,Config as IkasAPIClientConfig}from"@ikas/fe-api-client";export{listBlog,listBlogCategory,listBlogMetaData}from"./api/blog/index.js";export{listProductBrand}from"./api/brand/index.js";export{addItemToCart,createCart,getCartById,removeGiftCardFromCart,saveCart,saveCartCouponCode,updateCartCampaignOffer}from"./api/cart/index.js";export{listCategory}from"./api/category/index.js";export{checkCartStocks,checkStocks,createAdyenBalancePlatformPaymentSession,createKlarnaClientToken,createPayPalOrder,createSaleTransactionWithCart,createStripePaymentIntent,getAvailableShippingCountries,getAvailableStockLocations,getPayPalClientId,listCheckoutSettings,listPaymentGateway,listProductFile,listStockLocations,retrieveInstallmentInfo}from"./api/checkout/index.js";export{IkasLoginError,IkasRegisterError,activateCustomer,checkEmail,createCustomerReview,createOrderRefundRequest,deactivateCustomer,exportCustomerPersonelData,forgotPassword,getCustomer,getLastViewedProducts,getOrderByEmail,getOrders,isFavoriteProduct,listCustomerAttribute,listCustomerReviewSummary,listCustomerReviews,listCustomerSettings,listFavoriteProducts,listOrderRefundSettings,listOrderTransactions,listOrderTransactionsWithPrices,login,recoverPassword,refreshToken,register,resendCustomerActivationMail,resendCustomerPhoneVerificationCode,saveCustomer,saveCustomerFormData,saveFavoriteProduct,saveLastViewedProducts,sendContactFormToMerchant,socialLogin,subscribeToMarketingNotifications,validateCustomerPhoneVerificationCode}from"./api/customer/index.js";export{getDigitalProductFileDownloadUrl,getProductOptionFileUrl,uploadFile}from"./api/file-upload/index.js";export{listHTMLMetaData}from"./api/html-meta-data/index.js";export{getAvailableShippingZones,getMyCountry,listCity,listCountry,listDistrict,listState}from"./api/location/index.js";export{getMasterPassRequestToken}from"./api/masterpass/index.js";export{listMerchantSettings}from"./api/merchant/index.js";export{getOrderLineFile,getProductCampaigns,getProductFilterData,getRelatedProducts,getSuggestedProducts,getVariantStockLocations,listCampaignOffer,listProductAttribute,listProductBackInStockRemind,listProductOptionSet,saveProductBackInStockRemind,searchProducts}from"./api/product/index.js";export{listRaffleMetaData,listRaffleParticipants,listStorefrontRaffle,saveRaffleParticipant}from"./api/raffle/index.js";export{getStorefrontSettings}from"./api/storefront/index.js";export{listStorefrontPopup}from"./api/storefront-popup/index.js";
|
|
1
|
+
export{getAutoAppyCouponCodeFromCookie,setAPIClientConfig}from"./index2.js";export{SaveMyCustomerInput}from"./__api/models/SaveMyCustomerInput.js";export{SaveCartInput}from"./__api/models/SaveCartInput.js";export{CheckStocksLineInput}from"./__api/models/CheckStocksLineInput.js";export{CampaignOfferTargetPageTypeEnum,GetSuggestedProductsMethodEnum,MasterPassOperationTypeEnum,SortByDirectionEnum,SortByTypeEnum,TransactionCardAssociationEnum}from"./__api/types/index.js";export{APIResponse,Config as IkasAPIClientConfig}from"@ikas/fe-api-client";export{listBlog,listBlogCategory,listBlogMetaData}from"./api/blog/index.js";export{listProductBrand}from"./api/brand/index.js";export{addItemToCart,createCart,getCartById,removeGiftCardFromCart,saveCart,saveCartCouponCode,updateCartCampaignOffer}from"./api/cart/index.js";export{listCategory}from"./api/category/index.js";export{checkCartStocks,checkStocks,createAdyenBalancePlatformPaymentSession,createKlarnaClientToken,createPayPalOrder,createSaleTransactionWithCart,createStripePaymentIntent,getAvailableShippingCountries,getAvailableStockLocations,getPayPalClientId,getStoreCreditBalance,hepsipayFrameInit,listCheckoutSettings,listPaymentGateway,listProductFile,listStockLocations,retrieveInstallmentInfo,updatePaypalOrder}from"./api/checkout/index.js";export{IkasLoginError,IkasRegisterError,activateCustomer,checkEmail,createCustomerReview,createOrderRefundRequest,deactivateCustomer,exportCustomerPersonelData,forgotPassword,getCustomer,getLastViewedProducts,getOrderByEmail,getOrders,isFavoriteProduct,listCustomerAttribute,listCustomerReviewSummary,listCustomerReviews,listCustomerSettings,listFavoriteProducts,listOrderRefundSettings,listOrderTransactions,listOrderTransactionsWithPrices,login,recoverPassword,refreshToken,register,resendCustomerActivationMail,resendCustomerPhoneVerificationCode,saveCustomer,saveCustomerFormData,saveFavoriteProduct,saveLastViewedProducts,sendContactFormToMerchant,socialLogin,subscribeToMarketingNotifications,validateCustomerPhoneVerificationCode,validateOTPCode}from"./api/customer/index.js";export{getDigitalProductFileDownloadUrl,getProductOptionFileUrl,uploadFile}from"./api/file-upload/index.js";export{listHTMLMetaData}from"./api/html-meta-data/index.js";export{getAvailableShippingZones,getMyCountry,listCity,listCountry,listDistrict,listState}from"./api/location/index.js";export{getMasterPassRequestToken}from"./api/masterpass/index.js";export{listMerchantSettings}from"./api/merchant/index.js";export{getOrderLineFile,getProductCampaigns,getProductFilterData,getRelatedProducts,getSuggestedProducts,getVariantStockLocations,listCampaignOffer,listProductAttribute,listProductBackInStockRemind,listProductOptionSet,saveProductBackInStockRemind,searchProducts}from"./api/product/index.js";export{listRaffleMetaData,listRaffleParticipants,listStorefrontRaffle,saveRaffleParticipant}from"./api/raffle/index.js";export{getStorefrontSettings}from"./api/storefront/index.js";export{listStorefrontPopup}from"./api/storefront-popup/index.js";
|
package/build/index2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Config as e,APIErrorCode as t}from"@ikas/fe-api-client";export{APIResponse,Config as IkasAPIClientConfig}from"@ikas/fe-api-client";import{IkasStorefrontConfig as
|
|
1
|
+
import{Config as e,APIErrorCode as t}from"@ikas/fe-api-client";export{APIResponse,Config as IkasAPIClientConfig}from"@ikas/fe-api-client";import{IkasStorefrontConfig as o}from"@ikas/storefront-config";import"@ikas/storefront-models";export{IkasLoginError,IkasRegisterError,activateCustomer,checkEmail,createCustomerReview,createOrderRefundRequest,deactivateCustomer,exportCustomerPersonelData,forgotPassword,getCustomer,getLastViewedProducts,getOrderByEmail,getOrders,isFavoriteProduct,listCustomerAttribute,listCustomerReviewSummary,listCustomerReviews,listCustomerSettings,listFavoriteProducts,listOrderRefundSettings,listOrderTransactions,listOrderTransactionsWithPrices,login,recoverPassword,refreshToken,register,resendCustomerActivationMail,resendCustomerPhoneVerificationCode,saveCustomer,saveCustomerFormData,saveFavoriteProduct,saveLastViewedProducts,sendContactFormToMerchant,socialLogin,subscribeToMarketingNotifications,validateCustomerPhoneVerificationCode,validateOTPCode}from"./api/customer/index.js";import"axios";export{SaveMyCustomerInput}from"./__api/models/SaveMyCustomerInput.js";export{SaveCartInput}from"./__api/models/SaveCartInput.js";export{CheckStocksLineInput}from"./__api/models/CheckStocksLineInput.js";export{CampaignOfferTargetPageTypeEnum,GetSuggestedProductsMethodEnum,MasterPassOperationTypeEnum,SortByDirectionEnum,SortByTypeEnum,TransactionCardAssociationEnum}from"./__api/types/index.js";function r(){if("undefined"==typeof window||"undefined"==typeof document)return null;var e=document.cookie.split("; ").find((function(e){return e.startsWith("coupon_code=")}));return e&&e.split("=")[1]||null}function i(){e.URL=o.getApiUrl()||"",e.HEADERS={"x-api-key":o.getApiKey()||"","x-sfid":o.getStorefrontId()||"","x-sfrid":o.getStorefrontRoutingId()||"","x-sid":o.getSessionId()||"","x-vid":o.getVisitorId()||"","x-jid":o.getJourneyId()||"","x-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone||""};var i=r();i&&(e.HEADERS["x-coupon-code"]=i),e.TOKEN=o.getCustomerToken()||"",o.getLoginRequiredCallback()&&(e.ON_ERROR={errorCodes:[{errorCode:t.LOGIN_REQUIRED,callback:o.getLoginRequiredCallback()}]})}o.addObserver({id:"ikas-storefront-api",callback:i});export{r as getAutoAppyCouponCodeFromCookie,i as setAPIClientConfig};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-api",
|
|
3
|
-
"version": "6.1.0-beta.
|
|
3
|
+
"version": "6.1.0-beta.200",
|
|
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": "^6.1.0-beta.
|
|
21
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
20
|
+
"@ikas/storefront-config": "^6.1.0-beta.200",
|
|
21
|
+
"@ikas/storefront-models": "^6.1.0-beta.200",
|
|
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": "^6.1.0-beta.
|
|
38
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
37
|
+
"@ikas/storefront-config": "^6.1.0-beta.200",
|
|
38
|
+
"@ikas/storefront-models": "^6.1.0-beta.200",
|
|
39
39
|
"@ikas/fe-api-client": "^1.0.18",
|
|
40
40
|
"axios": "^0.26.0",
|
|
41
41
|
"ts-essentials": "^7.0.1"
|