@yolo-croket-dev/amqp-access 0.0.90-jun.2 → 0.0.90-jun.20
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/order-server/dto/bundle-p-info/index.d.ts +1 -0
- package/order-server/dto/bundle-p-info/index.js +1 -0
- package/order-server/dto/bundle-p-info/query/get-bundle-p-info-for-pay-log.dto.d.ts +13 -0
- package/order-server/dto/bundle-p-info/query/get-bundle-p-info-for-pay-log.dto.js +23 -0
- package/order-server/dto/bundle-p-info/query/index.d.ts +1 -0
- package/order-server/dto/bundle-p-info/query/index.js +17 -0
- package/package.json +1 -1
- package/user-service/amqp.user-service.module.js +2 -0
- package/user-service/dto/cart/query/get-carts-for-write-pay.dto.d.ts +54 -0
- package/user-service/dto/cart/query/get-carts-for-write-pay.dto.js +45 -0
- package/user-service/dto/cart/query/index.d.ts +1 -1
- package/user-service/dto/cart/query/index.js +4 -15
- package/user-service/services/amqp.cart.service.d.ts +9 -0
- package/user-service/services/amqp.cart.service.js +33 -0
- package/user-service/services/index.d.ts +1 -0
- package/user-service/services/index.js +1 -0
- package/user-service/dto/cart/query/get-carts-by-ids.dto.d.ts +0 -12
- package/user-service/dto/cart/query/get-carts-by-ids.dto.js +0 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BundlePurchasedInfoEntity } from '@yolo-croket-dev/entity-v2/bundle-purchased-info';
|
|
2
|
+
import { PurchasedInfoEntity } from '@yolo-croket-dev/entity/src/purchased-info/purchased-info.entity';
|
|
3
|
+
export declare class GetBundlePInfoForPayLogPayload {
|
|
4
|
+
pInfoId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class GetBundlePInfoForPayLogResult {
|
|
7
|
+
bundlePInfos: SearchedBundlePInfo[];
|
|
8
|
+
}
|
|
9
|
+
declare type SearchedBundlePInfo = Pick<BundlePurchasedInfoEntity, '_id' | 'PInfoList'> & {
|
|
10
|
+
_purchasedInfos: SearchedPurchasedInfo[];
|
|
11
|
+
};
|
|
12
|
+
declare type SearchedPurchasedInfo = Pick<PurchasedInfoEntity, '_id' | 'buyerId' | 'storeId' | 'pastStoreItemInfo'>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
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.GetBundlePInfoForPayLogResult = exports.GetBundlePInfoForPayLogPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class GetBundlePInfoForPayLogPayload {
|
|
15
|
+
}
|
|
16
|
+
__decorate([
|
|
17
|
+
(0, class_validator_1.IsMongoId)(),
|
|
18
|
+
__metadata("design:type", String)
|
|
19
|
+
], GetBundlePInfoForPayLogPayload.prototype, "pInfoId", void 0);
|
|
20
|
+
exports.GetBundlePInfoForPayLogPayload = GetBundlePInfoForPayLogPayload;
|
|
21
|
+
class GetBundlePInfoForPayLogResult {
|
|
22
|
+
}
|
|
23
|
+
exports.GetBundlePInfoForPayLogResult = GetBundlePInfoForPayLogResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-bundle-p-info-for-pay-log.dto';
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-bundle-p-info-for-pay-log.dto"), exports);
|
package/package.json
CHANGED
|
@@ -27,6 +27,7 @@ AmqpUserServiceModule = __decorate([
|
|
|
27
27
|
services_1.AmqpStoreService,
|
|
28
28
|
services_1.AmqpAskService,
|
|
29
29
|
services_1.AmqpInflowSessionByUserService,
|
|
30
|
+
services_1.AmqpCartService,
|
|
30
31
|
],
|
|
31
32
|
exports: [
|
|
32
33
|
amqp_user_service_provider_1.UserServiceProvider,
|
|
@@ -40,6 +41,7 @@ AmqpUserServiceModule = __decorate([
|
|
|
40
41
|
services_1.AmqpStoreService,
|
|
41
42
|
services_1.AmqpAskService,
|
|
42
43
|
services_1.AmqpInflowSessionByUserService,
|
|
44
|
+
services_1.AmqpCartService,
|
|
43
45
|
],
|
|
44
46
|
})
|
|
45
47
|
], AmqpUserServiceModule);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CartEntity } from '@yolo-croket-dev/entity-v2/cart';
|
|
2
|
+
import { StoreItem } from '@yolo-croket-dev/entity/src/store-item/store-item.entity';
|
|
3
|
+
import { UserEntity } from '@yolo-croket-dev/entity-v2/user/user.entity';
|
|
4
|
+
declare type SearchedUserForWritePay = Pick<UserEntity, '_id' | 'username'>;
|
|
5
|
+
declare type SearchedStoreItemForWritePay = Pick<StoreItem, '_id' | 'selectionInfos' | 'itemPrice' | 'insuranceInfo' | 'mainCategory' | 'subCategory' | 'sellerId' | 'isLimitSale' | 'itemName' | 'itemPriceForBuyer' | 'sellingInfo' | 'adultItemInfo' | 'limitSaleInfo' | 'itemImg' | 'purchased' | 'storeId'> & {
|
|
6
|
+
_seller: SearchedUserForWritePay;
|
|
7
|
+
};
|
|
8
|
+
export declare type CartForWritePay = Pick<CartEntity, '_id' | 'itemId' | 'storeId' | 'pOption' | 'pOptionInfo' | 'itemName_past' | 'itemPrice_past' | 'sellingInfo_past' | 'cartType' | 'ownerId' | 'isChecked' | 'requirement'> & {
|
|
9
|
+
_item: SearchedStoreItemForWritePay;
|
|
10
|
+
};
|
|
11
|
+
export declare const SearchedUserForWritePaySelect: {
|
|
12
|
+
_id: number;
|
|
13
|
+
username: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const SearchedStoreItemForWritePaySelect: {
|
|
16
|
+
_id: number;
|
|
17
|
+
selectionInfos: number;
|
|
18
|
+
itemPrice: number;
|
|
19
|
+
insuranceInfo: number;
|
|
20
|
+
mainCategory: number;
|
|
21
|
+
subCategory: number;
|
|
22
|
+
sellerId: number;
|
|
23
|
+
isLimitSale: number;
|
|
24
|
+
itemName: number;
|
|
25
|
+
itemPriceForBuyer: number;
|
|
26
|
+
sellingInfo: number;
|
|
27
|
+
adultItemInfo: number;
|
|
28
|
+
limitSaleInfo: number;
|
|
29
|
+
itemImg: number;
|
|
30
|
+
purchased: number;
|
|
31
|
+
storeId: number;
|
|
32
|
+
};
|
|
33
|
+
export declare const CartForWritePaySelect: {
|
|
34
|
+
_id: number;
|
|
35
|
+
itemId: number;
|
|
36
|
+
storeId: number;
|
|
37
|
+
pOption: number;
|
|
38
|
+
pOptionInfo: number;
|
|
39
|
+
itemName_past: number;
|
|
40
|
+
itemPrice_past: number;
|
|
41
|
+
sellingInfo_past: number;
|
|
42
|
+
cartType: number;
|
|
43
|
+
ownerId: number;
|
|
44
|
+
isChecked: number;
|
|
45
|
+
requirement: number;
|
|
46
|
+
};
|
|
47
|
+
export declare class GetCartsForWritePayPayload {
|
|
48
|
+
/** 장바구니 아이디 리스트 */
|
|
49
|
+
cartIds: string[];
|
|
50
|
+
}
|
|
51
|
+
export declare class GetCartsForWritePayResult {
|
|
52
|
+
carts: CartForWritePay[];
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetCartsForWritePayResult = exports.GetCartsForWritePayPayload = exports.CartForWritePaySelect = exports.SearchedStoreItemForWritePaySelect = exports.SearchedUserForWritePaySelect = void 0;
|
|
4
|
+
exports.SearchedUserForWritePaySelect = {
|
|
5
|
+
_id: 1,
|
|
6
|
+
username: 1,
|
|
7
|
+
};
|
|
8
|
+
exports.SearchedStoreItemForWritePaySelect = {
|
|
9
|
+
_id: 1,
|
|
10
|
+
selectionInfos: 1,
|
|
11
|
+
itemPrice: 1,
|
|
12
|
+
insuranceInfo: 1,
|
|
13
|
+
mainCategory: 1,
|
|
14
|
+
subCategory: 1,
|
|
15
|
+
sellerId: 1,
|
|
16
|
+
isLimitSale: 1,
|
|
17
|
+
itemName: 1,
|
|
18
|
+
itemPriceForBuyer: 1,
|
|
19
|
+
sellingInfo: 1,
|
|
20
|
+
adultItemInfo: 1,
|
|
21
|
+
limitSaleInfo: 1,
|
|
22
|
+
itemImg: 1,
|
|
23
|
+
purchased: 1,
|
|
24
|
+
storeId: 1,
|
|
25
|
+
};
|
|
26
|
+
exports.CartForWritePaySelect = {
|
|
27
|
+
_id: 1,
|
|
28
|
+
itemId: 1,
|
|
29
|
+
storeId: 1,
|
|
30
|
+
pOption: 1,
|
|
31
|
+
pOptionInfo: 1,
|
|
32
|
+
itemName_past: 1,
|
|
33
|
+
itemPrice_past: 1,
|
|
34
|
+
sellingInfo_past: 1,
|
|
35
|
+
cartType: 1,
|
|
36
|
+
ownerId: 1,
|
|
37
|
+
isChecked: 1,
|
|
38
|
+
requirement: 1,
|
|
39
|
+
};
|
|
40
|
+
class GetCartsForWritePayPayload {
|
|
41
|
+
}
|
|
42
|
+
exports.GetCartsForWritePayPayload = GetCartsForWritePayPayload;
|
|
43
|
+
class GetCartsForWritePayResult {
|
|
44
|
+
}
|
|
45
|
+
exports.GetCartsForWritePayResult = GetCartsForWritePayResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { GetCartsForWritePayPayload, GetCartsForWritePayResult, } from './get-carts-for-write-pay.dto';
|
|
@@ -1,17 +1,6 @@
|
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
exports.GetCartsForWritePayResult = exports.GetCartsForWritePayPayload = void 0;
|
|
4
|
+
var get_carts_for_write_pay_dto_1 = require("./get-carts-for-write-pay.dto");
|
|
5
|
+
Object.defineProperty(exports, "GetCartsForWritePayPayload", { enumerable: true, get: function () { return get_carts_for_write_pay_dto_1.GetCartsForWritePayPayload; } });
|
|
6
|
+
Object.defineProperty(exports, "GetCartsForWritePayResult", { enumerable: true, get: function () { return get_carts_for_write_pay_dto_1.GetCartsForWritePayResult; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ClientProxy } from '@nestjs/microservices';
|
|
2
|
+
import { AbstractParam } from '@yolo-croket-dev/core';
|
|
3
|
+
import { GetCartsForWritePayPayload, GetCartsForWritePayResult } from '@yolo-croket-dev/amqp-access/user-service/dto/cart';
|
|
4
|
+
export declare class AmqpCartService {
|
|
5
|
+
private readonly client;
|
|
6
|
+
private readonly amqpManager;
|
|
7
|
+
constructor(client: ClientProxy);
|
|
8
|
+
getCartsByIds(payload: GetCartsForWritePayPayload, param: AbstractParam): Promise<GetCartsForWritePayResult>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AmqpCartService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
18
|
+
const functions_1 = require("@yolo-croket-dev/core/functions");
|
|
19
|
+
let AmqpCartService = class AmqpCartService {
|
|
20
|
+
constructor(client) {
|
|
21
|
+
this.client = client;
|
|
22
|
+
this.amqpManager = new functions_1.AmqpManagement(this.client);
|
|
23
|
+
}
|
|
24
|
+
async getCartsByIds(payload, param) {
|
|
25
|
+
return this.amqpManager.call('장바구니 아이디로 데이터 조회', 'cart.get.carts-by-ids', payload, param, { isErrorThrowing: true });
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
AmqpCartService = __decorate([
|
|
29
|
+
(0, common_1.Injectable)(),
|
|
30
|
+
__param(0, (0, common_1.Inject)('USER_SERVICE_PROVIDER')),
|
|
31
|
+
__metadata("design:paramtypes", [microservices_1.ClientProxy])
|
|
32
|
+
], AmqpCartService);
|
|
33
|
+
exports.AmqpCartService = AmqpCartService;
|
|
@@ -23,3 +23,4 @@ __exportStar(require("./amqp.user-entity.service"), exports);
|
|
|
23
23
|
__exportStar(require("./amqp.store.service"), exports);
|
|
24
24
|
__exportStar(require("./ask"), exports);
|
|
25
25
|
__exportStar(require("./amqp.inflow-session.service"), exports);
|
|
26
|
+
__exportStar(require("./amqp.cart.service"), exports);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { CartEntity } from '@yolo-croket-dev/entity-v2/cart';
|
|
2
|
-
export declare class GetCartsByIdsPayload {
|
|
3
|
-
/** 상품 아이디 */
|
|
4
|
-
itemId: string;
|
|
5
|
-
/** 검색 포함 필드 */
|
|
6
|
-
includeFields?: string[];
|
|
7
|
-
/** 검색 제외 필드 */
|
|
8
|
-
excludeFields?: string[];
|
|
9
|
-
}
|
|
10
|
-
export declare class GetCartsByIdsResult {
|
|
11
|
-
carts: CartEntity[];
|
|
12
|
-
}
|