nextemos 5.3.14 → 5.4.0

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.
@@ -27,6 +27,11 @@ export interface Banner {
27
27
  }
28
28
  export interface BannerContainer {
29
29
  id?: number;
30
+ name?: string;
31
+ description?: string;
32
+ type?: string;
33
+ keys?: string;
34
+ extensionData?: any;
30
35
  tenantId?: string;
31
36
  bannerContainerTypeId?: number;
32
37
  templateId?: number;
@@ -40,3 +40,18 @@ export interface IDynamicPropertyOption {
40
40
  orderNumber: number;
41
41
  isApproved: boolean;
42
42
  }
43
+ export interface ICurrenciesResponse extends IResponse {
44
+ currencyLists: ICurrency[];
45
+ }
46
+ export interface ICurrency {
47
+ id: number;
48
+ name: string;
49
+ shortName: string;
50
+ currencyCode: string;
51
+ symbol: string;
52
+ isApproved: boolean;
53
+ integrationCode: string;
54
+ format: string;
55
+ currencyPositivePatternId: number;
56
+ currencyNegativePatternId: number;
57
+ }
@@ -0,0 +1,33 @@
1
+ import { IResponse } from "./response";
2
+ export interface IGetMemberCouponsResponse extends IResponse {
3
+ coupons: IMemberCoupon[];
4
+ }
5
+ export interface IMemberCoupon {
6
+ id: number;
7
+ code: string;
8
+ couponTypeId: number;
9
+ couponType: string;
10
+ price: number;
11
+ userNote: string;
12
+ groupName: string;
13
+ currencyId: number;
14
+ startDate: string;
15
+ endDate: string;
16
+ totalDays: number;
17
+ couponStatus: string;
18
+ displayPeriod: {
19
+ id: number;
20
+ name: string;
21
+ periods: Array<{
22
+ start: string;
23
+ end: string;
24
+ totalDays: number;
25
+ }>;
26
+ };
27
+ iconUrl: string;
28
+ priceTypeId: number;
29
+ couponGroupId: number;
30
+ email: string;
31
+ memberId: number;
32
+ usedPrice: number;
33
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,35 +1,37 @@
1
- export * from './shared';
2
- export * from './response';
3
- export * from './banner';
4
- export * from './blog';
5
- export * from './product';
6
- export * from './route';
7
- export * from './stock';
8
- export * from './member';
9
- export * from './address';
10
- export * from './prediction';
11
- export * from './localization';
12
- export * from './environment';
13
- export * from './keycloack';
14
- export * from './service';
15
- export * from './shoppingcart';
16
- export * from './ordermanagement';
17
- export * from './notification';
18
- export * from './payment';
19
- export * from './campaign';
20
- export * from './core';
21
- export * from '../services/banner/banner.types';
22
- export * from '../services/blog/blog.types';
23
- export * from '../services/product/product.types';
24
- export * from '../services/route/route.types';
25
- export * from '../services/stock/stock.types';
26
- export * from '../services/member/member.types';
27
- export * from '../services/address/address.types';
28
- export * from '../services/prediction/prediction.types';
29
- export * from '../services/localization/localization.types';
30
- export * from '../services/shoppingcart/shoppingcart.types';
31
- export * from '../services/ordermanagement/ordermanagement.types';
32
- export * from '../services/notification/notification.types';
33
- export * from '../services/payment/payment.types';
34
- export * from '../services/campaign/campaign.types';
35
- export * from '../services/core/core.types';
1
+ export * from "./shared";
2
+ export * from "./response";
3
+ export * from "./banner";
4
+ export * from "./blog";
5
+ export * from "./product";
6
+ export * from "./route";
7
+ export * from "./stock";
8
+ export * from "./member";
9
+ export * from "./address";
10
+ export * from "./prediction";
11
+ export * from "./localization";
12
+ export * from "./environment";
13
+ export * from "./keycloack";
14
+ export * from "./service";
15
+ export * from "./shoppingcart";
16
+ export * from "./ordermanagement";
17
+ export * from "./notification";
18
+ export * from "./payment";
19
+ export * from "./campaign";
20
+ export * from "./core";
21
+ export * from "./coupon";
22
+ export * from "../services/banner/banner.types";
23
+ export * from "../services/blog/blog.types";
24
+ export * from "../services/product/product.types";
25
+ export * from "../services/route/route.types";
26
+ export * from "../services/stock/stock.types";
27
+ export * from "../services/member/member.types";
28
+ export * from "../services/address/address.types";
29
+ export * from "../services/prediction/prediction.types";
30
+ export * from "../services/localization/localization.types";
31
+ export * from "../services/shoppingcart/shoppingcart.types";
32
+ export * from "../services/ordermanagement/ordermanagement.types";
33
+ export * from "../services/notification/notification.types";
34
+ export * from "../services/payment/payment.types";
35
+ export * from "../services/campaign/campaign.types";
36
+ export * from "../services/core/core.types";
37
+ export * from "../services/coupon/coupon.types";
@@ -35,6 +35,7 @@ __exportStar(require("./notification"), exports);
35
35
  __exportStar(require("./payment"), exports);
36
36
  __exportStar(require("./campaign"), exports);
37
37
  __exportStar(require("./core"), exports);
38
+ __exportStar(require("./coupon"), exports);
38
39
  /// service types
39
40
  __exportStar(require("../services/banner/banner.types"), exports);
40
41
  __exportStar(require("../services/blog/blog.types"), exports);
@@ -51,3 +52,4 @@ __exportStar(require("../services/notification/notification.types"), exports);
51
52
  __exportStar(require("../services/payment/payment.types"), exports);
52
53
  __exportStar(require("../services/campaign/campaign.types"), exports);
53
54
  __exportStar(require("../services/core/core.types"), exports);
55
+ __exportStar(require("../services/coupon/coupon.types"), exports);
@@ -1,4 +1,4 @@
1
- import { IApiResponse, ICheckUpdateResponse, IDynamicPropertiesResponse, IDynamicValuesResponse, IRequestBase, IRequestInit, IService } from "../..";
1
+ import { IApiResponse, ICheckUpdateResponse, ICurrenciesResponse, IDynamicPropertiesResponse, IDynamicValuesResponse, IRequestBase, IRequestInit, IResponse, IService } from "../..";
2
2
  export interface ICheckUpdateRequest extends IRequestBase {
3
3
  version: string;
4
4
  mobilePlatform: string;
@@ -6,8 +6,13 @@ export interface ICheckUpdateRequest extends IRequestBase {
6
6
  export interface IDynamicPropertiesRequest extends IRequestBase {
7
7
  formName: string;
8
8
  }
9
+ export interface ISetCurrencyRequest extends IRequestBase {
10
+ currencyId: number;
11
+ }
9
12
  export interface ICoreService extends IService {
10
13
  CheckUpdate: (data: ICheckUpdateRequest, options?: IRequestInit) => Promise<IApiResponse<ICheckUpdateResponse>>;
11
14
  DynamicProperties: (data: IDynamicPropertiesRequest, options?: IRequestInit) => Promise<IApiResponse<IDynamicPropertiesResponse>>;
12
15
  DynamicValues: (data: FormData, options?: IRequestInit) => Promise<IApiResponse<IDynamicValuesResponse>>;
16
+ Currencies: (options?: IRequestInit) => Promise<IApiResponse<ICurrenciesResponse>>;
17
+ SetCurrency: (data: ISetCurrencyRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
13
18
  }
@@ -61,4 +61,11 @@ exports.CoreService = {
61
61
  DynamicValues: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
62
62
  return (0, __1.fetchRequest)().post(exports.CoreService.Url(urls_1.default.DynamicForm.Values, options), Object.assign({ body: data }, options));
63
63
  }),
64
+ // Currency Api
65
+ Currencies: (options) => __awaiter(void 0, void 0, void 0, function* () {
66
+ return (0, __1.fetchRequest)().get(exports.CoreService.Url(urls_1.default.Core.Currencies, options), Object.assign({}, options));
67
+ }),
68
+ SetCurrency: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
69
+ return (0, __1.fetchRequest)().post(exports.CoreService.Url(urls_1.default.Core.SetCurrency, options), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
70
+ }),
64
71
  };
@@ -0,0 +1,9 @@
1
+ import { IGetMemberCouponsResponse } from "nextemos/interfaces/coupon";
2
+ import { IApiResponse, IRequestBase, IRequestInit, IService } from "../..";
3
+ export interface IGetMemberCouponsRequest extends IRequestBase {
4
+ couponType: "Discount" | "GiftCard";
5
+ couponFlags?: "All" | "Active" | "Expired";
6
+ }
7
+ export interface ICouponService extends IService {
8
+ GetMemberCoupons: (data: IGetMemberCouponsRequest, options?: IRequestInit) => Promise<IApiResponse<IGetMemberCouponsResponse>>;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import { ICouponService } from "./coupon.types";
2
+ export declare const CouponService: ICouponService;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __importDefault = (this && this.__importDefault) || function (mod) {
35
+ return (mod && mod.__esModule) ? mod : { "default": mod };
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.CouponService = void 0;
39
+ const urls_1 = __importStar(require("../urls"));
40
+ const __1 = require("../../");
41
+ const getConfigs_1 = __importDefault(require("../../helpers/getConfigs"));
42
+ const { K8S_NAMESPACE, K8S_SERVICE_NAMES } = getConfigs_1.default;
43
+ exports.CouponService = {
44
+ Namespace: K8S_NAMESPACE,
45
+ ServiceUrl: () => `http://${K8S_SERVICE_NAMES.CORE}.${exports.CouponService.Namespace}.svc.cluster.local`,
46
+ Prefix: "/api/coupongateway",
47
+ Url: (methodName, options, language) => (0, urls_1.getUrl)({
48
+ serviceUrl: exports.CouponService.ServiceUrl(),
49
+ prefix: exports.CouponService.Prefix,
50
+ isClient: options === null || options === void 0 ? void 0 : options.useClient,
51
+ language,
52
+ methodName,
53
+ }),
54
+ GetMemberCoupons: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
55
+ return (0, __1.fetchRequest)().post(exports.CouponService.Url(urls_1.default.Coupon.GetMemberCoupons, options), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
56
+ }),
57
+ };
@@ -16,4 +16,5 @@ export declare const Service: {
16
16
  Payment: import("..").IPaymentService;
17
17
  Campaign: import("..").ICampaignService;
18
18
  Core: import("..").ICoreService;
19
+ Coupon: import("..").ICouponService;
19
20
  };
@@ -19,6 +19,7 @@ const shoppingcart_1 = require("./shoppingcart");
19
19
  const stock_1 = require("./stock");
20
20
  const campaign_1 = require("./campaign");
21
21
  const core_1 = require("./core");
22
+ const coupon_1 = require("./coupon");
22
23
  exports.Service = {
23
24
  Address: address_1.AddressService,
24
25
  Banner: banner_1.BannerService,
@@ -37,4 +38,5 @@ exports.Service = {
37
38
  Payment: payment_1.PaymentService,
38
39
  Campaign: campaign_1.CampaignService,
39
40
  Core: core_1.CoreService,
41
+ Coupon: coupon_1.CouponService,
40
42
  };
@@ -182,6 +182,13 @@ declare const _default: {
182
182
  Properties: string;
183
183
  Values: string;
184
184
  };
185
+ Core: {
186
+ Currencies: string;
187
+ SetCurrency: string;
188
+ };
189
+ Coupon: {
190
+ GetMemberCoupons: string;
191
+ };
185
192
  };
186
193
  export default _default;
187
194
  export declare const getUrl: ({ isClient, language, methodName, serviceUrl, prefix, id, }: {
@@ -193,6 +193,13 @@ exports.default = {
193
193
  Properties: "/{language}/DynamicForm/v1/Properties",
194
194
  Values: "/{language}/DynamicForm/v1/Values",
195
195
  },
196
+ Core: {
197
+ Currencies: "/{language}/Currency/v1/GetList",
198
+ SetCurrency: "/{language}/Currency/v1/SetCurrency",
199
+ },
200
+ Coupon: {
201
+ GetMemberCoupons: "/{language}/CouponGateway/v1/GetMemberCoupons",
202
+ },
196
203
  };
197
204
  const getUrl = ({ isClient = false, language = DEFAULT_LANGUAGE || "tr", methodName, serviceUrl, prefix, id = "", }) => {
198
205
  let url = serviceUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "5.3.14",
3
+ "version": "5.4.0",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",