@collective-intelligence/external-apps-server-sdk 0.1.36 → 0.1.38
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/README.md +120 -11
- package/dist/chunks/index-zrrnrqkm.js +17 -0
- package/dist/effect.d.ts +1352 -0
- package/dist/effect.js +1 -0
- package/dist/express.d.ts +66 -500
- package/dist/gateway/contracts.d.ts +67 -500
- package/dist/gateway.d.ts +76 -503
- package/dist/gateway.js +1 -2
- package/dist/index.d.ts +89 -53
- package/dist/index.js +1 -16
- package/dist/knowledge-sources/payload.d.ts +31 -187
- package/dist/knowledge-sources/strapi.d.ts +31 -187
- package/dist/next.d.ts +358 -0
- package/dist/next.js +1 -0
- package/dist/persistence/drizzle-effect.d.ts +23 -4
- package/dist/persistence/drizzle.d.ts +51 -196
- package/dist/persistence/drizzle.js +1 -9
- package/dist/resources.d.ts +45 -274
- package/dist/resources.js +4 -11
- package/dist/runtime/effect.d.ts +141 -787
- package/dist/runtime/express.d.ts +66 -500
- package/dist/runtime/nestjs.d.ts +82 -599
- package/dist/runtime/nestjs.js +1 -8
- package/dist/runtime/next.d.ts +130 -606
- package/dist/runtime/web.d.ts +78 -505
- package/dist/runtime/web.js +1 -8
- package/dist/tools/ai-sdk.d.ts +19 -110
- package/dist/tools/ai-sdk.js +1 -2
- package/package.json +26 -14
- package/dist/persistence/drizzle-effect.js +0 -1
- package/dist/runtime/effect.js +0 -16
- package/dist/runtime/next.js +0 -8
package/dist/runtime/web.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
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 { IdempotencyKey, PortableResourceSchema, ResourceCapabilities, ResourceCreateRequest, ResourceCursor, ResourceDefinition, ResourceError, ResourceErrorCode, ResourceFilter, ResourceGetRequest, ResourceId, ResourceIdentityField, ResourceJsonValue, ResourceLifecycleRequest, ResourceListQuery, ResourceListRequest, ResourcePagination, ResourcePaginationMode, ResourceRecordId, ResourceResult, ResourceRevision, ResourceSort, ResourceTransportRequest, ResourceUpdateRequest } from '@collective-intelligence/external-apps-client-sdk/resources';
|
|
5
|
+
import * as Redacted from 'effect/Redacted';
|
|
6
|
+
|
|
3
7
|
export type PrincipalKind = "detached_user" | "service_principal";
|
|
4
8
|
export type DelegatedSubjectPolicy = "allowed" | "forbidden" | "required";
|
|
5
9
|
export type AuthorizationRequirement = Readonly<{
|
|
@@ -31,506 +35,6 @@ export type GatewayInvocationContext = Readonly<{
|
|
|
31
35
|
externalAuditSubject?: ExternalAuditSubject;
|
|
32
36
|
organizationId: string;
|
|
33
37
|
}>;
|
|
34
|
-
export type JsonPrimitive = boolean | null | number | string;
|
|
35
|
-
export type JsonValue = JsonObject | JsonPrimitive | readonly JsonValue[];
|
|
36
|
-
export interface JsonObject {
|
|
37
|
-
readonly [key: string]: JsonValue;
|
|
38
|
-
}
|
|
39
|
-
declare const Draft202012Dialect: "https://json-schema.org/draft/2020-12/schema";
|
|
40
|
-
/** JSON-compatible Draft 2020-12 vocabulary used for portable manifests. */
|
|
41
|
-
export type JsonSchemaDocument = JsonObject & Readonly<{
|
|
42
|
-
$anchor?: string;
|
|
43
|
-
$comment?: string;
|
|
44
|
-
$defs?: Readonly<Record<string, JsonSchemaDocument>>;
|
|
45
|
-
$dynamicAnchor?: string;
|
|
46
|
-
$dynamicRef?: string;
|
|
47
|
-
$id?: string;
|
|
48
|
-
$ref?: string;
|
|
49
|
-
$schema?: typeof Draft202012Dialect;
|
|
50
|
-
additionalProperties?: boolean | JsonSchemaDocument;
|
|
51
|
-
allOf?: readonly JsonSchemaDocument[];
|
|
52
|
-
anyOf?: readonly JsonSchemaDocument[];
|
|
53
|
-
const?: JsonValue;
|
|
54
|
-
contains?: JsonSchemaDocument;
|
|
55
|
-
default?: JsonValue;
|
|
56
|
-
dependentRequired?: Readonly<Record<string, readonly string[]>>;
|
|
57
|
-
description?: string;
|
|
58
|
-
else?: JsonSchemaDocument;
|
|
59
|
-
enum?: readonly JsonValue[];
|
|
60
|
-
exclusiveMaximum?: number;
|
|
61
|
-
exclusiveMinimum?: number;
|
|
62
|
-
format?: string;
|
|
63
|
-
if?: JsonSchemaDocument;
|
|
64
|
-
items?: JsonSchemaDocument;
|
|
65
|
-
maxItems?: number;
|
|
66
|
-
maxLength?: number;
|
|
67
|
-
maxProperties?: number;
|
|
68
|
-
maximum?: number;
|
|
69
|
-
minItems?: number;
|
|
70
|
-
minLength?: number;
|
|
71
|
-
minProperties?: number;
|
|
72
|
-
minimum?: number;
|
|
73
|
-
multipleOf?: number;
|
|
74
|
-
not?: JsonSchemaDocument;
|
|
75
|
-
oneOf?: readonly JsonSchemaDocument[];
|
|
76
|
-
pattern?: string;
|
|
77
|
-
patternProperties?: Readonly<Record<string, JsonSchemaDocument>>;
|
|
78
|
-
prefixItems?: readonly JsonSchemaDocument[];
|
|
79
|
-
properties?: Readonly<Record<string, JsonSchemaDocument>>;
|
|
80
|
-
required?: readonly string[];
|
|
81
|
-
then?: JsonSchemaDocument;
|
|
82
|
-
title?: string;
|
|
83
|
-
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string" | readonly ("array" | "boolean" | "integer" | "null" | "number" | "object" | "string")[];
|
|
84
|
-
unevaluatedItems?: boolean | JsonSchemaDocument;
|
|
85
|
-
unevaluatedProperties?: boolean | JsonSchemaDocument;
|
|
86
|
-
uniqueItems?: boolean;
|
|
87
|
-
}>;
|
|
88
|
-
export type ProjectionFidelity = "exact" | "structural";
|
|
89
|
-
export type PackageSchemaProjection = Readonly<{
|
|
90
|
-
dialect: typeof Draft202012Dialect;
|
|
91
|
-
document: JsonSchemaDocument;
|
|
92
|
-
fidelity: ProjectionFidelity;
|
|
93
|
-
}>;
|
|
94
|
-
export type DatasetProviderResult<Value> = Readonly<{
|
|
95
|
-
status: "success";
|
|
96
|
-
value: Value;
|
|
97
|
-
}> | Readonly<{
|
|
98
|
-
status: "failure";
|
|
99
|
-
error: DatasetProviderError;
|
|
100
|
-
}>;
|
|
101
|
-
export type DatasetScalarType = "boolean" | "string" | "int64" | "float64" | "decimal" | "date" | "timestamp" | "duration" | "json";
|
|
102
|
-
export type DatasetValue = Readonly<{
|
|
103
|
-
kind: "null";
|
|
104
|
-
}> | Readonly<{
|
|
105
|
-
kind: "boolean";
|
|
106
|
-
value: boolean;
|
|
107
|
-
}> | Readonly<{
|
|
108
|
-
kind: "string";
|
|
109
|
-
value: string;
|
|
110
|
-
}> | Readonly<{
|
|
111
|
-
kind: "int64";
|
|
112
|
-
value: string;
|
|
113
|
-
}> | Readonly<{
|
|
114
|
-
kind: "float64";
|
|
115
|
-
value: number;
|
|
116
|
-
}> | Readonly<{
|
|
117
|
-
kind: "decimal";
|
|
118
|
-
value: string;
|
|
119
|
-
}> | Readonly<{
|
|
120
|
-
kind: "date";
|
|
121
|
-
value: string;
|
|
122
|
-
}> | Readonly<{
|
|
123
|
-
kind: "timestamp";
|
|
124
|
-
value: string;
|
|
125
|
-
}> | Readonly<{
|
|
126
|
-
kind: "duration";
|
|
127
|
-
value: string;
|
|
128
|
-
}> | Readonly<{
|
|
129
|
-
kind: "json";
|
|
130
|
-
value: JsonValue;
|
|
131
|
-
}>;
|
|
132
|
-
export type DatasetPredicateOperator = "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "is_null" | "is_not_null" | "contains" | "starts_with";
|
|
133
|
-
export type DatasetAggregateOperation = "count" | "count_distinct" | "sum" | "min" | "max" | "avg";
|
|
134
|
-
export type DatasetQueryIntent = "records" | "aggregate" | "time_series";
|
|
135
|
-
export type DatasetTimeBucket = "hour" | "day" | "week" | "month";
|
|
136
|
-
export type DatasetPredicate = Readonly<{
|
|
137
|
-
kind: "predicate";
|
|
138
|
-
fieldId: string;
|
|
139
|
-
operator: DatasetPredicateOperator;
|
|
140
|
-
values: readonly DatasetValue[];
|
|
141
|
-
}>;
|
|
142
|
-
export type DatasetFilter = DatasetPredicate | Readonly<{
|
|
143
|
-
kind: "and" | "or";
|
|
144
|
-
filters: readonly DatasetFilter[];
|
|
145
|
-
}> | Readonly<{
|
|
146
|
-
kind: "not";
|
|
147
|
-
filter: DatasetFilter;
|
|
148
|
-
}>;
|
|
149
|
-
export type DatasetOrder = Readonly<{
|
|
150
|
-
fieldOrAlias: string;
|
|
151
|
-
direction: "asc" | "desc";
|
|
152
|
-
}>;
|
|
153
|
-
export type DatasetOperation = Readonly<{
|
|
154
|
-
kind: "records";
|
|
155
|
-
projection: readonly string[];
|
|
156
|
-
filter?: DatasetFilter;
|
|
157
|
-
orderBy: readonly DatasetOrder[];
|
|
158
|
-
cursor?: string;
|
|
159
|
-
}> | Readonly<{
|
|
160
|
-
kind: "aggregate";
|
|
161
|
-
filter?: DatasetFilter;
|
|
162
|
-
groupBy: readonly string[];
|
|
163
|
-
measures: readonly Readonly<{
|
|
164
|
-
alias: string;
|
|
165
|
-
operation: DatasetAggregateOperation;
|
|
166
|
-
fieldId?: string;
|
|
167
|
-
}>[];
|
|
168
|
-
orderBy: readonly DatasetOrder[];
|
|
169
|
-
cursor?: string;
|
|
170
|
-
}> | Readonly<{
|
|
171
|
-
kind: "time_series";
|
|
172
|
-
timeFieldId: string;
|
|
173
|
-
measure: Readonly<{
|
|
174
|
-
alias: string;
|
|
175
|
-
operation: DatasetAggregateOperation;
|
|
176
|
-
fieldId?: string;
|
|
177
|
-
}>;
|
|
178
|
-
bucket: DatasetTimeBucket;
|
|
179
|
-
order: "asc" | "desc";
|
|
180
|
-
filter?: DatasetFilter;
|
|
181
|
-
cursor?: string;
|
|
182
|
-
}>;
|
|
183
|
-
export type DatasetProviderCapabilities = Readonly<{
|
|
184
|
-
intents: readonly DatasetQueryIntent[];
|
|
185
|
-
predicates: readonly DatasetPredicateOperator[];
|
|
186
|
-
aggregates: readonly DatasetAggregateOperation[];
|
|
187
|
-
grouping: boolean;
|
|
188
|
-
ordering: boolean;
|
|
189
|
-
pagination: boolean;
|
|
190
|
-
definitionRefresh: boolean;
|
|
191
|
-
limits: Readonly<{
|
|
192
|
-
maxRows: number;
|
|
193
|
-
maxBytes: number;
|
|
194
|
-
timeoutMs: number;
|
|
195
|
-
maxPageRows: number;
|
|
196
|
-
}>;
|
|
197
|
-
}>;
|
|
198
|
-
export type SafeDiagnostic = Readonly<{
|
|
199
|
-
code: string;
|
|
200
|
-
message: string;
|
|
201
|
-
fieldId?: string;
|
|
202
|
-
}>;
|
|
203
|
-
export type ConnectorContext = Readonly<{
|
|
204
|
-
correlationId: string;
|
|
205
|
-
deadlineEpochMs: number;
|
|
206
|
-
}>;
|
|
207
|
-
export type DatasetSourceLocation = Readonly<{
|
|
208
|
-
segments: readonly [
|
|
209
|
-
Readonly<{
|
|
210
|
-
kind: "container";
|
|
211
|
-
opaqueId: string;
|
|
212
|
-
label: string;
|
|
213
|
-
}>,
|
|
214
|
-
...Readonly<{
|
|
215
|
-
kind: "container" | "dataset";
|
|
216
|
-
opaqueId: string;
|
|
217
|
-
label: string;
|
|
218
|
-
}>[]
|
|
219
|
-
];
|
|
220
|
-
}>;
|
|
221
|
-
export type DatasetDefinition = Readonly<{
|
|
222
|
-
version: 1;
|
|
223
|
-
fields: readonly Readonly<{
|
|
224
|
-
id: string;
|
|
225
|
-
name: string;
|
|
226
|
-
type: DatasetScalarType;
|
|
227
|
-
nullable: boolean;
|
|
228
|
-
semantic?: string;
|
|
229
|
-
}>[];
|
|
230
|
-
measures: readonly Readonly<{
|
|
231
|
-
id: string;
|
|
232
|
-
name: string;
|
|
233
|
-
resultType: DatasetScalarType;
|
|
234
|
-
}>[];
|
|
235
|
-
relationships: readonly Readonly<{
|
|
236
|
-
id: string;
|
|
237
|
-
fromFieldId: string;
|
|
238
|
-
toFieldId: string;
|
|
239
|
-
cardinality: "one_to_one" | "one_to_many" | "many_to_one" | "many_to_many";
|
|
240
|
-
}>[];
|
|
241
|
-
}>;
|
|
242
|
-
export type Bounds = Readonly<{
|
|
243
|
-
maxRows: number;
|
|
244
|
-
maxBytes: number;
|
|
245
|
-
timeoutMs: number;
|
|
246
|
-
}>;
|
|
247
|
-
export type QueryInput = ConnectorContext & Readonly<{
|
|
248
|
-
location: DatasetSourceLocation;
|
|
249
|
-
definitionRevisionId: string;
|
|
250
|
-
definition: DatasetDefinition;
|
|
251
|
-
operation: DatasetOperation;
|
|
252
|
-
bounds: Bounds;
|
|
253
|
-
}>;
|
|
254
|
-
export type DatasetRecordPage = Readonly<{
|
|
255
|
-
columns: readonly Readonly<{
|
|
256
|
-
fieldId: string;
|
|
257
|
-
type: DatasetScalarType;
|
|
258
|
-
}>[];
|
|
259
|
-
rows: readonly (readonly DatasetValue[])[];
|
|
260
|
-
nextCursor?: string;
|
|
261
|
-
rowCount: number;
|
|
262
|
-
byteCount: number;
|
|
263
|
-
observedAt: string;
|
|
264
|
-
}>;
|
|
265
|
-
export type DatasetResultPage = (Readonly<{
|
|
266
|
-
kind: "records";
|
|
267
|
-
}> & DatasetRecordPage) | Readonly<{
|
|
268
|
-
kind: "aggregate";
|
|
269
|
-
columns: readonly Readonly<{
|
|
270
|
-
alias: string;
|
|
271
|
-
type: DatasetScalarType;
|
|
272
|
-
}>[];
|
|
273
|
-
rows: readonly (readonly DatasetValue[])[];
|
|
274
|
-
nextCursor?: string;
|
|
275
|
-
rowCount: number;
|
|
276
|
-
byteCount: number;
|
|
277
|
-
observedAt: string;
|
|
278
|
-
}> | Readonly<{
|
|
279
|
-
kind: "time_series";
|
|
280
|
-
valueType: DatasetScalarType;
|
|
281
|
-
points: readonly Readonly<{
|
|
282
|
-
time: string;
|
|
283
|
-
value: DatasetValue;
|
|
284
|
-
}>[];
|
|
285
|
-
nextCursor?: string;
|
|
286
|
-
pointCount: number;
|
|
287
|
-
byteCount: number;
|
|
288
|
-
observedAt: string;
|
|
289
|
-
}>;
|
|
290
|
-
export type DatasetProviderError = Readonly<{
|
|
291
|
-
kind: "not_ready" | "incompatible_source" | "unsupported_operation" | "policy_not_pushable" | "invalid_cursor" | "timeout" | "permission_denied" | "provider_unavailable" | "provider_rejected" | "invalid_provider_response";
|
|
292
|
-
diagnostics: readonly SafeDiagnostic[];
|
|
293
|
-
}> | Readonly<{
|
|
294
|
-
kind: "limit_exceeded";
|
|
295
|
-
limit: "rows" | "bytes" | "timeout";
|
|
296
|
-
diagnostics: readonly SafeDiagnostic[];
|
|
297
|
-
}> | Readonly<{
|
|
298
|
-
kind: "throttled";
|
|
299
|
-
retryAfterMs?: number;
|
|
300
|
-
diagnostics: readonly SafeDiagnostic[];
|
|
301
|
-
}>;
|
|
302
|
-
/** Closed public principal vocabulary accepted by a gateway operation. */
|
|
303
|
-
export type PortableOperationPrincipalKind = "detached_user" | "service_principal";
|
|
304
|
-
/** Explicit delegated-subject requirement reviewed with an operation. */
|
|
305
|
-
export type PortableOperationDelegatedSubjectPolicy = "allowed" | "forbidden" | "required";
|
|
306
|
-
/** Fully materialized authorization policy for one exposed operation. */
|
|
307
|
-
export type PortableOperationAuthorization = Readonly<{
|
|
308
|
-
delegatedSubject: PortableOperationDelegatedSubjectPolicy;
|
|
309
|
-
organization: "required";
|
|
310
|
-
principalKinds: readonly PortableOperationPrincipalKind[];
|
|
311
|
-
scopes: readonly string[];
|
|
312
|
-
}>;
|
|
313
|
-
/** Observable side-effect class reviewed before an operation becomes a tool. */
|
|
314
|
-
export type PortableOperationEffect = "external_side_effect" | "read" | "write";
|
|
315
|
-
/** The replay guarantee supplied by the operation implementation. */
|
|
316
|
-
export type PortableOperationIdempotency = "idempotent" | "requires_key" | "safe";
|
|
317
|
-
/** Explicit, bounded retry permission for callers of the operation. */
|
|
318
|
-
export type PortableOperationRetryPolicy = Readonly<{
|
|
319
|
-
mode: "never";
|
|
320
|
-
}> | Readonly<{
|
|
321
|
-
maxAttempts: number;
|
|
322
|
-
mode: "idempotent_only";
|
|
323
|
-
}>;
|
|
324
|
-
/** Execution lifecycle and maximum wall-clock duration. */
|
|
325
|
-
export type PortableOperationExecutionPolicy = Readonly<{
|
|
326
|
-
mode: "synchronous";
|
|
327
|
-
timeoutMs: number;
|
|
328
|
-
}>;
|
|
329
|
-
/** Per-invocation transport bounds. */
|
|
330
|
-
export type PortableOperationLimits = Readonly<{
|
|
331
|
-
maxRequestBytes: number;
|
|
332
|
-
maxResponseBytes: number;
|
|
333
|
-
}>;
|
|
334
|
-
/**
|
|
335
|
-
* Complete JSON-only operation contract reviewed by a host. Executable
|
|
336
|
-
* handlers remain in a server runtime sidecar and never enter this descriptor.
|
|
337
|
-
*/
|
|
338
|
-
export type PortableOperationDeclaration = Readonly<{
|
|
339
|
-
authorization: PortableOperationAuthorization;
|
|
340
|
-
description: string;
|
|
341
|
-
effects: PortableOperationEffect;
|
|
342
|
-
execution: PortableOperationExecutionPolicy;
|
|
343
|
-
id: string;
|
|
344
|
-
idempotency: PortableOperationIdempotency;
|
|
345
|
-
input: PackageSchemaProjection;
|
|
346
|
-
limits: PortableOperationLimits;
|
|
347
|
-
output: PackageSchemaProjection;
|
|
348
|
-
retry: PortableOperationRetryPolicy;
|
|
349
|
-
title: string;
|
|
350
|
-
version: string;
|
|
351
|
-
}>;
|
|
352
|
-
/** One catalog and identity namespace for an ordered operation list. */
|
|
353
|
-
export type OperationDomainDeclaration<Operation extends PortableOperationDeclaration = PortableOperationDeclaration> = Readonly<{
|
|
354
|
-
description?: string;
|
|
355
|
-
displayOrder?: number;
|
|
356
|
-
icon?: string;
|
|
357
|
-
id: string;
|
|
358
|
-
operations: readonly Operation[];
|
|
359
|
-
tags?: readonly string[];
|
|
360
|
-
title: string;
|
|
361
|
-
}>;
|
|
362
|
-
export type ResourceJsonValue = null | boolean | number | string | readonly ResourceJsonValue[] | Readonly<{
|
|
363
|
-
[key: string]: ResourceJsonValue;
|
|
364
|
-
}>;
|
|
365
|
-
/** Opaque wire identity. Callers must not infer or concatenate its internals. */
|
|
366
|
-
export type ResourceId = string;
|
|
367
|
-
export type ResourceRecordId = ResourceId;
|
|
368
|
-
/** Opaque concurrency token independent from source timestamps. */
|
|
369
|
-
export type ResourceRevision = string;
|
|
370
|
-
/** Opaque pagination position issued and consumed only by a resource adapter. */
|
|
371
|
-
export type ResourceCursor = string;
|
|
372
|
-
export type IdempotencyKey = string;
|
|
373
|
-
export type ResourceIdentityField = Readonly<{
|
|
374
|
-
name: string;
|
|
375
|
-
type: "number" | "string";
|
|
376
|
-
}>;
|
|
377
|
-
export type ResourceCapabilities = Readonly<{
|
|
378
|
-
create?: boolean;
|
|
379
|
-
/** Common entity deletion is always soft deletion. */
|
|
380
|
-
delete?: boolean;
|
|
381
|
-
get?: boolean;
|
|
382
|
-
hardDelete?: boolean;
|
|
383
|
-
includeDeleted?: boolean;
|
|
384
|
-
restore?: boolean;
|
|
385
|
-
search: true;
|
|
386
|
-
softDelete?: boolean;
|
|
387
|
-
update?: boolean;
|
|
388
|
-
/** File uploads for the File fields of a common entity resource. */
|
|
389
|
-
upload?: boolean;
|
|
390
|
-
}>;
|
|
391
|
-
export type ResourcePaginationMode = "cursor" | "page";
|
|
392
|
-
export type PortableResourceSchema = Readonly<Record<string, ResourceJsonValue>>;
|
|
393
|
-
export type ResourceDefinition<Entity, Create = Entity, Update = Partial<Entity>> = Readonly<{
|
|
394
|
-
capabilities: ResourceCapabilities;
|
|
395
|
-
concurrency: "revision";
|
|
396
|
-
id: string;
|
|
397
|
-
identity: Readonly<{
|
|
398
|
-
fields: readonly [
|
|
399
|
-
ResourceIdentityField,
|
|
400
|
-
...ResourceIdentityField[]
|
|
401
|
-
];
|
|
402
|
-
}>;
|
|
403
|
-
query: Readonly<{
|
|
404
|
-
filterableFields: readonly string[];
|
|
405
|
-
pagination: Readonly<{
|
|
406
|
-
modes: readonly ResourcePaginationMode[];
|
|
407
|
-
}>;
|
|
408
|
-
sortableFields: readonly string[];
|
|
409
|
-
textSearchFields?: readonly string[];
|
|
410
|
-
}>;
|
|
411
|
-
schemas: Readonly<{
|
|
412
|
-
create?: PortableResourceSchema;
|
|
413
|
-
entity: PortableResourceSchema;
|
|
414
|
-
update?: PortableResourceSchema;
|
|
415
|
-
}>;
|
|
416
|
-
version: string;
|
|
417
|
-
/** Portable UI metadata; required/enum/nullability remain in schemas. */
|
|
418
|
-
metadata?: Readonly<Record<string, ResourceJsonValue>>;
|
|
419
|
-
/** Type-only slots keep definition values portable and serializable. */
|
|
420
|
-
readonly __types?: Readonly<{
|
|
421
|
-
create: Create;
|
|
422
|
-
entity: Entity;
|
|
423
|
-
update: Update;
|
|
424
|
-
}>;
|
|
425
|
-
}>;
|
|
426
|
-
export type FilterValue = ResourceJsonValue | readonly ResourceJsonValue[];
|
|
427
|
-
/**
|
|
428
|
-
* A filter predicate. `field` names a declared filterable field, or a path
|
|
429
|
-
* through at most three fields that hold Entity References to a field of
|
|
430
|
-
* the last target, such as `company.industry` or
|
|
431
|
-
* `contacts.company.parent.industry`. On a field that holds Entity
|
|
432
|
-
* References, `is_empty` means no reference. User fields accept identity
|
|
433
|
-
* predicates for one ID and `contains_any`, `contains_all`, `contains_none`
|
|
434
|
-
* for multiple IDs, plus empty/not-empty aliases. CI validates operators
|
|
435
|
-
* against the actual field semantic; UUID shape alone does not declare User.
|
|
436
|
-
*/
|
|
437
|
-
export type ResourceFilter = Readonly<{
|
|
438
|
-
field: string;
|
|
439
|
-
operator: "contains" | "contains_all" | "contains_any" | "contains_none" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
|
|
440
|
-
value: FilterValue;
|
|
441
|
-
}> | Readonly<{
|
|
442
|
-
field: string;
|
|
443
|
-
operator: "is_empty" | "is_not_empty" | "is_not_null" | "is_null";
|
|
444
|
-
}> | Readonly<{
|
|
445
|
-
filters: readonly ResourceFilter[];
|
|
446
|
-
operator: "and" | "or";
|
|
447
|
-
}> | Readonly<{
|
|
448
|
-
filter: ResourceFilter;
|
|
449
|
-
operator: "not";
|
|
450
|
-
}>;
|
|
451
|
-
export type ResourceSort = Readonly<{
|
|
452
|
-
direction: "asc" | "desc";
|
|
453
|
-
field: string;
|
|
454
|
-
}>;
|
|
455
|
-
export type ResourcePagination = Readonly<{
|
|
456
|
-
mode: "cursor";
|
|
457
|
-
cursor?: ResourceCursor;
|
|
458
|
-
limit: number;
|
|
459
|
-
}> | Readonly<{
|
|
460
|
-
mode: "page";
|
|
461
|
-
page: number;
|
|
462
|
-
pageSize: number;
|
|
463
|
-
}>;
|
|
464
|
-
export type ResourceListQuery = Readonly<{
|
|
465
|
-
filter?: ResourceFilter;
|
|
466
|
-
/**
|
|
467
|
-
* Include Paths, such as `["company", "contacts.company"]`: relation
|
|
468
|
-
* fields whose records each item carries in `included`.
|
|
469
|
-
*/
|
|
470
|
-
include?: readonly string[];
|
|
471
|
-
includeDeleted?: boolean;
|
|
472
|
-
pagination: ResourcePagination;
|
|
473
|
-
sort?: readonly ResourceSort[];
|
|
474
|
-
textSearch?: string;
|
|
475
|
-
}>;
|
|
476
|
-
export type ResourceErrorCode = "capability_not_supported" | "conflict" | "forbidden" | "internal" | "invalid_request" | "not_found" | "rate_limited" | "transport_error" | "unauthenticated" | "unavailable" |
|
|
477
|
-
/** The CI Organization storage can not take a presigned File upload. */
|
|
478
|
-
"upload_not_supported";
|
|
479
|
-
export type ResourceError = Readonly<{
|
|
480
|
-
code: ResourceErrorCode;
|
|
481
|
-
/** Client-observed dispatch outcome; uncertainty never proves rollback. */
|
|
482
|
-
outcome?: "not_dispatched" | "rejected" | "uncertain";
|
|
483
|
-
details?: Readonly<Record<string, ResourceJsonValue>>;
|
|
484
|
-
message: string;
|
|
485
|
-
retryable: boolean;
|
|
486
|
-
}>;
|
|
487
|
-
export type ResourceResult<Value> = Readonly<{
|
|
488
|
-
correlationId: string;
|
|
489
|
-
ok: true;
|
|
490
|
-
value: Value;
|
|
491
|
-
}> | Readonly<{
|
|
492
|
-
correlationId: string;
|
|
493
|
-
error: ResourceError;
|
|
494
|
-
ok: false;
|
|
495
|
-
}>;
|
|
496
|
-
export type ResourceListRequest = Readonly<{
|
|
497
|
-
operation: "list";
|
|
498
|
-
query: ResourceListQuery;
|
|
499
|
-
requestId: string;
|
|
500
|
-
resourceId: string;
|
|
501
|
-
}>;
|
|
502
|
-
export type ResourceGetRequest = Readonly<{
|
|
503
|
-
id: ResourceRecordId;
|
|
504
|
-
includeDeleted?: boolean;
|
|
505
|
-
operation: "get";
|
|
506
|
-
requestId: string;
|
|
507
|
-
resourceId: string;
|
|
508
|
-
}>;
|
|
509
|
-
export type ResourceCreateRequest<Create> = Readonly<{
|
|
510
|
-
idempotencyKey: IdempotencyKey;
|
|
511
|
-
operation: "create";
|
|
512
|
-
requestId: string;
|
|
513
|
-
resourceId: string;
|
|
514
|
-
value: Create;
|
|
515
|
-
}>;
|
|
516
|
-
export type ResourceUpdateRequest<Update> = Readonly<{
|
|
517
|
-
expectedRevision: ResourceRevision;
|
|
518
|
-
id: ResourceRecordId;
|
|
519
|
-
idempotencyKey?: IdempotencyKey;
|
|
520
|
-
operation: "update";
|
|
521
|
-
requestId: string;
|
|
522
|
-
resourceId: string;
|
|
523
|
-
value: Update;
|
|
524
|
-
}>;
|
|
525
|
-
export type ResourceLifecycleRequest = Readonly<{
|
|
526
|
-
expectedRevision: ResourceRevision;
|
|
527
|
-
id: ResourceRecordId;
|
|
528
|
-
idempotencyKey?: IdempotencyKey;
|
|
529
|
-
operation: "hard_delete" | "restore" | "soft_delete";
|
|
530
|
-
requestId: string;
|
|
531
|
-
resourceId: string;
|
|
532
|
-
}>;
|
|
533
|
-
export type ResourceTransportRequest = ResourceCreateRequest<unknown> | ResourceGetRequest | ResourceLifecycleRequest | ResourceListRequest | ResourceUpdateRequest<unknown>;
|
|
534
38
|
/** Application login identities are separate from gateway machine callers. */
|
|
535
39
|
export type ApplicationUserIdentity = Readonly<{
|
|
536
40
|
kind: "local_user";
|
|
@@ -705,16 +209,21 @@ export interface ExternalApplicationExternalAuditSubject {
|
|
|
705
209
|
readonly mappedUserId?: string;
|
|
706
210
|
readonly subjectId: string;
|
|
707
211
|
}
|
|
708
|
-
|
|
212
|
+
/**
|
|
213
|
+
* A client secret: a string at `.`, or the `Redacted` string that Effect
|
|
214
|
+
* `Config.Redacted` reads for the `./effect` layers.
|
|
215
|
+
*/
|
|
216
|
+
export type ClientSecret = Redacted.Redacted<string> | string;
|
|
217
|
+
export interface ConfidentialCredentials<Secret extends ClientSecret = string> {
|
|
709
218
|
readonly clientId: string;
|
|
710
|
-
readonly clientSecret:
|
|
219
|
+
readonly clientSecret: Secret;
|
|
711
220
|
}
|
|
712
221
|
export interface RotatingConfidentialCredentialProvider {
|
|
713
222
|
readonly getCredentials: () => ConfidentialCredentials | Promise<ConfidentialCredentials>;
|
|
714
223
|
}
|
|
715
|
-
export type ConfidentialCredentialProvider = ConfidentialCredentials | RotatingConfidentialCredentialProvider;
|
|
716
|
-
export type ServiceServerAuthentication = Readonly<{
|
|
717
|
-
credentials: ConfidentialCredentialProvider
|
|
224
|
+
export type ConfidentialCredentialProvider<Secret extends ClientSecret = string> = ConfidentialCredentials<Secret> | RotatingConfidentialCredentialProvider;
|
|
225
|
+
export type ServiceServerAuthentication<Secret extends ClientSecret = string> = Readonly<{
|
|
226
|
+
credentials: ConfidentialCredentialProvider<Secret>;
|
|
718
227
|
mode: "service";
|
|
719
228
|
}>;
|
|
720
229
|
/** Application credentials authorize each call for a required Audit subject in one configured organization. */
|
|
@@ -815,4 +324,68 @@ export declare const cookies: (request: Request) => string | null, createCiResou
|
|
|
815
324
|
handler: (request: Request) => Promise<Response>;
|
|
816
325
|
}[], createExternalApplicationBff: (options: ExternalApplicationBffOptions) => ExternalApplicationBff, createFixedWorkflowRoute: <Input, Params = Record<string, never>>(options: FixedWorkflowRouteOptions<Input, Params>) => ((request: Request, params: Params) => Promise<Response>), createRealtimeTicketHandler: (options: RealtimeTicketOptions) => ((request: Request) => Promise<Response>), createGatewayWebHandler: (kernel: GatewayRuntimeKernel) => GatewayWebHandler, headers: (request: Request) => Headers, publicOriginFromHeaders: (headerList: Headers, fallbackOrigin: string) => string, requestWithPublicOrigin: (request: Request, publicOrigin: string) => Request;
|
|
817
326
|
|
|
327
|
+
export {
|
|
328
|
+
Bounds,
|
|
329
|
+
ConnectorContext,
|
|
330
|
+
DatasetAggregateOperation,
|
|
331
|
+
DatasetDefinition,
|
|
332
|
+
DatasetFilter,
|
|
333
|
+
DatasetOperation,
|
|
334
|
+
DatasetOrder,
|
|
335
|
+
DatasetPredicate,
|
|
336
|
+
DatasetPredicateOperator,
|
|
337
|
+
DatasetProviderCapabilities,
|
|
338
|
+
DatasetProviderError,
|
|
339
|
+
DatasetProviderResult,
|
|
340
|
+
DatasetQueryIntent,
|
|
341
|
+
DatasetRecordPage,
|
|
342
|
+
DatasetResultPage,
|
|
343
|
+
DatasetScalarType,
|
|
344
|
+
DatasetSourceLocation,
|
|
345
|
+
DatasetTimeBucket,
|
|
346
|
+
DatasetValue,
|
|
347
|
+
IdempotencyKey,
|
|
348
|
+
JsonObject,
|
|
349
|
+
JsonPrimitive,
|
|
350
|
+
JsonSchemaDocument,
|
|
351
|
+
JsonValue,
|
|
352
|
+
OperationDomainDeclaration,
|
|
353
|
+
PackageSchemaProjection,
|
|
354
|
+
PortableOperationAuthorization,
|
|
355
|
+
PortableOperationDeclaration,
|
|
356
|
+
PortableOperationDelegatedSubjectPolicy,
|
|
357
|
+
PortableOperationEffect,
|
|
358
|
+
PortableOperationExecutionPolicy,
|
|
359
|
+
PortableOperationIdempotency,
|
|
360
|
+
PortableOperationLimits,
|
|
361
|
+
PortableOperationPrincipalKind,
|
|
362
|
+
PortableOperationRetryPolicy,
|
|
363
|
+
PortableResourceSchema,
|
|
364
|
+
ProjectionFidelity,
|
|
365
|
+
QueryInput,
|
|
366
|
+
ResourceCapabilities,
|
|
367
|
+
ResourceCreateRequest,
|
|
368
|
+
ResourceCursor,
|
|
369
|
+
ResourceDefinition,
|
|
370
|
+
ResourceError,
|
|
371
|
+
ResourceErrorCode,
|
|
372
|
+
ResourceFilter,
|
|
373
|
+
ResourceGetRequest,
|
|
374
|
+
ResourceId,
|
|
375
|
+
ResourceIdentityField,
|
|
376
|
+
ResourceJsonValue,
|
|
377
|
+
ResourceLifecycleRequest,
|
|
378
|
+
ResourceListQuery,
|
|
379
|
+
ResourceListRequest,
|
|
380
|
+
ResourcePagination,
|
|
381
|
+
ResourcePaginationMode,
|
|
382
|
+
ResourceRecordId,
|
|
383
|
+
ResourceResult,
|
|
384
|
+
ResourceRevision,
|
|
385
|
+
ResourceSort,
|
|
386
|
+
ResourceTransportRequest,
|
|
387
|
+
ResourceUpdateRequest,
|
|
388
|
+
SafeDiagnostic,
|
|
389
|
+
};
|
|
390
|
+
|
|
818
391
|
export {};
|