@kubun/graphql 0.10.1 → 0.12.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/lib/context.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { Tracer } from '@enkaku/otel';
2
1
  import { DocumentID } from '@kubun/id';
3
2
  import type { AggregateHaving, AggregateSpec, AggregateValues, DocumentData, DocumentFilter, DocumentNode, DocumentOrderBy, GroupedAggregateOrderTerm, GroupedAggregateValue } from '@kubun/protocol';
4
- import type { ViewerReadAccess } from '@kubun/store-graph';
3
+ import type { StoredAccessDefaultRow, ViewerReadAccess } from '@kubun/store-graph';
4
+ import type { Tracer } from '@sozai/otel';
5
5
  import type { GraphQLResolveInfo } from 'graphql';
6
6
  import type { Connection, Edge } from 'graphql-relay';
7
7
  import type { AllConnectionArguments, ModelAccessDefaults, UpdateMutationInput } from './types.js';
@@ -83,6 +83,7 @@ export type ReadContextDB = {
83
83
  modelID: string;
84
84
  rank: number;
85
85
  }>>;
86
+ listUserModelAccessDefaults(ownerDID: string): Promise<Array<StoredAccessDefaultRow>>;
86
87
  };
87
88
  /**
88
89
  * Query scope carried alongside a connection value so child resolvers (e.g.
@@ -148,6 +149,12 @@ export type QueryContext = {
148
149
  modelID: string;
149
150
  rank: number;
150
151
  }>>;
152
+ /**
153
+ * The viewer's own stored model-access-default rows, across every model and
154
+ * permission type. Scoped to the current viewer DID - not for cross-member
155
+ * visibility.
156
+ */
157
+ listModelAccessDefaults(): Promise<Array<StoredAccessDefaultRow>>;
151
158
  };
152
159
  /**
153
160
  * Subscription functions requiring server implementation
@@ -185,6 +192,18 @@ export type ReadContextParams = {
185
192
  warnings?: Array<AccessWarning>;
186
193
  complexity?: ComplexityStats;
187
194
  tracer?: Tracer;
195
+ /**
196
+ * Maximum number of undelivered events buffered per subscription generator
197
+ * before the oldest are dropped. Defaults to
198
+ * {@link DEFAULT_SUBSCRIPTION_QUEUE_SIZE}.
199
+ */
200
+ maxSubscriptionQueueSize?: number;
201
+ /**
202
+ * Ceiling on raw rows scanned when exhausting an unbounded access-controlled
203
+ * connection query before reporting truncation. Defaults to
204
+ * {@link DEFAULT_UNBOUNDED_SCAN_CAP}.
205
+ */
206
+ unboundedScanCap?: number;
188
207
  };
189
208
  export declare function createReadContext(params: ReadContextParams): ReadOnlyContext;
190
209
  export type CreateMutationParams = {
@@ -192,6 +211,11 @@ export type CreateMutationParams = {
192
211
  data: DocumentData;
193
212
  info: GraphQLResolveInfo;
194
213
  transactionID?: string | null;
214
+ /**
215
+ * Document owner for a delegated write: the server signs while `owner` (the
216
+ * viewer) owns. Omitted means owner = signer (the ops-level owner).
217
+ */
218
+ owner?: string;
195
219
  };
196
220
  export type SetMutationParams = {
197
221
  modelID: string;
@@ -199,6 +223,11 @@ export type SetMutationParams = {
199
223
  data: DocumentData;
200
224
  info: GraphQLResolveInfo;
201
225
  transactionID?: string | null;
226
+ /**
227
+ * Document owner for a delegated write: the server signs while `owner` (the
228
+ * viewer) owns. Omitted means owner = signer (the ops-level owner).
229
+ */
230
+ owner?: string;
202
231
  };
203
232
  export type UpdateMutationParams = {
204
233
  input: UpdateMutationInput;