nextemos 4.7.6 → 4.7.7

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.
@@ -107,4 +107,15 @@ exports.ShoppingCartService = {
107
107
  }), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
108
108
  });
109
109
  },
110
+ GetInstallmentOptions: function (data, options) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
113
+ serviceUrl: this.ServiceUrl(),
114
+ prefix: this.Prefix,
115
+ isClient: options === null || options === void 0 ? void 0 : options.useClient,
116
+ language: data === null || data === void 0 ? void 0 : data.language,
117
+ methodName: urls_1.default.ShoppingCart.GetInstallmentOptions,
118
+ }), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
119
+ });
120
+ },
110
121
  };
@@ -1,4 +1,4 @@
1
- import { IApiResponse, IRequestInit, IService, IGiftCardInfo, IRequestInfo, IGetCartItemCountResponse, IGetCartResponse } from '../..';
1
+ import { IApiResponse, IRequestInit, IService, IGiftCardInfo, IRequestInfo, IGetCartItemCountResponse, IGetCartResponse, IResponse } from '../..';
2
2
  export interface IAddToCartRequest {
3
3
  flags?: string | number | string[];
4
4
  productId: number;
@@ -60,6 +60,16 @@ export interface IChangeCartDetailRequest extends IGetCartRequest {
60
60
  cardBin?: string;
61
61
  reComputeShipper?: boolean;
62
62
  }
63
+ interface IGetInstallmentOptionsRequest extends IGetCartRequest {
64
+ productId?: number;
65
+ stockBarcodeId?: number;
66
+ children?: {
67
+ productId: number;
68
+ productHierarchyId?: number;
69
+ stockBarcodeId: number;
70
+ quantity?: number;
71
+ }[];
72
+ }
63
73
  export interface IShoppingCartService extends IService {
64
74
  AddToCart: (data: IAddToCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
65
75
  GetCartItemCount: (data: IGetCartItemCountRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartItemCountResponse>>;
@@ -67,4 +77,6 @@ export interface IShoppingCartService extends IService {
67
77
  RemoveFromCart: (data: IRemoveFromCartRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
68
78
  ChangeQuantity: (data: IChangeQuantityRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
69
79
  ChangeCartDetail: (data: IChangeCartDetailRequest, options?: IRequestInit) => Promise<IApiResponse<IGetCartResponse>>;
80
+ GetInstallmentOptions: (data: IGetInstallmentOptionsRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
70
81
  }
82
+ export {};
@@ -100,6 +100,7 @@ declare const _default: {
100
100
  RemoveFromCart: string;
101
101
  ChangeQuantity: string;
102
102
  ChangeCartDetail: string;
103
+ GetInstallmentOptions: string;
103
104
  };
104
105
  };
105
106
  export default _default;
@@ -106,6 +106,7 @@ exports.default = {
106
106
  RemoveFromCart: '/{language}/ShoppingCartGateway/v1/RemoveFromCart',
107
107
  ChangeQuantity: '/{language}/ShoppingCartGateway/v1/ChangeQuantity',
108
108
  ChangeCartDetail: '/{language}/ShoppingCartGateway/v1/ChangeCartDetail',
109
+ GetInstallmentOptions: '/{language}/ShoppingCartGateway/v1/GetInstallmentOptions',
109
110
  },
110
111
  };
111
112
  const getUrl = ({ isClient = false, language = process.env.DEFAULT_LANGUAGE || "tr", methodName, serviceUrl, prefix, id = '' }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "4.7.6",
3
+ "version": "4.7.7",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",