@sigmatech/pergamo 0.1.61 → 0.1.63
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/entities/index.d.ts +1 -0
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +2 -0
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/integrations/index.d.ts +6 -0
- package/dist/entities/integrations/index.d.ts.map +1 -0
- package/dist/entities/integrations/index.js +22 -0
- package/dist/entities/integrations/index.js.map +1 -0
- package/dist/entities/integrations/romeo-session-pool.entity.d.ts +60 -0
- package/dist/entities/integrations/romeo-session-pool.entity.d.ts.map +1 -0
- package/dist/entities/integrations/romeo-session-pool.entity.js +105 -0
- package/dist/entities/integrations/romeo-session-pool.entity.js.map +1 -0
- package/dist/entities/integrations/user-integration-credential.entity.d.ts +75 -0
- package/dist/entities/integrations/user-integration-credential.entity.d.ts.map +1 -0
- package/dist/entities/integrations/user-integration-credential.entity.js +125 -0
- package/dist/entities/integrations/user-integration-credential.entity.js.map +1 -0
- package/package.json +1 -1
package/dist/entities/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kDAAkD,CAAC;AAGjE,cAAc,wBAAwB,CAAC;AACvC,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,C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,cAAc,QAAQ,CAAC;AAGvB,cAAc,qBAAqB,CAAC;AAGpC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,mDAAmD,CAAC;AAClE,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AAGvC,cAAc,4BAA4B,CAAC;AAG3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAGlD,cAAc,YAAY,CAAC;AAG3B,cAAc,SAAS,CAAC;AAGxB,cAAc,gBAAgB,CAAC"}
|
package/dist/entities/index.js
CHANGED
|
@@ -128,4 +128,6 @@ __exportStar(require("./bot/bot-location-request.entity"), exports);
|
|
|
128
128
|
__exportStar(require("./telegram"), exports);
|
|
129
129
|
// Graph module
|
|
130
130
|
__exportStar(require("./graph"), exports);
|
|
131
|
+
// Integrations module (User credentials for external services)
|
|
132
|
+
__exportStar(require("./integrations"), exports);
|
|
131
133
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;AAEH,gBAAgB;AAChB,+CAA6B;AAC7B,sDAAoC;AAEpC,sBAAsB;AACtB,8EAA4D;AAC5D,mFAAiE;AAEjE,gBAAgB;AAChB,yDAAuC;AACvC,wEAAsD;AACtD,mEAAiD;AACjD,qEAAmD;AACnD,6DAA2C;AAC3C,wEAAsD;AACtD,+DAA6C;AAC7C,wDAAsC;AACtC,uEAAqD;AACrD,oEAAkD;AAClD,qEAAmD;AACnD,qEAAmD;AACnD,sEAAoD;AACpD,0EAAwD;AACxD,yEAAuD;AACvD,0EAAwD;AACxD,2EAAyD;AACzD,4DAA0C;AAC1C,6DAA2C;AAE3C,iBAAiB;AACjB,4CAA0B;AAE1B,uBAAuB;AACvB,kDAAgC;AAEhC,wDAAwD;AACxD,6DAA2C;AAC3C,mEAAiD;AACjD,mEAAiD;AAEjD,mBAAmB;AACnB,+DAA6C;AAC7C,yEAAuD;AACvD,yDAAuC;AACvC,sEAAoD;AACpD,uEAAqD;AACrD,oEAAkD;AAClD,oEAAkD;AAClD,2EAAyD;AAEzD,kBAAkB;AAClB,6DAA2C;AAC3C,yEAAuD;AAEvD,cAAc;AACd,qDAAmC;AACnC,2DAAyC;AACzC,0DAAwC;AACxC,4DAA0C;AAE1C,eAAe;AACf,uDAAqC;AAErC,cAAc;AACd,yDAAuC;AACvC,yDAAuC;AAEvC,cAAc;AACd,4DAA0C;AAC1C,6DAA2C;AAC3C,iEAA+C;AAC/C,oEAAkD;AAClD,4DAA0C;AAE1C,sBAAsB;AACtB,8EAA4D;AAC5D,gFAA8D;AAC9D,8DAA4C;AAE5C,uBAAuB;AACvB,yDAAuC;AACvC,6DAA2C;AAE3C,kBAAkB;AAClB,sEAAoD;AAEpD,sBAAsB;AACtB,iEAA+C;AAC/C,wEAAsD;AACtD,oEAAkD;AAElD,qBAAqB;AACrB,0EAAwD;AAExD,uBAAuB;AACvB,6EAA2D;AAC3D,gFAA8D;AAE9D,mBAAmB;AACnB,qEAAmD;AACnD,4EAA0D;AAE1D,sBAAsB;AACtB,2EAAyD;AACzD,wEAAsD;AACtD,yEAAuD;AAEvD,cAAc;AACd,gDAA8B;AAE9B,cAAc;AACd,yCAAuB;AAEvB,aAAa;AACb,sDAAoC;AAEpC,YAAY;AACZ,qDAAmC;AAEnC,yBAAyB;AACzB,oFAAkE;AAClE,gEAA8C;AAC9C,yDAAuC;AAEvC,aAAa;AACb,6DAA2C;AAE3C,aAAa;AACb,2DAAyC;AACzC,+DAA6C;AAC7C,kEAAgD;AAChD,oEAAkD;AAElD,kBAAkB;AAClB,6CAA2B;AAE3B,eAAe;AACf,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;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1D,sBAAsB;AACtB,2EAAyD;AACzD,wEAAsD;AACtD,yEAAuD;AAEvD,cAAc;AACd,gDAA8B;AAE9B,cAAc;AACd,yCAAuB;AAEvB,aAAa;AACb,sDAAoC;AAEpC,YAAY;AACZ,qDAAmC;AAEnC,yBAAyB;AACzB,oFAAkE;AAClE,gEAA8C;AAC9C,yDAAuC;AAEvC,aAAa;AACb,6DAA2C;AAE3C,aAAa;AACb,2DAAyC;AACzC,+DAA6C;AAC7C,kEAAgD;AAChD,oEAAkD;AAElD,kBAAkB;AAClB,6CAA2B;AAE3B,eAAe;AACf,0CAAwB;AAExB,+DAA+D;AAC/D,iDAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entities/integrations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Integrations module - User credentials for external services
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./romeo-session-pool.entity"), exports);
|
|
21
|
+
__exportStar(require("./user-integration-credential.entity"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/integrations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,8DAA4C;AAC5C,uEAAqD"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RomeoSessionPool - Pool of shared INTT sessions
|
|
3
|
+
*
|
|
4
|
+
* Groups users who share the same INTT credentials.
|
|
5
|
+
* Each unique set of credentials (identified by hash) has one pool.
|
|
6
|
+
* This allows efficient resource sharing when multiple users use the same account.
|
|
7
|
+
*/
|
|
8
|
+
export declare class RomeoSessionPool {
|
|
9
|
+
id: string;
|
|
10
|
+
tenantId?: string;
|
|
11
|
+
/**
|
|
12
|
+
* SHA-256 hash of the credentials (email + password)
|
|
13
|
+
* Used to identify and group users with the same INTT account
|
|
14
|
+
*/
|
|
15
|
+
credentialHash: string;
|
|
16
|
+
/**
|
|
17
|
+
* Count of active users sharing this pool
|
|
18
|
+
* Updated when users add/remove credentials
|
|
19
|
+
*/
|
|
20
|
+
activeUsers: number;
|
|
21
|
+
/**
|
|
22
|
+
* Current session state with Romeo-Go
|
|
23
|
+
*/
|
|
24
|
+
sessionState?: {
|
|
25
|
+
isActive: boolean;
|
|
26
|
+
lastActivity: Date;
|
|
27
|
+
requestCount: number;
|
|
28
|
+
lastError?: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Whether this pool is enabled for queries
|
|
32
|
+
*/
|
|
33
|
+
isEnabled: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Last time this pool was used for a query
|
|
36
|
+
*/
|
|
37
|
+
lastUsedAt?: Date;
|
|
38
|
+
/**
|
|
39
|
+
* Dokploy: ID of the application (one Romeo-Go container per pool)
|
|
40
|
+
*/
|
|
41
|
+
dokployApplicationId?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Base URL of the Romeo-Go service for this pool (e.g. http://host:port/api/v1)
|
|
44
|
+
* Set after successful deploy in Dokploy
|
|
45
|
+
*/
|
|
46
|
+
serviceUrl?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Deployment status of the Romeo-Go container in Dokploy
|
|
49
|
+
*/
|
|
50
|
+
deploymentStatus?: 'pending' | 'deploying' | 'running' | 'error' | 'stopped';
|
|
51
|
+
/**
|
|
52
|
+
* Last error from Dokploy or deployment (if deploymentStatus === 'error')
|
|
53
|
+
*/
|
|
54
|
+
deploymentError?: string;
|
|
55
|
+
createdAt: Date;
|
|
56
|
+
updatedAt: Date;
|
|
57
|
+
isActive(): boolean;
|
|
58
|
+
incrementRequestCount(): void;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=romeo-session-pool.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"romeo-session-pool.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/integrations/romeo-session-pool.entity.ts"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,qBAGa,gBAAgB;IAE3B,EAAE,EAAG,MAAM,CAAC;IAGZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IAEH,cAAc,EAAG,MAAM,CAAC;IAExB;;;OAGG;IAEH,WAAW,EAAG,MAAM,CAAC;IAErB;;OAEG;IAEH,YAAY,CAAC,EAAE;QACb,QAAQ,EAAE,OAAO,CAAC;QAClB,YAAY,EAAE,IAAI,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF;;OAEG;IAEH,SAAS,EAAG,OAAO,CAAC;IAEpB;;OAEG;IAEH,UAAU,CAAC,EAAE,IAAI,CAAC;IAElB;;OAEG;IAEH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IAEH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IAQH,gBAAgB,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAE7E;;OAEG;IAEH,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;IAIjB,QAAQ,IAAI,OAAO;IAInB,qBAAqB,IAAI,IAAI;CAa9B"}
|
|
@@ -0,0 +1,105 @@
|
|
|
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.RomeoSessionPool = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
/**
|
|
15
|
+
* RomeoSessionPool - Pool of shared INTT sessions
|
|
16
|
+
*
|
|
17
|
+
* Groups users who share the same INTT credentials.
|
|
18
|
+
* Each unique set of credentials (identified by hash) has one pool.
|
|
19
|
+
* This allows efficient resource sharing when multiple users use the same account.
|
|
20
|
+
*/
|
|
21
|
+
let RomeoSessionPool = class RomeoSessionPool {
|
|
22
|
+
// Utility methods
|
|
23
|
+
isActive() {
|
|
24
|
+
return this.isEnabled && (this.sessionState?.isActive ?? false);
|
|
25
|
+
}
|
|
26
|
+
incrementRequestCount() {
|
|
27
|
+
if (this.sessionState) {
|
|
28
|
+
this.sessionState.requestCount = (this.sessionState.requestCount || 0) + 1;
|
|
29
|
+
this.sessionState.lastActivity = new Date();
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
this.sessionState = {
|
|
33
|
+
isActive: true,
|
|
34
|
+
lastActivity: new Date(),
|
|
35
|
+
requestCount: 1,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
this.lastUsedAt = new Date();
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
exports.RomeoSessionPool = RomeoSessionPool;
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], RomeoSessionPool.prototype, "id", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ name: 'tenant_id', length: 50, default: 'sp3', nullable: true }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], RomeoSessionPool.prototype, "tenantId", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ name: 'credential_hash', type: 'varchar', length: 64, unique: true }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], RomeoSessionPool.prototype, "credentialHash", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ name: 'active_users', type: 'int', default: 0 }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], RomeoSessionPool.prototype, "activeUsers", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ name: 'session_state', type: 'jsonb', nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], RomeoSessionPool.prototype, "sessionState", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ name: 'is_enabled', type: 'boolean', default: true }),
|
|
64
|
+
__metadata("design:type", Boolean)
|
|
65
|
+
], RomeoSessionPool.prototype, "isEnabled", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ name: 'last_used_at', type: 'timestamp', nullable: true }),
|
|
68
|
+
__metadata("design:type", Date)
|
|
69
|
+
], RomeoSessionPool.prototype, "lastUsedAt", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({ name: 'dokploy_application_id', type: 'varchar', length: 255, nullable: true }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], RomeoSessionPool.prototype, "dokployApplicationId", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ name: 'service_url', type: 'varchar', length: 512, nullable: true }),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], RomeoSessionPool.prototype, "serviceUrl", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({
|
|
80
|
+
name: 'deployment_status',
|
|
81
|
+
type: 'varchar',
|
|
82
|
+
length: 32,
|
|
83
|
+
nullable: true,
|
|
84
|
+
default: 'pending',
|
|
85
|
+
}),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], RomeoSessionPool.prototype, "deploymentStatus", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ name: 'deployment_error', type: 'text', nullable: true }),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], RomeoSessionPool.prototype, "deploymentError", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
94
|
+
__metadata("design:type", Date)
|
|
95
|
+
], RomeoSessionPool.prototype, "createdAt", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
98
|
+
__metadata("design:type", Date)
|
|
99
|
+
], RomeoSessionPool.prototype, "updatedAt", void 0);
|
|
100
|
+
exports.RomeoSessionPool = RomeoSessionPool = __decorate([
|
|
101
|
+
(0, typeorm_1.Entity)({ name: 'romeo_session_pools' }),
|
|
102
|
+
(0, typeorm_1.Index)('romeo_session_pool_hash_idx', ['credentialHash'], { unique: true }),
|
|
103
|
+
(0, typeorm_1.Index)('romeo_session_pool_tenant_idx', ['tenantId'])
|
|
104
|
+
], RomeoSessionPool);
|
|
105
|
+
//# sourceMappingURL=romeo-session-pool.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"romeo-session-pool.entity.js","sourceRoot":"","sources":["../../../src/entities/integrations/romeo-session-pool.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAOiB;AAEjB;;;;;;GAMG;AAII,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAiF3B,kBAAkB;IAElB,QAAQ;QACN,OAAO,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,IAAI,KAAK,CAAC,CAAC;IAClE,CAAC;IAED,qBAAqB;QACnB,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,IAAI,CAAC,YAAY,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YAC3E,IAAI,CAAC,YAAY,CAAC,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC;QAC9C,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,YAAY,GAAG;gBAClB,QAAQ,EAAE,IAAI;gBACd,YAAY,EAAE,IAAI,IAAI,EAAE;gBACxB,YAAY,EAAE,CAAC;aAChB,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC;IAC/B,CAAC;CACF,CAAA;AApGY,4CAAgB;A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AI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,SAAS;KACnB,CAAC;;0DAC2E;AAM7E;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDAC1C;AAGzB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC7B,IAAI;mDAAC;AAGjB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC7B,IAAI;mDAAC;2BA/EN,gBAAgB;IAH5B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC;IACvC,IAAA,eAAK,EAAC,6BAA6B,EAAE,CAAC,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC1E,IAAA,eAAK,EAAC,+BAA+B,EAAE,CAAC,UAAU,CAAC,CAAC;GACxC,gBAAgB,CAoG5B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { User } from '../user.entity';
|
|
2
|
+
import { RomeoSessionPool } from './romeo-session-pool.entity';
|
|
3
|
+
/**
|
|
4
|
+
* Integration types supported for user credentials
|
|
5
|
+
*/
|
|
6
|
+
export type IntegrationType = 'romeo-intt' | 'terra-go';
|
|
7
|
+
/**
|
|
8
|
+
* Validation status for stored credentials
|
|
9
|
+
*/
|
|
10
|
+
export type CredentialValidationStatus = 'pending' | 'valid' | 'invalid' | 'expired';
|
|
11
|
+
/**
|
|
12
|
+
* Metadata stored with credentials
|
|
13
|
+
*/
|
|
14
|
+
export interface CredentialMetadata {
|
|
15
|
+
validationStatus: CredentialValidationStatus;
|
|
16
|
+
lastError?: string;
|
|
17
|
+
usageCount?: number;
|
|
18
|
+
lastValidationMessage?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* UserIntegrationCredential - Encrypted credentials for external integrations
|
|
22
|
+
*
|
|
23
|
+
* Stores user-specific credentials for external services like INTT (Romeo-Go).
|
|
24
|
+
* Credentials are encrypted using AES-256-GCM.
|
|
25
|
+
* Users with the same credentials are grouped via sessionPoolId.
|
|
26
|
+
*/
|
|
27
|
+
export declare class UserIntegrationCredential {
|
|
28
|
+
id: string;
|
|
29
|
+
tenantId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* User who owns these credentials
|
|
32
|
+
*/
|
|
33
|
+
userId: string;
|
|
34
|
+
user?: User;
|
|
35
|
+
/**
|
|
36
|
+
* Type of integration these credentials are for
|
|
37
|
+
*/
|
|
38
|
+
integrationType: IntegrationType;
|
|
39
|
+
/**
|
|
40
|
+
* AES-256-GCM encrypted credentials
|
|
41
|
+
* Format: iv:authTag:ciphertext (all base64 encoded)
|
|
42
|
+
*/
|
|
43
|
+
encryptedCredentials: string;
|
|
44
|
+
/**
|
|
45
|
+
* SHA-256 hash of the credentials for grouping
|
|
46
|
+
* Used to identify users with the same credentials without decrypting
|
|
47
|
+
*/
|
|
48
|
+
credentialHash: string;
|
|
49
|
+
/**
|
|
50
|
+
* Reference to the shared session pool
|
|
51
|
+
* Multiple users with the same credentials share one pool
|
|
52
|
+
*/
|
|
53
|
+
sessionPoolId?: string;
|
|
54
|
+
sessionPool?: RomeoSessionPool;
|
|
55
|
+
/**
|
|
56
|
+
* Whether these credentials are active and can be used
|
|
57
|
+
*/
|
|
58
|
+
isActive: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Last time the credentials were validated with the external service
|
|
61
|
+
*/
|
|
62
|
+
lastValidatedAt?: Date;
|
|
63
|
+
/**
|
|
64
|
+
* Additional metadata about the credentials
|
|
65
|
+
*/
|
|
66
|
+
metadata?: CredentialMetadata;
|
|
67
|
+
createdAt: Date;
|
|
68
|
+
updatedAt: Date;
|
|
69
|
+
isValid(): boolean;
|
|
70
|
+
needsRevalidation(maxAgeDays?: number): boolean;
|
|
71
|
+
markAsValid(): void;
|
|
72
|
+
markAsInvalid(error: string): void;
|
|
73
|
+
incrementUsageCount(): void;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=user-integration-credential.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-integration-credential.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/integrations/user-integration-credential.entity.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,UAAU,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAErF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,0BAA0B,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;GAMG;AACH,qBAKa,yBAAyB;IAEpC,EAAE,EAAG,MAAM,CAAC;IAGZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IAEH,MAAM,EAAG,MAAM,CAAC;IAIhB,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;OAEG;IAEH,eAAe,EAAG,eAAe,CAAC;IAElC;;;OAGG;IAEH,oBAAoB,EAAG,MAAM,CAAC;IAE9B;;;OAGG;IAEH,cAAc,EAAG,MAAM,CAAC;IAExB;;;OAGG;IAEH,aAAa,CAAC,EAAE,MAAM,CAAC;IAIvB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAE/B;;OAEG;IAEH,QAAQ,EAAG,OAAO,CAAC;IAEnB;;OAEG;IAEH,eAAe,CAAC,EAAE,IAAI,CAAC;IAEvB;;OAEG;IAEH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAG9B,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;IAIjB,OAAO,IAAI,OAAO;IAIlB,iBAAiB,CAAC,UAAU,GAAE,MAAU,GAAG,OAAO;IAOlD,WAAW,IAAI,IAAI;IASnB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IASlC,mBAAmB,IAAI,IAAI;CAO5B"}
|
|
@@ -0,0 +1,125 @@
|
|
|
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.UserIntegrationCredential = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const user_entity_1 = require("../user.entity");
|
|
15
|
+
const romeo_session_pool_entity_1 = require("./romeo-session-pool.entity");
|
|
16
|
+
/**
|
|
17
|
+
* UserIntegrationCredential - Encrypted credentials for external integrations
|
|
18
|
+
*
|
|
19
|
+
* Stores user-specific credentials for external services like INTT (Romeo-Go).
|
|
20
|
+
* Credentials are encrypted using AES-256-GCM.
|
|
21
|
+
* Users with the same credentials are grouped via sessionPoolId.
|
|
22
|
+
*/
|
|
23
|
+
let UserIntegrationCredential = class UserIntegrationCredential {
|
|
24
|
+
// Utility methods
|
|
25
|
+
isValid() {
|
|
26
|
+
return this.isActive && this.metadata?.validationStatus === 'valid';
|
|
27
|
+
}
|
|
28
|
+
needsRevalidation(maxAgeDays = 7) {
|
|
29
|
+
if (!this.lastValidatedAt)
|
|
30
|
+
return true;
|
|
31
|
+
const ageMs = Date.now() - this.lastValidatedAt.getTime();
|
|
32
|
+
const maxAgeMs = maxAgeDays * 24 * 60 * 60 * 1000;
|
|
33
|
+
return ageMs > maxAgeMs;
|
|
34
|
+
}
|
|
35
|
+
markAsValid() {
|
|
36
|
+
this.lastValidatedAt = new Date();
|
|
37
|
+
this.metadata = {
|
|
38
|
+
...this.metadata,
|
|
39
|
+
validationStatus: 'valid',
|
|
40
|
+
lastError: undefined,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
markAsInvalid(error) {
|
|
44
|
+
this.lastValidatedAt = new Date();
|
|
45
|
+
this.metadata = {
|
|
46
|
+
...this.metadata,
|
|
47
|
+
validationStatus: 'invalid',
|
|
48
|
+
lastError: error,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
incrementUsageCount() {
|
|
52
|
+
this.metadata = {
|
|
53
|
+
...this.metadata,
|
|
54
|
+
validationStatus: this.metadata?.validationStatus || 'pending',
|
|
55
|
+
usageCount: (this.metadata?.usageCount || 0) + 1,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.UserIntegrationCredential = UserIntegrationCredential;
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], UserIntegrationCredential.prototype, "id", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ name: 'tenant_id', length: 50, default: 'sp3', nullable: true }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], UserIntegrationCredential.prototype, "tenantId", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ name: 'user_id', type: 'uuid' }),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], UserIntegrationCredential.prototype, "userId", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: true }),
|
|
74
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
75
|
+
__metadata("design:type", user_entity_1.User)
|
|
76
|
+
], UserIntegrationCredential.prototype, "user", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ name: 'integration_type', type: 'varchar', length: 50 }),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], UserIntegrationCredential.prototype, "integrationType", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({ name: 'encrypted_credentials', type: 'text' }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], UserIntegrationCredential.prototype, "encryptedCredentials", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({ name: 'credential_hash', type: 'varchar', length: 64 }),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], UserIntegrationCredential.prototype, "credentialHash", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({ name: 'session_pool_id', type: 'uuid', nullable: true }),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], UserIntegrationCredential.prototype, "sessionPoolId", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.ManyToOne)(() => romeo_session_pool_entity_1.RomeoSessionPool, { nullable: true }),
|
|
95
|
+
(0, typeorm_1.JoinColumn)({ name: 'session_pool_id' }),
|
|
96
|
+
__metadata("design:type", romeo_session_pool_entity_1.RomeoSessionPool)
|
|
97
|
+
], UserIntegrationCredential.prototype, "sessionPool", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, typeorm_1.Column)({ name: 'is_active', type: 'boolean', default: true }),
|
|
100
|
+
__metadata("design:type", Boolean)
|
|
101
|
+
], UserIntegrationCredential.prototype, "isActive", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, typeorm_1.Column)({ name: 'last_validated_at', type: 'timestamp', nullable: true }),
|
|
104
|
+
__metadata("design:type", Date)
|
|
105
|
+
], UserIntegrationCredential.prototype, "lastValidatedAt", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.Column)({ name: 'metadata', type: 'jsonb', nullable: true }),
|
|
108
|
+
__metadata("design:type", Object)
|
|
109
|
+
], UserIntegrationCredential.prototype, "metadata", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
112
|
+
__metadata("design:type", Date)
|
|
113
|
+
], UserIntegrationCredential.prototype, "createdAt", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
116
|
+
__metadata("design:type", Date)
|
|
117
|
+
], UserIntegrationCredential.prototype, "updatedAt", void 0);
|
|
118
|
+
exports.UserIntegrationCredential = UserIntegrationCredential = __decorate([
|
|
119
|
+
(0, typeorm_1.Entity)({ name: 'user_integration_credentials' }),
|
|
120
|
+
(0, typeorm_1.Index)('user_integration_cred_user_type_idx', ['userId', 'integrationType'], { unique: true }),
|
|
121
|
+
(0, typeorm_1.Index)('user_integration_cred_tenant_idx', ['tenantId']),
|
|
122
|
+
(0, typeorm_1.Index)('user_integration_cred_hash_idx', ['credentialHash']),
|
|
123
|
+
(0, typeorm_1.Index)('user_integration_cred_pool_idx', ['sessionPoolId'])
|
|
124
|
+
], UserIntegrationCredential);
|
|
125
|
+
//# sourceMappingURL=user-integration-credential.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-integration-credential.entity.js","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8BAC1B,4CAAgB;8DAAC;AAM/B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2DAC3C;AAMnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACvD,IAAI;kEAAC;AAMvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DAC9B;AAG9B;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC7B,IAAI;4DAAC;AAGjB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC7B,IAAI;4DAAC;oCAtEN,yBAAyB;IALrC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,8BAA8B,EAAE,CAAC;IAChD,IAAA,eAAK,EAAC,qCAAqC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC7F,IAAA,eAAK,EAAC,kCAAkC,EAAE,CAAC,UAAU,CAAC,CAAC;IACvD,IAAA,eAAK,EAAC,gCAAgC,EAAE,CAAC,gBAAgB,CAAC,CAAC;IAC3D,IAAA,eAAK,EAAC,gCAAgC,EAAE,CAAC,eAAe,CAAC,CAAC;GAC9C,yBAAyB,CA8GrC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigmatech/pergamo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
4
4
|
"description": "Shared TypeORM entities and utilities for Dataven intelligence system - Named after the ancient library of Pergamon",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|