@highstate/backend 0.9.18 → 0.9.20
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/{chunk-OU5OQBLB.js → chunk-I7BWSAN6.js} +3 -28
- package/dist/{chunk-OU5OQBLB.js.map → chunk-I7BWSAN6.js.map} +1 -1
- package/dist/chunk-RC6Q3XQQ.js +1547 -0
- package/dist/chunk-RC6Q3XQQ.js.map +1 -0
- package/dist/chunk-VB4YL327.js +139 -0
- package/dist/chunk-VB4YL327.js.map +1 -0
- package/dist/database/local/prisma.config.js +26 -0
- package/dist/database/local/prisma.config.js.map +1 -0
- package/dist/highstate.manifest.json +2 -1
- package/dist/index.js +7590 -7289
- package/dist/index.js.map +1 -1
- package/dist/library/package-resolution-worker.js +1 -1
- package/dist/library/package-resolution-worker.js.map +1 -1
- package/dist/library/worker/main.js +35 -29
- package/dist/library/worker/main.js.map +1 -1
- package/dist/shared/index.js +2 -2
- package/package.json +18 -9
- package/prisma/backend/_schema/layout.prisma +7 -0
- package/prisma/backend/_schema/library.prisma +17 -0
- package/prisma/backend/_schema/project.prisma +101 -0
- package/prisma/backend/_schema/pulumi.prisma +17 -0
- package/prisma/backend/postgresql/main.prisma +17 -0
- package/prisma/backend/sqlite/main.prisma +17 -0
- package/prisma/backend/sqlite/migrations/20250817070609_initiial/migration.sql +34 -0
- package/prisma/backend/sqlite/migrations/20250817104948_add_fields/migration.sql +59 -0
- package/prisma/backend/sqlite/migrations/20250818082732_add_models/migration.sql +41 -0
- package/prisma/backend/sqlite/migrations/20250818083106_a/migration.sql +19 -0
- package/prisma/backend/sqlite/migrations/20250818101945_hi/migration.sql +1 -0
- package/prisma/backend/sqlite/migrations/20250819082315_a/migration.sql +5 -0
- package/prisma/backend/sqlite/migrations/migration_lock.toml +3 -0
- package/prisma/project/api-key.prisma +32 -0
- package/prisma/project/artifact.prisma +52 -0
- package/prisma/project/custom-status.prisma +46 -0
- package/prisma/project/evaluation.prisma +45 -0
- package/prisma/project/instance.prisma +157 -0
- package/prisma/project/layout.prisma +23 -0
- package/prisma/project/lock.prisma +18 -0
- package/prisma/project/main.prisma +17 -0
- package/prisma/project/migrations/20250816081310_initial/migration.sql +300 -0
- package/prisma/project/migrations/20250816082523_test/migration.sql +72 -0
- package/prisma/project/migrations/20250818065643_update/migration.sql +42 -0
- package/prisma/project/migrations/20250818070758_a/migration.sql +8 -0
- package/prisma/project/migrations/20250818070913_a/migration.sql +8 -0
- package/prisma/project/migrations/20250818082720_add_motels/migration.sql +11 -0
- package/prisma/project/migrations/20250818112523_hello/migration.sql +35 -0
- package/prisma/project/migrations/20250819082305_a/migration.sql +14 -0
- package/prisma/project/migrations/20250819165004_add_missing_fields/migration.sql +216 -0
- package/prisma/project/migrations/20250819171309_a/migration.sql +22 -0
- package/prisma/project/migrations/20250820113949_a/migration.sql +66 -0
- package/prisma/project/migrations/20250820144256_b/migration.sql +31 -0
- package/prisma/project/migrations/20250820145547_a/migration.sql +24 -0
- package/prisma/project/migrations/20250820182517_b/migration.sql +2 -0
- package/prisma/project/migrations/20250821172324_a/migration.sql +2 -0
- package/prisma/project/migrations/20250822081339_a/migration.sql +219 -0
- package/prisma/project/migrations/20250822083742_b/migration.sql +1 -0
- package/prisma/project/migrations/20250822105134_boom/migration.sql +1 -0
- package/prisma/project/migrations/20250822141028_b/migration.sql +1 -0
- package/prisma/project/migrations/20250822142342_b/migration.sql +16 -0
- package/prisma/project/migrations/20250824072720_a/migration.sql +1 -0
- package/prisma/project/migrations/20250824093656_b/migration.sql +21 -0
- package/prisma/project/migrations/20250825082518_a/migration.sql +1 -0
- package/prisma/project/migrations/20250825085343_b/migration.sql +1 -0
- package/prisma/project/migrations/20250825091312_a/migration.sql +1 -0
- package/prisma/project/migrations/20250903095431_hi/migration.sql +44 -0
- package/prisma/project/migrations/20250903174255_a/migration.sql +24 -0
- package/prisma/project/migrations/20250908095205_hi/migration.sql +18 -0
- package/prisma/project/migrations/20250909155857_hi/migration.sql +15 -0
- package/prisma/project/migrations/migration_lock.toml +3 -0
- package/prisma/project/model.prisma +37 -0
- package/prisma/project/operation.prisma +148 -0
- package/prisma/project/page.prisma +49 -0
- package/prisma/project/secret.prisma +54 -0
- package/prisma/project/service-account.prisma +42 -0
- package/prisma/project/terminal.prisma +107 -0
- package/prisma/project/trigger.prisma +37 -0
- package/prisma/project/unlock-method.prisma +46 -0
- package/prisma/project/worker.prisma +169 -0
- package/src/artifact/abstractions.ts +13 -13
- package/src/artifact/encryption.ts +30 -54
- package/src/artifact/factory.ts +6 -9
- package/src/artifact/local.ts +33 -46
- package/src/business/api-key.ts +24 -36
- package/src/business/artifact.test.ts +978 -0
- package/src/business/artifact.ts +136 -216
- package/src/business/evaluation.ts +328 -0
- package/src/business/index.ts +5 -2
- package/src/business/instance-lock.test.ts +1060 -0
- package/src/business/instance-lock.ts +387 -78
- package/src/business/instance-state.test.ts +735 -0
- package/src/business/instance-state.ts +582 -337
- package/src/business/operation.test.ts +439 -0
- package/src/business/operation.ts +174 -208
- package/src/business/project-model.ts +258 -0
- package/src/business/project-unlock.ts +168 -126
- package/src/business/project.ts +287 -179
- package/src/business/secret.test.ts +469 -130
- package/src/business/secret.ts +177 -217
- package/src/business/settings.test.ts +695 -0
- package/src/business/settings.ts +855 -0
- package/src/business/terminal-session.ts +90 -0
- package/src/business/unit-extra.test.ts +539 -0
- package/src/business/unit-extra.ts +160 -0
- package/src/business/worker.test.ts +356 -579
- package/src/business/worker.ts +238 -339
- package/src/common/codebase.ts +65 -0
- package/src/common/index.ts +3 -5
- package/src/common/logger.ts +5 -0
- package/src/common/utils.ts +4 -3
- package/src/config.ts +10 -11
- package/src/database/_generated/backend/postgresql/client.ts +72 -0
- package/src/database/_generated/backend/postgresql/commonInputTypes.ts +350 -0
- package/src/database/_generated/backend/postgresql/enums.ts +13 -0
- package/src/database/_generated/backend/postgresql/internal/class.ts +320 -0
- package/src/database/_generated/backend/postgresql/internal/prismaNamespace.ts +1238 -0
- package/src/database/_generated/backend/postgresql/models/Library.ts +1263 -0
- package/src/database/_generated/backend/postgresql/models/Project.ts +2175 -0
- package/src/database/_generated/backend/postgresql/models/ProjectModelStorage.ts +1263 -0
- package/src/database/_generated/backend/postgresql/models/ProjectSpace.ts +1602 -0
- package/src/database/_generated/backend/postgresql/models/PulumiBackend.ts +1263 -0
- package/src/database/_generated/backend/postgresql/models/UserWorkspaseLayout.ts +1065 -0
- package/src/database/_generated/backend/postgresql/models.ts +16 -0
- package/src/database/_generated/backend/postgresql/pjtg.ts +182 -0
- package/src/database/_generated/backend/sqlite/client.ts +72 -0
- package/src/database/_generated/backend/sqlite/commonInputTypes.ts +331 -0
- package/src/database/_generated/backend/sqlite/enums.ts +13 -0
- package/src/database/_generated/backend/sqlite/internal/class.ts +318 -0
- package/src/database/_generated/backend/sqlite/internal/prismaNamespace.ts +1207 -0
- package/src/database/_generated/backend/sqlite/models/Library.ts +1261 -0
- package/src/database/_generated/backend/sqlite/models/Project.ts +2169 -0
- package/src/database/_generated/backend/sqlite/models/ProjectModelStorage.ts +1261 -0
- package/src/database/_generated/backend/sqlite/models/ProjectSpace.ts +1599 -0
- package/src/database/_generated/backend/sqlite/models/PulumiBackend.ts +1261 -0
- package/src/database/_generated/backend/sqlite/models/UserWorkspaseLayout.ts +1063 -0
- package/src/database/_generated/backend/sqlite/models.ts +16 -0
- package/src/database/_generated/backend/sqlite/pjtg.ts +182 -0
- package/src/database/_generated/project/client.ts +204 -0
- package/src/database/_generated/project/commonInputTypes.ts +827 -0
- package/src/database/_generated/project/enums.ts +104 -0
- package/src/database/_generated/project/internal/class.ts +479 -0
- package/src/database/_generated/project/internal/prismaNamespace.ts +2974 -0
- package/src/database/_generated/project/models/ApiKey.ts +1506 -0
- package/src/database/_generated/project/models/Artifact.ts +2051 -0
- package/src/database/_generated/project/models/HubModel.ts +1125 -0
- package/src/database/_generated/project/models/InstanceCustomStatus.ts +1713 -0
- package/src/database/_generated/project/models/InstanceEvaluationState.ts +1312 -0
- package/src/database/_generated/project/models/InstanceLock.ts +1268 -0
- package/src/database/_generated/project/models/InstanceModel.ts +1125 -0
- package/src/database/_generated/project/models/InstanceOperationState.ts +1707 -0
- package/src/database/_generated/project/models/InstanceState.ts +4613 -0
- package/src/database/_generated/project/models/Operation.ts +1647 -0
- package/src/database/_generated/project/models/OperationLog.ts +1455 -0
- package/src/database/_generated/project/models/Page.ts +1838 -0
- package/src/database/_generated/project/models/Secret.ts +1692 -0
- package/src/database/_generated/project/models/ServiceAccount.ts +2165 -0
- package/src/database/_generated/project/models/Terminal.ts +2038 -0
- package/src/database/_generated/project/models/TerminalSession.ts +1454 -0
- package/src/database/_generated/project/models/TerminalSessionLog.ts +1280 -0
- package/src/database/_generated/project/models/Trigger.ts +1430 -0
- package/src/database/_generated/project/models/UnlockMethod.ts +1220 -0
- package/src/database/_generated/project/models/UserCompositeViewport.ts +1280 -0
- package/src/database/_generated/project/models/UserProjectViewport.ts +1059 -0
- package/src/database/_generated/project/models/Worker.ts +1459 -0
- package/src/database/_generated/project/models/WorkerUnitRegistration.ts +1524 -0
- package/src/database/_generated/project/models/WorkerVersion.ts +1974 -0
- package/src/database/_generated/project/models/WorkerVersionLog.ts +1318 -0
- package/src/database/_generated/project/models.ts +35 -0
- package/src/database/_generated/project/pjtg.ts +182 -0
- package/src/database/abstractions.ts +19 -0
- package/src/database/factory.ts +37 -0
- package/src/database/index.ts +6 -0
- package/src/database/local/backend.ts +134 -0
- package/src/database/local/index.ts +3 -0
- package/src/database/local/meta.ts +46 -0
- package/src/database/local/prisma.config.ts +25 -0
- package/src/database/local/project.ts +39 -0
- package/src/database/manager.ts +181 -0
- package/src/database/migrate.ts +35 -0
- package/src/database/prisma.ts +56 -0
- package/src/database/well-known.ts +38 -0
- package/src/index.ts +4 -4
- package/src/library/abstractions.ts +3 -5
- package/src/library/factory.ts +1 -1
- package/src/library/local.ts +81 -26
- package/src/library/package-resolution-worker.ts +1 -1
- package/src/library/worker/evaluator.ts +40 -23
- package/src/library/worker/loader.lite.ts +1 -1
- package/src/library/worker/main.ts +3 -10
- package/src/library/worker/protocol.ts +0 -1
- package/src/lock/index.ts +0 -1
- package/src/lock/manager.ts +0 -10
- package/src/orchestrator/manager.ts +190 -104
- package/src/orchestrator/operation-context.ts +357 -0
- package/src/orchestrator/operation-plan.destroy.test.md +357 -0
- package/src/orchestrator/operation-plan.destroy.test.ts +775 -0
- package/src/orchestrator/operation-plan.fixtures.ts +213 -0
- package/src/orchestrator/operation-plan.md +198 -0
- package/src/orchestrator/operation-plan.refresh.test.md +199 -0
- package/src/orchestrator/operation-plan.refresh.test.ts +367 -0
- package/src/orchestrator/operation-plan.ts +709 -0
- package/src/orchestrator/operation-plan.update.test.md +485 -0
- package/src/orchestrator/operation-plan.update.test.ts +1066 -0
- package/src/orchestrator/operation-workset.ts +233 -578
- package/src/orchestrator/operation.ts +440 -948
- package/src/orchestrator/plan-test-builder.ts +267 -0
- package/src/project-model/abstractions.ts +118 -0
- package/src/project-model/backends/codebase.ts +365 -0
- package/src/project-model/backends/database.ts +440 -0
- package/src/project-model/errors.ts +81 -0
- package/src/project-model/factory.ts +24 -0
- package/src/project-model/index.ts +4 -0
- package/src/project-model/utils.test.ts +544 -0
- package/src/project-model/utils.ts +242 -0
- package/src/pubsub/abstractions.ts +10 -1
- package/src/pubsub/factory.ts +4 -4
- package/src/pubsub/index.ts +1 -0
- package/src/pubsub/manager.ts +29 -13
- package/src/pubsub/memory.ts +31 -0
- package/src/runner/abstractions.ts +40 -41
- package/src/runner/artifact-env.ts +19 -8
- package/src/runner/factory.ts +6 -6
- package/src/runner/force-abort.ts +3 -6
- package/src/runner/local.ts +74 -67
- package/src/runner/pulumi.ts +23 -63
- package/src/services.ts +181 -123
- package/src/shared/models/backend/index.ts +3 -1
- package/src/shared/models/backend/library.ts +9 -1
- package/src/shared/models/backend/project.ts +43 -42
- package/src/shared/models/backend/pulumi.ts +14 -0
- package/src/shared/models/backend/unlock-method.ts +1 -1
- package/src/shared/models/backend/well-known.ts +58 -0
- package/src/shared/models/base.ts +40 -26
- package/src/shared/models/errors.ts +82 -1
- package/src/shared/models/index.ts +3 -2
- package/src/shared/models/prisma.ts +36 -0
- package/src/shared/models/project/api-key.ts +37 -59
- package/src/shared/models/project/artifact.ts +16 -76
- package/src/shared/models/project/custom-status.ts +12 -0
- package/src/shared/models/project/index.ts +8 -7
- package/src/shared/models/project/lock.ts +10 -78
- package/src/shared/models/project/model.ts +19 -1
- package/src/shared/models/project/operation.ts +235 -99
- package/src/shared/models/project/page.ts +37 -48
- package/src/shared/models/project/secret.ts +29 -89
- package/src/shared/models/project/service-account.ts +12 -17
- package/src/shared/models/project/state.ts +100 -407
- package/src/shared/models/project/terminal.ts +75 -88
- package/src/shared/models/project/trigger.ts +13 -49
- package/src/shared/models/project/unlock-method.ts +20 -26
- package/src/shared/models/project/worker.ts +89 -90
- package/src/shared/resolvers/graph-resolver.ts +21 -0
- package/src/shared/resolvers/index.ts +1 -1
- package/src/shared/resolvers/input-hash.ts +24 -14
- package/src/shared/resolvers/input.ts +9 -2
- package/src/shared/resolvers/registry.ts +5 -4
- package/src/shared/resolvers/state.ts +12 -1
- package/src/shared/resolvers/validation.ts +7 -3
- package/src/shared/utils/index.ts +1 -2
- package/src/shared/utils/promise-tracker.ts +30 -3
- package/src/terminal/abstractions.ts +1 -1
- package/src/terminal/docker.ts +3 -3
- package/src/terminal/manager.ts +102 -118
- package/src/test-utils/database.ts +119 -0
- package/src/test-utils/index.ts +2 -0
- package/src/test-utils/services.ts +134 -0
- package/src/unlock/abstractions.ts +5 -23
- package/src/unlock/memory.ts +9 -14
- package/src/worker/abstractions.ts +7 -4
- package/src/worker/docker.ts +14 -19
- package/src/worker/manager.ts +366 -97
- package/dist/chunk-NAAIDR4U.js +0 -8499
- package/dist/chunk-NAAIDR4U.js.map +0 -1
- package/dist/chunk-Y7DXREVO.js +0 -1745
- package/dist/chunk-Y7DXREVO.js.map +0 -1
- package/dist/magic-string.es-5ABAC4JN.js +0 -1292
- package/dist/magic-string.es-5ABAC4JN.js.map +0 -1
- package/src/business/__traces__/secret/update-instance-secrets/create-and-delete-secrets-simultaneously.md +0 -356
- package/src/business/__traces__/secret/update-instance-secrets/create-new-secrets-for-instance.md +0 -274
- package/src/business/__traces__/secret/update-instance-secrets/delete-existing-secrets.md +0 -223
- package/src/business/__traces__/secret/update-instance-secrets/no-op-when-no-changes.md +0 -147
- package/src/business/__traces__/secret/update-instance-secrets/update-existing-secrets.md +0 -280
- package/src/business/__traces__/worker/update-unit-registrations/add-new-unit-registration-when-other-exists.md +0 -360
- package/src/business/__traces__/worker/update-unit-registrations/add-new-unit-registration.md +0 -215
- package/src/business/__traces__/worker/update-unit-registrations/create-multiple-workers-with-different-identities.md +0 -427
- package/src/business/__traces__/worker/update-unit-registrations/handle-nonexistent-registration-id-gracefully.md +0 -217
- package/src/business/__traces__/worker/update-unit-registrations/no-op-when-no-changes.md +0 -132
- package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-when-image-changes.md +0 -454
- package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-when-image-version-changes.md +0 -426
- package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-with-same-identity-reuses-service-account.md +0 -372
- package/src/business/__traces__/worker/update-unit-registrations/remove-one-of-multiple-unit-registrations.md +0 -383
- package/src/business/__traces__/worker/update-unit-registrations/remove-unit-registration.md +0 -245
- package/src/business/__traces__/worker/update-unit-registrations/update-existing-unit-registration-when-params-change.md +0 -174
- package/src/business/__traces__/worker/update-unit-registrations/update-params-and-image-simultaneously.md +0 -432
- package/src/business/__traces__/worker/update-unit-registrations/worker-with-multiple-registrations-not-deleted-when-one-removed.md +0 -220
- package/src/business/backend-unlock.ts +0 -10
- package/src/common/clock.ts +0 -18
- package/src/common/performance.ts +0 -44
- package/src/common/random.ts +0 -68
- package/src/common/test/index.ts +0 -2
- package/src/common/test/render.ts +0 -98
- package/src/common/test/tracer.ts +0 -359
- package/src/hotstate/abstractions.ts +0 -48
- package/src/hotstate/factory.ts +0 -17
- package/src/hotstate/index.ts +0 -3
- package/src/hotstate/manager.ts +0 -192
- package/src/hotstate/memory.ts +0 -100
- package/src/hotstate/validation.ts +0 -100
- package/src/lock/test.ts +0 -108
- package/src/project/abstractions.ts +0 -78
- package/src/project/evaluation.ts +0 -248
- package/src/project/factory.ts +0 -11
- package/src/project/index.ts +0 -3
- package/src/project/local.ts +0 -417
- package/src/pubsub/local.ts +0 -36
- package/src/pubsub/validation.ts +0 -33
- package/src/shared/utils/args.ts +0 -25
- package/src/state/abstractions.ts +0 -289
- package/src/state/encryption.ts +0 -98
- package/src/state/factory.ts +0 -20
- package/src/state/index.ts +0 -7
- package/src/state/local/backend.ts +0 -106
- package/src/state/local/collection.ts +0 -361
- package/src/state/local/index.ts +0 -2
- package/src/state/manager.ts +0 -890
- package/src/state/memory/backend.ts +0 -70
- package/src/state/memory/collection.ts +0 -270
- package/src/state/memory/index.ts +0 -2
- package/src/state/repository/index.ts +0 -2
- package/src/state/repository/repository.index.ts +0 -193
- package/src/state/repository/repository.ts +0 -507
- package/src/state/test.ts +0 -457
- /package/src/{state → database/local}/keyring.ts +0 -0
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
|
|
2
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
/**
|
|
6
|
+
* WARNING: This is an internal file that is subject to change!
|
|
7
|
+
*
|
|
8
|
+
* 🛑 Under no circumstances should you import this file directly! 🛑
|
|
9
|
+
*
|
|
10
|
+
* Please import the `PrismaClient` class from the `client.ts` file instead.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import * as runtime from "@prisma/client/runtime/client"
|
|
14
|
+
import type * as Prisma from "./prismaNamespace.ts"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
const config: runtime.GetPrismaClientConfig = {
|
|
18
|
+
"generator": {
|
|
19
|
+
"name": "client",
|
|
20
|
+
"provider": {
|
|
21
|
+
"fromEnvVar": null,
|
|
22
|
+
"value": "prisma-client"
|
|
23
|
+
},
|
|
24
|
+
"output": {
|
|
25
|
+
"value": "/home/exeteres/Projects/personal/highstate/packages/platform/backend/src/database/_generated/project",
|
|
26
|
+
"fromEnvVar": null
|
|
27
|
+
},
|
|
28
|
+
"config": {
|
|
29
|
+
"moduleFormat": "esm",
|
|
30
|
+
"generatedFileExtension": "ts",
|
|
31
|
+
"importFileExtension": "ts",
|
|
32
|
+
"engineType": "client"
|
|
33
|
+
},
|
|
34
|
+
"binaryTargets": [
|
|
35
|
+
{
|
|
36
|
+
"fromEnvVar": null,
|
|
37
|
+
"value": "linux-nixos",
|
|
38
|
+
"native": true
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"previewFeatures": [
|
|
42
|
+
"driverAdapters",
|
|
43
|
+
"queryCompiler"
|
|
44
|
+
],
|
|
45
|
+
"sourceFilePath": "/home/exeteres/Projects/personal/highstate/packages/platform/backend/prisma/project/main.prisma",
|
|
46
|
+
"isCustomOutput": true
|
|
47
|
+
},
|
|
48
|
+
"relativePath": "../../../../prisma/project",
|
|
49
|
+
"clientVersion": "6.14.0",
|
|
50
|
+
"engineVersion": "717184b7b35ea05dfa71a3236b7af656013e1e49",
|
|
51
|
+
"datasourceNames": [
|
|
52
|
+
"db"
|
|
53
|
+
],
|
|
54
|
+
"activeProvider": "sqlite",
|
|
55
|
+
"postinstall": false,
|
|
56
|
+
"inlineDatasources": {
|
|
57
|
+
"db": {
|
|
58
|
+
"url": {
|
|
59
|
+
"fromEnvVar": null,
|
|
60
|
+
"value": "<invalid>"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"inlineSchema": "model ApiKey {\n /// The CUIDv2 of the API key.\n id String @id @default(cuid(2))\n\n /// The metadata of the API key managed by the backend.\n ///\n /// [ApiKeyMeta]\n meta Json\n\n /// The ID of the service account impersonated by this API key.\n serviceAccountId String\n\n /// The API token for authentication.\n token String @unique\n\n /// The time when the API key was created.\n createdAt DateTime @default(now())\n\n /// The time when the API key was last updated.\n updatedAt DateTime @updatedAt\n\n /// The worker version that owns this API key.\n worker WorkerVersion?\n\n /// The service account which this API key impersonates.\n serviceAccount ServiceAccount @relation(fields: [serviceAccountId], references: [id], onDelete: Cascade)\n}\n\n/// The artifact represents a file or folder stored in the system.\n///\n/// It can be produced by units or manually uploaded via API by service accounts.\n///\n/// Since different actors can produce the same artifact with the same content and hash,\n/// there is the ownership/usage concept to track which entities produce or use the artifact.\n/// The \"ownership\" and \"usage\" are synonymous in this context and often referred to as \"usage\".\n///\n/// When no usages are present, the artifact will be automatically garbage collected after a certain period.\nmodel Artifact {\n /// The CUIDv2 of the artifact.\n id String @id @default(cuid(2))\n\n /// The metadata of the artifact managed by the backend.\n ///\n /// Since multiple actors can produce the same artifact,\n /// this metadata is the last one provided by any actor.\n ///\n /// [CommonObjectMeta]\n meta Json\n\n /// The SHA256 hash of the artifact content.\n hash String @unique\n\n /// The size of the compressed artifact content in bytes.\n ///\n /// Does not represent the size of the original file or folder,\n /// but the size used to store the artifact in the system.\n size Int\n\n /// The chunk size of the artifact content in bytes.\n /// Used to split the artifact into smaller chunks for storage.\n chunkSize Int\n\n /// The timestamp when the artifact fist appeared in the system.\n createdAt DateTime @default(now())\n\n /// The timestamp when the artifact was last updated.\n updatedAt DateTime @updatedAt\n\n /// The service accounts using this artifact.\n serviceAccounts ServiceAccount[]\n\n /// The instances using this artifact.\n instances InstanceState[]\n\n /// The terminals using this artifact.\n terminals Terminal[]\n\n /// The pages using this artifact.\n pages Page[]\n}\n\nmodel InstanceCustomStatus {\n /// The ID of the instance state this status belongs to.\n stateId String\n\n /// The ID of the service account which attached this custom status.\n serviceAccountId String\n\n /// The name of the custom status unique within the instance and service account.\n name String\n\n /// The metadata of the custom status managed by the backend.\n ///\n /// [CommonObjectMeta]\n meta Json\n\n /// The status value of the custom status.\n value String\n\n /// The message describing the instance's custom status.\n /// \n /// Can be used to provide additional context or information about the status.\n ///\n /// The message will be displayed in the 800x600 ANSI terminal in the UI,\n /// so differenet TUI elements should be drawn within this area.\n message String?\n\n /// The order of the custom status in the list of statuses.\n ///\n /// Should be values from 0 to 100, where 0 is the highest priority.\n /// By default, the order is 50.\n order Int @default(50)\n\n /// The time when the custom status was first attached to the instance.\n createdAt DateTime @default(now())\n\n /// The time when the custom status was last updated.\n updatedAt DateTime @updatedAt\n\n /// The instance this custom status belongs to.\n state InstanceState @relation(fields: [stateId], references: [id])\n\n /// The service account this custom status belongs to.\n serviceAccount ServiceAccount @relation(fields: [serviceAccountId], references: [id])\n\n @@id([stateId, serviceAccountId, name]) // the name must be unique within the instance and service account\n}\n\nenum InstanceEvaluationStatus {\n /// transient statuses (not persisted in the database)\n evaluating\n\n /// stable statuses\n evaluated\n error\n}\n\nmodel InstanceEvaluationState {\n /// The ID of the state of the instance.\n stateId String @id\n\n /// The status of the instance evaluation.\n status InstanceEvaluationStatus\n\n /// The message describing the evaluation status.\n /// If the evaluation is failed, this message will contain the error description.\n message String?\n\n /// The model produced by the evaluation.\n ///\n /// Will be `null` if the evaluation is failed.\n ///\n /// Can be set for both: real composite instances and virtual instances produced by the evaluation.\n ///\n /// [InstanceModel]\n model Json?\n\n /// The time when the last evaluation was finished.\n evaluatedAt DateTime @updatedAt\n\n /// The instance this state belongs to.\n state InstanceState @relation(fields: [stateId], references: [id])\n}\n\nenum InstanceStatus {\n /// The instance is exists in the model (resident or virtual), but not yet deployed or was completely destroyed.\n ///\n /// \"attempted\", \"deployed\" and \"failed\" instances cannot be transitioned back to \"undeployed\" after\n /// successful \"destroy\" operation.\n undeployed\n\n /// The instance was tryied to be initially deployed.\n ///\n /// Normally, this status is very short-lived, and here to indicate that the instance\n /// cannot be safely deleted from the the model until it will be completely destroyed.\n attempted\n\n /// The initial deployment of the instance was successful.\n ///\n /// The transition of \"deployed -> failed\" is not possible, so consequent failed operations\n /// will not affect this status.\n ///\n /// Like \"attempted\", that instance cannot be safely deleted from the model until it will be completely destroyed.\n deployed\n\n /// The initial deployment of the instance failed.\n /// It can still be transitioned to \"deployed\" by a successful operation\n ///\n /// Like \"attempted\", that instance cannot be safely deleted from the model until it will be completely destroyed.\n failed\n}\n\nenum InstanceSource {\n /// The instance is defined in the project model.\n resident\n\n /// The instance is produced by evaluation of composite instance.\n virtual\n}\n\nmodel InstanceState {\n /// The surrogate CUIDv2 primary key of the instance to allow renaming instances.\n id String @id @default(cuid(2))\n\n /// The ID of the instance managed by the system.\n ///\n /// [InstanceId]\n instanceId String @unique\n\n /// The status of the instance.\n status InstanceStatus\n\n /// The source of the instance.\n source InstanceSource\n\n /// The kind of the instance.\n ///\n /// [InstanceKind]\n kind String\n\n /// The ID of the parent instance state, if this instance is a child of another composite instance.\n parentId String?\n\n /// The 32-bit nonce used to invalidate the input hash when secrets are updated.\n inputHashNonce Int?\n\n /// The status fields produced by the last operation.\n ///\n /// [InstanceStatusFields]\n statusFields Json?\n\n /// The calculated instance CRC32 input hash at the moment of last operation completion.\n ///\n /// This hash covers:\n /// - the instance's configuration (name, args, secret hashes);\n /// - tWorkerVersionponent definition hash;\n /// - the unit's source hash (if applicable);\n /// - the input hashes and output hashes of all input instances.\n inputHash Int?\n\n /// The CRC32 of the output produced by the instance at the moment of last operation completion.\n ///\n /// Does not depend on anything except the instance's output.\n outputHash Int?\n\n /// The calculated CRC32 dependency output hash at the moment of last operation completion.\n ///\n /// This hash is calculated as combination of output hashes of all input instances and nothing else.\n ///\n /// The primary use case of this hash is to \"short-circuit\" execution:\n /// if the outputs of input instances have not changed, dependent instances can skip execution,\n /// even if their input hashes changed due to upstream config changes.\n /// This prevents unnecessary re-execution of the entire dependency graph when only non-output-affecting inputs are modified.\n dependencyOutputHash Int?\n\n /// The mapping of instance output names to artifact IDs passed via them.\n ///\n /// Used to authorize access to artifacts for other instances connected to these outputs.\n ///\n /// [InstanceArtifactIds]\n exportedArtifactIds Json?\n\n /// The count of Pulumi resources currently managed by this instance.\n currentResourceCount Int?\n\n /// The message describing the current state of the instance.\n message String?\n\n /// The snapshot of the instance model at the moment of last non-preview operation start.\n ///\n /// Null if the instance was never operated on.\n ///\n /// [InstanceModel]\n model Json?\n\n /// The snapshot of the resolved inputs at the moment of last non-preview operation start.\n ///\n /// Null if the instance was never operated on.\n ///\n /// [InstanceResolvedInputs]\n resolvedInputs Json?\n\n /// The parent instance.\n parent InstanceState? @relation(\"InstanceHierarchy\", fields: [parentId], references: [id])\n\n /// The child instances, if any.\n children InstanceState[] @relation(\"InstanceHierarchy\")\n\n /// The evaluation state of this instance.\n evaluationState InstanceEvaluationState?\n\n /// The operation states associated with this instance.\n operationStates InstanceOperationState[]\n\n /// The secrets associated with this instance.\n secrets Secret[]\n\n /// The terminals associated with this instance.\n terminals Terminal[]\n\n /// The pages associated with this instance.\n pages Page[]\n\n /// The triggers associated with this instance.\n triggers Trigger[]\n\n /// Custom statuses for this instance.\n customStatuses InstanceCustomStatus[]\n\n /// The lock that is currently held on this instance.\n lock InstanceLock?\n\n /// Worker registrations associated with this instance.\n workerRegistrations WorkerUnitRegistration[]\n\n /// The artifacts produced or used by this instance.\n artifacts Artifact[]\n\n /// The operation logs associated with this instance.\n operationLogs OperationLog[]\n\n /// The user viewports associated with this instance.\n userViewports UserCompositeViewport[]\n}\n\nmodel UserProjectViewport {\n /// The opaque ID of the user to which this viewport belongs.\n userId String @id\n\n /// The viewport of the user project managed by the frontend.\n viewport Json\n}\n\nmodel UserCompositeViewport {\n /// The opaque ID of the user to which this viewport belongs.\n userId String\n\n /// The ID of the state of the composite instance to which this viewport belongs.\n stateId String\n\n /// The viewport of the user composite instance managed by the frontend.\n viewport Json\n\n /// The instance state to which this viewport belongs.\n state InstanceState @relation(fields: [stateId], references: [id])\n\n @@id([userId, stateId])\n}\n\nmodel InstanceLock {\n /// The ID of the instance state being locked.\n stateId String @id\n\n /// The metadata of the lock managed by the backend.\n ///\n /// [CommonObjectMeta]\n meta Json\n\n /// The CUIDv2 token to ensure ownership of the lock.\n token String\n\n /// The time when the lock was acquired.\n acquiredAt DateTime @default(now())\n\n /// The instance being locked.\n state InstanceState @relation(fields: [stateId], references: [id])\n}\n\ndatasource db {\n provider = \"sqlite\"\n directUrl = env(\"HIGHSTATE_MIGRATION_DATABASE_URL\")\n}\n\ngenerator client {\n provider = \"prisma-client\"\n previewFeatures = [\"queryCompiler\", \"driverAdapters\"]\n output = \"../../src/database/_generated/project\"\n moduleFormat = \"esm\"\n generatedFileExtension = \"ts\"\n importFileExtension = \"ts\"\n}\n\ngenerator json {\n provider = \"prisma-json-types-generator\"\n}\n\n/// The container for project instances. \n///\n/// Only used when \"database\" project model storage is used.\nmodel InstanceModel {\n /// The ID of the instance in the format of `{type}:{name}`.\n id String @id\n\n /// The model of the instance managed by the backend.\n ///\n /// [InstanceModel]\n model Json\n\n /// The time when the instance model was created.\n createdAt DateTime @default(now())\n\n /// The time when the instance model was last updated.\n updatedAt DateTime @updatedAt\n}\n\n/// The container for project hubs.\n///\n/// Only used when \"database\" project model storage is used.\nmodel HubModel {\n /// The CUIDv2 of the hub.\n id String @id\n\n /// The model of the hub managed by the backend.\n ///\n /// [HubModel]\n model Json\n\n /// The time when the hub model was created.\n createdAt DateTime @default(now())\n\n /// The time when the hub model was last updated.\n updatedAt DateTime @updatedAt\n}\n\nenum OperationStatus {\n // transient statuses\n pending\n running\n failing\n\n // stable statuses\n completed\n failed\n cancelled\n}\n\nenum OperationType {\n update\n preview\n destroy\n recreate\n refresh\n}\n\nenum InstanceOperationStatus {\n // transient statuses\n updating\n processing_triggers\n previewing\n destroying\n refreshing\n pending\n cancelling\n\n // stable statuses\n updated\n skipped\n destroyed\n refreshed\n cancelled\n failed\n}\n\nmodel Operation {\n /// The CUIDv2 of the operation.\n id String @id @default(cuid(2))\n\n /// The metadata of the operation.\n ///\n /// [OperationMeta]\n meta Json\n\n /// The type of the operation.\n type OperationType\n\n /// The status of the operation.\n status OperationStatus @default(pending)\n\n /// The options of the operation.\n ///\n /// [OperationOptions]\n options Json\n\n /// The IDs of the instances that were exlicitly requested to operate on.\n ///\n /// [InstanceIds]\n requestedInstanceIds Json\n\n /// The execution phases of the operation.\n ///\n /// [OperationPhase[]]\n phases Json?\n\n /// The time when the operation started.\n startedAt DateTime @default(now())\n\n /// The time when the operation was last updated.\n updatedAt DateTime @updatedAt\n\n /// The time when the operation finished.\n finishedAt DateTime?\n\n /// The operation states associated with this operation.\n operationStates InstanceOperationState[]\n\n /// The logs of the operation.\n logs OperationLog[]\n}\n\nmodel InstanceOperationState {\n /// The ID of the operation this state belongs to.\n operationId String\n\n /// The ID of the instance state affected by the operation.\n stateId String\n\n /// The enum representing the current status of the instance from the operation perspective.\n status InstanceOperationStatus\n\n /// The current count of the Pulumi resources being managed by this instance.\n currentResourceCount Int?\n\n /// The total count of the Pulumi resources that this instance is expected to manage.\n totalResourceCount Int?\n\n /// The snapshot of the instance model at the moment of operation start.\n ///\n /// [InstanceModel]\n model Json\n\n /// The snapshot of the resolved inputs at the moment of operation start.\n ///\n /// [InstanceResolvedInputs]\n resolvedInputs Json\n\n /// The time when the operation on this instance started.\n /// Not populated on create, even if the instance is ready to start immediately.\n startedAt DateTime?\n\n /// The time when the operation on this instance finished.\n finishedAt DateTime?\n\n /// The operation this state belongs to.\n operation Operation @relation(fields: [operationId], references: [id])\n\n /// The instance this state belongs to.\n state InstanceState @relation(fields: [stateId], references: [id])\n\n @@id([operationId, stateId])\n}\n\nmodel OperationLog {\n /// The ULID of the log. Also used to extract the timestamp.\n id String @id\n\n /// The ID of the operation this log belongs to.\n operationId String\n\n /// The ID of the instance state this log produced by.\n /// Can be `null` if the log is not associated with any instance.\n stateId String?\n\n /// The content of the log.\n content String\n\n /// The operation this log belongs to.\n operation Operation @relation(fields: [operationId], references: [id])\n\n /// The instance this log produced by.\n /// Can be `null` if the log is not associated with any instance.\n state InstanceState? @relation(fields: [stateId], references: [id])\n}\n\nmodel Page {\n /// The CUIDv2 of the page.\n id String @id @default(cuid(2))\n\n /// The metadata of the page managed by the backend.\n ///\n /// [GlobalCommonObjectMeta]\n meta Json\n\n /// The ID of the instance state that owns this page.\n stateId String?\n\n /// The name of the page within the instance.\n /// Will be null if the page is not owned by an instance.\n name String?\n\n /// The ID of the service account that owns this page.\n serviceAccountId String?\n\n /// The content of the page managed by the backend.\n ///\n /// [PageContent]\n content Json\n\n /// The time when the page was created.\n createdAt DateTime @default(now())\n\n /// The time when the page was last updated.\n updatedAt DateTime @updatedAt\n\n /// The instance this page belongs to if any.\n state InstanceState? @relation(fields: [stateId], references: [id])\n\n /// The service account this page belongs to if any. \n serviceAccount ServiceAccount? @relation(fields: [serviceAccountId], references: [id])\n\n /// The artifacts used by this page.\n artifacts Artifact[]\n\n @@unique([stateId, name]) // the name is unique within the instance\n}\n\nmodel Secret {\n /// The CUIDv2 of the secret.\n id String @id @default(cuid(2))\n\n /// The metadata of the secret managed by the backend.\n ///\n /// [GlobalCommonObjectMeta]\n meta Json\n\n /// The ID of the state of the instance owning this secret.\n stateId String?\n\n /// The name of the secret within the instance.\n ///\n /// Will be null if the secret is not owned by an instance.\n name String?\n\n /// The name of the secret within the project if the secret is a system secret.\n systemName String? @unique\n\n /// The ID of the service account owning this secret.\n serviceAccountId String?\n\n /// The content of the secret.\n ///\n /// ![unknown]\n content Json\n\n /// The time when the secret was created.\n createdAt DateTime @default(now())\n\n /// The time when the secret was last updated.\n updatedAt DateTime @updatedAt\n\n /// The instance this secret belongs to.\n state InstanceState? @relation(fields: [stateId], references: [id])\n\n /// The service account this secret belongs to.\n serviceAccount ServiceAccount? @relation(fields: [serviceAccountId], references: [id])\n\n @@unique([stateId, name]) // the name must be unique within the instance\n}\n\nmodel ServiceAccount {\n /// The CUIDv2 of the service account.\n id String @id @default(cuid(2))\n\n /// The metadata of the service account managed by the backend.\n ///\n /// [ServiceAccountMeta]\n meta Json\n\n /// The time when the service account was created.\n createdAt DateTime @default(now())\n\n /// The time when the service account was last updated.\n updatedAt DateTime @updatedAt\n\n /// The workers using this service account.\n workers Worker[]\n\n /// The artifacts used by this service account.\n artifacts Artifact[]\n\n /// The secrets owned by this service account.\n secrets Secret[]\n\n /// The terminals owned by this service account.\n terminals Terminal[]\n\n /// The pages owned by this service account.\n pages Page[]\n\n /// The instance custom statuses attached by this service account.\n customStatuses InstanceCustomStatus[]\n\n /// The API keys impersonating this service account.\n apiKeys ApiKey[]\n}\n\nenum TerminalStatus {\n /// The terminal is currently active and can create new sessions.\n active\n\n /// The instance was destroyed and the tertminal is no longer available, but here for historical purposes.\n unavailable\n}\n\nmodel Terminal {\n /// The CUIDv2 of the terminal.\n id String @id @default(cuid(2))\n\n /// The metadata of the terminal managed by the backend.\n ///\n /// [GlobalCommonObjectMeta]\n meta Json\n\n /// The status of the terminal.\n status TerminalStatus @default(active)\n\n /// The specification of the terminal managed by the backend.\n ///\n /// [TerminalSpec]\n spec Json\n\n /// The ID of the instance state owning this terminal.\n stateId String?\n\n /// The name of the terminal within the instance.\n ///\n /// Will be null if the terminal is not owned by an instance.\n name String?\n\n /// The ID of the service account owning this terminal.\n serviceAccountId String?\n\n /// The time when the terminal was created.\n createdAt DateTime @default(now())\n\n /// The time when the terminal was last updated.\n updatedAt DateTime @updatedAt\n\n /// The instance this terminal belongs to.\n state InstanceState? @relation(fields: [stateId], references: [id], onDelete: Cascade)\n\n /// The service account this terminal belongs to.\n serviceAccount ServiceAccount? @relation(fields: [serviceAccountId], references: [id], onDelete: Cascade)\n\n /// The terminal sessions associated with this terminal.\n sessions TerminalSession[]\n\n /// The artifacts used by this terminal.\n artifacts Artifact[]\n\n @@unique([stateId, name]) // the name is unique within the instance\n}\n\nmodel TerminalSession {\n /// The CUIDv2 of the terminal session.\n id String @id @default(cuid(2))\n\n /// The ID of the terminal this session belongs to.\n terminalId String\n\n /// The time when the terminal session started.\n startedAt DateTime @default(now())\n\n /// The time when the terminal session finished.\n finishedAt DateTime?\n\n /// The terminal this session belongs to.\n terminal Terminal @relation(fields: [terminalId], references: [id], onDelete: Cascade)\n\n /// The logs of the terminal session.\n logs TerminalSessionLog[]\n}\n\nmodel TerminalSessionLog {\n /// The ULID of the session log. Also used to extract the timestamp.\n id String @id\n\n /// The ID of the terminal session this log belongs to.\n sessionId String\n\n /// The content of the log.\n content String\n\n /// The terminal session this log belongs to.\n session TerminalSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)\n}\n\nmodel Trigger {\n /// The CUIDv2 of the trigger.\n id String @id @default(cuid(2))\n\n /// The metadata of the trigger managed by the backend.\n ///\n /// [GlobalCommonObjectMeta]\n meta Json\n\n /// The ID of the instance state this trigger belongs to.\n stateId String\n\n /// The name of the trigger within the instance.\n name String\n\n /// The specification of the trigger describing its behavior and configuration.\n ///\n /// [TriggerSpec]\n spec Json\n\n /// The time when the trigger was created.\n createdAt DateTime @default(now())\n\n /// The time when the trigger was last updated.\n updatedAt DateTime @updatedAt\n\n /// The instance this trigger belongs to.\n state InstanceState @relation(fields: [stateId], references: [id])\n\n @@unique([stateId, name]) // the name is unique within the instance\n}\n\nenum UnlockMethodType {\n /// The password is used to unlock the project.\n password\n\n /// The passkey (via WebAuthn) is used to unlock the project.\n passkey\n}\n\nmodel UnlockMethod {\n /// The CUIDv2 of the unlock method.\n id String @id @default(cuid(2))\n\n /// The metadata of the unlock method managed by the backend.\n /// \n /// [UnlockMethodMeta]\n meta Json\n\n /// The type of unlock method.\n type UnlockMethodType\n\n /// The AGE identity encrypted and armored also with AGE.\n encryptedIdentity String\n\n /// The AGE recipient for this unlock method.\n recipient String\n\n /// The time when the unlock method was created.\n createdAt DateTime @default(now())\n\n /// The time when the unlock method was last updated.\n updatedAt DateTime @updatedAt\n}\n\nmodel Worker {\n /// The CUIDv2 of the worker.\n id String @id @default(cuid(2))\n\n /// The ID of the worker.\n ///\n /// This is the fully qualified image name without the tag or digest.\n /// The format is `{<registry>/}[<namespace>/]<name>`.\n ///\n /// For example: `ghcr.io/highstate/worker` or `docker.io/library/ubuntu`.\n identity String @unique\n\n /// The ID of the service account this worker uses.\n serviceAccountId String @unique\n\n /// The time this worker first appeared in the system.\n createdAt DateTime @default(now())\n\n /// The service account impersonating this worker.\n serviceAccount ServiceAccount @relation(fields: [serviceAccountId], references: [id])\n\n /// The versions of this worker.\n versions WorkerVersion[]\n}\n\nenum WorkerVersionStatus {\n /// The status is unknown.\n unknown\n\n /// The worker is being started by one of the runtimes.\n starting\n\n /// The worker is running and serving registrations.\n running\n\n /// The worker is being stopping (after was starting/running and was disabled).\n stopping\n\n /// The worker is stopped and not serving registrations.\n stopped\n\n /// The worker failed to start/crashed more than the allowed number of times.\n error\n}\n\nmodel WorkerVersion {\n /// The CUIDv2 of the worker version.\n id String @id @default(cuid(2))\n\n /// The metadata of the worker version managed by the backend.\n ///\n /// [CommonObjectMeta]\n meta Json\n\n /// The current status of the worker version reported by the runtime.\n status WorkerVersionStatus @default(unknown)\n\n /// Whether this worker version is enabled and will be launched when project is unclocked.\n enabled Boolean @default(true)\n\n /// The ID of the runtime where this worker version currently runs.\n runtimeId String?\n\n /// The ID of the worker this version belongs to.\n workerId String\n\n /// The digest of the worker version used to identify it.\n /// The format is raw SHA256 digest without the `sha256:` prefix.\n digest String @unique\n\n /// The ID of the API key this worker version uses.\n apiKeyId String @unique\n\n /// The time this worker version was created.\n createdAt DateTime @default(now())\n\n /// The time this worker version was last updated.\n updatedAt DateTime @updatedAt\n\n /// The worker this version belongs to.\n worker Worker @relation(fields: [workerId], references: [id])\n\n /// The API key this worker version uses.\n apiKey ApiKey @relation(fields: [apiKeyId], references: [id])\n\n /// The unit registrations for this worker version.\n unitRegistrations WorkerUnitRegistration[]\n\n /// The logs produced by this worker version.\n logs WorkerVersionLog[]\n}\n\nmodel WorkerUnitRegistration {\n /// The ID of the state of the unit instance requesting the registration.\n stateId String\n\n /// The name of the workor within the instance.\n name String\n\n /// The parameters of the registration passed by the unit.\n ///\n /// [WorkerUnitRegistrationParams]\n params Json\n\n /// The ID of the worker version this registration currently uses.\n workerVersionId String\n\n /// The time this registration was created.\n createdAt DateTime @default(now())\n\n /// The time this registration was last updated.\n updatedAt DateTime @updatedAt\n\n /// The unit instance requesting the registration.\n state InstanceState @relation(fields: [stateId], references: [id])\n\n /// The worker version this registration currently uses.\n workerVersion WorkerVersion @relation(fields: [workerVersionId], references: [id])\n\n @@id([stateId, name]) // the registration is identified by the instance and name\n}\n\nmodel WorkerVersionLog {\n /// The ULID of the worker log. Also used to extract the timestamp.\n id String @id @default(ulid())\n\n /// The ID of the worker version that produced this log.\n workerVersionId String\n\n /// The log content.\n content String\n\n /// Whether this log is a system/runtime message (vs worker output).\n isSystem Boolean @default(false)\n\n /// The worker version that produced this log.\n workerVersion WorkerVersion @relation(fields: [workerVersionId], references: [id], onDelete: Cascade)\n}\n",
|
|
65
|
+
"inlineSchemaHash": "ab2bb7922edf69dbc6f9091b713b126e68cc6e541ce4f0adfdb840beac826b6f",
|
|
66
|
+
"copyEngine": true,
|
|
67
|
+
"runtimeDataModel": {
|
|
68
|
+
"models": {},
|
|
69
|
+
"enums": {},
|
|
70
|
+
"types": {}
|
|
71
|
+
},
|
|
72
|
+
"dirname": ""
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
config.runtimeDataModel = JSON.parse("{\"models\":{\"ApiKey\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"serviceAccountId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"worker\",\"kind\":\"object\",\"type\":\"WorkerVersion\",\"relationName\":\"ApiKeyToWorkerVersion\"},{\"name\":\"serviceAccount\",\"kind\":\"object\",\"type\":\"ServiceAccount\",\"relationName\":\"ApiKeyToServiceAccount\"}],\"dbName\":null},\"Artifact\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"hash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"size\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"chunkSize\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"serviceAccounts\",\"kind\":\"object\",\"type\":\"ServiceAccount\",\"relationName\":\"ArtifactToServiceAccount\"},{\"name\":\"instances\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"ArtifactToInstanceState\"},{\"name\":\"terminals\",\"kind\":\"object\",\"type\":\"Terminal\",\"relationName\":\"ArtifactToTerminal\"},{\"name\":\"pages\",\"kind\":\"object\",\"type\":\"Page\",\"relationName\":\"ArtifactToPage\"}],\"dbName\":null},\"InstanceCustomStatus\":{\"fields\":[{\"name\":\"stateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"serviceAccountId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"value\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"order\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"state\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceCustomStatusToInstanceState\"},{\"name\":\"serviceAccount\",\"kind\":\"object\",\"type\":\"ServiceAccount\",\"relationName\":\"InstanceCustomStatusToServiceAccount\"}],\"dbName\":null},\"InstanceEvaluationState\":{\"fields\":[{\"name\":\"stateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"InstanceEvaluationStatus\"},{\"name\":\"message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"model\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"evaluatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"state\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceEvaluationStateToInstanceState\"}],\"dbName\":null},\"InstanceState\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"instanceId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"InstanceStatus\"},{\"name\":\"source\",\"kind\":\"enum\",\"type\":\"InstanceSource\"},{\"name\":\"kind\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"parentId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"inputHashNonce\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"statusFields\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"inputHash\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"outputHash\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"dependencyOutputHash\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"exportedArtifactIds\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"currentResourceCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"model\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"resolvedInputs\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"parent\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceHierarchy\"},{\"name\":\"children\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceHierarchy\"},{\"name\":\"evaluationState\",\"kind\":\"object\",\"type\":\"InstanceEvaluationState\",\"relationName\":\"InstanceEvaluationStateToInstanceState\"},{\"name\":\"operationStates\",\"kind\":\"object\",\"type\":\"InstanceOperationState\",\"relationName\":\"InstanceOperationStateToInstanceState\"},{\"name\":\"secrets\",\"kind\":\"object\",\"type\":\"Secret\",\"relationName\":\"InstanceStateToSecret\"},{\"name\":\"terminals\",\"kind\":\"object\",\"type\":\"Terminal\",\"relationName\":\"InstanceStateToTerminal\"},{\"name\":\"pages\",\"kind\":\"object\",\"type\":\"Page\",\"relationName\":\"InstanceStateToPage\"},{\"name\":\"triggers\",\"kind\":\"object\",\"type\":\"Trigger\",\"relationName\":\"InstanceStateToTrigger\"},{\"name\":\"customStatuses\",\"kind\":\"object\",\"type\":\"InstanceCustomStatus\",\"relationName\":\"InstanceCustomStatusToInstanceState\"},{\"name\":\"lock\",\"kind\":\"object\",\"type\":\"InstanceLock\",\"relationName\":\"InstanceLockToInstanceState\"},{\"name\":\"workerRegistrations\",\"kind\":\"object\",\"type\":\"WorkerUnitRegistration\",\"relationName\":\"InstanceStateToWorkerUnitRegistration\"},{\"name\":\"artifacts\",\"kind\":\"object\",\"type\":\"Artifact\",\"relationName\":\"ArtifactToInstanceState\"},{\"name\":\"operationLogs\",\"kind\":\"object\",\"type\":\"OperationLog\",\"relationName\":\"InstanceStateToOperationLog\"},{\"name\":\"userViewports\",\"kind\":\"object\",\"type\":\"UserCompositeViewport\",\"relationName\":\"InstanceStateToUserCompositeViewport\"}],\"dbName\":null},\"UserProjectViewport\":{\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"viewport\",\"kind\":\"scalar\",\"type\":\"Json\"}],\"dbName\":null},\"UserCompositeViewport\":{\"fields\":[{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"viewport\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"state\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceStateToUserCompositeViewport\"}],\"dbName\":null},\"InstanceLock\":{\"fields\":[{\"name\":\"stateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"token\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"acquiredAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"state\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceLockToInstanceState\"}],\"dbName\":null},\"InstanceModel\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"model\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"HubModel\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"model\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Operation\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"OperationType\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"OperationStatus\"},{\"name\":\"options\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"requestedInstanceIds\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"phases\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"startedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"finishedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"operationStates\",\"kind\":\"object\",\"type\":\"InstanceOperationState\",\"relationName\":\"InstanceOperationStateToOperation\"},{\"name\":\"logs\",\"kind\":\"object\",\"type\":\"OperationLog\",\"relationName\":\"OperationToOperationLog\"}],\"dbName\":null},\"InstanceOperationState\":{\"fields\":[{\"name\":\"operationId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"InstanceOperationStatus\"},{\"name\":\"currentResourceCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"totalResourceCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"model\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"resolvedInputs\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"startedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"finishedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"operation\",\"kind\":\"object\",\"type\":\"Operation\",\"relationName\":\"InstanceOperationStateToOperation\"},{\"name\":\"state\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceOperationStateToInstanceState\"}],\"dbName\":null},\"OperationLog\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"operationId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"stateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"operation\",\"kind\":\"object\",\"type\":\"Operation\",\"relationName\":\"OperationToOperationLog\"},{\"name\":\"state\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceStateToOperationLog\"}],\"dbName\":null},\"Page\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"stateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"serviceAccountId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"state\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceStateToPage\"},{\"name\":\"serviceAccount\",\"kind\":\"object\",\"type\":\"ServiceAccount\",\"relationName\":\"PageToServiceAccount\"},{\"name\":\"artifacts\",\"kind\":\"object\",\"type\":\"Artifact\",\"relationName\":\"ArtifactToPage\"}],\"dbName\":null},\"Secret\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"stateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"systemName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"serviceAccountId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"state\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceStateToSecret\"},{\"name\":\"serviceAccount\",\"kind\":\"object\",\"type\":\"ServiceAccount\",\"relationName\":\"SecretToServiceAccount\"}],\"dbName\":null},\"ServiceAccount\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"workers\",\"kind\":\"object\",\"type\":\"Worker\",\"relationName\":\"ServiceAccountToWorker\"},{\"name\":\"artifacts\",\"kind\":\"object\",\"type\":\"Artifact\",\"relationName\":\"ArtifactToServiceAccount\"},{\"name\":\"secrets\",\"kind\":\"object\",\"type\":\"Secret\",\"relationName\":\"SecretToServiceAccount\"},{\"name\":\"terminals\",\"kind\":\"object\",\"type\":\"Terminal\",\"relationName\":\"ServiceAccountToTerminal\"},{\"name\":\"pages\",\"kind\":\"object\",\"type\":\"Page\",\"relationName\":\"PageToServiceAccount\"},{\"name\":\"customStatuses\",\"kind\":\"object\",\"type\":\"InstanceCustomStatus\",\"relationName\":\"InstanceCustomStatusToServiceAccount\"},{\"name\":\"apiKeys\",\"kind\":\"object\",\"type\":\"ApiKey\",\"relationName\":\"ApiKeyToServiceAccount\"}],\"dbName\":null},\"Terminal\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"TerminalStatus\"},{\"name\":\"spec\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"stateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"serviceAccountId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"state\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceStateToTerminal\"},{\"name\":\"serviceAccount\",\"kind\":\"object\",\"type\":\"ServiceAccount\",\"relationName\":\"ServiceAccountToTerminal\"},{\"name\":\"sessions\",\"kind\":\"object\",\"type\":\"TerminalSession\",\"relationName\":\"TerminalToTerminalSession\"},{\"name\":\"artifacts\",\"kind\":\"object\",\"type\":\"Artifact\",\"relationName\":\"ArtifactToTerminal\"}],\"dbName\":null},\"TerminalSession\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"terminalId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"startedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"finishedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"terminal\",\"kind\":\"object\",\"type\":\"Terminal\",\"relationName\":\"TerminalToTerminalSession\"},{\"name\":\"logs\",\"kind\":\"object\",\"type\":\"TerminalSessionLog\",\"relationName\":\"TerminalSessionToTerminalSessionLog\"}],\"dbName\":null},\"TerminalSessionLog\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sessionId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"session\",\"kind\":\"object\",\"type\":\"TerminalSession\",\"relationName\":\"TerminalSessionToTerminalSessionLog\"}],\"dbName\":null},\"Trigger\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"stateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"spec\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"state\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceStateToTrigger\"}],\"dbName\":null},\"UnlockMethod\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"UnlockMethodType\"},{\"name\":\"encryptedIdentity\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"recipient\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Worker\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"identity\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"serviceAccountId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"serviceAccount\",\"kind\":\"object\",\"type\":\"ServiceAccount\",\"relationName\":\"ServiceAccountToWorker\"},{\"name\":\"versions\",\"kind\":\"object\",\"type\":\"WorkerVersion\",\"relationName\":\"WorkerToWorkerVersion\"}],\"dbName\":null},\"WorkerVersion\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"meta\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"WorkerVersionStatus\"},{\"name\":\"enabled\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"runtimeId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"workerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"digest\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"apiKeyId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"worker\",\"kind\":\"object\",\"type\":\"Worker\",\"relationName\":\"WorkerToWorkerVersion\"},{\"name\":\"apiKey\",\"kind\":\"object\",\"type\":\"ApiKey\",\"relationName\":\"ApiKeyToWorkerVersion\"},{\"name\":\"unitRegistrations\",\"kind\":\"object\",\"type\":\"WorkerUnitRegistration\",\"relationName\":\"WorkerUnitRegistrationToWorkerVersion\"},{\"name\":\"logs\",\"kind\":\"object\",\"type\":\"WorkerVersionLog\",\"relationName\":\"WorkerVersionToWorkerVersionLog\"}],\"dbName\":null},\"WorkerUnitRegistration\":{\"fields\":[{\"name\":\"stateId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"params\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"workerVersionId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"state\",\"kind\":\"object\",\"type\":\"InstanceState\",\"relationName\":\"InstanceStateToWorkerUnitRegistration\"},{\"name\":\"workerVersion\",\"kind\":\"object\",\"type\":\"WorkerVersion\",\"relationName\":\"WorkerUnitRegistrationToWorkerVersion\"}],\"dbName\":null},\"WorkerVersionLog\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"workerVersionId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isSystem\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"workerVersion\",\"kind\":\"object\",\"type\":\"WorkerVersion\",\"relationName\":\"WorkerVersionToWorkerVersionLog\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
|
|
76
|
+
config.engineWasm = undefined
|
|
77
|
+
|
|
78
|
+
async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
|
|
79
|
+
const { Buffer } = await import('node:buffer')
|
|
80
|
+
const base64Data = wasmBase64.replace('data:application/wasm;base64,', '')
|
|
81
|
+
const wasmArray = new Uint8Array(Buffer.from(base64Data, 'base64'))
|
|
82
|
+
return new WebAssembly.Module(wasmArray)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
config.compilerWasm = {
|
|
86
|
+
getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.sqlite.mjs"),
|
|
87
|
+
|
|
88
|
+
getQueryCompilerWasmModule: async () => {
|
|
89
|
+
const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.sqlite.wasm-base64.mjs")
|
|
90
|
+
return await decodeBase64AsWasm(wasm)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
|
|
98
|
+
'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never
|
|
99
|
+
|
|
100
|
+
export interface PrismaClientConstructor {
|
|
101
|
+
/**
|
|
102
|
+
* ## Prisma Client
|
|
103
|
+
*
|
|
104
|
+
* Type-safe database client for TypeScript
|
|
105
|
+
* @example
|
|
106
|
+
* ```
|
|
107
|
+
* const prisma = new PrismaClient()
|
|
108
|
+
* // Fetch zero or more ApiKeys
|
|
109
|
+
* const apiKeys = await prisma.apiKey.findMany()
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
new <
|
|
116
|
+
Options extends Prisma.PrismaClientOptions,
|
|
117
|
+
LogOpts extends LogOptions<Options>,
|
|
118
|
+
OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'],
|
|
119
|
+
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
|
|
120
|
+
>(options?: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* ## Prisma Client
|
|
125
|
+
*
|
|
126
|
+
* Type-safe database client for TypeScript
|
|
127
|
+
* @example
|
|
128
|
+
* ```
|
|
129
|
+
* const prisma = new PrismaClient()
|
|
130
|
+
* // Fetch zero or more ApiKeys
|
|
131
|
+
* const apiKeys = await prisma.apiKey.findMany()
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
export interface PrismaClient<
|
|
138
|
+
in LogOpts extends Prisma.LogLevel = never,
|
|
139
|
+
in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = Prisma.PrismaClientOptions['omit'],
|
|
140
|
+
in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
|
|
141
|
+
> {
|
|
142
|
+
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
|
|
143
|
+
|
|
144
|
+
$on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Connect with the database
|
|
148
|
+
*/
|
|
149
|
+
$connect(): runtime.Types.Utils.JsPromise<void>;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Disconnect from the database
|
|
153
|
+
*/
|
|
154
|
+
$disconnect(): runtime.Types.Utils.JsPromise<void>;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Executes a prepared raw query and returns the number of affected rows.
|
|
158
|
+
* @example
|
|
159
|
+
* ```
|
|
160
|
+
* const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
|
|
161
|
+
* ```
|
|
162
|
+
*
|
|
163
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
164
|
+
*/
|
|
165
|
+
$executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Executes a raw query and returns the number of affected rows.
|
|
169
|
+
* Susceptible to SQL injections, see documentation.
|
|
170
|
+
* @example
|
|
171
|
+
* ```
|
|
172
|
+
* const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
|
|
173
|
+
* ```
|
|
174
|
+
*
|
|
175
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
176
|
+
*/
|
|
177
|
+
$executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Performs a prepared raw query and returns the `SELECT` data.
|
|
181
|
+
* @example
|
|
182
|
+
* ```
|
|
183
|
+
* const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
|
|
184
|
+
* ```
|
|
185
|
+
*
|
|
186
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
187
|
+
*/
|
|
188
|
+
$queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Performs a raw query and returns the `SELECT` data.
|
|
192
|
+
* Susceptible to SQL injections, see documentation.
|
|
193
|
+
* @example
|
|
194
|
+
* ```
|
|
195
|
+
* const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
|
|
196
|
+
* ```
|
|
197
|
+
*
|
|
198
|
+
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
|
|
199
|
+
*/
|
|
200
|
+
$queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
|
|
205
|
+
* @example
|
|
206
|
+
* ```
|
|
207
|
+
* const [george, bob, alice] = await prisma.$transaction([
|
|
208
|
+
* prisma.user.create({ data: { name: 'George' } }),
|
|
209
|
+
* prisma.user.create({ data: { name: 'Bob' } }),
|
|
210
|
+
* prisma.user.create({ data: { name: 'Alice' } }),
|
|
211
|
+
* ])
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
|
|
215
|
+
*/
|
|
216
|
+
$transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
|
|
217
|
+
|
|
218
|
+
$transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<R>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
$extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<OmitOpts>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<OmitOpts>, {
|
|
222
|
+
extArgs: ExtArgs
|
|
223
|
+
}>>
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* `prisma.apiKey`: Exposes CRUD operations for the **ApiKey** model.
|
|
227
|
+
* Example usage:
|
|
228
|
+
* ```ts
|
|
229
|
+
* // Fetch zero or more ApiKeys
|
|
230
|
+
* const apiKeys = await prisma.apiKey.findMany()
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
get apiKey(): Prisma.ApiKeyDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* `prisma.artifact`: Exposes CRUD operations for the **Artifact** model.
|
|
237
|
+
* Example usage:
|
|
238
|
+
* ```ts
|
|
239
|
+
* // Fetch zero or more Artifacts
|
|
240
|
+
* const artifacts = await prisma.artifact.findMany()
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
get artifact(): Prisma.ArtifactDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* `prisma.instanceCustomStatus`: Exposes CRUD operations for the **InstanceCustomStatus** model.
|
|
247
|
+
* Example usage:
|
|
248
|
+
* ```ts
|
|
249
|
+
* // Fetch zero or more InstanceCustomStatuses
|
|
250
|
+
* const instanceCustomStatuses = await prisma.instanceCustomStatus.findMany()
|
|
251
|
+
* ```
|
|
252
|
+
*/
|
|
253
|
+
get instanceCustomStatus(): Prisma.InstanceCustomStatusDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* `prisma.instanceEvaluationState`: Exposes CRUD operations for the **InstanceEvaluationState** model.
|
|
257
|
+
* Example usage:
|
|
258
|
+
* ```ts
|
|
259
|
+
* // Fetch zero or more InstanceEvaluationStates
|
|
260
|
+
* const instanceEvaluationStates = await prisma.instanceEvaluationState.findMany()
|
|
261
|
+
* ```
|
|
262
|
+
*/
|
|
263
|
+
get instanceEvaluationState(): Prisma.InstanceEvaluationStateDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* `prisma.instanceState`: Exposes CRUD operations for the **InstanceState** model.
|
|
267
|
+
* Example usage:
|
|
268
|
+
* ```ts
|
|
269
|
+
* // Fetch zero or more InstanceStates
|
|
270
|
+
* const instanceStates = await prisma.instanceState.findMany()
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
get instanceState(): Prisma.InstanceStateDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* `prisma.userProjectViewport`: Exposes CRUD operations for the **UserProjectViewport** model.
|
|
277
|
+
* Example usage:
|
|
278
|
+
* ```ts
|
|
279
|
+
* // Fetch zero or more UserProjectViewports
|
|
280
|
+
* const userProjectViewports = await prisma.userProjectViewport.findMany()
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
get userProjectViewport(): Prisma.UserProjectViewportDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* `prisma.userCompositeViewport`: Exposes CRUD operations for the **UserCompositeViewport** model.
|
|
287
|
+
* Example usage:
|
|
288
|
+
* ```ts
|
|
289
|
+
* // Fetch zero or more UserCompositeViewports
|
|
290
|
+
* const userCompositeViewports = await prisma.userCompositeViewport.findMany()
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
get userCompositeViewport(): Prisma.UserCompositeViewportDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* `prisma.instanceLock`: Exposes CRUD operations for the **InstanceLock** model.
|
|
297
|
+
* Example usage:
|
|
298
|
+
* ```ts
|
|
299
|
+
* // Fetch zero or more InstanceLocks
|
|
300
|
+
* const instanceLocks = await prisma.instanceLock.findMany()
|
|
301
|
+
* ```
|
|
302
|
+
*/
|
|
303
|
+
get instanceLock(): Prisma.InstanceLockDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* `prisma.instanceModel`: Exposes CRUD operations for the **InstanceModel** model.
|
|
307
|
+
* Example usage:
|
|
308
|
+
* ```ts
|
|
309
|
+
* // Fetch zero or more InstanceModels
|
|
310
|
+
* const instanceModels = await prisma.instanceModel.findMany()
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
get instanceModel(): Prisma.InstanceModelDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* `prisma.hubModel`: Exposes CRUD operations for the **HubModel** model.
|
|
317
|
+
* Example usage:
|
|
318
|
+
* ```ts
|
|
319
|
+
* // Fetch zero or more HubModels
|
|
320
|
+
* const hubModels = await prisma.hubModel.findMany()
|
|
321
|
+
* ```
|
|
322
|
+
*/
|
|
323
|
+
get hubModel(): Prisma.HubModelDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* `prisma.operation`: Exposes CRUD operations for the **Operation** model.
|
|
327
|
+
* Example usage:
|
|
328
|
+
* ```ts
|
|
329
|
+
* // Fetch zero or more Operations
|
|
330
|
+
* const operations = await prisma.operation.findMany()
|
|
331
|
+
* ```
|
|
332
|
+
*/
|
|
333
|
+
get operation(): Prisma.OperationDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* `prisma.instanceOperationState`: Exposes CRUD operations for the **InstanceOperationState** model.
|
|
337
|
+
* Example usage:
|
|
338
|
+
* ```ts
|
|
339
|
+
* // Fetch zero or more InstanceOperationStates
|
|
340
|
+
* const instanceOperationStates = await prisma.instanceOperationState.findMany()
|
|
341
|
+
* ```
|
|
342
|
+
*/
|
|
343
|
+
get instanceOperationState(): Prisma.InstanceOperationStateDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* `prisma.operationLog`: Exposes CRUD operations for the **OperationLog** model.
|
|
347
|
+
* Example usage:
|
|
348
|
+
* ```ts
|
|
349
|
+
* // Fetch zero or more OperationLogs
|
|
350
|
+
* const operationLogs = await prisma.operationLog.findMany()
|
|
351
|
+
* ```
|
|
352
|
+
*/
|
|
353
|
+
get operationLog(): Prisma.OperationLogDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* `prisma.page`: Exposes CRUD operations for the **Page** model.
|
|
357
|
+
* Example usage:
|
|
358
|
+
* ```ts
|
|
359
|
+
* // Fetch zero or more Pages
|
|
360
|
+
* const pages = await prisma.page.findMany()
|
|
361
|
+
* ```
|
|
362
|
+
*/
|
|
363
|
+
get page(): Prisma.PageDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* `prisma.secret`: Exposes CRUD operations for the **Secret** model.
|
|
367
|
+
* Example usage:
|
|
368
|
+
* ```ts
|
|
369
|
+
* // Fetch zero or more Secrets
|
|
370
|
+
* const secrets = await prisma.secret.findMany()
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
get secret(): Prisma.SecretDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* `prisma.serviceAccount`: Exposes CRUD operations for the **ServiceAccount** model.
|
|
377
|
+
* Example usage:
|
|
378
|
+
* ```ts
|
|
379
|
+
* // Fetch zero or more ServiceAccounts
|
|
380
|
+
* const serviceAccounts = await prisma.serviceAccount.findMany()
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
get serviceAccount(): Prisma.ServiceAccountDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* `prisma.terminal`: Exposes CRUD operations for the **Terminal** model.
|
|
387
|
+
* Example usage:
|
|
388
|
+
* ```ts
|
|
389
|
+
* // Fetch zero or more Terminals
|
|
390
|
+
* const terminals = await prisma.terminal.findMany()
|
|
391
|
+
* ```
|
|
392
|
+
*/
|
|
393
|
+
get terminal(): Prisma.TerminalDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* `prisma.terminalSession`: Exposes CRUD operations for the **TerminalSession** model.
|
|
397
|
+
* Example usage:
|
|
398
|
+
* ```ts
|
|
399
|
+
* // Fetch zero or more TerminalSessions
|
|
400
|
+
* const terminalSessions = await prisma.terminalSession.findMany()
|
|
401
|
+
* ```
|
|
402
|
+
*/
|
|
403
|
+
get terminalSession(): Prisma.TerminalSessionDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* `prisma.terminalSessionLog`: Exposes CRUD operations for the **TerminalSessionLog** model.
|
|
407
|
+
* Example usage:
|
|
408
|
+
* ```ts
|
|
409
|
+
* // Fetch zero or more TerminalSessionLogs
|
|
410
|
+
* const terminalSessionLogs = await prisma.terminalSessionLog.findMany()
|
|
411
|
+
* ```
|
|
412
|
+
*/
|
|
413
|
+
get terminalSessionLog(): Prisma.TerminalSessionLogDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* `prisma.trigger`: Exposes CRUD operations for the **Trigger** model.
|
|
417
|
+
* Example usage:
|
|
418
|
+
* ```ts
|
|
419
|
+
* // Fetch zero or more Triggers
|
|
420
|
+
* const triggers = await prisma.trigger.findMany()
|
|
421
|
+
* ```
|
|
422
|
+
*/
|
|
423
|
+
get trigger(): Prisma.TriggerDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* `prisma.unlockMethod`: Exposes CRUD operations for the **UnlockMethod** model.
|
|
427
|
+
* Example usage:
|
|
428
|
+
* ```ts
|
|
429
|
+
* // Fetch zero or more UnlockMethods
|
|
430
|
+
* const unlockMethods = await prisma.unlockMethod.findMany()
|
|
431
|
+
* ```
|
|
432
|
+
*/
|
|
433
|
+
get unlockMethod(): Prisma.UnlockMethodDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* `prisma.worker`: Exposes CRUD operations for the **Worker** model.
|
|
437
|
+
* Example usage:
|
|
438
|
+
* ```ts
|
|
439
|
+
* // Fetch zero or more Workers
|
|
440
|
+
* const workers = await prisma.worker.findMany()
|
|
441
|
+
* ```
|
|
442
|
+
*/
|
|
443
|
+
get worker(): Prisma.WorkerDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* `prisma.workerVersion`: Exposes CRUD operations for the **WorkerVersion** model.
|
|
447
|
+
* Example usage:
|
|
448
|
+
* ```ts
|
|
449
|
+
* // Fetch zero or more WorkerVersions
|
|
450
|
+
* const workerVersions = await prisma.workerVersion.findMany()
|
|
451
|
+
* ```
|
|
452
|
+
*/
|
|
453
|
+
get workerVersion(): Prisma.WorkerVersionDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* `prisma.workerUnitRegistration`: Exposes CRUD operations for the **WorkerUnitRegistration** model.
|
|
457
|
+
* Example usage:
|
|
458
|
+
* ```ts
|
|
459
|
+
* // Fetch zero or more WorkerUnitRegistrations
|
|
460
|
+
* const workerUnitRegistrations = await prisma.workerUnitRegistration.findMany()
|
|
461
|
+
* ```
|
|
462
|
+
*/
|
|
463
|
+
get workerUnitRegistration(): Prisma.WorkerUnitRegistrationDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* `prisma.workerVersionLog`: Exposes CRUD operations for the **WorkerVersionLog** model.
|
|
467
|
+
* Example usage:
|
|
468
|
+
* ```ts
|
|
469
|
+
* // Fetch zero or more WorkerVersionLogs
|
|
470
|
+
* const workerVersionLogs = await prisma.workerVersionLog.findMany()
|
|
471
|
+
* ```
|
|
472
|
+
*/
|
|
473
|
+
get workerVersionLog(): Prisma.WorkerVersionLogDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export function getPrismaClientClass(dirname: string): PrismaClientConstructor {
|
|
477
|
+
config.dirname = dirname
|
|
478
|
+
return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
|
|
479
|
+
}
|