Spaces:
Runtime error
Runtime error
| import { Column, CreateDateColumn, Entity, Index, PrimaryColumn, UpdateDateColumn } from 'typeorm'; | |
| import { jsonColumnType } from '../../../common/utils/column-types'; | |
| // One configured instance of an adapter plugin (e.g. one Chatwoot account). instanceId is namespaced | |
| // under pluginId; NOT a separate worker. Secret is host-minted and masked-on-read. | |
| ('plugin_instances') | |
| ('UQ_plugin_instances_plugin_instance', ['pluginId', 'instanceId'], { unique: true }) | |
| export class PluginInstance { | |
| () | |
| id: string; // `${pluginId}:${instanceId}` | |
| () | |
| pluginId: string; | |
| () | |
| instanceId: string; | |
| ({ type: 'varchar', nullable: true }) | |
| sessionScope: string | null; // resolved session id this instance acts on; null = inherit manifest.sessions | |
| () | |
| secret: string; // host-minted ingress HMAC secret; stored plaintext, masked to '***' on API reads | |
| // (via PluginInstanceService.maskedView + the provisioning controller's reveal flag), exposed | |
| // in full only on mint and regenerate-secret. Note: instance `config` is NOT secret-redacted. | |
| ({ type: 'varchar', nullable: true }) | |
| verifyToken: string | null; // optional provider challenge token | |
| ({ type: jsonColumnType(), nullable: true }) | |
| config: Record<string, unknown> | null; | |
| ({ default: true }) | |
| enabled: boolean; | |
| () | |
| createdAt: Date; | |
| () | |
| updatedAt: Date; | |
| } | |