@party-stack/ontology-backend 0.0.0-stage → 0.2.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.
- package/LICENSE +21 -0
- package/README.md +148 -2
- package/lib/actions.d.ts +47 -0
- package/lib/actions.d.ts.map +1 -0
- package/lib/actions.js +306 -0
- package/lib/actions.js.map +1 -0
- package/lib/clients.d.ts +236 -0
- package/lib/clients.d.ts.map +1 -0
- package/lib/clients.js +211 -0
- package/lib/clients.js.map +1 -0
- package/lib/delivery.d.ts +746 -0
- package/lib/delivery.d.ts.map +1 -0
- package/lib/delivery.js +863 -0
- package/lib/delivery.js.map +1 -0
- package/lib/description.d.ts +29 -0
- package/lib/description.d.ts.map +1 -0
- package/lib/description.js +28 -0
- package/lib/description.js.map +1 -0
- package/lib/encrypted.d.ts +41 -0
- package/lib/encrypted.d.ts.map +1 -0
- package/lib/encrypted.js +111 -0
- package/lib/encrypted.js.map +1 -0
- package/lib/errors.d.ts +106 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +275 -0
- package/lib/errors.js.map +1 -0
- package/lib/fulfillment.d.ts +25 -0
- package/lib/fulfillment.d.ts.map +1 -0
- package/lib/fulfillment.js +99 -0
- package/lib/fulfillment.js.map +1 -0
- package/lib/index.d.ts +297 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +91 -0
- package/lib/index.js.map +1 -0
- package/lib/maintenance.d.ts +11 -0
- package/lib/maintenance.d.ts.map +1 -0
- package/lib/maintenance.js +24 -0
- package/lib/maintenance.js.map +1 -0
- package/lib/meta.d.ts +26 -0
- package/lib/meta.d.ts.map +1 -0
- package/lib/meta.js +213 -0
- package/lib/meta.js.map +1 -0
- package/lib/owned.d.ts +74 -0
- package/lib/owned.d.ts.map +1 -0
- package/lib/owned.js +593 -0
- package/lib/owned.js.map +1 -0
- package/lib/policy/indexes.d.ts +12 -0
- package/lib/policy/indexes.d.ts.map +1 -0
- package/lib/policy/indexes.js +113 -0
- package/lib/policy/indexes.js.map +1 -0
- package/lib/policy/planner.d.ts +10 -0
- package/lib/policy/planner.d.ts.map +1 -0
- package/lib/policy/planner.js +118 -0
- package/lib/policy/planner.js.map +1 -0
- package/lib/policy/view.d.ts +31 -0
- package/lib/policy/view.d.ts.map +1 -0
- package/lib/policy/view.js +173 -0
- package/lib/policy/view.js.map +1 -0
- package/lib/policy.d.ts +47 -0
- package/lib/policy.d.ts.map +1 -0
- package/lib/policy.js +100 -0
- package/lib/policy.js.map +1 -0
- package/lib/protocol.d.ts +570 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +144 -0
- package/lib/protocol.js.map +1 -0
- package/lib/query.d.ts +33 -0
- package/lib/query.d.ts.map +1 -0
- package/lib/query.js +51 -0
- package/lib/query.js.map +1 -0
- package/lib/references.d.ts +8 -0
- package/lib/references.d.ts.map +1 -0
- package/lib/references.js +41 -0
- package/lib/references.js.map +1 -0
- package/lib/storage.d.ts +55 -0
- package/lib/storage.d.ts.map +1 -0
- package/lib/storage.js +168 -0
- package/lib/storage.js.map +1 -0
- package/lib/subset.d.ts +19 -0
- package/lib/subset.d.ts.map +1 -0
- package/lib/subset.js +150 -0
- package/lib/subset.js.map +1 -0
- package/lib/subsetSchema.d.ts +10 -0
- package/lib/subsetSchema.d.ts.map +1 -0
- package/lib/subsetSchema.js +20 -0
- package/lib/subsetSchema.js.map +1 -0
- package/package.json +72 -3
|
@@ -0,0 +1,746 @@
|
|
|
1
|
+
import { BackendError } from "./errors.js";
|
|
2
|
+
import "./index.js";
|
|
3
|
+
import { Row } from "@party-stack/ontology-storage";
|
|
4
|
+
import { Effect, Schema, Scope, Stream } from "effect";
|
|
5
|
+
import { Table, TablesService, Transaction } from "@party-stack/ontology-storage/tables";
|
|
6
|
+
//#region src/delivery.d.ts
|
|
7
|
+
export declare const DeliveryRefSchema: Schema.Union<readonly [Schema.Struct<{
|
|
8
|
+
readonly kind: Schema.Literals<readonly ["base", "override"]>;
|
|
9
|
+
readonly objectType: Schema.String;
|
|
10
|
+
readonly key: Schema.Union<readonly [Schema.String, Schema.Finite]>;
|
|
11
|
+
}>, Schema.Struct<{
|
|
12
|
+
readonly kind: Schema.Literals<readonly ["pending", "completed"]>;
|
|
13
|
+
readonly id: Schema.String;
|
|
14
|
+
}>]>;
|
|
15
|
+
export declare const DeliveryRecordSchema: Schema.Union<readonly [Schema.Struct<{
|
|
16
|
+
readonly kind: Schema.Literal<"base">;
|
|
17
|
+
readonly objectType: Schema.String;
|
|
18
|
+
readonly key: Schema.Union<readonly [Schema.String, Schema.Finite]>;
|
|
19
|
+
readonly value: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
20
|
+
}>, Schema.Struct<{
|
|
21
|
+
readonly kind: Schema.Literal<"override">;
|
|
22
|
+
readonly objectType: Schema.String;
|
|
23
|
+
readonly key: Schema.Union<readonly [Schema.String, Schema.Finite]>;
|
|
24
|
+
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
25
|
+
readonly deleted: Schema.Literal<true>;
|
|
26
|
+
}>, Schema.Struct<{
|
|
27
|
+
readonly deleted: Schema.Literal<false>;
|
|
28
|
+
readonly value: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
29
|
+
}>]>;
|
|
30
|
+
}>, Schema.Struct<{
|
|
31
|
+
readonly kind: Schema.Literals<readonly ["pending", "completed"]>;
|
|
32
|
+
readonly id: Schema.String;
|
|
33
|
+
readonly value: Schema.Struct<{
|
|
34
|
+
readonly invocation: Schema.Struct<{
|
|
35
|
+
readonly id: Schema.NonEmptyString;
|
|
36
|
+
readonly name: Schema.NonEmptyString;
|
|
37
|
+
readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
38
|
+
readonly replay: Schema.optional<Schema.Struct<{
|
|
39
|
+
readonly now: Schema.String;
|
|
40
|
+
readonly seed: Schema.NonEmptyString;
|
|
41
|
+
}>>;
|
|
42
|
+
}>;
|
|
43
|
+
readonly requestIdentity: Schema.String;
|
|
44
|
+
readonly createdAt: Schema.Finite;
|
|
45
|
+
readonly sequence: Schema.Int;
|
|
46
|
+
readonly state: Schema.Literals<readonly ["queued", "sending", "acknowledged", "blocked"]>;
|
|
47
|
+
readonly optimistic: Schema.Boolean;
|
|
48
|
+
readonly attempts: Schema.Int;
|
|
49
|
+
readonly retryFromAttempt: Schema.optional<Schema.Int>;
|
|
50
|
+
readonly nextAttemptAt: Schema.optional<Schema.Finite>;
|
|
51
|
+
readonly failureMessage: Schema.optional<Schema.String>;
|
|
52
|
+
readonly failureIssues: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
53
|
+
readonly message: Schema.String;
|
|
54
|
+
readonly path: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number]>>>;
|
|
55
|
+
readonly code: Schema.optional<Schema.String>;
|
|
56
|
+
readonly category: Schema.optional<Schema.Literals<readonly ["input", "reference", "custom"]>>;
|
|
57
|
+
readonly source: Schema.optional<Schema.Literals<readonly ["parameter", "submission", "user-facing"]>>;
|
|
58
|
+
readonly messageSource: Schema.optional<Schema.Literals<readonly ["standard", "configured"]>>;
|
|
59
|
+
}>>>;
|
|
60
|
+
readonly completedAt: Schema.optional<Schema.Finite>;
|
|
61
|
+
readonly retryRequiresAcknowledgement: Schema.optional<Schema.Boolean>;
|
|
62
|
+
readonly failureOutcome: Schema.optional<Schema.Literals<readonly ["not-committed", "unknown"]>>;
|
|
63
|
+
readonly failureRetryable: Schema.optional<Schema.Boolean>;
|
|
64
|
+
readonly receipt: Schema.optional<Schema.Struct<{
|
|
65
|
+
readonly operationId: Schema.String;
|
|
66
|
+
readonly outcome: Schema.Literal<"committed">;
|
|
67
|
+
readonly result: Schema.optional<Schema.Unknown>;
|
|
68
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
69
|
+
readonly providerOperationId: Schema.optional<Schema.String>;
|
|
70
|
+
readonly affected: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
71
|
+
readonly objectType: Schema.String;
|
|
72
|
+
readonly keys: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite]>>>;
|
|
73
|
+
}>>>;
|
|
74
|
+
readonly affectedComplete: Schema.optional<Schema.Boolean>;
|
|
75
|
+
readonly attachmentIdMappings: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
76
|
+
readonly localId: Schema.String;
|
|
77
|
+
readonly remoteId: Schema.String;
|
|
78
|
+
}>>>;
|
|
79
|
+
}>>;
|
|
80
|
+
readonly failure: Schema.optional<Schema.Literals<readonly ["Unauthenticated", "Forbidden", "NotFound", "ValidationFailed", "InvalidRequest", "InvalidResponse", "InvalidConfiguration", "Conflict", "NotImplemented", "RateLimited", "Unavailable", "Internal", "HistoryExpired", "SessionExpired", "SessionReplaced", "ViewReplaced", "ResultExpired", "SourceMismatch", "SchemaMismatch"]>>;
|
|
81
|
+
readonly touchedTypes: Schema.$Array<Schema.String>;
|
|
82
|
+
readonly submission: Schema.optional<Schema.Struct<{
|
|
83
|
+
readonly clientId: Schema.NonEmptyString;
|
|
84
|
+
readonly sequence: Schema.Int;
|
|
85
|
+
}>>;
|
|
86
|
+
}>;
|
|
87
|
+
}>]>;
|
|
88
|
+
export type DeliveryRef = Schema.Schema.Type<typeof DeliveryRefSchema>;
|
|
89
|
+
export type DeliveryRecord = Schema.Schema.Type<typeof DeliveryRecordSchema>;
|
|
90
|
+
export declare const DeliveryChangeSchema: Schema.Union<readonly [Schema.Struct<{
|
|
91
|
+
readonly kind: Schema.Literal<"put">;
|
|
92
|
+
readonly record: Schema.Union<readonly [Schema.Struct<{
|
|
93
|
+
readonly kind: Schema.Literal<"base">;
|
|
94
|
+
readonly objectType: Schema.String;
|
|
95
|
+
readonly key: Schema.Union<readonly [Schema.String, Schema.Finite]>;
|
|
96
|
+
readonly value: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
97
|
+
}>, Schema.Struct<{
|
|
98
|
+
readonly kind: Schema.Literal<"override">;
|
|
99
|
+
readonly objectType: Schema.String;
|
|
100
|
+
readonly key: Schema.Union<readonly [Schema.String, Schema.Finite]>;
|
|
101
|
+
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
102
|
+
readonly deleted: Schema.Literal<true>;
|
|
103
|
+
}>, Schema.Struct<{
|
|
104
|
+
readonly deleted: Schema.Literal<false>;
|
|
105
|
+
readonly value: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
106
|
+
}>]>;
|
|
107
|
+
}>, Schema.Struct<{
|
|
108
|
+
readonly kind: Schema.Literals<readonly ["pending", "completed"]>;
|
|
109
|
+
readonly id: Schema.String;
|
|
110
|
+
readonly value: Schema.Struct<{
|
|
111
|
+
readonly invocation: Schema.Struct<{
|
|
112
|
+
readonly id: Schema.NonEmptyString;
|
|
113
|
+
readonly name: Schema.NonEmptyString;
|
|
114
|
+
readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
115
|
+
readonly replay: Schema.optional<Schema.Struct<{
|
|
116
|
+
readonly now: Schema.String;
|
|
117
|
+
readonly seed: Schema.NonEmptyString;
|
|
118
|
+
}>>;
|
|
119
|
+
}>;
|
|
120
|
+
readonly requestIdentity: Schema.String;
|
|
121
|
+
readonly createdAt: Schema.Finite;
|
|
122
|
+
readonly sequence: Schema.Int;
|
|
123
|
+
readonly state: Schema.Literals<readonly ["queued", "sending", "acknowledged", "blocked"]>;
|
|
124
|
+
readonly optimistic: Schema.Boolean;
|
|
125
|
+
readonly attempts: Schema.Int;
|
|
126
|
+
readonly retryFromAttempt: Schema.optional<Schema.Int>;
|
|
127
|
+
readonly nextAttemptAt: Schema.optional<Schema.Finite>;
|
|
128
|
+
readonly failureMessage: Schema.optional<Schema.String>;
|
|
129
|
+
readonly failureIssues: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
130
|
+
readonly message: Schema.String;
|
|
131
|
+
readonly path: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number]>>>;
|
|
132
|
+
readonly code: Schema.optional<Schema.String>;
|
|
133
|
+
readonly category: Schema.optional<Schema.Literals<readonly ["input", "reference", "custom"]>>;
|
|
134
|
+
readonly source: Schema.optional<Schema.Literals<readonly ["parameter", "submission", "user-facing"]>>;
|
|
135
|
+
readonly messageSource: Schema.optional<Schema.Literals<readonly ["standard", "configured"]>>;
|
|
136
|
+
}>>>;
|
|
137
|
+
readonly completedAt: Schema.optional<Schema.Finite>;
|
|
138
|
+
readonly retryRequiresAcknowledgement: Schema.optional<Schema.Boolean>;
|
|
139
|
+
readonly failureOutcome: Schema.optional<Schema.Literals<readonly ["not-committed", "unknown"]>>;
|
|
140
|
+
readonly failureRetryable: Schema.optional<Schema.Boolean>;
|
|
141
|
+
readonly receipt: Schema.optional<Schema.Struct<{
|
|
142
|
+
readonly operationId: Schema.String;
|
|
143
|
+
readonly outcome: Schema.Literal<"committed">;
|
|
144
|
+
readonly result: Schema.optional<Schema.Unknown>;
|
|
145
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
146
|
+
readonly providerOperationId: Schema.optional<Schema.String>;
|
|
147
|
+
readonly affected: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
148
|
+
readonly objectType: Schema.String;
|
|
149
|
+
readonly keys: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite]>>>;
|
|
150
|
+
}>>>;
|
|
151
|
+
readonly affectedComplete: Schema.optional<Schema.Boolean>;
|
|
152
|
+
readonly attachmentIdMappings: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
153
|
+
readonly localId: Schema.String;
|
|
154
|
+
readonly remoteId: Schema.String;
|
|
155
|
+
}>>>;
|
|
156
|
+
}>>;
|
|
157
|
+
readonly failure: Schema.optional<Schema.Literals<readonly ["Unauthenticated", "Forbidden", "NotFound", "ValidationFailed", "InvalidRequest", "InvalidResponse", "InvalidConfiguration", "Conflict", "NotImplemented", "RateLimited", "Unavailable", "Internal", "HistoryExpired", "SessionExpired", "SessionReplaced", "ViewReplaced", "ResultExpired", "SourceMismatch", "SchemaMismatch"]>>;
|
|
158
|
+
readonly touchedTypes: Schema.$Array<Schema.String>;
|
|
159
|
+
readonly submission: Schema.optional<Schema.Struct<{
|
|
160
|
+
readonly clientId: Schema.NonEmptyString;
|
|
161
|
+
readonly sequence: Schema.Int;
|
|
162
|
+
}>>;
|
|
163
|
+
}>;
|
|
164
|
+
}>]>;
|
|
165
|
+
}>, Schema.Struct<{
|
|
166
|
+
readonly kind: Schema.Literal<"remove">;
|
|
167
|
+
readonly ref: Schema.Union<readonly [Schema.Struct<{
|
|
168
|
+
readonly kind: Schema.Literals<readonly ["base", "override"]>;
|
|
169
|
+
readonly objectType: Schema.String;
|
|
170
|
+
readonly key: Schema.Union<readonly [Schema.String, Schema.Finite]>;
|
|
171
|
+
}>, Schema.Struct<{
|
|
172
|
+
readonly kind: Schema.Literals<readonly ["pending", "completed"]>;
|
|
173
|
+
readonly id: Schema.String;
|
|
174
|
+
}>]>;
|
|
175
|
+
}>]>;
|
|
176
|
+
export type DeliveryChange = Schema.Schema.Type<typeof DeliveryChangeSchema>;
|
|
177
|
+
export declare const DeliveryMetadataSchema: Schema.Struct<{
|
|
178
|
+
readonly sourceId: Schema.NonEmptyString;
|
|
179
|
+
readonly schemaHash: Schema.NonEmptyString;
|
|
180
|
+
readonly generation: Schema.Int;
|
|
181
|
+
readonly revision: Schema.Int;
|
|
182
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
183
|
+
readonly coverage: Schema.$Array<Schema.Struct<{
|
|
184
|
+
readonly subset: Schema.Struct<{
|
|
185
|
+
readonly objectType: Schema.NonEmptyString;
|
|
186
|
+
readonly query: Schema.optional<Schema.declare<import("@party-stack/ontology-storage").Query, import("@party-stack/ontology-storage").Query>>;
|
|
187
|
+
}>;
|
|
188
|
+
readonly complete: Schema.Boolean;
|
|
189
|
+
/** Previously confirmed resident coverage, independently of current freshness. */
|
|
190
|
+
readonly cached: Schema.optional<Schema.Boolean>;
|
|
191
|
+
}>>;
|
|
192
|
+
readonly client: Schema.optional<Schema.Struct<{
|
|
193
|
+
readonly client: Schema.Struct<{
|
|
194
|
+
readonly sourceId: Schema.NonEmptyString;
|
|
195
|
+
readonly clientId: Schema.NonEmptyString;
|
|
196
|
+
readonly resumeKey: Schema.NonEmptyString;
|
|
197
|
+
}>;
|
|
198
|
+
readonly connectionId: Schema.NonEmptyString;
|
|
199
|
+
readonly expiresAt: Schema.Finite;
|
|
200
|
+
readonly acceptedThrough: Schema.Int;
|
|
201
|
+
readonly acknowledgedThrough: Schema.Int;
|
|
202
|
+
readonly deliveredThrough: Schema.Int;
|
|
203
|
+
readonly deliveredRevision: Schema.Int;
|
|
204
|
+
readonly appliedRevision: Schema.Int;
|
|
205
|
+
readonly viewGeneration: Schema.optional<Schema.Int>;
|
|
206
|
+
readonly viewIdentity: Schema.optional<Schema.String>;
|
|
207
|
+
readonly deliveredViewGeneration: Schema.optional<Schema.Int>;
|
|
208
|
+
}>>;
|
|
209
|
+
}>;
|
|
210
|
+
export type DeliveryMetadata = Schema.Schema.Type<typeof DeliveryMetadataSchema>;
|
|
211
|
+
export declare const DeliveryPositionSchema: Schema.Struct<{
|
|
212
|
+
readonly streamId: Schema.NonEmptyString;
|
|
213
|
+
readonly sequence: Schema.Int;
|
|
214
|
+
}>;
|
|
215
|
+
export type DeliveryPosition = Schema.Schema.Type<typeof DeliveryPositionSchema>;
|
|
216
|
+
export declare const DeliveryFrameSchema: Schema.Struct<{
|
|
217
|
+
readonly streamId: Schema.NonEmptyString;
|
|
218
|
+
readonly sequence: Schema.Int;
|
|
219
|
+
readonly previous: Schema.Int;
|
|
220
|
+
readonly part: Schema.Int;
|
|
221
|
+
readonly kind: Schema.Literals<readonly ["snapshot", "patch"]>;
|
|
222
|
+
readonly changes: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
223
|
+
readonly kind: Schema.Literal<"put">;
|
|
224
|
+
readonly record: Schema.Union<readonly [Schema.Struct<{
|
|
225
|
+
readonly kind: Schema.Literal<"base">;
|
|
226
|
+
readonly objectType: Schema.String;
|
|
227
|
+
readonly key: Schema.Union<readonly [Schema.String, Schema.Finite]>;
|
|
228
|
+
readonly value: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
229
|
+
}>, Schema.Struct<{
|
|
230
|
+
readonly kind: Schema.Literal<"override">;
|
|
231
|
+
readonly objectType: Schema.String;
|
|
232
|
+
readonly key: Schema.Union<readonly [Schema.String, Schema.Finite]>;
|
|
233
|
+
readonly value: Schema.Union<readonly [Schema.Struct<{
|
|
234
|
+
readonly deleted: Schema.Literal<true>;
|
|
235
|
+
}>, Schema.Struct<{
|
|
236
|
+
readonly deleted: Schema.Literal<false>;
|
|
237
|
+
readonly value: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
238
|
+
}>]>;
|
|
239
|
+
}>, Schema.Struct<{
|
|
240
|
+
readonly kind: Schema.Literals<readonly ["pending", "completed"]>;
|
|
241
|
+
readonly id: Schema.String;
|
|
242
|
+
readonly value: Schema.Struct<{
|
|
243
|
+
readonly invocation: Schema.Struct<{
|
|
244
|
+
readonly id: Schema.NonEmptyString;
|
|
245
|
+
readonly name: Schema.NonEmptyString;
|
|
246
|
+
readonly parameters: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
247
|
+
readonly replay: Schema.optional<Schema.Struct<{
|
|
248
|
+
readonly now: Schema.String;
|
|
249
|
+
readonly seed: Schema.NonEmptyString;
|
|
250
|
+
}>>;
|
|
251
|
+
}>;
|
|
252
|
+
readonly requestIdentity: Schema.String;
|
|
253
|
+
readonly createdAt: Schema.Finite;
|
|
254
|
+
readonly sequence: Schema.Int;
|
|
255
|
+
readonly state: Schema.Literals<readonly ["queued", "sending", "acknowledged", "blocked"]>;
|
|
256
|
+
readonly optimistic: Schema.Boolean;
|
|
257
|
+
readonly attempts: Schema.Int;
|
|
258
|
+
readonly retryFromAttempt: Schema.optional<Schema.Int>;
|
|
259
|
+
readonly nextAttemptAt: Schema.optional<Schema.Finite>;
|
|
260
|
+
readonly failureMessage: Schema.optional<Schema.String>;
|
|
261
|
+
readonly failureIssues: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
262
|
+
readonly message: Schema.String;
|
|
263
|
+
readonly path: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Number]>>>;
|
|
264
|
+
readonly code: Schema.optional<Schema.String>;
|
|
265
|
+
readonly category: Schema.optional<Schema.Literals<readonly ["input", "reference", "custom"]>>;
|
|
266
|
+
readonly source: Schema.optional<Schema.Literals<readonly ["parameter", "submission", "user-facing"]>>;
|
|
267
|
+
readonly messageSource: Schema.optional<Schema.Literals<readonly ["standard", "configured"]>>;
|
|
268
|
+
}>>>;
|
|
269
|
+
readonly completedAt: Schema.optional<Schema.Finite>;
|
|
270
|
+
readonly retryRequiresAcknowledgement: Schema.optional<Schema.Boolean>;
|
|
271
|
+
readonly failureOutcome: Schema.optional<Schema.Literals<readonly ["not-committed", "unknown"]>>;
|
|
272
|
+
readonly failureRetryable: Schema.optional<Schema.Boolean>;
|
|
273
|
+
readonly receipt: Schema.optional<Schema.Struct<{
|
|
274
|
+
readonly operationId: Schema.String;
|
|
275
|
+
readonly outcome: Schema.Literal<"committed">;
|
|
276
|
+
readonly result: Schema.optional<Schema.Unknown>;
|
|
277
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
278
|
+
readonly providerOperationId: Schema.optional<Schema.String>;
|
|
279
|
+
readonly affected: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
280
|
+
readonly objectType: Schema.String;
|
|
281
|
+
readonly keys: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite]>>>;
|
|
282
|
+
}>>>;
|
|
283
|
+
readonly affectedComplete: Schema.optional<Schema.Boolean>;
|
|
284
|
+
readonly attachmentIdMappings: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
285
|
+
readonly localId: Schema.String;
|
|
286
|
+
readonly remoteId: Schema.String;
|
|
287
|
+
}>>>;
|
|
288
|
+
}>>;
|
|
289
|
+
readonly failure: Schema.optional<Schema.Literals<readonly ["Unauthenticated", "Forbidden", "NotFound", "ValidationFailed", "InvalidRequest", "InvalidResponse", "InvalidConfiguration", "Conflict", "NotImplemented", "RateLimited", "Unavailable", "Internal", "HistoryExpired", "SessionExpired", "SessionReplaced", "ViewReplaced", "ResultExpired", "SourceMismatch", "SchemaMismatch"]>>;
|
|
290
|
+
readonly touchedTypes: Schema.$Array<Schema.String>;
|
|
291
|
+
readonly submission: Schema.optional<Schema.Struct<{
|
|
292
|
+
readonly clientId: Schema.NonEmptyString;
|
|
293
|
+
readonly sequence: Schema.Int;
|
|
294
|
+
}>>;
|
|
295
|
+
}>;
|
|
296
|
+
}>]>;
|
|
297
|
+
}>, Schema.Struct<{
|
|
298
|
+
readonly kind: Schema.Literal<"remove">;
|
|
299
|
+
readonly ref: Schema.Union<readonly [Schema.Struct<{
|
|
300
|
+
readonly kind: Schema.Literals<readonly ["base", "override"]>;
|
|
301
|
+
readonly objectType: Schema.String;
|
|
302
|
+
readonly key: Schema.Union<readonly [Schema.String, Schema.Finite]>;
|
|
303
|
+
}>, Schema.Struct<{
|
|
304
|
+
readonly kind: Schema.Literals<readonly ["pending", "completed"]>;
|
|
305
|
+
readonly id: Schema.String;
|
|
306
|
+
}>]>;
|
|
307
|
+
}>]>>;
|
|
308
|
+
readonly end: Schema.Boolean;
|
|
309
|
+
readonly metadata: Schema.optional<Schema.Struct<{
|
|
310
|
+
readonly sourceId: Schema.NonEmptyString;
|
|
311
|
+
readonly schemaHash: Schema.NonEmptyString;
|
|
312
|
+
readonly generation: Schema.Int;
|
|
313
|
+
readonly revision: Schema.Int;
|
|
314
|
+
readonly cursor: Schema.optional<Schema.String>;
|
|
315
|
+
readonly coverage: Schema.$Array<Schema.Struct<{
|
|
316
|
+
readonly subset: Schema.Struct<{
|
|
317
|
+
readonly objectType: Schema.NonEmptyString;
|
|
318
|
+
readonly query: Schema.optional<Schema.declare<import("@party-stack/ontology-storage").Query, import("@party-stack/ontology-storage").Query>>;
|
|
319
|
+
}>;
|
|
320
|
+
readonly complete: Schema.Boolean;
|
|
321
|
+
/** Previously confirmed resident coverage, independently of current freshness. */
|
|
322
|
+
readonly cached: Schema.optional<Schema.Boolean>;
|
|
323
|
+
}>>;
|
|
324
|
+
readonly client: Schema.optional<Schema.Struct<{
|
|
325
|
+
readonly client: Schema.Struct<{
|
|
326
|
+
readonly sourceId: Schema.NonEmptyString;
|
|
327
|
+
readonly clientId: Schema.NonEmptyString;
|
|
328
|
+
readonly resumeKey: Schema.NonEmptyString;
|
|
329
|
+
}>;
|
|
330
|
+
readonly connectionId: Schema.NonEmptyString;
|
|
331
|
+
readonly expiresAt: Schema.Finite;
|
|
332
|
+
readonly acceptedThrough: Schema.Int;
|
|
333
|
+
readonly acknowledgedThrough: Schema.Int;
|
|
334
|
+
readonly deliveredThrough: Schema.Int;
|
|
335
|
+
readonly deliveredRevision: Schema.Int;
|
|
336
|
+
readonly appliedRevision: Schema.Int;
|
|
337
|
+
readonly viewGeneration: Schema.optional<Schema.Int>;
|
|
338
|
+
readonly viewIdentity: Schema.optional<Schema.String>;
|
|
339
|
+
readonly deliveredViewGeneration: Schema.optional<Schema.Int>;
|
|
340
|
+
}>>;
|
|
341
|
+
}>>;
|
|
342
|
+
}>;
|
|
343
|
+
export type DeliveryFrame = Schema.Schema.Type<typeof DeliveryFrameSchema>;
|
|
344
|
+
export declare const DeliveryFrameCodec: Schema.Codec<{
|
|
345
|
+
readonly streamId: string;
|
|
346
|
+
readonly sequence: number;
|
|
347
|
+
readonly previous: number;
|
|
348
|
+
readonly part: number;
|
|
349
|
+
readonly kind: "patch" | "snapshot";
|
|
350
|
+
readonly changes: readonly ({
|
|
351
|
+
readonly kind: "put";
|
|
352
|
+
readonly record: {
|
|
353
|
+
readonly kind: "base";
|
|
354
|
+
readonly objectType: string;
|
|
355
|
+
readonly key: string | number;
|
|
356
|
+
readonly value: {
|
|
357
|
+
readonly [x: string]: unknown;
|
|
358
|
+
};
|
|
359
|
+
} | {
|
|
360
|
+
readonly kind: "override";
|
|
361
|
+
readonly objectType: string;
|
|
362
|
+
readonly key: string | number;
|
|
363
|
+
readonly value: {
|
|
364
|
+
readonly deleted: true;
|
|
365
|
+
} | {
|
|
366
|
+
readonly deleted: false;
|
|
367
|
+
readonly value: {
|
|
368
|
+
readonly [x: string]: unknown;
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
} | {
|
|
372
|
+
readonly kind: "completed" | "pending";
|
|
373
|
+
readonly id: string;
|
|
374
|
+
readonly value: {
|
|
375
|
+
readonly invocation: {
|
|
376
|
+
readonly id: string;
|
|
377
|
+
readonly name: string;
|
|
378
|
+
readonly parameters: {
|
|
379
|
+
readonly [x: string]: unknown;
|
|
380
|
+
};
|
|
381
|
+
readonly replay?: {
|
|
382
|
+
readonly now: string;
|
|
383
|
+
readonly seed: string;
|
|
384
|
+
} | undefined;
|
|
385
|
+
};
|
|
386
|
+
readonly requestIdentity: string;
|
|
387
|
+
readonly createdAt: number;
|
|
388
|
+
readonly sequence: number;
|
|
389
|
+
readonly state: "acknowledged" | "blocked" | "queued" | "sending";
|
|
390
|
+
readonly optimistic: boolean;
|
|
391
|
+
readonly attempts: number;
|
|
392
|
+
readonly retryFromAttempt?: number | undefined;
|
|
393
|
+
readonly nextAttemptAt?: number | undefined;
|
|
394
|
+
readonly failureMessage?: string | undefined;
|
|
395
|
+
readonly failureIssues?: readonly {
|
|
396
|
+
readonly message: string;
|
|
397
|
+
readonly path?: readonly (string | number)[] | undefined;
|
|
398
|
+
readonly code?: string | undefined;
|
|
399
|
+
readonly category?: "custom" | "input" | "reference" | undefined;
|
|
400
|
+
readonly source?: "parameter" | "submission" | "user-facing" | undefined;
|
|
401
|
+
readonly messageSource?: "configured" | "standard" | undefined;
|
|
402
|
+
}[] | undefined;
|
|
403
|
+
readonly completedAt?: number | undefined;
|
|
404
|
+
readonly retryRequiresAcknowledgement?: boolean | undefined;
|
|
405
|
+
readonly failureOutcome?: "not-committed" | "unknown" | undefined;
|
|
406
|
+
readonly failureRetryable?: boolean | undefined;
|
|
407
|
+
readonly receipt?: {
|
|
408
|
+
readonly operationId: string;
|
|
409
|
+
readonly outcome: "committed";
|
|
410
|
+
readonly result?: unknown;
|
|
411
|
+
readonly cursor?: string | undefined;
|
|
412
|
+
readonly providerOperationId?: string | undefined;
|
|
413
|
+
readonly affected?: readonly {
|
|
414
|
+
readonly objectType: string;
|
|
415
|
+
readonly keys?: readonly (string | number)[] | undefined;
|
|
416
|
+
}[] | undefined;
|
|
417
|
+
readonly affectedComplete?: boolean | undefined;
|
|
418
|
+
readonly attachmentIdMappings?: readonly {
|
|
419
|
+
readonly localId: string;
|
|
420
|
+
readonly remoteId: string;
|
|
421
|
+
}[] | undefined;
|
|
422
|
+
} | undefined;
|
|
423
|
+
readonly failure?: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced" | undefined;
|
|
424
|
+
readonly touchedTypes: readonly string[];
|
|
425
|
+
readonly submission?: {
|
|
426
|
+
readonly clientId: string;
|
|
427
|
+
readonly sequence: number;
|
|
428
|
+
} | undefined;
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
} | {
|
|
432
|
+
readonly kind: "remove";
|
|
433
|
+
readonly ref: {
|
|
434
|
+
readonly kind: "base" | "override";
|
|
435
|
+
readonly objectType: string;
|
|
436
|
+
readonly key: string | number;
|
|
437
|
+
} | {
|
|
438
|
+
readonly kind: "completed" | "pending";
|
|
439
|
+
readonly id: string;
|
|
440
|
+
};
|
|
441
|
+
})[];
|
|
442
|
+
readonly end: boolean;
|
|
443
|
+
readonly metadata?: {
|
|
444
|
+
readonly sourceId: string;
|
|
445
|
+
readonly schemaHash: string;
|
|
446
|
+
readonly generation: number;
|
|
447
|
+
readonly revision: number;
|
|
448
|
+
readonly cursor?: string | undefined;
|
|
449
|
+
readonly coverage: readonly {
|
|
450
|
+
readonly subset: {
|
|
451
|
+
readonly objectType: string;
|
|
452
|
+
readonly query?: import("@party-stack/ontology-storage").Query | undefined;
|
|
453
|
+
};
|
|
454
|
+
readonly complete: boolean;
|
|
455
|
+
readonly cached?: boolean | undefined;
|
|
456
|
+
}[];
|
|
457
|
+
readonly client?: {
|
|
458
|
+
readonly client: {
|
|
459
|
+
readonly sourceId: string;
|
|
460
|
+
readonly clientId: string;
|
|
461
|
+
readonly resumeKey: string;
|
|
462
|
+
};
|
|
463
|
+
readonly connectionId: string;
|
|
464
|
+
readonly expiresAt: number;
|
|
465
|
+
readonly acceptedThrough: number;
|
|
466
|
+
readonly acknowledgedThrough: number;
|
|
467
|
+
readonly deliveredThrough: number;
|
|
468
|
+
readonly deliveredRevision: number;
|
|
469
|
+
readonly appliedRevision: number;
|
|
470
|
+
readonly viewGeneration?: number | undefined;
|
|
471
|
+
readonly viewIdentity?: string | undefined;
|
|
472
|
+
readonly deliveredViewGeneration?: number | undefined;
|
|
473
|
+
} | undefined;
|
|
474
|
+
} | undefined;
|
|
475
|
+
}, string, never, never>;
|
|
476
|
+
export interface DeliverySubscription {
|
|
477
|
+
readonly frames: Stream.Stream<DeliveryFrame, BackendError>;
|
|
478
|
+
readonly acknowledge: (position: DeliveryPosition) => Effect.Effect<void, BackendError>;
|
|
479
|
+
}
|
|
480
|
+
export interface IncomingDelivery {
|
|
481
|
+
readonly kind: "snapshot" | "patch";
|
|
482
|
+
readonly position: DeliveryPosition;
|
|
483
|
+
readonly metadata: DeliveryMetadata;
|
|
484
|
+
readonly forEach: (visit: (change: DeliveryChange) => Effect.Effect<void, BackendError>) => Effect.Effect<void, BackendError>;
|
|
485
|
+
}
|
|
486
|
+
export interface DeliveryPolicy {
|
|
487
|
+
readonly maxRecords?: number;
|
|
488
|
+
readonly maxBytes?: number;
|
|
489
|
+
readonly frameBytes?: number;
|
|
490
|
+
readonly frameRecords?: number;
|
|
491
|
+
readonly maxSubscriptions?: number;
|
|
492
|
+
readonly ackTimeoutMs?: number;
|
|
493
|
+
readonly heartbeatMs?: number;
|
|
494
|
+
/** Retain a disconnected logical subscription for resumption. Default 60 seconds. */
|
|
495
|
+
readonly retentionMs?: number;
|
|
496
|
+
}
|
|
497
|
+
export declare const deliveryRef: (record: DeliveryRecord) => DeliveryRef;
|
|
498
|
+
export declare const deliveryKey: (ref: DeliveryRef) => string;
|
|
499
|
+
/** Storage cursors keep baseline/staging scans bounded, including after a crash. */
|
|
500
|
+
export declare const scanDeliveryRows: <A>(tx: Transaction, table: Table<A>, query: import("@party-stack/ontology-storage").Query, visit: (row: Row<A>) => Effect.Effect<void, BackendError | import("@party-stack/ontology-storage").OntologyStorageError>) => Effect.Effect<void, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced"> | import("@party-stack/ontology-storage").OntologyStorageError, never>;
|
|
501
|
+
/** Query pages preserve the original window while advancing by its complete sort cursor. */
|
|
502
|
+
export declare const scanSelectedRows: <A>(load: (query: import("@party-stack/ontology-storage").Query) => Effect.Effect<readonly Row<A>[], BackendError>, query: import("@party-stack/ontology-storage").Query | undefined, visit: (row: Row<A>) => Effect.Effect<void, BackendError>) => Effect.Effect<void, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, never>;
|
|
503
|
+
/** Bounded indexed expiry, shared by admission and host maintenance. */
|
|
504
|
+
export declare const collectDeliveryGarbage: (tables: TablesService, namespace: string, maxSessions?: any) => Effect.Effect<number, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, never>;
|
|
505
|
+
/** Durable watermarks support ACK requests handled by another server instance.
|
|
506
|
+
* The owning manager adds a local wakeup; producers also observe this stored position.
|
|
507
|
+
*/
|
|
508
|
+
export declare const acknowledgeDelivery: (tables: TablesService, namespace: string, position: {
|
|
509
|
+
readonly streamId: string;
|
|
510
|
+
readonly sequence: number;
|
|
511
|
+
}) => Effect.Effect<void, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, never>;
|
|
512
|
+
export interface DeliveryOpenOptions {
|
|
513
|
+
/** Notify after every change affecting captured records or metadata. Events
|
|
514
|
+
* may coalesce; reconnect captures current state to repair a subscription gap.
|
|
515
|
+
* Heartbeats renew leases and fencing only, never poll the selected data. */
|
|
516
|
+
readonly changes: Effect.Effect<Stream.Stream<void, BackendError>, BackendError, Scope.Scope>;
|
|
517
|
+
readonly capture: (tx: Transaction, emit: (record: DeliveryRecord) => Effect.Effect<void, BackendError>) => Effect.Effect<DeliveryMetadata, BackendError>;
|
|
518
|
+
/** Renew an associated scoped client lease without capturing or advancing
|
|
519
|
+
* delivered state. Runs with the producer fence in the same transaction. */
|
|
520
|
+
readonly renew?: (tx: Transaction) => Effect.Effect<void, BackendError>;
|
|
521
|
+
readonly policy?: DeliveryPolicy;
|
|
522
|
+
readonly binding: string;
|
|
523
|
+
readonly identity: string;
|
|
524
|
+
/** Stable selected rows, excluding action interests and local generations. */
|
|
525
|
+
readonly rowSelection?: string;
|
|
526
|
+
readonly resume?: DeliveryPosition;
|
|
527
|
+
}
|
|
528
|
+
export interface DeliveryManager {
|
|
529
|
+
readonly open: (options: DeliveryOpenOptions) => Effect.Effect<DeliverySubscription, BackendError, Scope.Scope>;
|
|
530
|
+
readonly acknowledge: (position: DeliveryPosition) => Effect.Effect<void, BackendError>;
|
|
531
|
+
readonly collectGarbage: Effect.Effect<number, BackendError>;
|
|
532
|
+
}
|
|
533
|
+
/** One source owner retains bounded view buffers. Losing this scope requires a new
|
|
534
|
+
* data snapshot; action acceptance, receipts and results remain in their own durable stores.
|
|
535
|
+
* The small session header stays durable so an ACK handled by another process can
|
|
536
|
+
* advance the live producer's watermark without sharing its temporary row buffers.
|
|
537
|
+
*/
|
|
538
|
+
export declare const makeDeliveryManager: (options: {
|
|
539
|
+
readonly tables: TablesService;
|
|
540
|
+
readonly namespace: string;
|
|
541
|
+
}) => Effect.Effect<DeliveryManager, never, Scope.Scope>;
|
|
542
|
+
interface InstalledDelivery {
|
|
543
|
+
streamId: string;
|
|
544
|
+
sequence: number;
|
|
545
|
+
previous: number;
|
|
546
|
+
nextPart: number;
|
|
547
|
+
count: number;
|
|
548
|
+
bytes: number;
|
|
549
|
+
hash: string;
|
|
550
|
+
kind: "snapshot" | "patch";
|
|
551
|
+
duplicate: boolean;
|
|
552
|
+
metadata?: DeliveryMetadata;
|
|
553
|
+
}
|
|
554
|
+
/** A scoped receiver retains bounded immutable frame bytes until atomic installation.
|
|
555
|
+
* Installed positions and receipt evidence stay durable; losing partial frame bytes
|
|
556
|
+
* requires replay from the installed position, or a fresh snapshot.
|
|
557
|
+
*/
|
|
558
|
+
export declare const makeDeliveryReceiver: (options: {
|
|
559
|
+
tables: TablesService;
|
|
560
|
+
namespace: string;
|
|
561
|
+
maxRecords?: number;
|
|
562
|
+
maxBytes?: number;
|
|
563
|
+
/** Durable outcome evidence can survive a later alias/application failure. */
|
|
564
|
+
beforeApply?: (tx: Transaction, batch: IncomingDelivery) => Effect.Effect<void, BackendError>;
|
|
565
|
+
apply: (tx: Transaction, batch: IncomingDelivery) => Effect.Effect<void, BackendError>;
|
|
566
|
+
}) => Effect.Effect<{
|
|
567
|
+
installed: Effect.Effect<InstalledDelivery | undefined, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, never>;
|
|
568
|
+
resume: Effect.Effect<{
|
|
569
|
+
streamId: string;
|
|
570
|
+
sequence: number;
|
|
571
|
+
} | undefined, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, never>;
|
|
572
|
+
forget: Effect.Effect<void, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, never>;
|
|
573
|
+
receive: (input: {
|
|
574
|
+
readonly streamId: string;
|
|
575
|
+
readonly sequence: number;
|
|
576
|
+
readonly previous: number;
|
|
577
|
+
readonly part: number;
|
|
578
|
+
readonly kind: "patch" | "snapshot";
|
|
579
|
+
readonly changes: readonly ({
|
|
580
|
+
readonly kind: "put";
|
|
581
|
+
readonly record: {
|
|
582
|
+
readonly kind: "base";
|
|
583
|
+
readonly objectType: string;
|
|
584
|
+
readonly key: string | number;
|
|
585
|
+
readonly value: {
|
|
586
|
+
readonly [x: string]: unknown;
|
|
587
|
+
};
|
|
588
|
+
} | {
|
|
589
|
+
readonly kind: "override";
|
|
590
|
+
readonly objectType: string;
|
|
591
|
+
readonly key: string | number;
|
|
592
|
+
readonly value: {
|
|
593
|
+
readonly deleted: true;
|
|
594
|
+
} | {
|
|
595
|
+
readonly deleted: false;
|
|
596
|
+
readonly value: {
|
|
597
|
+
readonly [x: string]: unknown;
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
} | {
|
|
601
|
+
readonly kind: "completed" | "pending";
|
|
602
|
+
readonly id: string;
|
|
603
|
+
readonly value: {
|
|
604
|
+
readonly invocation: {
|
|
605
|
+
readonly id: string;
|
|
606
|
+
readonly name: string;
|
|
607
|
+
readonly parameters: {
|
|
608
|
+
readonly [x: string]: unknown;
|
|
609
|
+
};
|
|
610
|
+
readonly replay?: {
|
|
611
|
+
readonly now: string;
|
|
612
|
+
readonly seed: string;
|
|
613
|
+
} | undefined;
|
|
614
|
+
};
|
|
615
|
+
readonly requestIdentity: string;
|
|
616
|
+
readonly createdAt: number;
|
|
617
|
+
readonly sequence: number;
|
|
618
|
+
readonly state: "acknowledged" | "blocked" | "queued" | "sending";
|
|
619
|
+
readonly optimistic: boolean;
|
|
620
|
+
readonly attempts: number;
|
|
621
|
+
readonly retryFromAttempt?: number | undefined;
|
|
622
|
+
readonly nextAttemptAt?: number | undefined;
|
|
623
|
+
readonly failureMessage?: string | undefined;
|
|
624
|
+
readonly failureIssues?: readonly {
|
|
625
|
+
readonly message: string;
|
|
626
|
+
readonly path?: readonly (string | number)[] | undefined;
|
|
627
|
+
readonly code?: string | undefined;
|
|
628
|
+
readonly category?: "custom" | "input" | "reference" | undefined;
|
|
629
|
+
readonly source?: "parameter" | "submission" | "user-facing" | undefined;
|
|
630
|
+
readonly messageSource?: "configured" | "standard" | undefined;
|
|
631
|
+
}[] | undefined;
|
|
632
|
+
readonly completedAt?: number | undefined;
|
|
633
|
+
readonly retryRequiresAcknowledgement?: boolean | undefined;
|
|
634
|
+
readonly failureOutcome?: "not-committed" | "unknown" | undefined;
|
|
635
|
+
readonly failureRetryable?: boolean | undefined;
|
|
636
|
+
readonly receipt?: {
|
|
637
|
+
readonly operationId: string;
|
|
638
|
+
readonly outcome: "committed";
|
|
639
|
+
readonly result?: unknown;
|
|
640
|
+
readonly cursor?: string | undefined;
|
|
641
|
+
readonly providerOperationId?: string | undefined;
|
|
642
|
+
readonly affected?: readonly {
|
|
643
|
+
readonly objectType: string;
|
|
644
|
+
readonly keys?: readonly (string | number)[] | undefined;
|
|
645
|
+
}[] | undefined;
|
|
646
|
+
readonly affectedComplete?: boolean | undefined;
|
|
647
|
+
readonly attachmentIdMappings?: readonly {
|
|
648
|
+
readonly localId: string;
|
|
649
|
+
readonly remoteId: string;
|
|
650
|
+
}[] | undefined;
|
|
651
|
+
} | undefined;
|
|
652
|
+
readonly failure?: "Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced" | undefined;
|
|
653
|
+
readonly touchedTypes: readonly string[];
|
|
654
|
+
readonly submission?: {
|
|
655
|
+
readonly clientId: string;
|
|
656
|
+
readonly sequence: number;
|
|
657
|
+
} | undefined;
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
} | {
|
|
661
|
+
readonly kind: "remove";
|
|
662
|
+
readonly ref: {
|
|
663
|
+
readonly kind: "base" | "override";
|
|
664
|
+
readonly objectType: string;
|
|
665
|
+
readonly key: string | number;
|
|
666
|
+
} | {
|
|
667
|
+
readonly kind: "completed" | "pending";
|
|
668
|
+
readonly id: string;
|
|
669
|
+
};
|
|
670
|
+
})[];
|
|
671
|
+
readonly end: boolean;
|
|
672
|
+
readonly metadata?: {
|
|
673
|
+
readonly sourceId: string;
|
|
674
|
+
readonly schemaHash: string;
|
|
675
|
+
readonly generation: number;
|
|
676
|
+
readonly revision: number;
|
|
677
|
+
readonly cursor?: string | undefined;
|
|
678
|
+
readonly coverage: readonly {
|
|
679
|
+
readonly subset: {
|
|
680
|
+
readonly objectType: string;
|
|
681
|
+
readonly query?: import("@party-stack/ontology-storage").Query | undefined;
|
|
682
|
+
};
|
|
683
|
+
readonly complete: boolean;
|
|
684
|
+
readonly cached?: boolean | undefined;
|
|
685
|
+
}[];
|
|
686
|
+
readonly client?: {
|
|
687
|
+
readonly client: {
|
|
688
|
+
readonly sourceId: string;
|
|
689
|
+
readonly clientId: string;
|
|
690
|
+
readonly resumeKey: string;
|
|
691
|
+
};
|
|
692
|
+
readonly connectionId: string;
|
|
693
|
+
readonly expiresAt: number;
|
|
694
|
+
readonly acceptedThrough: number;
|
|
695
|
+
readonly acknowledgedThrough: number;
|
|
696
|
+
readonly deliveredThrough: number;
|
|
697
|
+
readonly deliveredRevision: number;
|
|
698
|
+
readonly appliedRevision: number;
|
|
699
|
+
readonly viewGeneration?: number | undefined;
|
|
700
|
+
readonly viewIdentity?: string | undefined;
|
|
701
|
+
readonly deliveredViewGeneration?: number | undefined;
|
|
702
|
+
} | undefined;
|
|
703
|
+
} | undefined;
|
|
704
|
+
}) => Effect.Effect<{
|
|
705
|
+
position: {
|
|
706
|
+
streamId: string;
|
|
707
|
+
sequence: number;
|
|
708
|
+
};
|
|
709
|
+
metadata: {
|
|
710
|
+
readonly sourceId: string;
|
|
711
|
+
readonly schemaHash: string;
|
|
712
|
+
readonly generation: number;
|
|
713
|
+
readonly revision: number;
|
|
714
|
+
readonly cursor?: string | undefined;
|
|
715
|
+
readonly coverage: readonly {
|
|
716
|
+
readonly subset: {
|
|
717
|
+
readonly objectType: string;
|
|
718
|
+
readonly query?: import("@party-stack/ontology-storage").Query | undefined;
|
|
719
|
+
};
|
|
720
|
+
readonly complete: boolean;
|
|
721
|
+
readonly cached?: boolean | undefined;
|
|
722
|
+
}[];
|
|
723
|
+
readonly client?: {
|
|
724
|
+
readonly client: {
|
|
725
|
+
readonly sourceId: string;
|
|
726
|
+
readonly clientId: string;
|
|
727
|
+
readonly resumeKey: string;
|
|
728
|
+
};
|
|
729
|
+
readonly connectionId: string;
|
|
730
|
+
readonly expiresAt: number;
|
|
731
|
+
readonly acceptedThrough: number;
|
|
732
|
+
readonly acknowledgedThrough: number;
|
|
733
|
+
readonly deliveredThrough: number;
|
|
734
|
+
readonly deliveredRevision: number;
|
|
735
|
+
readonly appliedRevision: number;
|
|
736
|
+
readonly viewGeneration?: number | undefined;
|
|
737
|
+
readonly viewIdentity?: string | undefined;
|
|
738
|
+
readonly deliveredViewGeneration?: number | undefined;
|
|
739
|
+
} | undefined;
|
|
740
|
+
};
|
|
741
|
+
duplicate: boolean;
|
|
742
|
+
} | undefined, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, never>;
|
|
743
|
+
}, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, Scope.Scope>;
|
|
744
|
+
//#endregion
|
|
745
|
+
export {};
|
|
746
|
+
//# sourceMappingURL=delivery.d.ts.map
|