@sigmatech/pergamo 0.1.73 → 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.
@@ -28,10 +28,27 @@ export interface TenantUbicadorConfig {
28
28
  *
29
29
  * Single table storing all tenant configuration as JSON columns.
30
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
31
36
  */
32
37
  export declare class Tenant extends BaseEntity {
33
38
  id: string;
39
+ /**
40
+ * Unique tenant key used for routing (X-Tenant-Id header, subdomain, path)
41
+ * Examples: 'sp3', 'argos'
42
+ */
34
43
  name: string;
44
+ /**
45
+ * Human-readable display name
46
+ */
47
+ displayName: string;
48
+ /**
49
+ * Optional description of the tenant
50
+ */
51
+ description?: string;
35
52
  isActive: boolean;
36
53
  keycloak: TenantKeycloakConfig;
37
54
  database?: TenantDatabaseConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"tenant.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/tenant/tenant.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,UAAU,EACX,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;;;;;GAKG;AACH,qBACa,MAAO,SAAQ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AAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -16,18 +16,32 @@ const typeorm_1 = require("typeorm");
16
16
  *
17
17
  * Single table storing all tenant configuration as JSON columns.
18
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
19
24
  */
20
25
  let Tenant = class Tenant extends typeorm_1.BaseEntity {
21
26
  };
22
27
  exports.Tenant = Tenant;
23
28
  __decorate([
24
- (0, typeorm_1.PrimaryColumn)({ type: 'varchar', length: 50 }),
29
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
25
30
  __metadata("design:type", String)
26
31
  ], Tenant.prototype, "id", void 0);
27
32
  __decorate([
28
- (0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
33
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, unique: true }),
34
+ (0, typeorm_1.Index)({ unique: true }),
29
35
  __metadata("design:type", String)
30
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);
31
45
  __decorate([
32
46
  (0, typeorm_1.Column)({ name: 'is_active', type: 'boolean', default: true }),
33
47
  __metadata("design:type", Boolean)
@@ -1 +1 @@
1
- {"version":3,"file":"tenant.entity.js","sourceRoot":"","sources":["../../../src/entities/tenant/tenant.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAOiB;AA6BjB;;;;;GAKG;AAEI,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,oBAAU;CAwBrC,CAAA;AAxBY,wBAAM;AAEjB;IADC,IAAA,uBAAa,EAAC,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CAAC;IACrD,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;oCACV;AAMd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;2CAC1C;AAMrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACpB;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;wCAC3C;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;wCACM;AAGhC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACV;AAGhC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CAC7B;AAGvC;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC7B,IAAI;yCAAC;AAGjB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC7B,IAAI;yCAAC;iBAxCN,MAAM;IADlB,IAAA,gBAAM,EAAC,SAAS,CAAC;GACL,MAAM,CAyClB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigmatech/pergamo",
3
- "version": "0.1.73",
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",