@friggframework/core 2.0.0-next.8 → 2.0.0-next.80
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/CLAUDE.md +694 -0
- package/README.md +959 -50
- package/application/commands/README.md +451 -0
- package/application/commands/credential-commands.js +245 -0
- package/application/commands/entity-commands.js +336 -0
- package/application/commands/integration-commands.js +210 -0
- package/application/commands/scheduler-commands.js +263 -0
- package/application/commands/user-commands.js +283 -0
- package/application/index.js +73 -0
- package/assertions/index.js +0 -3
- package/core/CLAUDE.md +690 -0
- package/core/Worker.js +60 -24
- package/core/create-handler.js +79 -8
- package/credential/repositories/credential-repository-documentdb.js +304 -0
- package/credential/repositories/credential-repository-factory.js +54 -0
- package/credential/repositories/credential-repository-interface.js +98 -0
- package/credential/repositories/credential-repository-mongo.js +269 -0
- package/credential/repositories/credential-repository-postgres.js +287 -0
- package/credential/repositories/credential-repository.js +300 -0
- package/credential/use-cases/get-credential-for-user.js +25 -0
- package/credential/use-cases/update-authentication-status.js +15 -0
- package/database/MONGODB_TRANSACTION_FIX.md +198 -0
- package/database/adapters/lambda-invoker.js +97 -0
- package/database/config.js +154 -0
- package/database/documentdb-encryption-service.js +330 -0
- package/database/documentdb-utils.js +136 -0
- package/database/encryption/README.md +839 -0
- package/database/encryption/documentdb-encryption-service.md +3575 -0
- package/database/encryption/encryption-schema-registry.js +268 -0
- package/database/encryption/field-encryption-service.js +226 -0
- package/database/encryption/logger.js +79 -0
- package/database/encryption/prisma-encryption-extension.js +222 -0
- package/database/index.js +21 -21
- package/database/prisma.js +182 -0
- package/database/repositories/health-check-repository-documentdb.js +138 -0
- package/database/repositories/health-check-repository-factory.js +48 -0
- package/database/repositories/health-check-repository-interface.js +82 -0
- package/database/repositories/health-check-repository-mongodb.js +89 -0
- package/database/repositories/health-check-repository-postgres.js +82 -0
- package/database/repositories/migration-status-repository-s3.js +137 -0
- package/database/use-cases/check-database-health-use-case.js +29 -0
- package/database/use-cases/check-database-state-use-case.js +81 -0
- package/database/use-cases/check-encryption-health-use-case.js +83 -0
- package/database/use-cases/get-database-state-via-worker-use-case.js +61 -0
- package/database/use-cases/get-migration-status-use-case.js +93 -0
- package/database/use-cases/run-database-migration-use-case.js +139 -0
- package/database/use-cases/test-encryption-use-case.js +253 -0
- package/database/use-cases/trigger-database-migration-use-case.js +157 -0
- package/database/utils/mongodb-collection-utils.js +94 -0
- package/database/utils/mongodb-schema-init.js +108 -0
- package/database/utils/prisma-runner.js +477 -0
- package/database/utils/prisma-schema-parser.js +182 -0
- package/docs/PROCESS_MANAGEMENT_QUEUE_SPEC.md +517 -0
- package/encrypt/Cryptor.js +34 -168
- package/encrypt/index.js +1 -2
- package/errors/client-safe-error.js +26 -0
- package/errors/fetch-error.js +15 -7
- package/errors/index.js +2 -0
- package/generated/prisma-mongodb/client.d.ts +1 -0
- package/generated/prisma-mongodb/client.js +4 -0
- package/generated/prisma-mongodb/default.d.ts +1 -0
- package/generated/prisma-mongodb/default.js +4 -0
- package/generated/prisma-mongodb/edge.d.ts +1 -0
- package/generated/prisma-mongodb/edge.js +335 -0
- package/generated/prisma-mongodb/index-browser.js +317 -0
- package/generated/prisma-mongodb/index.d.ts +22955 -0
- package/generated/prisma-mongodb/index.js +360 -0
- package/generated/prisma-mongodb/package.json +183 -0
- package/generated/prisma-mongodb/query-engine-debian-openssl-3.0.x +0 -0
- package/generated/prisma-mongodb/query-engine-rhel-openssl-3.0.x +0 -0
- package/generated/prisma-mongodb/runtime/binary.d.ts +1 -0
- package/generated/prisma-mongodb/runtime/binary.js +289 -0
- package/generated/prisma-mongodb/runtime/edge-esm.js +34 -0
- package/generated/prisma-mongodb/runtime/edge.js +34 -0
- package/generated/prisma-mongodb/runtime/index-browser.d.ts +370 -0
- package/generated/prisma-mongodb/runtime/index-browser.js +16 -0
- package/generated/prisma-mongodb/runtime/library.d.ts +3977 -0
- package/generated/prisma-mongodb/runtime/react-native.js +83 -0
- package/generated/prisma-mongodb/runtime/wasm-compiler-edge.js +84 -0
- package/generated/prisma-mongodb/runtime/wasm-engine-edge.js +36 -0
- package/generated/prisma-mongodb/schema.prisma +362 -0
- package/generated/prisma-mongodb/wasm-edge-light-loader.mjs +4 -0
- package/generated/prisma-mongodb/wasm-worker-loader.mjs +4 -0
- package/generated/prisma-mongodb/wasm.d.ts +1 -0
- package/generated/prisma-mongodb/wasm.js +342 -0
- package/generated/prisma-postgresql/client.d.ts +1 -0
- package/generated/prisma-postgresql/client.js +4 -0
- package/generated/prisma-postgresql/default.d.ts +1 -0
- package/generated/prisma-postgresql/default.js +4 -0
- package/generated/prisma-postgresql/edge.d.ts +1 -0
- package/generated/prisma-postgresql/edge.js +357 -0
- package/generated/prisma-postgresql/index-browser.js +339 -0
- package/generated/prisma-postgresql/index.d.ts +25131 -0
- package/generated/prisma-postgresql/index.js +382 -0
- package/generated/prisma-postgresql/package.json +183 -0
- package/generated/prisma-postgresql/query-engine-debian-openssl-3.0.x +0 -0
- package/generated/prisma-postgresql/query-engine-rhel-openssl-3.0.x +0 -0
- package/generated/prisma-postgresql/query_engine_bg.js +2 -0
- package/generated/prisma-postgresql/query_engine_bg.wasm +0 -0
- package/generated/prisma-postgresql/runtime/binary.d.ts +1 -0
- package/generated/prisma-postgresql/runtime/binary.js +289 -0
- package/generated/prisma-postgresql/runtime/edge-esm.js +34 -0
- package/generated/prisma-postgresql/runtime/edge.js +34 -0
- package/generated/prisma-postgresql/runtime/index-browser.d.ts +370 -0
- package/generated/prisma-postgresql/runtime/index-browser.js +16 -0
- package/generated/prisma-postgresql/runtime/library.d.ts +3977 -0
- package/generated/prisma-postgresql/runtime/react-native.js +83 -0
- package/generated/prisma-postgresql/runtime/wasm-compiler-edge.js +84 -0
- package/generated/prisma-postgresql/runtime/wasm-engine-edge.js +36 -0
- package/generated/prisma-postgresql/schema.prisma +345 -0
- package/generated/prisma-postgresql/wasm-edge-light-loader.mjs +4 -0
- package/generated/prisma-postgresql/wasm-worker-loader.mjs +4 -0
- package/generated/prisma-postgresql/wasm.d.ts +1 -0
- package/generated/prisma-postgresql/wasm.js +364 -0
- package/handlers/WEBHOOKS.md +653 -0
- package/handlers/app-definition-loader.js +38 -0
- package/handlers/app-handler-helpers.js +57 -0
- package/handlers/backend-utils.js +262 -0
- package/handlers/database-migration-handler.js +227 -0
- package/handlers/integration-event-dispatcher.js +54 -0
- package/handlers/routers/HEALTHCHECK.md +342 -0
- package/handlers/routers/auth.js +15 -0
- package/handlers/routers/db-migration.handler.js +29 -0
- package/handlers/routers/db-migration.js +326 -0
- package/handlers/routers/health.js +516 -0
- package/handlers/routers/integration-defined-routers.js +45 -0
- package/handlers/routers/integration-webhook-routers.js +67 -0
- package/handlers/routers/user.js +63 -0
- package/handlers/routers/websocket.js +57 -0
- package/handlers/use-cases/check-external-apis-health-use-case.js +81 -0
- package/handlers/use-cases/check-integrations-health-use-case.js +44 -0
- package/handlers/workers/db-migration.js +352 -0
- package/handlers/workers/dlq-processor.js +63 -0
- package/handlers/workers/integration-defined-workers.js +23 -0
- package/index.js +82 -46
- package/infrastructure/scheduler/eventbridge-scheduler-adapter.js +184 -0
- package/infrastructure/scheduler/index.js +33 -0
- package/infrastructure/scheduler/mock-scheduler-adapter.js +143 -0
- package/infrastructure/scheduler/scheduler-service-factory.js +73 -0
- package/infrastructure/scheduler/scheduler-service-interface.js +47 -0
- package/integrations/WEBHOOK-QUICKSTART.md +151 -0
- package/integrations/index.js +12 -10
- package/integrations/integration-base.js +364 -55
- package/integrations/integration-router.js +375 -179
- package/integrations/options.js +1 -1
- package/integrations/repositories/integration-mapping-repository-documentdb.js +280 -0
- package/integrations/repositories/integration-mapping-repository-factory.js +57 -0
- package/integrations/repositories/integration-mapping-repository-interface.js +106 -0
- package/integrations/repositories/integration-mapping-repository-mongo.js +161 -0
- package/integrations/repositories/integration-mapping-repository-postgres.js +227 -0
- package/integrations/repositories/integration-mapping-repository.js +156 -0
- package/integrations/repositories/integration-repository-documentdb.js +219 -0
- package/integrations/repositories/integration-repository-factory.js +51 -0
- package/integrations/repositories/integration-repository-interface.js +144 -0
- package/integrations/repositories/integration-repository-mongo.js +330 -0
- package/integrations/repositories/integration-repository-postgres.js +385 -0
- package/integrations/repositories/process-repository-documentdb.js +243 -0
- package/integrations/repositories/process-repository-factory.js +53 -0
- package/integrations/repositories/process-repository-interface.js +90 -0
- package/integrations/repositories/process-repository-mongo.js +190 -0
- package/integrations/repositories/process-repository-postgres.js +217 -0
- package/integrations/tests/doubles/config-capturing-integration.js +81 -0
- package/integrations/tests/doubles/dummy-integration-class.js +105 -0
- package/integrations/tests/doubles/test-integration-repository.js +112 -0
- package/integrations/use-cases/create-integration.js +83 -0
- package/integrations/use-cases/create-process.js +128 -0
- package/integrations/use-cases/delete-integration-for-user.js +101 -0
- package/integrations/use-cases/find-integration-context-by-external-entity-id.js +72 -0
- package/integrations/use-cases/get-integration-for-user.js +78 -0
- package/integrations/use-cases/get-integration-instance-by-definition.js +67 -0
- package/integrations/use-cases/get-integration-instance.js +83 -0
- package/integrations/use-cases/get-integrations-for-user.js +88 -0
- package/integrations/use-cases/get-possible-integrations.js +27 -0
- package/integrations/use-cases/get-process.js +87 -0
- package/integrations/use-cases/index.js +19 -0
- package/integrations/use-cases/load-integration-context.js +71 -0
- package/integrations/use-cases/update-integration-messages.js +44 -0
- package/integrations/use-cases/update-integration-status.js +32 -0
- package/integrations/use-cases/update-integration.js +92 -0
- package/integrations/use-cases/update-process-metrics.js +201 -0
- package/integrations/use-cases/update-process-state.js +119 -0
- package/integrations/utils/map-integration-dto.js +37 -0
- package/jest-global-setup-noop.js +3 -0
- package/jest-global-teardown-noop.js +3 -0
- package/logs/logger.js +0 -4
- package/{module-plugin → modules}/index.js +0 -10
- package/modules/module-factory.js +56 -0
- package/modules/module.js +256 -0
- package/modules/repositories/module-repository-documentdb.js +335 -0
- package/modules/repositories/module-repository-factory.js +40 -0
- package/modules/repositories/module-repository-interface.js +129 -0
- package/modules/repositories/module-repository-mongo.js +408 -0
- package/modules/repositories/module-repository-postgres.js +453 -0
- package/modules/repositories/module-repository.js +345 -0
- package/modules/requester/api-key.js +52 -0
- package/modules/requester/oauth-2.js +396 -0
- package/{module-plugin → modules}/requester/requester.js +4 -2
- package/{module-plugin → modules}/test/mock-api/api.js +8 -3
- package/{module-plugin → modules}/test/mock-api/definition.js +14 -10
- package/modules/tests/doubles/test-module-factory.js +16 -0
- package/modules/tests/doubles/test-module-repository.js +39 -0
- package/modules/use-cases/get-entities-for-user.js +32 -0
- package/modules/use-cases/get-entity-options-by-id.js +71 -0
- package/modules/use-cases/get-entity-options-by-type.js +34 -0
- package/modules/use-cases/get-module-instance-from-type.js +31 -0
- package/modules/use-cases/get-module.js +74 -0
- package/modules/use-cases/process-authorization-callback.js +177 -0
- package/modules/use-cases/refresh-entity-options.js +72 -0
- package/modules/use-cases/test-module-auth.js +72 -0
- package/modules/utils/map-module-dto.js +18 -0
- package/package.json +82 -50
- package/prisma-mongodb/schema.prisma +362 -0
- package/prisma-postgresql/migrations/20250930193005_init/migration.sql +315 -0
- package/prisma-postgresql/migrations/20251006135218_init/migration.sql +9 -0
- package/prisma-postgresql/migrations/20251010000000_remove_unused_entity_reference_map/migration.sql +3 -0
- package/prisma-postgresql/migrations/20251112195422_update_user_unique_constraints/migration.sql +25 -0
- package/prisma-postgresql/migrations/migration_lock.toml +3 -0
- package/prisma-postgresql/schema.prisma +345 -0
- package/queues/queuer-util.js +103 -21
- package/syncs/manager.js +468 -443
- package/syncs/repositories/sync-repository-documentdb.js +240 -0
- package/syncs/repositories/sync-repository-factory.js +43 -0
- package/syncs/repositories/sync-repository-interface.js +109 -0
- package/syncs/repositories/sync-repository-mongo.js +239 -0
- package/syncs/repositories/sync-repository-postgres.js +319 -0
- package/syncs/sync.js +0 -1
- package/token/repositories/token-repository-documentdb.js +137 -0
- package/token/repositories/token-repository-factory.js +40 -0
- package/token/repositories/token-repository-interface.js +131 -0
- package/token/repositories/token-repository-mongo.js +219 -0
- package/token/repositories/token-repository-postgres.js +264 -0
- package/token/repositories/token-repository.js +219 -0
- package/types/associations/index.d.ts +0 -17
- package/types/core/index.d.ts +12 -4
- package/types/database/index.d.ts +10 -2
- package/types/encrypt/index.d.ts +5 -3
- package/types/integrations/index.d.ts +3 -8
- package/types/module-plugin/index.d.ts +17 -69
- package/types/syncs/index.d.ts +0 -17
- package/user/repositories/user-repository-documentdb.js +441 -0
- package/user/repositories/user-repository-factory.js +52 -0
- package/user/repositories/user-repository-interface.js +201 -0
- package/user/repositories/user-repository-mongo.js +308 -0
- package/user/repositories/user-repository-postgres.js +360 -0
- package/user/tests/doubles/test-user-repository.js +72 -0
- package/user/use-cases/authenticate-user.js +127 -0
- package/user/use-cases/authenticate-with-shared-secret.js +48 -0
- package/user/use-cases/create-individual-user.js +61 -0
- package/user/use-cases/create-organization-user.js +47 -0
- package/user/use-cases/create-token-for-user-id.js +30 -0
- package/user/use-cases/get-user-from-adopter-jwt.js +149 -0
- package/user/use-cases/get-user-from-bearer-token.js +77 -0
- package/user/use-cases/get-user-from-x-frigg-headers.js +132 -0
- package/user/use-cases/login-user.js +122 -0
- package/user/user.js +125 -0
- package/utils/backend-path.js +38 -0
- package/utils/index.js +6 -0
- package/websocket/repositories/websocket-connection-repository-documentdb.js +119 -0
- package/websocket/repositories/websocket-connection-repository-factory.js +44 -0
- package/websocket/repositories/websocket-connection-repository-interface.js +106 -0
- package/websocket/repositories/websocket-connection-repository-mongo.js +156 -0
- package/websocket/repositories/websocket-connection-repository-postgres.js +196 -0
- package/websocket/repositories/websocket-connection-repository.js +161 -0
- package/assertions/is-equal.js +0 -17
- package/associations/model.js +0 -54
- package/database/models/IndividualUser.js +0 -76
- package/database/models/OrganizationUser.js +0 -29
- package/database/models/State.js +0 -9
- package/database/models/Token.js +0 -70
- package/database/models/UserModel.js +0 -7
- package/database/models/WebsocketConnection.js +0 -49
- package/database/mongo.js +0 -45
- package/database/mongoose.js +0 -5
- package/encrypt/Cryptor.test.js +0 -32
- package/encrypt/encrypt.js +0 -132
- package/encrypt/encrypt.test.js +0 -1069
- package/encrypt/test-encrypt.js +0 -107
- package/errors/base-error.test.js +0 -32
- package/errors/fetch-error.test.js +0 -79
- package/errors/halt-error.test.js +0 -11
- package/errors/validation-errors.test.js +0 -120
- package/integrations/create-frigg-backend.js +0 -31
- package/integrations/integration-factory.js +0 -251
- package/integrations/integration-mapping.js +0 -43
- package/integrations/integration-model.js +0 -46
- package/integrations/integration-user.js +0 -144
- package/integrations/test/integration-base.test.js +0 -144
- package/lambda/TimeoutCatcher.test.js +0 -68
- package/logs/logger.test.js +0 -76
- package/module-plugin/auther.js +0 -393
- package/module-plugin/credential.js +0 -22
- package/module-plugin/entity-manager.js +0 -70
- package/module-plugin/entity.js +0 -46
- package/module-plugin/manager.js +0 -169
- package/module-plugin/module-factory.js +0 -61
- package/module-plugin/requester/api-key.js +0 -36
- package/module-plugin/requester/oauth-2.js +0 -219
- package/module-plugin/requester/requester.test.js +0 -28
- package/module-plugin/test/auther.test.js +0 -97
- package/syncs/model.js +0 -62
- /package/{module-plugin → modules}/ModuleConstants.js +0 -0
- /package/{module-plugin → modules}/requester/basic.js +0 -0
- /package/{module-plugin → modules}/test/mock-api/mocks/hubspot.js +0 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
|
|
2
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!!
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
|
|
7
|
+
const {
|
|
8
|
+
Decimal,
|
|
9
|
+
objectEnumValues,
|
|
10
|
+
makeStrictEnum,
|
|
11
|
+
Public,
|
|
12
|
+
getRuntime,
|
|
13
|
+
skip
|
|
14
|
+
} = require('./runtime/index-browser.js')
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
const Prisma = {}
|
|
18
|
+
|
|
19
|
+
exports.Prisma = Prisma
|
|
20
|
+
exports.$Enums = {}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Prisma Client JS version: 6.17.0
|
|
24
|
+
* Query Engine version: c0aafc03b8ef6cdced8654b9a817999e02457d6a
|
|
25
|
+
*/
|
|
26
|
+
Prisma.prismaVersion = {
|
|
27
|
+
client: "6.17.0",
|
|
28
|
+
engine: "c0aafc03b8ef6cdced8654b9a817999e02457d6a"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
Prisma.PrismaClientKnownRequestError = () => {
|
|
32
|
+
const runtimeName = getRuntime().prettyName;
|
|
33
|
+
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
34
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
35
|
+
)};
|
|
36
|
+
Prisma.PrismaClientUnknownRequestError = () => {
|
|
37
|
+
const runtimeName = getRuntime().prettyName;
|
|
38
|
+
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
39
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
40
|
+
)}
|
|
41
|
+
Prisma.PrismaClientRustPanicError = () => {
|
|
42
|
+
const runtimeName = getRuntime().prettyName;
|
|
43
|
+
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
44
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
45
|
+
)}
|
|
46
|
+
Prisma.PrismaClientInitializationError = () => {
|
|
47
|
+
const runtimeName = getRuntime().prettyName;
|
|
48
|
+
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
49
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
50
|
+
)}
|
|
51
|
+
Prisma.PrismaClientValidationError = () => {
|
|
52
|
+
const runtimeName = getRuntime().prettyName;
|
|
53
|
+
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
54
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
55
|
+
)}
|
|
56
|
+
Prisma.Decimal = Decimal
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Re-export of sql-template-tag
|
|
60
|
+
*/
|
|
61
|
+
Prisma.sql = () => {
|
|
62
|
+
const runtimeName = getRuntime().prettyName;
|
|
63
|
+
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
64
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
65
|
+
)}
|
|
66
|
+
Prisma.empty = () => {
|
|
67
|
+
const runtimeName = getRuntime().prettyName;
|
|
68
|
+
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
69
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
70
|
+
)}
|
|
71
|
+
Prisma.join = () => {
|
|
72
|
+
const runtimeName = getRuntime().prettyName;
|
|
73
|
+
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
74
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
75
|
+
)}
|
|
76
|
+
Prisma.raw = () => {
|
|
77
|
+
const runtimeName = getRuntime().prettyName;
|
|
78
|
+
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
79
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
80
|
+
)}
|
|
81
|
+
Prisma.validator = Public.validator
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Extensions
|
|
85
|
+
*/
|
|
86
|
+
Prisma.getExtensionContext = () => {
|
|
87
|
+
const runtimeName = getRuntime().prettyName;
|
|
88
|
+
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
89
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
90
|
+
)}
|
|
91
|
+
Prisma.defineExtension = () => {
|
|
92
|
+
const runtimeName = getRuntime().prettyName;
|
|
93
|
+
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
|
|
94
|
+
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
|
|
95
|
+
)}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Shorthand utilities for JSON filtering
|
|
99
|
+
*/
|
|
100
|
+
Prisma.DbNull = objectEnumValues.instances.DbNull
|
|
101
|
+
Prisma.JsonNull = objectEnumValues.instances.JsonNull
|
|
102
|
+
Prisma.AnyNull = objectEnumValues.instances.AnyNull
|
|
103
|
+
|
|
104
|
+
Prisma.NullTypes = {
|
|
105
|
+
DbNull: objectEnumValues.classes.DbNull,
|
|
106
|
+
JsonNull: objectEnumValues.classes.JsonNull,
|
|
107
|
+
AnyNull: objectEnumValues.classes.AnyNull
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Enums
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
|
|
117
|
+
ReadUncommitted: 'ReadUncommitted',
|
|
118
|
+
ReadCommitted: 'ReadCommitted',
|
|
119
|
+
RepeatableRead: 'RepeatableRead',
|
|
120
|
+
Serializable: 'Serializable'
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
exports.Prisma.UserScalarFieldEnum = {
|
|
124
|
+
id: 'id',
|
|
125
|
+
type: 'type',
|
|
126
|
+
createdAt: 'createdAt',
|
|
127
|
+
updatedAt: 'updatedAt',
|
|
128
|
+
email: 'email',
|
|
129
|
+
username: 'username',
|
|
130
|
+
hashword: 'hashword',
|
|
131
|
+
appUserId: 'appUserId',
|
|
132
|
+
organizationId: 'organizationId',
|
|
133
|
+
appOrgId: 'appOrgId',
|
|
134
|
+
name: 'name'
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
exports.Prisma.TokenScalarFieldEnum = {
|
|
138
|
+
id: 'id',
|
|
139
|
+
token: 'token',
|
|
140
|
+
created: 'created',
|
|
141
|
+
expires: 'expires',
|
|
142
|
+
userId: 'userId'
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
exports.Prisma.CredentialScalarFieldEnum = {
|
|
146
|
+
id: 'id',
|
|
147
|
+
userId: 'userId',
|
|
148
|
+
authIsValid: 'authIsValid',
|
|
149
|
+
externalId: 'externalId',
|
|
150
|
+
data: 'data',
|
|
151
|
+
createdAt: 'createdAt',
|
|
152
|
+
updatedAt: 'updatedAt'
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
exports.Prisma.EntityScalarFieldEnum = {
|
|
156
|
+
id: 'id',
|
|
157
|
+
credentialId: 'credentialId',
|
|
158
|
+
userId: 'userId',
|
|
159
|
+
name: 'name',
|
|
160
|
+
moduleName: 'moduleName',
|
|
161
|
+
externalId: 'externalId',
|
|
162
|
+
data: 'data',
|
|
163
|
+
createdAt: 'createdAt',
|
|
164
|
+
updatedAt: 'updatedAt'
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
exports.Prisma.IntegrationScalarFieldEnum = {
|
|
168
|
+
id: 'id',
|
|
169
|
+
userId: 'userId',
|
|
170
|
+
status: 'status',
|
|
171
|
+
config: 'config',
|
|
172
|
+
version: 'version',
|
|
173
|
+
errors: 'errors',
|
|
174
|
+
warnings: 'warnings',
|
|
175
|
+
info: 'info',
|
|
176
|
+
logs: 'logs',
|
|
177
|
+
createdAt: 'createdAt',
|
|
178
|
+
updatedAt: 'updatedAt'
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
exports.Prisma.IntegrationMappingScalarFieldEnum = {
|
|
182
|
+
id: 'id',
|
|
183
|
+
integrationId: 'integrationId',
|
|
184
|
+
sourceId: 'sourceId',
|
|
185
|
+
mapping: 'mapping',
|
|
186
|
+
createdAt: 'createdAt',
|
|
187
|
+
updatedAt: 'updatedAt'
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
exports.Prisma.SyncScalarFieldEnum = {
|
|
191
|
+
id: 'id',
|
|
192
|
+
integrationId: 'integrationId',
|
|
193
|
+
hash: 'hash',
|
|
194
|
+
name: 'name'
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
exports.Prisma.DataIdentifierScalarFieldEnum = {
|
|
198
|
+
id: 'id',
|
|
199
|
+
syncId: 'syncId',
|
|
200
|
+
entityId: 'entityId',
|
|
201
|
+
idData: 'idData',
|
|
202
|
+
hash: 'hash'
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
exports.Prisma.AssociationScalarFieldEnum = {
|
|
206
|
+
id: 'id',
|
|
207
|
+
integrationId: 'integrationId',
|
|
208
|
+
name: 'name',
|
|
209
|
+
type: 'type',
|
|
210
|
+
primaryObject: 'primaryObject'
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
exports.Prisma.AssociationObjectScalarFieldEnum = {
|
|
214
|
+
id: 'id',
|
|
215
|
+
associationId: 'associationId',
|
|
216
|
+
entityId: 'entityId',
|
|
217
|
+
objectType: 'objectType',
|
|
218
|
+
objId: 'objId',
|
|
219
|
+
metadata: 'metadata'
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
exports.Prisma.ProcessScalarFieldEnum = {
|
|
223
|
+
id: 'id',
|
|
224
|
+
userId: 'userId',
|
|
225
|
+
integrationId: 'integrationId',
|
|
226
|
+
name: 'name',
|
|
227
|
+
type: 'type',
|
|
228
|
+
state: 'state',
|
|
229
|
+
context: 'context',
|
|
230
|
+
results: 'results',
|
|
231
|
+
parentProcessId: 'parentProcessId',
|
|
232
|
+
createdAt: 'createdAt',
|
|
233
|
+
updatedAt: 'updatedAt'
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
exports.Prisma.StateScalarFieldEnum = {
|
|
237
|
+
id: 'id',
|
|
238
|
+
state: 'state'
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
exports.Prisma.WebsocketConnectionScalarFieldEnum = {
|
|
242
|
+
id: 'id',
|
|
243
|
+
connectionId: 'connectionId'
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
exports.Prisma.SortOrder = {
|
|
247
|
+
asc: 'asc',
|
|
248
|
+
desc: 'desc'
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
exports.Prisma.JsonNullValueInput = {
|
|
252
|
+
JsonNull: Prisma.JsonNull
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
exports.Prisma.NullableJsonNullValueInput = {
|
|
256
|
+
DbNull: Prisma.DbNull,
|
|
257
|
+
JsonNull: Prisma.JsonNull
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
exports.Prisma.QueryMode = {
|
|
261
|
+
default: 'default',
|
|
262
|
+
insensitive: 'insensitive'
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
exports.Prisma.NullsOrder = {
|
|
266
|
+
first: 'first',
|
|
267
|
+
last: 'last'
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
exports.Prisma.JsonNullValueFilter = {
|
|
271
|
+
DbNull: Prisma.DbNull,
|
|
272
|
+
JsonNull: Prisma.JsonNull,
|
|
273
|
+
AnyNull: Prisma.AnyNull
|
|
274
|
+
};
|
|
275
|
+
exports.UserType = exports.$Enums.UserType = {
|
|
276
|
+
INDIVIDUAL: 'INDIVIDUAL',
|
|
277
|
+
ORGANIZATION: 'ORGANIZATION'
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
exports.IntegrationStatus = exports.$Enums.IntegrationStatus = {
|
|
281
|
+
ENABLED: 'ENABLED',
|
|
282
|
+
NEEDS_CONFIG: 'NEEDS_CONFIG',
|
|
283
|
+
PROCESSING: 'PROCESSING',
|
|
284
|
+
DISABLED: 'DISABLED',
|
|
285
|
+
ERROR: 'ERROR'
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
exports.AssociationType = exports.$Enums.AssociationType = {
|
|
289
|
+
ONE_TO_MANY: 'ONE_TO_MANY',
|
|
290
|
+
ONE_TO_ONE: 'ONE_TO_ONE',
|
|
291
|
+
MANY_TO_ONE: 'MANY_TO_ONE'
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
exports.Prisma.ModelName = {
|
|
295
|
+
User: 'User',
|
|
296
|
+
Token: 'Token',
|
|
297
|
+
Credential: 'Credential',
|
|
298
|
+
Entity: 'Entity',
|
|
299
|
+
Integration: 'Integration',
|
|
300
|
+
IntegrationMapping: 'IntegrationMapping',
|
|
301
|
+
Sync: 'Sync',
|
|
302
|
+
DataIdentifier: 'DataIdentifier',
|
|
303
|
+
Association: 'Association',
|
|
304
|
+
AssociationObject: 'AssociationObject',
|
|
305
|
+
Process: 'Process',
|
|
306
|
+
State: 'State',
|
|
307
|
+
WebsocketConnection: 'WebsocketConnection'
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* This is a stub Prisma Client that will error at runtime if called.
|
|
312
|
+
*/
|
|
313
|
+
class PrismaClient {
|
|
314
|
+
constructor() {
|
|
315
|
+
return new Proxy(this, {
|
|
316
|
+
get(target, prop) {
|
|
317
|
+
let message
|
|
318
|
+
const runtime = getRuntime()
|
|
319
|
+
if (runtime.isEdge) {
|
|
320
|
+
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
|
|
321
|
+
- Use Prisma Accelerate: https://pris.ly/d/accelerate
|
|
322
|
+
- Use Driver Adapters: https://pris.ly/d/driver-adapters
|
|
323
|
+
`;
|
|
324
|
+
} else {
|
|
325
|
+
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
message += `
|
|
329
|
+
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
|
|
330
|
+
|
|
331
|
+
throw new Error(message)
|
|
332
|
+
}
|
|
333
|
+
})
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
exports.PrismaClient = PrismaClient
|
|
338
|
+
|
|
339
|
+
Object.assign(exports, Prisma)
|