@yolo-croket-dev/amqp-access 0.7.401 → 0.7.403

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.403 — 관리자 개인 즐겨찾기
4
+
5
+ - `AmqpManageUserService.getManagePageFavorites`, `updateManagePageFavorites`와 DTO를 공개합니다.
6
+ - RPC: `manage-user.get.page-favorites`, `manage-user.update.page-favorites`. 기존 저트래픽 관리자 설정 RPC를 사용합니다.
7
+ - 목록은 내부 pathname·표시 이름만 보존하며 최대 100개·경로 중복 금지·중첩 DTO·revision을 검증합니다.
8
+ - `entity-v2@0.3.65`에 의존합니다. 기존 공개 API의 입력·응답은 변경하지 않습니다.
9
+
3
10
  ## 0.7.373
4
11
 
5
12
  - 기존 `SignInGuestUserPayload.phoneNumber`와 `SignInGuestUserResult`의 `access_token`, `refresh_token`, `userId` 계약을 복원한다. 이를 상속하는 비회원 가입 계약도 복원한다.
@@ -15,3 +22,5 @@
15
22
  본섭의 기존 로그인 검증 오류 복구는 Gateway의 패키지 업데이트로 진행한다. Gateway가 직접 사용하는 core와 이 패키지의 core 타입이 충돌하는 경우 버전을 함께 맞춰 검증해야 한다.
16
23
 
17
24
  전화번호만 받는 기존 계약은 전화번호 소유를 검증하지 않는다. OTP 전환, 기존 토큰 차단과 한시적 호환 기간의 종료는 소비 서버에서 별도로 구현해야 한다. 이 패키지 발행은 서버 배포나 인증 우회 문제 전체의 해결을 의미하지 않는다.
25
+
26
+ - 먼저 발행된 0.7.402의 Buyma 정산 입력 계약을 보존합니다.
@@ -1 +1,3 @@
1
+ /** @author jun @description 관리자 변경 DTO 공개 진입점 */
1
2
  export * from './update-p-infos-for-admin-excel-columns.dto';
3
+ export * from './update-manage-page-favorites.dto';
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ /** @author jun @description 관리자 변경 DTO 공개 진입점 */
17
18
  __exportStar(require("./update-p-infos-for-admin-excel-columns.dto"), exports);
19
+ __exportStar(require("./update-manage-page-favorites.dto"), exports);
@@ -0,0 +1,9 @@
1
+ import { ManagePageFavoriteEntity } from '@yolo-croket-dev/entity-v2/manage-user';
2
+ export declare class ManagePageFavoritePayload implements ManagePageFavoriteEntity {
3
+ path: string;
4
+ title: string;
5
+ }
6
+ export declare class UpdateManagePageFavoritesPayload {
7
+ favorites: ManagePageFavoritePayload[];
8
+ revision: number;
9
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UpdateManagePageFavoritesPayload = exports.ManagePageFavoritePayload = void 0;
13
+ /**
14
+ * @author jun
15
+ * @description 관리자 즐겨찾기 저장 입력과 내부 페이지 경로 검증
16
+ * @process 최대 100개, 중복 경로 금지, 중첩 DTO 검증과 기존 버전을 확인한다.
17
+ */
18
+ const class_transformer_1 = require("class-transformer");
19
+ const class_validator_1 = require("class-validator");
20
+ class ManagePageFavoritePayload {
21
+ }
22
+ exports.ManagePageFavoritePayload = ManagePageFavoritePayload;
23
+ __decorate([
24
+ (0, class_validator_1.IsString)(),
25
+ (0, class_validator_1.Length)(1, 300),
26
+ (0, class_validator_1.Matches)(/^\/(?!\/)[A-Za-z0-9/_-]*$/),
27
+ __metadata("design:type", String)
28
+ ], ManagePageFavoritePayload.prototype, "path", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsString)(),
31
+ (0, class_validator_1.Length)(1, 120),
32
+ (0, class_validator_1.Matches)(/\S/),
33
+ __metadata("design:type", String)
34
+ ], ManagePageFavoritePayload.prototype, "title", void 0);
35
+ class UpdateManagePageFavoritesPayload {
36
+ }
37
+ exports.UpdateManagePageFavoritesPayload = UpdateManagePageFavoritesPayload;
38
+ __decorate([
39
+ (0, class_validator_1.IsArray)(),
40
+ (0, class_validator_1.ArrayMaxSize)(100),
41
+ (0, class_validator_1.ArrayUnique)((favorite) => favorite === null || favorite === void 0 ? void 0 : favorite.path),
42
+ (0, class_validator_1.ValidateNested)({ each: true }),
43
+ (0, class_transformer_1.Type)(() => ManagePageFavoritePayload),
44
+ __metadata("design:type", Array)
45
+ ], UpdateManagePageFavoritesPayload.prototype, "favorites", void 0);
46
+ __decorate([
47
+ (0, class_validator_1.IsInt)(),
48
+ (0, class_validator_1.Min)(0),
49
+ (0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER - 1),
50
+ __metadata("design:type", Number)
51
+ ], UpdateManagePageFavoritesPayload.prototype, "revision", void 0);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @author jun
3
+ * @description 로그인한 관리자의 즐겨찾기 목록과 동시 수정 버전
4
+ * @process 목록 순서와 마지막 저장 버전을 함께 반환한다.
5
+ */
6
+ import { ManagePageFavoriteEntity } from '@yolo-croket-dev/entity-v2/manage-user';
7
+ export declare class GetManagePageFavoritesResult {
8
+ favorites: ManagePageFavoriteEntity[];
9
+ revision: number;
10
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetManagePageFavoritesResult = void 0;
4
+ class GetManagePageFavoritesResult {
5
+ }
6
+ exports.GetManagePageFavoritesResult = GetManagePageFavoritesResult;
@@ -1,3 +1,5 @@
1
+ /** @author jun @description 관리자 조회 DTO 공개 진입점 */
1
2
  export * from './get-manage-user-info-by-id.dto';
3
+ export * from './get-manage-page-favorites.dto';
2
4
  export * from './get-manage-user-infos-by-ids.dto';
3
5
  export * from './get-p-infos-for-admin-excel-columns.dto';
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ /** @author jun @description 관리자 조회 DTO 공개 진입점 */
17
18
  __exportStar(require("./get-manage-user-info-by-id.dto"), exports);
19
+ __exportStar(require("./get-manage-page-favorites.dto"), exports);
18
20
  __exportStar(require("./get-manage-user-infos-by-ids.dto"), exports);
19
21
  __exportStar(require("./get-p-infos-for-admin-excel-columns.dto"), exports);
@@ -1,10 +1,14 @@
1
1
  import { ClientProxy } from '@nestjs/microservices';
2
2
  import { AbstractParam } from '@yolo-croket-dev/core';
3
- import { GetManageUserInfoByIdPayload, GetManageUserInfoByIdResult, GetManageUserInfosByIdsPayload, GetManageUserInfosByIdsResult, GetPInfosForAdminExcelColumnsResult, UpdatePInfosForAdminExcelColumnsPayload } from '../dto/manage-user';
3
+ import { GetManageUserInfoByIdPayload, GetManageUserInfoByIdResult, GetManageUserInfosByIdsPayload, GetManageUserInfosByIdsResult, GetPInfosForAdminExcelColumnsResult, UpdatePInfosForAdminExcelColumnsPayload, GetManagePageFavoritesResult, UpdateManagePageFavoritesPayload } from '../dto/manage-user';
4
4
  export declare class AmqpManageUserService {
5
5
  private readonly client;
6
6
  private readonly amqpManager;
7
7
  constructor(client: ClientProxy);
8
+ /** 로그인 관리자 자신의 즐겨찾기를 조회한다. @param param 인증·추적 정보 @returns 목록과 버전 */
9
+ getManagePageFavorites(param: AbstractParam): Promise<GetManagePageFavoritesResult>;
10
+ /** 기존 버전과 일치할 때 목록을 저장한다. @param payload 목록과 버전 @param param 인증·추적 정보 @returns 저장 결과 */
11
+ updateManagePageFavorites(payload: UpdateManagePageFavoritesPayload, param: AbstractParam): Promise<GetManagePageFavoritesResult>;
8
12
  getManageUserInfoById(payload: GetManageUserInfoByIdPayload, param: AbstractParam): Promise<GetManageUserInfoByIdResult>;
9
13
  getManageUserInfosByIds(payload: GetManageUserInfosByIdsPayload, param: AbstractParam): Promise<GetManageUserInfosByIdsResult>;
10
14
  getPInfosForAdminExcelColumns(param: AbstractParam): Promise<GetPInfosForAdminExcelColumnsResult>;
@@ -13,6 +13,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.AmqpManageUserService = void 0;
16
+ /** @author jun @description 관리자 조회·변경 및 개인 즐겨찾기 RPC 클라이언트 */
16
17
  const common_1 = require("@nestjs/common");
17
18
  const microservices_1 = require("@nestjs/microservices");
18
19
  const functions_1 = require("@yolo-croket-dev/core/functions");
@@ -21,6 +22,14 @@ let AmqpManageUserService = class AmqpManageUserService {
21
22
  this.client = client;
22
23
  this.amqpManager = new functions_1.AmqpManagement(this.client);
23
24
  }
25
+ /** 로그인 관리자 자신의 즐겨찾기를 조회한다. @param param 인증·추적 정보 @returns 목록과 버전 */
26
+ async getManagePageFavorites(param) {
27
+ return this.amqpManager.call('관리자 개인 즐겨찾기 조회', 'manage-user.get.page-favorites', undefined, param, { isErrorThrowing: true });
28
+ }
29
+ /** 기존 버전과 일치할 때 목록을 저장한다. @param payload 목록과 버전 @param param 인증·추적 정보 @returns 저장 결과 */
30
+ async updateManagePageFavorites(payload, param) {
31
+ return this.amqpManager.call('관리자 개인 즐겨찾기 저장', 'manage-user.update.page-favorites', payload, param, { isErrorThrowing: true });
32
+ }
24
33
  async getManageUserInfoById(payload, param) {
25
34
  return this.amqpManager.call('유저 정보 조회', 'manage-user.get.manage-user-info-by-id', payload, param, { isErrorThrowing: true });
26
35
  }
@@ -3,6 +3,28 @@ export declare class BuymaMoneyPayload {
3
3
  amount: number;
4
4
  currency: string;
5
5
  }
6
+ /** @description 정산 기록은 손실·차감 금액도 보존한다. 일반 결제 금액의 음수 제한은 유지한다. */
7
+ export declare class BuymaSettlementMoneyPayload {
8
+ amount: number;
9
+ currency: string;
10
+ }
11
+ /** @description 지정한 정산 항목만 수정한다. 공란 null은 미확인으로 저장한다. */
12
+ export declare class BuymaSettlementPayload {
13
+ buymaFee?: BuymaSettlementMoneyPayload | null;
14
+ sellerSettlementJPY?: BuymaSettlementMoneyPayload | null;
15
+ productMargin?: BuymaSettlementMoneyPayload | null;
16
+ shippingFee?: BuymaSettlementMoneyPayload | null;
17
+ outboundShippingJPY?: BuymaSettlementMoneyPayload | null;
18
+ shippingMargin?: BuymaSettlementMoneyPayload | null;
19
+ totalMargin?: BuymaSettlementMoneyPayload | null;
20
+ appliedExchangeRate?: string | null;
21
+ exchangeRateUnit?: string | null;
22
+ feeRateText?: string | null;
23
+ productMarginRate?: string | null;
24
+ shippingMarginRate?: string | null;
25
+ totalMarginRate?: string | null;
26
+ memo?: string | null;
27
+ }
6
28
  export declare class BuymaRecipientPayload {
7
29
  name?: string | null;
8
30
  phone?: string | null;
@@ -43,6 +65,7 @@ export declare class BuymaInternationalShipmentPayload {
43
65
  shippingCost?: BuymaMoneyPayload | null;
44
66
  }
45
67
  export declare class BuymaManualFieldsPayload {
68
+ settlement?: BuymaSettlementPayload;
46
69
  buyerName?: string | null;
47
70
  recipient?: BuymaRecipientPayload;
48
71
  productMetadata?: BuymaProductMetadataPayload;
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ReceiveBuymaWebhookPayload = exports.RecordBuymaRefundPayload = exports.ChangeBuymaOrderStatusPayload = exports.ConnectBuymaProcurementPayload = exports.ConfirmBuymaPaymentPayload = exports.UpdateBuymaOrderPayload = exports.BuymaOrderCommandPayload = exports.BuymaManualFieldsPayload = exports.BuymaInternationalShipmentPayload = exports.BuymaProcurementDetailsPayload = exports.BuymaLocalShipmentPayload = exports.BuymaProductMetadataPayload = exports.BuymaRecipientPayload = exports.BuymaMoneyPayload = void 0;
12
+ exports.ReceiveBuymaWebhookPayload = exports.RecordBuymaRefundPayload = exports.ChangeBuymaOrderStatusPayload = exports.ConnectBuymaProcurementPayload = exports.ConfirmBuymaPaymentPayload = exports.UpdateBuymaOrderPayload = exports.BuymaOrderCommandPayload = exports.BuymaManualFieldsPayload = exports.BuymaInternationalShipmentPayload = exports.BuymaProcurementDetailsPayload = exports.BuymaLocalShipmentPayload = exports.BuymaProductMetadataPayload = exports.BuymaRecipientPayload = exports.BuymaSettlementPayload = exports.BuymaSettlementMoneyPayload = exports.BuymaMoneyPayload = void 0;
13
13
  /** @author jun @description Buyma 변경 계약. @process 허용 필드·수정 버전·담당자와 선택 입력을 정의한다. */
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const class_validator_1 = require("class-validator");
@@ -31,6 +31,112 @@ __decorate([
31
31
  (0, class_validator_1.Matches)(/^[A-Z]{3}$/),
32
32
  __metadata("design:type", String)
33
33
  ], BuymaMoneyPayload.prototype, "currency", void 0);
34
+ /** @description 정산 기록은 손실·차감 금액도 보존한다. 일반 결제 금액의 음수 제한은 유지한다. */
35
+ class BuymaSettlementMoneyPayload {
36
+ }
37
+ exports.BuymaSettlementMoneyPayload = BuymaSettlementMoneyPayload;
38
+ __decorate([
39
+ (0, class_validator_1.IsNumber)({
40
+ allowNaN: false,
41
+ allowInfinity: false,
42
+ }),
43
+ (0, class_validator_1.Min)(-Number.MAX_SAFE_INTEGER),
44
+ (0, class_validator_1.Max)(Number.MAX_SAFE_INTEGER),
45
+ __metadata("design:type", Number)
46
+ ], BuymaSettlementMoneyPayload.prototype, "amount", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.IsString)(),
49
+ (0, class_validator_1.Matches)(/^[A-Z]{3}$/),
50
+ __metadata("design:type", String)
51
+ ], BuymaSettlementMoneyPayload.prototype, "currency", void 0);
52
+ /** @description 지정한 정산 항목만 수정한다. 공란 null은 미확인으로 저장한다. */
53
+ class BuymaSettlementPayload {
54
+ }
55
+ exports.BuymaSettlementPayload = BuymaSettlementPayload;
56
+ __decorate([
57
+ (0, class_validator_1.IsOptional)(),
58
+ (0, class_validator_1.ValidateNested)(),
59
+ (0, class_transformer_1.Type)(() => BuymaSettlementMoneyPayload),
60
+ __metadata("design:type", Object)
61
+ ], BuymaSettlementPayload.prototype, "buymaFee", void 0);
62
+ __decorate([
63
+ (0, class_validator_1.IsOptional)(),
64
+ (0, class_validator_1.ValidateNested)(),
65
+ (0, class_transformer_1.Type)(() => BuymaSettlementMoneyPayload),
66
+ __metadata("design:type", Object)
67
+ ], BuymaSettlementPayload.prototype, "sellerSettlementJPY", void 0);
68
+ __decorate([
69
+ (0, class_validator_1.IsOptional)(),
70
+ (0, class_validator_1.ValidateNested)(),
71
+ (0, class_transformer_1.Type)(() => BuymaSettlementMoneyPayload),
72
+ __metadata("design:type", Object)
73
+ ], BuymaSettlementPayload.prototype, "productMargin", void 0);
74
+ __decorate([
75
+ (0, class_validator_1.IsOptional)(),
76
+ (0, class_validator_1.ValidateNested)(),
77
+ (0, class_transformer_1.Type)(() => BuymaSettlementMoneyPayload),
78
+ __metadata("design:type", Object)
79
+ ], BuymaSettlementPayload.prototype, "shippingFee", void 0);
80
+ __decorate([
81
+ (0, class_validator_1.IsOptional)(),
82
+ (0, class_validator_1.ValidateNested)(),
83
+ (0, class_transformer_1.Type)(() => BuymaSettlementMoneyPayload),
84
+ __metadata("design:type", Object)
85
+ ], BuymaSettlementPayload.prototype, "outboundShippingJPY", void 0);
86
+ __decorate([
87
+ (0, class_validator_1.IsOptional)(),
88
+ (0, class_validator_1.ValidateNested)(),
89
+ (0, class_transformer_1.Type)(() => BuymaSettlementMoneyPayload),
90
+ __metadata("design:type", Object)
91
+ ], BuymaSettlementPayload.prototype, "shippingMargin", void 0);
92
+ __decorate([
93
+ (0, class_validator_1.IsOptional)(),
94
+ (0, class_validator_1.ValidateNested)(),
95
+ (0, class_transformer_1.Type)(() => BuymaSettlementMoneyPayload),
96
+ __metadata("design:type", Object)
97
+ ], BuymaSettlementPayload.prototype, "totalMargin", void 0);
98
+ __decorate([
99
+ (0, class_validator_1.IsOptional)(),
100
+ (0, class_validator_1.IsString)(),
101
+ (0, class_validator_1.MaxLength)(100),
102
+ __metadata("design:type", Object)
103
+ ], BuymaSettlementPayload.prototype, "appliedExchangeRate", void 0);
104
+ __decorate([
105
+ (0, class_validator_1.IsOptional)(),
106
+ (0, class_validator_1.IsString)(),
107
+ (0, class_validator_1.MaxLength)(100),
108
+ __metadata("design:type", Object)
109
+ ], BuymaSettlementPayload.prototype, "exchangeRateUnit", void 0);
110
+ __decorate([
111
+ (0, class_validator_1.IsOptional)(),
112
+ (0, class_validator_1.IsString)(),
113
+ (0, class_validator_1.MaxLength)(100),
114
+ __metadata("design:type", Object)
115
+ ], BuymaSettlementPayload.prototype, "feeRateText", void 0);
116
+ __decorate([
117
+ (0, class_validator_1.IsOptional)(),
118
+ (0, class_validator_1.IsString)(),
119
+ (0, class_validator_1.MaxLength)(100),
120
+ __metadata("design:type", Object)
121
+ ], BuymaSettlementPayload.prototype, "productMarginRate", void 0);
122
+ __decorate([
123
+ (0, class_validator_1.IsOptional)(),
124
+ (0, class_validator_1.IsString)(),
125
+ (0, class_validator_1.MaxLength)(100),
126
+ __metadata("design:type", Object)
127
+ ], BuymaSettlementPayload.prototype, "shippingMarginRate", void 0);
128
+ __decorate([
129
+ (0, class_validator_1.IsOptional)(),
130
+ (0, class_validator_1.IsString)(),
131
+ (0, class_validator_1.MaxLength)(100),
132
+ __metadata("design:type", Object)
133
+ ], BuymaSettlementPayload.prototype, "totalMarginRate", void 0);
134
+ __decorate([
135
+ (0, class_validator_1.IsOptional)(),
136
+ (0, class_validator_1.IsString)(),
137
+ (0, class_validator_1.MaxLength)(10000),
138
+ __metadata("design:type", Object)
139
+ ], BuymaSettlementPayload.prototype, "memo", void 0);
34
140
  class BuymaRecipientPayload {
35
141
  }
36
142
  exports.BuymaRecipientPayload = BuymaRecipientPayload;
@@ -222,6 +328,12 @@ __decorate([
222
328
  class BuymaManualFieldsPayload {
223
329
  }
224
330
  exports.BuymaManualFieldsPayload = BuymaManualFieldsPayload;
331
+ __decorate([
332
+ (0, class_validator_1.IsOptional)(),
333
+ (0, class_validator_1.ValidateNested)(),
334
+ (0, class_transformer_1.Type)(() => BuymaSettlementPayload),
335
+ __metadata("design:type", BuymaSettlementPayload)
336
+ ], BuymaManualFieldsPayload.prototype, "settlement", void 0);
225
337
  __decorate([
226
338
  (0, class_validator_1.IsOptional)(),
227
339
  (0, class_validator_1.IsString)(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/amqp-access",
3
- "version": "0.7.401",
3
+ "version": "0.7.403",
4
4
  "main": "index.js",
5
5
  "author": "Yolo Co., Ltd.",
6
6
  "description": "크로켓 amqp-access npm",
@@ -24,7 +24,7 @@
24
24
  "@yolo-croket-dev/domain": "0.2.50",
25
25
  "@yolo-croket-dev/dto-v2": "0.2.37",
26
26
  "@yolo-croket-dev/entity": "0.2.110",
27
- "@yolo-croket-dev/entity-v2": "0.3.63",
27
+ "@yolo-croket-dev/entity-v2": "0.3.65",
28
28
  "class-transformer": "^0.5.1",
29
29
  "class-validator": "^0.13.2",
30
30
  "dotenv": "^16.3.1"