@ikas/storefront-api 4.0.0-beta.9 → 4.0.1
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/CustomerReviewSummary.d.ts +1 -0
- package/build/__api/models/OrderLineVariant.d.ts +1 -0
- package/build/__api/models/SaveCartInput.d.ts +0 -2
- package/build/__api/models/SaveCartInput.js +1 -1
- package/build/__api/mutations/addCouponCodeToCheckout.d.ts +1 -0
- package/build/__api/mutations/addItemToCart.d.ts +1 -0
- package/build/__api/mutations/addItemToCart.js +1 -1
- package/build/__api/mutations/createOrderRefundRequest.d.ts +1 -0
- package/build/__api/mutations/createOrderRefundRequest.js +1 -1
- package/build/__api/mutations/saveCart.d.ts +1 -0
- package/build/__api/mutations/saveCart.js +1 -1
- package/build/__api/mutations/saveCartCouponCode.d.ts +1 -0
- package/build/__api/mutations/saveCartCouponCode.js +1 -1
- package/build/__api/mutations/saveCheckout.d.ts +1 -0
- package/build/__api/mutations/saveItemToCart.d.ts +1 -0
- package/build/__api/mutations/updateCartCampaignOffer.d.ts +1 -0
- package/build/__api/mutations/updateCartCampaignOffer.js +1 -1
- package/build/__api/queries/getCart.d.ts +1 -0
- package/build/__api/queries/getCartById.d.ts +1 -0
- package/build/__api/queries/getCartById.js +1 -1
- package/build/__api/queries/getCheckoutByCartId.d.ts +1 -0
- package/build/__api/queries/getCheckoutById.d.ts +1 -0
- package/build/__api/queries/getCustomerOrders.d.ts +1 -0
- package/build/__api/queries/getCustomerOrders.js +1 -1
- package/build/__api/queries/getOrder.d.ts +1 -0
- package/build/__api/queries/getOrderByEmail.d.ts +1 -0
- package/build/__api/queries/getOrderByEmail.js +1 -1
- package/build/__api/queries/listCustomerReviewSummary.d.ts +2 -0
- package/build/__api/queries/listCustomerReviewSummary.js +1 -1
- package/build/__api/queries/listCustomerSettings.d.ts +1 -1
- package/build/__api/queries/listCustomerSettings.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 +2 -1
- package/build/api/category/index.d.ts +1 -1
- package/build/api/category/index.js +1 -1
- package/build/api/customer/index.d.ts +71 -1
- package/build/api/customer/index.js +1 -1
- package/build/index.js +1 -1
- package/build/index2.js +1 -1
- package/package.json +7 -7
- package/build/__api/models/OrderAdjustmentInput.js +0 -1
|
@@ -21,7 +21,8 @@ import { QueryParams as IsFavoriteProductQueryParams } from "../../__api/queries
|
|
|
21
21
|
import { QueryParams as CreateCustomerReviewQueryParams } from "../../__api/mutations/createCustomerReview";
|
|
22
22
|
import { QueryParams as ListCustomerReviewsQueryParams } from "../../__api/queries/listCustomerReviews";
|
|
23
23
|
import { QueryParams as ListCustomerReviewSummaryQueryParams } from "../../__api/queries/listCustomerReviewSummary";
|
|
24
|
-
import {
|
|
24
|
+
import { QueryParams as ListCustomerSettingsQueryParams } from "../../__api/queries/listCustomerSettings";
|
|
25
|
+
import { IkasCustomer, IkasCustomerAttribute, IkasCustomerReview, IkasCustomerReviewSummary, IkasFavoriteProduct, IkasLastViewedProduct, IkasOrder, IkasOrderRefundSettings, IkasOrderTransaction, IkasCustomerSettings } from "@ikas/storefront-models";
|
|
25
26
|
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
27
|
export declare function login(params: CustomerLoginQueryParams): Promise<APIResponse<{
|
|
27
28
|
customer: IkasCustomer | null;
|
|
@@ -128,3 +129,72 @@ export declare function listCustomerReviewSummary(params: ListCustomerReviewSumm
|
|
|
128
129
|
page?: number | undefined;
|
|
129
130
|
}>>;
|
|
130
131
|
export declare function listCustomerAttribute(): Promise<APIResponse<IkasCustomerAttribute[]>>;
|
|
132
|
+
export declare function listCustomerSettings(params: ListCustomerSettingsQueryParams): Promise<APIResponse<{
|
|
133
|
+
data: IkasCustomerSettings[];
|
|
134
|
+
length?: number | undefined;
|
|
135
|
+
toString?: (() => string) | undefined;
|
|
136
|
+
toLocaleString?: (() => string) | undefined;
|
|
137
|
+
pop?: (() => import("../../__api/types").CustomerSettings | undefined) | undefined;
|
|
138
|
+
push?: ((...items: import("../../__api/types").CustomerSettings[]) => number) | undefined;
|
|
139
|
+
concat?: {
|
|
140
|
+
(...items: ConcatArray<import("../../__api/types").CustomerSettings>[]): import("../../__api/types").CustomerSettings[];
|
|
141
|
+
(...items: (import("../../__api/types").CustomerSettings | ConcatArray<import("../../__api/types").CustomerSettings>)[]): import("../../__api/types").CustomerSettings[];
|
|
142
|
+
} | undefined;
|
|
143
|
+
join?: ((separator?: string | undefined) => string) | undefined;
|
|
144
|
+
reverse?: (() => import("../../__api/types").CustomerSettings[]) | undefined;
|
|
145
|
+
shift?: (() => import("../../__api/types").CustomerSettings | undefined) | undefined;
|
|
146
|
+
slice?: ((start?: number | undefined, end?: number | undefined) => import("../../__api/types").CustomerSettings[]) | undefined;
|
|
147
|
+
sort?: ((compareFn?: ((a: import("../../__api/types").CustomerSettings, b: import("../../__api/types").CustomerSettings) => number) | undefined) => import("../../__api/types").CustomerSettings[]) | undefined;
|
|
148
|
+
splice?: {
|
|
149
|
+
(start: number, deleteCount?: number | undefined): import("../../__api/types").CustomerSettings[];
|
|
150
|
+
(start: number, deleteCount: number, ...items: import("../../__api/types").CustomerSettings[]): import("../../__api/types").CustomerSettings[];
|
|
151
|
+
} | undefined;
|
|
152
|
+
unshift?: ((...items: import("../../__api/types").CustomerSettings[]) => number) | undefined;
|
|
153
|
+
indexOf?: ((searchElement: import("../../__api/types").CustomerSettings, fromIndex?: number | undefined) => number) | undefined;
|
|
154
|
+
lastIndexOf?: ((searchElement: import("../../__api/types").CustomerSettings, fromIndex?: number | undefined) => number) | undefined;
|
|
155
|
+
every?: {
|
|
156
|
+
<S extends import("../../__api/types").CustomerSettings>(predicate: (value: import("../../__api/types").CustomerSettings, index: number, array: import("../../__api/types").CustomerSettings[]) => value is S, thisArg?: any): this is S[];
|
|
157
|
+
(predicate: (value: import("../../__api/types").CustomerSettings, index: number, array: import("../../__api/types").CustomerSettings[]) => unknown, thisArg?: any): boolean;
|
|
158
|
+
} | undefined;
|
|
159
|
+
some?: ((predicate: (value: import("../../__api/types").CustomerSettings, index: number, array: import("../../__api/types").CustomerSettings[]) => unknown, thisArg?: any) => boolean) | undefined;
|
|
160
|
+
forEach?: ((callbackfn: (value: import("../../__api/types").CustomerSettings, index: number, array: import("../../__api/types").CustomerSettings[]) => void, thisArg?: any) => void) | undefined;
|
|
161
|
+
map?: (<U>(callbackfn: (value: import("../../__api/types").CustomerSettings, index: number, array: import("../../__api/types").CustomerSettings[]) => U, thisArg?: any) => U[]) | undefined;
|
|
162
|
+
filter?: {
|
|
163
|
+
<S_1 extends import("../../__api/types").CustomerSettings>(predicate: (value: import("../../__api/types").CustomerSettings, index: number, array: import("../../__api/types").CustomerSettings[]) => value is S_1, thisArg?: any): S_1[];
|
|
164
|
+
(predicate: (value: import("../../__api/types").CustomerSettings, index: number, array: import("../../__api/types").CustomerSettings[]) => unknown, thisArg?: any): import("../../__api/types").CustomerSettings[];
|
|
165
|
+
} | undefined;
|
|
166
|
+
reduce?: {
|
|
167
|
+
(callbackfn: (previousValue: import("../../__api/types").CustomerSettings, currentValue: import("../../__api/types").CustomerSettings, currentIndex: number, array: import("../../__api/types").CustomerSettings[]) => import("../../__api/types").CustomerSettings): import("../../__api/types").CustomerSettings;
|
|
168
|
+
(callbackfn: (previousValue: import("../../__api/types").CustomerSettings, currentValue: import("../../__api/types").CustomerSettings, currentIndex: number, array: import("../../__api/types").CustomerSettings[]) => import("../../__api/types").CustomerSettings, initialValue: import("../../__api/types").CustomerSettings): import("../../__api/types").CustomerSettings;
|
|
169
|
+
<U_1>(callbackfn: (previousValue: U_1, currentValue: import("../../__api/types").CustomerSettings, currentIndex: number, array: import("../../__api/types").CustomerSettings[]) => U_1, initialValue: U_1): U_1;
|
|
170
|
+
} | undefined;
|
|
171
|
+
reduceRight?: {
|
|
172
|
+
(callbackfn: (previousValue: import("../../__api/types").CustomerSettings, currentValue: import("../../__api/types").CustomerSettings, currentIndex: number, array: import("../../__api/types").CustomerSettings[]) => import("../../__api/types").CustomerSettings): import("../../__api/types").CustomerSettings;
|
|
173
|
+
(callbackfn: (previousValue: import("../../__api/types").CustomerSettings, currentValue: import("../../__api/types").CustomerSettings, currentIndex: number, array: import("../../__api/types").CustomerSettings[]) => import("../../__api/types").CustomerSettings, initialValue: import("../../__api/types").CustomerSettings): import("../../__api/types").CustomerSettings;
|
|
174
|
+
<U_2>(callbackfn: (previousValue: U_2, currentValue: import("../../__api/types").CustomerSettings, currentIndex: number, array: import("../../__api/types").CustomerSettings[]) => U_2, initialValue: U_2): U_2;
|
|
175
|
+
} | undefined;
|
|
176
|
+
find?: {
|
|
177
|
+
<S_2 extends import("../../__api/types").CustomerSettings>(predicate: (this: void, value: import("../../__api/types").CustomerSettings, index: number, obj: import("../../__api/types").CustomerSettings[]) => value is S_2, thisArg?: any): S_2 | undefined;
|
|
178
|
+
(predicate: (value: import("../../__api/types").CustomerSettings, index: number, obj: import("../../__api/types").CustomerSettings[]) => unknown, thisArg?: any): import("../../__api/types").CustomerSettings | undefined;
|
|
179
|
+
} | undefined;
|
|
180
|
+
findIndex?: ((predicate: (value: import("../../__api/types").CustomerSettings, index: number, obj: import("../../__api/types").CustomerSettings[]) => unknown, thisArg?: any) => number) | undefined;
|
|
181
|
+
fill?: ((value: import("../../__api/types").CustomerSettings, start?: number | undefined, end?: number | undefined) => import("../../__api/types").CustomerSettings[]) | undefined;
|
|
182
|
+
copyWithin?: ((target: number, start: number, end?: number | undefined) => import("../../__api/types").CustomerSettings[]) | undefined;
|
|
183
|
+
entries?: (() => IterableIterator<[number, import("../../__api/types").CustomerSettings]>) | undefined;
|
|
184
|
+
keys?: (() => IterableIterator<number>) | undefined;
|
|
185
|
+
values?: (() => IterableIterator<import("../../__api/types").CustomerSettings>) | undefined;
|
|
186
|
+
includes?: ((searchElement: import("../../__api/types").CustomerSettings, fromIndex?: number | undefined) => boolean) | undefined;
|
|
187
|
+
flatMap?: (<U_3, This = undefined>(callback: (this: This, value: import("../../__api/types").CustomerSettings, index: number, array: import("../../__api/types").CustomerSettings[]) => U_3 | readonly U_3[], thisArg?: This | undefined) => U_3[]) | undefined;
|
|
188
|
+
flat?: (<A, D extends number = 1>(this: A, depth?: D | undefined) => FlatArray<A, D>[]) | undefined;
|
|
189
|
+
[Symbol.iterator]?: (() => IterableIterator<import("../../__api/types").CustomerSettings>) | undefined;
|
|
190
|
+
[Symbol.unscopables]?: (() => {
|
|
191
|
+
copyWithin: boolean;
|
|
192
|
+
entries: boolean;
|
|
193
|
+
fill: boolean;
|
|
194
|
+
find: boolean;
|
|
195
|
+
findIndex: boolean;
|
|
196
|
+
keys: boolean;
|
|
197
|
+
values: boolean;
|
|
198
|
+
}) | undefined;
|
|
199
|
+
at?: ((index: number) => import("../../__api/types").CustomerSettings | undefined) | undefined;
|
|
200
|
+
}>>;
|
|
@@ -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,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
|
|
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 C(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 Q(){return t(this,void 0,void 0,(function(){var t,e;return r(this,(function(r){switch(r.label){case 0:return[4,import("../../__api/queries/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 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/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 S(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 T(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]}))]}}))}))}function y(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)]}}))}))}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,T as listCustomerReviewSummary,S as listCustomerReviews,y as listCustomerSettings,Q as listFavoriteProducts,L as listOrderRefundSettings,w as listOrderTransactions,a as login,f as recoverPassword,d as refreshToken,c as register,p as saveCustomer,R as saveFavoriteProduct,j as saveLastViewedProducts,C 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,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";
|
|
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,listCustomerSettings,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/build/index2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Config as e,APIErrorCode as o}from"@ikas/fe-api-client";export{APIResponse,Config as IkasAPIClientConfig}from"@ikas/fe-api-client";import{IkasStorefrontConfig as t}from"@ikas/storefront-config";import"@ikas/storefront-models";import"axios";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";function r(){e.URL=t.getApiUrl()||"",e.HEADERS={"x-api-key":t.getApiKey()||"","x-sfid":t.getStorefrontId()||"","x-sfrid":t.getStorefrontRoutingId()||"","x-sid":t.getSessionId()||"","x-vid":t.getVisitorId()||""},t.getCustomerToken()&&(e.TOKEN=t.getCustomerToken()||""),t.getLoginRequiredCallback()&&(e.ON_ERROR={
|
|
1
|
+
import{Config as e,APIErrorCode as o}from"@ikas/fe-api-client";export{APIResponse,Config as IkasAPIClientConfig}from"@ikas/fe-api-client";import{IkasStorefrontConfig as t}from"@ikas/storefront-config";import"@ikas/storefront-models";import"axios";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";function r(){e.URL=t.getApiUrl()||"",e.HEADERS={"x-api-key":t.getApiKey()||"","x-sfid":t.getStorefrontId()||"","x-sfrid":t.getStorefrontRoutingId()||"","x-sid":t.getSessionId()||"","x-vid":t.getVisitorId()||""},t.getCustomerToken()&&(e.TOKEN=t.getCustomerToken()||""),t.getLoginRequiredCallback()&&(e.ON_ERROR={errorCodes:[{errorCode:o.LOGIN_REQUIRED,callback:t.getLoginRequiredCallback()}]})}t.addObserver({id:"ikas-storefront-api",callback:r});export{r as setAPIClientConfig};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-api",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
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": "^4.0.
|
|
21
|
-
"@ikas/storefront-models": "^4.0.
|
|
20
|
+
"@ikas/storefront-config": "^4.0.1",
|
|
21
|
+
"@ikas/storefront-models": "^4.0.1",
|
|
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",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"typescript-transform-paths": "^2.2.2",
|
|
32
32
|
"axios": "^0.26.0",
|
|
33
33
|
"ts-essentials": "^7.0.1",
|
|
34
|
-
"@ikas/fe-api-client": "^1.0.
|
|
34
|
+
"@ikas/fe-api-client": "^1.0.18"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@ikas/storefront-config": "^4.0.
|
|
38
|
-
"@ikas/storefront-models": "^4.0.
|
|
39
|
-
"@ikas/fe-api-client": "^1.0.
|
|
37
|
+
"@ikas/storefront-config": "^4.0.1",
|
|
38
|
+
"@ikas/storefront-models": "^4.0.1",
|
|
39
|
+
"@ikas/fe-api-client": "^1.0.18",
|
|
40
40
|
"axios": "^0.26.0",
|
|
41
41
|
"ts-essentials": "^7.0.1"
|
|
42
42
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__extends as t}from'./../../ext/tslib/tslib.es6.js';import{AmountTypeEnum as n,AdjustmentEnum as o}from"../types/index.js";var i=function(t){void 0===t&&(t={}),this.amount=t.amount||0,this.amountType=t.amountType||n.AMOUNT,this.campaignId=t.campaignId||null,this.couponId=t.couponId||null,this.name=t.name||"",this.order=t.order||0,this.type=t.type||o.DECREMENT};!function(n){function o(){return null!==n&&n.apply(this,arguments)||this}t(o,n)}(i);export{i as OrderAdjustmentInputData};
|