@collective-intelligence/external-apps-server-sdk 0.1.35 → 0.1.37

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.
@@ -1,5 +1,8 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
+ import { Bounds, ConnectorContext, DatasetAggregateOperation, DatasetDefinition, DatasetFilter, DatasetOperation, DatasetOrder, DatasetPredicate, DatasetPredicateOperator, DatasetProviderCapabilities, DatasetProviderError, DatasetProviderResult, DatasetQueryIntent, DatasetRecordPage, DatasetResultPage, DatasetScalarType, DatasetSourceLocation, DatasetTimeBucket, DatasetValue, JsonObject, JsonPrimitive, JsonSchemaDocument, JsonValue, OperationDomainDeclaration, PackageSchemaProjection, PortableOperationAuthorization, PortableOperationDeclaration, PortableOperationDelegatedSubjectPolicy, PortableOperationEffect, PortableOperationExecutionPolicy, PortableOperationIdempotency, PortableOperationLimits, PortableOperationPrincipalKind, PortableOperationRetryPolicy, ProjectionFidelity, QueryInput, SafeDiagnostic } from '@collective-intelligence/extensions-sdk';
4
+ import { EntityCreateInput, EntityDeleteInput, EntityListQuery, EntityMemberValue, EntityOperation, EntityOperationResult, EntityPage, EntityRequest, EntityUpdateInput, EntityUploadInput, EntityUploadSlot, IdempotencyKey, PortableResourceSchema, ResourceCapabilities, ResourceCreateInput, ResourceCreateRequest, ResourceCursor, ResourceDefinition, ResourceError, ResourceErrorCode, ResourceFilter, ResourceGetRequest, ResourceId, ResourceIdentityField, ResourceJsonValue, ResourceLifecycleInput, ResourceLifecycleRequest, ResourceListQuery, ResourceListRequest, ResourceListResult, ResourceMutationInput, ResourcePagination, ResourcePaginationMode, ResourceRecord, ResourceRecordId, ResourceResult, ResourceRevision, ResourceSort, ResourceTransportRequest, ResourceUpdateRequest } from '@collective-intelligence/external-apps-client-sdk/resources';
5
+
3
6
  /** Application login identities are separate from gateway machine callers. */
4
7
  export type ApplicationUserIdentity = Readonly<{
5
8
  kind: "local_user";
@@ -51,277 +54,6 @@ export interface ExternalApplicationExternalAuditSubject {
51
54
  readonly mappedUserId?: string;
52
55
  readonly subjectId: string;
53
56
  }
54
- export type ResourceJsonValue = null | boolean | number | string | readonly ResourceJsonValue[] | Readonly<{
55
- [key: string]: ResourceJsonValue;
56
- }>;
57
- /** Opaque wire identity. Callers must not infer or concatenate its internals. */
58
- export type ResourceId = string;
59
- export type ResourceRecordId = ResourceId;
60
- /** Opaque concurrency token independent from source timestamps. */
61
- export type ResourceRevision = string;
62
- /** Opaque pagination position issued and consumed only by a resource adapter. */
63
- export type ResourceCursor = string;
64
- export type IdempotencyKey = string;
65
- export type ResourceIdentityField = Readonly<{
66
- name: string;
67
- type: "number" | "string";
68
- }>;
69
- export type ResourceCapabilities = Readonly<{
70
- create?: boolean;
71
- /** Common entity deletion is always soft deletion. */
72
- delete?: boolean;
73
- get?: boolean;
74
- hardDelete?: boolean;
75
- includeDeleted?: boolean;
76
- restore?: boolean;
77
- search: true;
78
- softDelete?: boolean;
79
- update?: boolean;
80
- /** File uploads for the File fields of a common entity resource. */
81
- upload?: boolean;
82
- }>;
83
- export type ResourcePaginationMode = "cursor" | "page";
84
- export type PortableResourceSchema = Readonly<Record<string, ResourceJsonValue>>;
85
- export type ResourceDefinition<Entity, Create = Entity, Update = Partial<Entity>> = Readonly<{
86
- capabilities: ResourceCapabilities;
87
- concurrency: "revision";
88
- id: string;
89
- identity: Readonly<{
90
- fields: readonly [
91
- ResourceIdentityField,
92
- ...ResourceIdentityField[]
93
- ];
94
- }>;
95
- query: Readonly<{
96
- filterableFields: readonly string[];
97
- pagination: Readonly<{
98
- modes: readonly ResourcePaginationMode[];
99
- }>;
100
- sortableFields: readonly string[];
101
- textSearchFields?: readonly string[];
102
- }>;
103
- schemas: Readonly<{
104
- create?: PortableResourceSchema;
105
- entity: PortableResourceSchema;
106
- update?: PortableResourceSchema;
107
- }>;
108
- version: string;
109
- /** Portable UI metadata; required/enum/nullability remain in schemas. */
110
- metadata?: Readonly<Record<string, ResourceJsonValue>>;
111
- /** Type-only slots keep definition values portable and serializable. */
112
- readonly __types?: Readonly<{
113
- create: Create;
114
- entity: Entity;
115
- update: Update;
116
- }>;
117
- }>;
118
- export type FilterValue = ResourceJsonValue | readonly ResourceJsonValue[];
119
- /**
120
- * A filter predicate. `field` names a declared filterable field, or a path
121
- * through at most three fields that hold Entity References to a field of
122
- * the last target, such as `company.industry` or
123
- * `contacts.company.parent.industry`. On a field that holds Entity
124
- * References, `is_empty` means no reference. User fields accept identity
125
- * predicates for one ID and `contains_any`, `contains_all`, `contains_none`
126
- * for multiple IDs, plus empty/not-empty aliases. CI validates operators
127
- * against the actual field semantic; UUID shape alone does not declare User.
128
- */
129
- export type ResourceFilter = Readonly<{
130
- field: string;
131
- operator: "contains" | "contains_all" | "contains_any" | "contains_none" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
132
- value: FilterValue;
133
- }> | Readonly<{
134
- field: string;
135
- operator: "is_empty" | "is_not_empty" | "is_not_null" | "is_null";
136
- }> | Readonly<{
137
- filters: readonly ResourceFilter[];
138
- operator: "and" | "or";
139
- }> | Readonly<{
140
- filter: ResourceFilter;
141
- operator: "not";
142
- }>;
143
- export type ResourceSort = Readonly<{
144
- direction: "asc" | "desc";
145
- field: string;
146
- }>;
147
- export type ResourcePagination = Readonly<{
148
- mode: "cursor";
149
- cursor?: ResourceCursor;
150
- limit: number;
151
- }> | Readonly<{
152
- mode: "page";
153
- page: number;
154
- pageSize: number;
155
- }>;
156
- export type ResourceListQuery = Readonly<{
157
- filter?: ResourceFilter;
158
- /**
159
- * Include Paths, such as `["company", "contacts.company"]`: relation
160
- * fields whose records each item carries in `included`.
161
- */
162
- include?: readonly string[];
163
- includeDeleted?: boolean;
164
- pagination: ResourcePagination;
165
- sort?: readonly ResourceSort[];
166
- textSearch?: string;
167
- }>;
168
- export type ResourceRecord<Entity> = Readonly<{
169
- deletedAt?: string;
170
- id: ResourceRecordId;
171
- /**
172
- * The records of the read's Include Paths by relation field key: one
173
- * record, or the records of a `many` field in reference order. Untyped:
174
- * the target schemas are CI's.
175
- */
176
- included?: Readonly<Record<string, ResourceJsonValue>>;
177
- revision: ResourceRevision;
178
- /** The keys whose included records were cut to the first 100. */
179
- truncated?: readonly string[];
180
- value: Entity;
181
- }>;
182
- export type ResourceListResult<Entity> = Readonly<{
183
- items: readonly ResourceRecord<Entity>[];
184
- nextCursor?: ResourceCursor;
185
- pagination: "cursor";
186
- }> | Readonly<{
187
- items: readonly ResourceRecord<Entity>[];
188
- page: number;
189
- pageSize: number;
190
- pagination: "page";
191
- totalItems: number;
192
- totalPages: number;
193
- }>;
194
- export type ResourceErrorCode = "capability_not_supported" | "conflict" | "forbidden" | "internal" | "invalid_request" | "not_found" | "rate_limited" | "transport_error" | "unauthenticated" | "unavailable" |
195
- /** The CI Organization storage can not take a presigned File upload. */
196
- "upload_not_supported";
197
- export type ResourceError = Readonly<{
198
- code: ResourceErrorCode;
199
- /** Client-observed dispatch outcome; uncertainty never proves rollback. */
200
- outcome?: "not_dispatched" | "rejected" | "uncertain";
201
- details?: Readonly<Record<string, ResourceJsonValue>>;
202
- message: string;
203
- retryable: boolean;
204
- }>;
205
- export type ResourceResult<Value> = Readonly<{
206
- correlationId: string;
207
- ok: true;
208
- value: Value;
209
- }> | Readonly<{
210
- correlationId: string;
211
- error: ResourceError;
212
- ok: false;
213
- }>;
214
- export type ResourceListRequest = Readonly<{
215
- operation: "list";
216
- query: ResourceListQuery;
217
- requestId: string;
218
- resourceId: string;
219
- }>;
220
- export type ResourceGetRequest = Readonly<{
221
- id: ResourceRecordId;
222
- includeDeleted?: boolean;
223
- operation: "get";
224
- requestId: string;
225
- resourceId: string;
226
- }>;
227
- export type ResourceCreateRequest<Create> = Readonly<{
228
- idempotencyKey: IdempotencyKey;
229
- operation: "create";
230
- requestId: string;
231
- resourceId: string;
232
- value: Create;
233
- }>;
234
- export type ResourceUpdateRequest<Update> = Readonly<{
235
- expectedRevision: ResourceRevision;
236
- id: ResourceRecordId;
237
- idempotencyKey?: IdempotencyKey;
238
- operation: "update";
239
- requestId: string;
240
- resourceId: string;
241
- value: Update;
242
- }>;
243
- export type ResourceLifecycleRequest = Readonly<{
244
- expectedRevision: ResourceRevision;
245
- id: ResourceRecordId;
246
- idempotencyKey?: IdempotencyKey;
247
- operation: "hard_delete" | "restore" | "soft_delete";
248
- requestId: string;
249
- resourceId: string;
250
- }>;
251
- export type ResourceTransportRequest = ResourceCreateRequest<unknown> | ResourceGetRequest | ResourceLifecycleRequest | ResourceListRequest | ResourceUpdateRequest<unknown>;
252
- export type ResourceMutationInput<Value> = Readonly<{
253
- expectedRevision: ResourceRevision;
254
- id: ResourceRecordId;
255
- idempotencyKey?: IdempotencyKey;
256
- value: Value;
257
- }>;
258
- export type ResourceLifecycleInput = Readonly<{
259
- expectedRevision: ResourceRevision;
260
- id: ResourceRecordId;
261
- idempotencyKey?: IdempotencyKey;
262
- }>;
263
- export type ResourceCreateInput<Value> = Readonly<{
264
- idempotencyKey: IdempotencyKey;
265
- value: Value;
266
- }>;
267
- /** Common entity operations. Generic resource lifecycle/cursor APIs remain separate. */
268
- export type EntityOperation = "list_members" | "list" | "get" | "create" | "update" | "delete" | "upload";
269
- export type EntityListQuery = Omit<ResourceListQuery, "pagination" | "includeDeleted"> & Readonly<{
270
- pagination: Extract<ResourcePagination, {
271
- mode: "page";
272
- }>;
273
- }>;
274
- export type EntityPage<Value> = Extract<ResourceListResult<Value>, {
275
- pagination: "page";
276
- }>;
277
- /** Member schemas are resolved by CI, independently of the parent resource. */
278
- export type EntityMemberValue = Readonly<Record<string, ResourceJsonValue>>;
279
- export type EntityCreateInput<Value> = ResourceCreateInput<Value>;
280
- export type EntityUpdateInput<Patch> = ResourceMutationInput<Patch> & Readonly<{
281
- idempotencyKey: IdempotencyKey;
282
- }>;
283
- export type EntityDeleteInput = ResourceLifecycleInput & Readonly<{
284
- idempotencyKey: IdempotencyKey;
285
- }>;
286
- /** A File upload request for one File field of the entity schema. */
287
- export type EntityUploadInput = Readonly<{
288
- field: string;
289
- filename: string;
290
- mimeType: string;
291
- }>;
292
- /** PUT the file bytes to `url` with `headers`; then write `{ upload: uploadId }`. */
293
- export type EntityUploadSlot = Readonly<{
294
- headers: Readonly<Record<string, string>>;
295
- method: "PUT";
296
- uploadId: string;
297
- url: string;
298
- }>;
299
- export type EntityRequestIdentity = Readonly<{
300
- requestId: string;
301
- resourceId: string;
302
- }>;
303
- export type EntityRequest<Create = unknown, Patch = unknown> = EntityRequestIdentity & (Readonly<{
304
- operation: "list";
305
- query: EntityListQuery;
306
- }> | Readonly<{
307
- operation: "list_members";
308
- parentId: ResourceRecordId;
309
- field: string;
310
- query: EntityListQuery;
311
- }> | Readonly<{
312
- operation: "get";
313
- id: ResourceRecordId;
314
- include?: readonly string[];
315
- }> | (Readonly<{
316
- operation: "create";
317
- }> & EntityCreateInput<Create>) | (Readonly<{
318
- operation: "update";
319
- }> & EntityUpdateInput<Patch>) | (Readonly<{
320
- operation: "delete";
321
- }> & EntityDeleteInput) | (Readonly<{
322
- operation: "upload";
323
- }> & EntityUploadInput));
324
- export type EntityOperationResult<Value, Operation extends EntityOperation> = Operation extends "list_members" ? EntityPage<EntityMemberValue> : Operation extends "list" ? EntityPage<Value> : Operation extends "upload" ? EntityUploadSlot : ResourceRecord<Value>;
325
57
  export interface ConfidentialCredentials {
326
58
  readonly clientId: string;
327
59
  readonly clientSecret: string;
@@ -486,334 +218,6 @@ export type ResourceHttpHandlerOptions<Value = unknown, Create = Value, Patch =
486
218
  authorize: (request: Request, operation: ResourceTransportRequest["operation"] | EntityOperation) => Promise<EntityInvocationContext | Response>;
487
219
  maxBodyBytes?: number;
488
220
  }>;
489
- export type JsonPrimitive = boolean | null | number | string;
490
- export type JsonValue = JsonObject | JsonPrimitive | readonly JsonValue[];
491
- export interface JsonObject {
492
- readonly [key: string]: JsonValue;
493
- }
494
- declare const Draft202012Dialect: "https://json-schema.org/draft/2020-12/schema";
495
- /** JSON-compatible Draft 2020-12 vocabulary used for portable manifests. */
496
- export type JsonSchemaDocument = JsonObject & Readonly<{
497
- $anchor?: string;
498
- $comment?: string;
499
- $defs?: Readonly<Record<string, JsonSchemaDocument>>;
500
- $dynamicAnchor?: string;
501
- $dynamicRef?: string;
502
- $id?: string;
503
- $ref?: string;
504
- $schema?: typeof Draft202012Dialect;
505
- additionalProperties?: boolean | JsonSchemaDocument;
506
- allOf?: readonly JsonSchemaDocument[];
507
- anyOf?: readonly JsonSchemaDocument[];
508
- const?: JsonValue;
509
- contains?: JsonSchemaDocument;
510
- default?: JsonValue;
511
- dependentRequired?: Readonly<Record<string, readonly string[]>>;
512
- description?: string;
513
- else?: JsonSchemaDocument;
514
- enum?: readonly JsonValue[];
515
- exclusiveMaximum?: number;
516
- exclusiveMinimum?: number;
517
- format?: string;
518
- if?: JsonSchemaDocument;
519
- items?: JsonSchemaDocument;
520
- maxItems?: number;
521
- maxLength?: number;
522
- maxProperties?: number;
523
- maximum?: number;
524
- minItems?: number;
525
- minLength?: number;
526
- minProperties?: number;
527
- minimum?: number;
528
- multipleOf?: number;
529
- not?: JsonSchemaDocument;
530
- oneOf?: readonly JsonSchemaDocument[];
531
- pattern?: string;
532
- patternProperties?: Readonly<Record<string, JsonSchemaDocument>>;
533
- prefixItems?: readonly JsonSchemaDocument[];
534
- properties?: Readonly<Record<string, JsonSchemaDocument>>;
535
- required?: readonly string[];
536
- then?: JsonSchemaDocument;
537
- title?: string;
538
- type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string" | readonly ("array" | "boolean" | "integer" | "null" | "number" | "object" | "string")[];
539
- unevaluatedItems?: boolean | JsonSchemaDocument;
540
- unevaluatedProperties?: boolean | JsonSchemaDocument;
541
- uniqueItems?: boolean;
542
- }>;
543
- export type ProjectionFidelity = "exact" | "structural";
544
- export type PackageSchemaProjection = Readonly<{
545
- dialect: typeof Draft202012Dialect;
546
- document: JsonSchemaDocument;
547
- fidelity: ProjectionFidelity;
548
- }>;
549
- export type DatasetProviderResult<Value> = Readonly<{
550
- status: "success";
551
- value: Value;
552
- }> | Readonly<{
553
- status: "failure";
554
- error: DatasetProviderError;
555
- }>;
556
- export type DatasetScalarType = "boolean" | "string" | "int64" | "float64" | "decimal" | "date" | "timestamp" | "duration" | "json";
557
- export type DatasetValue = Readonly<{
558
- kind: "null";
559
- }> | Readonly<{
560
- kind: "boolean";
561
- value: boolean;
562
- }> | Readonly<{
563
- kind: "string";
564
- value: string;
565
- }> | Readonly<{
566
- kind: "int64";
567
- value: string;
568
- }> | Readonly<{
569
- kind: "float64";
570
- value: number;
571
- }> | Readonly<{
572
- kind: "decimal";
573
- value: string;
574
- }> | Readonly<{
575
- kind: "date";
576
- value: string;
577
- }> | Readonly<{
578
- kind: "timestamp";
579
- value: string;
580
- }> | Readonly<{
581
- kind: "duration";
582
- value: string;
583
- }> | Readonly<{
584
- kind: "json";
585
- value: JsonValue;
586
- }>;
587
- export type DatasetPredicateOperator = "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "is_null" | "is_not_null" | "contains" | "starts_with";
588
- export type DatasetAggregateOperation = "count" | "count_distinct" | "sum" | "min" | "max" | "avg";
589
- export type DatasetQueryIntent = "records" | "aggregate" | "time_series";
590
- export type DatasetTimeBucket = "hour" | "day" | "week" | "month";
591
- export type DatasetPredicate = Readonly<{
592
- kind: "predicate";
593
- fieldId: string;
594
- operator: DatasetPredicateOperator;
595
- values: readonly DatasetValue[];
596
- }>;
597
- export type DatasetFilter = DatasetPredicate | Readonly<{
598
- kind: "and" | "or";
599
- filters: readonly DatasetFilter[];
600
- }> | Readonly<{
601
- kind: "not";
602
- filter: DatasetFilter;
603
- }>;
604
- export type DatasetOrder = Readonly<{
605
- fieldOrAlias: string;
606
- direction: "asc" | "desc";
607
- }>;
608
- export type DatasetOperation = Readonly<{
609
- kind: "records";
610
- projection: readonly string[];
611
- filter?: DatasetFilter;
612
- orderBy: readonly DatasetOrder[];
613
- cursor?: string;
614
- }> | Readonly<{
615
- kind: "aggregate";
616
- filter?: DatasetFilter;
617
- groupBy: readonly string[];
618
- measures: readonly Readonly<{
619
- alias: string;
620
- operation: DatasetAggregateOperation;
621
- fieldId?: string;
622
- }>[];
623
- orderBy: readonly DatasetOrder[];
624
- cursor?: string;
625
- }> | Readonly<{
626
- kind: "time_series";
627
- timeFieldId: string;
628
- measure: Readonly<{
629
- alias: string;
630
- operation: DatasetAggregateOperation;
631
- fieldId?: string;
632
- }>;
633
- bucket: DatasetTimeBucket;
634
- order: "asc" | "desc";
635
- filter?: DatasetFilter;
636
- cursor?: string;
637
- }>;
638
- export type DatasetProviderCapabilities = Readonly<{
639
- intents: readonly DatasetQueryIntent[];
640
- predicates: readonly DatasetPredicateOperator[];
641
- aggregates: readonly DatasetAggregateOperation[];
642
- grouping: boolean;
643
- ordering: boolean;
644
- pagination: boolean;
645
- definitionRefresh: boolean;
646
- limits: Readonly<{
647
- maxRows: number;
648
- maxBytes: number;
649
- timeoutMs: number;
650
- maxPageRows: number;
651
- }>;
652
- }>;
653
- export type SafeDiagnostic = Readonly<{
654
- code: string;
655
- message: string;
656
- fieldId?: string;
657
- }>;
658
- export type ConnectorContext = Readonly<{
659
- correlationId: string;
660
- deadlineEpochMs: number;
661
- }>;
662
- export type DatasetSourceLocation = Readonly<{
663
- segments: readonly [
664
- Readonly<{
665
- kind: "container";
666
- opaqueId: string;
667
- label: string;
668
- }>,
669
- ...Readonly<{
670
- kind: "container" | "dataset";
671
- opaqueId: string;
672
- label: string;
673
- }>[]
674
- ];
675
- }>;
676
- export type DatasetDefinition = Readonly<{
677
- version: 1;
678
- fields: readonly Readonly<{
679
- id: string;
680
- name: string;
681
- type: DatasetScalarType;
682
- nullable: boolean;
683
- semantic?: string;
684
- }>[];
685
- measures: readonly Readonly<{
686
- id: string;
687
- name: string;
688
- resultType: DatasetScalarType;
689
- }>[];
690
- relationships: readonly Readonly<{
691
- id: string;
692
- fromFieldId: string;
693
- toFieldId: string;
694
- cardinality: "one_to_one" | "one_to_many" | "many_to_one" | "many_to_many";
695
- }>[];
696
- }>;
697
- export type Bounds = Readonly<{
698
- maxRows: number;
699
- maxBytes: number;
700
- timeoutMs: number;
701
- }>;
702
- export type QueryInput = ConnectorContext & Readonly<{
703
- location: DatasetSourceLocation;
704
- definitionRevisionId: string;
705
- definition: DatasetDefinition;
706
- operation: DatasetOperation;
707
- bounds: Bounds;
708
- }>;
709
- export type DatasetRecordPage = Readonly<{
710
- columns: readonly Readonly<{
711
- fieldId: string;
712
- type: DatasetScalarType;
713
- }>[];
714
- rows: readonly (readonly DatasetValue[])[];
715
- nextCursor?: string;
716
- rowCount: number;
717
- byteCount: number;
718
- observedAt: string;
719
- }>;
720
- export type DatasetResultPage = (Readonly<{
721
- kind: "records";
722
- }> & DatasetRecordPage) | Readonly<{
723
- kind: "aggregate";
724
- columns: readonly Readonly<{
725
- alias: string;
726
- type: DatasetScalarType;
727
- }>[];
728
- rows: readonly (readonly DatasetValue[])[];
729
- nextCursor?: string;
730
- rowCount: number;
731
- byteCount: number;
732
- observedAt: string;
733
- }> | Readonly<{
734
- kind: "time_series";
735
- valueType: DatasetScalarType;
736
- points: readonly Readonly<{
737
- time: string;
738
- value: DatasetValue;
739
- }>[];
740
- nextCursor?: string;
741
- pointCount: number;
742
- byteCount: number;
743
- observedAt: string;
744
- }>;
745
- export type DatasetProviderError = Readonly<{
746
- kind: "not_ready" | "incompatible_source" | "unsupported_operation" | "policy_not_pushable" | "invalid_cursor" | "timeout" | "permission_denied" | "provider_unavailable" | "provider_rejected" | "invalid_provider_response";
747
- diagnostics: readonly SafeDiagnostic[];
748
- }> | Readonly<{
749
- kind: "limit_exceeded";
750
- limit: "rows" | "bytes" | "timeout";
751
- diagnostics: readonly SafeDiagnostic[];
752
- }> | Readonly<{
753
- kind: "throttled";
754
- retryAfterMs?: number;
755
- diagnostics: readonly SafeDiagnostic[];
756
- }>;
757
- /** Closed public principal vocabulary accepted by a gateway operation. */
758
- export type PortableOperationPrincipalKind = "detached_user" | "service_principal";
759
- /** Explicit delegated-subject requirement reviewed with an operation. */
760
- export type PortableOperationDelegatedSubjectPolicy = "allowed" | "forbidden" | "required";
761
- /** Fully materialized authorization policy for one exposed operation. */
762
- export type PortableOperationAuthorization = Readonly<{
763
- delegatedSubject: PortableOperationDelegatedSubjectPolicy;
764
- organization: "required";
765
- principalKinds: readonly PortableOperationPrincipalKind[];
766
- scopes: readonly string[];
767
- }>;
768
- /** Observable side-effect class reviewed before an operation becomes a tool. */
769
- export type PortableOperationEffect = "external_side_effect" | "read" | "write";
770
- /** The replay guarantee supplied by the operation implementation. */
771
- export type PortableOperationIdempotency = "idempotent" | "requires_key" | "safe";
772
- /** Explicit, bounded retry permission for callers of the operation. */
773
- export type PortableOperationRetryPolicy = Readonly<{
774
- mode: "never";
775
- }> | Readonly<{
776
- maxAttempts: number;
777
- mode: "idempotent_only";
778
- }>;
779
- /** Execution lifecycle and maximum wall-clock duration. */
780
- export type PortableOperationExecutionPolicy = Readonly<{
781
- mode: "synchronous";
782
- timeoutMs: number;
783
- }>;
784
- /** Per-invocation transport bounds. */
785
- export type PortableOperationLimits = Readonly<{
786
- maxRequestBytes: number;
787
- maxResponseBytes: number;
788
- }>;
789
- /**
790
- * Complete JSON-only operation contract reviewed by a host. Executable
791
- * handlers remain in a server runtime sidecar and never enter this descriptor.
792
- */
793
- export type PortableOperationDeclaration = Readonly<{
794
- authorization: PortableOperationAuthorization;
795
- description: string;
796
- effects: PortableOperationEffect;
797
- execution: PortableOperationExecutionPolicy;
798
- id: string;
799
- idempotency: PortableOperationIdempotency;
800
- input: PackageSchemaProjection;
801
- limits: PortableOperationLimits;
802
- output: PackageSchemaProjection;
803
- retry: PortableOperationRetryPolicy;
804
- title: string;
805
- version: string;
806
- }>;
807
- /** One catalog and identity namespace for an ordered operation list. */
808
- export type OperationDomainDeclaration<Operation extends PortableOperationDeclaration = PortableOperationDeclaration> = Readonly<{
809
- description?: string;
810
- displayOrder?: number;
811
- icon?: string;
812
- id: string;
813
- operations: readonly Operation[];
814
- tags?: readonly string[];
815
- title: string;
816
- }>;
817
221
  /**
818
222
  * Runtime dispatch validates the declared input schema before invoking a
819
223
  * handler. The bivariant call signature lets domains retain heterogeneous,
@@ -945,4 +349,84 @@ export declare const cookies: (request: Request) => string | null, createCiResou
945
349
  handler: (request: Request) => Promise<Response>;
946
350
  }[], createExternalApplicationBff: (options: ExternalApplicationBffOptions) => ExternalApplicationBff, createExternalApplicationBffNextHandlers: (options: ExternalApplicationBffOptions) => GatewayNextRouteHandlers, createFixedWorkflowRoute: <Input, Params = Record<string, never>>(options: FixedWorkflowRouteOptions<Input, Params>) => ((request: Request, params: Params) => Promise<Response>), createRealtimeTicketHandler: (options: RealtimeTicketOptions) => ((request: Request) => Promise<Response>), createGatewayNextRouteHandlers: (kernel: GatewayRuntimeKernel) => GatewayNextRouteHandlers, createResourceNextRouteHandlers: <Value, Create = Value, Patch = Partial<Value>>(options: ResourceHttpHandlerOptions<Value, Create, Patch>) => ResourceNextRouteHandlers, headers: (request: Request) => Headers, publicOriginFromHeaders: (headerList: Headers, fallbackOrigin: string) => string, requestWithPublicOrigin: (request: Request, publicOrigin: string) => Request;
947
351
 
352
+ export {
353
+ Bounds,
354
+ ConnectorContext,
355
+ DatasetAggregateOperation,
356
+ DatasetDefinition,
357
+ DatasetFilter,
358
+ DatasetOperation,
359
+ DatasetOrder,
360
+ DatasetPredicate,
361
+ DatasetPredicateOperator,
362
+ DatasetProviderCapabilities,
363
+ DatasetProviderError,
364
+ DatasetProviderResult,
365
+ DatasetQueryIntent,
366
+ DatasetRecordPage,
367
+ DatasetResultPage,
368
+ DatasetScalarType,
369
+ DatasetSourceLocation,
370
+ DatasetTimeBucket,
371
+ DatasetValue,
372
+ EntityCreateInput,
373
+ EntityDeleteInput,
374
+ EntityListQuery,
375
+ EntityMemberValue,
376
+ EntityOperation,
377
+ EntityOperationResult,
378
+ EntityPage,
379
+ EntityRequest,
380
+ EntityUpdateInput,
381
+ EntityUploadInput,
382
+ EntityUploadSlot,
383
+ IdempotencyKey,
384
+ JsonObject,
385
+ JsonPrimitive,
386
+ JsonSchemaDocument,
387
+ JsonValue,
388
+ OperationDomainDeclaration,
389
+ PackageSchemaProjection,
390
+ PortableOperationAuthorization,
391
+ PortableOperationDeclaration,
392
+ PortableOperationDelegatedSubjectPolicy,
393
+ PortableOperationEffect,
394
+ PortableOperationExecutionPolicy,
395
+ PortableOperationIdempotency,
396
+ PortableOperationLimits,
397
+ PortableOperationPrincipalKind,
398
+ PortableOperationRetryPolicy,
399
+ PortableResourceSchema,
400
+ ProjectionFidelity,
401
+ QueryInput,
402
+ ResourceCapabilities,
403
+ ResourceCreateInput,
404
+ ResourceCreateRequest,
405
+ ResourceCursor,
406
+ ResourceDefinition,
407
+ ResourceError,
408
+ ResourceErrorCode,
409
+ ResourceFilter,
410
+ ResourceGetRequest,
411
+ ResourceId,
412
+ ResourceIdentityField,
413
+ ResourceJsonValue,
414
+ ResourceLifecycleInput,
415
+ ResourceLifecycleRequest,
416
+ ResourceListQuery,
417
+ ResourceListRequest,
418
+ ResourceListResult,
419
+ ResourceMutationInput,
420
+ ResourcePagination,
421
+ ResourcePaginationMode,
422
+ ResourceRecord,
423
+ ResourceRecordId,
424
+ ResourceResult,
425
+ ResourceRevision,
426
+ ResourceSort,
427
+ ResourceTransportRequest,
428
+ ResourceUpdateRequest,
429
+ SafeDiagnostic,
430
+ };
431
+
948
432
  export {};