nextemos 5.3.15 → 5.4.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/dist/interfaces/core.d.ts +1 -0
- package/dist/interfaces/coupon.d.ts +33 -0
- package/dist/interfaces/coupon.js +2 -0
- package/dist/interfaces/index.d.ts +37 -35
- package/dist/interfaces/index.js +2 -0
- package/dist/services/coupon/coupon.types.d.ts +9 -0
- package/dist/services/coupon/coupon.types.js +2 -0
- package/dist/services/coupon/index.d.ts +2 -0
- package/dist/services/coupon/index.js +57 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +2 -0
- package/dist/services/urls.d.ts +3 -0
- package/dist/services/urls.js +3 -0
- package/package.json +1 -1
|
@@ -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
|
+
}
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
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";
|
package/dist/interfaces/index.js
CHANGED
|
@@ -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);
|
|
@@ -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,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
|
+
};
|
package/dist/services/index.d.ts
CHANGED
package/dist/services/index.js
CHANGED
|
@@ -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
|
};
|
package/dist/services/urls.d.ts
CHANGED
|
@@ -186,6 +186,9 @@ declare const _default: {
|
|
|
186
186
|
Currencies: string;
|
|
187
187
|
SetCurrency: string;
|
|
188
188
|
};
|
|
189
|
+
Coupon: {
|
|
190
|
+
GetMemberCoupons: string;
|
|
191
|
+
};
|
|
189
192
|
};
|
|
190
193
|
export default _default;
|
|
191
194
|
export declare const getUrl: ({ isClient, language, methodName, serviceUrl, prefix, id, }: {
|
package/dist/services/urls.js
CHANGED
|
@@ -197,6 +197,9 @@ exports.default = {
|
|
|
197
197
|
Currencies: "/{language}/Currency/v1/GetList",
|
|
198
198
|
SetCurrency: "/{language}/Currency/v1/SetCurrency",
|
|
199
199
|
},
|
|
200
|
+
Coupon: {
|
|
201
|
+
GetMemberCoupons: "/{language}/CouponGateway/v1/GetMemberCoupons",
|
|
202
|
+
},
|
|
200
203
|
};
|
|
201
204
|
const getUrl = ({ isClient = false, language = DEFAULT_LANGUAGE || "tr", methodName, serviceUrl, prefix, id = "", }) => {
|
|
202
205
|
let url = serviceUrl;
|