@ikas/storefront 0.0.168-alpha.13 → 0.0.168-alpha.15

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.
@@ -75,6 +75,7 @@ export declare enum CheckoutRequirementEnum {
75
75
  */
76
76
  export declare enum CheckoutStatusEnum {
77
77
  COMPLETED = "COMPLETED",
78
+ KILLED = "KILLED",
78
79
  OPEN = "OPEN"
79
80
  }
80
81
  /**
@@ -184,6 +185,11 @@ export declare enum PaymentGatewayTransactionFeeTypeEnum {
184
185
  AMOUNT = "AMOUNT",
185
186
  RATIO = "RATIO"
186
187
  }
188
+ export declare enum PaymentGatewayTypeEnum {
189
+ EXTERNAL = "EXTERNAL",
190
+ INTERNAL = "INTERNAL",
191
+ THIRD_PARTY = "THIRD_PARTY"
192
+ }
187
193
  export declare enum PaymentMethodEnum {
188
194
  APP_PAYMENT = "APP_PAYMENT",
189
195
  BUY_ONLINE_PAY_AT_STORE = "BUY_ONLINE_PAY_AT_STORE",
@@ -205,6 +211,7 @@ export declare enum ProductAttributeTypeEnum {
205
211
  HTML = "HTML",
206
212
  MULTIPLE_CHOICE = "MULTIPLE_CHOICE",
207
213
  NUMERIC = "NUMERIC",
214
+ PRODUCT = "PRODUCT",
208
215
  TABLE = "TABLE",
209
216
  TEXT = "TEXT"
210
217
  }
@@ -327,6 +334,11 @@ export interface CartLineItemInput {
327
334
  quantity: number;
328
335
  variant: CartLineVariantInput;
329
336
  }
337
+ export interface CartLineOptionInput {
338
+ productOptionId: string;
339
+ productOptionsSetId: string;
340
+ values: string[];
341
+ }
330
342
  export interface CartLineVariantInput {
331
343
  id?: string | null;
332
344
  name?: string | null;
@@ -369,28 +381,6 @@ export interface CustomerAddressDistrictInput {
369
381
  id?: string | null;
370
382
  name?: string | null;
371
383
  }
372
- export interface CustomerAddressInput {
373
- addressLine1: string;
374
- addressLine2?: string | null;
375
- city: CustomerAddressCityInput;
376
- company?: string | null;
377
- country: CustomerAddressCountryInput;
378
- createdAt?: any | null;
379
- deleted?: boolean | null;
380
- district?: CustomerAddressDistrictInput | null;
381
- firstName: string;
382
- id?: string | null;
383
- identityNumber?: string | null;
384
- isDefault?: boolean | null;
385
- lastName: string;
386
- phone?: string | null;
387
- postalCode: string;
388
- state?: CustomerAddressStateInput | null;
389
- taxNumber?: string | null;
390
- taxOffice?: string | null;
391
- title: string;
392
- updatedAt?: any | null;
393
- }
394
384
  export interface CustomerAddressStateInput {
395
385
  code?: string | null;
396
386
  id?: string | null;
@@ -428,7 +418,7 @@ export interface OrderAddressInput {
428
418
  isDefault: boolean;
429
419
  lastName: string;
430
420
  phone?: string | null;
431
- postalCode: string;
421
+ postalCode?: string | null;
432
422
  state?: OrderAddressStateInput | null;
433
423
  taxNumber?: string | null;
434
424
  taxOffice?: string | null;
@@ -512,14 +502,37 @@ export interface SaveItemToCartInput {
512
502
  cartId?: string | null;
513
503
  customerId?: string | null;
514
504
  item: CartLineItemInput;
505
+ options?: CartLineOptionInput[] | null;
515
506
  priceListId?: string | null;
516
507
  salesChannelId: string;
517
508
  storefrontId: string;
518
509
  storefrontRoutingId: string;
519
510
  storefrontThemeId: string;
520
511
  }
512
+ export interface SaveMyCustomerAddressInput {
513
+ addressLine1: string;
514
+ addressLine2?: string | null;
515
+ city: CustomerAddressCityInput;
516
+ company?: string | null;
517
+ country: CustomerAddressCountryInput;
518
+ createdAt?: any | null;
519
+ deleted?: boolean | null;
520
+ district?: CustomerAddressDistrictInput | null;
521
+ firstName: string;
522
+ id?: string | null;
523
+ identityNumber?: string | null;
524
+ isDefault?: boolean | null;
525
+ lastName: string;
526
+ phone?: string | null;
527
+ postalCode?: string | null;
528
+ state?: CustomerAddressStateInput | null;
529
+ taxNumber?: string | null;
530
+ taxOffice?: string | null;
531
+ title: string;
532
+ updatedAt?: any | null;
533
+ }
521
534
  export interface SaveMyCustomerInput {
522
- addresses?: CustomerAddressInput[] | null;
535
+ addresses?: SaveMyCustomerAddressInput[] | null;
523
536
  firstName: string;
524
537
  lastName: string;
525
538
  phone?: string | null;
@@ -1,4 +1,10 @@
1
1
  import { StringFilterInput, PaginationInput, CategoryProductsOrderTypeEnum, HTMLMetaDataTargetTypeEnum } from "../../../__generated__/global-types";
2
+ export interface listProductBrand_listProductBrand_data_metaData_translations {
3
+ __typename: "HTMLMetaDataTranslation";
4
+ description: string | null;
5
+ locale: string;
6
+ pageTitle: string | null;
7
+ }
2
8
  export interface listProductBrand_listProductBrand_data_metaData {
3
9
  __typename: "HTMLMetaData";
4
10
  slug: string;
@@ -7,6 +13,7 @@ export interface listProductBrand_listProductBrand_data_metaData {
7
13
  targetId: string | null;
8
14
  targetType: HTMLMetaDataTargetTypeEnum | null;
9
15
  redirectTo: string | null;
16
+ translations: listProductBrand_listProductBrand_data_metaData_translations[] | null;
10
17
  }
11
18
  export interface listProductBrand_listProductBrand_data_translations {
12
19
  __typename: "ProductBrandTranslation";
@@ -1,4 +1,9 @@
1
1
  import { SaveItemToCartInput, AmountTypeEnum, OrderLineItemStatusEnum } from "../../../__generated__/global-types";
2
+ export interface saveItemToCart_saveItemToCart_taxLines {
3
+ __typename: "OrderTaxLine";
4
+ price: number;
5
+ rate: number;
6
+ }
2
7
  export interface saveItemToCart_saveItemToCart_items_discount {
3
8
  __typename: "OrderLineDiscount";
4
9
  amount: number;
@@ -58,6 +63,7 @@ export interface saveItemToCart_saveItemToCart {
58
63
  storefrontId: string | null;
59
64
  storefrontRoutingId: string | null;
60
65
  storefrontThemeId: string | null;
66
+ taxLines: saveItemToCart_saveItemToCart_taxLines[] | null;
61
67
  items: saveItemToCart_saveItemToCart_items[];
62
68
  }
63
69
  export interface saveItemToCart {
@@ -1,4 +1,10 @@
1
1
  import { StringFilterInput, PaginationInput, CategoryProductsOrderTypeEnum, HTMLMetaDataTargetTypeEnum } from "../../../__generated__/global-types";
2
+ export interface listCategory_listCategory_data_metaData_translations {
3
+ __typename: "HTMLMetaDataTranslation";
4
+ description: string | null;
5
+ locale: string;
6
+ pageTitle: string | null;
7
+ }
2
8
  export interface listCategory_listCategory_data_metaData {
3
9
  __typename: "HTMLMetaData";
4
10
  slug: string;
@@ -7,6 +13,7 @@ export interface listCategory_listCategory_data_metaData {
7
13
  targetId: string | null;
8
14
  targetType: HTMLMetaDataTargetTypeEnum | null;
9
15
  redirectTo: string | null;
16
+ translations: listCategory_listCategory_data_metaData_translations[] | null;
10
17
  }
11
18
  export interface listCategory_listCategory_data_translations {
12
19
  __typename: "CategoryTranslation";
@@ -45,7 +45,7 @@ export interface getCheckoutById_getCheckoutById_billingAddress {
45
45
  isDefault: boolean;
46
46
  lastName: string;
47
47
  phone: string | null;
48
- postalCode: string;
48
+ postalCode: string | null;
49
49
  state: getCheckoutById_getCheckoutById_billingAddress_state | null;
50
50
  taxNumber: string | null;
51
51
  taxOffice: string | null;
@@ -95,7 +95,7 @@ export interface getCheckoutById_getCheckoutById_shippingAddress {
95
95
  isDefault: boolean;
96
96
  lastName: string;
97
97
  phone: string | null;
98
- postalCode: string;
98
+ postalCode: string | null;
99
99
  state: getCheckoutById_getCheckoutById_shippingAddress_state | null;
100
100
  taxNumber: string | null;
101
101
  taxOffice: string | null;
@@ -108,6 +108,11 @@ export interface getCheckoutById_getCheckoutById_shippingLines {
108
108
  shippingSettingsId: string | null;
109
109
  shippingZoneRateId: string | null;
110
110
  }
111
+ export interface getCheckoutById_getCheckoutById_cart_taxLines {
112
+ __typename: "OrderTaxLine";
113
+ price: number;
114
+ rate: number;
115
+ }
111
116
  export interface getCheckoutById_getCheckoutById_cart_items_discount {
112
117
  __typename: "OrderLineDiscount";
113
118
  amount: number;
@@ -160,6 +165,7 @@ export interface getCheckoutById_getCheckoutById_cart {
160
165
  dueDate: any;
161
166
  id: string;
162
167
  itemCount: number;
168
+ taxLines: getCheckoutById_getCheckoutById_cart_taxLines[] | null;
163
169
  items: getCheckoutById_getCheckoutById_cart_items[];
164
170
  merchantId: string;
165
171
  status: CartStatusEnum;
@@ -36,7 +36,7 @@ export interface getOrder_getOrder_billingAddress {
36
36
  isDefault: boolean;
37
37
  lastName: string;
38
38
  phone: string | null;
39
- postalCode: string;
39
+ postalCode: string | null;
40
40
  state: getOrder_getOrder_billingAddress_state | null;
41
41
  taxNumber: string | null;
42
42
  taxOffice: string | null;
@@ -153,7 +153,7 @@ export interface getOrder_getOrder_shippingAddress {
153
153
  taxOffice: string | null;
154
154
  taxNumber: string | null;
155
155
  state: getOrder_getOrder_shippingAddress_state | null;
156
- postalCode: string;
156
+ postalCode: string | null;
157
157
  phone: string | null;
158
158
  lastName: string;
159
159
  isDefault: boolean;
@@ -24,6 +24,7 @@ export interface listCheckoutSettings_listCheckoutSettings {
24
24
  updatedAt: any | null;
25
25
  isGiftPackageEnabled: boolean | null;
26
26
  giftPackagePriceList: listCheckoutSettings_listCheckoutSettings_giftPackagePriceList[] | null;
27
+ isShowPostalCode: boolean | null;
27
28
  }
28
29
  export interface listCheckoutSettings {
29
30
  listCheckoutSettings: listCheckoutSettings_listCheckoutSettings[];
@@ -1,4 +1,4 @@
1
- import { StringFilterInput, PaymentMethodEnum, PaymentGatewayTransactionFeeTypeEnum, PaymentGatewayAdditionalPriceTypeEnum } from "../../../__generated__/global-types";
1
+ import { StringFilterInput, PaymentMethodEnum, PaymentGatewayTypeEnum, PaymentGatewayTransactionFeeTypeEnum, PaymentGatewayAdditionalPriceTypeEnum } from "../../../__generated__/global-types";
2
2
  export interface listPaymentGateway_listPaymentGateway_paymentMethods {
3
3
  __typename: "PaymentGatewayPaymentMethod";
4
4
  name: string;
@@ -26,6 +26,8 @@ export interface listPaymentGateway_listPaymentGateway {
26
26
  description: string | null;
27
27
  testMode: boolean | null;
28
28
  code: string;
29
+ type: PaymentGatewayTypeEnum;
30
+ logoUrl: string | null;
29
31
  additionalPrices: listPaymentGateway_listPaymentGateway_additionalPrices[] | null;
30
32
  translations: listPaymentGateway_listPaymentGateway_translations[] | null;
31
33
  }
@@ -36,7 +36,7 @@ export interface createOrderRefundRequest_createOrderRefundRequest_billingAddres
36
36
  isDefault: boolean;
37
37
  lastName: string;
38
38
  phone: string | null;
39
- postalCode: string;
39
+ postalCode: string | null;
40
40
  state: createOrderRefundRequest_createOrderRefundRequest_billingAddress_state | null;
41
41
  taxNumber: string | null;
42
42
  taxOffice: string | null;
@@ -153,7 +153,7 @@ export interface createOrderRefundRequest_createOrderRefundRequest_shippingAddre
153
153
  taxOffice: string | null;
154
154
  taxNumber: string | null;
155
155
  state: createOrderRefundRequest_createOrderRefundRequest_shippingAddress_state | null;
156
- postalCode: string;
156
+ postalCode: string | null;
157
157
  phone: string | null;
158
158
  lastName: string;
159
159
  isDefault: boolean;
@@ -36,7 +36,7 @@ export interface customerLogin_customerLogin_customer_addresses {
36
36
  firstName: string;
37
37
  isDefault: boolean | null;
38
38
  lastName: string;
39
- postalCode: string;
39
+ postalCode: string | null;
40
40
  state: customerLogin_customerLogin_customer_addresses_state | null;
41
41
  taxNumber: string | null;
42
42
  taxOffice: string | null;
@@ -36,7 +36,7 @@ export interface getCustomerOrders_getCustomerOrders_billingAddress {
36
36
  isDefault: boolean;
37
37
  lastName: string;
38
38
  phone: string | null;
39
- postalCode: string;
39
+ postalCode: string | null;
40
40
  state: getCustomerOrders_getCustomerOrders_billingAddress_state | null;
41
41
  taxNumber: string | null;
42
42
  taxOffice: string | null;
@@ -153,7 +153,7 @@ export interface getCustomerOrders_getCustomerOrders_shippingAddress {
153
153
  taxOffice: string | null;
154
154
  taxNumber: string | null;
155
155
  state: getCustomerOrders_getCustomerOrders_shippingAddress_state | null;
156
- postalCode: string;
156
+ postalCode: string | null;
157
157
  phone: string | null;
158
158
  lastName: string;
159
159
  isDefault: boolean;
@@ -8,7 +8,7 @@ export interface getLastViewedProducts_getLastViewedProducts {
8
8
  products: getLastViewedProducts_getLastViewedProducts_products[];
9
9
  }
10
10
  export interface getLastViewedProducts {
11
- getLastViewedProducts: getLastViewedProducts_getLastViewedProducts;
11
+ getLastViewedProducts: getLastViewedProducts_getLastViewedProducts | null;
12
12
  }
13
13
  export interface getLastViewedProductsVariables {
14
14
  customerId?: string | null;
@@ -35,7 +35,7 @@ export interface getMyCustomer_getMyCustomer_addresses {
35
35
  firstName: string;
36
36
  isDefault: boolean | null;
37
37
  lastName: string;
38
- postalCode: string;
38
+ postalCode: string | null;
39
39
  state: getMyCustomer_getMyCustomer_addresses_state | null;
40
40
  taxNumber: string | null;
41
41
  taxOffice: string | null;
@@ -35,7 +35,7 @@ export interface registerCustomer_registerCustomer_customer_addresses {
35
35
  firstName: string;
36
36
  isDefault: boolean | null;
37
37
  lastName: string;
38
- postalCode: string;
38
+ postalCode: string | null;
39
39
  state: registerCustomer_registerCustomer_customer_addresses_state | null;
40
40
  taxNumber: string | null;
41
41
  taxOffice: string | null;
@@ -35,7 +35,7 @@ export interface saveMyCustomer_saveMyCustomer_addresses {
35
35
  firstName: string;
36
36
  isDefault: boolean | null;
37
37
  lastName: string;
38
- postalCode: string;
38
+ postalCode: string | null;
39
39
  state: saveMyCustomer_saveMyCustomer_addresses_state | null;
40
40
  identityNumber: string | null;
41
41
  taxNumber: string | null;
@@ -45,7 +45,7 @@ export interface getStorefront_getStorefront {
45
45
  themes: getStorefront_getStorefront_themes[];
46
46
  }
47
47
  export interface getStorefront {
48
- getStorefront: getStorefront_getStorefront;
48
+ getStorefront: getStorefront_getStorefront | null;
49
49
  }
50
50
  export interface getStorefrontVariables {
51
51
  id: string;
package/build/index.es.js CHANGED
@@ -19827,6 +19827,8 @@ var IkasPaymentGateway = /** @class */ (function () {
19827
19827
  this.id = data.id || null;
19828
19828
  this.name = data.name || "";
19829
19829
  this.code = data.code || "";
19830
+ this.type = data.type || IkasPaymentGatewayType.INTERNAL;
19831
+ this.logoUrl = data.logoUrl || null;
19830
19832
  this.testMode = data.testMode || null;
19831
19833
  this.description = data.description || null;
19832
19834
  this.additionalPrices =
@@ -19904,7 +19906,12 @@ var IkasPaymentGatewayAdditionalPriceAmountType;
19904
19906
  (function (IkasPaymentGatewayAdditionalPriceAmountType) {
19905
19907
  IkasPaymentGatewayAdditionalPriceAmountType["AMOUNT"] = "AMOUNT";
19906
19908
  IkasPaymentGatewayAdditionalPriceAmountType["RATIO"] = "RATIO";
19907
- })(IkasPaymentGatewayAdditionalPriceAmountType || (IkasPaymentGatewayAdditionalPriceAmountType = {}));
19909
+ })(IkasPaymentGatewayAdditionalPriceAmountType || (IkasPaymentGatewayAdditionalPriceAmountType = {}));
19910
+ var IkasPaymentGatewayType;
19911
+ (function (IkasPaymentGatewayType) {
19912
+ IkasPaymentGatewayType["EXTERNAL"] = "EXTERNAL";
19913
+ IkasPaymentGatewayType["INTERNAL"] = "INTERNAL";
19914
+ })(IkasPaymentGatewayType || (IkasPaymentGatewayType = {}));
19908
19915
 
19909
19916
  var IkasCheckout = /** @class */ (function () {
19910
19917
  function IkasCheckout(data) {
@@ -24142,7 +24149,10 @@ var CheckoutViewModel = /** @class */ (function () {
24142
24149
  if (!this.checkout.selectedPaymentGateway)
24143
24150
  return [2 /*return*/];
24144
24151
  return [4 /*yield*/, IkasCheckoutAPI.createSaleTransactionWithCheckout(this.checkout.id, this.checkout.selectedPaymentGateway.id, this.checkout.selectedPaymentGateway.paymentMethodType ===
24145
- IkasPaymentMethodType.CREDIT_CARD && this.cardData
24152
+ IkasPaymentMethodType.CREDIT_CARD &&
24153
+ this.checkout.selectedPaymentGateway.type ===
24154
+ IkasPaymentGatewayType.INTERNAL &&
24155
+ this.cardData
24146
24156
  ? this.cardData.toInput()
24147
24157
  : undefined)];
24148
24158
  case 1:
@@ -24221,7 +24231,9 @@ var CheckoutViewModel = /** @class */ (function () {
24221
24231
  var paymentGateway = _this.paymentGateways[index];
24222
24232
  _this.checkout.selectedPaymentGateway = paymentGateway;
24223
24233
  if (_this.step !== CheckoutStep.SUCCESS) {
24224
- if (paymentGateway.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD) {
24234
+ if (paymentGateway.paymentMethodType ===
24235
+ IkasPaymentMethodType.CREDIT_CARD &&
24236
+ paymentGateway.type === IkasPaymentGatewayType.INTERNAL) {
24225
24237
  _this.cardData = new CreditCardData();
24226
24238
  }
24227
24239
  _this.installmentInfo = undefined;
@@ -24381,15 +24393,16 @@ var CheckoutViewModel = /** @class */ (function () {
24381
24393
  });
24382
24394
  Object.defineProperty(CheckoutViewModel.prototype, "canPerformPayment", {
24383
24395
  get: function () {
24384
- var _a, _b, _c;
24396
+ var _a, _b;
24385
24397
  if (this.checkoutSettings.showTermsAndConditionsCheckbox &&
24386
24398
  !this.isTermsAndConditionsChecked)
24387
24399
  return false;
24400
+ var pg = this.checkout.selectedPaymentGateway;
24388
24401
  return (this.canProceedToShipping &&
24389
24402
  !!((_a = this.checkout.billingAddress) === null || _a === void 0 ? void 0 : _a.isValid) &&
24390
- (((_b = this.checkout.selectedPaymentGateway) === null || _b === void 0 ? void 0 : _b.paymentMethodType) ===
24391
- IkasPaymentMethodType.CREDIT_CARD
24392
- ? (_c = this.cardData) === null || _c === void 0 ? void 0 : _c.isValid : true));
24403
+ ((pg === null || pg === void 0 ? void 0 : pg.paymentMethodType) === IkasPaymentMethodType.CREDIT_CARD &&
24404
+ pg.type === IkasPaymentGatewayType.INTERNAL
24405
+ ? (_b = this.cardData) === null || _b === void 0 ? void 0 : _b.isValid : true));
24393
24406
  },
24394
24407
  enumerable: false,
24395
24408
  configurable: true
@@ -37643,6 +37656,7 @@ var CheckoutRequirementEnum;
37643
37656
  var CheckoutStatusEnum;
37644
37657
  (function (CheckoutStatusEnum) {
37645
37658
  CheckoutStatusEnum["COMPLETED"] = "COMPLETED";
37659
+ CheckoutStatusEnum["KILLED"] = "KILLED";
37646
37660
  CheckoutStatusEnum["OPEN"] = "OPEN";
37647
37661
  })(CheckoutStatusEnum || (CheckoutStatusEnum = {}));
37648
37662
  /**
@@ -37762,6 +37776,12 @@ var PaymentGatewayTransactionFeeTypeEnum;
37762
37776
  PaymentGatewayTransactionFeeTypeEnum["AMOUNT"] = "AMOUNT";
37763
37777
  PaymentGatewayTransactionFeeTypeEnum["RATIO"] = "RATIO";
37764
37778
  })(PaymentGatewayTransactionFeeTypeEnum || (PaymentGatewayTransactionFeeTypeEnum = {}));
37779
+ var PaymentGatewayTypeEnum;
37780
+ (function (PaymentGatewayTypeEnum) {
37781
+ PaymentGatewayTypeEnum["EXTERNAL"] = "EXTERNAL";
37782
+ PaymentGatewayTypeEnum["INTERNAL"] = "INTERNAL";
37783
+ PaymentGatewayTypeEnum["THIRD_PARTY"] = "THIRD_PARTY";
37784
+ })(PaymentGatewayTypeEnum || (PaymentGatewayTypeEnum = {}));
37765
37785
  var PaymentMethodEnum;
37766
37786
  (function (PaymentMethodEnum) {
37767
37787
  PaymentMethodEnum["APP_PAYMENT"] = "APP_PAYMENT";
@@ -37785,6 +37805,7 @@ var ProductAttributeTypeEnum;
37785
37805
  ProductAttributeTypeEnum["HTML"] = "HTML";
37786
37806
  ProductAttributeTypeEnum["MULTIPLE_CHOICE"] = "MULTIPLE_CHOICE";
37787
37807
  ProductAttributeTypeEnum["NUMERIC"] = "NUMERIC";
37808
+ ProductAttributeTypeEnum["PRODUCT"] = "PRODUCT";
37788
37809
  ProductAttributeTypeEnum["TABLE"] = "TABLE";
37789
37810
  ProductAttributeTypeEnum["TEXT"] = "TEXT";
37790
37811
  })(ProductAttributeTypeEnum || (ProductAttributeTypeEnum = {}));
@@ -41461,7 +41482,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
41461
41482
  return __generator(this, function (_b) {
41462
41483
  switch (_b.label) {
41463
41484
  case 0:
41464
- QUERY = src(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n }\n }\n "], ["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n }\n }\n "])));
41485
+ QUERY = src(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n }\n }\n "], ["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n }\n }\n "])));
41465
41486
  _b.label = 1;
41466
41487
  case 1:
41467
41488
  _b.trys.push([1, 3, , 4]);
@@ -69510,12 +69531,12 @@ var PaymentGateways = observer(function (_a) {
69510
69531
  };
69511
69532
  return (createElement(Fragment$1, null, vm.paymentGateways.map(function (pg, index) {
69512
69533
  var _a;
69513
- return (createElement(SelectBox$1, { key: pg.id, label: pg.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD
69534
+ return (createElement(SelectBox$1, { key: pg.id, label: pg.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD &&
69535
+ pg.type === IkasPaymentGatewayType.INTERNAL
69514
69536
  ? t("checkout-page:creditCard")
69515
- : pg.name, isSelected: vm.selectedPaymentGatewayIndex === index, rightContent: ((_a = pg.additionalPrices) === null || _a === void 0 ? void 0 : _a.length) ? (createElement(PaymentMethodAdjustment, null, getAdditionalPriceText(pg.additionalPrices[0]))) : (createElement(PaymentMethodLogos, null, pg.paymentMethods.map(function (pm, index) {
69516
- return pm.logoUrl ? (createElement("div", { className: styles$b.PaymentLogoContainer, key: index },
69517
- createElement("img", { src: pm.logoUrl }))) : (createElement("div", { className: styles$b.PaymentLogoContainer, key: index }));
69518
- }))), bottomContent: pg.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD ? (createElement("div", null,
69537
+ : pg.name, isSelected: vm.selectedPaymentGatewayIndex === index, rightContent: ((_a = pg.additionalPrices) === null || _a === void 0 ? void 0 : _a.length) ? (createElement(PaymentMethodAdjustment, null, getAdditionalPriceText(pg.additionalPrices[0]))) : (createElement(PaymentMethodLogos, null, !!pg.logoUrl && (createElement("div", { className: styles$b.PaymentLogoContainer },
69538
+ createElement("img", { src: pg.logoUrl }))))), bottomContent: pg.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD &&
69539
+ pg.type === IkasPaymentGatewayType.INTERNAL ? (createElement("div", null,
69519
69540
  createElement(CreditCardForm, { vm: vm }),
69520
69541
  vm.installmentInfo && createElement(Installments, { vm: vm }))) : pg.description ? (createElement("div", { dangerouslySetInnerHTML: { __html: pg.description } })) : undefined, onClick: function () {
69521
69542
  return vm.selectedPaymentGatewayIndex !== index &&
@@ -70196,7 +70217,7 @@ var Image = function (_a) {
70196
70217
  });
70197
70218
  return image.getSrc(closest);
70198
70219
  };
70199
- return (createElement(NextImage, __assign({}, others, { loader: loader, quality: 100, src: image.src, alt: others.alt || "Image" })));
70220
+ return (createElement(NextImage, __assign({}, others, { loader: loader, quality: 100, src: image.src, alt: others.alt || "Image", placeholder: "blur", blurDataURL: image.getSrc(180) })));
70200
70221
  };
70201
70222
 
70202
70223
  var styles$k = {"StepContainer":"style-module_StepContainer__1O2dD","Step":"style-module_Step__1iOYA","StepTitleContainer":"style-module_StepTitleContainer__2GUg2","First":"style-module_First__cAzdJ","StepTitleTop":"style-module_StepTitleTop__3zfsj","WithRightContent":"style-module_WithRightContent__2fqb1","StepCircle":"style-module_StepCircle__36A5q","Selected":"style-module_Selected__3j91L","StepTitle":"style-module_StepTitle__10YDP","Light":"style-module_Light__15wSX","StepTitleRightContent":"style-module_StepTitleRightContent__2Q43m","StepContent":"style-module_StepContent__20QIi"};
package/build/index.js CHANGED
@@ -19842,6 +19842,8 @@ var IkasPaymentGateway = /** @class */ (function () {
19842
19842
  this.id = data.id || null;
19843
19843
  this.name = data.name || "";
19844
19844
  this.code = data.code || "";
19845
+ this.type = data.type || IkasPaymentGatewayType.INTERNAL;
19846
+ this.logoUrl = data.logoUrl || null;
19845
19847
  this.testMode = data.testMode || null;
19846
19848
  this.description = data.description || null;
19847
19849
  this.additionalPrices =
@@ -19919,7 +19921,12 @@ var IkasPaymentGatewayAdditionalPriceAmountType;
19919
19921
  (function (IkasPaymentGatewayAdditionalPriceAmountType) {
19920
19922
  IkasPaymentGatewayAdditionalPriceAmountType["AMOUNT"] = "AMOUNT";
19921
19923
  IkasPaymentGatewayAdditionalPriceAmountType["RATIO"] = "RATIO";
19922
- })(IkasPaymentGatewayAdditionalPriceAmountType || (IkasPaymentGatewayAdditionalPriceAmountType = {}));
19924
+ })(IkasPaymentGatewayAdditionalPriceAmountType || (IkasPaymentGatewayAdditionalPriceAmountType = {}));
19925
+ var IkasPaymentGatewayType;
19926
+ (function (IkasPaymentGatewayType) {
19927
+ IkasPaymentGatewayType["EXTERNAL"] = "EXTERNAL";
19928
+ IkasPaymentGatewayType["INTERNAL"] = "INTERNAL";
19929
+ })(IkasPaymentGatewayType || (IkasPaymentGatewayType = {}));
19923
19930
 
19924
19931
  var IkasCheckout = /** @class */ (function () {
19925
19932
  function IkasCheckout(data) {
@@ -24149,7 +24156,10 @@ var CheckoutViewModel = /** @class */ (function () {
24149
24156
  if (!this.checkout.selectedPaymentGateway)
24150
24157
  return [2 /*return*/];
24151
24158
  return [4 /*yield*/, IkasCheckoutAPI.createSaleTransactionWithCheckout(this.checkout.id, this.checkout.selectedPaymentGateway.id, this.checkout.selectedPaymentGateway.paymentMethodType ===
24152
- IkasPaymentMethodType.CREDIT_CARD && this.cardData
24159
+ IkasPaymentMethodType.CREDIT_CARD &&
24160
+ this.checkout.selectedPaymentGateway.type ===
24161
+ IkasPaymentGatewayType.INTERNAL &&
24162
+ this.cardData
24153
24163
  ? this.cardData.toInput()
24154
24164
  : undefined)];
24155
24165
  case 1:
@@ -24228,7 +24238,9 @@ var CheckoutViewModel = /** @class */ (function () {
24228
24238
  var paymentGateway = _this.paymentGateways[index];
24229
24239
  _this.checkout.selectedPaymentGateway = paymentGateway;
24230
24240
  if (_this.step !== CheckoutStep.SUCCESS) {
24231
- if (paymentGateway.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD) {
24241
+ if (paymentGateway.paymentMethodType ===
24242
+ IkasPaymentMethodType.CREDIT_CARD &&
24243
+ paymentGateway.type === IkasPaymentGatewayType.INTERNAL) {
24232
24244
  _this.cardData = new CreditCardData();
24233
24245
  }
24234
24246
  _this.installmentInfo = undefined;
@@ -24388,15 +24400,16 @@ var CheckoutViewModel = /** @class */ (function () {
24388
24400
  });
24389
24401
  Object.defineProperty(CheckoutViewModel.prototype, "canPerformPayment", {
24390
24402
  get: function () {
24391
- var _a, _b, _c;
24403
+ var _a, _b;
24392
24404
  if (this.checkoutSettings.showTermsAndConditionsCheckbox &&
24393
24405
  !this.isTermsAndConditionsChecked)
24394
24406
  return false;
24407
+ var pg = this.checkout.selectedPaymentGateway;
24395
24408
  return (this.canProceedToShipping &&
24396
24409
  !!((_a = this.checkout.billingAddress) === null || _a === void 0 ? void 0 : _a.isValid) &&
24397
- (((_b = this.checkout.selectedPaymentGateway) === null || _b === void 0 ? void 0 : _b.paymentMethodType) ===
24398
- IkasPaymentMethodType.CREDIT_CARD
24399
- ? (_c = this.cardData) === null || _c === void 0 ? void 0 : _c.isValid : true));
24410
+ ((pg === null || pg === void 0 ? void 0 : pg.paymentMethodType) === IkasPaymentMethodType.CREDIT_CARD &&
24411
+ pg.type === IkasPaymentGatewayType.INTERNAL
24412
+ ? (_b = this.cardData) === null || _b === void 0 ? void 0 : _b.isValid : true));
24400
24413
  },
24401
24414
  enumerable: false,
24402
24415
  configurable: true
@@ -37625,6 +37638,7 @@ var CheckoutRequirementEnum;
37625
37638
  var CheckoutStatusEnum;
37626
37639
  (function (CheckoutStatusEnum) {
37627
37640
  CheckoutStatusEnum["COMPLETED"] = "COMPLETED";
37641
+ CheckoutStatusEnum["KILLED"] = "KILLED";
37628
37642
  CheckoutStatusEnum["OPEN"] = "OPEN";
37629
37643
  })(CheckoutStatusEnum || (CheckoutStatusEnum = {}));
37630
37644
  /**
@@ -37744,6 +37758,12 @@ var PaymentGatewayTransactionFeeTypeEnum;
37744
37758
  PaymentGatewayTransactionFeeTypeEnum["AMOUNT"] = "AMOUNT";
37745
37759
  PaymentGatewayTransactionFeeTypeEnum["RATIO"] = "RATIO";
37746
37760
  })(PaymentGatewayTransactionFeeTypeEnum || (PaymentGatewayTransactionFeeTypeEnum = {}));
37761
+ var PaymentGatewayTypeEnum;
37762
+ (function (PaymentGatewayTypeEnum) {
37763
+ PaymentGatewayTypeEnum["EXTERNAL"] = "EXTERNAL";
37764
+ PaymentGatewayTypeEnum["INTERNAL"] = "INTERNAL";
37765
+ PaymentGatewayTypeEnum["THIRD_PARTY"] = "THIRD_PARTY";
37766
+ })(PaymentGatewayTypeEnum || (PaymentGatewayTypeEnum = {}));
37747
37767
  var PaymentMethodEnum;
37748
37768
  (function (PaymentMethodEnum) {
37749
37769
  PaymentMethodEnum["APP_PAYMENT"] = "APP_PAYMENT";
@@ -37767,6 +37787,7 @@ var ProductAttributeTypeEnum;
37767
37787
  ProductAttributeTypeEnum["HTML"] = "HTML";
37768
37788
  ProductAttributeTypeEnum["MULTIPLE_CHOICE"] = "MULTIPLE_CHOICE";
37769
37789
  ProductAttributeTypeEnum["NUMERIC"] = "NUMERIC";
37790
+ ProductAttributeTypeEnum["PRODUCT"] = "PRODUCT";
37770
37791
  ProductAttributeTypeEnum["TABLE"] = "TABLE";
37771
37792
  ProductAttributeTypeEnum["TEXT"] = "TEXT";
37772
37793
  })(ProductAttributeTypeEnum || (ProductAttributeTypeEnum = {}));
@@ -41440,7 +41461,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
41440
41461
  return __generator(this, function (_b) {
41441
41462
  switch (_b.label) {
41442
41463
  case 0:
41443
- QUERY = src(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n }\n }\n "], ["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n }\n }\n "])));
41464
+ QUERY = src(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n }\n }\n "], ["\n query listPaymentGateway($id: StringFilterInput, $locale: String) {\n listPaymentGateway(id: $id, locale: $locale) {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n code\n type\n logoUrl\n additionalPrices {\n amount\n amountType\n name\n type\n }\n translations {\n description\n locale\n name\n }\n }\n }\n "])));
41444
41465
  _b.label = 1;
41445
41466
  case 1:
41446
41467
  _b.trys.push([1, 3, , 4]);
@@ -69489,12 +69510,12 @@ var PaymentGateways = mobxReactLite.observer(function (_a) {
69489
69510
  };
69490
69511
  return (React.createElement(React.Fragment, null, vm.paymentGateways.map(function (pg, index) {
69491
69512
  var _a;
69492
- return (React.createElement(SelectBox$1, { key: pg.id, label: pg.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD
69513
+ return (React.createElement(SelectBox$1, { key: pg.id, label: pg.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD &&
69514
+ pg.type === IkasPaymentGatewayType.INTERNAL
69493
69515
  ? t("checkout-page:creditCard")
69494
- : pg.name, isSelected: vm.selectedPaymentGatewayIndex === index, rightContent: ((_a = pg.additionalPrices) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement(PaymentMethodAdjustment, null, getAdditionalPriceText(pg.additionalPrices[0]))) : (React.createElement(PaymentMethodLogos, null, pg.paymentMethods.map(function (pm, index) {
69495
- return pm.logoUrl ? (React.createElement("div", { className: styles$b.PaymentLogoContainer, key: index },
69496
- React.createElement("img", { src: pm.logoUrl }))) : (React.createElement("div", { className: styles$b.PaymentLogoContainer, key: index }));
69497
- }))), bottomContent: pg.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD ? (React.createElement("div", null,
69516
+ : pg.name, isSelected: vm.selectedPaymentGatewayIndex === index, rightContent: ((_a = pg.additionalPrices) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement(PaymentMethodAdjustment, null, getAdditionalPriceText(pg.additionalPrices[0]))) : (React.createElement(PaymentMethodLogos, null, !!pg.logoUrl && (React.createElement("div", { className: styles$b.PaymentLogoContainer },
69517
+ React.createElement("img", { src: pg.logoUrl }))))), bottomContent: pg.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD &&
69518
+ pg.type === IkasPaymentGatewayType.INTERNAL ? (React.createElement("div", null,
69498
69519
  React.createElement(CreditCardForm, { vm: vm }),
69499
69520
  vm.installmentInfo && React.createElement(Installments, { vm: vm }))) : pg.description ? (React.createElement("div", { dangerouslySetInnerHTML: { __html: pg.description } })) : undefined, onClick: function () {
69500
69521
  return vm.selectedPaymentGatewayIndex !== index &&
@@ -70175,7 +70196,7 @@ var Image = function (_a) {
70175
70196
  });
70176
70197
  return image.getSrc(closest);
70177
70198
  };
70178
- return (React.createElement(NextImage__default['default'], __assign({}, others, { loader: loader, quality: 100, src: image.src, alt: others.alt || "Image" })));
70199
+ return (React.createElement(NextImage__default['default'], __assign({}, others, { loader: loader, quality: 100, src: image.src, alt: others.alt || "Image", placeholder: "blur", blurDataURL: image.getSrc(180) })));
70179
70200
  };
70180
70201
 
70181
70202
  var styles$k = {"StepContainer":"style-module_StepContainer__1O2dD","Step":"style-module_Step__1iOYA","StepTitleContainer":"style-module_StepTitleContainer__2GUg2","First":"style-module_First__cAzdJ","StepTitleTop":"style-module_StepTitleTop__3zfsj","WithRightContent":"style-module_WithRightContent__2fqb1","StepCircle":"style-module_StepCircle__36A5q","Selected":"style-module_Selected__3j91L","StepTitle":"style-module_StepTitle__10YDP","Light":"style-module_Light__15wSX","StepTitleRightContent":"style-module_StepTitleRightContent__2Q43m","StepContent":"style-module_StepContent__20QIi"};
@@ -5,6 +5,8 @@ export declare class IkasPaymentGateway {
5
5
  id: string | null;
6
6
  name: string;
7
7
  code: string;
8
+ type: IkasPaymentGatewayType;
9
+ logoUrl: string | null;
8
10
  testMode: boolean | null;
9
11
  description: string | null;
10
12
  additionalPrices: IkasPaymentGatewayAdditionalPrice[] | null;
@@ -45,6 +47,10 @@ export declare enum IkasPaymentGatewayAdditionalPriceAmountType {
45
47
  AMOUNT = "AMOUNT",
46
48
  RATIO = "RATIO"
47
49
  }
50
+ export declare enum IkasPaymentGatewayType {
51
+ EXTERNAL = "EXTERNAL",
52
+ INTERNAL = "INTERNAL"
53
+ }
48
54
  declare type IkasPaymentGatewayTranslation = {
49
55
  description: string | null;
50
56
  locale: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.168-alpha.13",
3
+ "version": "0.0.168-alpha.15",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",