@powerhousedao/reactor-api 6.0.2-staging.2 → 6.0.2-staging.4
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/README.md +6 -0
- package/dist/index.d.mts +2943 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +6375 -0
- package/dist/index.mjs.map +1 -0
- package/dist/src/packages/https-hooks.d.mts +23 -7
- package/dist/src/packages/https-hooks.d.mts.map +1 -1
- package/dist/src/packages/https-hooks.mjs +73 -53
- package/dist/src/packages/https-hooks.mjs.map +1 -1
- package/dist/src/packages/vite-loader.d.mts +29 -0
- package/dist/src/packages/vite-loader.d.mts.map +1 -0
- package/dist/src/packages/vite-loader.mjs +142 -0
- package/dist/src/packages/vite-loader.mjs.map +1 -0
- package/dist/types-Do4QTfT3.d.mts +37 -0
- package/dist/types-Do4QTfT3.d.mts.map +1 -0
- package/dist/utils-DEEhP99G.mjs +286 -0
- package/dist/utils-DEEhP99G.mjs.map +1 -0
- package/package.json +45 -32
- package/dist/codegen.d.ts +0 -4
- package/dist/codegen.d.ts.map +0 -1
- package/dist/codegen.js +0 -38
- package/dist/codegen.js.map +0 -1
- package/dist/index.d.ts +0 -16
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -16
- package/dist/index.js.map +0 -1
- package/dist/src/config.d.ts +0 -6
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -6
- package/dist/src/config.js.map +0 -1
- package/dist/src/dev.d.ts +0 -2
- package/dist/src/dev.d.ts.map +0 -1
- package/dist/src/dev.js +0 -51
- package/dist/src/dev.js.map +0 -1
- package/dist/src/graphql/analytics-subgraph.d.ts +0 -14
- package/dist/src/graphql/analytics-subgraph.d.ts.map +0 -1
- package/dist/src/graphql/analytics-subgraph.js +0 -26
- package/dist/src/graphql/analytics-subgraph.js.map +0 -1
- package/dist/src/graphql/auth/index.d.ts +0 -2
- package/dist/src/graphql/auth/index.d.ts.map +0 -1
- package/dist/src/graphql/auth/index.js +0 -2
- package/dist/src/graphql/auth/index.js.map +0 -1
- package/dist/src/graphql/auth/resolvers.d.ts +0 -166
- package/dist/src/graphql/auth/resolvers.d.ts.map +0 -1
- package/dist/src/graphql/auth/resolvers.js +0 -227
- package/dist/src/graphql/auth/resolvers.js.map +0 -1
- package/dist/src/graphql/auth/schema.graphql +0 -195
- package/dist/src/graphql/auth/subgraph.d.ts +0 -202
- package/dist/src/graphql/auth/subgraph.d.ts.map +0 -1
- package/dist/src/graphql/auth/subgraph.js +0 -384
- package/dist/src/graphql/auth/subgraph.js.map +0 -1
- package/dist/src/graphql/base-subgraph.d.ts +0 -28
- package/dist/src/graphql/base-subgraph.d.ts.map +0 -1
- package/dist/src/graphql/base-subgraph.js +0 -126
- package/dist/src/graphql/base-subgraph.js.map +0 -1
- package/dist/src/graphql/document-model-subgraph.d.ts +0 -105
- package/dist/src/graphql/document-model-subgraph.d.ts.map +0 -1
- package/dist/src/graphql/document-model-subgraph.js +0 -312
- package/dist/src/graphql/document-model-subgraph.js.map +0 -1
- package/dist/src/graphql/graphql-manager.d.ts +0 -68
- package/dist/src/graphql/graphql-manager.d.ts.map +0 -1
- package/dist/src/graphql/graphql-manager.js +0 -589
- package/dist/src/graphql/graphql-manager.js.map +0 -1
- package/dist/src/graphql/index.d.ts +0 -10
- package/dist/src/graphql/index.d.ts.map +0 -1
- package/dist/src/graphql/index.js +0 -10
- package/dist/src/graphql/index.js.map +0 -1
- package/dist/src/graphql/packages/index.d.ts +0 -2
- package/dist/src/graphql/packages/index.d.ts.map +0 -1
- package/dist/src/graphql/packages/index.js +0 -2
- package/dist/src/graphql/packages/index.js.map +0 -1
- package/dist/src/graphql/packages/resolvers.d.ts +0 -31
- package/dist/src/graphql/packages/resolvers.d.ts.map +0 -1
- package/dist/src/graphql/packages/resolvers.js +0 -37
- package/dist/src/graphql/packages/resolvers.js.map +0 -1
- package/dist/src/graphql/packages/schema.graphql +0 -50
- package/dist/src/graphql/packages/subgraph.d.ts +0 -55
- package/dist/src/graphql/packages/subgraph.d.ts.map +0 -1
- package/dist/src/graphql/packages/subgraph.js +0 -73
- package/dist/src/graphql/packages/subgraph.js.map +0 -1
- package/dist/src/graphql/playground.d.ts +0 -2
- package/dist/src/graphql/playground.d.ts.map +0 -1
- package/dist/src/graphql/playground.js +0 -81
- package/dist/src/graphql/playground.js.map +0 -1
- package/dist/src/graphql/reactor/adapters.d.ts +0 -62
- package/dist/src/graphql/reactor/adapters.d.ts.map +0 -1
- package/dist/src/graphql/reactor/adapters.js +0 -271
- package/dist/src/graphql/reactor/adapters.js.map +0 -1
- package/dist/src/graphql/reactor/factory.d.ts +0 -105
- package/dist/src/graphql/reactor/factory.d.ts.map +0 -1
- package/dist/src/graphql/reactor/factory.js +0 -7
- package/dist/src/graphql/reactor/factory.js.map +0 -1
- package/dist/src/graphql/reactor/gen/graphql.d.ts +0 -1489
- package/dist/src/graphql/reactor/gen/graphql.d.ts.map +0 -1
- package/dist/src/graphql/reactor/gen/graphql.js +0 -731
- package/dist/src/graphql/reactor/gen/graphql.js.map +0 -1
- package/dist/src/graphql/reactor/index.d.ts +0 -4
- package/dist/src/graphql/reactor/index.d.ts.map +0 -1
- package/dist/src/graphql/reactor/index.js +0 -4
- package/dist/src/graphql/reactor/index.js.map +0 -1
- package/dist/src/graphql/reactor/operations.graphql +0 -443
- package/dist/src/graphql/reactor/pubsub.d.ts +0 -27
- package/dist/src/graphql/reactor/pubsub.d.ts.map +0 -1
- package/dist/src/graphql/reactor/pubsub.js +0 -93
- package/dist/src/graphql/reactor/pubsub.js.map +0 -1
- package/dist/src/graphql/reactor/requester.d.ts +0 -4
- package/dist/src/graphql/reactor/requester.d.ts.map +0 -1
- package/dist/src/graphql/reactor/requester.js +0 -22
- package/dist/src/graphql/reactor/requester.js.map +0 -1
- package/dist/src/graphql/reactor/requester.with-zod.d.ts +0 -4
- package/dist/src/graphql/reactor/requester.with-zod.d.ts.map +0 -1
- package/dist/src/graphql/reactor/requester.with-zod.js +0 -129
- package/dist/src/graphql/reactor/requester.with-zod.js.map +0 -1
- package/dist/src/graphql/reactor/resolvers.d.ts +0 -223
- package/dist/src/graphql/reactor/resolvers.d.ts.map +0 -1
- package/dist/src/graphql/reactor/resolvers.js +0 -682
- package/dist/src/graphql/reactor/resolvers.js.map +0 -1
- package/dist/src/graphql/reactor/schema.graphql +0 -475
- package/dist/src/graphql/reactor/subgraph.d.ts +0 -18
- package/dist/src/graphql/reactor/subgraph.d.ts.map +0 -1
- package/dist/src/graphql/reactor/subgraph.js +0 -457
- package/dist/src/graphql/reactor/subgraph.js.map +0 -1
- package/dist/src/graphql/reactor/validation.d.ts +0 -348
- package/dist/src/graphql/reactor/validation.d.ts.map +0 -1
- package/dist/src/graphql/reactor/validation.js +0 -167
- package/dist/src/graphql/reactor/validation.js.map +0 -1
- package/dist/src/graphql/sse.d.ts +0 -42
- package/dist/src/graphql/sse.d.ts.map +0 -1
- package/dist/src/graphql/sse.js +0 -33
- package/dist/src/graphql/sse.js.map +0 -1
- package/dist/src/graphql/system/env/getters.d.ts +0 -2
- package/dist/src/graphql/system/env/getters.d.ts.map +0 -1
- package/dist/src/graphql/system/env/getters.js +0 -4
- package/dist/src/graphql/system/env/getters.js.map +0 -1
- package/dist/src/graphql/system/env/index.d.ts +0 -2
- package/dist/src/graphql/system/env/index.d.ts.map +0 -1
- package/dist/src/graphql/system/env/index.js +0 -5
- package/dist/src/graphql/system/env/index.js.map +0 -1
- package/dist/src/graphql/system/index.d.ts +0 -2
- package/dist/src/graphql/system/index.d.ts.map +0 -1
- package/dist/src/graphql/system/index.js +0 -2
- package/dist/src/graphql/system/index.js.map +0 -1
- package/dist/src/graphql/system/types.d.ts +0 -2
- package/dist/src/graphql/system/types.d.ts.map +0 -1
- package/dist/src/graphql/system/types.js +0 -2
- package/dist/src/graphql/system/types.js.map +0 -1
- package/dist/src/graphql/temp-hack-rwa-type-defs.d.ts +0 -57
- package/dist/src/graphql/temp-hack-rwa-type-defs.d.ts.map +0 -1
- package/dist/src/graphql/temp-hack-rwa-type-defs.js +0 -2
- package/dist/src/graphql/temp-hack-rwa-type-defs.js.map +0 -1
- package/dist/src/graphql/types.d.ts +0 -102
- package/dist/src/graphql/types.d.ts.map +0 -1
- package/dist/src/graphql/types.js +0 -2
- package/dist/src/graphql/types.js.map +0 -1
- package/dist/src/graphql/utils.d.ts +0 -9
- package/dist/src/graphql/utils.d.ts.map +0 -1
- package/dist/src/graphql/utils.js +0 -72
- package/dist/src/graphql/utils.js.map +0 -1
- package/dist/src/graphql/websocket.d.ts +0 -3
- package/dist/src/graphql/websocket.d.ts.map +0 -1
- package/dist/src/graphql/websocket.js +0 -15
- package/dist/src/graphql/websocket.js.map +0 -1
- package/dist/src/migrations/001_create_document_permissions.d.ts +0 -4
- package/dist/src/migrations/001_create_document_permissions.d.ts.map +0 -1
- package/dist/src/migrations/001_create_document_permissions.js +0 -91
- package/dist/src/migrations/001_create_document_permissions.js.map +0 -1
- package/dist/src/migrations/002_add_document_protection.d.ts +0 -4
- package/dist/src/migrations/002_add_document_protection.d.ts.map +0 -1
- package/dist/src/migrations/002_add_document_protection.js +0 -18
- package/dist/src/migrations/002_add_document_protection.js.map +0 -1
- package/dist/src/migrations/index.d.ts +0 -10
- package/dist/src/migrations/index.d.ts.map +0 -1
- package/dist/src/migrations/index.js +0 -58
- package/dist/src/migrations/index.js.map +0 -1
- package/dist/src/packages/http-loader.d.ts +0 -68
- package/dist/src/packages/http-loader.d.ts.map +0 -1
- package/dist/src/packages/http-loader.js +0 -176
- package/dist/src/packages/http-loader.js.map +0 -1
- package/dist/src/packages/import-loader.d.ts +0 -14
- package/dist/src/packages/import-loader.d.ts.map +0 -1
- package/dist/src/packages/import-loader.js +0 -46
- package/dist/src/packages/import-loader.js.map +0 -1
- package/dist/src/packages/import-resolver.d.ts +0 -5
- package/dist/src/packages/import-resolver.d.ts.map +0 -1
- package/dist/src/packages/import-resolver.js +0 -127
- package/dist/src/packages/import-resolver.js.map +0 -1
- package/dist/src/packages/package-manager.d.ts +0 -34
- package/dist/src/packages/package-manager.d.ts.map +0 -1
- package/dist/src/packages/package-manager.js +0 -213
- package/dist/src/packages/package-manager.js.map +0 -1
- package/dist/src/packages/types.d.ts +0 -38
- package/dist/src/packages/types.d.ts.map +0 -1
- package/dist/src/packages/types.js +0 -2
- package/dist/src/packages/types.js.map +0 -1
- package/dist/src/packages/util.d.ts +0 -27
- package/dist/src/packages/util.d.ts.map +0 -1
- package/dist/src/packages/util.js +0 -97
- package/dist/src/packages/util.js.map +0 -1
- package/dist/src/packages/vite-loader.d.ts +0 -24
- package/dist/src/packages/vite-loader.d.ts.map +0 -1
- package/dist/src/packages/vite-loader.js +0 -169
- package/dist/src/packages/vite-loader.js.map +0 -1
- package/dist/src/server.d.ts +0 -56
- package/dist/src/server.d.ts.map +0 -1
- package/dist/src/server.js +0 -365
- package/dist/src/server.js.map +0 -1
- package/dist/src/services/auth.service.d.ts +0 -56
- package/dist/src/services/auth.service.d.ts.map +0 -1
- package/dist/src/services/auth.service.js +0 -172
- package/dist/src/services/auth.service.js.map +0 -1
- package/dist/src/services/authorization.service.d.ts +0 -70
- package/dist/src/services/authorization.service.d.ts.map +0 -1
- package/dist/src/services/authorization.service.js +0 -155
- package/dist/src/services/authorization.service.js.map +0 -1
- package/dist/src/services/document-permission.service.d.ts +0 -241
- package/dist/src/services/document-permission.service.d.ts.map +0 -1
- package/dist/src/services/document-permission.service.js +0 -791
- package/dist/src/services/document-permission.service.js.map +0 -1
- package/dist/src/services/package-management.service.d.ts +0 -32
- package/dist/src/services/package-management.service.d.ts.map +0 -1
- package/dist/src/services/package-management.service.js +0 -95
- package/dist/src/services/package-management.service.js.map +0 -1
- package/dist/src/services/package-storage.d.ts +0 -23
- package/dist/src/services/package-storage.d.ts.map +0 -1
- package/dist/src/services/package-storage.js +0 -19
- package/dist/src/services/package-storage.js.map +0 -1
- package/dist/src/tracing.d.ts +0 -4
- package/dist/src/tracing.d.ts.map +0 -1
- package/dist/src/tracing.js +0 -140
- package/dist/src/tracing.js.map +0 -1
- package/dist/src/types.d.ts +0 -17
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -2
- package/dist/src/types.js.map +0 -1
- package/dist/src/utils/auth.d.ts +0 -3
- package/dist/src/utils/auth.d.ts.map +0 -1
- package/dist/src/utils/auth.js +0 -12
- package/dist/src/utils/auth.js.map +0 -1
- package/dist/src/utils/create-schema.d.ts +0 -36
- package/dist/src/utils/create-schema.d.ts.map +0 -1
- package/dist/src/utils/create-schema.js +0 -725
- package/dist/src/utils/create-schema.js.map +0 -1
- package/dist/src/utils/db.d.ts +0 -82
- package/dist/src/utils/db.d.ts.map +0 -1
- package/dist/src/utils/db.js +0 -101
- package/dist/src/utils/db.js.map +0 -1
- package/dist/src/utils/drive-url.d.ts +0 -2
- package/dist/src/utils/drive-url.d.ts.map +0 -1
- package/dist/src/utils/drive-url.js +0 -3
- package/dist/src/utils/drive-url.js.map +0 -1
- package/dist/src/utils/index.d.ts +0 -4
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/index.js +0 -4
- package/dist/src/utils/index.js.map +0 -1
- package/dist/test/authorization.service.test.d.ts +0 -2
- package/dist/test/authorization.service.test.d.ts.map +0 -1
- package/dist/test/authorization.service.test.js +0 -252
- package/dist/test/authorization.service.test.js.map +0 -1
- package/dist/test/benchmarks/load.bench.d.ts +0 -2
- package/dist/test/benchmarks/load.bench.d.ts.map +0 -1
- package/dist/test/benchmarks/load.bench.js +0 -73
- package/dist/test/benchmarks/load.bench.js.map +0 -1
- package/dist/test/benchmarks/sync.bench.d.ts +0 -2
- package/dist/test/benchmarks/sync.bench.d.ts.map +0 -1
- package/dist/test/benchmarks/sync.bench.js +0 -119
- package/dist/test/benchmarks/sync.bench.js.map +0 -1
- package/dist/test/connect-switchboard-reshuffle-convergence.test.d.ts +0 -2
- package/dist/test/connect-switchboard-reshuffle-convergence.test.d.ts.map +0 -1
- package/dist/test/connect-switchboard-reshuffle-convergence.test.js +0 -203
- package/dist/test/connect-switchboard-reshuffle-convergence.test.js.map +0 -1
- package/dist/test/connect-switchboard-sync.test.d.ts +0 -2
- package/dist/test/connect-switchboard-sync.test.d.ts.map +0 -1
- package/dist/test/connect-switchboard-sync.test.js +0 -632
- package/dist/test/connect-switchboard-sync.test.js.map +0 -1
- package/dist/test/document-drive-subgraph.test.d.ts +0 -2
- package/dist/test/document-drive-subgraph.test.d.ts.map +0 -1
- package/dist/test/document-drive-subgraph.test.js +0 -249
- package/dist/test/document-drive-subgraph.test.js.map +0 -1
- package/dist/test/document-model-subgraph-permissions.test.d.ts +0 -2
- package/dist/test/document-model-subgraph-permissions.test.d.ts.map +0 -1
- package/dist/test/document-model-subgraph-permissions.test.js +0 -587
- package/dist/test/document-model-subgraph-permissions.test.js.map +0 -1
- package/dist/test/document-permission.service.test.d.ts +0 -2
- package/dist/test/document-permission.service.test.d.ts.map +0 -1
- package/dist/test/document-permission.service.test.js +0 -480
- package/dist/test/document-permission.service.test.js.map +0 -1
- package/dist/test/drive-info-endpoint.test.d.ts +0 -2
- package/dist/test/drive-info-endpoint.test.d.ts.map +0 -1
- package/dist/test/drive-info-endpoint.test.js +0 -123
- package/dist/test/drive-info-endpoint.test.js.map +0 -1
- package/dist/test/fault-injection-sync.test.d.ts +0 -2
- package/dist/test/fault-injection-sync.test.d.ts.map +0 -1
- package/dist/test/fault-injection-sync.test.js +0 -196
- package/dist/test/fault-injection-sync.test.js.map +0 -1
- package/dist/test/identity-integration.test.d.ts +0 -2
- package/dist/test/identity-integration.test.d.ts.map +0 -1
- package/dist/test/identity-integration.test.js +0 -349
- package/dist/test/identity-integration.test.js.map +0 -1
- package/dist/test/index.d.ts +0 -2
- package/dist/test/index.d.ts.map +0 -1
- package/dist/test/index.js +0 -2
- package/dist/test/index.js.map +0 -1
- package/dist/test/permissions-integration.test.d.ts +0 -2
- package/dist/test/permissions-integration.test.d.ts.map +0 -1
- package/dist/test/permissions-integration.test.js +0 -407
- package/dist/test/permissions-integration.test.js.map +0 -1
- package/dist/test/push-backfill.test.d.ts +0 -2
- package/dist/test/push-backfill.test.d.ts.map +0 -1
- package/dist/test/push-backfill.test.js +0 -298
- package/dist/test/push-backfill.test.js.map +0 -1
- package/dist/test/reactor-adapters.test.d.ts +0 -2
- package/dist/test/reactor-adapters.test.d.ts.map +0 -1
- package/dist/test/reactor-adapters.test.js +0 -379
- package/dist/test/reactor-adapters.test.js.map +0 -1
- package/dist/test/reactor-client.test.d.ts +0 -2
- package/dist/test/reactor-client.test.d.ts.map +0 -1
- package/dist/test/reactor-client.test.js +0 -371
- package/dist/test/reactor-client.test.js.map +0 -1
- package/dist/test/reactor-resolvers.test.d.ts +0 -2
- package/dist/test/reactor-resolvers.test.d.ts.map +0 -1
- package/dist/test/reactor-resolvers.test.js +0 -258
- package/dist/test/reactor-resolvers.test.js.map +0 -1
- package/dist/test/reactor-subgraph-permissions.test.d.ts +0 -2
- package/dist/test/reactor-subgraph-permissions.test.d.ts.map +0 -1
- package/dist/test/reactor-subgraph-permissions.test.js +0 -371
- package/dist/test/reactor-subgraph-permissions.test.js.map +0 -1
- package/dist/test/router.test.d.ts +0 -2
- package/dist/test/router.test.d.ts.map +0 -1
- package/dist/test/router.test.js +0 -38
- package/dist/test/router.test.js.map +0 -1
- package/dist/test/subscriptions-sse.test.d.ts +0 -2
- package/dist/test/subscriptions-sse.test.d.ts.map +0 -1
- package/dist/test/subscriptions-sse.test.js +0 -264
- package/dist/test/subscriptions-sse.test.js.map +0 -1
- package/dist/test/subscriptions.test.d.ts +0 -2
- package/dist/test/subscriptions.test.d.ts.map +0 -1
- package/dist/test/subscriptions.test.js +0 -248
- package/dist/test/subscriptions.test.js.map +0 -1
- package/dist/test/utils/gql-resolver-bridge.d.ts +0 -15
- package/dist/test/utils/gql-resolver-bridge.d.ts.map +0 -1
- package/dist/test/utils/gql-resolver-bridge.js +0 -89
- package/dist/test/utils/gql-resolver-bridge.js.map +0 -1
- package/dist/test/utils.d.ts +0 -10
- package/dist/test/utils.d.ts.map +0 -1
- package/dist/test/utils.js +0 -23
- package/dist/test/utils.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/vitest.config.d.ts +0 -3
- package/dist/vitest.config.d.ts.map +0 -1
- package/dist/vitest.config.js +0 -38
- package/dist/vitest.config.js.map +0 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,2943 @@
|
|
|
1
|
+
import { i as IPackageManagerOptions, n as IPackageLoaderOptions, r as IPackageManager, s as PackageManagerResult, t as IPackageLoader } from "./types-Do4QTfT3.mjs";
|
|
2
|
+
import { IAnalyticsStore } from "@powerhousedao/analytics-engine-core";
|
|
3
|
+
import { AnalyticsModel } from "@powerhousedao/analytics-engine-graphql";
|
|
4
|
+
import * as graphql from "graphql";
|
|
5
|
+
import { DocumentNode, GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig, GraphQLSchema } from "graphql";
|
|
6
|
+
import { ILogger } from "document-model";
|
|
7
|
+
import { CorsOptions } from "cors";
|
|
8
|
+
import http from "node:http";
|
|
9
|
+
import { DocumentModelGlobalState as DocumentModelGlobalState$1, DocumentModelModule, Operation, PHDocument, PHDocumentHeader } from "@powerhousedao/shared/document-model";
|
|
10
|
+
import { IDocumentModelLoader, IDocumentModelRegistry, IReactorClient, IRelationalDb, ISyncManager, ParsedDriveUrl, ReactorClientModule, driveIdFromUrl, parseDriveUrl } from "@powerhousedao/reactor";
|
|
11
|
+
import * as z$1 from "zod";
|
|
12
|
+
import { DocumentDriveDocument, DocumentDriveGlobalState } from "@powerhousedao/shared/document-drive";
|
|
13
|
+
import { WebSocketServer } from "ws";
|
|
14
|
+
import { IProcessorHostModule, IRelationalDb as IRelationalDb$1, ProcessorApp, ProcessorRecord } from "@powerhousedao/shared/processors";
|
|
15
|
+
import { Generated, Kysely } from "kysely";
|
|
16
|
+
import { PGlite } from "@electric-sql/pglite";
|
|
17
|
+
import { Knex } from "knex";
|
|
18
|
+
import { GraphQLResolverMap, GraphQLSchemaModule } from "@apollo/subgraph/dist/schema-helper/resolverMap.js";
|
|
19
|
+
import { Context as Context$1, GqlDocument as GqlDocument$1, GqlDriveDocument as GqlDriveDocument$1, GqlOperation as GqlOperation$1, GraphQLManager as GraphQLManager$1, ISubgraph as ISubgraph$1, Processor as Processor$1, SubgraphArgs as SubgraphArgs$1, SubgraphClass as SubgraphClass$1 } from "@powerhousedao/reactor-api";
|
|
20
|
+
import { IncomingHttpHeaders } from "http";
|
|
21
|
+
import { Pool } from "pg";
|
|
22
|
+
|
|
23
|
+
//#region src/utils/db.d.ts
|
|
24
|
+
/**
|
|
25
|
+
* Permission levels for documents:
|
|
26
|
+
* - READ: Can fetch and read the document
|
|
27
|
+
* - WRITE: Can push updates and modify the document
|
|
28
|
+
* - ADMIN: Can manage document permissions and settings
|
|
29
|
+
*/
|
|
30
|
+
type DocumentPermissionLevel = "READ" | "WRITE" | "ADMIN";
|
|
31
|
+
/**
|
|
32
|
+
* Database schema for document permissions
|
|
33
|
+
*/
|
|
34
|
+
interface DocumentProtectionTable {
|
|
35
|
+
documentId: string;
|
|
36
|
+
protected: boolean;
|
|
37
|
+
ownerAddress: string | null;
|
|
38
|
+
createdAt: Date;
|
|
39
|
+
updatedAt: Date;
|
|
40
|
+
}
|
|
41
|
+
interface DocumentPermissionDatabase {
|
|
42
|
+
DocumentPermission: DocumentPermissionTable;
|
|
43
|
+
Group: GroupTable;
|
|
44
|
+
UserGroup: UserGroupTable;
|
|
45
|
+
DocumentGroupPermission: DocumentGroupPermissionTable;
|
|
46
|
+
OperationUserPermission: OperationUserPermissionTable;
|
|
47
|
+
OperationGroupPermission: OperationGroupPermissionTable;
|
|
48
|
+
DocumentProtection: DocumentProtectionTable;
|
|
49
|
+
}
|
|
50
|
+
interface DocumentPermissionTable {
|
|
51
|
+
id: Generated<number>;
|
|
52
|
+
documentId: string;
|
|
53
|
+
userAddress: string;
|
|
54
|
+
permission: DocumentPermissionLevel;
|
|
55
|
+
grantedBy: string;
|
|
56
|
+
createdAt: Date;
|
|
57
|
+
updatedAt: Date;
|
|
58
|
+
}
|
|
59
|
+
interface GroupTable {
|
|
60
|
+
id: Generated<number>;
|
|
61
|
+
name: string;
|
|
62
|
+
description: string | null;
|
|
63
|
+
createdAt: Date;
|
|
64
|
+
updatedAt: Date;
|
|
65
|
+
}
|
|
66
|
+
interface UserGroupTable {
|
|
67
|
+
userAddress: string;
|
|
68
|
+
groupId: number;
|
|
69
|
+
createdAt: Date;
|
|
70
|
+
}
|
|
71
|
+
interface DocumentGroupPermissionTable {
|
|
72
|
+
id: Generated<number>;
|
|
73
|
+
documentId: string;
|
|
74
|
+
groupId: number;
|
|
75
|
+
permission: DocumentPermissionLevel;
|
|
76
|
+
grantedBy: string;
|
|
77
|
+
createdAt: Date;
|
|
78
|
+
updatedAt: Date;
|
|
79
|
+
}
|
|
80
|
+
interface OperationUserPermissionTable {
|
|
81
|
+
id: Generated<number>;
|
|
82
|
+
documentId: string;
|
|
83
|
+
operationType: string;
|
|
84
|
+
userAddress: string;
|
|
85
|
+
grantedBy: string;
|
|
86
|
+
createdAt: Date;
|
|
87
|
+
}
|
|
88
|
+
interface OperationGroupPermissionTable {
|
|
89
|
+
id: Generated<number>;
|
|
90
|
+
documentId: string;
|
|
91
|
+
operationType: string;
|
|
92
|
+
groupId: number;
|
|
93
|
+
grantedBy: string;
|
|
94
|
+
createdAt: Date;
|
|
95
|
+
}
|
|
96
|
+
type Db = Kysely<any>;
|
|
97
|
+
declare function getDbClient(connectionString?: string | undefined): {
|
|
98
|
+
db: Db;
|
|
99
|
+
knex: Knex;
|
|
100
|
+
};
|
|
101
|
+
declare const initAnalyticsStoreSql: string[];
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/services/document-permission.service.d.ts
|
|
104
|
+
interface DocumentPermissionEntry {
|
|
105
|
+
documentId: string;
|
|
106
|
+
userAddress: string;
|
|
107
|
+
permission: DocumentPermissionLevel;
|
|
108
|
+
grantedBy: string;
|
|
109
|
+
createdAt: Date;
|
|
110
|
+
updatedAt: Date;
|
|
111
|
+
}
|
|
112
|
+
interface Group {
|
|
113
|
+
id: number;
|
|
114
|
+
name: string;
|
|
115
|
+
description: string | null;
|
|
116
|
+
createdAt: Date;
|
|
117
|
+
updatedAt: Date;
|
|
118
|
+
}
|
|
119
|
+
interface DocumentGroupPermissionEntry {
|
|
120
|
+
documentId: string;
|
|
121
|
+
groupId: number;
|
|
122
|
+
permission: DocumentPermissionLevel;
|
|
123
|
+
grantedBy: string;
|
|
124
|
+
createdAt: Date;
|
|
125
|
+
updatedAt: Date;
|
|
126
|
+
}
|
|
127
|
+
interface OperationUserPermissionEntry {
|
|
128
|
+
documentId: string;
|
|
129
|
+
operationType: string;
|
|
130
|
+
userAddress: string;
|
|
131
|
+
grantedBy: string;
|
|
132
|
+
createdAt: Date;
|
|
133
|
+
}
|
|
134
|
+
interface OperationGroupPermissionEntry {
|
|
135
|
+
documentId: string;
|
|
136
|
+
operationType: string;
|
|
137
|
+
groupId: number;
|
|
138
|
+
grantedBy: string;
|
|
139
|
+
createdAt: Date;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Function type for getting parent document IDs
|
|
143
|
+
* This is injected to avoid circular dependencies with the reactor client
|
|
144
|
+
*/
|
|
145
|
+
type GetParentIdsFn = (documentId: string) => Promise<string[]>;
|
|
146
|
+
/**
|
|
147
|
+
* Configuration for the DocumentPermissionService
|
|
148
|
+
*/
|
|
149
|
+
interface DocumentPermissionConfig {
|
|
150
|
+
defaultProtection: boolean;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Service for managing document-level permissions.
|
|
154
|
+
*
|
|
155
|
+
* Permission levels for documents:
|
|
156
|
+
* - READ: Can fetch and read the document
|
|
157
|
+
* - WRITE: Can push updates and modify the document
|
|
158
|
+
* - ADMIN: Can manage document permissions and settings
|
|
159
|
+
*
|
|
160
|
+
* Operation permissions:
|
|
161
|
+
* - Users and groups can be granted permission to execute specific operations
|
|
162
|
+
*/
|
|
163
|
+
declare class DocumentPermissionService {
|
|
164
|
+
private readonly db;
|
|
165
|
+
readonly config: DocumentPermissionConfig;
|
|
166
|
+
constructor(db: Kysely<DocumentPermissionDatabase>, config?: DocumentPermissionConfig);
|
|
167
|
+
/**
|
|
168
|
+
* Get the permission level for a user on a specific document.
|
|
169
|
+
* Returns null if no permission is set.
|
|
170
|
+
*/
|
|
171
|
+
getUserPermission(documentId: string, userAddress: string): Promise<DocumentPermissionLevel | null>;
|
|
172
|
+
/**
|
|
173
|
+
* Get all permissions for a document
|
|
174
|
+
*/
|
|
175
|
+
getDocumentPermissions(documentId: string): Promise<DocumentPermissionEntry[]>;
|
|
176
|
+
/**
|
|
177
|
+
* Get all documents a user has explicit access to
|
|
178
|
+
*/
|
|
179
|
+
getUserDocuments(userAddress: string): Promise<DocumentPermissionEntry[]>;
|
|
180
|
+
/**
|
|
181
|
+
* Grant or update a user's permission on a document.
|
|
182
|
+
*/
|
|
183
|
+
grantPermission(documentId: string, userAddress: string, permission: DocumentPermissionLevel, grantedBy: string): Promise<DocumentPermissionEntry>;
|
|
184
|
+
/**
|
|
185
|
+
* Revoke a user's permission on a document
|
|
186
|
+
*/
|
|
187
|
+
revokePermission(documentId: string, userAddress: string): Promise<void>;
|
|
188
|
+
/**
|
|
189
|
+
* Delete all permissions for a document (used when deleting a document)
|
|
190
|
+
*/
|
|
191
|
+
deleteAllDocumentPermissions(documentId: string): Promise<void>;
|
|
192
|
+
/**
|
|
193
|
+
* Check if a user can read a document.
|
|
194
|
+
* Returns true if user has READ, WRITE, or ADMIN permission (direct or via group)
|
|
195
|
+
*/
|
|
196
|
+
canReadDocument(documentId: string, userAddress: string | undefined): Promise<boolean>;
|
|
197
|
+
/**
|
|
198
|
+
* Check if a user can write to a document.
|
|
199
|
+
* Returns true if user has WRITE or ADMIN permission (direct or via group)
|
|
200
|
+
*/
|
|
201
|
+
canWriteDocument(documentId: string, userAddress: string | undefined): Promise<boolean>;
|
|
202
|
+
/**
|
|
203
|
+
* Check if a user can manage a document (change permissions, settings).
|
|
204
|
+
* Returns true if user has ADMIN permission (direct or via group)
|
|
205
|
+
*/
|
|
206
|
+
canManageDocument(documentId: string, userAddress: string | undefined): Promise<boolean>;
|
|
207
|
+
/**
|
|
208
|
+
* Check if a user can read a document, including parent permission inheritance.
|
|
209
|
+
* Returns true if user has permission on the document OR any parent in the hierarchy.
|
|
210
|
+
*/
|
|
211
|
+
canRead(documentId: string, userAddress: string | undefined, getParentIds: GetParentIdsFn): Promise<boolean>;
|
|
212
|
+
/**
|
|
213
|
+
* Check if a user can write to a document, including parent permission inheritance.
|
|
214
|
+
* Returns true if user has write permission on the document OR any parent in the hierarchy.
|
|
215
|
+
*/
|
|
216
|
+
canWrite(documentId: string, userAddress: string | undefined, getParentIds: GetParentIdsFn): Promise<boolean>;
|
|
217
|
+
/**
|
|
218
|
+
* Filter a list of document IDs to only include those the user can read.
|
|
219
|
+
*/
|
|
220
|
+
filterReadableDocuments(documentIds: string[], userAddress: string | undefined, getParentIds: GetParentIdsFn): Promise<string[]>;
|
|
221
|
+
/**
|
|
222
|
+
* Create a new group
|
|
223
|
+
*/
|
|
224
|
+
createGroup(name: string, description?: string): Promise<Group>;
|
|
225
|
+
/**
|
|
226
|
+
* Delete a group and all its associations
|
|
227
|
+
*/
|
|
228
|
+
deleteGroup(groupId: number): Promise<void>;
|
|
229
|
+
/**
|
|
230
|
+
* Get a group by ID
|
|
231
|
+
*/
|
|
232
|
+
getGroup(groupId: number): Promise<Group | null>;
|
|
233
|
+
/**
|
|
234
|
+
* List all groups
|
|
235
|
+
*/
|
|
236
|
+
listGroups(): Promise<Group[]>;
|
|
237
|
+
/**
|
|
238
|
+
* Add a user to a group
|
|
239
|
+
*/
|
|
240
|
+
addUserToGroup(userAddress: string, groupId: number): Promise<void>;
|
|
241
|
+
/**
|
|
242
|
+
* Remove a user from a group
|
|
243
|
+
*/
|
|
244
|
+
removeUserFromGroup(userAddress: string, groupId: number): Promise<void>;
|
|
245
|
+
/**
|
|
246
|
+
* Get all groups a user belongs to
|
|
247
|
+
*/
|
|
248
|
+
getUserGroups(userAddress: string): Promise<Group[]>;
|
|
249
|
+
/**
|
|
250
|
+
* Get all members of a group
|
|
251
|
+
*/
|
|
252
|
+
getGroupMembers(groupId: number): Promise<string[]>;
|
|
253
|
+
/**
|
|
254
|
+
* Grant a group permission on a document
|
|
255
|
+
*/
|
|
256
|
+
grantGroupPermission(documentId: string, groupId: number, permission: DocumentPermissionLevel, grantedBy: string): Promise<DocumentGroupPermissionEntry>;
|
|
257
|
+
/**
|
|
258
|
+
* Revoke a group's permission on a document
|
|
259
|
+
*/
|
|
260
|
+
revokeGroupPermission(documentId: string, groupId: number): Promise<void>;
|
|
261
|
+
/**
|
|
262
|
+
* Get all group permissions for a document
|
|
263
|
+
*/
|
|
264
|
+
getDocumentGroupPermissions(documentId: string): Promise<DocumentGroupPermissionEntry[]>;
|
|
265
|
+
/**
|
|
266
|
+
* Get best permission level a user has on a document via groups
|
|
267
|
+
*/
|
|
268
|
+
getUserGroupPermission(documentId: string, userAddress: string): Promise<DocumentPermissionLevel | null>;
|
|
269
|
+
/**
|
|
270
|
+
* Grant a user permission to execute an operation on a document
|
|
271
|
+
*/
|
|
272
|
+
grantOperationPermission(documentId: string, operationType: string, userAddress: string, grantedBy: string): Promise<OperationUserPermissionEntry>;
|
|
273
|
+
/**
|
|
274
|
+
* Revoke a user's permission to execute an operation
|
|
275
|
+
*/
|
|
276
|
+
revokeOperationPermission(documentId: string, operationType: string, userAddress: string): Promise<void>;
|
|
277
|
+
/**
|
|
278
|
+
* Grant a group permission to execute an operation on a document
|
|
279
|
+
*/
|
|
280
|
+
grantGroupOperationPermission(documentId: string, operationType: string, groupId: number, grantedBy: string): Promise<OperationGroupPermissionEntry>;
|
|
281
|
+
/**
|
|
282
|
+
* Revoke a group's permission to execute an operation
|
|
283
|
+
*/
|
|
284
|
+
revokeGroupOperationPermission(documentId: string, operationType: string, groupId: number): Promise<void>;
|
|
285
|
+
/**
|
|
286
|
+
* Get all users with permission to execute an operation
|
|
287
|
+
*/
|
|
288
|
+
getOperationUserPermissions(documentId: string, operationType: string): Promise<OperationUserPermissionEntry[]>;
|
|
289
|
+
/**
|
|
290
|
+
* Get all groups with permission to execute an operation
|
|
291
|
+
*/
|
|
292
|
+
getOperationGroupPermissions(documentId: string, operationType: string): Promise<OperationGroupPermissionEntry[]>;
|
|
293
|
+
/**
|
|
294
|
+
* Check if a user can execute a specific operation on a document.
|
|
295
|
+
* Returns true if user has direct permission or is in a group with permission.
|
|
296
|
+
*/
|
|
297
|
+
canExecuteOperation(documentId: string, operationType: string, userAddress: string | undefined): Promise<boolean>;
|
|
298
|
+
/**
|
|
299
|
+
* Check if an operation has any permissions set (is restricted)
|
|
300
|
+
*/
|
|
301
|
+
isOperationRestricted(documentId: string, operationType: string): Promise<boolean>;
|
|
302
|
+
/**
|
|
303
|
+
* Check if a specific document has a protection row set to true.
|
|
304
|
+
* Falls back to `config.defaultProtection` if no row exists.
|
|
305
|
+
*/
|
|
306
|
+
isDocumentProtected(documentId: string): Promise<boolean>;
|
|
307
|
+
/**
|
|
308
|
+
* Walk the parent chain: if the document itself or any ancestor is protected, return true.
|
|
309
|
+
* Collects all ancestor IDs first (with cycle detection), then batch-checks protection.
|
|
310
|
+
*/
|
|
311
|
+
isProtectedWithAncestors(documentId: string, getParentIds: GetParentIdsFn): Promise<boolean>;
|
|
312
|
+
/**
|
|
313
|
+
* Collect all ancestor IDs (including the document itself) with cycle detection.
|
|
314
|
+
*/
|
|
315
|
+
private collectAncestorIds;
|
|
316
|
+
/**
|
|
317
|
+
* Upsert protection status for a document.
|
|
318
|
+
*/
|
|
319
|
+
setDocumentProtection(documentId: string, isProtected: boolean): Promise<void>;
|
|
320
|
+
/**
|
|
321
|
+
* Get the owner address for a document, or null if not set.
|
|
322
|
+
*/
|
|
323
|
+
getDocumentOwner(documentId: string): Promise<string | null>;
|
|
324
|
+
/**
|
|
325
|
+
* Upsert owner address for a document.
|
|
326
|
+
*/
|
|
327
|
+
setDocumentOwner(documentId: string, ownerAddress: string): Promise<void>;
|
|
328
|
+
/**
|
|
329
|
+
* Initialize protection for a newly created document.
|
|
330
|
+
* Sets protection status and grants ADMIN to the owner.
|
|
331
|
+
*/
|
|
332
|
+
initializeDocumentProtection(documentId: string, ownerAddress: string, defaultProtection?: boolean): Promise<void>;
|
|
333
|
+
/**
|
|
334
|
+
* Get the full protection info for a document.
|
|
335
|
+
*/
|
|
336
|
+
getDocumentProtection(documentId: string): Promise<{
|
|
337
|
+
documentId: string;
|
|
338
|
+
protected: boolean;
|
|
339
|
+
ownerAddress: string | null;
|
|
340
|
+
}>;
|
|
341
|
+
}
|
|
342
|
+
//#endregion
|
|
343
|
+
//#region src/services/authorization.service.d.ts
|
|
344
|
+
interface AuthorizationConfig {
|
|
345
|
+
admins: string[];
|
|
346
|
+
defaultProtection: boolean;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Central authorization service — single source of truth for all permission checks.
|
|
350
|
+
*
|
|
351
|
+
* Authorization model:
|
|
352
|
+
* 1. Supreme admin (ADMINS env) → ALLOW ALL
|
|
353
|
+
* 2. Is document protected?
|
|
354
|
+
* a. NOT protected:
|
|
355
|
+
* - READ: anyone (even anonymous) → ALLOW
|
|
356
|
+
* - WRITE: authenticated user → ALLOW
|
|
357
|
+
* b. PROTECTED:
|
|
358
|
+
* - READ: requires explicit READ/WRITE/ADMIN grant (direct or via group/parent)
|
|
359
|
+
* - WRITE: requires explicit WRITE/ADMIN grant (direct or via group/parent)
|
|
360
|
+
* 3. Operation restricted? → Check OperationUserPermission
|
|
361
|
+
* 4. Document owner = implicit ADMIN
|
|
362
|
+
* 5. Drive protected = all children effectively protected
|
|
363
|
+
*/
|
|
364
|
+
declare class AuthorizationService {
|
|
365
|
+
private readonly documentPermissionService;
|
|
366
|
+
readonly config: AuthorizationConfig;
|
|
367
|
+
constructor(documentPermissionService: DocumentPermissionService, config: AuthorizationConfig);
|
|
368
|
+
/**
|
|
369
|
+
* Check if a user is a supreme admin (from ADMINS env var).
|
|
370
|
+
*/
|
|
371
|
+
isSupremeAdmin(userAddress?: string): boolean;
|
|
372
|
+
/**
|
|
373
|
+
* Check if a user can read a document.
|
|
374
|
+
*
|
|
375
|
+
* - Supreme admin → yes
|
|
376
|
+
* - Not protected → anyone can read (even anonymous)
|
|
377
|
+
* - Protected → requires READ/WRITE/ADMIN grant (direct, group, or parent inheritance)
|
|
378
|
+
* - Owner → yes (implicit ADMIN)
|
|
379
|
+
*/
|
|
380
|
+
canRead(documentId: string, userAddress?: string, getParentIds?: GetParentIdsFn): Promise<boolean>;
|
|
381
|
+
/**
|
|
382
|
+
* Check if a user can write to a document.
|
|
383
|
+
*
|
|
384
|
+
* - Supreme admin → yes
|
|
385
|
+
* - Not protected → anyone can write (even anonymous)
|
|
386
|
+
* - Protected → requires authentication + WRITE/ADMIN grant
|
|
387
|
+
* - Owner → yes (implicit ADMIN)
|
|
388
|
+
*/
|
|
389
|
+
canWrite(documentId: string, userAddress?: string, getParentIds?: GetParentIdsFn): Promise<boolean>;
|
|
390
|
+
/**
|
|
391
|
+
* Check if a user can manage a document (change permissions, protection, transfer ownership).
|
|
392
|
+
*
|
|
393
|
+
* - Supreme admin → yes
|
|
394
|
+
* - Owner → yes
|
|
395
|
+
* - Has ADMIN grant → yes
|
|
396
|
+
*/
|
|
397
|
+
canManage(documentId: string, userAddress?: string, getParentIds?: GetParentIdsFn): Promise<boolean>;
|
|
398
|
+
/**
|
|
399
|
+
* Check if a user can execute a specific operation.
|
|
400
|
+
* If the operation is not restricted, falls through to the standard write check.
|
|
401
|
+
* If the operation is restricted, requires an explicit OperationUserPermission grant.
|
|
402
|
+
*/
|
|
403
|
+
canExecuteOperation(documentId: string, operationType: string, userAddress?: string, getParentIds?: GetParentIdsFn): Promise<boolean>;
|
|
404
|
+
/**
|
|
405
|
+
* Combined check for mutations: can the user write + execute the operation?
|
|
406
|
+
* This enables READ-only users with operation grants to execute specific operations.
|
|
407
|
+
* For restricted operations, only the operation grant is checked (bypasses write check),
|
|
408
|
+
* allowing READ-only users with an explicit operation grant to execute that operation.
|
|
409
|
+
*/
|
|
410
|
+
canMutate(documentId: string, operationType: string, userAddress?: string, getParentIds?: GetParentIdsFn): Promise<boolean>;
|
|
411
|
+
}
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/graphql/types.d.ts
|
|
414
|
+
type SubgraphClass = typeof BaseSubgraph;
|
|
415
|
+
type Context = {
|
|
416
|
+
driveId?: string;
|
|
417
|
+
document?: PHDocument;
|
|
418
|
+
headers: IncomingHttpHeaders;
|
|
419
|
+
db: unknown;
|
|
420
|
+
isAdmin?: (address: string) => boolean;
|
|
421
|
+
user?: {
|
|
422
|
+
address: string;
|
|
423
|
+
chainId: number;
|
|
424
|
+
networkId: string;
|
|
425
|
+
};
|
|
426
|
+
documentPermissionService?: DocumentPermissionService;
|
|
427
|
+
authorizationService?: AuthorizationService;
|
|
428
|
+
};
|
|
429
|
+
type ISubgraph = {
|
|
430
|
+
name: string;
|
|
431
|
+
path?: string;
|
|
432
|
+
resolvers: Record<string, any>;
|
|
433
|
+
typeDefs: DocumentNode;
|
|
434
|
+
reactorClient: IReactorClient;
|
|
435
|
+
relationalDb: IRelationalDb;
|
|
436
|
+
hasSubscriptions?: boolean;
|
|
437
|
+
onSetup?: () => Promise<void>;
|
|
438
|
+
};
|
|
439
|
+
type SubgraphArgs = {
|
|
440
|
+
reactorClient: IReactorClient;
|
|
441
|
+
relationalDb: IRelationalDb;
|
|
442
|
+
analyticsStore: IAnalyticsStore;
|
|
443
|
+
graphqlManager: GraphQLManager$1;
|
|
444
|
+
syncManager: ISyncManager;
|
|
445
|
+
documentPermissionService?: DocumentPermissionService;
|
|
446
|
+
authorizationService?: AuthorizationService;
|
|
447
|
+
path?: string;
|
|
448
|
+
};
|
|
449
|
+
type GqlSigner = {
|
|
450
|
+
user: {
|
|
451
|
+
address: string;
|
|
452
|
+
networkId: string;
|
|
453
|
+
chainId: number;
|
|
454
|
+
};
|
|
455
|
+
app: {
|
|
456
|
+
name: string;
|
|
457
|
+
key: string;
|
|
458
|
+
};
|
|
459
|
+
signatures: string[];
|
|
460
|
+
};
|
|
461
|
+
type GqlOperationContext = {
|
|
462
|
+
signer: GqlSigner | undefined;
|
|
463
|
+
};
|
|
464
|
+
type GqlSignerUser = {
|
|
465
|
+
address: string;
|
|
466
|
+
networkId: string;
|
|
467
|
+
chainId: number;
|
|
468
|
+
};
|
|
469
|
+
type GqlSignerApp = {
|
|
470
|
+
name: string;
|
|
471
|
+
key: string;
|
|
472
|
+
};
|
|
473
|
+
type GqlOperation = {
|
|
474
|
+
id: string;
|
|
475
|
+
type: string;
|
|
476
|
+
index: number;
|
|
477
|
+
timestampUtcMs: string;
|
|
478
|
+
hash: string;
|
|
479
|
+
skip: number;
|
|
480
|
+
inputText: string;
|
|
481
|
+
error: string | undefined;
|
|
482
|
+
context: GqlOperationContext;
|
|
483
|
+
};
|
|
484
|
+
type GqlDocument = {
|
|
485
|
+
__typename?: string;
|
|
486
|
+
id: string;
|
|
487
|
+
name: string;
|
|
488
|
+
documentType: string;
|
|
489
|
+
revision: number;
|
|
490
|
+
createdAtUtcIso: string;
|
|
491
|
+
lastModifiedAtUtcIso: string;
|
|
492
|
+
operations: GqlOperation[];
|
|
493
|
+
stateJSON: JSON;
|
|
494
|
+
state: unknown;
|
|
495
|
+
initialState: unknown;
|
|
496
|
+
};
|
|
497
|
+
type GqlDriveDocument = GqlDocument & {
|
|
498
|
+
meta: {
|
|
499
|
+
preferredEditor?: string;
|
|
500
|
+
};
|
|
501
|
+
slug: string;
|
|
502
|
+
state: DocumentDriveGlobalState;
|
|
503
|
+
initialState: DocumentDriveGlobalState;
|
|
504
|
+
};
|
|
505
|
+
//#endregion
|
|
506
|
+
//#region src/graphql/base-subgraph.d.ts
|
|
507
|
+
declare class BaseSubgraph implements ISubgraph$1 {
|
|
508
|
+
name: string;
|
|
509
|
+
path: string;
|
|
510
|
+
resolvers: Record<string, any>;
|
|
511
|
+
typeDefs: DocumentNode;
|
|
512
|
+
reactorClient: IReactorClient;
|
|
513
|
+
graphqlManager: GraphQLManager$1;
|
|
514
|
+
relationalDb: IRelationalDb;
|
|
515
|
+
syncManager: ISyncManager;
|
|
516
|
+
documentPermissionService?: DocumentPermissionService;
|
|
517
|
+
authorizationService?: AuthorizationService;
|
|
518
|
+
constructor(args: SubgraphArgs$1);
|
|
519
|
+
onSetup(): Promise<void>;
|
|
520
|
+
protected getParentIdsFn(): GetParentIdsFn;
|
|
521
|
+
protected hasGlobalAdminAccess(ctx: Context): boolean;
|
|
522
|
+
protected canReadDocument(documentId: string, ctx: Context): Promise<boolean>;
|
|
523
|
+
protected assertCanRead(documentId: string, ctx: Context): Promise<void>;
|
|
524
|
+
protected assertCanWrite(documentId: string, ctx: Context): Promise<void>;
|
|
525
|
+
protected assertCanExecuteOperation(documentId: string, operationType: string, ctx: Context): Promise<void>;
|
|
526
|
+
}
|
|
527
|
+
//#endregion
|
|
528
|
+
//#region src/graphql/analytics-subgraph.d.ts
|
|
529
|
+
declare class AnalyticsSubgraph extends BaseSubgraph {
|
|
530
|
+
analyticsStore: IAnalyticsStore;
|
|
531
|
+
analyticsModel: AnalyticsModel;
|
|
532
|
+
name: string;
|
|
533
|
+
typeDefs: graphql.DocumentNode;
|
|
534
|
+
resolvers: GraphQLResolverMap<Context$1>;
|
|
535
|
+
constructor(args: SubgraphArgs$1);
|
|
536
|
+
}
|
|
537
|
+
//#endregion
|
|
538
|
+
//#region src/graphql/auth/resolvers.d.ts
|
|
539
|
+
type DocumentAccessInfo = {
|
|
540
|
+
documentId: string;
|
|
541
|
+
permissions: Array<{
|
|
542
|
+
documentId: string;
|
|
543
|
+
userAddress: string;
|
|
544
|
+
permission: DocumentPermissionLevel;
|
|
545
|
+
grantedBy: string;
|
|
546
|
+
createdAt: Date;
|
|
547
|
+
updatedAt: Date;
|
|
548
|
+
}>;
|
|
549
|
+
groupPermissions: Array<{
|
|
550
|
+
documentId: string;
|
|
551
|
+
groupId: number;
|
|
552
|
+
permission: DocumentPermissionLevel;
|
|
553
|
+
grantedBy: string;
|
|
554
|
+
createdAt: Date;
|
|
555
|
+
updatedAt: Date;
|
|
556
|
+
}>;
|
|
557
|
+
};
|
|
558
|
+
type Group$1 = {
|
|
559
|
+
id: number;
|
|
560
|
+
name: string;
|
|
561
|
+
description: string | null;
|
|
562
|
+
createdAt: Date;
|
|
563
|
+
updatedAt: Date;
|
|
564
|
+
};
|
|
565
|
+
type DocumentGroupPermission = {
|
|
566
|
+
documentId: string;
|
|
567
|
+
groupId: number;
|
|
568
|
+
permission: DocumentPermissionLevel;
|
|
569
|
+
grantedBy: string;
|
|
570
|
+
createdAt: Date;
|
|
571
|
+
updatedAt: Date;
|
|
572
|
+
};
|
|
573
|
+
type OperationUserPermission = {
|
|
574
|
+
documentId: string;
|
|
575
|
+
operationType: string;
|
|
576
|
+
userAddress: string;
|
|
577
|
+
grantedBy: string;
|
|
578
|
+
createdAt: Date;
|
|
579
|
+
};
|
|
580
|
+
type OperationGroupPermission = {
|
|
581
|
+
documentId: string;
|
|
582
|
+
operationType: string;
|
|
583
|
+
groupId: number;
|
|
584
|
+
grantedBy: string;
|
|
585
|
+
createdAt: Date;
|
|
586
|
+
};
|
|
587
|
+
type OperationPermissionsInfo = {
|
|
588
|
+
documentId: string;
|
|
589
|
+
operationType: string;
|
|
590
|
+
userPermissions: OperationUserPermission[];
|
|
591
|
+
groupPermissions: OperationGroupPermission[];
|
|
592
|
+
};
|
|
593
|
+
type DocumentProtectionInfo = {
|
|
594
|
+
documentId: string;
|
|
595
|
+
protected: boolean;
|
|
596
|
+
ownerAddress: string | null;
|
|
597
|
+
};
|
|
598
|
+
//#endregion
|
|
599
|
+
//#region src/graphql/auth/subgraph.d.ts
|
|
600
|
+
/**
|
|
601
|
+
* Auth Subgraph - handles all document permission and authorization operations
|
|
602
|
+
*
|
|
603
|
+
* This subgraph is conditionally registered based on the DOCUMENT_PERMISSIONS_ENABLED
|
|
604
|
+
* feature flag. When enabled, it provides GraphQL operations for:
|
|
605
|
+
* - Document permissions (grant/revoke user access)
|
|
606
|
+
* - Group management (create/delete groups, manage membership)
|
|
607
|
+
* - Group document permissions (grant/revoke group access)
|
|
608
|
+
* - Operation-level permissions (fine-grained operation control)
|
|
609
|
+
*/
|
|
610
|
+
declare class AuthSubgraph extends BaseSubgraph {
|
|
611
|
+
private logger;
|
|
612
|
+
constructor(args: SubgraphArgs);
|
|
613
|
+
name: string;
|
|
614
|
+
hasSubscriptions: boolean;
|
|
615
|
+
typeDefs: graphql.DocumentNode;
|
|
616
|
+
resolvers: {
|
|
617
|
+
Query: {
|
|
618
|
+
documentAccess: (_parent: unknown, args: {
|
|
619
|
+
documentId: string;
|
|
620
|
+
}) => Promise<DocumentAccessInfo>;
|
|
621
|
+
userDocumentPermissions: (_parent: unknown, _args: unknown, ctx: {
|
|
622
|
+
user?: {
|
|
623
|
+
address: string;
|
|
624
|
+
};
|
|
625
|
+
}) => Promise<{
|
|
626
|
+
documentId: string;
|
|
627
|
+
userAddress: string;
|
|
628
|
+
permission: DocumentPermissionLevel;
|
|
629
|
+
grantedBy: string;
|
|
630
|
+
createdAt: Date;
|
|
631
|
+
updatedAt: Date;
|
|
632
|
+
}[]>;
|
|
633
|
+
groups: () => Promise<Group$1[]>;
|
|
634
|
+
group: (_parent: unknown, args: {
|
|
635
|
+
id: number;
|
|
636
|
+
}) => Promise<Group$1 | null>;
|
|
637
|
+
userGroups: (_parent: unknown, args: {
|
|
638
|
+
userAddress: string;
|
|
639
|
+
}) => Promise<Group$1[]>;
|
|
640
|
+
operationPermissions: (_parent: unknown, args: {
|
|
641
|
+
documentId: string;
|
|
642
|
+
operationType: string;
|
|
643
|
+
}) => Promise<OperationPermissionsInfo>;
|
|
644
|
+
canExecuteOperation: (_parent: unknown, args: {
|
|
645
|
+
documentId: string;
|
|
646
|
+
operationType: string;
|
|
647
|
+
}, ctx: {
|
|
648
|
+
user?: {
|
|
649
|
+
address: string;
|
|
650
|
+
};
|
|
651
|
+
}) => Promise<boolean>;
|
|
652
|
+
documentProtection: (_parent: unknown, args: {
|
|
653
|
+
documentId: string;
|
|
654
|
+
}, ctx: {
|
|
655
|
+
user?: {
|
|
656
|
+
address: string;
|
|
657
|
+
};
|
|
658
|
+
}) => Promise<DocumentProtectionInfo>;
|
|
659
|
+
};
|
|
660
|
+
Mutation: {
|
|
661
|
+
setDocumentProtection: (_parent: unknown, args: {
|
|
662
|
+
documentId: string;
|
|
663
|
+
protected: boolean;
|
|
664
|
+
}, ctx: {
|
|
665
|
+
user?: {
|
|
666
|
+
address: string;
|
|
667
|
+
};
|
|
668
|
+
isAdmin?: (address: string) => boolean;
|
|
669
|
+
}) => Promise<DocumentProtectionInfo>;
|
|
670
|
+
transferDocumentOwnership: (_parent: unknown, args: {
|
|
671
|
+
documentId: string;
|
|
672
|
+
newOwnerAddress: string;
|
|
673
|
+
}, ctx: {
|
|
674
|
+
user?: {
|
|
675
|
+
address: string;
|
|
676
|
+
};
|
|
677
|
+
isAdmin?: (address: string) => boolean;
|
|
678
|
+
}) => Promise<DocumentProtectionInfo>;
|
|
679
|
+
grantDocumentPermission: (_parent: unknown, args: {
|
|
680
|
+
documentId: string;
|
|
681
|
+
userAddress: string;
|
|
682
|
+
permission: string;
|
|
683
|
+
}, ctx: {
|
|
684
|
+
user?: {
|
|
685
|
+
address: string;
|
|
686
|
+
};
|
|
687
|
+
isAdmin?: (address: string) => boolean;
|
|
688
|
+
}) => Promise<{
|
|
689
|
+
documentId: string;
|
|
690
|
+
userAddress: string;
|
|
691
|
+
permission: DocumentPermissionLevel;
|
|
692
|
+
grantedBy: string;
|
|
693
|
+
createdAt: Date;
|
|
694
|
+
updatedAt: Date;
|
|
695
|
+
}>;
|
|
696
|
+
revokeDocumentPermission: (_parent: unknown, args: {
|
|
697
|
+
documentId: string;
|
|
698
|
+
userAddress: string;
|
|
699
|
+
}, ctx: {
|
|
700
|
+
user?: {
|
|
701
|
+
address: string;
|
|
702
|
+
};
|
|
703
|
+
isAdmin?: (address: string) => boolean;
|
|
704
|
+
}) => Promise<boolean>;
|
|
705
|
+
createGroup: (_parent: unknown, args: {
|
|
706
|
+
name: string;
|
|
707
|
+
description?: string | null;
|
|
708
|
+
}) => Promise<Group$1>;
|
|
709
|
+
deleteGroup: (_parent: unknown, args: {
|
|
710
|
+
id: number;
|
|
711
|
+
}) => Promise<boolean>;
|
|
712
|
+
addUserToGroup: (_parent: unknown, args: {
|
|
713
|
+
userAddress: string;
|
|
714
|
+
groupId: number;
|
|
715
|
+
}) => Promise<boolean>;
|
|
716
|
+
removeUserFromGroup: (_parent: unknown, args: {
|
|
717
|
+
userAddress: string;
|
|
718
|
+
groupId: number;
|
|
719
|
+
}) => Promise<boolean>;
|
|
720
|
+
grantGroupPermission: (_parent: unknown, args: {
|
|
721
|
+
documentId: string;
|
|
722
|
+
groupId: number;
|
|
723
|
+
permission: string;
|
|
724
|
+
}, ctx: {
|
|
725
|
+
user?: {
|
|
726
|
+
address: string;
|
|
727
|
+
};
|
|
728
|
+
isAdmin?: (address: string) => boolean;
|
|
729
|
+
}) => Promise<DocumentGroupPermission>;
|
|
730
|
+
revokeGroupPermission: (_parent: unknown, args: {
|
|
731
|
+
documentId: string;
|
|
732
|
+
groupId: number;
|
|
733
|
+
}, ctx: {
|
|
734
|
+
user?: {
|
|
735
|
+
address: string;
|
|
736
|
+
};
|
|
737
|
+
isAdmin?: (address: string) => boolean;
|
|
738
|
+
}) => Promise<boolean>;
|
|
739
|
+
grantOperationPermission: (_parent: unknown, args: {
|
|
740
|
+
documentId: string;
|
|
741
|
+
operationType: string;
|
|
742
|
+
userAddress: string;
|
|
743
|
+
}, ctx: {
|
|
744
|
+
user?: {
|
|
745
|
+
address: string;
|
|
746
|
+
};
|
|
747
|
+
isAdmin?: (address: string) => boolean;
|
|
748
|
+
}) => Promise<OperationUserPermission>;
|
|
749
|
+
revokeOperationPermission: (_parent: unknown, args: {
|
|
750
|
+
documentId: string;
|
|
751
|
+
operationType: string;
|
|
752
|
+
userAddress: string;
|
|
753
|
+
}, ctx: {
|
|
754
|
+
user?: {
|
|
755
|
+
address: string;
|
|
756
|
+
};
|
|
757
|
+
isAdmin?: (address: string) => boolean;
|
|
758
|
+
}) => Promise<boolean>;
|
|
759
|
+
grantGroupOperationPermission: (_parent: unknown, args: {
|
|
760
|
+
documentId: string;
|
|
761
|
+
operationType: string;
|
|
762
|
+
groupId: number;
|
|
763
|
+
}, ctx: {
|
|
764
|
+
user?: {
|
|
765
|
+
address: string;
|
|
766
|
+
};
|
|
767
|
+
isAdmin?: (address: string) => boolean;
|
|
768
|
+
}) => Promise<OperationGroupPermission>;
|
|
769
|
+
revokeGroupOperationPermission: (_parent: unknown, args: {
|
|
770
|
+
documentId: string;
|
|
771
|
+
operationType: string;
|
|
772
|
+
groupId: number;
|
|
773
|
+
}, ctx: {
|
|
774
|
+
user?: {
|
|
775
|
+
address: string;
|
|
776
|
+
};
|
|
777
|
+
isAdmin?: (address: string) => boolean;
|
|
778
|
+
}) => Promise<boolean>;
|
|
779
|
+
};
|
|
780
|
+
Group: {
|
|
781
|
+
members: (parent: {
|
|
782
|
+
id: number;
|
|
783
|
+
}) => Promise<string[]>;
|
|
784
|
+
};
|
|
785
|
+
DocumentGroupPermission: {
|
|
786
|
+
group: (parent: {
|
|
787
|
+
groupId: number;
|
|
788
|
+
}) => Promise<Group$1>;
|
|
789
|
+
};
|
|
790
|
+
OperationGroupPermission: {
|
|
791
|
+
group: (parent: {
|
|
792
|
+
groupId: number;
|
|
793
|
+
}) => Promise<Group$1>;
|
|
794
|
+
};
|
|
795
|
+
};
|
|
796
|
+
onSetup(): Promise<void>;
|
|
797
|
+
}
|
|
798
|
+
//#endregion
|
|
799
|
+
//#region src/services/auth.service.d.ts
|
|
800
|
+
interface AuthConfig {
|
|
801
|
+
enabled: boolean;
|
|
802
|
+
admins: string[];
|
|
803
|
+
cacheTtl?: number;
|
|
804
|
+
skipCredentialVerification?: boolean;
|
|
805
|
+
}
|
|
806
|
+
interface User {
|
|
807
|
+
address: string;
|
|
808
|
+
chainId: number;
|
|
809
|
+
networkId: string;
|
|
810
|
+
}
|
|
811
|
+
interface AuthContext {
|
|
812
|
+
user?: User;
|
|
813
|
+
admins: string[];
|
|
814
|
+
auth_enabled: boolean;
|
|
815
|
+
}
|
|
816
|
+
declare class AuthService {
|
|
817
|
+
private readonly config;
|
|
818
|
+
constructor(config: AuthConfig);
|
|
819
|
+
authenticateRequest(request: globalThis.Request): Promise<AuthContext | globalThis.Response>;
|
|
820
|
+
authenticateWebSocketConnection(connectionParams: Record<string, unknown>): Promise<User | null>;
|
|
821
|
+
/**
|
|
822
|
+
* Verify the auth bearer token
|
|
823
|
+
*/
|
|
824
|
+
private verifyToken;
|
|
825
|
+
/**
|
|
826
|
+
* Extract user information from verification result
|
|
827
|
+
*/
|
|
828
|
+
private extractUserFromVerification;
|
|
829
|
+
/**
|
|
830
|
+
* Get additional context fields for GraphQL
|
|
831
|
+
*/
|
|
832
|
+
getAdditionalContextFields(): {
|
|
833
|
+
isAdmin: (address: string) => boolean;
|
|
834
|
+
};
|
|
835
|
+
/**
|
|
836
|
+
* Get user context for GraphQL
|
|
837
|
+
*/
|
|
838
|
+
getUserContext(user?: User): {
|
|
839
|
+
user?: undefined;
|
|
840
|
+
} | {
|
|
841
|
+
user: {
|
|
842
|
+
address: string;
|
|
843
|
+
chainId: number;
|
|
844
|
+
networkId: string;
|
|
845
|
+
};
|
|
846
|
+
};
|
|
847
|
+
/**
|
|
848
|
+
* Verify that the credential still exists on the Renown API
|
|
849
|
+
*/
|
|
850
|
+
private verifyCredentialExists;
|
|
851
|
+
}
|
|
852
|
+
//#endregion
|
|
853
|
+
//#region src/graphql/gateway/types.d.ts
|
|
854
|
+
type TlsOptions = {
|
|
855
|
+
keyPath: string;
|
|
856
|
+
certPath: string;
|
|
857
|
+
} | {
|
|
858
|
+
cert: Buffer | string;
|
|
859
|
+
key: Buffer | string;
|
|
860
|
+
} | true;
|
|
861
|
+
type GatewayContextFactory<TContext = unknown> = (request: Request) => Promise<TContext>;
|
|
862
|
+
type WsContextFactory<TContext = unknown> = (connectionParams: Record<string, unknown>) => Promise<TContext>;
|
|
863
|
+
type WsDisposer = {
|
|
864
|
+
dispose: () => void | Promise<void>;
|
|
865
|
+
};
|
|
866
|
+
type FetchHandler = (request: Request) => Promise<Response>;
|
|
867
|
+
/**
|
|
868
|
+
* A framework-agnostic description of a federated subgraph service.
|
|
869
|
+
* Used by IGatewayAdapter.createSupergraphHandler() to compose the supergraph SDL.
|
|
870
|
+
*/
|
|
871
|
+
type SubgraphDefinition = {
|
|
872
|
+
name: string;
|
|
873
|
+
typeDefs: DocumentNode;
|
|
874
|
+
url: string;
|
|
875
|
+
};
|
|
876
|
+
interface IGatewayAdapter<TContext = unknown> {
|
|
877
|
+
/** One-time startup. */
|
|
878
|
+
start(httpServer: http.Server): Promise<void>;
|
|
879
|
+
/**
|
|
880
|
+
* Returns a Fetch API handler for the given schema.
|
|
881
|
+
* Caller (IHttpAdapter) is responsible for mounting it at a path.
|
|
882
|
+
*/
|
|
883
|
+
createHandler(schema: GraphQLSchema, contextFactory: GatewayContextFactory<TContext>): Promise<FetchHandler>;
|
|
884
|
+
/**
|
|
885
|
+
* Create a federation gateway handler that composes all subgraphs into a supergraph.
|
|
886
|
+
* getSubgraphs is called eagerly (during setup) and again on every updateSupergraph() call.
|
|
887
|
+
*/
|
|
888
|
+
createSupergraphHandler(getSubgraphs: () => SubgraphDefinition[], httpServer: http.Server, contextFactory: GatewayContextFactory<TContext>): Promise<FetchHandler>;
|
|
889
|
+
/**
|
|
890
|
+
* Recompose the supergraph SDL from the current subgraph list and push the update
|
|
891
|
+
* to the running federation gateway. No-op if createSupergraphHandler() has not
|
|
892
|
+
* been called yet.
|
|
893
|
+
*/
|
|
894
|
+
updateSupergraph(): Promise<void>;
|
|
895
|
+
/** Attach WebSocket subscriptions. Returns a disposer. */
|
|
896
|
+
attachWebSocket(wsServer: WebSocketServer, schema: GraphQLSchema, contextFactory: WsContextFactory<TContext>): WsDisposer;
|
|
897
|
+
stop(): Promise<void>;
|
|
898
|
+
}
|
|
899
|
+
interface IHttpAdapter {
|
|
900
|
+
/** Set up CORS and body-parser equivalent middleware. */
|
|
901
|
+
setupMiddleware(config: {
|
|
902
|
+
corsOptions?: CorsOptions;
|
|
903
|
+
bodyLimit?: string;
|
|
904
|
+
}): void;
|
|
905
|
+
/**
|
|
906
|
+
* Mount a Fetch API handler.
|
|
907
|
+
* - exact = false (default): exact path match via internal dispatch map.
|
|
908
|
+
* - exact = true: prefix match - handler also receives all sub-paths
|
|
909
|
+
* (uses framework router.use() semantics).
|
|
910
|
+
*/
|
|
911
|
+
mount(path: string, handler: FetchHandler, options?: {
|
|
912
|
+
exact?: boolean;
|
|
913
|
+
}): void;
|
|
914
|
+
/**
|
|
915
|
+
* Register a GET route that returns a Fetch Response (for health, explorer, etc.).
|
|
916
|
+
* Registered directly on the underlying framework app, bypassing the sub-router.
|
|
917
|
+
*/
|
|
918
|
+
getRoute(path: string, handler: (request: Request) => Response | Promise<Response>): void;
|
|
919
|
+
/**
|
|
920
|
+
* Start listening on the given port. Returns the underlying http.Server
|
|
921
|
+
* so callers can attach WebSocket servers.
|
|
922
|
+
*/
|
|
923
|
+
listen(port: number, tls?: TlsOptions): Promise<http.Server>;
|
|
924
|
+
/**
|
|
925
|
+
* Mount a raw Connect/Express-compatible middleware function (e.g. Vite dev
|
|
926
|
+
* server middleware). The implementation is adapter-specific; for Express this
|
|
927
|
+
* is equivalent to `app.use(middleware)`.
|
|
928
|
+
*/
|
|
929
|
+
mountRawMiddleware(middleware: unknown): void;
|
|
930
|
+
/**
|
|
931
|
+
* Register a method-specific route handler using Node.js core HTTP types.
|
|
932
|
+
* Use this when a Fetch API FetchHandler is not possible (e.g. streaming
|
|
933
|
+
* protocols that require direct access to IncomingMessage/ServerResponse).
|
|
934
|
+
*
|
|
935
|
+
* The req/res objects are `http.IncomingMessage`/`http.ServerResponse`
|
|
936
|
+
* (Express Request/Response are compatible subtypes).
|
|
937
|
+
*/
|
|
938
|
+
mountNodeRoute(method: "DELETE" | "GET" | "POST", path: string, handler: (req: http.IncomingMessage, res: http.ServerResponse, body?: unknown) => void): void;
|
|
939
|
+
/**
|
|
940
|
+
* Register framework-specific Sentry error-capturing middleware after all routes
|
|
941
|
+
* are mounted. Each adapter calls the Sentry setup function appropriate for its
|
|
942
|
+
* framework (e.g. setupExpressErrorHandler, setupFastifyErrorHandler).
|
|
943
|
+
* No-op if Sentry is not relevant for the adapter.
|
|
944
|
+
*/
|
|
945
|
+
setupSentryErrorHandler(sentry: object): void;
|
|
946
|
+
/** The raw framework handle (e.g. Express app). Cast as needed at call sites. */
|
|
947
|
+
readonly handle: unknown;
|
|
948
|
+
}
|
|
949
|
+
//#endregion
|
|
950
|
+
//#region src/graphql/gateway/auth-middleware.d.ts
|
|
951
|
+
type AuthFetchMiddleware = (handler: FetchHandler) => FetchHandler;
|
|
952
|
+
/** Internal — only `graphql-manager.ts` should call this. */
|
|
953
|
+
declare function getAuthContext(request: globalThis.Request): AuthContext | undefined;
|
|
954
|
+
declare function createAuthFetchMiddleware(authService: AuthService): AuthFetchMiddleware;
|
|
955
|
+
//#endregion
|
|
956
|
+
//#region src/graphql/gateway/factory.d.ts
|
|
957
|
+
type GatewayAdapterType = "apollo" | "mercurius";
|
|
958
|
+
type HttpAdapterType = "express" | "fastify";
|
|
959
|
+
declare function createGatewayAdapter(type: GatewayAdapterType, logger: ILogger): IGatewayAdapter<Context>;
|
|
960
|
+
type HttpAdapterSetup = {
|
|
961
|
+
adapter: IHttpAdapter;
|
|
962
|
+
};
|
|
963
|
+
declare function createHttpAdapter(type: HttpAdapterType): HttpAdapterSetup;
|
|
964
|
+
//#endregion
|
|
965
|
+
//#region src/graphql/graphql-manager.d.ts
|
|
966
|
+
type GraphqlManagerFeatureFlags = {
|
|
967
|
+
enableDocumentModelSubgraphs?: boolean;
|
|
968
|
+
};
|
|
969
|
+
declare class GraphQLManager {
|
|
970
|
+
#private;
|
|
971
|
+
private readonly path;
|
|
972
|
+
private readonly httpServer;
|
|
973
|
+
private readonly wsServer;
|
|
974
|
+
private readonly reactorClient;
|
|
975
|
+
private readonly relationalDb;
|
|
976
|
+
private readonly analyticsStore;
|
|
977
|
+
private readonly syncManager;
|
|
978
|
+
private readonly logger;
|
|
979
|
+
private readonly httpAdapter;
|
|
980
|
+
private readonly gatewayAdapter;
|
|
981
|
+
private readonly authConfig?;
|
|
982
|
+
private readonly documentPermissionService?;
|
|
983
|
+
private readonly featureFlags;
|
|
984
|
+
private readonly port;
|
|
985
|
+
private readonly authorizationService?;
|
|
986
|
+
private initialized;
|
|
987
|
+
private coreSubgraphsMap;
|
|
988
|
+
private contextFields;
|
|
989
|
+
private readonly subgraphs;
|
|
990
|
+
private authService;
|
|
991
|
+
private readonly subgraphWsDisposers;
|
|
992
|
+
/** Cached document models for schema generation - updated on init and regenerate */
|
|
993
|
+
private cachedDocumentModels;
|
|
994
|
+
private readonly subgraphHandlerCache;
|
|
995
|
+
constructor(path: string, httpServer: http.Server, wsServer: WebSocketServer, reactorClient: IReactorClient, relationalDb: IRelationalDb, analyticsStore: IAnalyticsStore, syncManager: ISyncManager, logger: ILogger, httpAdapter: IHttpAdapter, gatewayAdapter: IGatewayAdapter<Context$1>, authConfig?: AuthConfig | undefined, documentPermissionService?: DocumentPermissionService | undefined, featureFlags?: GraphqlManagerFeatureFlags, port?: number, authorizationService?: AuthorizationService | undefined);
|
|
996
|
+
init(coreSubgraphs: SubgraphClass$1[], authMiddleware?: AuthFetchMiddleware): Promise<void>;
|
|
997
|
+
/**
|
|
998
|
+
* Regenerate document model subgraphs when models are dynamically loaded.
|
|
999
|
+
* Fetches current modules from reactor client (source of truth).
|
|
1000
|
+
*/
|
|
1001
|
+
regenerateDocumentModelSubgraphs(): Promise<void>;
|
|
1002
|
+
/**
|
|
1003
|
+
* Register a pre-constructed subgraph instance.
|
|
1004
|
+
* Use this when you need to pass custom dependencies to a subgraph.
|
|
1005
|
+
*/
|
|
1006
|
+
registerSubgraphInstance(subgraphInstance: ISubgraph$1, supergraph?: string, core?: boolean): Promise<ISubgraph$1>;
|
|
1007
|
+
/**
|
|
1008
|
+
* Get the base path used for subgraph registration.
|
|
1009
|
+
*/
|
|
1010
|
+
getBasePath(): string;
|
|
1011
|
+
registerSubgraph(subgraph: SubgraphClass$1, supergraph?: string, core?: boolean): Promise<ISubgraph$1>;
|
|
1012
|
+
updateRouter: (immediate?: boolean) => Promise<void>;
|
|
1013
|
+
private _updateRouter;
|
|
1014
|
+
getAdditionalContextFields: () => Record<string, any>;
|
|
1015
|
+
setAdditionalContextFields(fields: Record<string, any>): void;
|
|
1016
|
+
setSupergraph(supergraph: string, subgraphs: ISubgraph$1[]): Promise<void>;
|
|
1017
|
+
shutdown(): Promise<void>;
|
|
1018
|
+
}
|
|
1019
|
+
//#endregion
|
|
1020
|
+
//#region src/services/package-storage.d.ts
|
|
1021
|
+
interface InstalledPackageInfo {
|
|
1022
|
+
name: string;
|
|
1023
|
+
version?: string;
|
|
1024
|
+
registryUrl: string;
|
|
1025
|
+
installedAt: Date;
|
|
1026
|
+
documentTypes: string[];
|
|
1027
|
+
}
|
|
1028
|
+
interface IPackageStorage {
|
|
1029
|
+
get(name: string): Promise<InstalledPackageInfo | undefined>;
|
|
1030
|
+
getAll(): Promise<InstalledPackageInfo[]>;
|
|
1031
|
+
set(name: string, info: InstalledPackageInfo): Promise<void>;
|
|
1032
|
+
delete(name: string): Promise<boolean>;
|
|
1033
|
+
has(name: string): Promise<boolean>;
|
|
1034
|
+
}
|
|
1035
|
+
declare class InMemoryPackageStorage implements IPackageStorage {
|
|
1036
|
+
private packages;
|
|
1037
|
+
get(name: string): Promise<InstalledPackageInfo | undefined>;
|
|
1038
|
+
getAll(): Promise<InstalledPackageInfo[]>;
|
|
1039
|
+
set(name: string, info: InstalledPackageInfo): Promise<void>;
|
|
1040
|
+
delete(name: string): Promise<boolean>;
|
|
1041
|
+
has(name: string): Promise<boolean>;
|
|
1042
|
+
}
|
|
1043
|
+
//#endregion
|
|
1044
|
+
//#region src/types.d.ts
|
|
1045
|
+
type API = {
|
|
1046
|
+
httpAdapter: IHttpAdapter;
|
|
1047
|
+
graphqlManager: GraphQLManager$1;
|
|
1048
|
+
packages: IPackageManager;
|
|
1049
|
+
};
|
|
1050
|
+
type ReactorModule = {
|
|
1051
|
+
analyticsStore: IAnalyticsStore;
|
|
1052
|
+
relationalDb: IRelationalDb$1;
|
|
1053
|
+
};
|
|
1054
|
+
/** Per-drive factory after the host `module` has been applied once. */
|
|
1055
|
+
type ProcessorDriveFactory = (driveHeader: PHDocumentHeader) => ProcessorRecord[] | Promise<ProcessorRecord[]>;
|
|
1056
|
+
/**
|
|
1057
|
+
* Builds a per-drive factory from the host module (e.g. vetra `processorFactory`).
|
|
1058
|
+
* Shape: `(module) => (driveHeader) => ...`
|
|
1059
|
+
*/
|
|
1060
|
+
type ProcessorFactoryBuilder = (module: IProcessorHostModule) => ProcessorDriveFactory | Promise<ProcessorDriveFactory>;
|
|
1061
|
+
/** Multiple initializers per package name (e.g. Switchboard `processors` option). */
|
|
1062
|
+
type Processor = ProcessorFactoryBuilder[];
|
|
1063
|
+
//#endregion
|
|
1064
|
+
//#region src/packages/http-loader.d.ts
|
|
1065
|
+
interface HttpPackageLoaderOptions {
|
|
1066
|
+
registryUrl: string;
|
|
1067
|
+
}
|
|
1068
|
+
interface HttpPackageLoaderLogger {
|
|
1069
|
+
info: (msg: string) => void;
|
|
1070
|
+
error: (msg: string, err: unknown) => void;
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* Loads document models, subgraphs, and processors from an HTTP registry.
|
|
1074
|
+
* Uses Node.js module loader hooks to import directly from HTTP URLs.
|
|
1075
|
+
*
|
|
1076
|
+
* IMPORTANT: Requires https-hooks to be registered before use:
|
|
1077
|
+
* import { register } from "node:module";
|
|
1078
|
+
* register("@powerhousedao/reactor-api/https-hooks", import.meta.url);
|
|
1079
|
+
*/
|
|
1080
|
+
declare class HttpPackageLoader implements IPackageLoader {
|
|
1081
|
+
private readonly registryUrl;
|
|
1082
|
+
private readonly logger;
|
|
1083
|
+
readonly name = "HttpPackageLoader";
|
|
1084
|
+
readonly documentModelLoader: HttpDocumentModelLoader;
|
|
1085
|
+
constructor(options: HttpPackageLoaderOptions);
|
|
1086
|
+
/**
|
|
1087
|
+
* Load document models from a package in the HTTP registry.
|
|
1088
|
+
* Imports directly from HTTP URL using Node.js loader hooks.
|
|
1089
|
+
*/
|
|
1090
|
+
/**
|
|
1091
|
+
* Parse a package specifier like "@scope/pkg@tag" into name and optional tag.
|
|
1092
|
+
*/
|
|
1093
|
+
private parsePackageSpec;
|
|
1094
|
+
loadDocumentModels(packageSpec: string): Promise<DocumentModelModule[]>;
|
|
1095
|
+
loadSubgraphs(packageSpec: string): Promise<SubgraphClass$1[]>;
|
|
1096
|
+
loadProcessors(packageSpec: string): Promise<ProcessorFactoryBuilder | null>;
|
|
1097
|
+
/**
|
|
1098
|
+
* Load document models from multiple packages.
|
|
1099
|
+
* Continues loading even if some packages fail.
|
|
1100
|
+
*/
|
|
1101
|
+
loadPackages(packageNames: string[], logger?: HttpPackageLoaderLogger): Promise<DocumentModelModule[]>;
|
|
1102
|
+
private isValidPackageName;
|
|
1103
|
+
}
|
|
1104
|
+
declare class HttpDocumentModelLoader implements IDocumentModelLoader {
|
|
1105
|
+
private readonly loader;
|
|
1106
|
+
private readonly logger;
|
|
1107
|
+
private readonly documentTypeCache;
|
|
1108
|
+
private readonly packageModulesCache;
|
|
1109
|
+
private onModelLoaded?;
|
|
1110
|
+
constructor(loader: HttpPackageLoader);
|
|
1111
|
+
setOnModelLoaded(callback: (model: DocumentModelModule) => void): void;
|
|
1112
|
+
clearCache(): void;
|
|
1113
|
+
load(documentType: string): Promise<DocumentModelModule>;
|
|
1114
|
+
private findPackageByDocumentType;
|
|
1115
|
+
getLoadedPackages(): string[];
|
|
1116
|
+
getPackageModules(packageName: string): DocumentModelModule[] | undefined;
|
|
1117
|
+
removeFromCache(packageName: string): void;
|
|
1118
|
+
}
|
|
1119
|
+
//#endregion
|
|
1120
|
+
//#region src/services/package-management.service.d.ts
|
|
1121
|
+
interface InstallPackageResult {
|
|
1122
|
+
package: InstalledPackageInfo;
|
|
1123
|
+
documentModelsLoaded: number;
|
|
1124
|
+
}
|
|
1125
|
+
interface PackageManagementServiceOptions {
|
|
1126
|
+
storage?: IPackageStorage;
|
|
1127
|
+
defaultRegistryUrl?: string;
|
|
1128
|
+
httpLoader?: HttpPackageLoader;
|
|
1129
|
+
documentModelRegistry?: IDocumentModelRegistry;
|
|
1130
|
+
}
|
|
1131
|
+
declare class PackageManagementService {
|
|
1132
|
+
private readonly storage;
|
|
1133
|
+
private readonly defaultRegistryUrl?;
|
|
1134
|
+
private readonly httpLoader?;
|
|
1135
|
+
private readonly documentModelRegistry?;
|
|
1136
|
+
private readonly logger;
|
|
1137
|
+
private onModelsChanged?;
|
|
1138
|
+
private loadedModulesCache;
|
|
1139
|
+
constructor(options?: PackageManagementServiceOptions);
|
|
1140
|
+
setOnModelsChanged(callback: (models: DocumentModelModule[]) => void): void;
|
|
1141
|
+
installPackage(name: string, registryUrl?: string): Promise<InstallPackageResult>;
|
|
1142
|
+
uninstallPackage(name: string): Promise<boolean>;
|
|
1143
|
+
getInstalledPackages(): Promise<InstalledPackageInfo[]>;
|
|
1144
|
+
getInstalledPackage(name: string): Promise<InstalledPackageInfo | undefined>;
|
|
1145
|
+
getAllLoadedModules(): DocumentModelModule[];
|
|
1146
|
+
private triggerModelsChanged;
|
|
1147
|
+
}
|
|
1148
|
+
//#endregion
|
|
1149
|
+
//#region src/graphql/packages/subgraph.d.ts
|
|
1150
|
+
interface PackagesSubgraphArgs extends SubgraphArgs {
|
|
1151
|
+
packageManagementService: PackageManagementService;
|
|
1152
|
+
}
|
|
1153
|
+
declare class PackagesSubgraph extends BaseSubgraph {
|
|
1154
|
+
private logger;
|
|
1155
|
+
private packageManagementService;
|
|
1156
|
+
constructor(args: PackagesSubgraphArgs);
|
|
1157
|
+
name: string;
|
|
1158
|
+
hasSubscriptions: boolean;
|
|
1159
|
+
typeDefs: graphql.DocumentNode;
|
|
1160
|
+
resolvers: {
|
|
1161
|
+
Query: {
|
|
1162
|
+
Packages: () => {};
|
|
1163
|
+
};
|
|
1164
|
+
PackagesQueries: {
|
|
1165
|
+
installedPackages: () => Promise<{
|
|
1166
|
+
name: string;
|
|
1167
|
+
version: string | null;
|
|
1168
|
+
registryUrl: string;
|
|
1169
|
+
installedAt: string;
|
|
1170
|
+
documentTypes: string[];
|
|
1171
|
+
}[]>;
|
|
1172
|
+
installedPackage: (_parent: unknown, args: {
|
|
1173
|
+
name: string;
|
|
1174
|
+
}) => Promise<{
|
|
1175
|
+
name: string;
|
|
1176
|
+
version: string | null;
|
|
1177
|
+
registryUrl: string;
|
|
1178
|
+
installedAt: string;
|
|
1179
|
+
documentTypes: string[];
|
|
1180
|
+
} | null>;
|
|
1181
|
+
};
|
|
1182
|
+
Mutation: {
|
|
1183
|
+
Packages: () => {};
|
|
1184
|
+
};
|
|
1185
|
+
PackagesMutations: {
|
|
1186
|
+
installPackage: (_parent: unknown, args: {
|
|
1187
|
+
name: string;
|
|
1188
|
+
registryUrl?: string | null;
|
|
1189
|
+
}, ctx: Context) => Promise<{
|
|
1190
|
+
package: ReturnType<(info: InstalledPackageInfo) => {
|
|
1191
|
+
name: string;
|
|
1192
|
+
version: string | null;
|
|
1193
|
+
registryUrl: string;
|
|
1194
|
+
installedAt: string;
|
|
1195
|
+
documentTypes: string[];
|
|
1196
|
+
}>;
|
|
1197
|
+
documentModelsLoaded: number;
|
|
1198
|
+
}>;
|
|
1199
|
+
uninstallPackage: (_parent: unknown, args: {
|
|
1200
|
+
name: string;
|
|
1201
|
+
}, ctx: Context) => Promise<boolean>;
|
|
1202
|
+
};
|
|
1203
|
+
};
|
|
1204
|
+
onSetup(): Promise<void>;
|
|
1205
|
+
}
|
|
1206
|
+
//#endregion
|
|
1207
|
+
//#region src/graphql/playground.d.ts
|
|
1208
|
+
declare function renderGraphqlPlayground(url: string, query?: string, headers?: Record<string, string>): string;
|
|
1209
|
+
//#endregion
|
|
1210
|
+
//#region src/graphql/reactor/gen/graphql.d.ts
|
|
1211
|
+
type Maybe<T> = T | null | undefined;
|
|
1212
|
+
type InputMaybe<T> = T | null | undefined;
|
|
1213
|
+
type Exact<T extends {
|
|
1214
|
+
[key: string]: unknown;
|
|
1215
|
+
}> = { [K in keyof T]: T[K] };
|
|
1216
|
+
type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
|
|
1217
|
+
type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
|
|
1218
|
+
type MakeEmpty<T extends {
|
|
1219
|
+
[key: string]: unknown;
|
|
1220
|
+
}, K extends keyof T> = { [_ in K]?: never };
|
|
1221
|
+
type Incremental<T> = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never };
|
|
1222
|
+
type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
|
|
1223
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
1224
|
+
type Scalars = {
|
|
1225
|
+
ID: {
|
|
1226
|
+
input: string;
|
|
1227
|
+
output: string;
|
|
1228
|
+
};
|
|
1229
|
+
String: {
|
|
1230
|
+
input: string;
|
|
1231
|
+
output: string;
|
|
1232
|
+
};
|
|
1233
|
+
Boolean: {
|
|
1234
|
+
input: boolean;
|
|
1235
|
+
output: boolean;
|
|
1236
|
+
};
|
|
1237
|
+
Int: {
|
|
1238
|
+
input: number;
|
|
1239
|
+
output: number;
|
|
1240
|
+
};
|
|
1241
|
+
Float: {
|
|
1242
|
+
input: number;
|
|
1243
|
+
output: number;
|
|
1244
|
+
};
|
|
1245
|
+
DateTime: {
|
|
1246
|
+
input: string | Date;
|
|
1247
|
+
output: string | Date;
|
|
1248
|
+
};
|
|
1249
|
+
JSONObject: {
|
|
1250
|
+
input: NonNullable<unknown>;
|
|
1251
|
+
output: NonNullable<unknown>;
|
|
1252
|
+
};
|
|
1253
|
+
};
|
|
1254
|
+
type Action = {
|
|
1255
|
+
readonly attachments?: Maybe<ReadonlyArray<Attachment>>;
|
|
1256
|
+
readonly context?: Maybe<ActionContext>;
|
|
1257
|
+
readonly id: Scalars["String"]["output"];
|
|
1258
|
+
readonly input: Scalars["JSONObject"]["output"];
|
|
1259
|
+
readonly scope: Scalars["String"]["output"];
|
|
1260
|
+
readonly timestampUtcMs: Scalars["String"]["output"];
|
|
1261
|
+
readonly type: Scalars["String"]["output"];
|
|
1262
|
+
};
|
|
1263
|
+
type ActionContext = {
|
|
1264
|
+
readonly signer?: Maybe<ReactorSigner>;
|
|
1265
|
+
};
|
|
1266
|
+
type ActionContextInput = {
|
|
1267
|
+
readonly signer?: InputMaybe<ReactorSignerInput>;
|
|
1268
|
+
};
|
|
1269
|
+
type ActionInput = {
|
|
1270
|
+
readonly attachments?: InputMaybe<ReadonlyArray<AttachmentInput>>;
|
|
1271
|
+
readonly context?: InputMaybe<ActionContextInput>;
|
|
1272
|
+
readonly id: Scalars["String"]["input"];
|
|
1273
|
+
readonly input: Scalars["JSONObject"]["input"];
|
|
1274
|
+
readonly scope: Scalars["String"]["input"];
|
|
1275
|
+
readonly timestampUtcMs: Scalars["String"]["input"];
|
|
1276
|
+
readonly type: Scalars["String"]["input"];
|
|
1277
|
+
};
|
|
1278
|
+
type Attachment = {
|
|
1279
|
+
readonly data: Scalars["String"]["output"];
|
|
1280
|
+
readonly extension?: Maybe<Scalars["String"]["output"]>;
|
|
1281
|
+
readonly fileName?: Maybe<Scalars["String"]["output"]>;
|
|
1282
|
+
readonly hash: Scalars["String"]["output"];
|
|
1283
|
+
readonly mimeType: Scalars["String"]["output"];
|
|
1284
|
+
};
|
|
1285
|
+
type AttachmentInput = {
|
|
1286
|
+
readonly data: Scalars["String"]["input"];
|
|
1287
|
+
readonly extension?: InputMaybe<Scalars["String"]["input"]>;
|
|
1288
|
+
readonly fileName?: InputMaybe<Scalars["String"]["input"]>;
|
|
1289
|
+
readonly hash: Scalars["String"]["input"];
|
|
1290
|
+
readonly mimeType: Scalars["String"]["input"];
|
|
1291
|
+
};
|
|
1292
|
+
type ChannelMeta = {
|
|
1293
|
+
readonly id: Scalars["String"]["output"];
|
|
1294
|
+
};
|
|
1295
|
+
type ChannelMetaInput = {
|
|
1296
|
+
readonly id: Scalars["String"]["input"];
|
|
1297
|
+
};
|
|
1298
|
+
type DeadLetterInfo = {
|
|
1299
|
+
readonly branch: Scalars["String"]["output"];
|
|
1300
|
+
readonly documentId: Scalars["String"]["output"];
|
|
1301
|
+
readonly error: Scalars["String"]["output"];
|
|
1302
|
+
readonly jobId: Scalars["String"]["output"];
|
|
1303
|
+
readonly operationCount: Scalars["Int"]["output"];
|
|
1304
|
+
readonly scopes: ReadonlyArray<Scalars["String"]["output"]>;
|
|
1305
|
+
};
|
|
1306
|
+
type DocumentChangeContext = {
|
|
1307
|
+
readonly childId?: Maybe<Scalars["String"]["output"]>;
|
|
1308
|
+
readonly parentId?: Maybe<Scalars["String"]["output"]>;
|
|
1309
|
+
};
|
|
1310
|
+
type DocumentChangeEvent = {
|
|
1311
|
+
readonly context?: Maybe<DocumentChangeContext>;
|
|
1312
|
+
readonly documents: ReadonlyArray<PhDocument>;
|
|
1313
|
+
readonly type: DocumentChangeType;
|
|
1314
|
+
};
|
|
1315
|
+
declare enum DocumentChangeType {
|
|
1316
|
+
ChildAdded = "CHILD_ADDED",
|
|
1317
|
+
ChildRemoved = "CHILD_REMOVED",
|
|
1318
|
+
Created = "CREATED",
|
|
1319
|
+
Deleted = "DELETED",
|
|
1320
|
+
ParentAdded = "PARENT_ADDED",
|
|
1321
|
+
ParentRemoved = "PARENT_REMOVED",
|
|
1322
|
+
Updated = "UPDATED"
|
|
1323
|
+
}
|
|
1324
|
+
type DocumentModelGlobalState = {
|
|
1325
|
+
readonly id: Scalars["String"]["output"];
|
|
1326
|
+
readonly name: Scalars["String"]["output"];
|
|
1327
|
+
readonly namespace?: Maybe<Scalars["String"]["output"]>;
|
|
1328
|
+
readonly specification: Scalars["JSONObject"]["output"];
|
|
1329
|
+
readonly version?: Maybe<Scalars["String"]["output"]>;
|
|
1330
|
+
};
|
|
1331
|
+
type DocumentModelResultPage = {
|
|
1332
|
+
readonly cursor?: Maybe<Scalars["String"]["output"]>;
|
|
1333
|
+
readonly hasNextPage: Scalars["Boolean"]["output"];
|
|
1334
|
+
readonly hasPreviousPage: Scalars["Boolean"]["output"];
|
|
1335
|
+
readonly items: ReadonlyArray<DocumentModelGlobalState>;
|
|
1336
|
+
readonly totalCount: Scalars["Int"]["output"];
|
|
1337
|
+
};
|
|
1338
|
+
type DocumentOperationsFilterInput = {
|
|
1339
|
+
readonly actionTypes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
1340
|
+
readonly branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
1341
|
+
readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
1342
|
+
readonly sinceRevision?: InputMaybe<Scalars["Int"]["input"]>;
|
|
1343
|
+
readonly timestampFrom?: InputMaybe<Scalars["String"]["input"]>;
|
|
1344
|
+
readonly timestampTo?: InputMaybe<Scalars["String"]["input"]>;
|
|
1345
|
+
};
|
|
1346
|
+
type DocumentWithChildren = {
|
|
1347
|
+
readonly childIds: ReadonlyArray<Scalars["String"]["output"]>;
|
|
1348
|
+
readonly document: PhDocument;
|
|
1349
|
+
};
|
|
1350
|
+
type JobChangeEvent = {
|
|
1351
|
+
readonly error?: Maybe<Scalars["String"]["output"]>;
|
|
1352
|
+
readonly jobId: Scalars["String"]["output"];
|
|
1353
|
+
readonly result: Scalars["JSONObject"]["output"];
|
|
1354
|
+
readonly status: Scalars["String"]["output"];
|
|
1355
|
+
};
|
|
1356
|
+
type JobInfo = {
|
|
1357
|
+
readonly completedAt?: Maybe<Scalars["DateTime"]["output"]>;
|
|
1358
|
+
readonly createdAt: Scalars["DateTime"]["output"];
|
|
1359
|
+
readonly error?: Maybe<Scalars["String"]["output"]>;
|
|
1360
|
+
readonly id: Scalars["String"]["output"];
|
|
1361
|
+
readonly result: Scalars["JSONObject"]["output"];
|
|
1362
|
+
readonly status: Scalars["String"]["output"];
|
|
1363
|
+
};
|
|
1364
|
+
type MoveChildrenResult = {
|
|
1365
|
+
readonly source: PhDocument;
|
|
1366
|
+
readonly target: PhDocument;
|
|
1367
|
+
};
|
|
1368
|
+
type Mutation = {
|
|
1369
|
+
readonly addChildren: PhDocument;
|
|
1370
|
+
readonly createDocument: PhDocument;
|
|
1371
|
+
readonly createEmptyDocument: PhDocument;
|
|
1372
|
+
readonly deleteDocument: Scalars["Boolean"]["output"];
|
|
1373
|
+
readonly deleteDocuments: Scalars["Boolean"]["output"];
|
|
1374
|
+
readonly moveChildren: MoveChildrenResult;
|
|
1375
|
+
readonly mutateDocument: PhDocument;
|
|
1376
|
+
readonly mutateDocumentAsync: Scalars["String"]["output"];
|
|
1377
|
+
readonly pushSyncEnvelopes: Scalars["Boolean"]["output"];
|
|
1378
|
+
readonly removeChildren: PhDocument;
|
|
1379
|
+
readonly renameDocument: PhDocument;
|
|
1380
|
+
readonly touchChannel: TouchChannelResult;
|
|
1381
|
+
};
|
|
1382
|
+
type MutationAddChildrenArgs = {
|
|
1383
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
1384
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
1385
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
1386
|
+
};
|
|
1387
|
+
type MutationCreateDocumentArgs = {
|
|
1388
|
+
document: Scalars["JSONObject"]["input"];
|
|
1389
|
+
parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
1390
|
+
};
|
|
1391
|
+
type MutationCreateEmptyDocumentArgs = {
|
|
1392
|
+
documentType: Scalars["String"]["input"];
|
|
1393
|
+
parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
1394
|
+
};
|
|
1395
|
+
type MutationDeleteDocumentArgs = {
|
|
1396
|
+
identifier: Scalars["String"]["input"];
|
|
1397
|
+
propagate?: InputMaybe<PropagationMode>;
|
|
1398
|
+
};
|
|
1399
|
+
type MutationDeleteDocumentsArgs = {
|
|
1400
|
+
identifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
1401
|
+
propagate?: InputMaybe<PropagationMode>;
|
|
1402
|
+
};
|
|
1403
|
+
type MutationMoveChildrenArgs = {
|
|
1404
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
1405
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
1406
|
+
sourceParentIdentifier: Scalars["String"]["input"];
|
|
1407
|
+
targetParentIdentifier: Scalars["String"]["input"];
|
|
1408
|
+
};
|
|
1409
|
+
type MutationMutateDocumentArgs = {
|
|
1410
|
+
actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
|
|
1411
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
1412
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1413
|
+
};
|
|
1414
|
+
type MutationMutateDocumentAsyncArgs = {
|
|
1415
|
+
actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
|
|
1416
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
1417
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1418
|
+
};
|
|
1419
|
+
type MutationPushSyncEnvelopesArgs = {
|
|
1420
|
+
envelopes: ReadonlyArray<SyncEnvelopeInput>;
|
|
1421
|
+
};
|
|
1422
|
+
type MutationRemoveChildrenArgs = {
|
|
1423
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
1424
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
1425
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
1426
|
+
};
|
|
1427
|
+
type MutationRenameDocumentArgs = {
|
|
1428
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
1429
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
1430
|
+
name: Scalars["String"]["input"];
|
|
1431
|
+
};
|
|
1432
|
+
type MutationTouchChannelArgs = {
|
|
1433
|
+
input: TouchChannelInput;
|
|
1434
|
+
};
|
|
1435
|
+
type OperationContext = {
|
|
1436
|
+
readonly branch: Scalars["String"]["output"];
|
|
1437
|
+
readonly documentId: Scalars["String"]["output"];
|
|
1438
|
+
readonly documentType: Scalars["String"]["output"];
|
|
1439
|
+
readonly ordinal: Scalars["Int"]["output"];
|
|
1440
|
+
readonly scope: Scalars["String"]["output"];
|
|
1441
|
+
};
|
|
1442
|
+
type OperationContextInput = {
|
|
1443
|
+
readonly branch: Scalars["String"]["input"];
|
|
1444
|
+
readonly documentId: Scalars["String"]["input"];
|
|
1445
|
+
readonly documentType: Scalars["String"]["input"];
|
|
1446
|
+
readonly ordinal: Scalars["Int"]["input"];
|
|
1447
|
+
readonly scope: Scalars["String"]["input"];
|
|
1448
|
+
};
|
|
1449
|
+
type OperationInput = {
|
|
1450
|
+
readonly action: ActionInput;
|
|
1451
|
+
readonly error?: InputMaybe<Scalars["String"]["input"]>;
|
|
1452
|
+
readonly hash: Scalars["String"]["input"];
|
|
1453
|
+
readonly id?: InputMaybe<Scalars["String"]["input"]>;
|
|
1454
|
+
readonly index: Scalars["Int"]["input"];
|
|
1455
|
+
readonly skip: Scalars["Int"]["input"];
|
|
1456
|
+
readonly timestampUtcMs: Scalars["String"]["input"];
|
|
1457
|
+
};
|
|
1458
|
+
type OperationWithContext = {
|
|
1459
|
+
readonly context: OperationContext;
|
|
1460
|
+
readonly operation: ReactorOperation;
|
|
1461
|
+
};
|
|
1462
|
+
type OperationWithContextInput = {
|
|
1463
|
+
readonly context: OperationContextInput;
|
|
1464
|
+
readonly operation: OperationInput;
|
|
1465
|
+
};
|
|
1466
|
+
type OperationsFilterInput = {
|
|
1467
|
+
readonly actionTypes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
1468
|
+
readonly branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
1469
|
+
readonly documentId: Scalars["String"]["input"];
|
|
1470
|
+
readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
1471
|
+
readonly sinceRevision?: InputMaybe<Scalars["Int"]["input"]>;
|
|
1472
|
+
readonly timestampFrom?: InputMaybe<Scalars["String"]["input"]>;
|
|
1473
|
+
readonly timestampTo?: InputMaybe<Scalars["String"]["input"]>;
|
|
1474
|
+
};
|
|
1475
|
+
type PhDocument = {
|
|
1476
|
+
readonly createdAtUtcIso: Scalars["DateTime"]["output"];
|
|
1477
|
+
readonly documentType: Scalars["String"]["output"];
|
|
1478
|
+
readonly id: Scalars["String"]["output"];
|
|
1479
|
+
readonly lastModifiedAtUtcIso: Scalars["DateTime"]["output"];
|
|
1480
|
+
readonly name: Scalars["String"]["output"];
|
|
1481
|
+
readonly operations?: Maybe<ReactorOperationResultPage>;
|
|
1482
|
+
readonly preferredEditor?: Maybe<Scalars["String"]["output"]>;
|
|
1483
|
+
readonly revisionsList: ReadonlyArray<Revision>;
|
|
1484
|
+
readonly slug?: Maybe<Scalars["String"]["output"]>;
|
|
1485
|
+
readonly state: Scalars["JSONObject"]["output"];
|
|
1486
|
+
};
|
|
1487
|
+
type PhDocumentOperationsArgs = {
|
|
1488
|
+
filter?: InputMaybe<DocumentOperationsFilterInput>;
|
|
1489
|
+
paging?: InputMaybe<PagingInput>;
|
|
1490
|
+
};
|
|
1491
|
+
type PhDocumentResultPage = {
|
|
1492
|
+
readonly cursor?: Maybe<Scalars["String"]["output"]>;
|
|
1493
|
+
readonly hasNextPage: Scalars["Boolean"]["output"];
|
|
1494
|
+
readonly hasPreviousPage: Scalars["Boolean"]["output"];
|
|
1495
|
+
readonly items: ReadonlyArray<PhDocument>;
|
|
1496
|
+
readonly totalCount: Scalars["Int"]["output"];
|
|
1497
|
+
};
|
|
1498
|
+
type PagingInput = {
|
|
1499
|
+
readonly cursor?: InputMaybe<Scalars["String"]["input"]>;
|
|
1500
|
+
readonly limit?: InputMaybe<Scalars["Int"]["input"]>;
|
|
1501
|
+
readonly offset?: InputMaybe<Scalars["Int"]["input"]>;
|
|
1502
|
+
};
|
|
1503
|
+
type PollSyncEnvelopesResult = {
|
|
1504
|
+
readonly ackOrdinal: Scalars["Int"]["output"];
|
|
1505
|
+
readonly deadLetters: ReadonlyArray<DeadLetterInfo>;
|
|
1506
|
+
readonly envelopes: ReadonlyArray<SyncEnvelope>;
|
|
1507
|
+
readonly hasMore: Scalars["Boolean"]["output"];
|
|
1508
|
+
};
|
|
1509
|
+
declare enum PropagationMode {
|
|
1510
|
+
Cascade = "CASCADE",
|
|
1511
|
+
Orphan = "ORPHAN"
|
|
1512
|
+
}
|
|
1513
|
+
type Query = {
|
|
1514
|
+
readonly document?: Maybe<DocumentWithChildren>;
|
|
1515
|
+
readonly documentChildren: PhDocumentResultPage;
|
|
1516
|
+
readonly documentModels: DocumentModelResultPage;
|
|
1517
|
+
readonly documentOperations: ReactorOperationResultPage;
|
|
1518
|
+
readonly documentParents: PhDocumentResultPage;
|
|
1519
|
+
readonly findDocuments: PhDocumentResultPage;
|
|
1520
|
+
readonly jobStatus?: Maybe<JobInfo>;
|
|
1521
|
+
readonly pollSyncEnvelopes: PollSyncEnvelopesResult;
|
|
1522
|
+
};
|
|
1523
|
+
type QueryDocumentArgs = {
|
|
1524
|
+
identifier: Scalars["String"]["input"];
|
|
1525
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1526
|
+
};
|
|
1527
|
+
type QueryDocumentChildrenArgs = {
|
|
1528
|
+
paging?: InputMaybe<PagingInput>;
|
|
1529
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
1530
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1531
|
+
};
|
|
1532
|
+
type QueryDocumentModelsArgs = {
|
|
1533
|
+
namespace?: InputMaybe<Scalars["String"]["input"]>;
|
|
1534
|
+
paging?: InputMaybe<PagingInput>;
|
|
1535
|
+
};
|
|
1536
|
+
type QueryDocumentOperationsArgs = {
|
|
1537
|
+
filter: OperationsFilterInput;
|
|
1538
|
+
paging?: InputMaybe<PagingInput>;
|
|
1539
|
+
};
|
|
1540
|
+
type QueryDocumentParentsArgs = {
|
|
1541
|
+
childIdentifier: Scalars["String"]["input"];
|
|
1542
|
+
paging?: InputMaybe<PagingInput>;
|
|
1543
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1544
|
+
};
|
|
1545
|
+
type QueryFindDocumentsArgs = {
|
|
1546
|
+
paging?: InputMaybe<PagingInput>;
|
|
1547
|
+
search?: InputMaybe<SearchFilterInput>;
|
|
1548
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1549
|
+
};
|
|
1550
|
+
type QueryJobStatusArgs = {
|
|
1551
|
+
jobId: Scalars["String"]["input"];
|
|
1552
|
+
};
|
|
1553
|
+
type QueryPollSyncEnvelopesArgs = {
|
|
1554
|
+
channelId: Scalars["String"]["input"];
|
|
1555
|
+
outboxAck: Scalars["Int"]["input"];
|
|
1556
|
+
outboxLatest: Scalars["Int"]["input"];
|
|
1557
|
+
};
|
|
1558
|
+
type ReactorOperation = {
|
|
1559
|
+
readonly action: Action;
|
|
1560
|
+
readonly error?: Maybe<Scalars["String"]["output"]>;
|
|
1561
|
+
readonly hash: Scalars["String"]["output"];
|
|
1562
|
+
readonly id?: Maybe<Scalars["String"]["output"]>;
|
|
1563
|
+
readonly index: Scalars["Int"]["output"];
|
|
1564
|
+
readonly skip: Scalars["Int"]["output"];
|
|
1565
|
+
readonly timestampUtcMs: Scalars["String"]["output"];
|
|
1566
|
+
};
|
|
1567
|
+
type ReactorOperationResultPage = {
|
|
1568
|
+
readonly cursor?: Maybe<Scalars["String"]["output"]>;
|
|
1569
|
+
readonly hasNextPage: Scalars["Boolean"]["output"];
|
|
1570
|
+
readonly hasPreviousPage: Scalars["Boolean"]["output"];
|
|
1571
|
+
readonly items: ReadonlyArray<ReactorOperation>;
|
|
1572
|
+
readonly totalCount: Scalars["Int"]["output"];
|
|
1573
|
+
};
|
|
1574
|
+
type ReactorSigner = {
|
|
1575
|
+
readonly app?: Maybe<ReactorSignerApp>;
|
|
1576
|
+
readonly signatures: ReadonlyArray<Scalars["String"]["output"]>;
|
|
1577
|
+
readonly user?: Maybe<ReactorSignerUser>;
|
|
1578
|
+
};
|
|
1579
|
+
type ReactorSignerApp = {
|
|
1580
|
+
readonly key: Scalars["String"]["output"];
|
|
1581
|
+
readonly name: Scalars["String"]["output"];
|
|
1582
|
+
};
|
|
1583
|
+
type ReactorSignerAppInput = {
|
|
1584
|
+
readonly key: Scalars["String"]["input"];
|
|
1585
|
+
readonly name: Scalars["String"]["input"];
|
|
1586
|
+
};
|
|
1587
|
+
type ReactorSignerInput = {
|
|
1588
|
+
readonly app?: InputMaybe<ReactorSignerAppInput>;
|
|
1589
|
+
readonly signatures: ReadonlyArray<Scalars["String"]["input"]>;
|
|
1590
|
+
readonly user?: InputMaybe<ReactorSignerUserInput>;
|
|
1591
|
+
};
|
|
1592
|
+
type ReactorSignerUser = {
|
|
1593
|
+
readonly address: Scalars["String"]["output"];
|
|
1594
|
+
readonly chainId: Scalars["Int"]["output"];
|
|
1595
|
+
readonly networkId: Scalars["String"]["output"];
|
|
1596
|
+
};
|
|
1597
|
+
type ReactorSignerUserInput = {
|
|
1598
|
+
readonly address: Scalars["String"]["input"];
|
|
1599
|
+
readonly chainId: Scalars["Int"]["input"];
|
|
1600
|
+
readonly networkId: Scalars["String"]["input"];
|
|
1601
|
+
};
|
|
1602
|
+
type RemoteCursor = {
|
|
1603
|
+
readonly cursorOrdinal: Scalars["Int"]["output"];
|
|
1604
|
+
readonly lastSyncedAtUtcMs?: Maybe<Scalars["String"]["output"]>;
|
|
1605
|
+
readonly remoteName: Scalars["String"]["output"];
|
|
1606
|
+
};
|
|
1607
|
+
type RemoteCursorInput = {
|
|
1608
|
+
readonly cursorOrdinal: Scalars["Int"]["input"];
|
|
1609
|
+
readonly lastSyncedAtUtcMs?: InputMaybe<Scalars["String"]["input"]>;
|
|
1610
|
+
readonly remoteName: Scalars["String"]["input"];
|
|
1611
|
+
};
|
|
1612
|
+
type RemoteFilterInput = {
|
|
1613
|
+
readonly branch: Scalars["String"]["input"];
|
|
1614
|
+
readonly documentId: ReadonlyArray<Scalars["String"]["input"]>;
|
|
1615
|
+
readonly scope: ReadonlyArray<Scalars["String"]["input"]>;
|
|
1616
|
+
};
|
|
1617
|
+
type Revision = {
|
|
1618
|
+
readonly revision: Scalars["Int"]["output"];
|
|
1619
|
+
readonly scope: Scalars["String"]["output"];
|
|
1620
|
+
};
|
|
1621
|
+
type SearchFilterInput = {
|
|
1622
|
+
readonly identifiers?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
1623
|
+
readonly parentId?: InputMaybe<Scalars["String"]["input"]>;
|
|
1624
|
+
readonly type?: InputMaybe<Scalars["String"]["input"]>;
|
|
1625
|
+
};
|
|
1626
|
+
type Subscription = {
|
|
1627
|
+
readonly documentChanges: DocumentChangeEvent;
|
|
1628
|
+
readonly jobChanges: JobChangeEvent;
|
|
1629
|
+
};
|
|
1630
|
+
type SubscriptionDocumentChangesArgs = {
|
|
1631
|
+
search?: InputMaybe<SearchFilterInput>;
|
|
1632
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1633
|
+
};
|
|
1634
|
+
type SubscriptionJobChangesArgs = {
|
|
1635
|
+
jobId: Scalars["String"]["input"];
|
|
1636
|
+
};
|
|
1637
|
+
type SyncEnvelope = {
|
|
1638
|
+
readonly channelMeta: ChannelMeta;
|
|
1639
|
+
readonly cursor?: Maybe<RemoteCursor>;
|
|
1640
|
+
readonly dependsOn?: Maybe<ReadonlyArray<Scalars["String"]["output"]>>;
|
|
1641
|
+
readonly key?: Maybe<Scalars["String"]["output"]>;
|
|
1642
|
+
readonly operations?: Maybe<ReadonlyArray<OperationWithContext>>;
|
|
1643
|
+
readonly type: SyncEnvelopeType;
|
|
1644
|
+
};
|
|
1645
|
+
type SyncEnvelopeInput = {
|
|
1646
|
+
readonly channelMeta: ChannelMetaInput;
|
|
1647
|
+
readonly cursor?: InputMaybe<RemoteCursorInput>;
|
|
1648
|
+
readonly dependsOn?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
1649
|
+
readonly key?: InputMaybe<Scalars["String"]["input"]>;
|
|
1650
|
+
readonly operations?: InputMaybe<ReadonlyArray<OperationWithContextInput>>;
|
|
1651
|
+
readonly type: SyncEnvelopeType;
|
|
1652
|
+
};
|
|
1653
|
+
declare enum SyncEnvelopeType {
|
|
1654
|
+
Ack = "ACK",
|
|
1655
|
+
Operations = "OPERATIONS"
|
|
1656
|
+
}
|
|
1657
|
+
type TouchChannelInput = {
|
|
1658
|
+
readonly collectionId: Scalars["String"]["input"];
|
|
1659
|
+
readonly filter: RemoteFilterInput;
|
|
1660
|
+
readonly id: Scalars["String"]["input"];
|
|
1661
|
+
readonly name: Scalars["String"]["input"];
|
|
1662
|
+
readonly sinceTimestampUtcMs: Scalars["String"]["input"];
|
|
1663
|
+
};
|
|
1664
|
+
type TouchChannelResult = {
|
|
1665
|
+
readonly ackOrdinal: Scalars["Int"]["output"];
|
|
1666
|
+
readonly success: Scalars["Boolean"]["output"];
|
|
1667
|
+
};
|
|
1668
|
+
type ViewFilterInput = {
|
|
1669
|
+
readonly branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
1670
|
+
readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
1671
|
+
};
|
|
1672
|
+
type PhDocumentFieldsFragment = {
|
|
1673
|
+
readonly id: string;
|
|
1674
|
+
readonly slug?: string | null | undefined;
|
|
1675
|
+
readonly name: string;
|
|
1676
|
+
readonly documentType: string;
|
|
1677
|
+
readonly state: NonNullable<unknown>;
|
|
1678
|
+
readonly createdAtUtcIso: string | Date;
|
|
1679
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
1680
|
+
readonly revisionsList: ReadonlyArray<{
|
|
1681
|
+
readonly scope: string;
|
|
1682
|
+
readonly revision: number;
|
|
1683
|
+
}>;
|
|
1684
|
+
};
|
|
1685
|
+
type GetDocumentModelsQueryVariables = Exact<{
|
|
1686
|
+
namespace?: InputMaybe<Scalars["String"]["input"]>;
|
|
1687
|
+
paging?: InputMaybe<PagingInput>;
|
|
1688
|
+
}>;
|
|
1689
|
+
type GetDocumentModelsQuery = {
|
|
1690
|
+
readonly documentModels: {
|
|
1691
|
+
readonly totalCount: number;
|
|
1692
|
+
readonly hasNextPage: boolean;
|
|
1693
|
+
readonly hasPreviousPage: boolean;
|
|
1694
|
+
readonly cursor?: string | null | undefined;
|
|
1695
|
+
readonly items: ReadonlyArray<{
|
|
1696
|
+
readonly id: string;
|
|
1697
|
+
readonly name: string;
|
|
1698
|
+
readonly namespace?: string | null | undefined;
|
|
1699
|
+
readonly version?: string | null | undefined;
|
|
1700
|
+
readonly specification: NonNullable<unknown>;
|
|
1701
|
+
}>;
|
|
1702
|
+
};
|
|
1703
|
+
};
|
|
1704
|
+
type GetDocumentQueryVariables = Exact<{
|
|
1705
|
+
identifier: Scalars["String"]["input"];
|
|
1706
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1707
|
+
}>;
|
|
1708
|
+
type GetDocumentQuery = {
|
|
1709
|
+
readonly document?: {
|
|
1710
|
+
readonly childIds: ReadonlyArray<string>;
|
|
1711
|
+
readonly document: {
|
|
1712
|
+
readonly id: string;
|
|
1713
|
+
readonly slug?: string | null | undefined;
|
|
1714
|
+
readonly name: string;
|
|
1715
|
+
readonly documentType: string;
|
|
1716
|
+
readonly state: NonNullable<unknown>;
|
|
1717
|
+
readonly createdAtUtcIso: string | Date;
|
|
1718
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
1719
|
+
readonly revisionsList: ReadonlyArray<{
|
|
1720
|
+
readonly scope: string;
|
|
1721
|
+
readonly revision: number;
|
|
1722
|
+
}>;
|
|
1723
|
+
};
|
|
1724
|
+
} | null | undefined;
|
|
1725
|
+
};
|
|
1726
|
+
type GetDocumentWithOperationsQueryVariables = Exact<{
|
|
1727
|
+
identifier: Scalars["String"]["input"];
|
|
1728
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1729
|
+
operationsFilter?: InputMaybe<DocumentOperationsFilterInput>;
|
|
1730
|
+
operationsPaging?: InputMaybe<PagingInput>;
|
|
1731
|
+
}>;
|
|
1732
|
+
type GetDocumentWithOperationsQuery = {
|
|
1733
|
+
readonly document?: {
|
|
1734
|
+
readonly childIds: ReadonlyArray<string>;
|
|
1735
|
+
readonly document: {
|
|
1736
|
+
readonly id: string;
|
|
1737
|
+
readonly slug?: string | null | undefined;
|
|
1738
|
+
readonly name: string;
|
|
1739
|
+
readonly documentType: string;
|
|
1740
|
+
readonly state: NonNullable<unknown>;
|
|
1741
|
+
readonly createdAtUtcIso: string | Date;
|
|
1742
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
1743
|
+
readonly operations?: {
|
|
1744
|
+
readonly totalCount: number;
|
|
1745
|
+
readonly hasNextPage: boolean;
|
|
1746
|
+
readonly hasPreviousPage: boolean;
|
|
1747
|
+
readonly cursor?: string | null | undefined;
|
|
1748
|
+
readonly items: ReadonlyArray<{
|
|
1749
|
+
readonly index: number;
|
|
1750
|
+
readonly timestampUtcMs: string;
|
|
1751
|
+
readonly hash: string;
|
|
1752
|
+
readonly skip: number;
|
|
1753
|
+
readonly error?: string | null | undefined;
|
|
1754
|
+
readonly id?: string | null | undefined;
|
|
1755
|
+
readonly action: {
|
|
1756
|
+
readonly id: string;
|
|
1757
|
+
readonly type: string;
|
|
1758
|
+
readonly timestampUtcMs: string;
|
|
1759
|
+
readonly input: NonNullable<unknown>;
|
|
1760
|
+
readonly scope: string;
|
|
1761
|
+
readonly attachments?: ReadonlyArray<{
|
|
1762
|
+
readonly data: string;
|
|
1763
|
+
readonly mimeType: string;
|
|
1764
|
+
readonly hash: string;
|
|
1765
|
+
readonly extension?: string | null | undefined;
|
|
1766
|
+
readonly fileName?: string | null | undefined;
|
|
1767
|
+
}> | null | undefined;
|
|
1768
|
+
readonly context?: {
|
|
1769
|
+
readonly signer?: {
|
|
1770
|
+
readonly signatures: ReadonlyArray<string>;
|
|
1771
|
+
readonly user?: {
|
|
1772
|
+
readonly address: string;
|
|
1773
|
+
readonly networkId: string;
|
|
1774
|
+
readonly chainId: number;
|
|
1775
|
+
} | null | undefined;
|
|
1776
|
+
readonly app?: {
|
|
1777
|
+
readonly name: string;
|
|
1778
|
+
readonly key: string;
|
|
1779
|
+
} | null | undefined;
|
|
1780
|
+
} | null | undefined;
|
|
1781
|
+
} | null | undefined;
|
|
1782
|
+
};
|
|
1783
|
+
}>;
|
|
1784
|
+
} | null | undefined;
|
|
1785
|
+
readonly revisionsList: ReadonlyArray<{
|
|
1786
|
+
readonly scope: string;
|
|
1787
|
+
readonly revision: number;
|
|
1788
|
+
}>;
|
|
1789
|
+
};
|
|
1790
|
+
} | null | undefined;
|
|
1791
|
+
};
|
|
1792
|
+
type GetDocumentChildrenQueryVariables = Exact<{
|
|
1793
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
1794
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1795
|
+
paging?: InputMaybe<PagingInput>;
|
|
1796
|
+
}>;
|
|
1797
|
+
type GetDocumentChildrenQuery = {
|
|
1798
|
+
readonly documentChildren: {
|
|
1799
|
+
readonly totalCount: number;
|
|
1800
|
+
readonly hasNextPage: boolean;
|
|
1801
|
+
readonly hasPreviousPage: boolean;
|
|
1802
|
+
readonly cursor?: string | null | undefined;
|
|
1803
|
+
readonly items: ReadonlyArray<{
|
|
1804
|
+
readonly id: string;
|
|
1805
|
+
readonly slug?: string | null | undefined;
|
|
1806
|
+
readonly name: string;
|
|
1807
|
+
readonly documentType: string;
|
|
1808
|
+
readonly state: NonNullable<unknown>;
|
|
1809
|
+
readonly createdAtUtcIso: string | Date;
|
|
1810
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
1811
|
+
readonly revisionsList: ReadonlyArray<{
|
|
1812
|
+
readonly scope: string;
|
|
1813
|
+
readonly revision: number;
|
|
1814
|
+
}>;
|
|
1815
|
+
}>;
|
|
1816
|
+
};
|
|
1817
|
+
};
|
|
1818
|
+
type GetDocumentParentsQueryVariables = Exact<{
|
|
1819
|
+
childIdentifier: Scalars["String"]["input"];
|
|
1820
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1821
|
+
paging?: InputMaybe<PagingInput>;
|
|
1822
|
+
}>;
|
|
1823
|
+
type GetDocumentParentsQuery = {
|
|
1824
|
+
readonly documentParents: {
|
|
1825
|
+
readonly totalCount: number;
|
|
1826
|
+
readonly hasNextPage: boolean;
|
|
1827
|
+
readonly hasPreviousPage: boolean;
|
|
1828
|
+
readonly cursor?: string | null | undefined;
|
|
1829
|
+
readonly items: ReadonlyArray<{
|
|
1830
|
+
readonly id: string;
|
|
1831
|
+
readonly slug?: string | null | undefined;
|
|
1832
|
+
readonly name: string;
|
|
1833
|
+
readonly documentType: string;
|
|
1834
|
+
readonly state: NonNullable<unknown>;
|
|
1835
|
+
readonly createdAtUtcIso: string | Date;
|
|
1836
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
1837
|
+
readonly revisionsList: ReadonlyArray<{
|
|
1838
|
+
readonly scope: string;
|
|
1839
|
+
readonly revision: number;
|
|
1840
|
+
}>;
|
|
1841
|
+
}>;
|
|
1842
|
+
};
|
|
1843
|
+
};
|
|
1844
|
+
type FindDocumentsQueryVariables = Exact<{
|
|
1845
|
+
search?: InputMaybe<SearchFilterInput>;
|
|
1846
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1847
|
+
paging?: InputMaybe<PagingInput>;
|
|
1848
|
+
}>;
|
|
1849
|
+
type FindDocumentsQuery = {
|
|
1850
|
+
readonly findDocuments: {
|
|
1851
|
+
readonly totalCount: number;
|
|
1852
|
+
readonly hasNextPage: boolean;
|
|
1853
|
+
readonly hasPreviousPage: boolean;
|
|
1854
|
+
readonly cursor?: string | null | undefined;
|
|
1855
|
+
readonly items: ReadonlyArray<{
|
|
1856
|
+
readonly id: string;
|
|
1857
|
+
readonly slug?: string | null | undefined;
|
|
1858
|
+
readonly name: string;
|
|
1859
|
+
readonly documentType: string;
|
|
1860
|
+
readonly state: NonNullable<unknown>;
|
|
1861
|
+
readonly createdAtUtcIso: string | Date;
|
|
1862
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
1863
|
+
readonly revisionsList: ReadonlyArray<{
|
|
1864
|
+
readonly scope: string;
|
|
1865
|
+
readonly revision: number;
|
|
1866
|
+
}>;
|
|
1867
|
+
}>;
|
|
1868
|
+
};
|
|
1869
|
+
};
|
|
1870
|
+
type GetDocumentOperationsQueryVariables = Exact<{
|
|
1871
|
+
filter: OperationsFilterInput;
|
|
1872
|
+
paging?: InputMaybe<PagingInput>;
|
|
1873
|
+
}>;
|
|
1874
|
+
type GetDocumentOperationsQuery = {
|
|
1875
|
+
readonly documentOperations: {
|
|
1876
|
+
readonly totalCount: number;
|
|
1877
|
+
readonly hasNextPage: boolean;
|
|
1878
|
+
readonly hasPreviousPage: boolean;
|
|
1879
|
+
readonly cursor?: string | null | undefined;
|
|
1880
|
+
readonly items: ReadonlyArray<{
|
|
1881
|
+
readonly index: number;
|
|
1882
|
+
readonly timestampUtcMs: string;
|
|
1883
|
+
readonly hash: string;
|
|
1884
|
+
readonly skip: number;
|
|
1885
|
+
readonly error?: string | null | undefined;
|
|
1886
|
+
readonly id?: string | null | undefined;
|
|
1887
|
+
readonly action: {
|
|
1888
|
+
readonly id: string;
|
|
1889
|
+
readonly type: string;
|
|
1890
|
+
readonly timestampUtcMs: string;
|
|
1891
|
+
readonly input: NonNullable<unknown>;
|
|
1892
|
+
readonly scope: string;
|
|
1893
|
+
readonly attachments?: ReadonlyArray<{
|
|
1894
|
+
readonly data: string;
|
|
1895
|
+
readonly mimeType: string;
|
|
1896
|
+
readonly hash: string;
|
|
1897
|
+
readonly extension?: string | null | undefined;
|
|
1898
|
+
readonly fileName?: string | null | undefined;
|
|
1899
|
+
}> | null | undefined;
|
|
1900
|
+
readonly context?: {
|
|
1901
|
+
readonly signer?: {
|
|
1902
|
+
readonly signatures: ReadonlyArray<string>;
|
|
1903
|
+
readonly user?: {
|
|
1904
|
+
readonly address: string;
|
|
1905
|
+
readonly networkId: string;
|
|
1906
|
+
readonly chainId: number;
|
|
1907
|
+
} | null | undefined;
|
|
1908
|
+
readonly app?: {
|
|
1909
|
+
readonly name: string;
|
|
1910
|
+
readonly key: string;
|
|
1911
|
+
} | null | undefined;
|
|
1912
|
+
} | null | undefined;
|
|
1913
|
+
} | null | undefined;
|
|
1914
|
+
};
|
|
1915
|
+
}>;
|
|
1916
|
+
};
|
|
1917
|
+
};
|
|
1918
|
+
type GetJobStatusQueryVariables = Exact<{
|
|
1919
|
+
jobId: Scalars["String"]["input"];
|
|
1920
|
+
}>;
|
|
1921
|
+
type GetJobStatusQuery = {
|
|
1922
|
+
readonly jobStatus?: {
|
|
1923
|
+
readonly id: string;
|
|
1924
|
+
readonly status: string;
|
|
1925
|
+
readonly result: NonNullable<unknown>;
|
|
1926
|
+
readonly error?: string | null | undefined;
|
|
1927
|
+
readonly createdAt: string | Date;
|
|
1928
|
+
readonly completedAt?: string | Date | null | undefined;
|
|
1929
|
+
} | null | undefined;
|
|
1930
|
+
};
|
|
1931
|
+
type CreateDocumentMutationVariables = Exact<{
|
|
1932
|
+
document: Scalars["JSONObject"]["input"];
|
|
1933
|
+
parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
1934
|
+
}>;
|
|
1935
|
+
type CreateDocumentMutation = {
|
|
1936
|
+
readonly createDocument: {
|
|
1937
|
+
readonly id: string;
|
|
1938
|
+
readonly slug?: string | null | undefined;
|
|
1939
|
+
readonly name: string;
|
|
1940
|
+
readonly documentType: string;
|
|
1941
|
+
readonly state: NonNullable<unknown>;
|
|
1942
|
+
readonly createdAtUtcIso: string | Date;
|
|
1943
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
1944
|
+
readonly revisionsList: ReadonlyArray<{
|
|
1945
|
+
readonly scope: string;
|
|
1946
|
+
readonly revision: number;
|
|
1947
|
+
}>;
|
|
1948
|
+
};
|
|
1949
|
+
};
|
|
1950
|
+
type CreateEmptyDocumentMutationVariables = Exact<{
|
|
1951
|
+
documentType: Scalars["String"]["input"];
|
|
1952
|
+
parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
1953
|
+
}>;
|
|
1954
|
+
type CreateEmptyDocumentMutation = {
|
|
1955
|
+
readonly createEmptyDocument: {
|
|
1956
|
+
readonly id: string;
|
|
1957
|
+
readonly slug?: string | null | undefined;
|
|
1958
|
+
readonly name: string;
|
|
1959
|
+
readonly documentType: string;
|
|
1960
|
+
readonly state: NonNullable<unknown>;
|
|
1961
|
+
readonly createdAtUtcIso: string | Date;
|
|
1962
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
1963
|
+
readonly revisionsList: ReadonlyArray<{
|
|
1964
|
+
readonly scope: string;
|
|
1965
|
+
readonly revision: number;
|
|
1966
|
+
}>;
|
|
1967
|
+
};
|
|
1968
|
+
};
|
|
1969
|
+
type MutateDocumentMutationVariables = Exact<{
|
|
1970
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
1971
|
+
actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
|
|
1972
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1973
|
+
}>;
|
|
1974
|
+
type MutateDocumentMutation = {
|
|
1975
|
+
readonly mutateDocument: {
|
|
1976
|
+
readonly id: string;
|
|
1977
|
+
readonly slug?: string | null | undefined;
|
|
1978
|
+
readonly name: string;
|
|
1979
|
+
readonly documentType: string;
|
|
1980
|
+
readonly state: NonNullable<unknown>;
|
|
1981
|
+
readonly createdAtUtcIso: string | Date;
|
|
1982
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
1983
|
+
readonly revisionsList: ReadonlyArray<{
|
|
1984
|
+
readonly scope: string;
|
|
1985
|
+
readonly revision: number;
|
|
1986
|
+
}>;
|
|
1987
|
+
};
|
|
1988
|
+
};
|
|
1989
|
+
type MutateDocumentAsyncMutationVariables = Exact<{
|
|
1990
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
1991
|
+
actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
|
|
1992
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
1993
|
+
}>;
|
|
1994
|
+
type MutateDocumentAsyncMutation = {
|
|
1995
|
+
readonly mutateDocumentAsync: string;
|
|
1996
|
+
};
|
|
1997
|
+
type RenameDocumentMutationVariables = Exact<{
|
|
1998
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
1999
|
+
name: Scalars["String"]["input"];
|
|
2000
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2001
|
+
}>;
|
|
2002
|
+
type RenameDocumentMutation = {
|
|
2003
|
+
readonly renameDocument: {
|
|
2004
|
+
readonly id: string;
|
|
2005
|
+
readonly slug?: string | null | undefined;
|
|
2006
|
+
readonly name: string;
|
|
2007
|
+
readonly documentType: string;
|
|
2008
|
+
readonly state: NonNullable<unknown>;
|
|
2009
|
+
readonly createdAtUtcIso: string | Date;
|
|
2010
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
2011
|
+
readonly revisionsList: ReadonlyArray<{
|
|
2012
|
+
readonly scope: string;
|
|
2013
|
+
readonly revision: number;
|
|
2014
|
+
}>;
|
|
2015
|
+
};
|
|
2016
|
+
};
|
|
2017
|
+
type AddChildrenMutationVariables = Exact<{
|
|
2018
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
2019
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
2020
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2021
|
+
}>;
|
|
2022
|
+
type AddChildrenMutation = {
|
|
2023
|
+
readonly addChildren: {
|
|
2024
|
+
readonly id: string;
|
|
2025
|
+
readonly slug?: string | null | undefined;
|
|
2026
|
+
readonly name: string;
|
|
2027
|
+
readonly documentType: string;
|
|
2028
|
+
readonly state: NonNullable<unknown>;
|
|
2029
|
+
readonly createdAtUtcIso: string | Date;
|
|
2030
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
2031
|
+
readonly revisionsList: ReadonlyArray<{
|
|
2032
|
+
readonly scope: string;
|
|
2033
|
+
readonly revision: number;
|
|
2034
|
+
}>;
|
|
2035
|
+
};
|
|
2036
|
+
};
|
|
2037
|
+
type RemoveChildrenMutationVariables = Exact<{
|
|
2038
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
2039
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
2040
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2041
|
+
}>;
|
|
2042
|
+
type RemoveChildrenMutation = {
|
|
2043
|
+
readonly removeChildren: {
|
|
2044
|
+
readonly id: string;
|
|
2045
|
+
readonly slug?: string | null | undefined;
|
|
2046
|
+
readonly name: string;
|
|
2047
|
+
readonly documentType: string;
|
|
2048
|
+
readonly state: NonNullable<unknown>;
|
|
2049
|
+
readonly createdAtUtcIso: string | Date;
|
|
2050
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
2051
|
+
readonly revisionsList: ReadonlyArray<{
|
|
2052
|
+
readonly scope: string;
|
|
2053
|
+
readonly revision: number;
|
|
2054
|
+
}>;
|
|
2055
|
+
};
|
|
2056
|
+
};
|
|
2057
|
+
type MoveChildrenMutationVariables = Exact<{
|
|
2058
|
+
sourceParentIdentifier: Scalars["String"]["input"];
|
|
2059
|
+
targetParentIdentifier: Scalars["String"]["input"];
|
|
2060
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
2061
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2062
|
+
}>;
|
|
2063
|
+
type MoveChildrenMutation = {
|
|
2064
|
+
readonly moveChildren: {
|
|
2065
|
+
readonly source: {
|
|
2066
|
+
readonly id: string;
|
|
2067
|
+
readonly slug?: string | null | undefined;
|
|
2068
|
+
readonly name: string;
|
|
2069
|
+
readonly documentType: string;
|
|
2070
|
+
readonly state: NonNullable<unknown>;
|
|
2071
|
+
readonly createdAtUtcIso: string | Date;
|
|
2072
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
2073
|
+
readonly revisionsList: ReadonlyArray<{
|
|
2074
|
+
readonly scope: string;
|
|
2075
|
+
readonly revision: number;
|
|
2076
|
+
}>;
|
|
2077
|
+
};
|
|
2078
|
+
readonly target: {
|
|
2079
|
+
readonly id: string;
|
|
2080
|
+
readonly slug?: string | null | undefined;
|
|
2081
|
+
readonly name: string;
|
|
2082
|
+
readonly documentType: string;
|
|
2083
|
+
readonly state: NonNullable<unknown>;
|
|
2084
|
+
readonly createdAtUtcIso: string | Date;
|
|
2085
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
2086
|
+
readonly revisionsList: ReadonlyArray<{
|
|
2087
|
+
readonly scope: string;
|
|
2088
|
+
readonly revision: number;
|
|
2089
|
+
}>;
|
|
2090
|
+
};
|
|
2091
|
+
};
|
|
2092
|
+
};
|
|
2093
|
+
type DeleteDocumentMutationVariables = Exact<{
|
|
2094
|
+
identifier: Scalars["String"]["input"];
|
|
2095
|
+
propagate?: InputMaybe<PropagationMode>;
|
|
2096
|
+
}>;
|
|
2097
|
+
type DeleteDocumentMutation = {
|
|
2098
|
+
readonly deleteDocument: boolean;
|
|
2099
|
+
};
|
|
2100
|
+
type DeleteDocumentsMutationVariables = Exact<{
|
|
2101
|
+
identifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
2102
|
+
propagate?: InputMaybe<PropagationMode>;
|
|
2103
|
+
}>;
|
|
2104
|
+
type DeleteDocumentsMutation = {
|
|
2105
|
+
readonly deleteDocuments: boolean;
|
|
2106
|
+
};
|
|
2107
|
+
type DocumentChangesSubscriptionVariables = Exact<{
|
|
2108
|
+
search?: InputMaybe<SearchFilterInput>;
|
|
2109
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
2110
|
+
}>;
|
|
2111
|
+
type DocumentChangesSubscription = {
|
|
2112
|
+
readonly documentChanges: {
|
|
2113
|
+
readonly type: DocumentChangeType;
|
|
2114
|
+
readonly documents: ReadonlyArray<{
|
|
2115
|
+
readonly id: string;
|
|
2116
|
+
readonly slug?: string | null | undefined;
|
|
2117
|
+
readonly name: string;
|
|
2118
|
+
readonly documentType: string;
|
|
2119
|
+
readonly state: NonNullable<unknown>;
|
|
2120
|
+
readonly createdAtUtcIso: string | Date;
|
|
2121
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
2122
|
+
readonly revisionsList: ReadonlyArray<{
|
|
2123
|
+
readonly scope: string;
|
|
2124
|
+
readonly revision: number;
|
|
2125
|
+
}>;
|
|
2126
|
+
}>;
|
|
2127
|
+
readonly context?: {
|
|
2128
|
+
readonly parentId?: string | null | undefined;
|
|
2129
|
+
readonly childId?: string | null | undefined;
|
|
2130
|
+
} | null | undefined;
|
|
2131
|
+
};
|
|
2132
|
+
};
|
|
2133
|
+
type JobChangesSubscriptionVariables = Exact<{
|
|
2134
|
+
jobId: Scalars["String"]["input"];
|
|
2135
|
+
}>;
|
|
2136
|
+
type JobChangesSubscription = {
|
|
2137
|
+
readonly jobChanges: {
|
|
2138
|
+
readonly jobId: string;
|
|
2139
|
+
readonly status: string;
|
|
2140
|
+
readonly result: NonNullable<unknown>;
|
|
2141
|
+
readonly error?: string | null | undefined;
|
|
2142
|
+
};
|
|
2143
|
+
};
|
|
2144
|
+
type PollSyncEnvelopesQueryVariables = Exact<{
|
|
2145
|
+
channelId: Scalars["String"]["input"];
|
|
2146
|
+
outboxAck: Scalars["Int"]["input"];
|
|
2147
|
+
outboxLatest: Scalars["Int"]["input"];
|
|
2148
|
+
}>;
|
|
2149
|
+
type PollSyncEnvelopesQuery = {
|
|
2150
|
+
readonly pollSyncEnvelopes: {
|
|
2151
|
+
readonly ackOrdinal: number;
|
|
2152
|
+
readonly hasMore: boolean;
|
|
2153
|
+
readonly envelopes: ReadonlyArray<{
|
|
2154
|
+
readonly type: SyncEnvelopeType;
|
|
2155
|
+
readonly key?: string | null | undefined;
|
|
2156
|
+
readonly dependsOn?: ReadonlyArray<string> | null | undefined;
|
|
2157
|
+
readonly channelMeta: {
|
|
2158
|
+
readonly id: string;
|
|
2159
|
+
};
|
|
2160
|
+
readonly operations?: ReadonlyArray<{
|
|
2161
|
+
readonly operation: {
|
|
2162
|
+
readonly index: number;
|
|
2163
|
+
readonly timestampUtcMs: string;
|
|
2164
|
+
readonly hash: string;
|
|
2165
|
+
readonly skip: number;
|
|
2166
|
+
readonly error?: string | null | undefined;
|
|
2167
|
+
readonly id?: string | null | undefined;
|
|
2168
|
+
readonly action: {
|
|
2169
|
+
readonly id: string;
|
|
2170
|
+
readonly type: string;
|
|
2171
|
+
readonly timestampUtcMs: string;
|
|
2172
|
+
readonly input: NonNullable<unknown>;
|
|
2173
|
+
readonly scope: string;
|
|
2174
|
+
readonly attachments?: ReadonlyArray<{
|
|
2175
|
+
readonly data: string;
|
|
2176
|
+
readonly mimeType: string;
|
|
2177
|
+
readonly hash: string;
|
|
2178
|
+
readonly extension?: string | null | undefined;
|
|
2179
|
+
readonly fileName?: string | null | undefined;
|
|
2180
|
+
}> | null | undefined;
|
|
2181
|
+
readonly context?: {
|
|
2182
|
+
readonly signer?: {
|
|
2183
|
+
readonly signatures: ReadonlyArray<string>;
|
|
2184
|
+
readonly user?: {
|
|
2185
|
+
readonly address: string;
|
|
2186
|
+
readonly networkId: string;
|
|
2187
|
+
readonly chainId: number;
|
|
2188
|
+
} | null | undefined;
|
|
2189
|
+
readonly app?: {
|
|
2190
|
+
readonly name: string;
|
|
2191
|
+
readonly key: string;
|
|
2192
|
+
} | null | undefined;
|
|
2193
|
+
} | null | undefined;
|
|
2194
|
+
} | null | undefined;
|
|
2195
|
+
};
|
|
2196
|
+
};
|
|
2197
|
+
readonly context: {
|
|
2198
|
+
readonly documentId: string;
|
|
2199
|
+
readonly documentType: string;
|
|
2200
|
+
readonly scope: string;
|
|
2201
|
+
readonly branch: string;
|
|
2202
|
+
};
|
|
2203
|
+
}> | null | undefined;
|
|
2204
|
+
readonly cursor?: {
|
|
2205
|
+
readonly remoteName: string;
|
|
2206
|
+
readonly cursorOrdinal: number;
|
|
2207
|
+
readonly lastSyncedAtUtcMs?: string | null | undefined;
|
|
2208
|
+
} | null | undefined;
|
|
2209
|
+
}>;
|
|
2210
|
+
readonly deadLetters: ReadonlyArray<{
|
|
2211
|
+
readonly documentId: string;
|
|
2212
|
+
readonly error: string;
|
|
2213
|
+
}>;
|
|
2214
|
+
};
|
|
2215
|
+
};
|
|
2216
|
+
type TouchChannelMutationVariables = Exact<{
|
|
2217
|
+
input: TouchChannelInput;
|
|
2218
|
+
}>;
|
|
2219
|
+
type TouchChannelMutation = {
|
|
2220
|
+
readonly touchChannel: {
|
|
2221
|
+
readonly success: boolean;
|
|
2222
|
+
readonly ackOrdinal: number;
|
|
2223
|
+
};
|
|
2224
|
+
};
|
|
2225
|
+
type PushSyncEnvelopesMutationVariables = Exact<{
|
|
2226
|
+
envelopes: ReadonlyArray<SyncEnvelopeInput>;
|
|
2227
|
+
}>;
|
|
2228
|
+
type PushSyncEnvelopesMutation = {
|
|
2229
|
+
readonly pushSyncEnvelopes: boolean;
|
|
2230
|
+
};
|
|
2231
|
+
type WithIndex<TObject> = TObject & Record<string, any>;
|
|
2232
|
+
type ResolversObject<TObject> = WithIndex<TObject>;
|
|
2233
|
+
type ResolverTypeWrapper<T> = Promise<T> | T;
|
|
2234
|
+
type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
|
|
2235
|
+
resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
|
|
2236
|
+
};
|
|
2237
|
+
type Resolver<TResult, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>, TArgs = Record<PropertyKey, never>> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
|
|
2238
|
+
type ResolverFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => Promise<TResult> | TResult;
|
|
2239
|
+
type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>;
|
|
2240
|
+
type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
|
|
2241
|
+
interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
|
|
2242
|
+
subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>;
|
|
2243
|
+
resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult }, TContext, TArgs>;
|
|
2244
|
+
}
|
|
2245
|
+
interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
|
|
2246
|
+
subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>;
|
|
2247
|
+
resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>;
|
|
2248
|
+
}
|
|
2249
|
+
type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> = SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs> | SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
|
|
2250
|
+
type SubscriptionResolver<TResult, TKey extends string, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>, TArgs = Record<PropertyKey, never>> = ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>) | SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>;
|
|
2251
|
+
type TypeResolveFn<TTypes, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>> = (parent: TParent, context: TContext, info: GraphQLResolveInfo) => Maybe<TTypes> | Promise<Maybe<TTypes>>;
|
|
2252
|
+
type IsTypeOfResolverFn<T = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>> = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
|
|
2253
|
+
type NextResolverFn<T> = () => Promise<T>;
|
|
2254
|
+
type DirectiveResolverFn<TResult = Record<PropertyKey, never>, TParent = Record<PropertyKey, never>, TContext = Record<PropertyKey, never>, TArgs = Record<PropertyKey, never>> = (next: NextResolverFn<TResult>, parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => TResult | Promise<TResult>;
|
|
2255
|
+
/** Mapping between all available schema types and the resolvers types */
|
|
2256
|
+
type ResolversTypes = ResolversObject<{
|
|
2257
|
+
Action: ResolverTypeWrapper<Action>;
|
|
2258
|
+
ActionContext: ResolverTypeWrapper<ActionContext>;
|
|
2259
|
+
ActionContextInput: ActionContextInput;
|
|
2260
|
+
ActionInput: ActionInput;
|
|
2261
|
+
Attachment: ResolverTypeWrapper<Attachment>;
|
|
2262
|
+
AttachmentInput: AttachmentInput;
|
|
2263
|
+
Boolean: ResolverTypeWrapper<Scalars["Boolean"]["output"]>;
|
|
2264
|
+
ChannelMeta: ResolverTypeWrapper<ChannelMeta>;
|
|
2265
|
+
ChannelMetaInput: ChannelMetaInput;
|
|
2266
|
+
DateTime: ResolverTypeWrapper<Scalars["DateTime"]["output"]>;
|
|
2267
|
+
DeadLetterInfo: ResolverTypeWrapper<DeadLetterInfo>;
|
|
2268
|
+
DocumentChangeContext: ResolverTypeWrapper<DocumentChangeContext>;
|
|
2269
|
+
DocumentChangeEvent: ResolverTypeWrapper<DocumentChangeEvent>;
|
|
2270
|
+
DocumentChangeType: DocumentChangeType;
|
|
2271
|
+
DocumentModelGlobalState: ResolverTypeWrapper<DocumentModelGlobalState>;
|
|
2272
|
+
DocumentModelResultPage: ResolverTypeWrapper<DocumentModelResultPage>;
|
|
2273
|
+
DocumentOperationsFilterInput: DocumentOperationsFilterInput;
|
|
2274
|
+
DocumentWithChildren: ResolverTypeWrapper<DocumentWithChildren>;
|
|
2275
|
+
Int: ResolverTypeWrapper<Scalars["Int"]["output"]>;
|
|
2276
|
+
JSONObject: ResolverTypeWrapper<Scalars["JSONObject"]["output"]>;
|
|
2277
|
+
JobChangeEvent: ResolverTypeWrapper<JobChangeEvent>;
|
|
2278
|
+
JobInfo: ResolverTypeWrapper<JobInfo>;
|
|
2279
|
+
MoveChildrenResult: ResolverTypeWrapper<MoveChildrenResult>;
|
|
2280
|
+
Mutation: ResolverTypeWrapper<Record<PropertyKey, never>>;
|
|
2281
|
+
OperationContext: ResolverTypeWrapper<OperationContext>;
|
|
2282
|
+
OperationContextInput: OperationContextInput;
|
|
2283
|
+
OperationInput: OperationInput;
|
|
2284
|
+
OperationWithContext: ResolverTypeWrapper<OperationWithContext>;
|
|
2285
|
+
OperationWithContextInput: OperationWithContextInput;
|
|
2286
|
+
OperationsFilterInput: OperationsFilterInput;
|
|
2287
|
+
PHDocument: ResolverTypeWrapper<PhDocument>;
|
|
2288
|
+
PHDocumentResultPage: ResolverTypeWrapper<PhDocumentResultPage>;
|
|
2289
|
+
PagingInput: PagingInput;
|
|
2290
|
+
PollSyncEnvelopesResult: ResolverTypeWrapper<PollSyncEnvelopesResult>;
|
|
2291
|
+
PropagationMode: PropagationMode;
|
|
2292
|
+
Query: ResolverTypeWrapper<Record<PropertyKey, never>>;
|
|
2293
|
+
ReactorOperation: ResolverTypeWrapper<ReactorOperation>;
|
|
2294
|
+
ReactorOperationResultPage: ResolverTypeWrapper<ReactorOperationResultPage>;
|
|
2295
|
+
ReactorSigner: ResolverTypeWrapper<ReactorSigner>;
|
|
2296
|
+
ReactorSignerApp: ResolverTypeWrapper<ReactorSignerApp>;
|
|
2297
|
+
ReactorSignerAppInput: ReactorSignerAppInput;
|
|
2298
|
+
ReactorSignerInput: ReactorSignerInput;
|
|
2299
|
+
ReactorSignerUser: ResolverTypeWrapper<ReactorSignerUser>;
|
|
2300
|
+
ReactorSignerUserInput: ReactorSignerUserInput;
|
|
2301
|
+
RemoteCursor: ResolverTypeWrapper<RemoteCursor>;
|
|
2302
|
+
RemoteCursorInput: RemoteCursorInput;
|
|
2303
|
+
RemoteFilterInput: RemoteFilterInput;
|
|
2304
|
+
Revision: ResolverTypeWrapper<Revision>;
|
|
2305
|
+
SearchFilterInput: SearchFilterInput;
|
|
2306
|
+
String: ResolverTypeWrapper<Scalars["String"]["output"]>;
|
|
2307
|
+
Subscription: ResolverTypeWrapper<Record<PropertyKey, never>>;
|
|
2308
|
+
SyncEnvelope: ResolverTypeWrapper<SyncEnvelope>;
|
|
2309
|
+
SyncEnvelopeInput: SyncEnvelopeInput;
|
|
2310
|
+
SyncEnvelopeType: SyncEnvelopeType;
|
|
2311
|
+
TouchChannelInput: TouchChannelInput;
|
|
2312
|
+
TouchChannelResult: ResolverTypeWrapper<TouchChannelResult>;
|
|
2313
|
+
ViewFilterInput: ViewFilterInput;
|
|
2314
|
+
}>;
|
|
2315
|
+
/** Mapping between all available schema types and the resolvers parents */
|
|
2316
|
+
type ResolversParentTypes = ResolversObject<{
|
|
2317
|
+
Action: Action;
|
|
2318
|
+
ActionContext: ActionContext;
|
|
2319
|
+
ActionContextInput: ActionContextInput;
|
|
2320
|
+
ActionInput: ActionInput;
|
|
2321
|
+
Attachment: Attachment;
|
|
2322
|
+
AttachmentInput: AttachmentInput;
|
|
2323
|
+
Boolean: Scalars["Boolean"]["output"];
|
|
2324
|
+
ChannelMeta: ChannelMeta;
|
|
2325
|
+
ChannelMetaInput: ChannelMetaInput;
|
|
2326
|
+
DateTime: Scalars["DateTime"]["output"];
|
|
2327
|
+
DeadLetterInfo: DeadLetterInfo;
|
|
2328
|
+
DocumentChangeContext: DocumentChangeContext;
|
|
2329
|
+
DocumentChangeEvent: DocumentChangeEvent;
|
|
2330
|
+
DocumentModelGlobalState: DocumentModelGlobalState;
|
|
2331
|
+
DocumentModelResultPage: DocumentModelResultPage;
|
|
2332
|
+
DocumentOperationsFilterInput: DocumentOperationsFilterInput;
|
|
2333
|
+
DocumentWithChildren: DocumentWithChildren;
|
|
2334
|
+
Int: Scalars["Int"]["output"];
|
|
2335
|
+
JSONObject: Scalars["JSONObject"]["output"];
|
|
2336
|
+
JobChangeEvent: JobChangeEvent;
|
|
2337
|
+
JobInfo: JobInfo;
|
|
2338
|
+
MoveChildrenResult: MoveChildrenResult;
|
|
2339
|
+
Mutation: Record<PropertyKey, never>;
|
|
2340
|
+
OperationContext: OperationContext;
|
|
2341
|
+
OperationContextInput: OperationContextInput;
|
|
2342
|
+
OperationInput: OperationInput;
|
|
2343
|
+
OperationWithContext: OperationWithContext;
|
|
2344
|
+
OperationWithContextInput: OperationWithContextInput;
|
|
2345
|
+
OperationsFilterInput: OperationsFilterInput;
|
|
2346
|
+
PHDocument: PhDocument;
|
|
2347
|
+
PHDocumentResultPage: PhDocumentResultPage;
|
|
2348
|
+
PagingInput: PagingInput;
|
|
2349
|
+
PollSyncEnvelopesResult: PollSyncEnvelopesResult;
|
|
2350
|
+
Query: Record<PropertyKey, never>;
|
|
2351
|
+
ReactorOperation: ReactorOperation;
|
|
2352
|
+
ReactorOperationResultPage: ReactorOperationResultPage;
|
|
2353
|
+
ReactorSigner: ReactorSigner;
|
|
2354
|
+
ReactorSignerApp: ReactorSignerApp;
|
|
2355
|
+
ReactorSignerAppInput: ReactorSignerAppInput;
|
|
2356
|
+
ReactorSignerInput: ReactorSignerInput;
|
|
2357
|
+
ReactorSignerUser: ReactorSignerUser;
|
|
2358
|
+
ReactorSignerUserInput: ReactorSignerUserInput;
|
|
2359
|
+
RemoteCursor: RemoteCursor;
|
|
2360
|
+
RemoteCursorInput: RemoteCursorInput;
|
|
2361
|
+
RemoteFilterInput: RemoteFilterInput;
|
|
2362
|
+
Revision: Revision;
|
|
2363
|
+
SearchFilterInput: SearchFilterInput;
|
|
2364
|
+
String: Scalars["String"]["output"];
|
|
2365
|
+
Subscription: Record<PropertyKey, never>;
|
|
2366
|
+
SyncEnvelope: SyncEnvelope;
|
|
2367
|
+
SyncEnvelopeInput: SyncEnvelopeInput;
|
|
2368
|
+
TouchChannelInput: TouchChannelInput;
|
|
2369
|
+
TouchChannelResult: TouchChannelResult;
|
|
2370
|
+
ViewFilterInput: ViewFilterInput;
|
|
2371
|
+
}>;
|
|
2372
|
+
type ActionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Action"] = ResolversParentTypes["Action"]> = ResolversObject<{
|
|
2373
|
+
attachments?: Resolver<Maybe<ReadonlyArray<ResolversTypes["Attachment"]>>, ParentType, ContextType>;
|
|
2374
|
+
context?: Resolver<Maybe<ResolversTypes["ActionContext"]>, ParentType, ContextType>;
|
|
2375
|
+
id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2376
|
+
input?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
|
|
2377
|
+
scope?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2378
|
+
timestampUtcMs?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2379
|
+
type?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2380
|
+
}>;
|
|
2381
|
+
type ActionContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ActionContext"] = ResolversParentTypes["ActionContext"]> = ResolversObject<{
|
|
2382
|
+
signer?: Resolver<Maybe<ResolversTypes["ReactorSigner"]>, ParentType, ContextType>;
|
|
2383
|
+
}>;
|
|
2384
|
+
type AttachmentResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Attachment"] = ResolversParentTypes["Attachment"]> = ResolversObject<{
|
|
2385
|
+
data?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2386
|
+
extension?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2387
|
+
fileName?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2388
|
+
hash?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2389
|
+
mimeType?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2390
|
+
}>;
|
|
2391
|
+
type ChannelMetaResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ChannelMeta"] = ResolversParentTypes["ChannelMeta"]> = ResolversObject<{
|
|
2392
|
+
id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2393
|
+
}>;
|
|
2394
|
+
interface DateTimeScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["DateTime"], any> {
|
|
2395
|
+
name: "DateTime";
|
|
2396
|
+
}
|
|
2397
|
+
type DeadLetterInfoResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DeadLetterInfo"] = ResolversParentTypes["DeadLetterInfo"]> = ResolversObject<{
|
|
2398
|
+
branch?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2399
|
+
documentId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2400
|
+
error?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2401
|
+
jobId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2402
|
+
operationCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2403
|
+
scopes?: Resolver<ReadonlyArray<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2404
|
+
}>;
|
|
2405
|
+
type DocumentChangeContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentChangeContext"] = ResolversParentTypes["DocumentChangeContext"]> = ResolversObject<{
|
|
2406
|
+
childId?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2407
|
+
parentId?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2408
|
+
}>;
|
|
2409
|
+
type DocumentChangeEventResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentChangeEvent"] = ResolversParentTypes["DocumentChangeEvent"]> = ResolversObject<{
|
|
2410
|
+
context?: Resolver<Maybe<ResolversTypes["DocumentChangeContext"]>, ParentType, ContextType>;
|
|
2411
|
+
documents?: Resolver<ReadonlyArray<ResolversTypes["PHDocument"]>, ParentType, ContextType>;
|
|
2412
|
+
type?: Resolver<ResolversTypes["DocumentChangeType"], ParentType, ContextType>;
|
|
2413
|
+
}>;
|
|
2414
|
+
type DocumentModelGlobalStateResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentModelGlobalState"] = ResolversParentTypes["DocumentModelGlobalState"]> = ResolversObject<{
|
|
2415
|
+
id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2416
|
+
name?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2417
|
+
namespace?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2418
|
+
specification?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
|
|
2419
|
+
version?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2420
|
+
}>;
|
|
2421
|
+
type DocumentModelResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentModelResultPage"] = ResolversParentTypes["DocumentModelResultPage"]> = ResolversObject<{
|
|
2422
|
+
cursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2423
|
+
hasNextPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
|
|
2424
|
+
hasPreviousPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
|
|
2425
|
+
items?: Resolver<ReadonlyArray<ResolversTypes["DocumentModelGlobalState"]>, ParentType, ContextType>;
|
|
2426
|
+
totalCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2427
|
+
}>;
|
|
2428
|
+
type DocumentWithChildrenResolvers<ContextType = Context, ParentType extends ResolversParentTypes["DocumentWithChildren"] = ResolversParentTypes["DocumentWithChildren"]> = ResolversObject<{
|
|
2429
|
+
childIds?: Resolver<ReadonlyArray<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2430
|
+
document?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
|
|
2431
|
+
}>;
|
|
2432
|
+
interface JsonObjectScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes["JSONObject"], any> {
|
|
2433
|
+
name: "JSONObject";
|
|
2434
|
+
}
|
|
2435
|
+
type JobChangeEventResolvers<ContextType = Context, ParentType extends ResolversParentTypes["JobChangeEvent"] = ResolversParentTypes["JobChangeEvent"]> = ResolversObject<{
|
|
2436
|
+
error?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2437
|
+
jobId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2438
|
+
result?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
|
|
2439
|
+
status?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2440
|
+
}>;
|
|
2441
|
+
type JobInfoResolvers<ContextType = Context, ParentType extends ResolversParentTypes["JobInfo"] = ResolversParentTypes["JobInfo"]> = ResolversObject<{
|
|
2442
|
+
completedAt?: Resolver<Maybe<ResolversTypes["DateTime"]>, ParentType, ContextType>;
|
|
2443
|
+
createdAt?: Resolver<ResolversTypes["DateTime"], ParentType, ContextType>;
|
|
2444
|
+
error?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2445
|
+
id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2446
|
+
result?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
|
|
2447
|
+
status?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2448
|
+
}>;
|
|
2449
|
+
type MoveChildrenResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["MoveChildrenResult"] = ResolversParentTypes["MoveChildrenResult"]> = ResolversObject<{
|
|
2450
|
+
source?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
|
|
2451
|
+
target?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType>;
|
|
2452
|
+
}>;
|
|
2453
|
+
type MutationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Mutation"] = ResolversParentTypes["Mutation"]> = ResolversObject<{
|
|
2454
|
+
addChildren?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationAddChildrenArgs, "documentIdentifiers" | "parentIdentifier">>;
|
|
2455
|
+
createDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationCreateDocumentArgs, "document">>;
|
|
2456
|
+
createEmptyDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationCreateEmptyDocumentArgs, "documentType">>;
|
|
2457
|
+
deleteDocument?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, RequireFields<MutationDeleteDocumentArgs, "identifier">>;
|
|
2458
|
+
deleteDocuments?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, RequireFields<MutationDeleteDocumentsArgs, "identifiers">>;
|
|
2459
|
+
moveChildren?: Resolver<ResolversTypes["MoveChildrenResult"], ParentType, ContextType, RequireFields<MutationMoveChildrenArgs, "documentIdentifiers" | "sourceParentIdentifier" | "targetParentIdentifier">>;
|
|
2460
|
+
mutateDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationMutateDocumentArgs, "actions" | "documentIdentifier">>;
|
|
2461
|
+
mutateDocumentAsync?: Resolver<ResolversTypes["String"], ParentType, ContextType, RequireFields<MutationMutateDocumentAsyncArgs, "actions" | "documentIdentifier">>;
|
|
2462
|
+
pushSyncEnvelopes?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType, RequireFields<MutationPushSyncEnvelopesArgs, "envelopes">>;
|
|
2463
|
+
removeChildren?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationRemoveChildrenArgs, "documentIdentifiers" | "parentIdentifier">>;
|
|
2464
|
+
renameDocument?: Resolver<ResolversTypes["PHDocument"], ParentType, ContextType, RequireFields<MutationRenameDocumentArgs, "documentIdentifier" | "name">>;
|
|
2465
|
+
touchChannel?: Resolver<ResolversTypes["TouchChannelResult"], ParentType, ContextType, RequireFields<MutationTouchChannelArgs, "input">>;
|
|
2466
|
+
}>;
|
|
2467
|
+
type OperationContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["OperationContext"] = ResolversParentTypes["OperationContext"]> = ResolversObject<{
|
|
2468
|
+
branch?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2469
|
+
documentId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2470
|
+
documentType?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2471
|
+
ordinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2472
|
+
scope?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2473
|
+
}>;
|
|
2474
|
+
type OperationWithContextResolvers<ContextType = Context, ParentType extends ResolversParentTypes["OperationWithContext"] = ResolversParentTypes["OperationWithContext"]> = ResolversObject<{
|
|
2475
|
+
context?: Resolver<ResolversTypes["OperationContext"], ParentType, ContextType>;
|
|
2476
|
+
operation?: Resolver<ResolversTypes["ReactorOperation"], ParentType, ContextType>;
|
|
2477
|
+
}>;
|
|
2478
|
+
type PhDocumentResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PHDocument"] = ResolversParentTypes["PHDocument"]> = ResolversObject<{
|
|
2479
|
+
createdAtUtcIso?: Resolver<ResolversTypes["DateTime"], ParentType, ContextType>;
|
|
2480
|
+
documentType?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2481
|
+
id?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2482
|
+
lastModifiedAtUtcIso?: Resolver<ResolversTypes["DateTime"], ParentType, ContextType>;
|
|
2483
|
+
name?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2484
|
+
operations?: Resolver<Maybe<ResolversTypes["ReactorOperationResultPage"]>, ParentType, ContextType, Partial<PhDocumentOperationsArgs>>;
|
|
2485
|
+
preferredEditor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2486
|
+
revisionsList?: Resolver<ReadonlyArray<ResolversTypes["Revision"]>, ParentType, ContextType>;
|
|
2487
|
+
slug?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2488
|
+
state?: Resolver<ResolversTypes["JSONObject"], ParentType, ContextType>;
|
|
2489
|
+
}>;
|
|
2490
|
+
type PhDocumentResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PHDocumentResultPage"] = ResolversParentTypes["PHDocumentResultPage"]> = ResolversObject<{
|
|
2491
|
+
cursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2492
|
+
hasNextPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
|
|
2493
|
+
hasPreviousPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
|
|
2494
|
+
items?: Resolver<ReadonlyArray<ResolversTypes["PHDocument"]>, ParentType, ContextType>;
|
|
2495
|
+
totalCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2496
|
+
}>;
|
|
2497
|
+
type PollSyncEnvelopesResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["PollSyncEnvelopesResult"] = ResolversParentTypes["PollSyncEnvelopesResult"]> = ResolversObject<{
|
|
2498
|
+
ackOrdinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2499
|
+
deadLetters?: Resolver<ReadonlyArray<ResolversTypes["DeadLetterInfo"]>, ParentType, ContextType>;
|
|
2500
|
+
envelopes?: Resolver<ReadonlyArray<ResolversTypes["SyncEnvelope"]>, ParentType, ContextType>;
|
|
2501
|
+
hasMore?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
|
|
2502
|
+
}>;
|
|
2503
|
+
type QueryResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Query"] = ResolversParentTypes["Query"]> = ResolversObject<{
|
|
2504
|
+
document?: Resolver<Maybe<ResolversTypes["DocumentWithChildren"]>, ParentType, ContextType, RequireFields<QueryDocumentArgs, "identifier">>;
|
|
2505
|
+
documentChildren?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentChildrenArgs, "parentIdentifier">>;
|
|
2506
|
+
documentModels?: Resolver<ResolversTypes["DocumentModelResultPage"], ParentType, ContextType, Partial<QueryDocumentModelsArgs>>;
|
|
2507
|
+
documentOperations?: Resolver<ResolversTypes["ReactorOperationResultPage"], ParentType, ContextType, RequireFields<QueryDocumentOperationsArgs, "filter">>;
|
|
2508
|
+
documentParents?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, RequireFields<QueryDocumentParentsArgs, "childIdentifier">>;
|
|
2509
|
+
findDocuments?: Resolver<ResolversTypes["PHDocumentResultPage"], ParentType, ContextType, Partial<QueryFindDocumentsArgs>>;
|
|
2510
|
+
jobStatus?: Resolver<Maybe<ResolversTypes["JobInfo"]>, ParentType, ContextType, RequireFields<QueryJobStatusArgs, "jobId">>;
|
|
2511
|
+
pollSyncEnvelopes?: Resolver<ResolversTypes["PollSyncEnvelopesResult"], ParentType, ContextType, RequireFields<QueryPollSyncEnvelopesArgs, "channelId" | "outboxAck" | "outboxLatest">>;
|
|
2512
|
+
}>;
|
|
2513
|
+
type ReactorOperationResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorOperation"] = ResolversParentTypes["ReactorOperation"]> = ResolversObject<{
|
|
2514
|
+
action?: Resolver<ResolversTypes["Action"], ParentType, ContextType>;
|
|
2515
|
+
error?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2516
|
+
hash?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2517
|
+
id?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2518
|
+
index?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2519
|
+
skip?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2520
|
+
timestampUtcMs?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2521
|
+
}>;
|
|
2522
|
+
type ReactorOperationResultPageResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorOperationResultPage"] = ResolversParentTypes["ReactorOperationResultPage"]> = ResolversObject<{
|
|
2523
|
+
cursor?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2524
|
+
hasNextPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
|
|
2525
|
+
hasPreviousPage?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
|
|
2526
|
+
items?: Resolver<ReadonlyArray<ResolversTypes["ReactorOperation"]>, ParentType, ContextType>;
|
|
2527
|
+
totalCount?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2528
|
+
}>;
|
|
2529
|
+
type ReactorSignerResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSigner"] = ResolversParentTypes["ReactorSigner"]> = ResolversObject<{
|
|
2530
|
+
app?: Resolver<Maybe<ResolversTypes["ReactorSignerApp"]>, ParentType, ContextType>;
|
|
2531
|
+
signatures?: Resolver<ReadonlyArray<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2532
|
+
user?: Resolver<Maybe<ResolversTypes["ReactorSignerUser"]>, ParentType, ContextType>;
|
|
2533
|
+
}>;
|
|
2534
|
+
type ReactorSignerAppResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSignerApp"] = ResolversParentTypes["ReactorSignerApp"]> = ResolversObject<{
|
|
2535
|
+
key?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2536
|
+
name?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2537
|
+
}>;
|
|
2538
|
+
type ReactorSignerUserResolvers<ContextType = Context, ParentType extends ResolversParentTypes["ReactorSignerUser"] = ResolversParentTypes["ReactorSignerUser"]> = ResolversObject<{
|
|
2539
|
+
address?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2540
|
+
chainId?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2541
|
+
networkId?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2542
|
+
}>;
|
|
2543
|
+
type RemoteCursorResolvers<ContextType = Context, ParentType extends ResolversParentTypes["RemoteCursor"] = ResolversParentTypes["RemoteCursor"]> = ResolversObject<{
|
|
2544
|
+
cursorOrdinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2545
|
+
lastSyncedAtUtcMs?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2546
|
+
remoteName?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2547
|
+
}>;
|
|
2548
|
+
type RevisionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Revision"] = ResolversParentTypes["Revision"]> = ResolversObject<{
|
|
2549
|
+
revision?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2550
|
+
scope?: Resolver<ResolversTypes["String"], ParentType, ContextType>;
|
|
2551
|
+
}>;
|
|
2552
|
+
type SubscriptionResolvers<ContextType = Context, ParentType extends ResolversParentTypes["Subscription"] = ResolversParentTypes["Subscription"]> = ResolversObject<{
|
|
2553
|
+
documentChanges?: SubscriptionResolver<ResolversTypes["DocumentChangeEvent"], "documentChanges", ParentType, ContextType, Partial<SubscriptionDocumentChangesArgs>>;
|
|
2554
|
+
jobChanges?: SubscriptionResolver<ResolversTypes["JobChangeEvent"], "jobChanges", ParentType, ContextType, RequireFields<SubscriptionJobChangesArgs, "jobId">>;
|
|
2555
|
+
}>;
|
|
2556
|
+
type SyncEnvelopeResolvers<ContextType = Context, ParentType extends ResolversParentTypes["SyncEnvelope"] = ResolversParentTypes["SyncEnvelope"]> = ResolversObject<{
|
|
2557
|
+
channelMeta?: Resolver<ResolversTypes["ChannelMeta"], ParentType, ContextType>;
|
|
2558
|
+
cursor?: Resolver<Maybe<ResolversTypes["RemoteCursor"]>, ParentType, ContextType>;
|
|
2559
|
+
dependsOn?: Resolver<Maybe<ReadonlyArray<ResolversTypes["String"]>>, ParentType, ContextType>;
|
|
2560
|
+
key?: Resolver<Maybe<ResolversTypes["String"]>, ParentType, ContextType>;
|
|
2561
|
+
operations?: Resolver<Maybe<ReadonlyArray<ResolversTypes["OperationWithContext"]>>, ParentType, ContextType>;
|
|
2562
|
+
type?: Resolver<ResolversTypes["SyncEnvelopeType"], ParentType, ContextType>;
|
|
2563
|
+
}>;
|
|
2564
|
+
type TouchChannelResultResolvers<ContextType = Context, ParentType extends ResolversParentTypes["TouchChannelResult"] = ResolversParentTypes["TouchChannelResult"]> = ResolversObject<{
|
|
2565
|
+
ackOrdinal?: Resolver<ResolversTypes["Int"], ParentType, ContextType>;
|
|
2566
|
+
success?: Resolver<ResolversTypes["Boolean"], ParentType, ContextType>;
|
|
2567
|
+
}>;
|
|
2568
|
+
type Resolvers<ContextType = Context> = ResolversObject<{
|
|
2569
|
+
Action?: ActionResolvers<ContextType>;
|
|
2570
|
+
ActionContext?: ActionContextResolvers<ContextType>;
|
|
2571
|
+
Attachment?: AttachmentResolvers<ContextType>;
|
|
2572
|
+
ChannelMeta?: ChannelMetaResolvers<ContextType>;
|
|
2573
|
+
DateTime?: GraphQLScalarType;
|
|
2574
|
+
DeadLetterInfo?: DeadLetterInfoResolvers<ContextType>;
|
|
2575
|
+
DocumentChangeContext?: DocumentChangeContextResolvers<ContextType>;
|
|
2576
|
+
DocumentChangeEvent?: DocumentChangeEventResolvers<ContextType>;
|
|
2577
|
+
DocumentModelGlobalState?: DocumentModelGlobalStateResolvers<ContextType>;
|
|
2578
|
+
DocumentModelResultPage?: DocumentModelResultPageResolvers<ContextType>;
|
|
2579
|
+
DocumentWithChildren?: DocumentWithChildrenResolvers<ContextType>;
|
|
2580
|
+
JSONObject?: GraphQLScalarType;
|
|
2581
|
+
JobChangeEvent?: JobChangeEventResolvers<ContextType>;
|
|
2582
|
+
JobInfo?: JobInfoResolvers<ContextType>;
|
|
2583
|
+
MoveChildrenResult?: MoveChildrenResultResolvers<ContextType>;
|
|
2584
|
+
Mutation?: MutationResolvers<ContextType>;
|
|
2585
|
+
OperationContext?: OperationContextResolvers<ContextType>;
|
|
2586
|
+
OperationWithContext?: OperationWithContextResolvers<ContextType>;
|
|
2587
|
+
PHDocument?: PhDocumentResolvers<ContextType>;
|
|
2588
|
+
PHDocumentResultPage?: PhDocumentResultPageResolvers<ContextType>;
|
|
2589
|
+
PollSyncEnvelopesResult?: PollSyncEnvelopesResultResolvers<ContextType>;
|
|
2590
|
+
Query?: QueryResolvers<ContextType>;
|
|
2591
|
+
ReactorOperation?: ReactorOperationResolvers<ContextType>;
|
|
2592
|
+
ReactorOperationResultPage?: ReactorOperationResultPageResolvers<ContextType>;
|
|
2593
|
+
ReactorSigner?: ReactorSignerResolvers<ContextType>;
|
|
2594
|
+
ReactorSignerApp?: ReactorSignerAppResolvers<ContextType>;
|
|
2595
|
+
ReactorSignerUser?: ReactorSignerUserResolvers<ContextType>;
|
|
2596
|
+
RemoteCursor?: RemoteCursorResolvers<ContextType>;
|
|
2597
|
+
Revision?: RevisionResolvers<ContextType>;
|
|
2598
|
+
Subscription?: SubscriptionResolvers<ContextType>;
|
|
2599
|
+
SyncEnvelope?: SyncEnvelopeResolvers<ContextType>;
|
|
2600
|
+
TouchChannelResult?: TouchChannelResultResolvers<ContextType>;
|
|
2601
|
+
}>;
|
|
2602
|
+
type Properties<T> = Required<{ [K in keyof T]: z$1.ZodType<T[K]> }>;
|
|
2603
|
+
type definedNonNullAny = {};
|
|
2604
|
+
declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
|
|
2605
|
+
declare const definedNonNullAnySchema: z$1.ZodAny & z$1.ZodType<definedNonNullAny, any, z$1.core.$ZodTypeInternals<definedNonNullAny, any>>;
|
|
2606
|
+
declare const DocumentChangeTypeSchema: z$1.ZodEnum<typeof DocumentChangeType>;
|
|
2607
|
+
declare const PropagationModeSchema: z$1.ZodEnum<typeof PropagationMode>;
|
|
2608
|
+
declare const SyncEnvelopeTypeSchema: z$1.ZodEnum<typeof SyncEnvelopeType>;
|
|
2609
|
+
declare function ActionContextInputSchema(): z$1.ZodObject<Properties<ActionContextInput>>;
|
|
2610
|
+
declare function ActionInputSchema(): z$1.ZodObject<Properties<ActionInput>>;
|
|
2611
|
+
declare function AttachmentInputSchema(): z$1.ZodObject<Properties<AttachmentInput>>;
|
|
2612
|
+
declare function ChannelMetaInputSchema(): z$1.ZodObject<Properties<ChannelMetaInput>>;
|
|
2613
|
+
declare function DocumentOperationsFilterInputSchema(): z$1.ZodObject<Properties<DocumentOperationsFilterInput>>;
|
|
2614
|
+
declare function OperationContextInputSchema(): z$1.ZodObject<Properties<OperationContextInput>>;
|
|
2615
|
+
declare function OperationInputSchema(): z$1.ZodObject<Properties<OperationInput>>;
|
|
2616
|
+
declare function OperationWithContextInputSchema(): z$1.ZodObject<Properties<OperationWithContextInput>>;
|
|
2617
|
+
declare function OperationsFilterInputSchema(): z$1.ZodObject<Properties<OperationsFilterInput>>;
|
|
2618
|
+
declare function PagingInputSchema(): z$1.ZodObject<Properties<PagingInput>>;
|
|
2619
|
+
declare function ReactorSignerAppInputSchema(): z$1.ZodObject<Properties<ReactorSignerAppInput>>;
|
|
2620
|
+
declare function ReactorSignerInputSchema(): z$1.ZodObject<Properties<ReactorSignerInput>>;
|
|
2621
|
+
declare function ReactorSignerUserInputSchema(): z$1.ZodObject<Properties<ReactorSignerUserInput>>;
|
|
2622
|
+
declare function RemoteCursorInputSchema(): z$1.ZodObject<Properties<RemoteCursorInput>>;
|
|
2623
|
+
declare function RemoteFilterInputSchema(): z$1.ZodObject<Properties<RemoteFilterInput>>;
|
|
2624
|
+
declare function SearchFilterInputSchema(): z$1.ZodObject<Properties<SearchFilterInput>>;
|
|
2625
|
+
declare function SyncEnvelopeInputSchema(): z$1.ZodObject<Properties<SyncEnvelopeInput>>;
|
|
2626
|
+
declare function TouchChannelInputSchema(): z$1.ZodObject<Properties<TouchChannelInput>>;
|
|
2627
|
+
declare function ViewFilterInputSchema(): z$1.ZodObject<Properties<ViewFilterInput>>;
|
|
2628
|
+
declare const PhDocumentFieldsFragmentDoc: DocumentNode;
|
|
2629
|
+
declare const GetDocumentModelsDocument: DocumentNode;
|
|
2630
|
+
declare const GetDocumentDocument: DocumentNode;
|
|
2631
|
+
declare const GetDocumentWithOperationsDocument: DocumentNode;
|
|
2632
|
+
declare const GetDocumentChildrenDocument: DocumentNode;
|
|
2633
|
+
declare const GetDocumentParentsDocument: DocumentNode;
|
|
2634
|
+
declare const FindDocumentsDocument: DocumentNode;
|
|
2635
|
+
declare const GetDocumentOperationsDocument: DocumentNode;
|
|
2636
|
+
declare const GetJobStatusDocument: DocumentNode;
|
|
2637
|
+
declare const CreateDocumentDocument: DocumentNode;
|
|
2638
|
+
declare const CreateEmptyDocumentDocument: DocumentNode;
|
|
2639
|
+
declare const MutateDocumentDocument: DocumentNode;
|
|
2640
|
+
declare const MutateDocumentAsyncDocument: DocumentNode;
|
|
2641
|
+
declare const RenameDocumentDocument: DocumentNode;
|
|
2642
|
+
declare const AddChildrenDocument: DocumentNode;
|
|
2643
|
+
declare const RemoveChildrenDocument: DocumentNode;
|
|
2644
|
+
declare const MoveChildrenDocument: DocumentNode;
|
|
2645
|
+
declare const DeleteDocumentDocument: DocumentNode;
|
|
2646
|
+
declare const DeleteDocumentsDocument: DocumentNode;
|
|
2647
|
+
declare const DocumentChangesDocument: DocumentNode;
|
|
2648
|
+
declare const JobChangesDocument: DocumentNode;
|
|
2649
|
+
declare const PollSyncEnvelopesDocument: DocumentNode;
|
|
2650
|
+
declare const TouchChannelDocument: DocumentNode;
|
|
2651
|
+
declare const PushSyncEnvelopesDocument: DocumentNode;
|
|
2652
|
+
type Requester<C = {}> = <R, V>(doc: DocumentNode, vars?: V, options?: C) => Promise<R> | AsyncIterable<R>;
|
|
2653
|
+
declare function getSdk<C>(requester: Requester<C>): {
|
|
2654
|
+
GetDocumentModels(variables?: GetDocumentModelsQueryVariables, options?: C): Promise<GetDocumentModelsQuery>;
|
|
2655
|
+
GetDocument(variables: GetDocumentQueryVariables, options?: C): Promise<GetDocumentQuery>;
|
|
2656
|
+
GetDocumentWithOperations(variables: GetDocumentWithOperationsQueryVariables, options?: C): Promise<GetDocumentWithOperationsQuery>;
|
|
2657
|
+
GetDocumentChildren(variables: GetDocumentChildrenQueryVariables, options?: C): Promise<GetDocumentChildrenQuery>;
|
|
2658
|
+
GetDocumentParents(variables: GetDocumentParentsQueryVariables, options?: C): Promise<GetDocumentParentsQuery>;
|
|
2659
|
+
FindDocuments(variables?: FindDocumentsQueryVariables, options?: C): Promise<FindDocumentsQuery>;
|
|
2660
|
+
GetDocumentOperations(variables: GetDocumentOperationsQueryVariables, options?: C): Promise<GetDocumentOperationsQuery>;
|
|
2661
|
+
GetJobStatus(variables: GetJobStatusQueryVariables, options?: C): Promise<GetJobStatusQuery>;
|
|
2662
|
+
CreateDocument(variables: CreateDocumentMutationVariables, options?: C): Promise<CreateDocumentMutation>;
|
|
2663
|
+
CreateEmptyDocument(variables: CreateEmptyDocumentMutationVariables, options?: C): Promise<CreateEmptyDocumentMutation>;
|
|
2664
|
+
MutateDocument(variables: MutateDocumentMutationVariables, options?: C): Promise<MutateDocumentMutation>;
|
|
2665
|
+
MutateDocumentAsync(variables: MutateDocumentAsyncMutationVariables, options?: C): Promise<MutateDocumentAsyncMutation>;
|
|
2666
|
+
RenameDocument(variables: RenameDocumentMutationVariables, options?: C): Promise<RenameDocumentMutation>;
|
|
2667
|
+
AddChildren(variables: AddChildrenMutationVariables, options?: C): Promise<AddChildrenMutation>;
|
|
2668
|
+
RemoveChildren(variables: RemoveChildrenMutationVariables, options?: C): Promise<RemoveChildrenMutation>;
|
|
2669
|
+
MoveChildren(variables: MoveChildrenMutationVariables, options?: C): Promise<MoveChildrenMutation>;
|
|
2670
|
+
DeleteDocument(variables: DeleteDocumentMutationVariables, options?: C): Promise<DeleteDocumentMutation>;
|
|
2671
|
+
DeleteDocuments(variables: DeleteDocumentsMutationVariables, options?: C): Promise<DeleteDocumentsMutation>;
|
|
2672
|
+
DocumentChanges(variables?: DocumentChangesSubscriptionVariables, options?: C): AsyncIterable<DocumentChangesSubscription>;
|
|
2673
|
+
JobChanges(variables: JobChangesSubscriptionVariables, options?: C): AsyncIterable<JobChangesSubscription>;
|
|
2674
|
+
PollSyncEnvelopes(variables: PollSyncEnvelopesQueryVariables, options?: C): Promise<PollSyncEnvelopesQuery>;
|
|
2675
|
+
TouchChannel(variables: TouchChannelMutationVariables, options?: C): Promise<TouchChannelMutation>;
|
|
2676
|
+
PushSyncEnvelopes(variables: PushSyncEnvelopesMutationVariables, options?: C): Promise<PushSyncEnvelopesMutation>;
|
|
2677
|
+
};
|
|
2678
|
+
type Sdk = ReturnType<typeof getSdk>;
|
|
2679
|
+
//#endregion
|
|
2680
|
+
//#region src/graphql/reactor/requester.d.ts
|
|
2681
|
+
type FetchLike = (input: URL | string, init: RequestInit) => Promise<Response>;
|
|
2682
|
+
//#endregion
|
|
2683
|
+
//#region src/graphql/reactor/factory.d.ts
|
|
2684
|
+
declare function createReactorGraphQLClient(url: string, fetchImpl?: FetchLike, headers?: Record<string, string>): {
|
|
2685
|
+
GetDocumentModels(variables?: Exact<{
|
|
2686
|
+
namespace?: InputMaybe<Scalars["String"]["input"]>;
|
|
2687
|
+
paging?: InputMaybe<PagingInput>;
|
|
2688
|
+
}> | undefined, options?: {} | undefined): Promise<GetDocumentModelsQuery>;
|
|
2689
|
+
GetDocument(variables: Exact<{
|
|
2690
|
+
identifier: Scalars["String"]["input"];
|
|
2691
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
2692
|
+
}>, options?: {} | undefined): Promise<GetDocumentQuery>;
|
|
2693
|
+
GetDocumentWithOperations(variables: Exact<{
|
|
2694
|
+
identifier: Scalars["String"]["input"];
|
|
2695
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
2696
|
+
operationsFilter?: InputMaybe<DocumentOperationsFilterInput>;
|
|
2697
|
+
operationsPaging?: InputMaybe<PagingInput>;
|
|
2698
|
+
}>, options?: {} | undefined): Promise<GetDocumentWithOperationsQuery>;
|
|
2699
|
+
GetDocumentChildren(variables: Exact<{
|
|
2700
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
2701
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
2702
|
+
paging?: InputMaybe<PagingInput>;
|
|
2703
|
+
}>, options?: {} | undefined): Promise<GetDocumentChildrenQuery>;
|
|
2704
|
+
GetDocumentParents(variables: Exact<{
|
|
2705
|
+
childIdentifier: Scalars["String"]["input"];
|
|
2706
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
2707
|
+
paging?: InputMaybe<PagingInput>;
|
|
2708
|
+
}>, options?: {} | undefined): Promise<GetDocumentParentsQuery>;
|
|
2709
|
+
FindDocuments(variables?: Exact<{
|
|
2710
|
+
search?: InputMaybe<SearchFilterInput>;
|
|
2711
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
2712
|
+
paging?: InputMaybe<PagingInput>;
|
|
2713
|
+
}> | undefined, options?: {} | undefined): Promise<FindDocumentsQuery>;
|
|
2714
|
+
GetDocumentOperations(variables: Exact<{
|
|
2715
|
+
filter: OperationsFilterInput;
|
|
2716
|
+
paging?: InputMaybe<PagingInput>;
|
|
2717
|
+
}>, options?: {} | undefined): Promise<GetDocumentOperationsQuery>;
|
|
2718
|
+
GetJobStatus(variables: Exact<{
|
|
2719
|
+
jobId: Scalars["String"]["input"];
|
|
2720
|
+
}>, options?: {} | undefined): Promise<GetJobStatusQuery>;
|
|
2721
|
+
CreateDocument(variables: Exact<{
|
|
2722
|
+
document: Scalars["JSONObject"]["input"];
|
|
2723
|
+
parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
2724
|
+
}>, options?: {} | undefined): Promise<CreateDocumentMutation>;
|
|
2725
|
+
CreateEmptyDocument(variables: Exact<{
|
|
2726
|
+
documentType: Scalars["String"]["input"];
|
|
2727
|
+
parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
2728
|
+
}>, options?: {} | undefined): Promise<CreateEmptyDocumentMutation>;
|
|
2729
|
+
MutateDocument(variables: Exact<{
|
|
2730
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
2731
|
+
actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
|
|
2732
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
2733
|
+
}>, options?: {} | undefined): Promise<MutateDocumentMutation>;
|
|
2734
|
+
MutateDocumentAsync(variables: Exact<{
|
|
2735
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
2736
|
+
actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
|
|
2737
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
2738
|
+
}>, options?: {} | undefined): Promise<MutateDocumentAsyncMutation>;
|
|
2739
|
+
RenameDocument(variables: Exact<{
|
|
2740
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
2741
|
+
name: Scalars["String"]["input"];
|
|
2742
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2743
|
+
}>, options?: {} | undefined): Promise<RenameDocumentMutation>;
|
|
2744
|
+
AddChildren(variables: Exact<{
|
|
2745
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
2746
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
2747
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2748
|
+
}>, options?: {} | undefined): Promise<AddChildrenMutation>;
|
|
2749
|
+
RemoveChildren(variables: Exact<{
|
|
2750
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
2751
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
2752
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2753
|
+
}>, options?: {} | undefined): Promise<RemoveChildrenMutation>;
|
|
2754
|
+
MoveChildren(variables: Exact<{
|
|
2755
|
+
sourceParentIdentifier: Scalars["String"]["input"];
|
|
2756
|
+
targetParentIdentifier: Scalars["String"]["input"];
|
|
2757
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
2758
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
2759
|
+
}>, options?: {} | undefined): Promise<MoveChildrenMutation>;
|
|
2760
|
+
DeleteDocument(variables: Exact<{
|
|
2761
|
+
identifier: Scalars["String"]["input"];
|
|
2762
|
+
propagate?: InputMaybe<PropagationMode>;
|
|
2763
|
+
}>, options?: {} | undefined): Promise<DeleteDocumentMutation>;
|
|
2764
|
+
DeleteDocuments(variables: Exact<{
|
|
2765
|
+
identifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
2766
|
+
propagate?: InputMaybe<PropagationMode>;
|
|
2767
|
+
}>, options?: {} | undefined): Promise<DeleteDocumentsMutation>;
|
|
2768
|
+
DocumentChanges(variables?: Exact<{
|
|
2769
|
+
search?: InputMaybe<SearchFilterInput>;
|
|
2770
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
2771
|
+
}> | undefined, options?: {} | undefined): AsyncIterable<DocumentChangesSubscription>;
|
|
2772
|
+
JobChanges(variables: Exact<{
|
|
2773
|
+
jobId: Scalars["String"]["input"];
|
|
2774
|
+
}>, options?: {} | undefined): AsyncIterable<JobChangesSubscription>;
|
|
2775
|
+
PollSyncEnvelopes(variables: Exact<{
|
|
2776
|
+
channelId: Scalars["String"]["input"];
|
|
2777
|
+
outboxAck: Scalars["Int"]["input"];
|
|
2778
|
+
outboxLatest: Scalars["Int"]["input"];
|
|
2779
|
+
}>, options?: {} | undefined): Promise<PollSyncEnvelopesQuery>;
|
|
2780
|
+
TouchChannel(variables: Exact<{
|
|
2781
|
+
input: TouchChannelInput;
|
|
2782
|
+
}>, options?: {} | undefined): Promise<TouchChannelMutation>;
|
|
2783
|
+
PushSyncEnvelopes(variables: Exact<{
|
|
2784
|
+
envelopes: ReadonlyArray<SyncEnvelopeInput>;
|
|
2785
|
+
}>, options?: {} | undefined): Promise<PushSyncEnvelopesMutation>;
|
|
2786
|
+
};
|
|
2787
|
+
//#endregion
|
|
2788
|
+
//#region src/graphql/reactor/subgraph.d.ts
|
|
2789
|
+
declare class ReactorSubgraph extends BaseSubgraph {
|
|
2790
|
+
private logger;
|
|
2791
|
+
constructor(args: SubgraphArgs);
|
|
2792
|
+
name: string;
|
|
2793
|
+
hasSubscriptions: boolean;
|
|
2794
|
+
/**
|
|
2795
|
+
* Check operation-level permissions for an array of actions.
|
|
2796
|
+
* Delegates to base assertCanExecuteOperation for each action.
|
|
2797
|
+
*/
|
|
2798
|
+
private assertCanExecuteOperations;
|
|
2799
|
+
typeDefs: graphql.DocumentNode;
|
|
2800
|
+
resolvers: Resolvers;
|
|
2801
|
+
onSetup(): Promise<void>;
|
|
2802
|
+
}
|
|
2803
|
+
//#endregion
|
|
2804
|
+
//#region src/graphql/system/env/index.d.ts
|
|
2805
|
+
declare const ADMIN_USERS: string[];
|
|
2806
|
+
//#endregion
|
|
2807
|
+
//#region src/graphql/utils.d.ts
|
|
2808
|
+
declare function isSubgraphClass(candidate: unknown): candidate is SubgraphClass$1;
|
|
2809
|
+
declare function buildGraphqlOperations(operations: Operation[], skip: number, first: number): GqlOperation$1[];
|
|
2810
|
+
declare function buildGraphqlOperation(operation: Operation): GqlOperation$1;
|
|
2811
|
+
declare function buildGraphQlDocument(doc: PHDocument): GqlDocument$1;
|
|
2812
|
+
declare function buildGraphQlDriveDocument(doc: DocumentDriveDocument): GqlDriveDocument$1;
|
|
2813
|
+
//#endregion
|
|
2814
|
+
//#region src/packages/import-loader.d.ts
|
|
2815
|
+
/**
|
|
2816
|
+
* This class is used to load packages using the import keyword.
|
|
2817
|
+
*/
|
|
2818
|
+
declare class ImportPackageLoader implements IPackageLoader {
|
|
2819
|
+
private readonly logger;
|
|
2820
|
+
readonly name = "ImportPackageLoader";
|
|
2821
|
+
loadDocumentModels(identifier: string): Promise<DocumentModelModule[]>;
|
|
2822
|
+
loadSubgraphs(identifier: string): Promise<SubgraphClass$1[]>;
|
|
2823
|
+
loadProcessors(identifier: string): Promise<ProcessorFactoryBuilder | null>;
|
|
2824
|
+
}
|
|
2825
|
+
//#endregion
|
|
2826
|
+
//#region src/packages/package-manager.d.ts
|
|
2827
|
+
declare function getUniqueDocumentModels(...documentModels: DocumentModelModule<any>[][]): DocumentModelModule[];
|
|
2828
|
+
declare class PackageManager implements IPackageManager {
|
|
2829
|
+
protected options: IPackageManagerOptions;
|
|
2830
|
+
private readonly logger;
|
|
2831
|
+
private loaders;
|
|
2832
|
+
private docModelsMap;
|
|
2833
|
+
private subgraphsMap;
|
|
2834
|
+
private processorMap;
|
|
2835
|
+
private configWatcher;
|
|
2836
|
+
private debouncedUpdateCallbacks;
|
|
2837
|
+
private eventEmitter;
|
|
2838
|
+
constructor(loaders: IPackageLoader[], options: IPackageManagerOptions);
|
|
2839
|
+
init(): Promise<PackageManagerResult>;
|
|
2840
|
+
private loadPackages;
|
|
2841
|
+
private loadDocumentModels;
|
|
2842
|
+
private loadSubgraphs;
|
|
2843
|
+
private loadProcessors;
|
|
2844
|
+
private updateDocumentModelsForPackage;
|
|
2845
|
+
private subscribePackages;
|
|
2846
|
+
private getAllPackageNames;
|
|
2847
|
+
private getPackageNamesFromConfigFile;
|
|
2848
|
+
private initConfigFileWatcher;
|
|
2849
|
+
private updatePackagesMap;
|
|
2850
|
+
private updateSubgraphsMap;
|
|
2851
|
+
private updateProcessorsMap;
|
|
2852
|
+
onDocumentModelsChange(handler: (documentModels: Record<string, DocumentModelModule[]>) => void): void;
|
|
2853
|
+
onSubgraphsChange(handler: (subgraphs: Map<string, SubgraphClass$1[]>) => void): void;
|
|
2854
|
+
onProcessorsChange(handler: (processors: Map<string, Processor$1>) => void): void;
|
|
2855
|
+
}
|
|
2856
|
+
//#endregion
|
|
2857
|
+
//#region src/server.d.ts
|
|
2858
|
+
type Options = {
|
|
2859
|
+
port?: number;
|
|
2860
|
+
dbPath: string | undefined;
|
|
2861
|
+
client?: PGlite | typeof Pool | undefined;
|
|
2862
|
+
configFile?: string;
|
|
2863
|
+
packages?: string[];
|
|
2864
|
+
auth?: {
|
|
2865
|
+
enabled: boolean;
|
|
2866
|
+
admins: string[];
|
|
2867
|
+
};
|
|
2868
|
+
https?: {
|
|
2869
|
+
keyPath: string;
|
|
2870
|
+
certPath: string;
|
|
2871
|
+
} | boolean | undefined;
|
|
2872
|
+
packageLoaders?: IPackageLoader[];
|
|
2873
|
+
processors?: Record<string, ProcessorInitializer[]>;
|
|
2874
|
+
mcp?: boolean;
|
|
2875
|
+
processorConfig?: Map<string, unknown>;
|
|
2876
|
+
/**
|
|
2877
|
+
* Document permission service instance.
|
|
2878
|
+
* When provided, the Auth subgraph is registered and document permission
|
|
2879
|
+
* checks are enforced on document operations.
|
|
2880
|
+
* If not provided, can be auto-created by setting DOCUMENT_PERMISSIONS_ENABLED=true
|
|
2881
|
+
* environment variable.
|
|
2882
|
+
*/
|
|
2883
|
+
documentPermissionService?: DocumentPermissionService;
|
|
2884
|
+
enableDocumentModelSubgraphs?: boolean;
|
|
2885
|
+
logger?: ILogger;
|
|
2886
|
+
};
|
|
2887
|
+
type ProcessorInitializer = ProcessorFactoryBuilder;
|
|
2888
|
+
/**
|
|
2889
|
+
* Initializes and starts the API server using an initializer function.
|
|
2890
|
+
* This function first loads packages to get document models, then calls the initializer function
|
|
2891
|
+
* to create the reactor client module with the appropriate dependencies.
|
|
2892
|
+
*
|
|
2893
|
+
* @param clientInitializer - Initializer function that creates the reactor client module with document models.
|
|
2894
|
+
* @param options - Additional options for server configuration.
|
|
2895
|
+
*
|
|
2896
|
+
* @returns The API server components along with the created client instances.
|
|
2897
|
+
*/
|
|
2898
|
+
declare function initializeAndStartAPI(clientInitializer: (documentModels: DocumentModelModule[]) => Promise<ReactorClientModule>, options: Options, processorApp: ProcessorApp): Promise<API & {
|
|
2899
|
+
client: IReactorClient;
|
|
2900
|
+
syncManager: ISyncManager;
|
|
2901
|
+
documentModelRegistry: IDocumentModelRegistry;
|
|
2902
|
+
}>;
|
|
2903
|
+
//#endregion
|
|
2904
|
+
//#region src/tracing.d.ts
|
|
2905
|
+
declare function initTracing(): Promise<void>;
|
|
2906
|
+
declare function isTracingEnabled(): boolean;
|
|
2907
|
+
declare function trace<T>(_name: string, _options: any, fn: () => Promise<T>): Promise<T>;
|
|
2908
|
+
//#endregion
|
|
2909
|
+
//#region src/utils/create-schema.d.ts
|
|
2910
|
+
declare const buildSubgraphSchemaModule: (documentModels: DocumentModelModule[], resolvers: GraphQLResolverMap<Context$1>, typeDefs: DocumentNode) => GraphQLSchemaModule;
|
|
2911
|
+
declare const createSchema: (documentModels: DocumentModelModule[], resolvers: GraphQLResolverMap<Context$1>, typeDefs: DocumentNode) => graphql.GraphQLSchema;
|
|
2912
|
+
/**
|
|
2913
|
+
* Create a merged GraphQL schema from multiple subgraph modules.
|
|
2914
|
+
* Uses buildSubgraphSchema's array overload to combine type definitions
|
|
2915
|
+
* and resolvers from multiple subgraphs into a single executable schema.
|
|
2916
|
+
*/
|
|
2917
|
+
declare const createMergedSchema: (modules: GraphQLSchemaModule[]) => graphql.GraphQLSchema;
|
|
2918
|
+
declare function getDocumentModelSchemaName(documentModel: DocumentModelGlobalState$1): string;
|
|
2919
|
+
declare const getDocumentModelTypeDefs: (documentModels: DocumentModelModule[], typeDefs: DocumentNode) => DocumentNode;
|
|
2920
|
+
/**
|
|
2921
|
+
* Options for generating document model GraphQL schemas.
|
|
2922
|
+
*/
|
|
2923
|
+
interface DocumentModelSchemaOptions {
|
|
2924
|
+
/**
|
|
2925
|
+
* When true, generates new API patterns:
|
|
2926
|
+
* - Mutations return full document objects (MutationResult type)
|
|
2927
|
+
* - Adds createEmptyDocument mutation
|
|
2928
|
+
* - Makes docId and input parameters required
|
|
2929
|
+
* @default false
|
|
2930
|
+
*/
|
|
2931
|
+
useNewApi?: boolean;
|
|
2932
|
+
}
|
|
2933
|
+
/**
|
|
2934
|
+
* Generate a GraphQL schema for a document model.
|
|
2935
|
+
*
|
|
2936
|
+
* @param documentModel - The document model global state
|
|
2937
|
+
* @param options - Schema generation options
|
|
2938
|
+
* @returns GraphQL DocumentNode
|
|
2939
|
+
*/
|
|
2940
|
+
declare function generateDocumentModelSchema(documentModel: DocumentModelGlobalState$1, options?: DocumentModelSchemaOptions): DocumentNode;
|
|
2941
|
+
//#endregion
|
|
2942
|
+
export { ADMIN_USERS, API, Action, ActionContext, ActionContextInput, ActionContextInputSchema, ActionContextResolvers, ActionInput, ActionInputSchema, ActionResolvers, AddChildrenDocument, AddChildrenMutation, AddChildrenMutationVariables, AnalyticsSubgraph, Attachment, AttachmentInput, AttachmentInputSchema, AttachmentResolvers, AuthConfig, AuthContext, AuthFetchMiddleware, AuthService, AuthSubgraph, BaseSubgraph, ChannelMeta, ChannelMetaInput, ChannelMetaInputSchema, ChannelMetaResolvers, Context, CreateDocumentDocument, CreateDocumentMutation, CreateDocumentMutationVariables, CreateEmptyDocumentDocument, CreateEmptyDocumentMutation, CreateEmptyDocumentMutationVariables, DateTimeScalarConfig, DeadLetterInfo, DeadLetterInfoResolvers, DeleteDocumentDocument, DeleteDocumentMutation, DeleteDocumentMutationVariables, DeleteDocumentsDocument, DeleteDocumentsMutation, DeleteDocumentsMutationVariables, DirectiveResolverFn, DocumentChangeContext, DocumentChangeContextResolvers, DocumentChangeEvent, DocumentChangeEventResolvers, DocumentChangeType, DocumentChangeTypeSchema, DocumentChangesDocument, DocumentChangesSubscription, DocumentChangesSubscriptionVariables, DocumentGroupPermissionEntry, DocumentGroupPermissionTable, DocumentModelGlobalState, DocumentModelGlobalStateResolvers, DocumentModelResultPage, DocumentModelResultPageResolvers, DocumentModelSchemaOptions, DocumentOperationsFilterInput, DocumentOperationsFilterInputSchema, DocumentPermissionConfig, DocumentPermissionDatabase, DocumentPermissionEntry, DocumentPermissionLevel, DocumentPermissionService, DocumentPermissionTable, DocumentProtectionTable, DocumentWithChildren, DocumentWithChildrenResolvers, Exact, FetchHandler, FindDocumentsDocument, FindDocumentsQuery, FindDocumentsQueryVariables, GatewayAdapterType, GatewayContextFactory, GetDocumentChildrenDocument, GetDocumentChildrenQuery, GetDocumentChildrenQueryVariables, GetDocumentDocument, GetDocumentModelsDocument, GetDocumentModelsQuery, GetDocumentModelsQueryVariables, GetDocumentOperationsDocument, GetDocumentOperationsQuery, GetDocumentOperationsQueryVariables, GetDocumentParentsDocument, GetDocumentParentsQuery, GetDocumentParentsQueryVariables, GetDocumentQuery, GetDocumentQueryVariables, GetDocumentWithOperationsDocument, GetDocumentWithOperationsQuery, GetDocumentWithOperationsQueryVariables, GetJobStatusDocument, GetJobStatusQuery, GetJobStatusQueryVariables, GetParentIdsFn, GqlDocument, GqlDriveDocument, GqlOperation, GqlOperationContext, GqlSigner, GqlSignerApp, GqlSignerUser, GraphQLManager, GraphqlManagerFeatureFlags, Group, GroupTable, HttpAdapterSetup, HttpAdapterType, HttpDocumentModelLoader, HttpPackageLoader, HttpPackageLoaderLogger, HttpPackageLoaderOptions, IGatewayAdapter, IHttpAdapter, type IPackageLoader, type IPackageLoaderOptions, IPackageStorage, ISubgraph, ImportPackageLoader, InMemoryPackageStorage, Incremental, InputMaybe, InstallPackageResult, InstalledPackageInfo, IsTypeOfResolverFn, JobChangeEvent, JobChangeEventResolvers, JobChangesDocument, JobChangesSubscription, JobChangesSubscriptionVariables, JobInfo, JobInfoResolvers, JsonObjectScalarConfig, MakeEmpty, MakeMaybe, MakeOptional, Maybe, MoveChildrenDocument, MoveChildrenMutation, MoveChildrenMutationVariables, MoveChildrenResult, MoveChildrenResultResolvers, MutateDocumentAsyncDocument, MutateDocumentAsyncMutation, MutateDocumentAsyncMutationVariables, MutateDocumentDocument, MutateDocumentMutation, MutateDocumentMutationVariables, Mutation, MutationAddChildrenArgs, MutationCreateDocumentArgs, MutationCreateEmptyDocumentArgs, MutationDeleteDocumentArgs, MutationDeleteDocumentsArgs, MutationMoveChildrenArgs, MutationMutateDocumentArgs, MutationMutateDocumentAsyncArgs, MutationPushSyncEnvelopesArgs, MutationRemoveChildrenArgs, MutationRenameDocumentArgs, MutationResolvers, MutationTouchChannelArgs, NextResolverFn, OperationContext, OperationContextInput, OperationContextInputSchema, OperationContextResolvers, OperationGroupPermissionEntry, OperationGroupPermissionTable, OperationInput, OperationInputSchema, OperationUserPermissionEntry, OperationUserPermissionTable, OperationWithContext, OperationWithContextInput, OperationWithContextInputSchema, OperationWithContextResolvers, OperationsFilterInput, OperationsFilterInputSchema, PackageManagementService, PackageManagementServiceOptions, PackageManager, PackagesSubgraph, type PackagesSubgraphArgs, PagingInput, PagingInputSchema, type ParsedDriveUrl, PhDocument, PhDocumentFieldsFragment, PhDocumentFieldsFragmentDoc, PhDocumentOperationsArgs, PhDocumentResolvers, PhDocumentResultPage, PhDocumentResultPageResolvers, PollSyncEnvelopesDocument, PollSyncEnvelopesQuery, PollSyncEnvelopesQueryVariables, PollSyncEnvelopesResult, PollSyncEnvelopesResultResolvers, Processor, ProcessorDriveFactory, ProcessorFactoryBuilder, PropagationMode, PropagationModeSchema, PushSyncEnvelopesDocument, PushSyncEnvelopesMutation, PushSyncEnvelopesMutationVariables, Query, QueryDocumentArgs, QueryDocumentChildrenArgs, QueryDocumentModelsArgs, QueryDocumentOperationsArgs, QueryDocumentParentsArgs, QueryFindDocumentsArgs, QueryJobStatusArgs, QueryPollSyncEnvelopesArgs, QueryResolvers, ReactorModule, ReactorOperation, ReactorOperationResolvers, ReactorOperationResultPage, ReactorOperationResultPageResolvers, ReactorSigner, ReactorSignerApp, ReactorSignerAppInput, ReactorSignerAppInputSchema, ReactorSignerAppResolvers, ReactorSignerInput, ReactorSignerInputSchema, ReactorSignerResolvers, ReactorSignerUser, ReactorSignerUserInput, ReactorSignerUserInputSchema, ReactorSignerUserResolvers, ReactorSubgraph, RemoteCursor, RemoteCursorInput, RemoteCursorInputSchema, RemoteCursorResolvers, RemoteFilterInput, RemoteFilterInputSchema, RemoveChildrenDocument, RemoveChildrenMutation, RemoveChildrenMutationVariables, RenameDocumentDocument, RenameDocumentMutation, RenameDocumentMutationVariables, Requester, RequireFields, Resolver, ResolverFn, ResolverTypeWrapper, ResolverWithResolve, Resolvers, ResolversObject, ResolversParentTypes, ResolversTypes, Revision, RevisionResolvers, Scalars, Sdk, SearchFilterInput, SearchFilterInputSchema, SubgraphArgs, SubgraphClass, SubgraphDefinition, Subscription, SubscriptionDocumentChangesArgs, SubscriptionJobChangesArgs, SubscriptionObject, SubscriptionResolveFn, SubscriptionResolver, SubscriptionResolverObject, SubscriptionResolvers, SubscriptionSubscribeFn, SubscriptionSubscriberObject, SyncEnvelope, SyncEnvelopeInput, SyncEnvelopeInputSchema, SyncEnvelopeResolvers, SyncEnvelopeType, SyncEnvelopeTypeSchema, TlsOptions, TouchChannelDocument, TouchChannelInput, TouchChannelInputSchema, TouchChannelMutation, TouchChannelMutationVariables, TouchChannelResult, TouchChannelResultResolvers, TypeResolveFn, User, UserGroupTable, ViewFilterInput, ViewFilterInputSchema, WithIndex, WsContextFactory, WsDisposer, buildGraphQlDocument, buildGraphQlDriveDocument, buildGraphqlOperation, buildGraphqlOperations, buildSubgraphSchemaModule, createAuthFetchMiddleware, createGatewayAdapter, createHttpAdapter, createMergedSchema, createReactorGraphQLClient, createSchema, definedNonNullAnySchema, driveIdFromUrl, generateDocumentModelSchema, getAuthContext, getDbClient, getDocumentModelSchemaName, getDocumentModelTypeDefs, getSdk, getUniqueDocumentModels, initAnalyticsStoreSql, initTracing, initializeAndStartAPI, isDefinedNonNullAny, isSubgraphClass, isTracingEnabled, parseDriveUrl, renderGraphqlPlayground, trace };
|
|
2943
|
+
//# sourceMappingURL=index.d.mts.map
|