@sigmatech/pergamo 0.1.71 → 0.1.74

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.
Files changed (34) hide show
  1. package/contracts/ubicar/README.md +8 -0
  2. package/contracts/ubicar/v1/command.location.requested.schema.json +14 -0
  3. package/contracts/ubicar/v1/command.subscriber.requested.schema.json +14 -0
  4. package/contracts/ubicar/v1/event-envelope.schema.json +32 -0
  5. package/contracts/ubicar/v1/parse.location.completed.schema.json +17 -0
  6. package/contracts/ubicar/v1/request.final.schema.json +16 -0
  7. package/contracts/ubicar/v1/request.state.changed.schema.json +14 -0
  8. package/contracts/ubicar/v1/sms.dispatch.requested.schema.json +18 -0
  9. package/contracts/ubicar/v1/sms.received.raw.schema.json +14 -0
  10. package/dist/contracts/index.d.ts +2 -0
  11. package/dist/contracts/index.d.ts.map +1 -0
  12. package/dist/contracts/index.js +18 -0
  13. package/dist/contracts/index.js.map +1 -0
  14. package/dist/contracts/ubicar.d.ts +4 -0
  15. package/dist/contracts/ubicar.d.ts.map +1 -0
  16. package/dist/contracts/ubicar.js +15 -0
  17. package/dist/contracts/ubicar.js.map +1 -0
  18. package/dist/entities/index.d.ts +1 -0
  19. package/dist/entities/index.d.ts.map +1 -1
  20. package/dist/entities/index.js +2 -0
  21. package/dist/entities/index.js.map +1 -1
  22. package/dist/entities/tenant/index.d.ts +2 -0
  23. package/dist/entities/tenant/index.d.ts.map +1 -0
  24. package/dist/entities/tenant/index.js +18 -0
  25. package/dist/entities/tenant/index.js.map +1 -0
  26. package/dist/entities/tenant/tenant.entity.d.ts +59 -0
  27. package/dist/entities/tenant/tenant.entity.d.ts.map +1 -0
  28. package/dist/entities/tenant/tenant.entity.js +72 -0
  29. package/dist/entities/tenant/tenant.entity.js.map +1 -0
  30. package/dist/index.d.ts +1 -0
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +2 -0
  33. package/dist/index.js.map +1 -1
  34. package/package.json +3 -2
@@ -0,0 +1,8 @@
1
+ # UBICAR Contracts (Canonical)
2
+
3
+ Ubicacion canonica de contratos JSON Schema para UBICAR v2.
4
+
5
+ Ruta vigente:
6
+ - `/Users/soyrocatech/Proyectos/SP3/repos/dataven-full-context-latest/pergamo/contracts/ubicar/v1`
7
+
8
+ Estos contratos reemplazan copias locales en microservicios UBICAR.
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ubicar/contracts/v1/command.location.requested.schema.json",
4
+ "title": "command.location.requested payload",
5
+ "type": "object",
6
+ "required": ["phoneNumber", "userId", "priority"],
7
+ "properties": {
8
+ "phoneNumber": { "type": "string", "pattern": "^\\+?58?4\\d{9}$" },
9
+ "userId": { "type": "string", "minLength": 1 },
10
+ "priority": { "type": "integer", "minimum": 1, "maximum": 5 },
11
+ "metadata": { "type": "object" }
12
+ },
13
+ "additionalProperties": true
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ubicar/contracts/v1/command.subscriber.requested.schema.json",
4
+ "title": "command.subscriber.requested payload",
5
+ "type": "object",
6
+ "required": ["phoneNumber", "userId"],
7
+ "properties": {
8
+ "phoneNumber": { "type": "string", "pattern": "^\\+?58?4\\d{9}$" },
9
+ "userId": { "type": "string", "minLength": 1 },
10
+ "priority": { "type": "integer", "minimum": 1, "maximum": 5 },
11
+ "metadata": { "type": "object" }
12
+ },
13
+ "additionalProperties": true
14
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ubicar/contracts/v1/event-envelope.schema.json",
4
+ "title": "Ubicar Event Envelope v1",
5
+ "type": "object",
6
+ "required": [
7
+ "eventId",
8
+ "eventType",
9
+ "eventVersion",
10
+ "occurredAt",
11
+ "correlationId",
12
+ "causationId",
13
+ "requestId",
14
+ "tenant",
15
+ "carrier",
16
+ "payload"
17
+ ],
18
+ "properties": {
19
+ "eventId": { "type": "string", "minLength": 1 },
20
+ "eventType": { "type": "string", "minLength": 1 },
21
+ "eventVersion": { "type": "string", "const": "v1" },
22
+ "occurredAt": { "type": "string", "format": "date-time" },
23
+ "correlationId": { "type": "string", "minLength": 1 },
24
+ "causationId": { "type": "string", "minLength": 1 },
25
+ "requestId": { "type": "string", "minLength": 1 },
26
+ "tenant": { "type": "string", "minLength": 1 },
27
+ "carrier": { "type": "string", "enum": ["digitel", "movistar"] },
28
+ "deviceId": { "type": "string" },
29
+ "payload": { "type": "object" }
30
+ },
31
+ "additionalProperties": false
32
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ubicar/contracts/v1/parse.location.completed.schema.json",
4
+ "title": "parse.location.completed payload",
5
+ "type": "object",
6
+ "required": ["phoneNumber", "responseType", "rawMessage"],
7
+ "properties": {
8
+ "phoneNumber": { "type": "string", "pattern": "^58?4\\d{9}$" },
9
+ "responseType": { "type": "string", "enum": ["complete", "partial", "not_found", "error"] },
10
+ "latitude": { "type": ["number", "string"] },
11
+ "longitude": { "type": ["number", "string"] },
12
+ "latitudeDMS": { "type": "string" },
13
+ "longitudeDMS": { "type": "string" },
14
+ "rawMessage": { "type": "string" }
15
+ },
16
+ "additionalProperties": true
17
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ubicar/contracts/v1/request.final.schema.json",
4
+ "title": "request.completed/request.failed payload",
5
+ "type": "object",
6
+ "required": ["finalStatus", "requestKind", "phoneNumber"],
7
+ "properties": {
8
+ "finalStatus": { "type": "string", "enum": ["completed", "partial", "not_found", "failed", "error"] },
9
+ "durationMs": { "type": "integer", "minimum": 0 },
10
+ "errorCode": { "type": "string" },
11
+ "errorMessage": { "type": "string" },
12
+ "requestKind": { "type": "string", "enum": ["location", "subscriber"] },
13
+ "phoneNumber": { "type": "string", "pattern": "^4\\d{9}$" }
14
+ },
15
+ "additionalProperties": true
16
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ubicar/contracts/v1/request.state.changed.schema.json",
4
+ "title": "request.state.changed payload",
5
+ "type": "object",
6
+ "required": ["status", "phoneNumber", "requestKind"],
7
+ "properties": {
8
+ "status": { "type": "string", "enum": ["dispatched", "sent", "waiting", "completed", "failed"] },
9
+ "sourceEvent": { "type": "string" },
10
+ "phoneNumber": { "type": "string", "pattern": "^4\\d{9}$" },
11
+ "requestKind": { "type": "string", "enum": ["location", "subscriber"] }
12
+ },
13
+ "additionalProperties": true
14
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ubicar/contracts/v1/sms.dispatch.requested.schema.json",
4
+ "title": "sms.dispatch.requested payload",
5
+ "type": "object",
6
+ "required": ["destination", "text", "phoneNumber", "attempt", "maxAttempts", "sourceEvent", "requestKind"],
7
+ "properties": {
8
+ "destination": { "type": "string", "minLength": 1 },
9
+ "text": { "type": "string", "minLength": 1 },
10
+ "phoneNumber": { "type": "string", "pattern": "^4\\d{9}$" },
11
+ "attempt": { "type": "integer", "minimum": 1 },
12
+ "maxAttempts": { "type": "integer", "minimum": 1 },
13
+ "timeoutMs": { "type": "integer", "minimum": 1 },
14
+ "sourceEvent": { "type": "string" },
15
+ "requestKind": { "type": "string", "enum": ["location", "subscriber"] }
16
+ },
17
+ "additionalProperties": true
18
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ubicar/contracts/v1/sms.received.raw.schema.json",
4
+ "title": "sms.received.raw payload",
5
+ "type": "object",
6
+ "required": ["senderNumber", "textDecoded"],
7
+ "properties": {
8
+ "senderNumber": { "type": "string", "minLength": 1 },
9
+ "textDecoded": { "type": "string", "minLength": 1 },
10
+ "udh": { "type": "string" },
11
+ "providerMessageId": { "type": "string" }
12
+ },
13
+ "additionalProperties": true
14
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./ubicar";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,18 @@
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("./ubicar"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
@@ -0,0 +1,4 @@
1
+ export declare const UBICAR_CONTRACTS_BASE_PATH = "contracts/ubicar/v1";
2
+ export declare const UBICAR_CONTRACT_FILES: readonly ["event-envelope.schema.json", "command.location.requested.schema.json", "command.subscriber.requested.schema.json", "sms.dispatch.requested.schema.json", "sms.received.raw.schema.json", "parse.location.completed.schema.json", "request.state.changed.schema.json", "request.final.schema.json"];
3
+ export type UbicarContractFile = (typeof UBICAR_CONTRACT_FILES)[number];
4
+ //# sourceMappingURL=ubicar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ubicar.d.ts","sourceRoot":"","sources":["../../src/contracts/ubicar.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,wBAAwB,CAAC;AAEhE,eAAO,MAAM,qBAAqB,+SASxB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UBICAR_CONTRACT_FILES = exports.UBICAR_CONTRACTS_BASE_PATH = void 0;
4
+ exports.UBICAR_CONTRACTS_BASE_PATH = "contracts/ubicar/v1";
5
+ exports.UBICAR_CONTRACT_FILES = [
6
+ "event-envelope.schema.json",
7
+ "command.location.requested.schema.json",
8
+ "command.subscriber.requested.schema.json",
9
+ "sms.dispatch.requested.schema.json",
10
+ "sms.received.raw.schema.json",
11
+ "parse.location.completed.schema.json",
12
+ "request.state.changed.schema.json",
13
+ "request.final.schema.json",
14
+ ];
15
+ //# sourceMappingURL=ubicar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ubicar.js","sourceRoot":"","sources":["../../src/contracts/ubicar.ts"],"names":[],"mappings":";;;AAAa,QAAA,0BAA0B,GAAG,qBAAqB,CAAC;AAEnD,QAAA,qBAAqB,GAAG;IACnC,4BAA4B;IAC5B,wCAAwC;IACxC,0CAA0C;IAC1C,oCAAoC;IACpC,8BAA8B;IAC9B,sCAAsC;IACtC,mCAAmC;IACnC,2BAA2B;CACnB,CAAC"}
@@ -87,4 +87,5 @@ export * from "./graph";
87
87
  export * from "./integrations";
88
88
  export * from "./osint";
89
89
  export * from "./cdr";
90
+ export * from "./tenant";
90
91
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,cAAc,CAAC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C;AAClD,cAAc,2BAA2B,CAAC;AAG1C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6BAA6B,CAAC;AAG5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAG3C,cAAc,qCAAqC,CAAC;AAGpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAGlD,cAAc,yCAAyC,CAAC;AAGxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+CAA+C,CAAC;AAG9D,cAAc,oCAAoC,CAAC;AACnD,cAAc,2CAA2C,CAAC;AAG1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AAGvD,cAAc,eAAe,CAAC;AAG9B,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;AAG/B,cAAc,SAAS,CAAC;AAGxB,cAAc,OAAO,CAAC;AAGtB,cAAc,UAAU,CAAC"}
@@ -135,4 +135,6 @@ __exportStar(require("./integrations"), exports);
135
135
  __exportStar(require("./osint"), exports);
136
136
  // CDR module
137
137
  __exportStar(require("./cdr"), exports);
138
+ // Tenant module (Multi-tenant configuration)
139
+ __exportStar(require("./tenant"), exports);
138
140
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names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;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;AAExB,+DAA+D;AAC/D,iDAA+B;AAE/B,eAAe;AACf,0CAAwB;AAExB,aAAa;AACb,wCAAsB"}
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;AACvD,gEAA8C;AAE9C,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;AAExB,+DAA+D;AAC/D,iDAA+B;AAE/B,eAAe;AACf,0CAAwB;AAExB,aAAa;AACb,wCAAsB;AAEtB,6CAA6C;AAC7C,2CAAyB"}
@@ -0,0 +1,2 @@
1
+ export * from './tenant.entity';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entities/tenant/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,18 @@
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("./tenant.entity"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/tenant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
@@ -0,0 +1,59 @@
1
+ import { BaseEntity } from 'typeorm';
2
+ /**
3
+ * Keycloak authentication configuration
4
+ */
5
+ export interface TenantKeycloakConfig {
6
+ authServerUrl: string;
7
+ realm: string;
8
+ clientId: string;
9
+ secret: string;
10
+ cookieKey: string;
11
+ }
12
+ /**
13
+ * Database isolation configuration (optional)
14
+ */
15
+ export interface TenantDatabaseConfig {
16
+ schema?: string;
17
+ prefix?: string;
18
+ }
19
+ /**
20
+ * UBICAR SMS gateway configuration (optional)
21
+ */
22
+ export interface TenantUbicadorConfig {
23
+ baseUrl: string;
24
+ port: number;
25
+ }
26
+ /**
27
+ * Tenant - Multi-tenant configuration entity
28
+ *
29
+ * Single table storing all tenant configuration as JSON columns.
30
+ * Optimized for fast reads on every request.
31
+ *
32
+ * - id: UUID primary key
33
+ * - name: Unique tenant key (e.g., 'sp3', 'argos') used in X-Tenant-Id header
34
+ * - displayName: Human-readable name
35
+ * - description: Optional description
36
+ */
37
+ export declare class Tenant extends BaseEntity {
38
+ id: string;
39
+ /**
40
+ * Unique tenant key used for routing (X-Tenant-Id header, subdomain, path)
41
+ * Examples: 'sp3', 'argos'
42
+ */
43
+ name: string;
44
+ /**
45
+ * Human-readable display name
46
+ */
47
+ displayName: string;
48
+ /**
49
+ * Optional description of the tenant
50
+ */
51
+ description?: string;
52
+ isActive: boolean;
53
+ keycloak: TenantKeycloakConfig;
54
+ database?: TenantDatabaseConfig;
55
+ ubicadorGateway?: TenantUbicadorConfig;
56
+ createdAt: Date;
57
+ updatedAt: Date;
58
+ }
59
+ //# sourceMappingURL=tenant.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/tenant/tenant.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,UAAU,EAEX,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;GAUG;AACH,qBACa,MAAO,SAAQ,UAAU;IAEpC,EAAE,EAAG,MAAM,CAAC;IAEZ;;;OAGG;IAGH,IAAI,EAAG,MAAM,CAAC;IAEd;;OAEG;IAEH,WAAW,EAAG,MAAM,CAAC;IAErB;;OAEG;IAEH,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,QAAQ,EAAG,OAAO,CAAC;IAGnB,QAAQ,EAAG,oBAAoB,CAAC;IAGhC,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAGhC,eAAe,CAAC,EAAE,oBAAoB,CAAC;IAGvC,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -0,0 +1,72 @@
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.Tenant = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ /**
15
+ * Tenant - Multi-tenant configuration entity
16
+ *
17
+ * Single table storing all tenant configuration as JSON columns.
18
+ * Optimized for fast reads on every request.
19
+ *
20
+ * - id: UUID primary key
21
+ * - name: Unique tenant key (e.g., 'sp3', 'argos') used in X-Tenant-Id header
22
+ * - displayName: Human-readable name
23
+ * - description: Optional description
24
+ */
25
+ let Tenant = class Tenant extends typeorm_1.BaseEntity {
26
+ };
27
+ exports.Tenant = Tenant;
28
+ __decorate([
29
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
30
+ __metadata("design:type", String)
31
+ ], Tenant.prototype, "id", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, unique: true }),
34
+ (0, typeorm_1.Index)({ unique: true }),
35
+ __metadata("design:type", String)
36
+ ], Tenant.prototype, "name", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ name: 'display_name', type: 'varchar', length: 100 }),
39
+ __metadata("design:type", String)
40
+ ], Tenant.prototype, "displayName", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
43
+ __metadata("design:type", String)
44
+ ], Tenant.prototype, "description", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ name: 'is_active', type: 'boolean', default: true }),
47
+ __metadata("design:type", Boolean)
48
+ ], Tenant.prototype, "isActive", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'jsonb' }),
51
+ __metadata("design:type", Object)
52
+ ], Tenant.prototype, "keycloak", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], Tenant.prototype, "database", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ name: 'ubicador_gateway', type: 'jsonb', nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], Tenant.prototype, "ubicadorGateway", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
63
+ __metadata("design:type", Date)
64
+ ], Tenant.prototype, "createdAt", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
67
+ __metadata("design:type", Date)
68
+ ], Tenant.prototype, "updatedAt", void 0);
69
+ exports.Tenant = Tenant = __decorate([
70
+ (0, typeorm_1.Entity)('tenants')
71
+ ], Tenant);
72
+ //# sourceMappingURL=tenant.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant.entity.js","sourceRoot":"","sources":["../../../src/entities/tenant/tenant.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAQiB;AA6BjB;;;;;;;;;;GAUG;AA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ts CHANGED
@@ -12,4 +12,5 @@
12
12
  export * from './entities';
13
13
  export * from './enums';
14
14
  export * from './types';
15
+ export * from './contracts';
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,cAAc,YAAY,CAAC;AAG3B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,cAAc,YAAY,CAAC;AAG3B,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -31,4 +31,6 @@ __exportStar(require("./entities"), exports);
31
31
  __exportStar(require("./enums"), exports);
32
32
  // Export types
33
33
  __exportStar(require("./types"), exports);
34
+ // Export contracts metadata
35
+ __exportStar(require("./contracts"), exports);
34
36
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;AAEH,sBAAsB;AACtB,6CAA2B;AAE3B,eAAe;AACf,0CAAwB;AAExB,eAAe;AACf,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;AAEH,sBAAsB;AACtB,6CAA2B;AAE3B,eAAe;AACf,0CAAwB;AAExB,eAAe;AACf,0CAAwB;AAExB,4BAA4B;AAC5B,8CAA4B"}
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@sigmatech/pergamo",
3
- "version": "0.1.71",
3
+ "version": "0.1.74",
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",
7
7
  "files": [
8
- "dist"
8
+ "dist",
9
+ "contracts"
9
10
  ],
10
11
  "scripts": {
11
12
  "build": "rm -rf dist && tsc -p tsconfig.build.json",