@ikas/storefront-api 4.0.0-alpha.73 → 4.0.0-alpha.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/__api/models/PaymentGateway.d.ts +1 -0
- package/build/__api/models/SubscribeToMarketingNotificationsInput.d.ts +12 -0
- package/build/__api/mutations/createCustomerEmailSubscription.d.ts +1 -1
- package/build/__api/mutations/subscribeToMarketingNotifications.d.ts +7 -0
- package/build/__api/mutations/subscribeToMarketingNotifications.js +1 -0
- package/build/__api/queries/listPaymentGateway.d.ts +1 -0
- package/build/__api/queries/listPaymentGateway.js +1 -1
- package/build/__api/types/index.d.ts +7 -0
- package/build/api/customer/index.d.ts +3 -3
- package/build/api/customer/index.js +1 -1
- package/build/index.js +1 -1
- package/package.json +5 -5
- package/build/__api/mutations/createCustomerEmailSubscription.js +0 -1
|
@@ -10,6 +10,7 @@ export declare class PaymentGatewayData extends BaseModelData {
|
|
|
10
10
|
availableCountries: string[] | null;
|
|
11
11
|
code: string;
|
|
12
12
|
description: string | null;
|
|
13
|
+
isPassive: boolean | null;
|
|
13
14
|
logoUrl: string | null;
|
|
14
15
|
masterPassClientId: string | null;
|
|
15
16
|
name: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DeepReadonly } from "ts-essentials";
|
|
2
|
+
export declare class SubscribeToMarketingNotificationsInputData {
|
|
3
|
+
captchaToken: string | null;
|
|
4
|
+
email: string;
|
|
5
|
+
firstName: string | null;
|
|
6
|
+
lastName: string | null;
|
|
7
|
+
constructor(data?: Partial<SubscribeToMarketingNotificationsInputData>);
|
|
8
|
+
}
|
|
9
|
+
export declare class SubscribeToMarketingNotificationsInput extends SubscribeToMarketingNotificationsInputData {
|
|
10
|
+
}
|
|
11
|
+
export declare type PartialSubscribeToMarketingNotificationsInput = Partial<SubscribeToMarketingNotificationsInput>;
|
|
12
|
+
export declare type ReadOnlySubscribeToMarketingNotificationsInput = DeepReadonly<SubscribeToMarketingNotificationsInput>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConfigType, APIResponse } from "@ikas/fe-api-client";
|
|
2
2
|
import { CreateCustomerEmailSubscriptionInput, Customer } from "../types";
|
|
3
|
-
declare const createCustomerEmailSubscription: (variables: QueryParams, fields?: string[], config?: ConfigType) => Promise<APIResponse<
|
|
3
|
+
declare const createCustomerEmailSubscription: (variables: QueryParams, fields?: string[], config?: ConfigType) => Promise<APIResponse<undefined> | APIResponse<Customer>>;
|
|
4
4
|
export default createCustomerEmailSubscription;
|
|
5
5
|
export declare type QueryParams = {
|
|
6
6
|
input: CreateCustomerEmailSubscriptionInput;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigType, APIResponse } from "@ikas/fe-api-client";
|
|
2
|
+
import { SubscribeToMarketingNotificationsInput } from "../types";
|
|
3
|
+
declare const subscribeToMarketingNotifications: (variables: QueryParams, config?: ConfigType) => Promise<APIResponse<boolean> | APIResponse<undefined>>;
|
|
4
|
+
export default subscribeToMarketingNotifications;
|
|
5
|
+
export declare type QueryParams = {
|
|
6
|
+
input: SubscribeToMarketingNotificationsInput;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as t,__generator as i}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as n,APIResponse as e,fetchQuery as r}from"@ikas/fe-api-client";var o=function(o,s){return t(void 0,void 0,void 0,(function(){var t,a,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,r({operationName:"subscribeToMarketingNotifications",config:s,variables:o,query:"\n\t\t\t\tmutation subscribeToMarketingNotifications (\n\t\t\t\t\t$input: SubscribeToMarketingNotificationsInput!,\n\t\t\t\t) {\n\t\t\t\t\tsubscribeToMarketingNotifications (\n\t\t\t\t\t\tinput: $input,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t"})];case 1:return t=i.sent(),a=t.data,u=t.errors,[2,new e(null==a?void 0:a.subscribeToMarketingNotifications,u)];case 2:return c=i.sent(),[2,n(c)];case 3:return[2]}}))}))};export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as n,APIResponse as a,fetchQuery as i}from"@ikas/fe-api-client";var o
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as n,APIResponse as a,fetchQuery as i}from"@ikas/fe-api-client";var s,o=function(s,o,l){return t(void 0,void 0,void 0,(function(){var t,d,T,_;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i({operationName:"listPaymentGateway",config:l,variables:s,allReturnFields:r,fields:o,query:function(t){return"\n\t\t\t\tquery listPaymentGateway (\n\t\t\t\t\t$id: StringFilterInput,\n\t\t\t\t\t$includeDeleted: Boolean,\n\t\t\t\t\t$locale: String,\n\t\t\t\t\t$pagination: PaginationInput,\n\t\t\t\t) {\n\t\t\t\t\tlistPaymentGateway (\n\t\t\t\t\t\tid: $id,\n\t\t\t\t\t\tincludeDeleted: $includeDeleted,\n\t\t\t\t\t\tlocale: $locale,\n\t\t\t\t\t\tpagination: $pagination,\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,T=t.errors,[2,new a(null==d?void 0:d.listPaymentGateway,T)];case 2:return _=e.sent(),[2,n(_)];case 3:return[2]}}))}))},r="{additionalPrices {amount amountType name type } availableCountries code createdAt deleted description id isPassive logoUrl masterPassClientId name paymentGatewayProviderId paymentMethodType paymentMethods {logoUrl name } settings {label order type value } supportedCurrencies testMode translations {description locale name } type updatedAt }";!function(t){t.ADDITIONAL_PRICES__AMOUNT="additionalPrices.amount",t.ADDITIONAL_PRICES__AMOUNT_TYPE="additionalPrices.amountType",t.ADDITIONAL_PRICES__NAME="additionalPrices.name",t.ADDITIONAL_PRICES__TYPE="additionalPrices.type",t.AVAILABLE_COUNTRIES="availableCountries",t.CODE="code",t.CREATED_AT="createdAt",t.DELETED="deleted",t.DESCRIPTION="description",t.ID="id",t.IS_PASSIVE="isPassive",t.LOGO_URL="logoUrl",t.MASTER_PASS_CLIENT_ID="masterPassClientId",t.NAME="name",t.PAYMENT_GATEWAY_PROVIDER_ID="paymentGatewayProviderId",t.PAYMENT_METHOD_TYPE="paymentMethodType",t.PAYMENT_METHODS__LOGO_URL="paymentMethods.logoUrl",t.PAYMENT_METHODS__NAME="paymentMethods.name",t.SETTINGS__LABEL="settings.label",t.SETTINGS__ORDER="settings.order",t.SETTINGS__TYPE="settings.type",t.SETTINGS__VALUE="settings.value",t.SUPPORTED_CURRENCIES="supportedCurrencies",t.TEST_MODE="testMode",t.TRANSLATIONS__DESCRIPTION="translations.description",t.TRANSLATIONS__LOCALE="translations.locale",t.TRANSLATIONS__NAME="translations.name",t.TYPE="type",t.UPDATED_AT="updatedAt"}(s||(s={}));export{s as ResponseField,o as default};
|
|
@@ -1631,6 +1631,7 @@ export interface PaymentGateway {
|
|
|
1631
1631
|
deleted: boolean | null;
|
|
1632
1632
|
description: string | null;
|
|
1633
1633
|
id: string;
|
|
1634
|
+
isPassive: boolean | null;
|
|
1634
1635
|
logoUrl: string | null;
|
|
1635
1636
|
masterPassClientId: string | null;
|
|
1636
1637
|
name: string;
|
|
@@ -2865,6 +2866,12 @@ export interface StringFilterInput {
|
|
|
2865
2866
|
ne?: string | null;
|
|
2866
2867
|
nin?: string[] | null;
|
|
2867
2868
|
}
|
|
2869
|
+
export interface SubscribeToMarketingNotificationsInput {
|
|
2870
|
+
captchaToken?: string | null;
|
|
2871
|
+
email: string;
|
|
2872
|
+
firstName?: string | null;
|
|
2873
|
+
lastName?: string | null;
|
|
2874
|
+
}
|
|
2868
2875
|
export interface UpdateCartCampaignOfferInput {
|
|
2869
2876
|
accepted: boolean;
|
|
2870
2877
|
campaignOfferId: string;
|
|
@@ -11,7 +11,7 @@ import { QueryParams as GetCustomerOrdersQueryParams } from "../../__api/queries
|
|
|
11
11
|
import { QueryParams as GetOrderByEmailQueryParams } from "../../__api/queries/getOrderByEmail";
|
|
12
12
|
import { QueryParams as ListOrderTransactionsQueryParams } from "../../__api/queries/listOrderTransactions";
|
|
13
13
|
import { QueryParams as CreateOrderRefundRequestQueryParams } from "../../__api/mutations/createOrderRefundRequest";
|
|
14
|
-
import { QueryParams as
|
|
14
|
+
import { QueryParams as SubscribeToMarketingNotificationsQueryParams } from "../../__api/mutations/subscribeToMarketingNotifications";
|
|
15
15
|
import { QueryParams as GetLastViewedProductsQueryParams } from "../../__api/queries/getLastViewedProducts";
|
|
16
16
|
import { QueryParams as SaveLastViewedProductsQueryParams } from "../../__api/mutations/saveLastViewedProducts";
|
|
17
17
|
import { QueryParams as ListOrderRefundSettingsQueryParams } from "../../__api/queries/listOrderRefundSettings";
|
|
@@ -22,7 +22,7 @@ import { QueryParams as CreateCustomerReviewQueryParams } from "../../__api/muta
|
|
|
22
22
|
import { QueryParams as ListCustomerReviewsQueryParams } from "../../__api/queries/listCustomerReviews";
|
|
23
23
|
import { QueryParams as ListCustomerReviewSummaryQueryParams } from "../../__api/queries/listCustomerReviewSummary";
|
|
24
24
|
import { IkasCustomer, IkasCustomerAttribute, IkasCustomerReview, IkasCustomerReviewSummary, IkasFavoriteProduct, IkasLastViewedProduct, IkasOrder, IkasOrderRefundSettings, IkasOrderTransaction } from "@ikas/storefront-models";
|
|
25
|
-
export type { CustomerLoginQueryParams, CustomerSocialLoginQueryParams, RegisterCustomerQueryParams, CustomerRefreshTokenQueryParams, CustomerForgotPasswordQueryParams, CustomerRecoverPasswordQueryParams, CheckCustomerEmailQueryParams, SaveMyCustomerQueryParams, GetCustomerOrdersQueryParams, GetOrderByEmailQueryParams, ListOrderTransactionsQueryParams, CreateOrderRefundRequestQueryParams,
|
|
25
|
+
export type { CustomerLoginQueryParams, CustomerSocialLoginQueryParams, RegisterCustomerQueryParams, CustomerRefreshTokenQueryParams, CustomerForgotPasswordQueryParams, CustomerRecoverPasswordQueryParams, CheckCustomerEmailQueryParams, SaveMyCustomerQueryParams, GetCustomerOrdersQueryParams, GetOrderByEmailQueryParams, ListOrderTransactionsQueryParams, CreateOrderRefundRequestQueryParams, SubscribeToMarketingNotificationsQueryParams, GetLastViewedProductsQueryParams, SaveLastViewedProductsQueryParams, ListOrderRefundSettingsQueryParams, SendContactFormToMerchantQueryParams, SaveFavoriteProductQueryParams, IsFavoriteProductQueryParams, CreateCustomerReviewQueryParams, ListCustomerReviewsQueryParams, ListCustomerReviewSummaryQueryParams, };
|
|
26
26
|
export declare function login(params: CustomerLoginQueryParams): Promise<APIResponse<{
|
|
27
27
|
customer: IkasCustomer | null;
|
|
28
28
|
token: string;
|
|
@@ -104,7 +104,7 @@ export declare function getOrders(params: GetCustomerOrdersQueryParams): Promise
|
|
|
104
104
|
export declare function getOrderByEmail(params: GetOrderByEmailQueryParams): Promise<APIResponse<IkasOrder>>;
|
|
105
105
|
export declare function listOrderTransactions(params: ListOrderTransactionsQueryParams): Promise<APIResponse<IkasOrderTransaction[]>>;
|
|
106
106
|
export declare function createOrderRefundRequest(params: CreateOrderRefundRequestQueryParams): Promise<APIResponse<IkasOrder | null>>;
|
|
107
|
-
export declare function
|
|
107
|
+
export declare function subscribeToMarketingNotifications(params: SubscribeToMarketingNotificationsQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
|
|
108
108
|
export declare function getLastViewedProducts(params: GetLastViewedProductsQueryParams): Promise<APIResponse<IkasLastViewedProduct[]>>;
|
|
109
109
|
export declare function saveLastViewedProducts(params: SaveLastViewedProductsQueryParams): Promise<APIResponse<undefined> | APIResponse<import("../../__api/types").ProductLastViewed>>;
|
|
110
110
|
export declare function listOrderRefundSettings(params: ListOrderRefundSettingsQueryParams): Promise<APIResponse<IkasOrderRefundSettings[] | 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";function a(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/customerLogin.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 o(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/customerSocialLogin.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 c(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/registerCustomer.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 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/customerRefreshToken.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}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/customerForgotPassword.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/customerRecoverPassword.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/queries/checkCustomerEmail.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(){var t,i;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getMyCustomer.js")];case 1:return[4,(0,r.sent()
|
|
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";function a(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/customerLogin.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 o(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/customerSocialLogin.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 c(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/registerCustomer.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 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/customerRefreshToken.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}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/customerForgotPassword.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/customerRecoverPassword.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/queries/checkCustomerEmail.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(){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,I()];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,I()];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 m(e){return t(this,void 0,void 0,(function(){var t,i;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/getCustomerOrders.js")];case 1:return[4,(0,r.sent().default)(e)];case 2:return t=r.sent(),null==(i=t.data)||i.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(i,t.graphQLErrors)]}}))}))}function _(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/getOrderByEmail.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 w(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 b(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/mutations/createOrderRefundRequest.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 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/subscribeToMarketingNotifications.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function g(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 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/saveLastViewedProducts.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}function L(i){var s;return t(this,void 0,void 0,(function(){var t,u;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/listOrderRefundSettings.js")];case 1:return[4,(0,r.sent().default)(i)];case 2:return t=r.sent(),u=(null===(s=t.data)||void 0===s?void 0:s.map((function(t){return e({},t)})))||null,[2,new n(u,t.graphQLErrors)]}}))}))}function 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/sendContactFormToMerchant.js")];case 1:return[4,(0,t.sent().default)(e)];case 2:return[2,t.sent()]}}))}))}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/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 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/saveFavoriteProduct.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/queries/isFavoriteProduct.js")];case 1:return[4,(0,t.sent().default)({productId:e.productId})];case 2:return[2,t.sent()]}}))}))}function O(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 T(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 S(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 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/listCustomerAttribute.js")];case 1:return[4,(0,r.sent().default)()];case 2:return t=r.sent(),(e=t.data||[]).forEach((function(t){return s(t,u.getCurrentLocale())})),[2,new n(e,t.graphQLErrors)]}}))}))}function I(){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","CUSTOMER_SEQUENCE"],[2,Object.entries(t).filter((function(t){var r=t[0];return!e.includes(r)})).map((function(t){return t[1]}))]}}))}))}export{v as checkEmail,O as createCustomerReview,b as createOrderRefundRequest,l as forgotPassword,h as getCustomer,g as getLastViewedProducts,_ as getOrderByEmail,m as getOrders,q as isFavoriteProduct,P as listCustomerAttribute,S as listCustomerReviewSummary,T as listCustomerReviews,C as listFavoriteProducts,L as listOrderRefundSettings,w as listOrderTransactions,a as login,f as recoverPassword,d as refreshToken,c as register,p as saveCustomer,Q as saveFavoriteProduct,j as saveLastViewedProducts,R as sendContactFormToMerchant,o as socialLogin,E as subscribeToMarketingNotifications};
|
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{MasterPassOperationTypeEnum,SortByDirectionEnum,SortByTypeEnum}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,getCartById,saveCart,saveCartCouponCode,updateCartCampaignOffer}from"./api/cart/index.js";export{listCategory}from"./api/category/index.js";export{checkStocks,createKlarnaClientToken,createSaleTransactionWithCart,createStripePaymentIntent,getAvailableShippingCountries,getAvailableStockLocations,listCheckoutSettings,listPaymentGateway,listStockLocations,retrieveInstallmentInfo}from"./api/checkout/index.js";export{checkEmail,
|
|
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{MasterPassOperationTypeEnum,SortByDirectionEnum,SortByTypeEnum}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,getCartById,saveCart,saveCartCouponCode,updateCartCampaignOffer}from"./api/cart/index.js";export{listCategory}from"./api/category/index.js";export{checkStocks,createKlarnaClientToken,createSaleTransactionWithCart,createStripePaymentIntent,getAvailableShippingCountries,getAvailableStockLocations,listCheckoutSettings,listPaymentGateway,listStockLocations,retrieveInstallmentInfo}from"./api/checkout/index.js";export{checkEmail,createCustomerReview,createOrderRefundRequest,forgotPassword,getCustomer,getLastViewedProducts,getOrderByEmail,getOrders,isFavoriteProduct,listCustomerAttribute,listCustomerReviewSummary,listCustomerReviews,listFavoriteProducts,listOrderRefundSettings,listOrderTransactions,login,recoverPassword,refreshToken,register,saveCustomer,saveFavoriteProduct,saveLastViewedProducts,sendContactFormToMerchant,socialLogin,subscribeToMarketingNotifications}from"./api/customer/index.js";export{getProductOptionFileUrl,uploadFile}from"./api/file-upload/index.js";export{listHTMLMetaData}from"./api/html-meta-data/index.js";export{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,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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-api",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.75",
|
|
4
4
|
"author": "Umut Ozan Yıldırım",
|
|
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": "^4.0.0-alpha.
|
|
21
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
20
|
+
"@ikas/storefront-config": "^4.0.0-alpha.75",
|
|
21
|
+
"@ikas/storefront-models": "^4.0.0-alpha.75",
|
|
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.16"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@ikas/storefront-config": "^4.0.0-alpha.
|
|
38
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
37
|
+
"@ikas/storefront-config": "^4.0.0-alpha.75",
|
|
38
|
+
"@ikas/storefront-models": "^4.0.0-alpha.75",
|
|
39
39
|
"@ikas/fe-api-client": "^1.0.16",
|
|
40
40
|
"axios": "^0.26.0",
|
|
41
41
|
"ts-essentials": "^7.0.1"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.js';import{handleAPIError as s,APIResponse as d,fetchQuery as S}from"@ikas/fe-api-client";var a,r=function(a,r,_){return e(void 0,void 0,void 0,(function(){var e,i,D,A;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,S({operationName:"createCustomerEmailSubscription",config:_,variables:a,allReturnFields:E,fields:r,query:function(e){return"\n\t\t\t\tmutation createCustomerEmailSubscription (\n\t\t\t\t\t$input: CreateCustomerEmailSubscriptionInput!,\n\t\t\t\t) {\n\t\t\t\t\tcreateCustomerEmailSubscription (\n\t\t\t\t\t\tinput: $input,\n\t\t\t\t\t) ".concat(e,"\n\t\t\t\t}\n\t\t\t")}})];case 1:return e=t.sent(),i=e.data,D=e.errors,[2,new d(null==i?void 0:i.createCustomerEmailSubscription,D)];case 2:return A=t.sent(),[2,s(A)];case 3:return[2]}}))}))},E="{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 state {code id name } taxNumber taxOffice title updatedAt } attributes {customerAttributeId customerAttributeOptionId value } createdAt customerGroupIds customerSequence deleted email emailVerifiedDate firstName fullName id isEmailVerified isPhoneVerified lastName note orderCount passwordUpdateDate phone phoneVerifiedDate registrationSource subscriptionStatus subscriptionStatusUpdatedAt tagIds updatedAt }";!function(e){e.ACCOUNT_STATUS="accountStatus",e.ACCOUNT_STATUS_UPDATED_AT="accountStatusUpdatedAt",e.ADDRESSES__ADDRESS_LINE1="addresses.addressLine1",e.ADDRESSES__ADDRESS_LINE2="addresses.addressLine2",e.ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID="addresses.attributes.customerAttributeId",e.ADDRESSES__ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID="addresses.attributes.customerAttributeOptionId",e.ADDRESSES__ATTRIBUTES__VALUE="addresses.attributes.value",e.ADDRESSES__CITY__CODE="addresses.city.code",e.ADDRESSES__CITY__ID="addresses.city.id",e.ADDRESSES__CITY__NAME="addresses.city.name",e.ADDRESSES__COMPANY="addresses.company",e.ADDRESSES__COUNTRY__CODE="addresses.country.code",e.ADDRESSES__COUNTRY__ID="addresses.country.id",e.ADDRESSES__COUNTRY__ISO2="addresses.country.iso2",e.ADDRESSES__COUNTRY__ISO3="addresses.country.iso3",e.ADDRESSES__COUNTRY__NAME="addresses.country.name",e.ADDRESSES__CREATED_AT="addresses.createdAt",e.ADDRESSES__DELETED="addresses.deleted",e.ADDRESSES__DISTRICT__CODE="addresses.district.code",e.ADDRESSES__DISTRICT__ID="addresses.district.id",e.ADDRESSES__DISTRICT__NAME="addresses.district.name",e.ADDRESSES__FIRST_NAME="addresses.firstName",e.ADDRESSES__ID="addresses.id",e.ADDRESSES__IDENTITY_NUMBER="addresses.identityNumber",e.ADDRESSES__IS_DEFAULT="addresses.isDefault",e.ADDRESSES__LAST_NAME="addresses.lastName",e.ADDRESSES__PHONE="addresses.phone",e.ADDRESSES__POSTAL_CODE="addresses.postalCode",e.ADDRESSES__STATE__CODE="addresses.state.code",e.ADDRESSES__STATE__ID="addresses.state.id",e.ADDRESSES__STATE__NAME="addresses.state.name",e.ADDRESSES__TAX_NUMBER="addresses.taxNumber",e.ADDRESSES__TAX_OFFICE="addresses.taxOffice",e.ADDRESSES__TITLE="addresses.title",e.ADDRESSES__UPDATED_AT="addresses.updatedAt",e.ATTRIBUTES__CUSTOMER_ATTRIBUTE_ID="attributes.customerAttributeId",e.ATTRIBUTES__CUSTOMER_ATTRIBUTE_OPTION_ID="attributes.customerAttributeOptionId",e.ATTRIBUTES__VALUE="attributes.value",e.CREATED_AT="createdAt",e.CUSTOMER_GROUP_IDS="customerGroupIds",e.CUSTOMER_SEQUENCE="customerSequence",e.DELETED="deleted",e.EMAIL="email",e.EMAIL_VERIFIED_DATE="emailVerifiedDate",e.FIRST_NAME="firstName",e.FULL_NAME="fullName",e.ID="id",e.IS_EMAIL_VERIFIED="isEmailVerified",e.IS_PHONE_VERIFIED="isPhoneVerified",e.LAST_NAME="lastName",e.NOTE="note",e.ORDER_COUNT="orderCount",e.PASSWORD_UPDATE_DATE="passwordUpdateDate",e.PHONE="phone",e.PHONE_VERIFIED_DATE="phoneVerifiedDate",e.REGISTRATION_SOURCE="registrationSource",e.SUBSCRIPTION_STATUS="subscriptionStatus",e.SUBSCRIPTION_STATUS_UPDATED_AT="subscriptionStatusUpdatedAt",e.TAG_IDS="tagIds",e.UPDATED_AT="updatedAt"}(a||(a={}));export{a as ResponseField,r as default};
|