@party-stack/ontology-server 0.12.0 → 0.13.0

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.
@@ -5,8 +5,7 @@ import { ActionRequestSchema } from "@party-stack/ontology-backend/protocol";
5
5
  import { ByteInput, ByteSource, ReadableByteInput } from "@party-stack/ontology-storage/blobs";
6
6
  import { Effect, Layer, Queue, Schema, Scope, Stream } from "effect";
7
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";
8
+ import { AttachmentCreateOptions, ReplicaService } from "@party-stack/ontology-replica";
10
9
  import { ObjectSubset } from "@party-stack/ontology-spec/query";
11
10
  import { Headers } from "effect/http/Headers";
12
11
  import { attachment } from "@party-stack/ontology-spec/values";
@@ -65,7 +64,7 @@ export declare const OntologyOperationRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"ApplyActi
65
64
  readonly width: Schema.Number;
66
65
  readonly height: Schema.Number;
67
66
  }>>;
68
- }>, typeof BackendError, never, never> | Rpc.Rpc<"ClearPin", Schema.Void, Schema.Void, typeof BackendError, never, never> | Rpc.Rpc<"ControlOutbox", Schema.Codec<{
67
+ }>, typeof BackendError, never, never> | Rpc.Rpc<"ControlOutbox", Schema.Codec<{
69
68
  readonly operation: "edit" | "remove" | "retry";
70
69
  readonly id: string;
71
70
  readonly invocation?: {
@@ -197,26 +196,7 @@ export declare const OntologyOperationRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"ApplyActi
197
196
  }>, Schema.Struct<{
198
197
  readonly kind: Schema.Literal<"bytes">;
199
198
  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<{
199
+ }>]>, typeof BackendError>, Schema.Never, 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
200
  readonly capacity?: {
221
201
  readonly memory?: {
222
202
  readonly scope: "database" | "filesystem" | "isolate" | "origin" | "process";
@@ -249,14 +229,6 @@ export declare const OntologyOperationRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"ApplyActi
249
229
  readonly targetBytes?: number | undefined;
250
230
  };
251
231
  } | 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
232
  readonly sourceId: string;
261
233
  readonly upstreamId: string;
262
234
  readonly mode: "adapter" | "protocol";
@@ -283,6 +255,14 @@ export declare const OntologyOperationRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"ApplyActi
283
255
  readonly message: string;
284
256
  readonly retryable: boolean;
285
257
  } | undefined;
258
+ readonly definition?: {
259
+ readonly hash: string;
260
+ readonly error?: {
261
+ readonly hash?: string | undefined;
262
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
263
+ readonly message: string;
264
+ } | undefined;
265
+ } | undefined;
286
266
  readonly replicationError?: {
287
267
  readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
288
268
  readonly message: string;
@@ -375,15 +355,7 @@ export declare const OntologyOperationRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"ApplyActi
375
355
  };
376
356
  }, string, never, never>, Schema.Codec<{
377
357
  readonly [x: string]: unknown;
378
- }, string, never, never>, typeof BackendError, never, never> | Rpc.Rpc<"SetPin", Schema.Struct<{
379
- query: Schema.Codec<import("@party-stack/ontology-spec").QueryDocument, string, never, never>;
380
- options: Schema.optional<Schema.Codec<{
381
- readonly inputs?: {
382
- readonly [x: string]: unknown;
383
- } | undefined;
384
- readonly attachments?: "all" | "none" | undefined;
385
- }, string, never, never>>;
386
- }>, Schema.Void, typeof BackendError, never, never> | Rpc.Rpc<"Traces", Schema.Void, import("effect/rpc/RpcSchema").Stream<Schema.$Array<Schema.Struct<{
358
+ }, string, never, never>, typeof BackendError, never, never> | Rpc.Rpc<"Traces", Schema.Void, import("effect/rpc/RpcSchema").Stream<Schema.$Array<Schema.Struct<{
387
359
  readonly id: Schema.String;
388
360
  readonly traceId: Schema.String;
389
361
  readonly parentId: Schema.optional<Schema.String>;
@@ -426,26 +398,7 @@ export declare const OntologyOperationRpcs: RpcGroup.RpcGroup<Rpc.Rpc<"ApplyActi
426
398
  readonly messageSource?: "configured" | "standard" | undefined;
427
399
  }[];
428
400
  };
429
- }, 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<{
430
- readonly query: import("@party-stack/ontology-spec").QueryDocument;
431
- readonly inputs?: {
432
- readonly [x: string]: unknown;
433
- } | undefined;
434
- readonly attachments: "all" | "none";
435
- readonly ready: boolean;
436
- readonly previousGraphRetained: boolean;
437
- readonly retainedGraph?: {
438
- readonly query: import("@party-stack/ontology-spec").QueryDocument;
439
- readonly inputs?: {
440
- readonly [x: string]: unknown;
441
- } | undefined;
442
- readonly attachments: "all" | "none";
443
- } | undefined;
444
- readonly error?: {
445
- readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
446
- readonly message: string;
447
- } | undefined;
448
- } | 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<{
401
+ }, 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<"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<{
449
402
  readonly uploadId: Schema.NonEmptyString;
450
403
  readonly sequence: Schema.Int;
451
404
  readonly bytes: Schema.Uint8ArrayFromBase64;
@@ -491,19 +444,16 @@ export type OntologyOperationRequest = {
491
444
  readonly id: string;
492
445
  readonly command: "remove" | "retry" | "edit";
493
446
  readonly invocation?: Schema.Schema.Type<typeof ActionRequestSchema>;
494
- } | {
495
- readonly operation: "ReadPin" | "WatchPin" | "ClearPin";
496
- } | {
497
- readonly operation: "SetPin";
498
- readonly query: Schema.Schema.Type<typeof QueryDocumentSchema>;
499
- readonly options?: Schema.Schema.Type<typeof PinOptionsSchema>;
447
+ } |
448
+ /** Reads and writes of the replica's download inventory (the `pins` resource). */
449
+ {
450
+ readonly operation: "Pins";
500
451
  } | {
501
452
  readonly operation: "ReplicaStatus" | "Traces" | "DeleteLocalData" | "ReleaseOwner";
502
453
  };
503
454
  export type OntologyOperationOptions<R = never> = ErrorProjectionOptions & {
504
455
  readonly attachmentTransfers?: AttachmentTransferPolicy<R>;
505
456
  readonly replica?: ReplicaService;
506
- readonly pins?: ReplicaPinControls;
507
457
  readonly traces?: TraceStore;
508
458
  readonly backend?: import("@party-stack/ontology-backend").OntologyBackendService;
509
459
  readonly ready?: Effect.Effect<void, BackendError, R>;
@@ -516,7 +466,7 @@ export declare const ontologyAttachmentHandlers: <R>(options: OntologyOperationO
516
466
  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>;
517
467
  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>;
518
468
  };
519
- 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>>;
469
+ export declare const ontologyOperationHandlers: <R>(options: OntologyOperationOptions<R>, authorize?: OntologyOperationOptions<R>["authorize"]) => Layer.Layer<Rpc.Handler<"ApplyAction"> | Rpc.Handler<"AttachmentMetadata"> | 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<"ReleaseOwner"> | Rpc.Handler<"ReplicaStatus"> | Rpc.Handler<"ResolveActionParameters"> | Rpc.Handler<"Traces"> | Rpc.Handler<"ValidateAction"> | Rpc.Handler<"WatchChanges"> | Rpc.Handler<"WatchSubset"> | Rpc.Handler<"WriteAttachmentChunk">, never, Exclude<Exclude<R, never>, Scope.Scope> | Exclude<Exclude<Exclude<R, Scope.Scope>, never>, Scope.Scope>>;
520
470
  export interface ProtocolAttachments {
521
471
  readonly create: (input: ByteInput | ReadableByteInput, options?: AttachmentCreateOptions) => Effect.Effect<{
522
472
  readonly attachment: attachment;
@@ -540,7 +490,6 @@ export interface OntologyOperationsClient {
540
490
  readonly outbox: Pick<import("@party-stack/ontology-replica").ReplicaService["outbox"], "remove" | "retry" | "edit">;
541
491
  readonly traces: TraceStore;
542
492
  readonly replicaMonitor: import("@party-stack/ontology-replica").ReplicaMonitor;
543
- readonly pins: ReplicaPinControls;
544
493
  readonly deleteLocalData: Effect.Effect<void, BackendError>;
545
494
  readonly releaseOwner: Effect.Effect<void, BackendError>;
546
495
  }
@@ -589,11 +538,6 @@ export declare const makeOntologyOperationsClient: (client: {
589
538
  readonly height: number;
590
539
  } | undefined;
591
540
  }, 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>;
592
- readonly ClearPin: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
593
- readonly headers?: import("effect/http/Headers").Input | undefined;
594
- readonly context?: import("effect/Context").Context<never> | undefined;
595
- readonly discard?: Discard | undefined;
596
- } | 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>;
597
541
  readonly ControlOutbox: <const AsQueue extends boolean = false, const Discard = false>(input: unknown, options?: {
598
542
  readonly headers?: import("effect/http/Headers").Input | undefined;
599
543
  readonly context?: import("effect/Context").Context<never> | undefined;
@@ -770,30 +714,6 @@ export declare const makeOntologyOperationsClient: (client: {
770
714
  readonly kind: "bytes";
771
715
  readonly bytes: Uint8Array<ArrayBufferLike>;
772
716
  }, 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>;
773
- readonly ReadPin: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
774
- readonly headers?: import("effect/http/Headers").Input | undefined;
775
- readonly context?: import("effect/Context").Context<never> | undefined;
776
- readonly discard?: Discard | undefined;
777
- } | undefined) => Effect.Effect<Discard extends true ? void : {
778
- readonly query: import("@party-stack/ontology-spec").QueryDocument;
779
- readonly inputs?: {
780
- readonly [x: string]: unknown;
781
- } | undefined;
782
- readonly attachments: "all" | "none";
783
- readonly ready: boolean;
784
- readonly previousGraphRetained: boolean;
785
- readonly retainedGraph?: {
786
- readonly query: import("@party-stack/ontology-spec").QueryDocument;
787
- readonly inputs?: {
788
- readonly [x: string]: unknown;
789
- } | undefined;
790
- readonly attachments: "all" | "none";
791
- } | undefined;
792
- readonly error?: {
793
- readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
794
- readonly message: string;
795
- } | undefined;
796
- } | 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>;
797
717
  readonly ReleaseOwner: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
798
718
  readonly headers?: import("effect/http/Headers").Input | undefined;
799
719
  readonly context?: import("effect/Context").Context<never> | undefined;
@@ -837,14 +757,6 @@ export declare const makeOntologyOperationsClient: (client: {
837
757
  readonly targetBytes?: number | undefined;
838
758
  };
839
759
  } | undefined;
840
- readonly pin?: {
841
- readonly ready: boolean;
842
- readonly previousGraphRetained: boolean;
843
- readonly error?: {
844
- readonly kind: string;
845
- readonly message: string;
846
- } | undefined;
847
- } | undefined;
848
760
  readonly sourceId: string;
849
761
  readonly upstreamId: string;
850
762
  readonly mode: "adapter" | "protocol";
@@ -871,6 +783,14 @@ export declare const makeOntologyOperationsClient: (client: {
871
783
  readonly message: string;
872
784
  readonly retryable: boolean;
873
785
  } | undefined;
786
+ readonly definition?: {
787
+ readonly hash: string;
788
+ readonly error?: {
789
+ readonly hash?: string | undefined;
790
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
791
+ readonly message: string;
792
+ } | undefined;
793
+ } | undefined;
874
794
  readonly replicationError?: {
875
795
  readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
876
796
  readonly message: string;
@@ -989,14 +909,6 @@ export declare const makeOntologyOperationsClient: (client: {
989
909
  readonly targetBytes?: number | undefined;
990
910
  };
991
911
  } | undefined;
992
- readonly pin?: {
993
- readonly ready: boolean;
994
- readonly previousGraphRetained: boolean;
995
- readonly error?: {
996
- readonly kind: string;
997
- readonly message: string;
998
- } | undefined;
999
- } | undefined;
1000
912
  readonly sourceId: string;
1001
913
  readonly upstreamId: string;
1002
914
  readonly mode: "adapter" | "protocol";
@@ -1023,6 +935,14 @@ export declare const makeOntologyOperationsClient: (client: {
1023
935
  readonly message: string;
1024
936
  readonly retryable: boolean;
1025
937
  } | undefined;
938
+ readonly definition?: {
939
+ readonly hash: string;
940
+ readonly error?: {
941
+ readonly hash?: string | undefined;
942
+ readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
943
+ readonly message: string;
944
+ } | undefined;
945
+ } | undefined;
1026
946
  readonly replicationError?: {
1027
947
  readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
1028
948
  readonly message: string;
@@ -1116,14 +1036,6 @@ export declare const makeOntologyOperationsClient: (client: {
1116
1036
  } | undefined) => Effect.Effect<Discard extends true ? void : {
1117
1037
  readonly [x: string]: unknown;
1118
1038
  }, 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>;
1119
- readonly SetPin: <const AsQueue extends boolean = false, const Discard = false>(input: {
1120
- readonly query: unknown;
1121
- readonly options?: unknown;
1122
- }, options?: {
1123
- readonly headers?: import("effect/http/Headers").Input | undefined;
1124
- readonly context?: import("effect/Context").Context<never> | undefined;
1125
- readonly discard?: Discard | undefined;
1126
- } | 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>;
1127
1039
  readonly Traces: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
1128
1040
  readonly asQueue?: AsQueue | undefined;
1129
1041
  readonly streamBufferSize?: number | undefined;
@@ -1205,50 +1117,6 @@ export declare const makeOntologyOperationsClient: (client: {
1205
1117
  readonly headers?: import("effect/http/Headers").Input | undefined;
1206
1118
  readonly context?: import("effect/Context").Context<never> | undefined;
1207
1119
  } | 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>;
1208
- readonly WatchPin: <const AsQueue extends boolean = false, const Discard = false>(input: void, options?: {
1209
- readonly asQueue?: AsQueue | undefined;
1210
- readonly streamBufferSize?: number | undefined;
1211
- readonly headers?: import("effect/http/Headers").Input | undefined;
1212
- readonly context?: import("effect/Context").Context<never> | undefined;
1213
- } | undefined) => AsQueue extends true ? Effect.Effect<Queue.Dequeue<{
1214
- readonly query: import("@party-stack/ontology-spec").QueryDocument;
1215
- readonly inputs?: {
1216
- readonly [x: string]: unknown;
1217
- } | undefined;
1218
- readonly attachments: "all" | "none";
1219
- readonly ready: boolean;
1220
- readonly previousGraphRetained: boolean;
1221
- readonly retainedGraph?: {
1222
- readonly query: import("@party-stack/ontology-spec").QueryDocument;
1223
- readonly inputs?: {
1224
- readonly [x: string]: unknown;
1225
- } | undefined;
1226
- readonly attachments: "all" | "none";
1227
- } | undefined;
1228
- readonly error?: {
1229
- readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
1230
- readonly message: string;
1231
- } | undefined;
1232
- } | 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<{
1233
- readonly query: import("@party-stack/ontology-spec").QueryDocument;
1234
- readonly inputs?: {
1235
- readonly [x: string]: unknown;
1236
- } | undefined;
1237
- readonly attachments: "all" | "none";
1238
- readonly ready: boolean;
1239
- readonly previousGraphRetained: boolean;
1240
- readonly retainedGraph?: {
1241
- readonly query: import("@party-stack/ontology-spec").QueryDocument;
1242
- readonly inputs?: {
1243
- readonly [x: string]: unknown;
1244
- } | undefined;
1245
- readonly attachments: "all" | "none";
1246
- } | undefined;
1247
- readonly error?: {
1248
- readonly kind: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced";
1249
- readonly message: string;
1250
- } | undefined;
1251
- } | 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>;
1252
1120
  readonly WatchSubset: <const AsQueue extends boolean = false, const Discard = false>(input: unknown, options?: {
1253
1121
  readonly asQueue?: AsQueue | undefined;
1254
1122
  readonly streamBufferSize?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","names":["_$__attachmentTransfers_js0.AttachmentUpload","_$__attachmentTransfers_js0.AttachmentValue"],"sources":["../src/operations.ts"],"mappings":";;;;;;;;;;;;;;cA8EM,UAAQ,OAAA;;;;;;;;;qBAgHD,uBAAqB,SAAA,SAAA,IAAA,mBAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA2C,OAAA,aAAA;YACjE;WAEO;WACA,+CAA+C;WAC/C,SAAS;;WAEX;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqNvC,OAAA,OAAA,iCAAA,MAAA"}
1
+ {"version":3,"file":"operations.d.ts","names":["_$__attachmentTransfers_js0.AttachmentUpload","_$__attachmentTransfers_js0.AttachmentValue"],"sources":["../src/operations.ts"],"mappings":";;;;;;;;;;;;;cAyEM,UAAQ,OAAA;;;;;;;;;qBA+FD,uBAAqB,SAAA,SAAA,IAAA,mBAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA2C,OAAA,aAAA;YACjE;WAEO;WACA,+CAA+C;WAC/C,SAAS;;WAEX;;WACA;WAAmC;WAA0B;;WAE3D;WACA,QAAQ;;WAGR;WACA,oDAAoD;;WAGpD;WACA,mDAAmD;WACnD;;WAGA;WACA;WACA,YAAY;WACZ;;WAGA;WACA;WACA,SAAS,OAAO,OAAO,YAAY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ObjectSubsetCodec, protocolValueCodec } from "@par
5
5
  import { attachmentByteSource, byteChunks, collectByteBlob, scopedByteSource } from "@party-stack/ontology-storage/blobs";
6
6
  import { Effect, Exit, Fiber, Layer, Option, Queue, Schema, Scope, Sink, Stream } from "effect";
7
7
  import { Rpc, RpcGroup } from "effect/rpc";
8
- import { PinOptionsSchema, PinStatusSchema, ReplicaStatusSchema, makeReplicaMonitor } from "@party-stack/ontology-replica";
8
+ import { withObjectSources } from "@party-stack/ontology-storage";
9
+ import { ReplicaStatusSchema, makeReplicaMonitor } from "@party-stack/ontology-replica";
9
10
  import { QueryDocumentSchema } from "@party-stack/ontology-spec/effect";
10
11
  import { getTargetValueType } from "@party-stack/ontology-spec/utils";
11
- import { withObjectSources } from "@party-stack/ontology-storage";
12
12
  //#region src/operations.ts
13
13
  const Validation = ValidationReportSchema;
14
14
  const Trace = Schema.Struct({
@@ -142,20 +142,7 @@ const HelperRpcs = RpcGroup.make(Rpc.make("Query", {
142
142
  allowUnknownOutcome: Schema.optional(Schema.Boolean)
143
143
  })),
144
144
  error: BackendError
145
- }), Rpc.make("ReadPin", {
146
- success: protocolValueCodec(Schema.UndefinedOr(PinStatusSchema)),
147
- error: BackendError
148
- }), Rpc.make("WatchPin", {
149
- success: protocolValueCodec(Schema.UndefinedOr(PinStatusSchema)),
150
- error: BackendError,
151
- stream: true
152
- }), Rpc.make("SetPin", {
153
- payload: {
154
- query: protocolValueCodec(QueryDocumentSchema),
155
- options: Schema.optional(protocolValueCodec(PinOptionsSchema))
156
- },
157
- error: BackendError
158
- }), Rpc.make("ClearPin", { error: BackendError }), Rpc.make("ReplicaStatus", {
145
+ }), Rpc.make("ReplicaStatus", {
159
146
  success: protocolValueCodec(ReplicaStatusSchema),
160
147
  error: BackendError,
161
148
  stream: true
@@ -411,36 +398,6 @@ const ontologyOperationHandlers = (options, authorize = options.authorize) => {
411
398
  strategy: "sliding"
412
399
  });
413
400
  })),
414
- ReadPin: (_, context) => Effect.gen(function* () {
415
- yield* authorize({ operation: "ReadPin" }, context.headers);
416
- yield* options.ready ?? Effect.void;
417
- const pins = options.pins ?? options.replica?.demand;
418
- if (!pins) return yield* missing("ReadPin");
419
- return yield* pins.pinStatus;
420
- }),
421
- WatchPin: (_, context) => Stream.unwrap(Effect.gen(function* () {
422
- yield* authorize({ operation: "WatchPin" }, context.headers);
423
- yield* options.ready ?? Effect.void;
424
- return (options.pins ?? options.replica?.demand)?.pinStatusChanges ?? Stream.fail(missing("WatchPin"));
425
- })),
426
- SetPin: ({ query, options: settings }, context) => Effect.gen(function* () {
427
- yield* authorize({
428
- operation: "SetPin",
429
- query,
430
- options: settings
431
- }, context.headers);
432
- yield* options.ready ?? Effect.void;
433
- const pins = options.pins ?? options.replica?.demand;
434
- if (!pins) return yield* missing("SetPin");
435
- return yield* pins.setPin(query, settings);
436
- }),
437
- ClearPin: (_, context) => Effect.gen(function* () {
438
- yield* authorize({ operation: "ClearPin" }, context.headers);
439
- yield* options.ready ?? Effect.void;
440
- const pins = options.pins ?? options.replica?.demand;
441
- if (!pins) return yield* missing("ClearPin");
442
- return yield* pins.clearPin;
443
- }),
444
401
  DeleteLocalData: (_, context) => authorize({ operation: "DeleteLocalData" }, context.headers).pipe(Effect.andThen(options.deleteLocalData ?? Effect.fail(missing("DeleteLocalData")))),
445
402
  ReleaseOwner: (_, context) => authorize({ operation: "ReleaseOwner" }, context.headers).pipe(Effect.andThen(options.releaseOwner ?? Effect.fail(missing("ReleaseOwner"))))
446
403
  }).pipe(Layer.merge(attachmentTransferHandlers({
@@ -568,15 +525,6 @@ const makeOntologyOperationsClient = Effect.fnUntraced(function* (client) {
568
525
  }).pipe(Effect.map((result) => result.value), Effect.mapError(decryptFailure)),
569
526
  deleteLocalData: client.DeleteLocalData().pipe(Effect.mapError(failure)),
570
527
  releaseOwner: client.ReleaseOwner(void 0, { discard: true }).pipe(Effect.mapError(failure)),
571
- pins: {
572
- pinStatus: client.ReadPin().pipe(Effect.mapError(failure)),
573
- pinStatusChanges: client.WatchPin().pipe(Stream.mapError(failure)),
574
- setPin: (query, settings) => client.SetPin({
575
- query,
576
- options: settings
577
- }).pipe(Effect.mapError(failure)),
578
- clearPin: client.ClearPin().pipe(Effect.mapError(failure))
579
- },
580
528
  queryFunction: (name, parameters) => client.QueryFunction({
581
529
  name,
582
530
  parameters