@ikas/storefront-api 6.1.0-beta.153 → 6.1.0-beta.155
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.
|
@@ -43,7 +43,10 @@ export declare enum IkasRegisterError {
|
|
|
43
43
|
APPLE_SOCIAL_LOGIN_EXISTS = "APPLE_SOCIAL_LOGIN_EXISTS",
|
|
44
44
|
TWITCH_SOCIAL_LOGIN_EXISTS = "TWITCH_SOCIAL_LOGIN_EXISTS",
|
|
45
45
|
SOCIAL_LOGIN_EXISTS = "SOCIAL_LOGIN_EXISTS",
|
|
46
|
-
INVALID_CODE = "INVALID_CODE"
|
|
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"
|
|
47
50
|
}
|
|
48
51
|
export declare enum IkasLoginError {
|
|
49
52
|
CUSTOMER_ACCOUNT_DISABLED = "CUSTOMER_ACCOUNT_DISABLED",
|
|
@@ -58,7 +61,10 @@ export declare enum IkasLoginError {
|
|
|
58
61
|
APPLE_SOCIAL_LOGIN_EXISTS = "APPLE_SOCIAL_LOGIN_EXISTS",
|
|
59
62
|
TWITCH_SOCIAL_LOGIN_EXISTS = "TWITCH_SOCIAL_LOGIN_EXISTS",
|
|
60
63
|
SOCIAL_LOGIN_EXISTS = "SOCIAL_LOGIN_EXISTS",
|
|
61
|
-
INVALID_CODE = "INVALID_CODE"
|
|
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"
|
|
62
68
|
}
|
|
63
69
|
export declare function login(params: CustomerLoginQueryParams): Promise<APIResponse<{
|
|
64
70
|
customer: IkasCustomer | null;
|
|
@@ -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 _(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 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,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 E(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 h(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 I(){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,B()];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 S(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,B()];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 O(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,C()];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 m(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,C()];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 L(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 T(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 A(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,C()];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 C(){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 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/subscribeToMarketingNotifications.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function N(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 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/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 j(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 P(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 g(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 U(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 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/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 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/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 X(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 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/resendCustomerActivationMail.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function V(){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)()];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 y(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 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",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"}(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"}(o||(o={}));export{o as IkasLoginError,a as IkasRegisterError,q as activateCustomer,h as checkEmail,g as createCustomerReview,A as createOrderRefundRequest,H as deactivateCustomer,K as exportCustomerPersonelData,E as forgotPassword,I as getCustomer,N as getLastViewedProducts,m as getOrderByEmail,p as getOrders,P as isFavoriteProduct,F as listCustomerAttribute,M as listCustomerReviewSummary,U as listCustomerReviews,X as listCustomerSettings,b as listFavoriteProducts,w as listOrderRefundSettings,L as listOrderTransactions,T as listOrderTransactionsWithPrices,c as login,v as recoverPassword,f as refreshToken,d as register,Q as resendCustomerActivationMail,V as resendCustomerPhoneVerificationCode,S as saveCustomer,O as saveCustomerFormData,j as saveFavoriteProduct,R as saveLastViewedProducts,G as sendContactFormToMerchant,_ as socialLogin,D as subscribeToMarketingNotifications,W as validateCustomerPhoneVerificationCode,y as validateOTPCode};
|
|
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 I(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 S(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 O(){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 v(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 m(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 L(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 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/activateCustomer.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}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/resendCustomerActivationMail.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function H(){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)()];case 2:return[2,t.sent()]}}))}))}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/validateCustomerPhoneVerificationCode.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/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,V as activateCustomer,S as checkEmail,U as createCustomerReview,D as createOrderRefundRequest,y as deactivateCustomer,Y as exportCustomerPersonelData,f as forgotPassword,O as getCustomer,C as getLastViewedProducts,m 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,L as listOrderTransactions,A as listOrderTransactionsWithPrices,c as login,I as recoverPassword,l as refreshToken,d as register,q as resendCustomerActivationMail,H as resendCustomerPhoneVerificationCode,v as saveCustomer,h as saveCustomerFormData,b as saveFavoriteProduct,R as saveLastViewedProducts,G as sendContactFormToMerchant,_ as socialLogin,N as subscribeToMarketingNotifications,Q as validateCustomerPhoneVerificationCode,W as validateOTPCode};
|
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 r}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 o(){e.URL=r.getApiUrl()||"",e.HEADERS={"x-api-key":r.getApiKey()||"","x-sfid":r.getStorefrontId()||"","x-sfrid":r.getStorefrontRoutingId()||"","x-sid":r.getSessionId()||"","x-vid":r.getVisitorId()||"","x-jid":r.getJourneyId()||""},e.TOKEN=r.getCustomerToken()||"",r.getLoginRequiredCallback()&&(e.ON_ERROR={errorCodes:[{errorCode:t.LOGIN_REQUIRED,callback:r.getLoginRequiredCallback()}]})}r.addObserver({id:"ikas-storefront-api",callback:o});export{o as setAPIClientConfig};
|
|
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 r}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 o(){e.URL=r.getApiUrl()||"",e.HEADERS={"x-api-key":r.getApiKey()||"","x-sfid":r.getStorefrontId()||"","x-sfrid":r.getStorefrontRoutingId()||"","x-sid":r.getSessionId()||"","x-vid":r.getVisitorId()||"","x-jid":r.getJourneyId()||"","x-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone||""},e.TOKEN=r.getCustomerToken()||"",r.getLoginRequiredCallback()&&(e.ON_ERROR={errorCodes:[{errorCode:t.LOGIN_REQUIRED,callback:r.getLoginRequiredCallback()}]})}r.addObserver({id:"ikas-storefront-api",callback:o});export{o 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.155",
|
|
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.155",
|
|
21
|
+
"@ikas/storefront-models": "^6.1.0-beta.155",
|
|
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.155",
|
|
38
|
+
"@ikas/storefront-models": "^6.1.0-beta.155",
|
|
39
39
|
"@ikas/fe-api-client": "^1.0.18",
|
|
40
40
|
"axios": "^0.26.0",
|
|
41
41
|
"ts-essentials": "^7.0.1"
|