@yolo-croket-dev/amqp-access 0.0.103 → 0.0.104-hj-01
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/package.json +2 -2
- package/payment-service/dto/index.d.ts +1 -0
- package/payment-service/dto/index.js +1 -0
- package/payment-service/dto/partial-refund/command/create-partial-refund.dto.d.ts +19 -0
- package/payment-service/dto/partial-refund/command/create-partial-refund.dto.js +79 -0
- package/payment-service/dto/partial-refund/command/index.d.ts +1 -0
- package/payment-service/dto/partial-refund/command/index.js +17 -0
- package/payment-service/dto/partial-refund/index.d.ts +1 -0
- package/payment-service/dto/partial-refund/index.js +17 -0
- package/payment-service/services/amqp.partial-refund.service.d.ts +9 -0
- package/payment-service/services/amqp.partial-refund.service.js +33 -0
- package/payment-service/services/index.d.ts +1 -0
- package/payment-service/services/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolo-croket-dev/amqp-access",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.104-hj-01",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "Yolo Co., Ltd.",
|
|
6
6
|
"description": "크로켓 amqp-access npm",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@yolo-croket-dev/core": "^1.4.52",
|
|
23
23
|
"@yolo-croket-dev/dto-v2": "^0.0.149",
|
|
24
24
|
"@yolo-croket-dev/entity": "0.1.120-jun.7",
|
|
25
|
-
"@yolo-croket-dev/entity-v2": "^0.0.
|
|
25
|
+
"@yolo-croket-dev/entity-v2": "^0.0.41-hj-04",
|
|
26
26
|
"class-transformer": "^0.5.1",
|
|
27
27
|
"class-validator": "^0.13.2",
|
|
28
28
|
"dotenv": "^16.3.1"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PartialRefundReasonTypeEnum, PartialRefundTypeEnum, ReturnFeeBearerEnum } from '@yolo-croket-dev/entity-v2';
|
|
2
|
+
export declare class RefundOption {
|
|
3
|
+
optionName: string;
|
|
4
|
+
refundNums: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class RefundOptionInfo {
|
|
7
|
+
refundOptionList: RefundOption[];
|
|
8
|
+
}
|
|
9
|
+
export declare class CreatePartialRefundPayload {
|
|
10
|
+
PInfoId: string;
|
|
11
|
+
refundType: PartialRefundTypeEnum;
|
|
12
|
+
refundOptionInfo?: RefundOptionInfo;
|
|
13
|
+
refundReason: PartialRefundReasonTypeEnum;
|
|
14
|
+
refundReasonEtc?: string;
|
|
15
|
+
returnFeeExists: boolean;
|
|
16
|
+
returnFee?: number;
|
|
17
|
+
negotiated: boolean;
|
|
18
|
+
returnFeeBearer?: ReturnFeeBearerEnum;
|
|
19
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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.CreatePartialRefundPayload = exports.RefundOptionInfo = exports.RefundOption = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const entity_v2_1 = require("@yolo-croket-dev/entity-v2");
|
|
15
|
+
const class_transformer_1 = require("class-transformer");
|
|
16
|
+
class RefundOption {
|
|
17
|
+
}
|
|
18
|
+
exports.RefundOption = RefundOption;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], RefundOption.prototype, "optionName", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsNumber)(),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], RefundOption.prototype, "refundNums", void 0);
|
|
28
|
+
class RefundOptionInfo {
|
|
29
|
+
}
|
|
30
|
+
exports.RefundOptionInfo = RefundOptionInfo;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
33
|
+
(0, class_transformer_1.Type)(() => RefundOption),
|
|
34
|
+
__metadata("design:type", Array)
|
|
35
|
+
], RefundOptionInfo.prototype, "refundOptionList", void 0);
|
|
36
|
+
class CreatePartialRefundPayload {
|
|
37
|
+
}
|
|
38
|
+
exports.CreatePartialRefundPayload = CreatePartialRefundPayload;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsMongoId)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], CreatePartialRefundPayload.prototype, "PInfoId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsEnum)(entity_v2_1.PartialRefundTypeEnum),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], CreatePartialRefundPayload.prototype, "refundType", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsOptional)(),
|
|
49
|
+
(0, class_transformer_1.Type)(() => RefundOptionInfo),
|
|
50
|
+
__metadata("design:type", RefundOptionInfo)
|
|
51
|
+
], CreatePartialRefundPayload.prototype, "refundOptionInfo", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsEnum)(entity_v2_1.PartialRefundReasonTypeEnum),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], CreatePartialRefundPayload.prototype, "refundReason", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
(0, class_validator_1.IsOptional)(),
|
|
59
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], CreatePartialRefundPayload.prototype, "refundReasonEtc", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsBoolean)(),
|
|
64
|
+
__metadata("design:type", Boolean)
|
|
65
|
+
], CreatePartialRefundPayload.prototype, "returnFeeExists", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsNumber)(),
|
|
68
|
+
(0, class_validator_1.IsOptional)(),
|
|
69
|
+
__metadata("design:type", Number)
|
|
70
|
+
], CreatePartialRefundPayload.prototype, "returnFee", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsBoolean)(),
|
|
73
|
+
__metadata("design:type", Boolean)
|
|
74
|
+
], CreatePartialRefundPayload.prototype, "negotiated", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.IsEnum)(entity_v2_1.ReturnFeeBearerEnum),
|
|
77
|
+
(0, class_validator_1.IsOptional)(),
|
|
78
|
+
__metadata("design:type", Number)
|
|
79
|
+
], CreatePartialRefundPayload.prototype, "returnFeeBearer", void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './create-partial-refund.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("./create-partial-refund.dto"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './command';
|
|
@@ -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("./command"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ClientProxy } from '@nestjs/microservices';
|
|
2
|
+
import { AbstractParam } from '@yolo-croket-dev/core';
|
|
3
|
+
import { CreatePartialRefundPayload } from '../dto';
|
|
4
|
+
export declare class AmqpPartialRefundService {
|
|
5
|
+
private readonly client;
|
|
6
|
+
private readonly amqpManager;
|
|
7
|
+
constructor(client: ClientProxy);
|
|
8
|
+
createPartialRefund(payload: CreatePartialRefundPayload, param: AbstractParam): Promise<void>;
|
|
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.AmqpPartialRefundService = 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 AmqpPartialRefundService = class AmqpPartialRefundService {
|
|
20
|
+
constructor(client) {
|
|
21
|
+
this.client = client;
|
|
22
|
+
this.amqpManager = new functions_1.AmqpManagement(this.client);
|
|
23
|
+
}
|
|
24
|
+
async createPartialRefund(payload, param) {
|
|
25
|
+
return this.amqpManager.call('셀렉션 프레임 첫 가이드 생성', 'partial-refund.create', payload, param, { isErrorThrowing: true });
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.AmqpPartialRefundService = AmqpPartialRefundService;
|
|
29
|
+
exports.AmqpPartialRefundService = AmqpPartialRefundService = __decorate([
|
|
30
|
+
(0, common_1.Injectable)(),
|
|
31
|
+
__param(0, (0, common_1.Inject)('PAYMANER_SERVICE_PROVIDER')),
|
|
32
|
+
__metadata("design:paramtypes", [microservices_1.ClientProxy])
|
|
33
|
+
], AmqpPartialRefundService);
|
|
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./amqp.refund.service"), exports);
|
|
18
|
+
__exportStar(require("./amqp.partial-refund.service"), exports);
|