@ikas/storefront-api 6.1.0-beta.137 → 6.1.0-beta.138
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/mutations/customerLogin.d.ts +6 -2
- package/build/__api/mutations/customerLogin.js +1 -1
- package/build/__api/mutations/registerCustomer.d.ts +8 -4
- package/build/__api/mutations/registerCustomer.js +1 -1
- package/build/__api/mutations/{validateCustomerPhoneLoginCode.d.ts → validateOTPCode.d.ts} +4 -2
- package/build/__api/mutations/validateOTPCode.js +1 -0
- package/build/__api/types/index.d.ts +2 -5
- package/build/api/customer/index.d.ts +15 -9
- package/build/api/customer/index.js +1 -1
- package/build/index.js +1 -1
- package/build/index2.js +1 -1
- package/package.json +5 -5
- package/build/__api/mutations/sendCustomerSmsLoginCode.d.ts +0 -8
- package/build/__api/mutations/sendCustomerSmsLoginCode.js +0 -1
- package/build/__api/mutations/smsRegisterCustomer.d.ts +0 -19
- package/build/__api/mutations/smsRegisterCustomer.js +0 -1
- package/build/__api/mutations/validateCustomerPhoneLoginCode.js +0 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
/** DO NOT EDIT - GENERATED AUTO BY IKAS API-CLIENT **/
|
|
1
2
|
import { ConfigType, APIResponse } from "@ikas/fe-api-client";
|
|
2
3
|
import { CustomerLoginResponse } from "../types";
|
|
3
4
|
declare const customerLogin: (variables: QueryParams, fields?: string[], config?: ConfigType) => Promise<APIResponse<CustomerLoginResponse> | APIResponse<undefined>>;
|
|
4
5
|
export default customerLogin;
|
|
5
6
|
export declare type QueryParams = {
|
|
6
7
|
captchaToken?: string | null;
|
|
7
|
-
email
|
|
8
|
-
password
|
|
8
|
+
email?: string | null;
|
|
9
|
+
password?: string | null;
|
|
10
|
+
phone?: string | null;
|
|
9
11
|
};
|
|
10
12
|
export declare enum ResponseField {
|
|
11
13
|
CUSTOMER__ACCOUNT_STATUS = "customer.accountStatus",
|
|
@@ -89,6 +91,8 @@ export declare enum ResponseField {
|
|
|
89
91
|
CUSTOMER__SUBSCRIPTION_STATUS_UPDATED_AT = "customer.subscriptionStatusUpdatedAt",
|
|
90
92
|
CUSTOMER__TAG_IDS = "customer.tagIds",
|
|
91
93
|
CUSTOMER__UPDATED_AT = "customer.updatedAt",
|
|
94
|
+
FLOW_ID = "flowId",
|
|
95
|
+
OTP_SEND = "otpSend",
|
|
92
96
|
TOKEN = "token",
|
|
93
97
|
TOKEN_EXPIRY = "tokenExpiry"
|
|
94
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as _,APIResponse as s,fetchQuery as S}from"@ikas/fe-api-client";var E,r=function(E,r,o){return t(void 0,void 0,void 0,(function(){var t,d,u,R;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,S({operationName:"customerLogin",config:o,variables:E,allReturnFields:T,fields:r,query:function(t){return"\n\t\t\t\tmutation customerLogin (\n\t\t\t\t\t$captchaToken: String,\n\t\t\t\t\t$email: String,\n\t\t\t\t\t$password: String,\n\t\t\t\t\t$phone: String,\n\t\t\t\t) {\n\t\t\t\t\tcustomerLogin (\n\t\t\t\t\t\tcaptchaToken: $captchaToken,\n\t\t\t\t\t\temail: $email,\n\t\t\t\t\t\tpassword: $password,\n\t\t\t\t\t\tphone: $phone,\n\t\t\t\t\t) ".concat(t,"\n\t\t\t\t}\n\t\t\t")}})];case 1:return t=e.sent(),d=t.data,u=t.errors,[2,new s(null==d?void 0:d.customerLogin,u)];case 2:return R=e.sent(),[2,_(R)];case 3:return[2]}}))}))},T="{customer {accountStatus accountStatusUpdatedAt addresses {addressLine1 addressLine2 attributes {customerAttributeId customerAttributeOptionId value } city {code id name } company country {code id iso2 iso3 name } createdAt deleted district {code id name } firstName id identityNumber isDefault lastName phone postalCode region {createdAt deleted id name updatedAt } state {code id name } taxNumber taxOffice title updatedAt } attributes {customerAttributeId customerAttributeOptionId value } birthDate createdAt customerGroupIds customerSegmentIds customerSequence deleted email emailVerifiedDate firstName fullName gender id isEmailVerified isPhoneVerified lastName note orderCount passwordUpdateDate phone phoneSubscriptionStatus phoneSubscriptionStatusUpdatedAt phoneVerifiedDate preferredLanguage priceListId priceListRules {discountRate filters {type valueList } priceListId shouldMatchAllFilters value valueType } registrationSource smsSubscriptionStatus smsSubscriptionStatusUpdatedAt subscriptionStatus subscriptionStatusUpdatedAt tagIds updatedAt } flowId otpSend token tokenExpiry }";!function(t){t.CUSTOMER__ACCOUNT_STATUS="customer.accountStatus",t.CUSTOMER__ACCOUNT_STATUS_UPDATED_AT="customer.accountStatusUpdatedAt",t.CUSTOMER__ADDRESSES__ADDRESS_LINE1="customer.addresses.addressLine1",t.CUSTOMER__ADDRESSES__ADDRESS_LINE2="customer.addresses.addressLine2",t.CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID="customer.addresses.attributes.customerAttributeId",t.CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID="customer.addresses.attributes.customerAttributeOptionId",t.CUSTOMER__ADDRESSES__ATTRIBUTES__VALUE="customer.addresses.attributes.value",t.CUSTOMER__ADDRESSES__CITY__CODE="customer.addresses.city.code",t.CUSTOMER__ADDRESSES__CITY__ID="customer.addresses.city.id",t.CUSTOMER__ADDRESSES__CITY__NAME="customer.addresses.city.name",t.CUSTOMER__ADDRESSES__COMPANY="customer.addresses.company",t.CUSTOMER__ADDRESSES__COUNTRY__CODE="customer.addresses.country.code",t.CUSTOMER__ADDRESSES__COUNTRY__ID="customer.addresses.country.id",t.CUSTOMER__ADDRESSES__COUNTRY__ISO2="customer.addresses.country.iso2",t.CUSTOMER__ADDRESSES__COUNTRY__ISO3="customer.addresses.country.iso3",t.CUSTOMER__ADDRESSES__COUNTRY__NAME="customer.addresses.country.name",t.CUSTOMER__ADDRESSES__CREATED_AT="customer.addresses.createdAt",t.CUSTOMER__ADDRESSES__DELETED="customer.addresses.deleted",t.CUSTOMER__ADDRESSES__DISTRICT__CODE="customer.addresses.district.code",t.CUSTOMER__ADDRESSES__DISTRICT__ID="customer.addresses.district.id",t.CUSTOMER__ADDRESSES__DISTRICT__NAME="customer.addresses.district.name",t.CUSTOMER__ADDRESSES__FIRST_NAME="customer.addresses.firstName",t.CUSTOMER__ADDRESSES__ID="customer.addresses.id",t.CUSTOMER__ADDRESSES__IDENTITY_NUMBER="customer.addresses.identityNumber",t.CUSTOMER__ADDRESSES__IS_DEFAULT="customer.addresses.isDefault",t.CUSTOMER__ADDRESSES__LAST_NAME="customer.addresses.lastName",t.CUSTOMER__ADDRESSES__PHONE="customer.addresses.phone",t.CUSTOMER__ADDRESSES__POSTAL_CODE="customer.addresses.postalCode",t.CUSTOMER__ADDRESSES__REGION__CREATED_AT="customer.addresses.region.createdAt",t.CUSTOMER__ADDRESSES__REGION__DELETED="customer.addresses.region.deleted",t.CUSTOMER__ADDRESSES__REGION__ID="customer.addresses.region.id",t.CUSTOMER__ADDRESSES__REGION__NAME="customer.addresses.region.name",t.CUSTOMER__ADDRESSES__REGION__UPDATED_AT="customer.addresses.region.updatedAt",t.CUSTOMER__ADDRESSES__STATE__CODE="customer.addresses.state.code",t.CUSTOMER__ADDRESSES__STATE__ID="customer.addresses.state.id",t.CUSTOMER__ADDRESSES__STATE__NAME="customer.addresses.state.name",t.CUSTOMER__ADDRESSES__TAX_NUMBER="customer.addresses.taxNumber",t.CUSTOMER__ADDRESSES__TAX_OFFICE="customer.addresses.taxOffice",t.CUSTOMER__ADDRESSES__TITLE="customer.addresses.title",t.CUSTOMER__ADDRESSES__UPDATED_AT="customer.addresses.updatedAt",t.CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID="customer.attributes.customerAttributeId",t.CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID="customer.attributes.customerAttributeOptionId",t.CUSTOMER__ATTRIBUTES__VALUE="customer.attributes.value",t.CUSTOMER__BIRTH_DATE="customer.birthDate",t.CUSTOMER__CREATED_AT="customer.createdAt",t.CUSTOMER__CUSTOMER_GROUP_IDS="customer.customerGroupIds",t.CUSTOMER__CUSTOMER_SEGMENT_IDS="customer.customerSegmentIds",t.CUSTOMER__CUSTOMER_SEQUENCE="customer.customerSequence",t.CUSTOMER__DELETED="customer.deleted",t.CUSTOMER__EMAIL="customer.email",t.CUSTOMER__EMAIL_VERIFIED_DATE="customer.emailVerifiedDate",t.CUSTOMER__FIRST_NAME="customer.firstName",t.CUSTOMER__FULL_NAME="customer.fullName",t.CUSTOMER__GENDER="customer.gender",t.CUSTOMER__ID="customer.id",t.CUSTOMER__IS_EMAIL_VERIFIED="customer.isEmailVerified",t.CUSTOMER__IS_PHONE_VERIFIED="customer.isPhoneVerified",t.CUSTOMER__LAST_NAME="customer.lastName",t.CUSTOMER__NOTE="customer.note",t.CUSTOMER__ORDER_COUNT="customer.orderCount",t.CUSTOMER__PASSWORD_UPDATE_DATE="customer.passwordUpdateDate",t.CUSTOMER__PHONE="customer.phone",t.CUSTOMER__PHONE_SUBSCRIPTION_STATUS="customer.phoneSubscriptionStatus",t.CUSTOMER__PHONE_SUBSCRIPTION_STATUS_UPDATED_AT="customer.phoneSubscriptionStatusUpdatedAt",t.CUSTOMER__PHONE_VERIFIED_DATE="customer.phoneVerifiedDate",t.CUSTOMER__PREFERRED_LANGUAGE="customer.preferredLanguage",t.CUSTOMER__PRICE_LIST_ID="customer.priceListId",t.CUSTOMER__PRICE_LIST_RULES__DISCOUNT_RATE="customer.priceListRules.discountRate",t.CUSTOMER__PRICE_LIST_RULES__FILTERS__TYPE="customer.priceListRules.filters.type",t.CUSTOMER__PRICE_LIST_RULES__FILTERS__VALUE_LIST="customer.priceListRules.filters.valueList",t.CUSTOMER__PRICE_LIST_RULES__PRICE_LIST_ID="customer.priceListRules.priceListId",t.CUSTOMER__PRICE_LIST_RULES__SHOULD_MATCH_ALL_FILTERS="customer.priceListRules.shouldMatchAllFilters",t.CUSTOMER__PRICE_LIST_RULES__VALUE="customer.priceListRules.value",t.CUSTOMER__PRICE_LIST_RULES__VALUE_TYPE="customer.priceListRules.valueType",t.CUSTOMER__REGISTRATION_SOURCE="customer.registrationSource",t.CUSTOMER__SMS_SUBSCRIPTION_STATUS="customer.smsSubscriptionStatus",t.CUSTOMER__SMS_SUBSCRIPTION_STATUS_UPDATED_AT="customer.smsSubscriptionStatusUpdatedAt",t.CUSTOMER__SUBSCRIPTION_STATUS="customer.subscriptionStatus",t.CUSTOMER__SUBSCRIPTION_STATUS_UPDATED_AT="customer.subscriptionStatusUpdatedAt",t.CUSTOMER__TAG_IDS="customer.tagIds",t.CUSTOMER__UPDATED_AT="customer.updatedAt",t.FLOW_ID="flowId",t.OTP_SEND="otpSend",t.TOKEN="token",t.TOKEN_EXPIRY="tokenExpiry"}(E||(E={}));export{E as ResponseField,r as default};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** DO NOT EDIT - GENERATED AUTO BY IKAS API-CLIENT **/
|
|
1
2
|
import { ConfigType, APIResponse } from "@ikas/fe-api-client";
|
|
2
3
|
import { CustomerAttributeValueInput, CustomerLoginResponse } from "../types";
|
|
3
4
|
declare const registerCustomer: (variables: QueryParams, fields?: string[], config?: ConfigType) => Promise<APIResponse<CustomerLoginResponse> | APIResponse<undefined>>;
|
|
@@ -5,13 +6,14 @@ export default registerCustomer;
|
|
|
5
6
|
export declare type QueryParams = {
|
|
6
7
|
attributes?: CustomerAttributeValueInput[] | null;
|
|
7
8
|
captchaToken?: string | null;
|
|
8
|
-
email
|
|
9
|
-
firstName
|
|
9
|
+
email?: string | null;
|
|
10
|
+
firstName?: string | null;
|
|
11
|
+
flowId?: string | null;
|
|
10
12
|
isAcceptMarketing?: boolean | null;
|
|
11
|
-
lastName
|
|
13
|
+
lastName?: string | null;
|
|
12
14
|
locale?: string | null;
|
|
13
15
|
orderId?: string | null;
|
|
14
|
-
password
|
|
16
|
+
password?: string | null;
|
|
15
17
|
phone?: string | null;
|
|
16
18
|
preferredLanguage?: string | null;
|
|
17
19
|
};
|
|
@@ -88,6 +90,8 @@ export declare enum ResponseField {
|
|
|
88
90
|
CUSTOMER__SUBSCRIPTION_STATUS_UPDATED_AT = "customer.subscriptionStatusUpdatedAt",
|
|
89
91
|
CUSTOMER__TAG_IDS = "customer.tagIds",
|
|
90
92
|
CUSTOMER__UPDATED_AT = "customer.updatedAt",
|
|
93
|
+
FLOW_ID = "flowId",
|
|
94
|
+
OTP_SEND = "otpSend",
|
|
91
95
|
TOKEN = "token",
|
|
92
96
|
TOKEN_EXPIRY = "tokenExpiry"
|
|
93
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as s,APIResponse as _,fetchQuery as r}from"@ikas/fe-api-client";var S,E=function(S,E,a){return t(void 0,void 0,void 0,(function(){var t,o,u,i;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r({operationName:"registerCustomer",config:a,variables:S,allReturnFields:d,fields:E,query:function(t){return"\n\t\t\t\tmutation registerCustomer (\n\t\t\t\t\t$attributes: [CustomerAttributeValueInput!],\n\t\t\t\t\t$captchaToken: String,\n\t\t\t\t\t$email: String,\n\t\t\t\t\t$firstName: String,\n\t\t\t\t\t$flowId: String,\n\t\t\t\t\t$isAcceptMarketing: Boolean,\n\t\t\t\t\t$lastName: String,\n\t\t\t\t\t$locale: String,\n\t\t\t\t\t$orderId: String,\n\t\t\t\t\t$password: String,\n\t\t\t\t\t$phone: String,\n\t\t\t\t\t$preferredLanguage: String,\n\t\t\t\t) {\n\t\t\t\t\tregisterCustomer (\n\t\t\t\t\t\tattributes: $attributes,\n\t\t\t\t\t\tcaptchaToken: $captchaToken,\n\t\t\t\t\t\temail: $email,\n\t\t\t\t\t\tfirstName: $firstName,\n\t\t\t\t\t\tflowId: $flowId,\n\t\t\t\t\t\tisAcceptMarketing: $isAcceptMarketing,\n\t\t\t\t\t\tlastName: $lastName,\n\t\t\t\t\t\tlocale: $locale,\n\t\t\t\t\t\torderId: $orderId,\n\t\t\t\t\t\tpassword: $password,\n\t\t\t\t\t\tphone: $phone,\n\t\t\t\t\t\tpreferredLanguage: $preferredLanguage,\n\t\t\t\t\t) ".concat(t,"\n\t\t\t\t}\n\t\t\t")}})];case 1:return t=e.sent(),o=t.data,u=t.errors,[2,new _(null==o?void 0:o.registerCustomer,u)];case 2:return i=e.sent(),[2,s(i)];case 3:return[2]}}))}))},d="{customer {accountStatus accountStatusUpdatedAt addresses {addressLine1 addressLine2 attributes {customerAttributeId customerAttributeOptionId value } city {code id name } company country {code id iso2 iso3 name } createdAt deleted district {code id name } firstName id identityNumber isDefault lastName phone postalCode region {createdAt deleted id name updatedAt } state {code id name } taxNumber taxOffice title updatedAt } attributes {customerAttributeId customerAttributeOptionId value } birthDate createdAt customerGroupIds customerSegmentIds customerSequence deleted email emailVerifiedDate firstName fullName gender id isEmailVerified isPhoneVerified lastName note orderCount passwordUpdateDate phone phoneSubscriptionStatus phoneSubscriptionStatusUpdatedAt phoneVerifiedDate preferredLanguage priceListId priceListRules {discountRate filters {type valueList } priceListId shouldMatchAllFilters value valueType } registrationSource smsSubscriptionStatus smsSubscriptionStatusUpdatedAt subscriptionStatus subscriptionStatusUpdatedAt tagIds updatedAt } flowId otpSend token tokenExpiry }";!function(t){t.CUSTOMER__ACCOUNT_STATUS="customer.accountStatus",t.CUSTOMER__ACCOUNT_STATUS_UPDATED_AT="customer.accountStatusUpdatedAt",t.CUSTOMER__ADDRESSES__ADDRESS_LINE1="customer.addresses.addressLine1",t.CUSTOMER__ADDRESSES__ADDRESS_LINE2="customer.addresses.addressLine2",t.CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID="customer.addresses.attributes.customerAttributeId",t.CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID="customer.addresses.attributes.customerAttributeOptionId",t.CUSTOMER__ADDRESSES__ATTRIBUTES__VALUE="customer.addresses.attributes.value",t.CUSTOMER__ADDRESSES__CITY__CODE="customer.addresses.city.code",t.CUSTOMER__ADDRESSES__CITY__ID="customer.addresses.city.id",t.CUSTOMER__ADDRESSES__CITY__NAME="customer.addresses.city.name",t.CUSTOMER__ADDRESSES__COMPANY="customer.addresses.company",t.CUSTOMER__ADDRESSES__COUNTRY__CODE="customer.addresses.country.code",t.CUSTOMER__ADDRESSES__COUNTRY__ID="customer.addresses.country.id",t.CUSTOMER__ADDRESSES__COUNTRY__ISO2="customer.addresses.country.iso2",t.CUSTOMER__ADDRESSES__COUNTRY__ISO3="customer.addresses.country.iso3",t.CUSTOMER__ADDRESSES__COUNTRY__NAME="customer.addresses.country.name",t.CUSTOMER__ADDRESSES__CREATED_AT="customer.addresses.createdAt",t.CUSTOMER__ADDRESSES__DELETED="customer.addresses.deleted",t.CUSTOMER__ADDRESSES__DISTRICT__CODE="customer.addresses.district.code",t.CUSTOMER__ADDRESSES__DISTRICT__ID="customer.addresses.district.id",t.CUSTOMER__ADDRESSES__DISTRICT__NAME="customer.addresses.district.name",t.CUSTOMER__ADDRESSES__FIRST_NAME="customer.addresses.firstName",t.CUSTOMER__ADDRESSES__ID="customer.addresses.id",t.CUSTOMER__ADDRESSES__IDENTITY_NUMBER="customer.addresses.identityNumber",t.CUSTOMER__ADDRESSES__IS_DEFAULT="customer.addresses.isDefault",t.CUSTOMER__ADDRESSES__LAST_NAME="customer.addresses.lastName",t.CUSTOMER__ADDRESSES__PHONE="customer.addresses.phone",t.CUSTOMER__ADDRESSES__POSTAL_CODE="customer.addresses.postalCode",t.CUSTOMER__ADDRESSES__REGION__CREATED_AT="customer.addresses.region.createdAt",t.CUSTOMER__ADDRESSES__REGION__DELETED="customer.addresses.region.deleted",t.CUSTOMER__ADDRESSES__REGION__ID="customer.addresses.region.id",t.CUSTOMER__ADDRESSES__REGION__NAME="customer.addresses.region.name",t.CUSTOMER__ADDRESSES__REGION__UPDATED_AT="customer.addresses.region.updatedAt",t.CUSTOMER__ADDRESSES__STATE__CODE="customer.addresses.state.code",t.CUSTOMER__ADDRESSES__STATE__ID="customer.addresses.state.id",t.CUSTOMER__ADDRESSES__STATE__NAME="customer.addresses.state.name",t.CUSTOMER__ADDRESSES__TAX_NUMBER="customer.addresses.taxNumber",t.CUSTOMER__ADDRESSES__TAX_OFFICE="customer.addresses.taxOffice",t.CUSTOMER__ADDRESSES__TITLE="customer.addresses.title",t.CUSTOMER__ADDRESSES__UPDATED_AT="customer.addresses.updatedAt",t.CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID="customer.attributes.customerAttributeId",t.CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID="customer.attributes.customerAttributeOptionId",t.CUSTOMER__ATTRIBUTES__VALUE="customer.attributes.value",t.CUSTOMER__CREATED_AT="customer.createdAt",t.CUSTOMER__CUSTOMER_GROUP_IDS="customer.customerGroupIds",t.CUSTOMER__CUSTOMER_SEQUENCE="customer.customerSequence",t.CUSTOMER__DELETED="customer.deleted",t.CUSTOMER__EMAIL="customer.email",t.CUSTOMER__EMAIL_VERIFIED_DATE="customer.emailVerifiedDate",t.CUSTOMER__FIRST_NAME="customer.firstName",t.CUSTOMER__FULL_NAME="customer.fullName",t.CUSTOMER__ID="customer.id",t.CUSTOMER__IS_EMAIL_VERIFIED="customer.isEmailVerified",t.CUSTOMER__IS_PHONE_VERIFIED="customer.isPhoneVerified",t.CUSTOMER__LAST_NAME="customer.lastName",t.CUSTOMER__NOTE="customer.note",t.CUSTOMER__ORDER_COUNT="customer.orderCount",t.CUSTOMER__PASSWORD_UPDATE_DATE="customer.passwordUpdateDate",t.CUSTOMER__PHONE="customer.phone",t.CUSTOMER__PHONE_VERIFIED_DATE="customer.phoneVerifiedDate",t.CUSTOMER__PREFERRED_LANGUAGE="customer.preferredLanguage",t.CUSTOMER__PRICE_LIST_ID="customer.priceListId",t.CUSTOMER__PRICE_LIST_RULES__FILTERS__TYPE="customer.priceListRules.filters.type",t.CUSTOMER__PRICE_LIST_RULES__FILTERS__VALUE_LIST="customer.priceListRules.filters.valueList",t.CUSTOMER__PRICE_LIST_RULES__SHOULD_MATCH_ALL_FILTERS="customer.priceListRules.shouldMatchAllFilters",t.CUSTOMER__PRICE_LIST_RULES__VALUE="customer.priceListRules.value",t.CUSTOMER__PRICE_LIST_RULES__VALUE_TYPE="customer.priceListRules.valueType",t.CUSTOMER__REGISTRATION_SOURCE="customer.registrationSource",t.CUSTOMER__SUBSCRIPTION_STATUS="customer.subscriptionStatus",t.CUSTOMER__SUBSCRIPTION_STATUS_UPDATED_AT="customer.subscriptionStatusUpdatedAt",t.CUSTOMER__TAG_IDS="customer.tagIds",t.CUSTOMER__UPDATED_AT="customer.updatedAt",t.FLOW_ID="flowId",t.OTP_SEND="otpSend",t.TOKEN="token",t.TOKEN_EXPIRY="tokenExpiry"}(S||(S={}));export{S as ResponseField,E as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** DO NOT EDIT - GENERATED AUTO BY IKAS API-CLIENT **/
|
|
2
2
|
import { ConfigType, APIResponse } from "@ikas/fe-api-client";
|
|
3
3
|
import { CustomerLoginResponse } from "../types";
|
|
4
|
-
declare const
|
|
5
|
-
export default
|
|
4
|
+
declare const validateOTPCode: (variables: QueryParams, fields?: string[], config?: ConfigType) => Promise<APIResponse<CustomerLoginResponse> | APIResponse<undefined>>;
|
|
5
|
+
export default validateOTPCode;
|
|
6
6
|
export declare type QueryParams = {
|
|
7
7
|
captchaToken?: string | null;
|
|
8
8
|
verificationCode: string;
|
|
@@ -89,6 +89,8 @@ export declare enum ResponseField {
|
|
|
89
89
|
CUSTOMER__SUBSCRIPTION_STATUS_UPDATED_AT = "customer.subscriptionStatusUpdatedAt",
|
|
90
90
|
CUSTOMER__TAG_IDS = "customer.tagIds",
|
|
91
91
|
CUSTOMER__UPDATED_AT = "customer.updatedAt",
|
|
92
|
+
FLOW_ID = "flowId",
|
|
93
|
+
OTP_SEND = "otpSend",
|
|
92
94
|
TOKEN = "token",
|
|
93
95
|
TOKEN_EXPIRY = "tokenExpiry"
|
|
94
96
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as _,APIResponse as s,fetchQuery as S}from"@ikas/fe-api-client";var E,r=function(E,r,d){return e(void 0,void 0,void 0,(function(){var e,o,u,R;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,S({operationName:"validateOTPCode",config:d,variables:E,allReturnFields:T,fields:r,query:function(e){return"\n\t\t\t\tmutation validateOTPCode (\n\t\t\t\t\t$captchaToken: String,\n\t\t\t\t\t$verificationCode: String!,\n\t\t\t\t) {\n\t\t\t\t\tvalidateOTPCode (\n\t\t\t\t\t\tcaptchaToken: $captchaToken,\n\t\t\t\t\t\tverificationCode: $verificationCode,\n\t\t\t\t\t) ".concat(e,"\n\t\t\t\t}\n\t\t\t")}})];case 1:return e=t.sent(),o=e.data,u=e.errors,[2,new s(null==o?void 0:o.validateOTPCode,u)];case 2:return R=t.sent(),[2,_(R)];case 3:return[2]}}))}))},T="{customer {accountStatus accountStatusUpdatedAt addresses {addressLine1 addressLine2 attributes {customerAttributeId customerAttributeOptionId value } city {code id name } company country {code id iso2 iso3 name } createdAt deleted district {code id name } firstName id identityNumber isDefault lastName phone postalCode region {createdAt deleted id name updatedAt } state {code id name } taxNumber taxOffice title updatedAt } attributes {customerAttributeId customerAttributeOptionId value } birthDate createdAt customerGroupIds customerSegmentIds customerSequence deleted email emailVerifiedDate firstName fullName gender id isEmailVerified isPhoneVerified lastName note orderCount passwordUpdateDate phone phoneSubscriptionStatus phoneSubscriptionStatusUpdatedAt phoneVerifiedDate preferredLanguage priceListId priceListRules {discountRate filters {type valueList } priceListId shouldMatchAllFilters value valueType } registrationSource smsSubscriptionStatus smsSubscriptionStatusUpdatedAt subscriptionStatus subscriptionStatusUpdatedAt tagIds updatedAt } flowId otpSend token tokenExpiry }";!function(e){e.CUSTOMER__ACCOUNT_STATUS="customer.accountStatus",e.CUSTOMER__ACCOUNT_STATUS_UPDATED_AT="customer.accountStatusUpdatedAt",e.CUSTOMER__ADDRESSES__ADDRESS_LINE1="customer.addresses.addressLine1",e.CUSTOMER__ADDRESSES__ADDRESS_LINE2="customer.addresses.addressLine2",e.CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID="customer.addresses.attributes.customerAttributeId",e.CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID="customer.addresses.attributes.customerAttributeOptionId",e.CUSTOMER__ADDRESSES__ATTRIBUTES__VALUE="customer.addresses.attributes.value",e.CUSTOMER__ADDRESSES__CITY__CODE="customer.addresses.city.code",e.CUSTOMER__ADDRESSES__CITY__ID="customer.addresses.city.id",e.CUSTOMER__ADDRESSES__CITY__NAME="customer.addresses.city.name",e.CUSTOMER__ADDRESSES__COMPANY="customer.addresses.company",e.CUSTOMER__ADDRESSES__COUNTRY__CODE="customer.addresses.country.code",e.CUSTOMER__ADDRESSES__COUNTRY__ID="customer.addresses.country.id",e.CUSTOMER__ADDRESSES__COUNTRY__ISO2="customer.addresses.country.iso2",e.CUSTOMER__ADDRESSES__COUNTRY__ISO3="customer.addresses.country.iso3",e.CUSTOMER__ADDRESSES__COUNTRY__NAME="customer.addresses.country.name",e.CUSTOMER__ADDRESSES__CREATED_AT="customer.addresses.createdAt",e.CUSTOMER__ADDRESSES__DELETED="customer.addresses.deleted",e.CUSTOMER__ADDRESSES__DISTRICT__CODE="customer.addresses.district.code",e.CUSTOMER__ADDRESSES__DISTRICT__ID="customer.addresses.district.id",e.CUSTOMER__ADDRESSES__DISTRICT__NAME="customer.addresses.district.name",e.CUSTOMER__ADDRESSES__FIRST_NAME="customer.addresses.firstName",e.CUSTOMER__ADDRESSES__ID="customer.addresses.id",e.CUSTOMER__ADDRESSES__IDENTITY_NUMBER="customer.addresses.identityNumber",e.CUSTOMER__ADDRESSES__IS_DEFAULT="customer.addresses.isDefault",e.CUSTOMER__ADDRESSES__LAST_NAME="customer.addresses.lastName",e.CUSTOMER__ADDRESSES__PHONE="customer.addresses.phone",e.CUSTOMER__ADDRESSES__POSTAL_CODE="customer.addresses.postalCode",e.CUSTOMER__ADDRESSES__REGION__CREATED_AT="customer.addresses.region.createdAt",e.CUSTOMER__ADDRESSES__REGION__DELETED="customer.addresses.region.deleted",e.CUSTOMER__ADDRESSES__REGION__ID="customer.addresses.region.id",e.CUSTOMER__ADDRESSES__REGION__NAME="customer.addresses.region.name",e.CUSTOMER__ADDRESSES__REGION__UPDATED_AT="customer.addresses.region.updatedAt",e.CUSTOMER__ADDRESSES__STATE__CODE="customer.addresses.state.code",e.CUSTOMER__ADDRESSES__STATE__ID="customer.addresses.state.id",e.CUSTOMER__ADDRESSES__STATE__NAME="customer.addresses.state.name",e.CUSTOMER__ADDRESSES__TAX_NUMBER="customer.addresses.taxNumber",e.CUSTOMER__ADDRESSES__TAX_OFFICE="customer.addresses.taxOffice",e.CUSTOMER__ADDRESSES__TITLE="customer.addresses.title",e.CUSTOMER__ADDRESSES__UPDATED_AT="customer.addresses.updatedAt",e.CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID="customer.attributes.customerAttributeId",e.CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID="customer.attributes.customerAttributeOptionId",e.CUSTOMER__ATTRIBUTES__VALUE="customer.attributes.value",e.CUSTOMER__BIRTH_DATE="customer.birthDate",e.CUSTOMER__CREATED_AT="customer.createdAt",e.CUSTOMER__CUSTOMER_GROUP_IDS="customer.customerGroupIds",e.CUSTOMER__CUSTOMER_SEGMENT_IDS="customer.customerSegmentIds",e.CUSTOMER__CUSTOMER_SEQUENCE="customer.customerSequence",e.CUSTOMER__DELETED="customer.deleted",e.CUSTOMER__EMAIL="customer.email",e.CUSTOMER__EMAIL_VERIFIED_DATE="customer.emailVerifiedDate",e.CUSTOMER__FIRST_NAME="customer.firstName",e.CUSTOMER__FULL_NAME="customer.fullName",e.CUSTOMER__GENDER="customer.gender",e.CUSTOMER__ID="customer.id",e.CUSTOMER__IS_EMAIL_VERIFIED="customer.isEmailVerified",e.CUSTOMER__IS_PHONE_VERIFIED="customer.isPhoneVerified",e.CUSTOMER__LAST_NAME="customer.lastName",e.CUSTOMER__NOTE="customer.note",e.CUSTOMER__ORDER_COUNT="customer.orderCount",e.CUSTOMER__PASSWORD_UPDATE_DATE="customer.passwordUpdateDate",e.CUSTOMER__PHONE="customer.phone",e.CUSTOMER__PHONE_SUBSCRIPTION_STATUS="customer.phoneSubscriptionStatus",e.CUSTOMER__PHONE_SUBSCRIPTION_STATUS_UPDATED_AT="customer.phoneSubscriptionStatusUpdatedAt",e.CUSTOMER__PHONE_VERIFIED_DATE="customer.phoneVerifiedDate",e.CUSTOMER__PREFERRED_LANGUAGE="customer.preferredLanguage",e.CUSTOMER__PRICE_LIST_ID="customer.priceListId",e.CUSTOMER__PRICE_LIST_RULES__DISCOUNT_RATE="customer.priceListRules.discountRate",e.CUSTOMER__PRICE_LIST_RULES__FILTERS__TYPE="customer.priceListRules.filters.type",e.CUSTOMER__PRICE_LIST_RULES__FILTERS__VALUE_LIST="customer.priceListRules.filters.valueList",e.CUSTOMER__PRICE_LIST_RULES__PRICE_LIST_ID="customer.priceListRules.priceListId",e.CUSTOMER__PRICE_LIST_RULES__SHOULD_MATCH_ALL_FILTERS="customer.priceListRules.shouldMatchAllFilters",e.CUSTOMER__PRICE_LIST_RULES__VALUE="customer.priceListRules.value",e.CUSTOMER__PRICE_LIST_RULES__VALUE_TYPE="customer.priceListRules.valueType",e.CUSTOMER__REGISTRATION_SOURCE="customer.registrationSource",e.CUSTOMER__SMS_SUBSCRIPTION_STATUS="customer.smsSubscriptionStatus",e.CUSTOMER__SMS_SUBSCRIPTION_STATUS_UPDATED_AT="customer.smsSubscriptionStatusUpdatedAt",e.CUSTOMER__SUBSCRIPTION_STATUS="customer.subscriptionStatus",e.CUSTOMER__SUBSCRIPTION_STATUS_UPDATED_AT="customer.subscriptionStatusUpdatedAt",e.CUSTOMER__TAG_IDS="customer.tagIds",e.CUSTOMER__UPDATED_AT="customer.updatedAt",e.FLOW_ID="flowId",e.OTP_SEND="otpSend",e.TOKEN="token",e.TOKEN_EXPIRY="tokenExpiry"}(E||(E={}));export{E as ResponseField,r as default};
|
|
@@ -1359,6 +1359,8 @@ export interface CustomerFavoriteProduct {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
export interface CustomerLoginResponse {
|
|
1361
1361
|
customer: Customer | null;
|
|
1362
|
+
flowId: string | null;
|
|
1363
|
+
otpSend: boolean | null;
|
|
1362
1364
|
token: string;
|
|
1363
1365
|
tokenExpiry: number;
|
|
1364
1366
|
}
|
|
@@ -1372,11 +1374,6 @@ export interface CustomerPriceListRuleFilter {
|
|
|
1372
1374
|
type: CustomerPriceListRuleFilterTypeEnum;
|
|
1373
1375
|
valueList: string[];
|
|
1374
1376
|
}
|
|
1375
|
-
export interface CustomerLoginResponse {
|
|
1376
|
-
customer: Customer | null;
|
|
1377
|
-
token: string;
|
|
1378
|
-
tokenExpiry: number;
|
|
1379
|
-
}
|
|
1380
1377
|
export interface CustomerRefreshTokenResponse {
|
|
1381
1378
|
token: string;
|
|
1382
1379
|
tokenExpiry: number;
|
|
@@ -2,7 +2,6 @@ import { APIResponse } from "@ikas/fe-api-client";
|
|
|
2
2
|
import { QueryParams as CustomerLoginQueryParams } from "../../__api/mutations/customerLogin";
|
|
3
3
|
import { QueryParams as CustomerSocialLoginQueryParams } from "../../__api/queries/customerSocialLogin";
|
|
4
4
|
import { QueryParams as RegisterCustomerQueryParams } from "../../__api/mutations/registerCustomer";
|
|
5
|
-
import { QueryParams as SmsRegisterCustomerQueryParams } from "../../__api/mutations/smsRegisterCustomer";
|
|
6
5
|
import { QueryParams as CustomerRefreshTokenQueryParams } from "../../__api/mutations/customerRefreshToken";
|
|
7
6
|
import { QueryParams as CustomerForgotPasswordQueryParams } from "../../__api/mutations/customerForgotPassword";
|
|
8
7
|
import { QueryParams as CustomerRecoverPasswordQueryParams } from "../../__api/mutations/customerRecoverPassword";
|
|
@@ -27,14 +26,13 @@ import { QueryParams as ListCustomerSettingsQueryParams } from "../../__api/quer
|
|
|
27
26
|
import { QueryParams as ActivateCustomerQueryParams } from "../../__api/mutations/activateCustomer";
|
|
28
27
|
import { QueryParams as ResendCustomerActivationMailQueryParams } from "../../__api/mutations/resendCustomerActivationMail";
|
|
29
28
|
import { QueryParams as ValidateCustomerPhoneVerificationCodeQueryParams } from "../../__api/mutations/validateCustomerPhoneVerificationCode";
|
|
30
|
-
import { QueryParams as
|
|
29
|
+
import { QueryParams as ValidateOTPCodeQueryParams } from "../../__api/mutations/validateOTPCode";
|
|
31
30
|
import { QueryParams as ResendCustomerPhoneVerificationCodeQueryParams } from "../../__api/mutations/resendCustomerPhoneVerificationCode";
|
|
32
31
|
import { QueryParams as SaveCustomerFormDataQueryParams } from "../../__api/mutations/saveCustomerFormData";
|
|
33
32
|
import { QueryParams as CustomerDeactiveQueryParams } from "../../__api/mutations/customerDeactivate";
|
|
34
|
-
import { QueryParams as SendCustomerSmsLoginCodeQueryParams } from "../../__api/mutations/sendCustomerSmsLoginCode";
|
|
35
33
|
import { CustomerAttributeValueInput } from "../../__api/types";
|
|
36
34
|
import { IkasCustomer, IkasCustomerAttribute, IkasCustomerReview, IkasCustomerReviewSummary, IkasFavoriteProduct, IkasLastViewedProduct, IkasOrder, IkasOrderRefundSettings, IkasOrderTransaction, IkasCustomerSettings, IkasOrderTransactionWithPrices } from "@ikas/storefront-models";
|
|
37
|
-
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,
|
|
35
|
+
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, ResendCustomerPhoneVerificationCodeQueryParams, SaveCustomerFormDataQueryParams, CustomerDeactiveQueryParams, ValidateOTPCodeQueryParams, };
|
|
38
36
|
export declare enum IkasRegisterError {
|
|
39
37
|
EMAIL_IS_NOT_VERIFIED = "EMAIL_IS_NOT_VERIFIED",
|
|
40
38
|
CUSTOMER_EMAIL_ALREADY_EXISTS = "CUSTOMER_EMAIL_ALREADY_EXISTS",
|
|
@@ -45,7 +43,8 @@ export declare enum IkasRegisterError {
|
|
|
45
43
|
GOOGLE_SOCIAL_LOGIN_EXISTS = "GOOGLE_SOCIAL_LOGIN_EXISTS",
|
|
46
44
|
APPLE_SOCIAL_LOGIN_EXISTS = "APPLE_SOCIAL_LOGIN_EXISTS",
|
|
47
45
|
TWITCH_SOCIAL_LOGIN_EXISTS = "TWITCH_SOCIAL_LOGIN_EXISTS",
|
|
48
|
-
SOCIAL_LOGIN_EXISTS = "SOCIAL_LOGIN_EXISTS"
|
|
46
|
+
SOCIAL_LOGIN_EXISTS = "SOCIAL_LOGIN_EXISTS",
|
|
47
|
+
INVALID_CODE = "INVALID_CODE"
|
|
49
48
|
}
|
|
50
49
|
export declare enum IkasLoginError {
|
|
51
50
|
CUSTOMER_ACCOUNT_DISABLED = "CUSTOMER_ACCOUNT_DISABLED",
|
|
@@ -59,24 +58,30 @@ export declare enum IkasLoginError {
|
|
|
59
58
|
GOOGLE_SOCIAL_LOGIN_EXISTS = "GOOGLE_SOCIAL_LOGIN_EXISTS",
|
|
60
59
|
APPLE_SOCIAL_LOGIN_EXISTS = "APPLE_SOCIAL_LOGIN_EXISTS",
|
|
61
60
|
TWITCH_SOCIAL_LOGIN_EXISTS = "TWITCH_SOCIAL_LOGIN_EXISTS",
|
|
62
|
-
SOCIAL_LOGIN_EXISTS = "SOCIAL_LOGIN_EXISTS"
|
|
61
|
+
SOCIAL_LOGIN_EXISTS = "SOCIAL_LOGIN_EXISTS",
|
|
62
|
+
INVALID_CODE = "INVALID_CODE"
|
|
63
63
|
}
|
|
64
64
|
export declare function login(params: CustomerLoginQueryParams): Promise<APIResponse<{
|
|
65
65
|
customer: IkasCustomer | null;
|
|
66
|
+
flowId: string | null;
|
|
67
|
+
otpSend: boolean | null;
|
|
66
68
|
token: string;
|
|
67
69
|
tokenExpiry: number;
|
|
68
70
|
} | null>>;
|
|
69
71
|
export declare function socialLogin(params: CustomerSocialLoginQueryParams): Promise<APIResponse<{
|
|
70
72
|
customer: IkasCustomer | null;
|
|
73
|
+
flowId: string | null;
|
|
74
|
+
otpSend: boolean | null;
|
|
71
75
|
token: string;
|
|
72
76
|
tokenExpiry: number;
|
|
73
77
|
} | null>>;
|
|
74
78
|
export declare function register(params: RegisterCustomerQueryParams): Promise<APIResponse<{
|
|
75
79
|
customer: IkasCustomer | null;
|
|
80
|
+
flowId: string | null;
|
|
81
|
+
otpSend: boolean | null;
|
|
76
82
|
token: string;
|
|
77
83
|
tokenExpiry: number;
|
|
78
84
|
} | null>>;
|
|
79
|
-
export declare function smsRegister(params: SmsRegisterCustomerQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
80
85
|
export declare function refreshToken(params: CustomerRefreshTokenQueryParams): Promise<APIResponse<undefined> | APIResponse<import("../../__api/types").CustomerRefreshTokenResponse>>;
|
|
81
86
|
export declare function forgotPassword(params: CustomerForgotPasswordQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
82
87
|
export declare function recoverPassword(params: CustomerRecoverPasswordQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
@@ -262,11 +267,12 @@ export declare function activateCustomer(params: ActivateCustomerQueryParams): P
|
|
|
262
267
|
export declare function resendCustomerActivationMail(params: ResendCustomerActivationMailQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
263
268
|
export declare function resendCustomerPhoneVerificationCode(params: ResendCustomerPhoneVerificationCodeQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
264
269
|
export declare function validateCustomerPhoneVerificationCode(params: ValidateCustomerPhoneVerificationCodeQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
265
|
-
export declare function
|
|
270
|
+
export declare function validateOTPCode(params: ValidateOTPCodeQueryParams): Promise<APIResponse<{
|
|
266
271
|
customer: IkasCustomer | null;
|
|
272
|
+
flowId: string | null;
|
|
273
|
+
otpSend: boolean | null;
|
|
267
274
|
token: string;
|
|
268
275
|
tokenExpiry: number;
|
|
269
276
|
} | null>>;
|
|
270
|
-
export declare function sendCustomerSmsLoginCode(params: SendCustomerSmsLoginCodeQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
271
277
|
export declare function deactivateCustomer(params: CustomerDeactiveQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
272
278
|
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,f()];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,f()];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,f()];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(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/smsRegisterCustomer.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}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/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 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/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 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 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,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 p(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 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 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/getCustomerOrders.js")];case 1:return t=r.sent().default,s=t,u=[e],[4,D()];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,D()];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(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 C(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,D()];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 D(){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 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/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 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/saveLastViewedProducts.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}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/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 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 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 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 F(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 q(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 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/resendCustomerActivationMail.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/resendCustomerPhoneVerificationCode.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/validateCustomerPhoneVerificationCode.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function H(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/validateCustomerPhoneLoginCode.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 K(e){return t(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,import("../../__api/mutations/sendCustomerSmsLoginCode.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function k(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 x(){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"}(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"}(o||(o={}));export{o as IkasLoginError,a as IkasRegisterError,Q as activateCustomer,S as checkEmail,U as createCustomerReview,C as createOrderRefundRequest,k as deactivateCustomer,x as exportCustomerPersonelData,v as forgotPassword,I as getCustomer,N as getLastViewedProducts,L as getOrderByEmail,m as getOrders,P as isFavoriteProduct,B as listCustomerAttribute,F as listCustomerReviewSummary,M as listCustomerReviews,q as listCustomerSettings,j as listFavoriteProducts,G as listOrderRefundSettings,T as listOrderTransactions,A as listOrderTransactionsWithPrices,c as login,h as recoverPassword,E as refreshToken,d as register,W as resendCustomerActivationMail,y as resendCustomerPhoneVerificationCode,p as saveCustomer,O as saveCustomerFormData,g as saveFavoriteProduct,w as saveLastViewedProducts,b as sendContactFormToMerchant,K as sendCustomerSmsLoginCode,l as smsRegister,_ as socialLogin,R as subscribeToMarketingNotifications,H as validateCustomerPhoneLoginCode,V 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,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(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 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};
|
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{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,
|
|
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{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 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,
|
|
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};
|
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.138",
|
|
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.138",
|
|
21
|
+
"@ikas/storefront-models": "^6.1.0-beta.138",
|
|
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.138",
|
|
38
|
+
"@ikas/storefront-models": "^6.1.0-beta.138",
|
|
39
39
|
"@ikas/fe-api-client": "^1.0.18",
|
|
40
40
|
"axios": "^0.26.0",
|
|
41
41
|
"ts-essentials": "^7.0.1"
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** DO NOT EDIT - GENERATED AUTO BY IKAS API-CLIENT **/
|
|
2
|
-
import { ConfigType, APIResponse } from "@ikas/fe-api-client";
|
|
3
|
-
declare const sendCustomerSmsLoginCode: (variables: QueryParams, config?: ConfigType) => Promise<APIResponse<boolean> | APIResponse<undefined>>;
|
|
4
|
-
export default sendCustomerSmsLoginCode;
|
|
5
|
-
export declare type QueryParams = {
|
|
6
|
-
captchaToken?: string | null;
|
|
7
|
-
phone: string;
|
|
8
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as e,APIResponse as o,fetchQuery as r}from"@ikas/fe-api-client";var s=function(s,i){return t(void 0,void 0,void 0,(function(){var t,a,u,c;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r({operationName:"sendCustomerSmsLoginCode",config:i,variables:s,query:"\n\t\t\t\tmutation sendCustomerSmsLoginCode (\n\t\t\t\t\t$captchaToken: String,\n\t\t\t\t\t$phone: String!,\n\t\t\t\t) {\n\t\t\t\t\tsendCustomerSmsLoginCode (\n\t\t\t\t\t\tcaptchaToken: $captchaToken,\n\t\t\t\t\t\tphone: $phone,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t"})];case 1:return t=n.sent(),a=t.data,u=t.errors,[2,new o(null==a?void 0:a.sendCustomerSmsLoginCode,u)];case 2:return c=n.sent(),[2,e(c)];case 3:return[2]}}))}))};export{s as default};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/** DO NOT EDIT - GENERATED AUTO BY IKAS API-CLIENT **/
|
|
2
|
-
import { ConfigType, APIResponse } from "@ikas/fe-api-client";
|
|
3
|
-
import { CustomerAttributeValueInput, CustomerGenderTypeEnum, CustomerRegisterSubscriptionInput } from "../types";
|
|
4
|
-
declare const smsRegisterCustomer: (variables: QueryParams, config?: ConfigType) => Promise<APIResponse<boolean> | APIResponse<undefined>>;
|
|
5
|
-
export default smsRegisterCustomer;
|
|
6
|
-
export declare type QueryParams = {
|
|
7
|
-
attributes?: CustomerAttributeValueInput[] | null;
|
|
8
|
-
birthDate?: any | null;
|
|
9
|
-
captchaToken?: string | null;
|
|
10
|
-
firstName: string;
|
|
11
|
-
gender?: CustomerGenderTypeEnum | null;
|
|
12
|
-
isAcceptMarketing?: boolean | null;
|
|
13
|
-
lastName: string;
|
|
14
|
-
locale?: string | null;
|
|
15
|
-
orderId?: string | null;
|
|
16
|
-
phone: string;
|
|
17
|
-
preferredLanguage?: string | null;
|
|
18
|
-
subscriptions?: CustomerRegisterSubscriptionInput | null;
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as n,APIResponse as r,fetchQuery as s}from"@ikas/fe-api-client";var i=function(i,a){return t(void 0,void 0,void 0,(function(){var t,o,u,c;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,s({operationName:"smsRegisterCustomer",config:a,variables:i,query:"\n\t\t\t\tmutation smsRegisterCustomer (\n\t\t\t\t\t$attributes: [CustomerAttributeValueInput!],\n\t\t\t\t\t$birthDate: Timestamp,\n\t\t\t\t\t$captchaToken: String,\n\t\t\t\t\t$firstName: String!,\n\t\t\t\t\t$gender: CustomerGenderTypeEnum,\n\t\t\t\t\t$isAcceptMarketing: Boolean,\n\t\t\t\t\t$lastName: String!,\n\t\t\t\t\t$locale: String,\n\t\t\t\t\t$orderId: String,\n\t\t\t\t\t$phone: String!,\n\t\t\t\t\t$preferredLanguage: String,\n\t\t\t\t\t$subscriptions: CustomerRegisterSubscriptionInput,\n\t\t\t\t) {\n\t\t\t\t\tsmsRegisterCustomer (\n\t\t\t\t\t\tattributes: $attributes,\n\t\t\t\t\t\tbirthDate: $birthDate,\n\t\t\t\t\t\tcaptchaToken: $captchaToken,\n\t\t\t\t\t\tfirstName: $firstName,\n\t\t\t\t\t\tgender: $gender,\n\t\t\t\t\t\tisAcceptMarketing: $isAcceptMarketing,\n\t\t\t\t\t\tlastName: $lastName,\n\t\t\t\t\t\tlocale: $locale,\n\t\t\t\t\t\torderId: $orderId,\n\t\t\t\t\t\tphone: $phone,\n\t\t\t\t\t\tpreferredLanguage: $preferredLanguage,\n\t\t\t\t\t\tsubscriptions: $subscriptions,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t"})];case 1:return t=e.sent(),o=t.data,u=t.errors,[2,new r(null==o?void 0:o.smsRegisterCustomer,u)];case 2:return c=e.sent(),[2,n(c)];case 3:return[2]}}))}))};export{i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as _,APIResponse as s,fetchQuery as S}from"@ikas/fe-api-client";var E,r=function(E,r,o){return e(void 0,void 0,void 0,(function(){var e,d,u,R;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,S({operationName:"validateCustomerPhoneLoginCode",config:o,variables:E,allReturnFields:T,fields:r,query:function(e){return"\n\t\t\t\tmutation validateCustomerPhoneLoginCode (\n\t\t\t\t\t$captchaToken: String,\n\t\t\t\t\t$verificationCode: String!,\n\t\t\t\t) {\n\t\t\t\t\tvalidateCustomerPhoneLoginCode (\n\t\t\t\t\t\tcaptchaToken: $captchaToken,\n\t\t\t\t\t\tverificationCode: $verificationCode,\n\t\t\t\t\t) ".concat(e,"\n\t\t\t\t}\n\t\t\t")}})];case 1:return e=t.sent(),d=e.data,u=e.errors,[2,new s(null==d?void 0:d.validateCustomerPhoneLoginCode,u)];case 2:return R=t.sent(),[2,_(R)];case 3:return[2]}}))}))},T="{customer {accountStatus accountStatusUpdatedAt addresses {addressLine1 addressLine2 attributes {customerAttributeId customerAttributeOptionId value } city {code id name } company country {code id iso2 iso3 name } createdAt deleted district {code id name } firstName id identityNumber isDefault lastName phone postalCode region {createdAt deleted id name updatedAt } state {code id name } taxNumber taxOffice title updatedAt } attributes {customerAttributeId customerAttributeOptionId value } birthDate createdAt customerGroupIds customerSegmentIds customerSequence deleted email emailVerifiedDate firstName fullName gender id isEmailVerified isPhoneVerified lastName note orderCount passwordUpdateDate phone phoneSubscriptionStatus phoneSubscriptionStatusUpdatedAt phoneVerifiedDate preferredLanguage priceListId priceListRules {discountRate filters {type valueList } priceListId shouldMatchAllFilters value valueType } registrationSource smsSubscriptionStatus smsSubscriptionStatusUpdatedAt subscriptionStatus subscriptionStatusUpdatedAt tagIds updatedAt } token tokenExpiry }";!function(e){e.CUSTOMER__ACCOUNT_STATUS="customer.accountStatus",e.CUSTOMER__ACCOUNT_STATUS_UPDATED_AT="customer.accountStatusUpdatedAt",e.CUSTOMER__ADDRESSES__ADDRESS_LINE1="customer.addresses.addressLine1",e.CUSTOMER__ADDRESSES__ADDRESS_LINE2="customer.addresses.addressLine2",e.CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID="customer.addresses.attributes.customerAttributeId",e.CUSTOMER__ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID="customer.addresses.attributes.customerAttributeOptionId",e.CUSTOMER__ADDRESSES__ATTRIBUTES__VALUE="customer.addresses.attributes.value",e.CUSTOMER__ADDRESSES__CITY__CODE="customer.addresses.city.code",e.CUSTOMER__ADDRESSES__CITY__ID="customer.addresses.city.id",e.CUSTOMER__ADDRESSES__CITY__NAME="customer.addresses.city.name",e.CUSTOMER__ADDRESSES__COMPANY="customer.addresses.company",e.CUSTOMER__ADDRESSES__COUNTRY__CODE="customer.addresses.country.code",e.CUSTOMER__ADDRESSES__COUNTRY__ID="customer.addresses.country.id",e.CUSTOMER__ADDRESSES__COUNTRY__ISO2="customer.addresses.country.iso2",e.CUSTOMER__ADDRESSES__COUNTRY__ISO3="customer.addresses.country.iso3",e.CUSTOMER__ADDRESSES__COUNTRY__NAME="customer.addresses.country.name",e.CUSTOMER__ADDRESSES__CREATED_AT="customer.addresses.createdAt",e.CUSTOMER__ADDRESSES__DELETED="customer.addresses.deleted",e.CUSTOMER__ADDRESSES__DISTRICT__CODE="customer.addresses.district.code",e.CUSTOMER__ADDRESSES__DISTRICT__ID="customer.addresses.district.id",e.CUSTOMER__ADDRESSES__DISTRICT__NAME="customer.addresses.district.name",e.CUSTOMER__ADDRESSES__FIRST_NAME="customer.addresses.firstName",e.CUSTOMER__ADDRESSES__ID="customer.addresses.id",e.CUSTOMER__ADDRESSES__IDENTITY_NUMBER="customer.addresses.identityNumber",e.CUSTOMER__ADDRESSES__IS_DEFAULT="customer.addresses.isDefault",e.CUSTOMER__ADDRESSES__LAST_NAME="customer.addresses.lastName",e.CUSTOMER__ADDRESSES__PHONE="customer.addresses.phone",e.CUSTOMER__ADDRESSES__POSTAL_CODE="customer.addresses.postalCode",e.CUSTOMER__ADDRESSES__REGION__CREATED_AT="customer.addresses.region.createdAt",e.CUSTOMER__ADDRESSES__REGION__DELETED="customer.addresses.region.deleted",e.CUSTOMER__ADDRESSES__REGION__ID="customer.addresses.region.id",e.CUSTOMER__ADDRESSES__REGION__NAME="customer.addresses.region.name",e.CUSTOMER__ADDRESSES__REGION__UPDATED_AT="customer.addresses.region.updatedAt",e.CUSTOMER__ADDRESSES__STATE__CODE="customer.addresses.state.code",e.CUSTOMER__ADDRESSES__STATE__ID="customer.addresses.state.id",e.CUSTOMER__ADDRESSES__STATE__NAME="customer.addresses.state.name",e.CUSTOMER__ADDRESSES__TAX_NUMBER="customer.addresses.taxNumber",e.CUSTOMER__ADDRESSES__TAX_OFFICE="customer.addresses.taxOffice",e.CUSTOMER__ADDRESSES__TITLE="customer.addresses.title",e.CUSTOMER__ADDRESSES__UPDATED_AT="customer.addresses.updatedAt",e.CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID="customer.attributes.customerAttributeId",e.CUSTOMER__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID="customer.attributes.customerAttributeOptionId",e.CUSTOMER__ATTRIBUTES__VALUE="customer.attributes.value",e.CUSTOMER__BIRTH_DATE="customer.birthDate",e.CUSTOMER__CREATED_AT="customer.createdAt",e.CUSTOMER__CUSTOMER_GROUP_IDS="customer.customerGroupIds",e.CUSTOMER__CUSTOMER_SEGMENT_IDS="customer.customerSegmentIds",e.CUSTOMER__CUSTOMER_SEQUENCE="customer.customerSequence",e.CUSTOMER__DELETED="customer.deleted",e.CUSTOMER__EMAIL="customer.email",e.CUSTOMER__EMAIL_VERIFIED_DATE="customer.emailVerifiedDate",e.CUSTOMER__FIRST_NAME="customer.firstName",e.CUSTOMER__FULL_NAME="customer.fullName",e.CUSTOMER__GENDER="customer.gender",e.CUSTOMER__ID="customer.id",e.CUSTOMER__IS_EMAIL_VERIFIED="customer.isEmailVerified",e.CUSTOMER__IS_PHONE_VERIFIED="customer.isPhoneVerified",e.CUSTOMER__LAST_NAME="customer.lastName",e.CUSTOMER__NOTE="customer.note",e.CUSTOMER__ORDER_COUNT="customer.orderCount",e.CUSTOMER__PASSWORD_UPDATE_DATE="customer.passwordUpdateDate",e.CUSTOMER__PHONE="customer.phone",e.CUSTOMER__PHONE_SUBSCRIPTION_STATUS="customer.phoneSubscriptionStatus",e.CUSTOMER__PHONE_SUBSCRIPTION_STATUS_UPDATED_AT="customer.phoneSubscriptionStatusUpdatedAt",e.CUSTOMER__PHONE_VERIFIED_DATE="customer.phoneVerifiedDate",e.CUSTOMER__PREFERRED_LANGUAGE="customer.preferredLanguage",e.CUSTOMER__PRICE_LIST_ID="customer.priceListId",e.CUSTOMER__PRICE_LIST_RULES__DISCOUNT_RATE="customer.priceListRules.discountRate",e.CUSTOMER__PRICE_LIST_RULES__FILTERS__TYPE="customer.priceListRules.filters.type",e.CUSTOMER__PRICE_LIST_RULES__FILTERS__VALUE_LIST="customer.priceListRules.filters.valueList",e.CUSTOMER__PRICE_LIST_RULES__PRICE_LIST_ID="customer.priceListRules.priceListId",e.CUSTOMER__PRICE_LIST_RULES__SHOULD_MATCH_ALL_FILTERS="customer.priceListRules.shouldMatchAllFilters",e.CUSTOMER__PRICE_LIST_RULES__VALUE="customer.priceListRules.value",e.CUSTOMER__PRICE_LIST_RULES__VALUE_TYPE="customer.priceListRules.valueType",e.CUSTOMER__REGISTRATION_SOURCE="customer.registrationSource",e.CUSTOMER__SMS_SUBSCRIPTION_STATUS="customer.smsSubscriptionStatus",e.CUSTOMER__SMS_SUBSCRIPTION_STATUS_UPDATED_AT="customer.smsSubscriptionStatusUpdatedAt",e.CUSTOMER__SUBSCRIPTION_STATUS="customer.subscriptionStatus",e.CUSTOMER__SUBSCRIPTION_STATUS_UPDATED_AT="customer.subscriptionStatusUpdatedAt",e.CUSTOMER__TAG_IDS="customer.tagIds",e.CUSTOMER__UPDATED_AT="customer.updatedAt",e.TOKEN="token",e.TOKEN_EXPIRY="tokenExpiry"}(E||(E={}));export{E as ResponseField,r as default};
|