@party-stack/ontology-server 0.0.0-stage → 0.11.1

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.
Files changed (93) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +493 -2
  3. package/lib/attachmentHttp.d.ts +15 -0
  4. package/lib/attachmentHttp.d.ts.map +1 -0
  5. package/lib/attachmentHttp.js +235 -0
  6. package/lib/attachmentHttp.js.map +1 -0
  7. package/lib/attachmentTransfers.d.ts +115 -0
  8. package/lib/attachmentTransfers.d.ts.map +1 -0
  9. package/lib/attachmentTransfers.js +208 -0
  10. package/lib/attachmentTransfers.js.map +1 -0
  11. package/lib/authorization.d.ts +21 -0
  12. package/lib/authorization.d.ts.map +1 -0
  13. package/lib/authorization.js +385 -0
  14. package/lib/authorization.js.map +1 -0
  15. package/lib/bindingFence.d.ts +27 -0
  16. package/lib/bindingFence.d.ts.map +1 -0
  17. package/lib/bindingFence.js +39 -0
  18. package/lib/bindingFence.js.map +1 -0
  19. package/lib/composition.d.ts +467 -0
  20. package/lib/composition.d.ts.map +1 -0
  21. package/lib/composition.js +102 -0
  22. package/lib/composition.js.map +1 -0
  23. package/lib/definitionProjection.d.ts +21 -0
  24. package/lib/definitionProjection.d.ts.map +1 -0
  25. package/lib/definitionProjection.js +441 -0
  26. package/lib/definitionProjection.js.map +1 -0
  27. package/lib/errorProjection.d.ts +22 -0
  28. package/lib/errorProjection.d.ts.map +1 -0
  29. package/lib/errorProjection.js +72 -0
  30. package/lib/errorProjection.js.map +1 -0
  31. package/lib/http.d.ts +23 -0
  32. package/lib/http.d.ts.map +1 -0
  33. package/lib/http.js +17 -0
  34. package/lib/http.js.map +1 -0
  35. package/lib/index.d.ts +5 -0
  36. package/lib/index.js +3 -0
  37. package/lib/internalAccess.d.ts +10 -0
  38. package/lib/internalAccess.d.ts.map +1 -0
  39. package/lib/internalAccess.js +18 -0
  40. package/lib/internalAccess.js.map +1 -0
  41. package/lib/operations.d.ts +1265 -0
  42. package/lib/operations.d.ts.map +1 -0
  43. package/lib/operations.js +621 -0
  44. package/lib/operations.js.map +1 -0
  45. package/lib/policyDefinition.d.ts +19 -0
  46. package/lib/policyDefinition.d.ts.map +1 -0
  47. package/lib/policyDefinition.js +226 -0
  48. package/lib/policyDefinition.js.map +1 -0
  49. package/lib/policyWatches.d.ts +17 -0
  50. package/lib/policyWatches.d.ts.map +1 -0
  51. package/lib/policyWatches.js +49 -0
  52. package/lib/policyWatches.js.map +1 -0
  53. package/lib/receiptPolicy.d.ts +12 -0
  54. package/lib/receiptPolicy.d.ts.map +1 -0
  55. package/lib/receiptPolicy.js +63 -0
  56. package/lib/receiptPolicy.js.map +1 -0
  57. package/lib/replicaBootstrap.d.ts +56 -0
  58. package/lib/replicaBootstrap.d.ts.map +1 -0
  59. package/lib/replicaBootstrap.js +60 -0
  60. package/lib/replicaBootstrap.js.map +1 -0
  61. package/lib/routing.d.ts +87 -0
  62. package/lib/routing.d.ts.map +1 -0
  63. package/lib/routing.js +344 -0
  64. package/lib/routing.js.map +1 -0
  65. package/lib/rpc.d.ts +4799 -0
  66. package/lib/rpc.d.ts.map +1 -0
  67. package/lib/rpc.js +575 -0
  68. package/lib/rpc.js.map +1 -0
  69. package/lib/rpcActivity.d.ts +6 -0
  70. package/lib/rpcActivity.d.ts.map +1 -0
  71. package/lib/rpcActivity.js +8 -0
  72. package/lib/rpcActivity.js.map +1 -0
  73. package/lib/rpcBackend.d.ts +8 -0
  74. package/lib/rpcBackend.d.ts.map +1 -0
  75. package/lib/rpcBackend.js +76 -0
  76. package/lib/rpcBackend.js.map +1 -0
  77. package/lib/rpcHttp.d.ts +24 -0
  78. package/lib/rpcHttp.d.ts.map +1 -0
  79. package/lib/rpcHttp.js +118 -0
  80. package/lib/rpcHttp.js.map +1 -0
  81. package/lib/rpcLocal.d.ts +13 -0
  82. package/lib/rpcLocal.d.ts.map +1 -0
  83. package/lib/rpcLocal.js +26 -0
  84. package/lib/rpcLocal.js.map +1 -0
  85. package/lib/rpcWatch.d.ts +9 -0
  86. package/lib/rpcWatch.d.ts.map +1 -0
  87. package/lib/rpcWatch.js +29 -0
  88. package/lib/rpcWatch.js.map +1 -0
  89. package/lib/rpcWorker.d.ts +38 -0
  90. package/lib/rpcWorker.d.ts.map +1 -0
  91. package/lib/rpcWorker.js +192 -0
  92. package/lib/rpcWorker.js.map +1 -0
  93. package/package.json +53 -3
@@ -0,0 +1,1265 @@
1
+ import { Attachment, AttachmentTransferPolicy, AttachmentUpload, AttachmentValue, Target } from "./attachmentTransfers.js";
2
+ import { ErrorProjectionOptions } from "./errorProjection.js";
3
+ import { BackendError } from "@party-stack/ontology-backend";
4
+ import { ActionRequestSchema } from "@party-stack/ontology-backend/protocol";
5
+ import { ByteInput, ByteSource, ReadableByteInput } from "@party-stack/ontology-storage/blobs";
6
+ import { Effect, Layer, Queue, Schema, Scope, Stream } from "effect";
7
+ import { Rpc, RpcGroup } from "effect/rpc";
8
+ import { AttachmentCreateOptions, PinOptionsSchema, ReplicaPinControls, ReplicaService } from "@party-stack/ontology-replica";
9
+ import { QueryDocumentSchema } from "@party-stack/ontology-spec/effect";
10
+ import { ObjectSubset } from "@party-stack/ontology-spec/query";
11
+ import { Headers } from "effect/http/Headers";
12
+ import { attachment } from "@party-stack/ontology-spec/values";
13
+ import { TraceStore } from "@party-stack/runtime/tracing";
14
+ //#region src/operations.d.ts
15
+ declare const Metadata: Schema.Struct<{
16
+ readonly size: Schema.optional<Schema.Number>;
17
+ readonly type: Schema.optional<Schema.String>;
18
+ readonly name: Schema.optional<Schema.String>;
19
+ readonly dimensions: Schema.optional<Schema.Struct<{
20
+ readonly width: Schema.Number;
21
+ readonly height: Schema.Number;
22
+ }>>;
23
+ }>;
24
+ export declare const OntologyOperationRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"ApplyAction", Schema.Codec<{
25
+ readonly id: string;
26
+ readonly name: string;
27
+ readonly parameters: {
28
+ readonly [x: string]: unknown;
29
+ };
30
+ readonly replay?: {
31
+ readonly now: string;
32
+ readonly seed: string;
33
+ } | undefined;
34
+ }, string, never, never>, Schema.Struct<{
35
+ readonly operationId: Schema.String;
36
+ readonly outcome: Schema.Literal<"committed">;
37
+ readonly result: Schema.optional<Schema.Unknown>;
38
+ readonly cursor: Schema.optional<Schema.String>;
39
+ readonly providerOperationId: Schema.optional<Schema.String>;
40
+ readonly affected: Schema.optional<Schema.$Array<Schema.Struct<{
41
+ readonly objectType: Schema.String;
42
+ readonly keys: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite]>>>;
43
+ }>>>;
44
+ readonly affectedComplete: Schema.optional<Schema.Boolean>;
45
+ readonly attachmentIdMappings: Schema.optional<Schema.$Array<Schema.Struct<{
46
+ readonly localId: Schema.String;
47
+ readonly remoteId: Schema.String;
48
+ }>>>;
49
+ }>, typeof BackendError, never, never> | Rpc.Rpc<"AttachmentMetadata", Schema.Struct<{
50
+ readonly attachment: Schema.Struct<{
51
+ readonly id: Schema.NonEmptyString;
52
+ readonly type: Schema.optional<Schema.String>;
53
+ readonly source: Schema.optional<Schema.Struct<{
54
+ readonly objectType: Schema.String;
55
+ readonly primaryKey: Schema.Union<readonly [Schema.String, Schema.Number]>;
56
+ readonly property: Schema.String;
57
+ }>>;
58
+ }>;
59
+ readonly select: Schema.optional<Schema.$Array<Schema.Literals<readonly ["size", "type", "name", "dimensions"]>>>;
60
+ }>, Schema.Struct<{
61
+ readonly size: Schema.optional<Schema.Number>;
62
+ readonly type: Schema.optional<Schema.String>;
63
+ readonly name: Schema.optional<Schema.String>;
64
+ readonly dimensions: Schema.optional<Schema.Struct<{
65
+ readonly width: Schema.Number;
66
+ readonly height: Schema.Number;
67
+ }>>;
68
+ }>, typeof BackendError, never, never> | Rpc.Rpc<"ClearPin", Schema.Void, Schema.Void, typeof BackendError, never, never> | Rpc.Rpc<"ControlOutbox", Schema.Codec<{
69
+ readonly operation: "edit" | "remove" | "retry";
70
+ readonly id: string;
71
+ readonly invocation?: {
72
+ readonly id: string;
73
+ readonly name: string;
74
+ readonly parameters: {
75
+ readonly [x: string]: unknown;
76
+ };
77
+ readonly replay?: {
78
+ readonly now: string;
79
+ readonly seed: string;
80
+ } | undefined;
81
+ } | undefined;
82
+ readonly allowUnknownOutcome?: boolean | undefined;
83
+ }, string, never, never>, Schema.Void, typeof BackendError, never, never> | Rpc.Rpc<"CreateAttachment", Schema.Struct<{
84
+ readonly size: Schema.optional<Schema.Int>;
85
+ readonly type: Schema.String;
86
+ readonly name: Schema.optional<Schema.String>;
87
+ readonly id: Schema.optional<Schema.NonEmptyString>;
88
+ readonly target: Schema.optional<Schema.Union<readonly [Schema.Struct<{
89
+ readonly kind: Schema.Literal<"objectProperty">;
90
+ readonly objectType: Schema.String;
91
+ readonly property: Schema.String;
92
+ }>, Schema.Struct<{
93
+ readonly kind: Schema.Literal<"actionParameter">;
94
+ readonly actionType: Schema.String;
95
+ readonly parameter: Schema.String;
96
+ }>]>>;
97
+ readonly eager: Schema.optional<Schema.Boolean>;
98
+ }>, import("effect/rpc/RpcSchema").Stream<Schema.Union<readonly [Schema.Struct<{
99
+ readonly kind: Schema.Literal<"ready">;
100
+ readonly uploadId: Schema.NonEmptyString;
101
+ }>, Schema.Struct<{
102
+ readonly kind: Schema.Literal<"complete">;
103
+ readonly attachment: Schema.Struct<{
104
+ readonly id: Schema.NonEmptyString;
105
+ readonly type: Schema.optional<Schema.String>;
106
+ readonly source: Schema.optional<Schema.Struct<{
107
+ readonly objectType: Schema.String;
108
+ readonly primaryKey: Schema.Union<readonly [Schema.String, Schema.Number]>;
109
+ readonly property: Schema.String;
110
+ }>>;
111
+ }>;
112
+ }>]>, typeof BackendError>, Schema.Never, never, never> | Rpc.Rpc<"Decrypt", Schema.Struct<{
113
+ readonly value: Schema.Struct<{
114
+ readonly ciphertext: Schema.NonEmptyString;
115
+ readonly source: Schema.optional<Schema.Struct<{
116
+ readonly objectType: Schema.NonEmptyString;
117
+ readonly primaryKey: Schema.Union<readonly [Schema.String, Schema.Finite]>;
118
+ readonly property: Schema.NonEmptyString;
119
+ }>>;
120
+ }>;
121
+ readonly cache: Schema.optional<Schema.Boolean>;
122
+ }>, Schema.Codec<{
123
+ readonly value: unknown;
124
+ readonly ciphertext?: string | undefined;
125
+ }, string, never, never>, typeof BackendError, never, never> | Rpc.Rpc<"DeleteLocalData", Schema.Void, Schema.Void, typeof BackendError, never, never> | Rpc.Rpc<"LoadSubset", Schema.Codec<ObjectSubset, string, never, never>, Schema.Codec<{
126
+ readonly fulfilledSubset?: ObjectSubset | undefined;
127
+ readonly fetchedRows?: number | undefined;
128
+ readonly pushdown?: {
129
+ readonly source: string;
130
+ readonly predicates: readonly {
131
+ readonly path: readonly number[];
132
+ readonly execution: "adapter" | "candidate" | "engine" | "source";
133
+ }[];
134
+ readonly sorting: "adapter" | "engine" | "none" | "source";
135
+ readonly pagination: "adapter" | "engine" | "none" | "source";
136
+ readonly rechecksFilter: boolean;
137
+ readonly native?: {
138
+ readonly language: string;
139
+ readonly text: string;
140
+ } | undefined;
141
+ } | undefined;
142
+ readonly rows: readonly {
143
+ readonly key: string | number;
144
+ readonly value: {
145
+ readonly [x: string]: unknown;
146
+ };
147
+ }[];
148
+ readonly complete: boolean;
149
+ readonly cursor?: string | undefined;
150
+ }, string, never, never>, typeof BackendError, never, never> | Rpc.Rpc<"PullChanges", Schema.Struct<{
151
+ readonly cursor: Schema.optional<Schema.String>;
152
+ readonly limit: Schema.optional<Schema.Int>;
153
+ }>, Schema.Codec<{
154
+ readonly commits: readonly {
155
+ readonly cursor: string;
156
+ readonly changes: readonly ({
157
+ readonly kind: "put";
158
+ readonly objectType: string;
159
+ readonly key: string | number;
160
+ readonly value: {
161
+ readonly [x: string]: unknown;
162
+ };
163
+ } | {
164
+ readonly kind: "delete";
165
+ readonly objectType: string;
166
+ readonly key: string | number;
167
+ })[];
168
+ readonly operationId?: string | undefined;
169
+ }[];
170
+ readonly cursor: string;
171
+ readonly hasMore: boolean;
172
+ }, string, never, never>, typeof BackendError, never, never> | Rpc.Rpc<"Query", Schema.Codec<{
173
+ readonly document: import("@party-stack/ontology-spec").QueryDocument;
174
+ readonly inputs?: {
175
+ readonly [x: string]: unknown;
176
+ } | undefined;
177
+ }, string, never, never>, Schema.Codec<{
178
+ readonly [x: string]: unknown;
179
+ }, string, never, never>, typeof BackendError, never, never> | Rpc.Rpc<"QueryFunction", Schema.Codec<{
180
+ readonly name: string;
181
+ readonly parameters: {
182
+ readonly [x: string]: unknown;
183
+ };
184
+ }, string, never, never>, Schema.Codec<unknown, string, never, never>, typeof BackendError, never, never> | Rpc.Rpc<"ReadAttachment", Schema.Struct<{
185
+ readonly id: Schema.NonEmptyString;
186
+ readonly type: Schema.optional<Schema.String>;
187
+ readonly source: Schema.optional<Schema.Struct<{
188
+ readonly objectType: Schema.String;
189
+ readonly primaryKey: Schema.Union<readonly [Schema.String, Schema.Number]>;
190
+ readonly property: Schema.String;
191
+ }>>;
192
+ }>, import("effect/rpc/RpcSchema").Stream<Schema.Union<readonly [Schema.Struct<{
193
+ readonly kind: Schema.Literal<"metadata">;
194
+ readonly type: Schema.String;
195
+ readonly size: Schema.optional<Schema.Int>;
196
+ readonly name: Schema.optional<Schema.String>;
197
+ }>, Schema.Struct<{
198
+ readonly kind: Schema.Literal<"bytes">;
199
+ readonly bytes: Schema.Uint8ArrayFromBase64;
200
+ }>]>, typeof BackendError>, Schema.Never, never, never> | Rpc.Rpc<"ReadPin", Schema.Void, Schema.Codec<{
201
+ readonly query: import("@party-stack/ontology-spec").QueryDocument;
202
+ readonly inputs?: {
203
+ readonly [x: string]: unknown;
204
+ } | undefined;
205
+ readonly attachments: "all" | "none";
206
+ readonly ready: boolean;
207
+ readonly previousGraphRetained: boolean;
208
+ readonly retainedGraph?: {
209
+ readonly query: import("@party-stack/ontology-spec").QueryDocument;
210
+ readonly inputs?: {
211
+ readonly [x: string]: unknown;
212
+ } | undefined;
213
+ readonly attachments: "all" | "none";
214
+ } | undefined;
215
+ readonly error?: {
216
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
217
+ readonly message: string;
218
+ } | undefined;
219
+ } | undefined, string, never, never>, typeof BackendError, never, never> | Rpc.Rpc<"ReleaseOwner", Schema.Void, Schema.Void, typeof BackendError, never, never> | Rpc.Rpc<"ReplicaStatus", Schema.Void, import("effect/rpc/RpcSchema").Stream<Schema.Codec<{
220
+ readonly capacity?: {
221
+ readonly memory?: {
222
+ readonly scope: "database" | "filesystem" | "isolate" | "origin" | "process";
223
+ readonly usedBytes?: number | undefined;
224
+ readonly limitBytes?: number | undefined;
225
+ readonly availableBytes?: number | undefined;
226
+ } | undefined;
227
+ readonly storage?: {
228
+ readonly scope: "database" | "filesystem" | "isolate" | "origin" | "process";
229
+ readonly usedBytes?: number | undefined;
230
+ readonly limitBytes?: number | undefined;
231
+ readonly availableBytes?: number | undefined;
232
+ } | undefined;
233
+ readonly memoryError?: string | undefined;
234
+ readonly storageError?: string | undefined;
235
+ } | undefined;
236
+ readonly cache?: {
237
+ readonly attachments?: {
238
+ readonly bytes: number;
239
+ readonly maxBytes?: number | undefined;
240
+ readonly targetBytes?: number | undefined;
241
+ } | undefined;
242
+ readonly objects: {
243
+ readonly byObjectType?: readonly {
244
+ readonly objectType: string;
245
+ readonly bytes: number;
246
+ }[] | undefined;
247
+ readonly bytes: number;
248
+ readonly maxBytes?: number | undefined;
249
+ readonly targetBytes?: number | undefined;
250
+ };
251
+ } | undefined;
252
+ readonly pin?: {
253
+ readonly ready: boolean;
254
+ readonly previousGraphRetained: boolean;
255
+ readonly error?: {
256
+ readonly kind: string;
257
+ readonly message: string;
258
+ } | undefined;
259
+ } | undefined;
260
+ readonly sourceId: string;
261
+ readonly upstreamId: string;
262
+ readonly mode: "adapter" | "protocol";
263
+ readonly networkOnline: boolean;
264
+ readonly authentication?: {
265
+ readonly status: "pending";
266
+ } | {
267
+ readonly status: "active";
268
+ readonly expiration?: {
269
+ readonly expiresAt: number;
270
+ readonly refreshable: boolean;
271
+ } | undefined;
272
+ } | {
273
+ readonly status: "inactive";
274
+ } | {
275
+ readonly status: "needs-auth";
276
+ readonly error?: string | undefined;
277
+ } | {
278
+ readonly status: "error";
279
+ readonly error: string;
280
+ } | undefined;
281
+ readonly watchError?: {
282
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
283
+ readonly message: string;
284
+ readonly retryable: boolean;
285
+ } | undefined;
286
+ readonly replicationError?: {
287
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
288
+ readonly message: string;
289
+ readonly recovery: "reconnect" | "session" | "snapshot" | "stop";
290
+ } | undefined;
291
+ readonly syncing: boolean;
292
+ readonly lastSync?: {
293
+ readonly startedAt: number;
294
+ readonly finishedAt: number;
295
+ readonly outcome: "failure" | "interrupted" | "success";
296
+ readonly error?: {
297
+ readonly kind: string;
298
+ readonly message: string;
299
+ } | undefined;
300
+ } | undefined;
301
+ readonly demands: readonly {
302
+ readonly objectType: string;
303
+ readonly query?: import("@party-stack/ontology-storage").Query | undefined;
304
+ readonly references: number;
305
+ readonly idleUntil?: number | undefined;
306
+ readonly watchers: number;
307
+ readonly loadError?: {
308
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
309
+ readonly message: string;
310
+ readonly retryable: boolean;
311
+ } | undefined;
312
+ readonly watchError?: {
313
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
314
+ readonly message: string;
315
+ readonly retryable: boolean;
316
+ } | undefined;
317
+ readonly revision: number;
318
+ readonly installed: number;
319
+ readonly coveredBy?: {
320
+ readonly objectType: string;
321
+ readonly query?: import("@party-stack/ontology-storage").Query | undefined;
322
+ } | undefined;
323
+ readonly coverageProof?: {
324
+ readonly reason: "collection" | "primary-key" | "query";
325
+ readonly maintainedBy: "journal" | "poll" | "snapshot" | "watch";
326
+ readonly pollIntervalMs?: number | undefined;
327
+ } | undefined;
328
+ }[];
329
+ readonly outbox: {
330
+ readonly [x: string]: number;
331
+ };
332
+ readonly loads: readonly {
333
+ readonly id: number;
334
+ readonly spanId?: string | undefined;
335
+ readonly traceId?: string | undefined;
336
+ readonly operation: "loadSubset" | "pullChanges";
337
+ readonly reason: "demand" | "journal" | "receipt" | "refresh" | "repair";
338
+ readonly subset?: {
339
+ readonly objectType: string;
340
+ readonly query?: import("@party-stack/ontology-storage").Query | undefined;
341
+ } | undefined;
342
+ readonly startedAt: number;
343
+ readonly finishedAt?: number | undefined;
344
+ readonly outcome: "failure" | "interrupted" | "running" | "success";
345
+ readonly rows?: number | undefined;
346
+ readonly fetchedRows?: number | undefined;
347
+ readonly pushdown?: {
348
+ readonly source: string;
349
+ readonly predicates: readonly {
350
+ readonly path: readonly number[];
351
+ readonly execution: "adapter" | "candidate" | "engine" | "source";
352
+ }[];
353
+ readonly sorting: "adapter" | "engine" | "none" | "source";
354
+ readonly pagination: "adapter" | "engine" | "none" | "source";
355
+ readonly rechecksFilter: boolean;
356
+ readonly native?: {
357
+ readonly language: string;
358
+ readonly text: string;
359
+ } | undefined;
360
+ } | undefined;
361
+ readonly commits?: number | undefined;
362
+ readonly complete?: boolean | undefined;
363
+ readonly error?: {
364
+ readonly kind: string;
365
+ readonly message: string;
366
+ } | undefined;
367
+ }[];
368
+ readonly loadCount: number;
369
+ }, string, never, never>, typeof BackendError>, Schema.Never, never, never> | Rpc.Rpc<"ResolveActionParameters", Schema.Codec<{
370
+ readonly name: string;
371
+ readonly parameters: {
372
+ readonly [x: string]: unknown;
373
+ };
374
+ }, string, never, never>, Schema.Codec<{
375
+ readonly [x: string]: unknown;
376
+ }, string, never, never>, typeof BackendError, never, never> | Rpc.Rpc<"SetPin", Schema.Struct<{
377
+ query: Schema.Codec<import("@party-stack/ontology-spec").QueryDocument, string, never, never>;
378
+ options: Schema.optional<Schema.Codec<{
379
+ readonly inputs?: {
380
+ readonly [x: string]: unknown;
381
+ } | undefined;
382
+ readonly attachments?: "all" | "none" | undefined;
383
+ }, string, never, never>>;
384
+ }>, Schema.Void, typeof BackendError, never, never> | Rpc.Rpc<"Traces", Schema.Void, import("effect/rpc/RpcSchema").Stream<Schema.$Array<Schema.Struct<{
385
+ readonly id: Schema.String;
386
+ readonly traceId: Schema.String;
387
+ readonly parentId: Schema.optional<Schema.String>;
388
+ readonly name: Schema.String;
389
+ readonly startedAt: Schema.Number;
390
+ readonly durationMs: Schema.Number;
391
+ readonly outcome: Schema.Literals<readonly ["running", "success", "failure", "interrupted"]>;
392
+ readonly error: Schema.optional<Schema.Struct<{
393
+ readonly kind: Schema.Literals<readonly ["Error", "Defect"]>;
394
+ readonly message: Schema.String;
395
+ }>>;
396
+ readonly events: Schema.optional<Schema.$Array<Schema.Struct<{
397
+ readonly name: Schema.String;
398
+ readonly at: Schema.Number;
399
+ readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
400
+ }>>>;
401
+ readonly eventCount: Schema.optional<Schema.Number>;
402
+ readonly attributes: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>>;
403
+ }>>, typeof BackendError>, Schema.Never, never, never> | Rpc.Rpc<"ValidateAction", Schema.Codec<{
404
+ readonly name: string;
405
+ readonly parameters: {
406
+ readonly [x: string]: unknown;
407
+ };
408
+ readonly knownParameters?: readonly string[] | undefined;
409
+ }, string, never, never>, Schema.Codec<{
410
+ readonly certain: false;
411
+ } | {
412
+ readonly certain: true;
413
+ readonly value: {
414
+ readonly kind: "ok";
415
+ readonly value: void;
416
+ } | {
417
+ readonly kind: "err";
418
+ readonly value: readonly {
419
+ readonly message: string;
420
+ readonly path?: readonly (string | number)[] | undefined;
421
+ readonly code?: string | undefined;
422
+ readonly category?: "custom" | "input" | "reference" | undefined;
423
+ readonly source?: "parameter" | "submission" | "user-facing" | undefined;
424
+ readonly messageSource?: "configured" | "standard" | undefined;
425
+ }[];
426
+ };
427
+ }, string, never, never>, typeof BackendError, never, never> | Rpc.Rpc<"WatchChanges", Schema.Void, import("effect/rpc/RpcSchema").Stream<Schema.Literal<"invalidate">, typeof BackendError>, Schema.Never, never, never> | Rpc.Rpc<"WatchPin", Schema.Void, import("effect/rpc/RpcSchema").Stream<Schema.Codec<{
428
+ readonly query: import("@party-stack/ontology-spec").QueryDocument;
429
+ readonly inputs?: {
430
+ readonly [x: string]: unknown;
431
+ } | undefined;
432
+ readonly attachments: "all" | "none";
433
+ readonly ready: boolean;
434
+ readonly previousGraphRetained: boolean;
435
+ readonly retainedGraph?: {
436
+ readonly query: import("@party-stack/ontology-spec").QueryDocument;
437
+ readonly inputs?: {
438
+ readonly [x: string]: unknown;
439
+ } | undefined;
440
+ readonly attachments: "all" | "none";
441
+ } | undefined;
442
+ readonly error?: {
443
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
444
+ readonly message: string;
445
+ } | undefined;
446
+ } | undefined, string, never, never>, typeof BackendError>, Schema.Never, never, never> | Rpc.Rpc<"WatchSubset", Schema.Codec<ObjectSubset, string, never, never>, import("effect/rpc/RpcSchema").Stream<Schema.Literals<readonly ["reset", "invalidate"]>, typeof BackendError>, Schema.Never, never, never> | Rpc.Rpc<"WriteAttachmentChunk", Schema.Struct<{
447
+ readonly uploadId: Schema.NonEmptyString;
448
+ readonly sequence: Schema.Int;
449
+ readonly bytes: Schema.Uint8ArrayFromBase64;
450
+ readonly end: Schema.Boolean;
451
+ }>, Schema.Void, typeof BackendError, never, never>>;
452
+ export type OntologyOperationRequest = {
453
+ readonly operation: "Query";
454
+ readonly document: import("@party-stack/ontology-spec").QueryDocument;
455
+ readonly inputs?: Record<string, unknown>;
456
+ } | {
457
+ readonly operation: "WatchChanges";
458
+ } | {
459
+ readonly operation: "PullChanges";
460
+ readonly cursor?: string;
461
+ readonly limit?: number;
462
+ } | {
463
+ readonly operation: "LoadSubset" | "WatchSubset";
464
+ readonly subset: ObjectSubset;
465
+ } | {
466
+ readonly operation: "ApplyAction";
467
+ readonly invocation: import("@party-stack/ontology-backend").ActionRequest;
468
+ } | {
469
+ readonly operation: "Decrypt";
470
+ readonly value: import("@party-stack/ontology-spec/values").Encrypted;
471
+ readonly cache?: boolean;
472
+ } | {
473
+ readonly operation: "QueryFunction" | "ValidateAction" | "ResolveActionParameters";
474
+ readonly name: string;
475
+ readonly parameters: Record<string, unknown>;
476
+ readonly knownParameters?: readonly string[];
477
+ } | {
478
+ readonly operation: "CreateAttachment";
479
+ readonly id?: string;
480
+ readonly target?: Schema.Schema.Type<typeof Target>;
481
+ readonly type: string;
482
+ readonly size?: number;
483
+ } | {
484
+ readonly operation: "ReadAttachment" | "AttachmentMetadata";
485
+ readonly attachment: Schema.Schema.Type<typeof Attachment>;
486
+ readonly select?: readonly string[];
487
+ } | {
488
+ readonly operation: "ControlOutbox";
489
+ readonly id: string;
490
+ readonly command: "remove" | "retry" | "edit";
491
+ readonly invocation?: Schema.Schema.Type<typeof ActionRequestSchema>;
492
+ } | {
493
+ readonly operation: "ReadPin" | "WatchPin" | "ClearPin";
494
+ } | {
495
+ readonly operation: "SetPin";
496
+ readonly query: Schema.Schema.Type<typeof QueryDocumentSchema>;
497
+ readonly options?: Schema.Schema.Type<typeof PinOptionsSchema>;
498
+ } | {
499
+ readonly operation: "ReplicaStatus" | "Traces" | "DeleteLocalData" | "ReleaseOwner";
500
+ };
501
+ export type OntologyOperationOptions<R = never> = ErrorProjectionOptions & {
502
+ readonly attachmentTransfers?: AttachmentTransferPolicy<R>;
503
+ readonly replica?: ReplicaService;
504
+ readonly pins?: ReplicaPinControls;
505
+ readonly traces?: TraceStore;
506
+ readonly backend?: import("@party-stack/ontology-backend").OntologyBackendService;
507
+ readonly ready?: Effect.Effect<void, BackendError, R>;
508
+ readonly deleteLocalData?: Effect.Effect<void, BackendError, R>;
509
+ readonly releaseOwner?: Effect.Effect<void, BackendError, R>;
510
+ readonly authorize: (request: OntologyOperationRequest, headers: Headers) => Effect.Effect<void, BackendError, R>;
511
+ };
512
+ /** Shared storage/application operation; transports supply framing and authorization. */
513
+ export declare const ontologyAttachmentHandlers: <R>(options: OntologyOperationOptions<R>, authorize?: OntologyOperationOptions<R>["authorize"]) => {
514
+ create: (request: AttachmentUpload, blob: import("@party-stack/ontology-storage/blobs").ByteInput) => Effect.Effect<attachment, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, R>;
515
+ read: (attachment: AttachmentValue, headers: Headers) => Effect.Effect<ByteInput, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, R | Scope.Scope>;
516
+ };
517
+ export declare const ontologyOperationHandlers: <R>(options: OntologyOperationOptions<R>, authorize?: OntologyOperationOptions<R>["authorize"]) => Layer.Layer<Rpc.Handler<"ApplyAction"> | Rpc.Handler<"AttachmentMetadata"> | Rpc.Handler<"ClearPin"> | Rpc.Handler<"ControlOutbox"> | Rpc.Handler<"CreateAttachment"> | Rpc.Handler<"Decrypt"> | Rpc.Handler<"DeleteLocalData"> | Rpc.Handler<"LoadSubset"> | Rpc.Handler<"PullChanges"> | Rpc.Handler<"Query"> | Rpc.Handler<"QueryFunction"> | Rpc.Handler<"ReadAttachment"> | Rpc.Handler<"ReadPin"> | Rpc.Handler<"ReleaseOwner"> | Rpc.Handler<"ReplicaStatus"> | Rpc.Handler<"ResolveActionParameters"> | Rpc.Handler<"SetPin"> | Rpc.Handler<"Traces"> | Rpc.Handler<"ValidateAction"> | Rpc.Handler<"WatchChanges"> | Rpc.Handler<"WatchPin"> | Rpc.Handler<"WatchSubset"> | Rpc.Handler<"WriteAttachmentChunk">, never, Exclude<Exclude<R, never>, Scope.Scope> | Exclude<Exclude<Exclude<R, Scope.Scope>, never>, Scope.Scope>>;
518
+ export interface ProtocolAttachments {
519
+ readonly create: (input: ByteInput | ReadableByteInput, options?: AttachmentCreateOptions) => Effect.Effect<{
520
+ readonly attachment: attachment;
521
+ }, BackendError>;
522
+ readonly source: (attachment: attachment) => Effect.Effect<ByteSource, BackendError, Scope.Scope>;
523
+ readonly blob: (attachment: attachment) => Effect.Effect<Blob, BackendError>;
524
+ readonly metadata: (attachment: attachment, options?: {
525
+ readonly select?: readonly ("size" | "type" | "name" | "dimensions")[];
526
+ }) => Effect.Effect<Schema.Schema.Type<typeof Metadata>, BackendError>;
527
+ }
528
+ export interface OntologyOperationsClient {
529
+ readonly query: (document: import("@party-stack/ontology-spec").QueryDocument, inputs?: Record<string, unknown>) => Effect.Effect<Record<string, unknown>, BackendError>;
530
+ /** Portable plaintext; the view decodes it against its ontology definition. Cache policy runs at the owner. */
531
+ readonly decrypt: (value: import("@party-stack/ontology-spec/values").Encrypted, options?: {
532
+ cache?: boolean;
533
+ }) => Effect.Effect<unknown, BackendError>;
534
+ readonly queryFunction: (name: string, parameters: Record<string, unknown>) => Effect.Effect<unknown, BackendError>;
535
+ readonly resolveActionParameters: (name: string, parameters: Record<string, unknown>) => Effect.Effect<Record<string, unknown>, BackendError>;
536
+ readonly validate: (name: string, parameters: Record<string, unknown>, knownParameters?: readonly string[]) => Effect.Effect<import("@party-stack/ontology-backend").ValidationReport, BackendError>;
537
+ readonly attachments: ProtocolAttachments;
538
+ readonly outbox: Pick<import("@party-stack/ontology-replica").ReplicaService["outbox"], "remove" | "retry" | "edit">;
539
+ readonly traces: TraceStore;
540
+ readonly replicaMonitor: import("@party-stack/ontology-replica").ReplicaMonitor;
541
+ readonly pins: ReplicaPinControls;
542
+ readonly deleteLocalData: Effect.Effect<void, BackendError>;
543
+ readonly releaseOwner: Effect.Effect<void, BackendError>;
544
+ }
545
+ export declare const makeOntologyOperationsClient: (client: {
546
+ readonly ApplyAction: <const AsQueue extends boolean = false, const Discard = false>(input: unknown, options?: {
547
+ readonly headers?: import("effect/http/Headers").Input | undefined;
548
+ readonly context?: import("effect/Context").Context<never> | undefined;
549
+ readonly discard?: Discard | undefined;
550
+ } | undefined) => Effect.Effect<Discard extends true ? void : {
551
+ readonly operationId: string;
552
+ readonly outcome: "committed";
553
+ readonly result?: unknown;
554
+ readonly cursor?: string | undefined;
555
+ readonly providerOperationId?: string | undefined;
556
+ readonly affected?: readonly {
557
+ readonly objectType: string;
558
+ readonly keys?: readonly (string | number)[] | undefined;
559
+ }[] | undefined;
560
+ readonly affectedComplete?: boolean | undefined;
561
+ readonly attachmentIdMappings?: readonly {
562
+ readonly localId: string;
563
+ readonly remoteId: string;
564
+ }[] | undefined;
565
+ }, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
566
+ readonly AttachmentMetadata: <const AsQueue extends boolean = false, const Discard = false>(input: {
567
+ readonly attachment: {
568
+ readonly id: string;
569
+ readonly type?: string | undefined;
570
+ readonly source?: {
571
+ readonly objectType: string;
572
+ readonly primaryKey: string | number;
573
+ readonly property: string;
574
+ } | undefined;
575
+ };
576
+ readonly select?: readonly ("dimensions" | "name" | "size" | "type")[] | undefined;
577
+ }, options?: {
578
+ readonly headers?: import("effect/http/Headers").Input | undefined;
579
+ readonly context?: import("effect/Context").Context<never> | undefined;
580
+ readonly discard?: Discard | undefined;
581
+ } | undefined) => Effect.Effect<Discard extends true ? void : {
582
+ readonly size?: number | undefined;
583
+ readonly type?: string | undefined;
584
+ readonly name?: string | undefined;
585
+ readonly dimensions?: {
586
+ readonly width: number;
587
+ readonly height: number;
588
+ } | undefined;
589
+ }, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
590
+ readonly ClearPin: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
591
+ readonly headers?: import("effect/http/Headers").Input | undefined;
592
+ readonly context?: import("effect/Context").Context<never> | undefined;
593
+ readonly discard?: Discard | undefined;
594
+ } | undefined) => Effect.Effect<Discard extends true ? void : void, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
595
+ readonly ControlOutbox: <const AsQueue extends boolean = false, const Discard = false>(input: unknown, options?: {
596
+ readonly headers?: import("effect/http/Headers").Input | undefined;
597
+ readonly context?: import("effect/Context").Context<never> | undefined;
598
+ readonly discard?: Discard | undefined;
599
+ } | undefined) => Effect.Effect<Discard extends true ? void : void, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
600
+ readonly CreateAttachment: <const AsQueue extends boolean = false, const Discard = false>(input: {
601
+ readonly size?: number | undefined;
602
+ readonly type: string;
603
+ readonly name?: string | undefined;
604
+ readonly id?: string | undefined;
605
+ readonly target?: {
606
+ readonly kind: "objectProperty";
607
+ readonly objectType: string;
608
+ readonly property: string;
609
+ } | {
610
+ readonly kind: "actionParameter";
611
+ readonly actionType: string;
612
+ readonly parameter: string;
613
+ } | undefined;
614
+ readonly eager?: boolean | undefined;
615
+ }, options?: {
616
+ readonly asQueue?: AsQueue | undefined;
617
+ readonly streamBufferSize?: number | undefined;
618
+ readonly headers?: import("effect/http/Headers").Input | undefined;
619
+ readonly context?: import("effect/Context").Context<never> | undefined;
620
+ } | undefined) => AsQueue extends true ? Effect.Effect<Queue.Dequeue<{
621
+ readonly kind: "ready";
622
+ readonly uploadId: string;
623
+ } | {
624
+ readonly kind: "complete";
625
+ readonly attachment: {
626
+ readonly id: string;
627
+ readonly type?: string | undefined;
628
+ readonly source?: {
629
+ readonly objectType: string;
630
+ readonly primaryKey: string | number;
631
+ readonly property: string;
632
+ } | undefined;
633
+ };
634
+ }, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/Cause").Done<void> | import("effect/rpc/RpcClientError").RpcClientError>, never, Scope.Scope> : Stream.Stream<{
635
+ readonly kind: "ready";
636
+ readonly uploadId: string;
637
+ } | {
638
+ readonly kind: "complete";
639
+ readonly attachment: {
640
+ readonly id: string;
641
+ readonly type?: string | undefined;
642
+ readonly source?: {
643
+ readonly objectType: string;
644
+ readonly primaryKey: string | number;
645
+ readonly property: string;
646
+ } | undefined;
647
+ };
648
+ }, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/rpc/RpcClientError").RpcClientError, never>;
649
+ readonly Decrypt: <const AsQueue extends boolean = false, const Discard = false>(input: {
650
+ readonly value: {
651
+ readonly ciphertext: string;
652
+ readonly source?: {
653
+ readonly objectType: string;
654
+ readonly primaryKey: string | number;
655
+ readonly property: string;
656
+ } | undefined;
657
+ };
658
+ readonly cache?: boolean | undefined;
659
+ }, options?: {
660
+ readonly headers?: import("effect/http/Headers").Input | undefined;
661
+ readonly context?: import("effect/Context").Context<never> | undefined;
662
+ readonly discard?: Discard | undefined;
663
+ } | undefined) => Effect.Effect<Discard extends true ? void : {
664
+ readonly value: unknown;
665
+ readonly ciphertext?: string | undefined;
666
+ }, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
667
+ readonly DeleteLocalData: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
668
+ readonly headers?: import("effect/http/Headers").Input | undefined;
669
+ readonly context?: import("effect/Context").Context<never> | undefined;
670
+ readonly discard?: Discard | undefined;
671
+ } | undefined) => Effect.Effect<Discard extends true ? void : void, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
672
+ readonly LoadSubset: <const AsQueue extends boolean = false, const Discard = false>(input: unknown, options?: {
673
+ readonly headers?: import("effect/http/Headers").Input | undefined;
674
+ readonly context?: import("effect/Context").Context<never> | undefined;
675
+ readonly discard?: Discard | undefined;
676
+ } | undefined) => Effect.Effect<Discard extends true ? void : {
677
+ readonly fulfilledSubset?: ObjectSubset | undefined;
678
+ readonly fetchedRows?: number | undefined;
679
+ readonly pushdown?: {
680
+ readonly source: string;
681
+ readonly predicates: readonly {
682
+ readonly path: readonly number[];
683
+ readonly execution: "adapter" | "candidate" | "engine" | "source";
684
+ }[];
685
+ readonly sorting: "adapter" | "engine" | "none" | "source";
686
+ readonly pagination: "adapter" | "engine" | "none" | "source";
687
+ readonly rechecksFilter: boolean;
688
+ readonly native?: {
689
+ readonly language: string;
690
+ readonly text: string;
691
+ } | undefined;
692
+ } | undefined;
693
+ readonly rows: readonly {
694
+ readonly key: string | number;
695
+ readonly value: {
696
+ readonly [x: string]: unknown;
697
+ };
698
+ }[];
699
+ readonly complete: boolean;
700
+ readonly cursor?: string | undefined;
701
+ }, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
702
+ readonly PullChanges: <const AsQueue extends boolean = false, const Discard = false>(input: {
703
+ readonly cursor?: string | undefined;
704
+ readonly limit?: number | undefined;
705
+ }, options?: {
706
+ readonly headers?: import("effect/http/Headers").Input | undefined;
707
+ readonly context?: import("effect/Context").Context<never> | undefined;
708
+ readonly discard?: Discard | undefined;
709
+ } | undefined) => Effect.Effect<Discard extends true ? void : {
710
+ readonly commits: readonly {
711
+ readonly cursor: string;
712
+ readonly changes: readonly ({
713
+ readonly kind: "put";
714
+ readonly objectType: string;
715
+ readonly key: string | number;
716
+ readonly value: {
717
+ readonly [x: string]: unknown;
718
+ };
719
+ } | {
720
+ readonly kind: "delete";
721
+ readonly objectType: string;
722
+ readonly key: string | number;
723
+ })[];
724
+ readonly operationId?: string | undefined;
725
+ }[];
726
+ readonly cursor: string;
727
+ readonly hasMore: boolean;
728
+ }, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
729
+ readonly Query: <const AsQueue extends boolean = false, const Discard = false>(input: unknown, options?: {
730
+ readonly headers?: import("effect/http/Headers").Input | undefined;
731
+ readonly context?: import("effect/Context").Context<never> | undefined;
732
+ readonly discard?: Discard | undefined;
733
+ } | undefined) => Effect.Effect<Discard extends true ? void : {
734
+ readonly [x: string]: unknown;
735
+ }, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
736
+ readonly QueryFunction: <const AsQueue extends boolean = false, const Discard = false>(input: unknown, options?: {
737
+ readonly headers?: import("effect/http/Headers").Input | undefined;
738
+ readonly context?: import("effect/Context").Context<never> | undefined;
739
+ readonly discard?: Discard | undefined;
740
+ } | undefined) => Effect.Effect<Discard extends true ? void : unknown, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
741
+ readonly ReadAttachment: <const AsQueue extends boolean = false, const Discard = false>(input: {
742
+ readonly id: string;
743
+ readonly type?: string | undefined;
744
+ readonly source?: {
745
+ readonly objectType: string;
746
+ readonly primaryKey: string | number;
747
+ readonly property: string;
748
+ } | undefined;
749
+ }, options?: {
750
+ readonly asQueue?: AsQueue | undefined;
751
+ readonly streamBufferSize?: number | undefined;
752
+ readonly headers?: import("effect/http/Headers").Input | undefined;
753
+ readonly context?: import("effect/Context").Context<never> | undefined;
754
+ } | undefined) => AsQueue extends true ? Effect.Effect<Queue.Dequeue<{
755
+ readonly kind: "metadata";
756
+ readonly type: string;
757
+ readonly size?: number | undefined;
758
+ readonly name?: string | undefined;
759
+ } | {
760
+ readonly kind: "bytes";
761
+ readonly bytes: Uint8Array<ArrayBufferLike>;
762
+ }, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/Cause").Done<void> | import("effect/rpc/RpcClientError").RpcClientError>, never, Scope.Scope> : Stream.Stream<{
763
+ readonly kind: "metadata";
764
+ readonly type: string;
765
+ readonly size?: number | undefined;
766
+ readonly name?: string | undefined;
767
+ } | {
768
+ readonly kind: "bytes";
769
+ readonly bytes: Uint8Array<ArrayBufferLike>;
770
+ }, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/rpc/RpcClientError").RpcClientError, never>;
771
+ readonly ReadPin: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
772
+ readonly headers?: import("effect/http/Headers").Input | undefined;
773
+ readonly context?: import("effect/Context").Context<never> | undefined;
774
+ readonly discard?: Discard | undefined;
775
+ } | undefined) => Effect.Effect<Discard extends true ? void : {
776
+ readonly query: import("@party-stack/ontology-spec").QueryDocument;
777
+ readonly inputs?: {
778
+ readonly [x: string]: unknown;
779
+ } | undefined;
780
+ readonly attachments: "all" | "none";
781
+ readonly ready: boolean;
782
+ readonly previousGraphRetained: boolean;
783
+ readonly retainedGraph?: {
784
+ readonly query: import("@party-stack/ontology-spec").QueryDocument;
785
+ readonly inputs?: {
786
+ readonly [x: string]: unknown;
787
+ } | undefined;
788
+ readonly attachments: "all" | "none";
789
+ } | undefined;
790
+ readonly error?: {
791
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
792
+ readonly message: string;
793
+ } | undefined;
794
+ } | undefined, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
795
+ readonly ReleaseOwner: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
796
+ readonly headers?: import("effect/http/Headers").Input | undefined;
797
+ readonly context?: import("effect/Context").Context<never> | undefined;
798
+ readonly discard?: Discard | undefined;
799
+ } | undefined) => Effect.Effect<Discard extends true ? void : void, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
800
+ readonly ReplicaStatus: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
801
+ readonly asQueue?: AsQueue | undefined;
802
+ readonly streamBufferSize?: number | undefined;
803
+ readonly headers?: import("effect/http/Headers").Input | undefined;
804
+ readonly context?: import("effect/Context").Context<never> | undefined;
805
+ } | undefined) => AsQueue extends true ? Effect.Effect<Queue.Dequeue<{
806
+ readonly capacity?: {
807
+ readonly memory?: {
808
+ readonly scope: "database" | "filesystem" | "isolate" | "origin" | "process";
809
+ readonly usedBytes?: number | undefined;
810
+ readonly limitBytes?: number | undefined;
811
+ readonly availableBytes?: number | undefined;
812
+ } | undefined;
813
+ readonly storage?: {
814
+ readonly scope: "database" | "filesystem" | "isolate" | "origin" | "process";
815
+ readonly usedBytes?: number | undefined;
816
+ readonly limitBytes?: number | undefined;
817
+ readonly availableBytes?: number | undefined;
818
+ } | undefined;
819
+ readonly memoryError?: string | undefined;
820
+ readonly storageError?: string | undefined;
821
+ } | undefined;
822
+ readonly cache?: {
823
+ readonly attachments?: {
824
+ readonly bytes: number;
825
+ readonly maxBytes?: number | undefined;
826
+ readonly targetBytes?: number | undefined;
827
+ } | undefined;
828
+ readonly objects: {
829
+ readonly byObjectType?: readonly {
830
+ readonly objectType: string;
831
+ readonly bytes: number;
832
+ }[] | undefined;
833
+ readonly bytes: number;
834
+ readonly maxBytes?: number | undefined;
835
+ readonly targetBytes?: number | undefined;
836
+ };
837
+ } | undefined;
838
+ readonly pin?: {
839
+ readonly ready: boolean;
840
+ readonly previousGraphRetained: boolean;
841
+ readonly error?: {
842
+ readonly kind: string;
843
+ readonly message: string;
844
+ } | undefined;
845
+ } | undefined;
846
+ readonly sourceId: string;
847
+ readonly upstreamId: string;
848
+ readonly mode: "adapter" | "protocol";
849
+ readonly networkOnline: boolean;
850
+ readonly authentication?: {
851
+ readonly status: "pending";
852
+ } | {
853
+ readonly status: "active";
854
+ readonly expiration?: {
855
+ readonly expiresAt: number;
856
+ readonly refreshable: boolean;
857
+ } | undefined;
858
+ } | {
859
+ readonly status: "inactive";
860
+ } | {
861
+ readonly status: "needs-auth";
862
+ readonly error?: string | undefined;
863
+ } | {
864
+ readonly status: "error";
865
+ readonly error: string;
866
+ } | undefined;
867
+ readonly watchError?: {
868
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
869
+ readonly message: string;
870
+ readonly retryable: boolean;
871
+ } | undefined;
872
+ readonly replicationError?: {
873
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
874
+ readonly message: string;
875
+ readonly recovery: "reconnect" | "session" | "snapshot" | "stop";
876
+ } | undefined;
877
+ readonly syncing: boolean;
878
+ readonly lastSync?: {
879
+ readonly startedAt: number;
880
+ readonly finishedAt: number;
881
+ readonly outcome: "failure" | "interrupted" | "success";
882
+ readonly error?: {
883
+ readonly kind: string;
884
+ readonly message: string;
885
+ } | undefined;
886
+ } | undefined;
887
+ readonly demands: readonly {
888
+ readonly objectType: string;
889
+ readonly query?: import("@party-stack/ontology-storage").Query | undefined;
890
+ readonly references: number;
891
+ readonly idleUntil?: number | undefined;
892
+ readonly watchers: number;
893
+ readonly loadError?: {
894
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
895
+ readonly message: string;
896
+ readonly retryable: boolean;
897
+ } | undefined;
898
+ readonly watchError?: {
899
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
900
+ readonly message: string;
901
+ readonly retryable: boolean;
902
+ } | undefined;
903
+ readonly revision: number;
904
+ readonly installed: number;
905
+ readonly coveredBy?: {
906
+ readonly objectType: string;
907
+ readonly query?: import("@party-stack/ontology-storage").Query | undefined;
908
+ } | undefined;
909
+ readonly coverageProof?: {
910
+ readonly reason: "collection" | "primary-key" | "query";
911
+ readonly maintainedBy: "journal" | "poll" | "snapshot" | "watch";
912
+ readonly pollIntervalMs?: number | undefined;
913
+ } | undefined;
914
+ }[];
915
+ readonly outbox: {
916
+ readonly [x: string]: number;
917
+ };
918
+ readonly loads: readonly {
919
+ readonly id: number;
920
+ readonly spanId?: string | undefined;
921
+ readonly traceId?: string | undefined;
922
+ readonly operation: "loadSubset" | "pullChanges";
923
+ readonly reason: "demand" | "journal" | "receipt" | "refresh" | "repair";
924
+ readonly subset?: {
925
+ readonly objectType: string;
926
+ readonly query?: import("@party-stack/ontology-storage").Query | undefined;
927
+ } | undefined;
928
+ readonly startedAt: number;
929
+ readonly finishedAt?: number | undefined;
930
+ readonly outcome: "failure" | "interrupted" | "running" | "success";
931
+ readonly rows?: number | undefined;
932
+ readonly fetchedRows?: number | undefined;
933
+ readonly pushdown?: {
934
+ readonly source: string;
935
+ readonly predicates: readonly {
936
+ readonly path: readonly number[];
937
+ readonly execution: "adapter" | "candidate" | "engine" | "source";
938
+ }[];
939
+ readonly sorting: "adapter" | "engine" | "none" | "source";
940
+ readonly pagination: "adapter" | "engine" | "none" | "source";
941
+ readonly rechecksFilter: boolean;
942
+ readonly native?: {
943
+ readonly language: string;
944
+ readonly text: string;
945
+ } | undefined;
946
+ } | undefined;
947
+ readonly commits?: number | undefined;
948
+ readonly complete?: boolean | undefined;
949
+ readonly error?: {
950
+ readonly kind: string;
951
+ readonly message: string;
952
+ } | undefined;
953
+ }[];
954
+ readonly loadCount: number;
955
+ }, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/Cause").Done<void> | import("effect/rpc/RpcClientError").RpcClientError>, never, Scope.Scope> : Stream.Stream<{
956
+ readonly capacity?: {
957
+ readonly memory?: {
958
+ readonly scope: "database" | "filesystem" | "isolate" | "origin" | "process";
959
+ readonly usedBytes?: number | undefined;
960
+ readonly limitBytes?: number | undefined;
961
+ readonly availableBytes?: number | undefined;
962
+ } | undefined;
963
+ readonly storage?: {
964
+ readonly scope: "database" | "filesystem" | "isolate" | "origin" | "process";
965
+ readonly usedBytes?: number | undefined;
966
+ readonly limitBytes?: number | undefined;
967
+ readonly availableBytes?: number | undefined;
968
+ } | undefined;
969
+ readonly memoryError?: string | undefined;
970
+ readonly storageError?: string | undefined;
971
+ } | undefined;
972
+ readonly cache?: {
973
+ readonly attachments?: {
974
+ readonly bytes: number;
975
+ readonly maxBytes?: number | undefined;
976
+ readonly targetBytes?: number | undefined;
977
+ } | undefined;
978
+ readonly objects: {
979
+ readonly byObjectType?: readonly {
980
+ readonly objectType: string;
981
+ readonly bytes: number;
982
+ }[] | undefined;
983
+ readonly bytes: number;
984
+ readonly maxBytes?: number | undefined;
985
+ readonly targetBytes?: number | undefined;
986
+ };
987
+ } | undefined;
988
+ readonly pin?: {
989
+ readonly ready: boolean;
990
+ readonly previousGraphRetained: boolean;
991
+ readonly error?: {
992
+ readonly kind: string;
993
+ readonly message: string;
994
+ } | undefined;
995
+ } | undefined;
996
+ readonly sourceId: string;
997
+ readonly upstreamId: string;
998
+ readonly mode: "adapter" | "protocol";
999
+ readonly networkOnline: boolean;
1000
+ readonly authentication?: {
1001
+ readonly status: "pending";
1002
+ } | {
1003
+ readonly status: "active";
1004
+ readonly expiration?: {
1005
+ readonly expiresAt: number;
1006
+ readonly refreshable: boolean;
1007
+ } | undefined;
1008
+ } | {
1009
+ readonly status: "inactive";
1010
+ } | {
1011
+ readonly status: "needs-auth";
1012
+ readonly error?: string | undefined;
1013
+ } | {
1014
+ readonly status: "error";
1015
+ readonly error: string;
1016
+ } | undefined;
1017
+ readonly watchError?: {
1018
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
1019
+ readonly message: string;
1020
+ readonly retryable: boolean;
1021
+ } | undefined;
1022
+ readonly replicationError?: {
1023
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
1024
+ readonly message: string;
1025
+ readonly recovery: "reconnect" | "session" | "snapshot" | "stop";
1026
+ } | undefined;
1027
+ readonly syncing: boolean;
1028
+ readonly lastSync?: {
1029
+ readonly startedAt: number;
1030
+ readonly finishedAt: number;
1031
+ readonly outcome: "failure" | "interrupted" | "success";
1032
+ readonly error?: {
1033
+ readonly kind: string;
1034
+ readonly message: string;
1035
+ } | undefined;
1036
+ } | undefined;
1037
+ readonly demands: readonly {
1038
+ readonly objectType: string;
1039
+ readonly query?: import("@party-stack/ontology-storage").Query | undefined;
1040
+ readonly references: number;
1041
+ readonly idleUntil?: number | undefined;
1042
+ readonly watchers: number;
1043
+ readonly loadError?: {
1044
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
1045
+ readonly message: string;
1046
+ readonly retryable: boolean;
1047
+ } | undefined;
1048
+ readonly watchError?: {
1049
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
1050
+ readonly message: string;
1051
+ readonly retryable: boolean;
1052
+ } | undefined;
1053
+ readonly revision: number;
1054
+ readonly installed: number;
1055
+ readonly coveredBy?: {
1056
+ readonly objectType: string;
1057
+ readonly query?: import("@party-stack/ontology-storage").Query | undefined;
1058
+ } | undefined;
1059
+ readonly coverageProof?: {
1060
+ readonly reason: "collection" | "primary-key" | "query";
1061
+ readonly maintainedBy: "journal" | "poll" | "snapshot" | "watch";
1062
+ readonly pollIntervalMs?: number | undefined;
1063
+ } | undefined;
1064
+ }[];
1065
+ readonly outbox: {
1066
+ readonly [x: string]: number;
1067
+ };
1068
+ readonly loads: readonly {
1069
+ readonly id: number;
1070
+ readonly spanId?: string | undefined;
1071
+ readonly traceId?: string | undefined;
1072
+ readonly operation: "loadSubset" | "pullChanges";
1073
+ readonly reason: "demand" | "journal" | "receipt" | "refresh" | "repair";
1074
+ readonly subset?: {
1075
+ readonly objectType: string;
1076
+ readonly query?: import("@party-stack/ontology-storage").Query | undefined;
1077
+ } | undefined;
1078
+ readonly startedAt: number;
1079
+ readonly finishedAt?: number | undefined;
1080
+ readonly outcome: "failure" | "interrupted" | "running" | "success";
1081
+ readonly rows?: number | undefined;
1082
+ readonly fetchedRows?: number | undefined;
1083
+ readonly pushdown?: {
1084
+ readonly source: string;
1085
+ readonly predicates: readonly {
1086
+ readonly path: readonly number[];
1087
+ readonly execution: "adapter" | "candidate" | "engine" | "source";
1088
+ }[];
1089
+ readonly sorting: "adapter" | "engine" | "none" | "source";
1090
+ readonly pagination: "adapter" | "engine" | "none" | "source";
1091
+ readonly rechecksFilter: boolean;
1092
+ readonly native?: {
1093
+ readonly language: string;
1094
+ readonly text: string;
1095
+ } | undefined;
1096
+ } | undefined;
1097
+ readonly commits?: number | undefined;
1098
+ readonly complete?: boolean | undefined;
1099
+ readonly error?: {
1100
+ readonly kind: string;
1101
+ readonly message: string;
1102
+ } | undefined;
1103
+ }[];
1104
+ readonly loadCount: number;
1105
+ }, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/rpc/RpcClientError").RpcClientError, never>;
1106
+ readonly ResolveActionParameters: <const AsQueue extends boolean = false, const Discard = false>(input: unknown, options?: {
1107
+ readonly headers?: import("effect/http/Headers").Input | undefined;
1108
+ readonly context?: import("effect/Context").Context<never> | undefined;
1109
+ readonly discard?: Discard | undefined;
1110
+ } | undefined) => Effect.Effect<Discard extends true ? void : {
1111
+ readonly [x: string]: unknown;
1112
+ }, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
1113
+ readonly SetPin: <const AsQueue extends boolean = false, const Discard = false>(input: {
1114
+ readonly query: unknown;
1115
+ readonly options?: unknown;
1116
+ }, options?: {
1117
+ readonly headers?: import("effect/http/Headers").Input | undefined;
1118
+ readonly context?: import("effect/Context").Context<never> | undefined;
1119
+ readonly discard?: Discard | undefined;
1120
+ } | undefined) => Effect.Effect<Discard extends true ? void : void, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
1121
+ readonly Traces: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
1122
+ readonly asQueue?: AsQueue | undefined;
1123
+ readonly streamBufferSize?: number | undefined;
1124
+ readonly headers?: import("effect/http/Headers").Input | undefined;
1125
+ readonly context?: import("effect/Context").Context<never> | undefined;
1126
+ } | undefined) => AsQueue extends true ? Effect.Effect<Queue.Dequeue<readonly {
1127
+ readonly id: string;
1128
+ readonly traceId: string;
1129
+ readonly parentId?: string | undefined;
1130
+ readonly name: string;
1131
+ readonly startedAt: number;
1132
+ readonly durationMs: number;
1133
+ readonly outcome: "failure" | "interrupted" | "running" | "success";
1134
+ readonly error?: {
1135
+ readonly kind: "Defect" | "Error";
1136
+ readonly message: string;
1137
+ } | undefined;
1138
+ readonly events?: readonly {
1139
+ readonly name: string;
1140
+ readonly at: number;
1141
+ readonly attributes: {
1142
+ readonly [x: string]: string | number | boolean;
1143
+ };
1144
+ }[] | undefined;
1145
+ readonly eventCount?: number | undefined;
1146
+ readonly attributes: {
1147
+ readonly [x: string]: string | number | boolean;
1148
+ };
1149
+ }[], BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/Cause").Done<void> | import("effect/rpc/RpcClientError").RpcClientError>, never, Scope.Scope> : Stream.Stream<readonly {
1150
+ readonly id: string;
1151
+ readonly traceId: string;
1152
+ readonly parentId?: string | undefined;
1153
+ readonly name: string;
1154
+ readonly startedAt: number;
1155
+ readonly durationMs: number;
1156
+ readonly outcome: "failure" | "interrupted" | "running" | "success";
1157
+ readonly error?: {
1158
+ readonly kind: "Defect" | "Error";
1159
+ readonly message: string;
1160
+ } | undefined;
1161
+ readonly events?: readonly {
1162
+ readonly name: string;
1163
+ readonly at: number;
1164
+ readonly attributes: {
1165
+ readonly [x: string]: string | number | boolean;
1166
+ };
1167
+ }[] | undefined;
1168
+ readonly eventCount?: number | undefined;
1169
+ readonly attributes: {
1170
+ readonly [x: string]: string | number | boolean;
1171
+ };
1172
+ }[], BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/rpc/RpcClientError").RpcClientError, never>;
1173
+ readonly ValidateAction: <const AsQueue extends boolean = false, const Discard = false>(input: unknown, options?: {
1174
+ readonly headers?: import("effect/http/Headers").Input | undefined;
1175
+ readonly context?: import("effect/Context").Context<never> | undefined;
1176
+ readonly discard?: Discard | undefined;
1177
+ } | undefined) => Effect.Effect<Discard extends true ? void : {
1178
+ readonly certain: false;
1179
+ } | {
1180
+ readonly certain: true;
1181
+ readonly value: {
1182
+ readonly kind: "ok";
1183
+ readonly value: void;
1184
+ } | {
1185
+ readonly kind: "err";
1186
+ readonly value: readonly {
1187
+ readonly message: string;
1188
+ readonly path?: readonly (string | number)[] | undefined;
1189
+ readonly code?: string | undefined;
1190
+ readonly category?: "custom" | "input" | "reference" | undefined;
1191
+ readonly source?: "parameter" | "submission" | "user-facing" | undefined;
1192
+ readonly messageSource?: "configured" | "standard" | undefined;
1193
+ }[];
1194
+ };
1195
+ }, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
1196
+ readonly WatchChanges: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
1197
+ readonly asQueue?: AsQueue | undefined;
1198
+ readonly streamBufferSize?: number | undefined;
1199
+ readonly headers?: import("effect/http/Headers").Input | undefined;
1200
+ readonly context?: import("effect/Context").Context<never> | undefined;
1201
+ } | undefined) => AsQueue extends true ? Effect.Effect<Queue.Dequeue<"invalidate", BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/Cause").Done<void> | import("effect/rpc/RpcClientError").RpcClientError>, never, Scope.Scope> : Stream.Stream<"invalidate", BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/rpc/RpcClientError").RpcClientError, never>;
1202
+ readonly WatchPin: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
1203
+ readonly asQueue?: AsQueue | undefined;
1204
+ readonly streamBufferSize?: number | undefined;
1205
+ readonly headers?: import("effect/http/Headers").Input | undefined;
1206
+ readonly context?: import("effect/Context").Context<never> | undefined;
1207
+ } | undefined) => AsQueue extends true ? Effect.Effect<Queue.Dequeue<{
1208
+ readonly query: import("@party-stack/ontology-spec").QueryDocument;
1209
+ readonly inputs?: {
1210
+ readonly [x: string]: unknown;
1211
+ } | undefined;
1212
+ readonly attachments: "all" | "none";
1213
+ readonly ready: boolean;
1214
+ readonly previousGraphRetained: boolean;
1215
+ readonly retainedGraph?: {
1216
+ readonly query: import("@party-stack/ontology-spec").QueryDocument;
1217
+ readonly inputs?: {
1218
+ readonly [x: string]: unknown;
1219
+ } | undefined;
1220
+ readonly attachments: "all" | "none";
1221
+ } | undefined;
1222
+ readonly error?: {
1223
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
1224
+ readonly message: string;
1225
+ } | undefined;
1226
+ } | undefined, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/Cause").Done<void> | import("effect/rpc/RpcClientError").RpcClientError>, never, Scope.Scope> : Stream.Stream<{
1227
+ readonly query: import("@party-stack/ontology-spec").QueryDocument;
1228
+ readonly inputs?: {
1229
+ readonly [x: string]: unknown;
1230
+ } | undefined;
1231
+ readonly attachments: "all" | "none";
1232
+ readonly ready: boolean;
1233
+ readonly previousGraphRetained: boolean;
1234
+ readonly retainedGraph?: {
1235
+ readonly query: import("@party-stack/ontology-spec").QueryDocument;
1236
+ readonly inputs?: {
1237
+ readonly [x: string]: unknown;
1238
+ } | undefined;
1239
+ readonly attachments: "all" | "none";
1240
+ } | undefined;
1241
+ readonly error?: {
1242
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
1243
+ readonly message: string;
1244
+ } | undefined;
1245
+ } | undefined, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/rpc/RpcClientError").RpcClientError, never>;
1246
+ readonly WatchSubset: <const AsQueue extends boolean = false, const Discard = false>(input: unknown, options?: {
1247
+ readonly asQueue?: AsQueue | undefined;
1248
+ readonly streamBufferSize?: number | undefined;
1249
+ readonly headers?: import("effect/http/Headers").Input | undefined;
1250
+ readonly context?: import("effect/Context").Context<never> | undefined;
1251
+ } | undefined) => AsQueue extends true ? Effect.Effect<Queue.Dequeue<"invalidate" | "reset", BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/Cause").Done<void> | import("effect/rpc/RpcClientError").RpcClientError>, never, Scope.Scope> : Stream.Stream<"invalidate" | "reset", BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("effect/rpc/RpcClientError").RpcClientError, never>;
1252
+ readonly WriteAttachmentChunk: <const AsQueue extends boolean = false, const Discard = false>(input: {
1253
+ readonly uploadId: string;
1254
+ readonly sequence: number;
1255
+ readonly bytes: Uint8Array<ArrayBufferLike>;
1256
+ readonly end: boolean;
1257
+ }, options?: {
1258
+ readonly headers?: import("effect/http/Headers").Input | undefined;
1259
+ readonly context?: import("effect/Context").Context<never> | undefined;
1260
+ readonly discard?: Discard | undefined;
1261
+ } | undefined) => Effect.Effect<Discard extends true ? void : void, import("effect/rpc/RpcClientError").RpcClientError | (Discard extends true ? never : BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">), never>;
1262
+ }) => Effect.Effect<OntologyOperationsClient, never, Scope.Scope>;
1263
+ //#endregion
1264
+ export {};
1265
+ //# sourceMappingURL=operations.d.ts.map