@shopby/shop-sdk 1.44.2 → 1.45.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.
- package/CHANGELOG.md +7 -0
- package/build/src/domain/promotion/index.d.ts +5 -4
- package/build/src/domain/promotion/index.js +9 -1
- package/build/src/domain/promotion/index.js.map +1 -1
- package/build/src/domain/promotion/maps/index.d.ts +12 -0
- package/build/src/domain/promotion/maps/index.js +9 -0
- package/build/src/domain/promotion/maps/index.js.map +1 -0
- package/build/src/index.d.ts +3 -3
- package/build/types/domain/promotion/index.d.ts +101 -0
- package/build/types/domain/promotion/index.js +1 -1
- package/build/types/domain/promotion/index.js.map +1 -1
- package/build/types/domain/promotion/unions.d.ts +3 -0
- package/build/types/domain/promotion/unions.js +2 -0
- package/build/types/domain/promotion/unions.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [1.45.0](https://gitlab.e-ncp.com/ncp-client/shop-sdk/compare/v1.44.2...v1.45.0) (2023-02-26)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 쿠폰 항목 타입 업데이트 ([a52d9d3](https://gitlab.e-ncp.com/ncp-client/shop-sdk/commit/a52d9d37ca96a925a9b547fb10909bfde3797804))
|
|
11
|
+
|
|
5
12
|
### [1.44.2](https://gitlab.e-ncp.com/ncp-client/shop-sdk/compare/v1.44.1...v1.44.2) (2023-02-21)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ResponseData } from '../../../types/http';
|
|
2
|
-
import { GetCouponsRequest, GetCouponsResponse, PostCouponsRegisterCodePromotionCodeRequest, PostCouponsRegisterCodePromotionCodeResponse } from '../../../types/domain/promotion';
|
|
2
|
+
import { GetCouponsProductsProductNoIssuableCouponsRequest, GetCouponsProductsProductNoIssuableCouponsResponse, GetCouponsRequest, GetCouponsResponse, PostCouponsCouponNoDownloadRequest, PostCouponsCouponNoDownloadResponse, PostCouponsProductsProductNoDownloadRequest, PostCouponsProductsProductNoDownloadResponse, PostCouponsRegisterCodePromotionCodeRequest, PostCouponsRegisterCodePromotionCodeResponse } from '../../../types/domain/promotion';
|
|
3
3
|
declare const promotion: (httpRequest: Function) => {
|
|
4
4
|
/**
|
|
5
5
|
* Coupon
|
|
@@ -8,9 +8,10 @@ declare const promotion: (httpRequest: Function) => {
|
|
|
8
8
|
getCouponsIssuable(request: any): Promise<ResponseData<any>>;
|
|
9
9
|
getCouponsSummary(request: any): Promise<ResponseData<any>>;
|
|
10
10
|
postCouponsRegisterCodePromotionCode(request: PostCouponsRegisterCodePromotionCodeRequest): Promise<ResponseData<PostCouponsRegisterCodePromotionCodeResponse>>;
|
|
11
|
-
postCouponsCouponNoDownload(request:
|
|
11
|
+
postCouponsCouponNoDownload(request: PostCouponsCouponNoDownloadRequest): Promise<ResponseData<PostCouponsCouponNoDownloadResponse>>;
|
|
12
12
|
postCouponsEventsEventNoDownload(request: any): Promise<ResponseData<any>>;
|
|
13
|
-
postCouponsProductsProductNoDownload(request:
|
|
14
|
-
getCouponsProductsProductNoIssuableCoupons(request:
|
|
13
|
+
postCouponsProductsProductNoDownload(request: PostCouponsProductsProductNoDownloadRequest): Promise<ResponseData<PostCouponsProductsProductNoDownloadResponse>>;
|
|
14
|
+
getCouponsProductsProductNoIssuableCoupons(request: GetCouponsProductsProductNoIssuableCouponsRequest): Promise<ResponseData<GetCouponsProductsProductNoIssuableCouponsResponse>>;
|
|
15
15
|
};
|
|
16
16
|
export default promotion;
|
|
17
|
+
export * from './maps';
|
|
@@ -17,6 +17,7 @@ var promotion = function (httpRequest) { return ({
|
|
|
17
17
|
method: 'GET',
|
|
18
18
|
url: '/coupons/issuable',
|
|
19
19
|
key: 'getCouponsIssuable',
|
|
20
|
+
useAccessToken: true,
|
|
20
21
|
});
|
|
21
22
|
},
|
|
22
23
|
getCouponsSummary: function (request) {
|
|
@@ -26,6 +27,7 @@ var promotion = function (httpRequest) { return ({
|
|
|
26
27
|
url: '/coupons/summary',
|
|
27
28
|
queryString: queryString,
|
|
28
29
|
key: 'getCouponsSummary',
|
|
30
|
+
useAccessToken: true,
|
|
29
31
|
});
|
|
30
32
|
},
|
|
31
33
|
postCouponsRegisterCodePromotionCode: function (request) {
|
|
@@ -44,6 +46,7 @@ var promotion = function (httpRequest) { return ({
|
|
|
44
46
|
url: "/coupons/".concat(couponNo, "/download"),
|
|
45
47
|
requestBody: requestBody,
|
|
46
48
|
key: 'postCouponsCouponNoDownload',
|
|
49
|
+
useAccessToken: true,
|
|
47
50
|
});
|
|
48
51
|
},
|
|
49
52
|
postCouponsEventsEventNoDownload: function (request) {
|
|
@@ -52,14 +55,17 @@ var promotion = function (httpRequest) { return ({
|
|
|
52
55
|
method: 'POST',
|
|
53
56
|
url: "/coupons/events/".concat(eventNo, "/download"),
|
|
54
57
|
key: 'postCouponsEventsEventNoDownload',
|
|
58
|
+
useAccessToken: true,
|
|
55
59
|
});
|
|
56
60
|
},
|
|
57
61
|
postCouponsProductsProductNoDownload: function (request) {
|
|
58
|
-
var productNo = request.pathVariable.productNo;
|
|
62
|
+
var productNo = request.pathVariable.productNo, requestBody = request.requestBody;
|
|
59
63
|
return httpRequest({
|
|
60
64
|
method: 'POST',
|
|
61
65
|
url: "/coupons/products/".concat(productNo, "/download"),
|
|
66
|
+
requestBody: requestBody,
|
|
62
67
|
key: 'postCouponsProductsProductNoDownload',
|
|
68
|
+
useAccessToken: true,
|
|
63
69
|
});
|
|
64
70
|
},
|
|
65
71
|
getCouponsProductsProductNoIssuableCoupons: function (request) {
|
|
@@ -69,8 +75,10 @@ var promotion = function (httpRequest) { return ({
|
|
|
69
75
|
url: "/coupons/products/".concat(productNo, "/issuable/coupons"),
|
|
70
76
|
queryString: queryString,
|
|
71
77
|
key: 'getCouponsProductsProductNoIssuableCoupons',
|
|
78
|
+
useAccessToken: true,
|
|
72
79
|
});
|
|
73
80
|
},
|
|
74
81
|
}); };
|
|
75
82
|
export default promotion;
|
|
83
|
+
export * from './maps';
|
|
76
84
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/domain/promotion/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/domain/promotion/index.ts"],"names":[],"mappings":"AAcA,IAAM,SAAS,GAAG,UAAC,WAAqB,IAAK,OAAA,CAAC;IAC5C;;OAEG;IACH,UAAU,EAAV,UACE,OAA0B;QAElB,IAAA,WAAW,GAAK,OAAO,YAAZ,CAAa;QAEhC,OAAO,WAAW,CAAC;YACjB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,UAAU;YACf,WAAW,aAAA;YACX,cAAc,EAAE,IAAI;YACpB,GAAG,EAAE,YAAY;SAClB,CAAC,CAAC;IACL,CAAC;IACD,kBAAkB,EAAlB,UAAmB,OAAY;QAC7B,OAAO,WAAW,CAAC;YACjB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mBAAmB;YACxB,GAAG,EAAE,oBAAoB;YACzB,cAAc,EAAE,IAAI;SACrB,CAAC,CAAC;IACL,CAAC;IACD,iBAAiB,EAAjB,UAAkB,OAAY;QACpB,IAAA,WAAW,GAAK,OAAO,YAAZ,CAAa;QAEhC,OAAO,WAAW,CAAC;YACjB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,kBAAkB;YACvB,WAAW,aAAA;YACX,GAAG,EAAE,mBAAmB;YACxB,cAAc,EAAE,IAAI;SACrB,CAAC,CAAC;IACL,CAAC;IACD,oCAAoC,EAApC,UACE,OAAoD;QAGlC,IAAA,aAAa,GAC3B,OAAO,2BADoB,CACnB;QAEZ,OAAO,WAAW,CAAC;YAC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,CAAC,CAAC;IACL,CAAC;CACF,CAAC,EA5G2C,CA4G3C,CAAC;AAEH,eAAe,SAAS,CAAC;AAEzB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const COUPON_TYPE_MAP: {
|
|
2
|
+
readonly PRODUCT: "상품적용 쿠폰";
|
|
3
|
+
readonly CART: "주문적용 쿠폰";
|
|
4
|
+
readonly CART_DELIVERY: "장바구니 배송비 할인";
|
|
5
|
+
};
|
|
6
|
+
export declare const COUPON_TARGET_TYPE_MAP: {
|
|
7
|
+
readonly ALL_PRODUCT: "전상품";
|
|
8
|
+
readonly PRODUCT: "개별상품";
|
|
9
|
+
readonly BRAND: "브랜드";
|
|
10
|
+
readonly CATEGORY: "카테고리";
|
|
11
|
+
readonly PARTNER: "파트너사";
|
|
12
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var COUPON_TYPE_MAP = {
|
|
2
|
+
PRODUCT: '상품적용 쿠폰',
|
|
3
|
+
CART: '주문적용 쿠폰',
|
|
4
|
+
CART_DELIVERY: '장바구니 배송비 할인'
|
|
5
|
+
};
|
|
6
|
+
export var COUPON_TARGET_TYPE_MAP = {
|
|
7
|
+
ALL_PRODUCT: '전상품', PRODUCT: '개별상품', BRAND: '브랜드', CATEGORY: '카테고리', PARTNER: '파트너사'
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/domain/promotion/maps/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,SAAS;IACf,aAAa,EAAE,aAAa;CACpB,CAAC;AAEX,MAAM,CAAC,IAAM,sBAAsB,GAAG;IACpC,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAC5E,CAAC"}
|
package/build/src/index.d.ts
CHANGED
|
@@ -269,10 +269,10 @@ export declare const create: ({ baseURL, headerOption, customHttpRequest, versio
|
|
|
269
269
|
getCouponsIssuable(request: any): Promise<import("../types/http").ResponseData<any>>;
|
|
270
270
|
getCouponsSummary(request: any): Promise<import("../types/http").ResponseData<any>>;
|
|
271
271
|
postCouponsRegisterCodePromotionCode(request: import("../types/domain/promotion").PostCouponsRegisterCodePromotionCodeRequest): Promise<import("../types/http").ResponseData<import("../types/domain/promotion").PostCouponsRegisterCodePromotionCodeResponse>>;
|
|
272
|
-
postCouponsCouponNoDownload(request:
|
|
272
|
+
postCouponsCouponNoDownload(request: import("../types/domain/promotion").PostCouponsCouponNoDownloadRequest): Promise<import("../types/http").ResponseData<import("../types/domain/promotion").PostCouponsCouponNoDownloadResponse>>;
|
|
273
273
|
postCouponsEventsEventNoDownload(request: any): Promise<import("../types/http").ResponseData<any>>;
|
|
274
|
-
postCouponsProductsProductNoDownload(request:
|
|
275
|
-
getCouponsProductsProductNoIssuableCoupons(request:
|
|
274
|
+
postCouponsProductsProductNoDownload(request: import("../types/domain/promotion").PostCouponsProductsProductNoDownloadRequest): Promise<import("../types/http").ResponseData<import("../types/domain/promotion").PostCouponsProductsProductNoDownloadResponse>>;
|
|
275
|
+
getCouponsProductsProductNoIssuableCoupons(request: import("../types/domain/promotion").GetCouponsProductsProductNoIssuableCouponsRequest): Promise<import("../types/http").ResponseData<import("../types/domain/promotion").GetCouponsProductsProductNoIssuableCouponsResponse>>;
|
|
276
276
|
};
|
|
277
277
|
storage: {
|
|
278
278
|
postFilesImages(request: import("../types").PostFilesImagesRequest): Promise<import("../types/http").ResponseData<import("../types").PostFilesImagesResponse>>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { Nullable } from "types/common";
|
|
1
2
|
import { OptionalAccessTokenRequest } from "../../http";
|
|
3
|
+
import { PlatformType } from "../display";
|
|
2
4
|
import { PayType } from "../order";
|
|
5
|
+
import { CouponTargetType, CouponType } from "./unions";
|
|
6
|
+
export * from './unions';
|
|
3
7
|
export interface GetCouponsRequest extends OptionalAccessTokenRequest {
|
|
4
8
|
queryString: {
|
|
5
9
|
desc?: string;
|
|
@@ -54,3 +58,100 @@ export interface PostCouponsRegisterCodePromotionCodeResponse {
|
|
|
54
58
|
couponNo: number;
|
|
55
59
|
useEndYmdt: string;
|
|
56
60
|
}
|
|
61
|
+
export interface GetCouponsProductsProductNoIssuableCouponsRequest {
|
|
62
|
+
pathVariable: {
|
|
63
|
+
productNo: number;
|
|
64
|
+
};
|
|
65
|
+
queryString?: {
|
|
66
|
+
channelType?: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export interface CouponDiscountInformation {
|
|
70
|
+
discountRate: number;
|
|
71
|
+
discountAmt: number;
|
|
72
|
+
useOtherCoupon: boolean;
|
|
73
|
+
skippedAccumulationAmt: boolean;
|
|
74
|
+
useProductCoupon: boolean;
|
|
75
|
+
freeDelivery: boolean;
|
|
76
|
+
maxDiscountAmt: number;
|
|
77
|
+
useCartCoupon: boolean;
|
|
78
|
+
fixedAmt: boolean;
|
|
79
|
+
}
|
|
80
|
+
export interface CouponConstraintInformation {
|
|
81
|
+
dailyIssueLimitCnt: number;
|
|
82
|
+
issuePerPersonLimitCnt: number;
|
|
83
|
+
memberGradeName: string;
|
|
84
|
+
issuablePlatformTypes: Array<PlatformType>;
|
|
85
|
+
memberGradeNames: Array<string>;
|
|
86
|
+
channelTypes: string;
|
|
87
|
+
dailyIssuePerPersonLimitCnt: number;
|
|
88
|
+
dailyIssueLimit: boolean;
|
|
89
|
+
issuePerPersonLimit: boolean;
|
|
90
|
+
memberGroupNames: Array<string>;
|
|
91
|
+
}
|
|
92
|
+
export interface CouponStatus {
|
|
93
|
+
myIssuedCnt: number;
|
|
94
|
+
totalIssuedCnt: number;
|
|
95
|
+
totalIssuableCnt: number;
|
|
96
|
+
issuableCnt: number;
|
|
97
|
+
myIssuedCntToday: number;
|
|
98
|
+
totalIssuedCntToday: number;
|
|
99
|
+
}
|
|
100
|
+
export interface CouponDateInformation {
|
|
101
|
+
issueEndYmdt: string;
|
|
102
|
+
issueStartYmdt: string;
|
|
103
|
+
issueDaysOfWeek: string;
|
|
104
|
+
issueEndHour: number;
|
|
105
|
+
issueStartHour: number;
|
|
106
|
+
}
|
|
107
|
+
export interface CouponsProductsProductNoIssuableCoupon {
|
|
108
|
+
downloadable: boolean;
|
|
109
|
+
couponName: string;
|
|
110
|
+
discountInfo: CouponDiscountInformation;
|
|
111
|
+
useConstraint: CouponConstraintInformation;
|
|
112
|
+
couponType: CouponType;
|
|
113
|
+
couponStatus: CouponStatus;
|
|
114
|
+
dateInfo: CouponDateInformation;
|
|
115
|
+
couponNo: number;
|
|
116
|
+
couponTargetType: CouponTargetType;
|
|
117
|
+
allianceRefererType: string;
|
|
118
|
+
}
|
|
119
|
+
export declare type GetCouponsProductsProductNoIssuableCouponsResponse = Array<CouponsProductsProductNoIssuableCoupon>;
|
|
120
|
+
export interface PostCouponsCouponNoDownloadRequest {
|
|
121
|
+
pathVariable: {
|
|
122
|
+
couponNo: number;
|
|
123
|
+
};
|
|
124
|
+
requestBody: {
|
|
125
|
+
channelType: Nullable<string>;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
export interface PostCouponsCouponNoDownloadResponse {
|
|
129
|
+
couponName: string;
|
|
130
|
+
couponIssueNo: number;
|
|
131
|
+
couponNo: number;
|
|
132
|
+
useEndYmdt: string;
|
|
133
|
+
}
|
|
134
|
+
export interface PostCouponsProductsProductNoDownloadRequest {
|
|
135
|
+
pathVariable: {
|
|
136
|
+
productNo: number;
|
|
137
|
+
};
|
|
138
|
+
requestBody: {
|
|
139
|
+
includesCartCoupon: boolean;
|
|
140
|
+
channelType: Nullable<string>;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
export interface IssueFailCoupon {
|
|
144
|
+
errorCode: string;
|
|
145
|
+
couponNo: number;
|
|
146
|
+
failMessage: string;
|
|
147
|
+
}
|
|
148
|
+
export interface IssuedCoupon {
|
|
149
|
+
couponName: string;
|
|
150
|
+
couponIssueNo: number;
|
|
151
|
+
couponNo: number;
|
|
152
|
+
useEndYmdt: string;
|
|
153
|
+
}
|
|
154
|
+
export interface PostCouponsProductsProductNoDownloadResponse {
|
|
155
|
+
issueFailCoupons: Array<IssueFailCoupon>;
|
|
156
|
+
issuedCoupons: Array<IssuedCoupon>;
|
|
157
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './unions';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../types/domain/promotion/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../types/domain/promotion/index.ts"],"names":[],"mappings":"AAMA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unions.js","sourceRoot":"","sources":["../../../../types/domain/promotion/unions.ts"],"names":[],"mappings":""}
|