@yolo-croket-dev/amqp-access 0.0.0 → 0.0.2
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/index.d.ts +2 -1
- package/index.js +2 -1
- package/notification-service/amqp.notification-service.module.d.ts +2 -0
- package/notification-service/amqp.notification-service.module.js +27 -0
- package/notification-service/amqp.notification-service.provider.d.ts +4 -0
- package/notification-service/amqp.notification-service.provider.js +21 -0
- package/notification-service/amqp.notification-service.service.d.ts +12 -0
- package/notification-service/amqp.notification-service.service.js +44 -0
- package/notification-service/index.d.ts +3 -0
- package/notification-service/index.js +19 -0
- package/package.json +1 -1
- package/user-service/amqp.user-service.module.d.ts +2 -0
- package/user-service/amqp.user-service.module.js +27 -0
- package/user-service/amqp.user-service.provider.d.ts +4 -0
- package/user-service/amqp.user-service.provider.js +21 -0
- package/user-service/amqp.user-service.service.d.ts +9 -0
- package/user-service/amqp.user-service.service.js +33 -0
- package/user-service/index.d.ts +3 -0
- package/user-service/index.js +19 -0
- /package/{order-service → order-server}/amqp.order-server.module.d.ts +0 -0
- /package/{order-service → order-server}/amqp.order-server.module.js +0 -0
- /package/{order-service → order-server}/amqp.order-server.provider.d.ts +0 -0
- /package/{order-service → order-server}/amqp.order-server.provider.js +0 -0
- /package/{order-service → order-server}/amqp.order-server.service.d.ts +0 -0
- /package/{order-service → order-server}/amqp.order-server.service.js +0 -0
- /package/{order-service → order-server}/index.d.ts +0 -0
- /package/{order-service → order-server}/index.js +0 -0
package/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './order-
|
|
1
|
+
export * from './order-server';
|
|
2
|
+
export * from './notification-service';
|
package/index.js
CHANGED
|
@@ -14,4 +14,5 @@ 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
|
-
__exportStar(require("./order-
|
|
17
|
+
__exportStar(require("./order-server"), exports);
|
|
18
|
+
__exportStar(require("./notification-service"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AmqpNotificationServiceModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const amqp_notification_service_provider_1 = require("./amqp.notification-service.provider");
|
|
12
|
+
const amqp_notification_service_service_1 = require("./amqp.notification-service.service");
|
|
13
|
+
let AmqpNotificationServiceModule = class AmqpNotificationServiceModule {
|
|
14
|
+
};
|
|
15
|
+
AmqpNotificationServiceModule = __decorate([
|
|
16
|
+
(0, common_1.Module)({
|
|
17
|
+
providers: [
|
|
18
|
+
amqp_notification_service_provider_1.NotifiactionServiceProvider,
|
|
19
|
+
amqp_notification_service_service_1.AmqpNotificationService,
|
|
20
|
+
],
|
|
21
|
+
exports: [
|
|
22
|
+
amqp_notification_service_provider_1.NotifiactionServiceProvider,
|
|
23
|
+
amqp_notification_service_service_1.AmqpNotificationService,
|
|
24
|
+
],
|
|
25
|
+
})
|
|
26
|
+
], AmqpNotificationServiceModule);
|
|
27
|
+
exports.AmqpNotificationServiceModule = AmqpNotificationServiceModule;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotifiactionServiceProvider = void 0;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
6
|
+
const { AMQP_URL, NOTIFICATION_SERVICE } = process.env;
|
|
7
|
+
exports.NotifiactionServiceProvider = {
|
|
8
|
+
provide: 'NOTIFICATION_SERVICE_PROVIDER',
|
|
9
|
+
useFactory: () => microservices_1.ClientProxyFactory.create({
|
|
10
|
+
transport: microservices_1.Transport.RMQ,
|
|
11
|
+
options: {
|
|
12
|
+
urls: [AMQP_URL],
|
|
13
|
+
queue: NOTIFICATION_SERVICE,
|
|
14
|
+
noAck: false,
|
|
15
|
+
queueOptions: {
|
|
16
|
+
durable: true,
|
|
17
|
+
noAssert: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ClientProxy } from '@nestjs/microservices';
|
|
2
|
+
import { AbstractParam } from '@yolo-croket-dev/core';
|
|
3
|
+
import { CheckInspectionWithInvoiceEnclosedPayload, CheckInspectionWithInvoiceEnclosedResult, CheckInspectionWithInvoiceNotEnclosedPayload, CheckInspectionWithInvoiceNotEnclosedResult, SendInspectionWithInvoiceEnclosedPayload, SendInspectionWithInvoiceEnclosedResult, SendInspectionWithInvoiceNotEnclosedPayload, SendInspectionWithInvoiceNotEnclosedResult } from '@yolo-croket-dev/dto-v2/notification-service';
|
|
4
|
+
export declare class AmqpNotificationService {
|
|
5
|
+
private readonly client;
|
|
6
|
+
private readonly amqpManager;
|
|
7
|
+
constructor(client: ClientProxy);
|
|
8
|
+
checkInspectionWithInvoiceEnclosed(payload: CheckInspectionWithInvoiceEnclosedPayload, param: AbstractParam): Promise<CheckInspectionWithInvoiceEnclosedResult>;
|
|
9
|
+
checkInspectionWithInvoiceNotEnclosed(payload: CheckInspectionWithInvoiceNotEnclosedPayload, param: AbstractParam): Promise<CheckInspectionWithInvoiceNotEnclosedResult>;
|
|
10
|
+
sendInspectionWithInvoiceEnclosed(payload: SendInspectionWithInvoiceEnclosedPayload, param: AbstractParam): Promise<SendInspectionWithInvoiceEnclosedResult>;
|
|
11
|
+
sendInspectionWithInvoiceNotEnclosed(payload: SendInspectionWithInvoiceNotEnclosedPayload, param: AbstractParam): Promise<SendInspectionWithInvoiceNotEnclosedResult>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.AmqpNotificationService = 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 AmqpNotificationService = class AmqpNotificationService {
|
|
20
|
+
constructor(client) {
|
|
21
|
+
this.client = client;
|
|
22
|
+
this.amqpManager = new functions_1.AmqpManagement(this.client);
|
|
23
|
+
}
|
|
24
|
+
async checkInspectionWithInvoiceEnclosed(payload, param) {
|
|
25
|
+
// eslint-disable-next-line max-len
|
|
26
|
+
return this.amqpManager.call('inspection-with-invoice-enclosed 템플릿 대량 noti 전 데이터 체크를 위한 api', 'notification-bulk-send.check.inspection-with-invoice-enclosed', payload, param, { isErrorThrowing: true });
|
|
27
|
+
}
|
|
28
|
+
async checkInspectionWithInvoiceNotEnclosed(payload, param) {
|
|
29
|
+
// eslint-disable-next-line max-len
|
|
30
|
+
return this.amqpManager.call('inspection-with-invoice-not-enclosed 템플릿 대량 noti 전 데이터 체크를 위한 api', 'notification-bulk-send.check.inspection-with-invoice-not-enclosed', payload, param, { isErrorThrowing: true });
|
|
31
|
+
}
|
|
32
|
+
async sendInspectionWithInvoiceEnclosed(payload, param) {
|
|
33
|
+
return this.amqpManager.call('inspection-with-invoice-enclosed 템플릿 대량 noti 발송 api', 'notification-bulk-send.send.inspection-with-invoice-enclosed', payload, param, { isErrorThrowing: true });
|
|
34
|
+
}
|
|
35
|
+
async sendInspectionWithInvoiceNotEnclosed(payload, param) {
|
|
36
|
+
return this.amqpManager.call('inspection-with-invoice-enclosed 템플릿 대량 noti 발송 api', 'notification-bulk-send.send.inspection-with-invoice-not-enclosed', payload, param, { isErrorThrowing: true });
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
AmqpNotificationService = __decorate([
|
|
40
|
+
(0, common_1.Injectable)(),
|
|
41
|
+
__param(0, (0, common_1.Inject)('NOTIFICATION_SERVICE_PROVIDER')),
|
|
42
|
+
__metadata("design:paramtypes", [microservices_1.ClientProxy])
|
|
43
|
+
], AmqpNotificationService);
|
|
44
|
+
exports.AmqpNotificationService = AmqpNotificationService;
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./amqp.notification-service.module"), exports);
|
|
18
|
+
__exportStar(require("./amqp.notification-service.provider"), exports);
|
|
19
|
+
__exportStar(require("./amqp.notification-service.service"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AmqpNotificationServiceModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const amqp_user_service_provider_1 = require("./amqp.user-service.provider");
|
|
12
|
+
const amqp_user_service_service_1 = require("./amqp.user-service.service");
|
|
13
|
+
let AmqpNotificationServiceModule = class AmqpNotificationServiceModule {
|
|
14
|
+
};
|
|
15
|
+
AmqpNotificationServiceModule = __decorate([
|
|
16
|
+
(0, common_1.Module)({
|
|
17
|
+
providers: [
|
|
18
|
+
amqp_user_service_provider_1.UserServiceProvider,
|
|
19
|
+
amqp_user_service_service_1.AmqpUserService,
|
|
20
|
+
],
|
|
21
|
+
exports: [
|
|
22
|
+
amqp_user_service_provider_1.UserServiceProvider,
|
|
23
|
+
amqp_user_service_service_1.AmqpUserService,
|
|
24
|
+
],
|
|
25
|
+
})
|
|
26
|
+
], AmqpNotificationServiceModule);
|
|
27
|
+
exports.AmqpNotificationServiceModule = AmqpNotificationServiceModule;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserServiceProvider = void 0;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
6
|
+
const { AMQP_URL, USER_SERVICE } = process.env;
|
|
7
|
+
exports.UserServiceProvider = {
|
|
8
|
+
provide: 'USER_SERVICE_PROVIDER',
|
|
9
|
+
useFactory: () => microservices_1.ClientProxyFactory.create({
|
|
10
|
+
transport: microservices_1.Transport.RMQ,
|
|
11
|
+
options: {
|
|
12
|
+
urls: [AMQP_URL],
|
|
13
|
+
queue: USER_SERVICE,
|
|
14
|
+
noAck: false,
|
|
15
|
+
queueOptions: {
|
|
16
|
+
durable: true,
|
|
17
|
+
noAssert: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ClientProxy } from '@nestjs/microservices';
|
|
2
|
+
import { AbstractParam } from '@yolo-croket-dev/core';
|
|
3
|
+
import { GetUsersForAdminPayload, GetUsersForAdminResult } from '@yolo-croket-dev/dto-v2/user-service';
|
|
4
|
+
export declare class AmqpUserService {
|
|
5
|
+
private readonly client;
|
|
6
|
+
private readonly amqpManager;
|
|
7
|
+
constructor(client: ClientProxy);
|
|
8
|
+
getUsersForAdmin(payload: GetUsersForAdminPayload, param: AbstractParam): Promise<GetUsersForAdminResult>;
|
|
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.AmqpUserService = 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 AmqpUserService = class AmqpUserService {
|
|
20
|
+
constructor(client) {
|
|
21
|
+
this.client = client;
|
|
22
|
+
this.amqpManager = new functions_1.AmqpManagement(this.client);
|
|
23
|
+
}
|
|
24
|
+
async getUsersForAdmin(payload, param) {
|
|
25
|
+
return this.amqpManager.call('관리자를 위한 유저 정보 리스트 조회', 'user.get.for-admin', payload, param, { isErrorThrowing: true });
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
AmqpUserService = __decorate([
|
|
29
|
+
(0, common_1.Injectable)(),
|
|
30
|
+
__param(0, (0, common_1.Inject)('USER_SERVICE_PROVIDER')),
|
|
31
|
+
__metadata("design:paramtypes", [microservices_1.ClientProxy])
|
|
32
|
+
], AmqpUserService);
|
|
33
|
+
exports.AmqpUserService = AmqpUserService;
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./amqp.user-service.module"), exports);
|
|
18
|
+
__exportStar(require("./amqp.user-service.provider"), exports);
|
|
19
|
+
__exportStar(require("./amqp.user-service.service"), exports);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|