rez_core 2.2.256 → 2.2.257
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/dist/module/communication/communication.module.js +7 -8
- package/dist/module/communication/communication.module.js.map +1 -1
- package/dist/module/communication/entity/integration-source.entity.d.ts +6 -0
- package/dist/module/communication/entity/integration-source.entity.js +33 -0
- package/dist/module/communication/entity/integration-source.entity.js.map +1 -0
- package/dist/module/meta/service/entity-master.service.d.ts +1 -1
- package/dist/module/meta/service/entity-master.service.js +6 -12
- package/dist/module/meta/service/entity-master.service.js.map +1 -1
- package/dist/module/workflow/controller/action.controller.d.ts +1 -0
- package/dist/module/workflow/repository/action.repository.d.ts +1 -0
- package/dist/module/workflow/repository/action.repository.js +2 -0
- package/dist/module/workflow/repository/action.repository.js.map +1 -1
- package/dist/module/workflow/service/action.service.d.ts +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/communication/communication.module.ts +7 -8
- package/src/module/communication/entity/integration-source.entity.ts +14 -0
- package/src/module/meta/service/entity-master.service.ts +10 -17
- package/src/module/workflow/repository/action.repository.ts +2 -0
- package/dist/module/communication/controller/webhook.controller.d.ts +0 -4
- package/dist/module/communication/controller/webhook.controller.js +0 -38
- package/dist/module/communication/controller/webhook.controller.js.map +0 -1
- package/src/module/communication/controller/webhook.controller.ts +0 -14
package/package.json
CHANGED
|
@@ -45,19 +45,18 @@ import { GoogleService } from './service/calendar-event.service';
|
|
|
45
45
|
import { WrapperService } from './service/wrapper.service';
|
|
46
46
|
import { WrapperController } from './controller/wrapper.controller';
|
|
47
47
|
import { IcsMeetingModule } from '../ics/ics.module';
|
|
48
|
-
import {
|
|
48
|
+
import { IntegrationConfig } from './entity/integration-source.entity';
|
|
49
49
|
|
|
50
50
|
@Module({
|
|
51
51
|
imports: [
|
|
52
|
-
TypeOrmModule.forFeature([
|
|
52
|
+
TypeOrmModule.forFeature([
|
|
53
|
+
CommunicationConfig,
|
|
54
|
+
CommunicationHub,
|
|
55
|
+
IntegrationConfig,
|
|
56
|
+
]),
|
|
53
57
|
IcsMeetingModule,
|
|
54
58
|
],
|
|
55
|
-
controllers: [
|
|
56
|
-
CommunicationController,
|
|
57
|
-
GoogleController,
|
|
58
|
-
WrapperController,
|
|
59
|
-
WebhookController,
|
|
60
|
-
],
|
|
59
|
+
controllers: [CommunicationController, GoogleController, WrapperController],
|
|
61
60
|
providers: [
|
|
62
61
|
// Main Services
|
|
63
62
|
CommunicationService,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
|
+
import { Column, Entity } from 'typeorm';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'cr_integration_master' })
|
|
5
|
+
export class IntegrationConfig extends BaseEntity {
|
|
6
|
+
@Column({ name: 'logo', type: 'varchar', length: 100 })
|
|
7
|
+
logo: string;
|
|
8
|
+
|
|
9
|
+
@Column({ name: 'base_url', type: 'varchar', length: 100 })
|
|
10
|
+
base_url: string;
|
|
11
|
+
|
|
12
|
+
@Column({ name: 'integration_type', type: 'varchar', length: 20 })
|
|
13
|
+
integration_type: string;
|
|
14
|
+
}
|
|
@@ -69,26 +69,19 @@ export class EntityMasterService {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
async getFilterMetaData(entityType: string, loggedInUser: any) {
|
|
72
|
-
console.log(entityType, loggedInUser);
|
|
73
|
-
|
|
74
72
|
// Step 1: Get entity_master record by mapped_entity_type
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
LIMIT 1`,
|
|
81
|
-
[entityType, loggedInUser.organization_id],
|
|
82
|
-
);
|
|
73
|
+
const entityMasterData =
|
|
74
|
+
await this.entityMasterRepo.getEntityByMappedEntityType(
|
|
75
|
+
entityType,
|
|
76
|
+
loggedInUser.organization_id,
|
|
77
|
+
);
|
|
83
78
|
|
|
84
|
-
if (!
|
|
79
|
+
if (!entityMasterData) {
|
|
85
80
|
throw new Error(
|
|
86
81
|
`Entity master with mapped_entity_type "${entityType}" not found.`,
|
|
87
82
|
);
|
|
88
83
|
}
|
|
89
84
|
|
|
90
|
-
const entityMasterData = entityMaster[0] as any; // cast as DTO if you have one
|
|
91
|
-
|
|
92
85
|
// Step 2: Get attribute_master (instead of entity_table_column)
|
|
93
86
|
const attributes = await this.dataSource.query(
|
|
94
87
|
`SELECT *
|
|
@@ -99,10 +92,10 @@ export class EntityMasterService {
|
|
|
99
92
|
);
|
|
100
93
|
|
|
101
94
|
// Step 3: Attach column_list from attribute_master
|
|
102
|
-
entityMasterData
|
|
95
|
+
entityMasterData['attribute_list'] = attributes;
|
|
103
96
|
|
|
104
97
|
// Step 4: Keep existing operation_list logic
|
|
105
|
-
entityMasterData
|
|
98
|
+
entityMasterData['operation_list'] = {
|
|
106
99
|
text: await this.listMasterService.getDropdownOptions(
|
|
107
100
|
'OPT',
|
|
108
101
|
{},
|
|
@@ -142,13 +135,13 @@ export class EntityMasterService {
|
|
|
142
135
|
};
|
|
143
136
|
|
|
144
137
|
// Step 5: Keep filters as is
|
|
145
|
-
entityMasterData
|
|
138
|
+
entityMasterData['default_filter'] =
|
|
146
139
|
await this.savedFilterRepoService.getDefaultFilterByEntityType(
|
|
147
140
|
entityType,
|
|
148
141
|
);
|
|
149
142
|
|
|
150
143
|
if (loggedInUser.id) {
|
|
151
|
-
entityMasterData
|
|
144
|
+
entityMasterData['saved_filter'] =
|
|
152
145
|
await this.savedFilterRepoService.getSavedFiltersByUserIdAndEntityType(
|
|
153
146
|
loggedInUser.id,
|
|
154
147
|
entityType,
|
|
@@ -204,6 +204,7 @@ export class ActionRepository {
|
|
|
204
204
|
'ac.modalName AS modalName',
|
|
205
205
|
'ac.logo AS logo',
|
|
206
206
|
'ac.name AS action_category_name',
|
|
207
|
+
'a.dependent_action_id AS dependent_action_id',
|
|
207
208
|
])
|
|
208
209
|
.from('cr_wf_action', 'a')
|
|
209
210
|
.leftJoin('cr_wf_action_category', 'ac', 'ac.id = a.action_category')
|
|
@@ -249,6 +250,7 @@ export class ActionRepository {
|
|
|
249
250
|
|
|
250
251
|
return {
|
|
251
252
|
value: row.action_id,
|
|
253
|
+
dependent_action_id: row.dependent_action_id,
|
|
252
254
|
label: row.action_name,
|
|
253
255
|
modalName: row.modalName,
|
|
254
256
|
logo: row.logo,
|
|
@@ -1,38 +0,0 @@
|
|
|
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.WebhookController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
let WebhookController = class WebhookController {
|
|
18
|
-
handleTubelightWebhook(req, res) {
|
|
19
|
-
const apiKey = req.headers['x-api-key'];
|
|
20
|
-
console.log('API Key:', apiKey);
|
|
21
|
-
console.log('handleTubelightWebhook: START');
|
|
22
|
-
console.log(req);
|
|
23
|
-
res.status(200).send('Webhook received');
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.WebhookController = WebhookController;
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, common_1.Post)('tubelight'),
|
|
29
|
-
__param(0, (0, common_1.Req)()),
|
|
30
|
-
__param(1, (0, common_1.Res)()),
|
|
31
|
-
__metadata("design:type", Function),
|
|
32
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
33
|
-
__metadata("design:returntype", void 0)
|
|
34
|
-
], WebhookController.prototype, "handleTubelightWebhook", null);
|
|
35
|
-
exports.WebhookController = WebhookController = __decorate([
|
|
36
|
-
(0, common_1.Controller)('webhook')
|
|
37
|
-
], WebhookController);
|
|
38
|
-
//# sourceMappingURL=webhook.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.controller.js","sourceRoot":"","sources":["../../../../src/module/communication/controller/webhook.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4D;AAIrD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAE5B,sBAAsB,CAAQ,GAAQ,EAAS,GAAa;QAC1D,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACxC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC3C,CAAC;CACF,CAAA;AATY,8CAAiB;AAE5B;IADC,IAAA,aAAI,EAAC,WAAW,CAAC;IACM,WAAA,IAAA,YAAG,GAAE,CAAA;IAAY,WAAA,IAAA,YAAG,GAAE,CAAA;;;;+DAM7C;4BARU,iBAAiB;IAD7B,IAAA,mBAAU,EAAC,SAAS,CAAC;GACT,iBAAiB,CAS7B"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Controller, Post, Req, Res } from '@nestjs/common';
|
|
2
|
-
import { Response } from 'express';
|
|
3
|
-
|
|
4
|
-
@Controller('webhook')
|
|
5
|
-
export class WebhookController {
|
|
6
|
-
@Post('tubelight')
|
|
7
|
-
handleTubelightWebhook(@Req() req: any, @Res() res: Response) {
|
|
8
|
-
const apiKey = req.headers['x-api-key'];
|
|
9
|
-
console.log('API Key:', apiKey);
|
|
10
|
-
console.log('handleTubelightWebhook: START');
|
|
11
|
-
console.log(req);
|
|
12
|
-
res.status(200).send('Webhook received');
|
|
13
|
-
}
|
|
14
|
-
}
|