@collective-intelligence/external-apps-client-sdk 0.1.8 → 0.1.10
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 +111 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{resources-BYm1KWAZ.js → resources-C0wYfzcV.js} +172 -44
- package/dist/{resources-D95LlDMa.d.ts → resources-D0bzEPx3.d.ts} +102 -8
- package/dist/resources.d.ts +2 -2
- package/dist/resources.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,14 +31,66 @@ plus slack) before throwing `Run did not finish`; pass `deadlineMs` to change
|
|
|
31
31
|
it and `signal` to cancel. Polling starts every `idleMs` (50 ms) and backs off
|
|
32
32
|
to at most one second while no new events arrive.
|
|
33
33
|
|
|
34
|
+
## Workflow results and read recovery
|
|
35
|
+
|
|
36
|
+
A successful Workflow with a declared output contract exposes its persisted
|
|
37
|
+
result in the run returned by `runs.get`:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"status": "succeeded",
|
|
42
|
+
"result": {
|
|
43
|
+
"nativeStatus": "completed",
|
|
44
|
+
"output": {
|
|
45
|
+
"activeSearch": {
|
|
46
|
+
"notionPageId": "notion-search-123",
|
|
47
|
+
"url": "https://notion.so/notion-search-123",
|
|
48
|
+
"name": "Senior engineer",
|
|
49
|
+
"status": "created"
|
|
50
|
+
},
|
|
51
|
+
"customer": { "created": false, "id": "customer-42", "name": "Acme" },
|
|
52
|
+
"requirements": { "role": "engineer", "seniority": "senior" }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This is an excerpt of the run JSON in the successful SDK response's `value`.
|
|
59
|
+
The Workflow selects and validates `output`; it is portable JSON, not a
|
|
60
|
+
search-specific SDK type. Unmapped intermediate node fields are not public
|
|
61
|
+
output. `runs.stream` returns an event page; its `completed` event's `data`
|
|
62
|
+
equals the run's `result`. `runs.follow` also returns an event page and drains
|
|
63
|
+
remaining pages after a terminal snapshot, so read the completion event's
|
|
64
|
+
`data.output` there. It does not return a run snapshot.
|
|
65
|
+
|
|
66
|
+
`runs.get` and `runs.stream` return a failed `CiResult` for an HTTP read failure;
|
|
67
|
+
`runs.follow` propagates that failure as an error. Following has no automatic
|
|
68
|
+
read retry, even for a retryable error. Retain the original `runId` and explicitly
|
|
69
|
+
call `get`, `stream`, or `follow` again when retrying observation. Do not invoke
|
|
70
|
+
the Workflow again to recover its result. A new `follow` starts reading the
|
|
71
|
+
same run's events from the beginning; use `stream({ runId, afterCursor })` when
|
|
72
|
+
the application owns a saved cursor.
|
|
73
|
+
|
|
74
|
+
Native execution and result persistence continue after the browser disconnects.
|
|
75
|
+
The first authorized `get` or `stream` after completion publishes the external
|
|
76
|
+
terminal receipt; `follow` uses those same reads. Access remains scoped to the
|
|
77
|
+
original owner, Organization, Application and audit subject. Historical terminal
|
|
78
|
+
runs are not backfilled or adapted. A missing promised output is a technical
|
|
79
|
+
invariant defect, not a successful empty or partial result.
|
|
80
|
+
|
|
81
|
+
Analysis history and candidate results remain Knowledge reads. A matching
|
|
82
|
+
completion notification must wait until those results are actually available in
|
|
83
|
+
Knowledge; a completed command alone does not establish that readiness. See the
|
|
84
|
+
[Workflow output contract and recovery guide](../../../docs/architecture/external-app-gateway.md#workflow-results-and-observation).
|
|
85
|
+
|
|
86
|
+
## Common entity CRUD
|
|
87
|
+
|
|
34
88
|
The `@collective-intelligence/external-apps-client-sdk/resources` entrypoint
|
|
35
89
|
provides the portable resource contracts and `createResourceClient`. A resource
|
|
36
90
|
client supports filtering, sorting, text search, page or cursor pagination,
|
|
37
91
|
opaque IDs and revisions, optimistic concurrency, idempotency, soft deletion,
|
|
38
92
|
restore, and hard deletion according to the resource's declared capabilities.
|
|
39
93
|
|
|
40
|
-
## Common entity CRUD
|
|
41
|
-
|
|
42
94
|
Use the explicit `protocol: "entity"` option for the common page-based CRUD API.
|
|
43
95
|
Both the root and `/resources` entrypoints export these builders:
|
|
44
96
|
|
|
@@ -82,7 +134,8 @@ authorizes access. They are configuration, never mutation-body authority.
|
|
|
82
134
|
including identity, login, logout, and `runs_follow`. `createFixedWorkflowClient`
|
|
83
135
|
posts a Fixed workflow BFF route and returns `{ runId }`.
|
|
84
136
|
|
|
85
|
-
The common client exposes `list`, `get`, `create`, `update`,
|
|
137
|
+
The common client exposes `list`, `get`, `create`, `update`, `delete`, and
|
|
138
|
+
`upload` (see [File uploads](#file-uploads)).
|
|
86
139
|
`delete` calls the explicit soft-delete route. Every mutation requires an operation
|
|
87
140
|
key; update/delete also require the revision originally edited. Reads accept an
|
|
88
141
|
optional `{ signal }`. Mutations are independent of view unmount cancellation.
|
|
@@ -100,6 +153,61 @@ During migration, omitting `protocol` retains the distinct legacy resource facad
|
|
|
100
153
|
including its optional update keys, cursor pagination and explicit lifecycle
|
|
101
154
|
methods. Existing hard-delete behavior is never relabeled as common `delete`.
|
|
102
155
|
|
|
156
|
+
## File uploads
|
|
157
|
+
|
|
158
|
+
A File field holds files of a CI entity. The browser sends the file bytes
|
|
159
|
+
straight to storage; they never pass through CI or a BFF:
|
|
160
|
+
|
|
161
|
+
1. `upload({ field, filename, mimeType })` requests a File upload for one
|
|
162
|
+
File field. The definition must declare `capabilities.upload: true`;
|
|
163
|
+
otherwise the call fails with `capability_not_supported` and sends nothing.
|
|
164
|
+
2. PUT the bytes to the returned `url` with the returned `headers`.
|
|
165
|
+
3. Write the entity with `{ upload: uploadId }` for that File field key.
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
const slot = await leads.upload(
|
|
169
|
+
{ field: "resume", filename: file.name, mimeType: file.type },
|
|
170
|
+
{ signal }
|
|
171
|
+
)
|
|
172
|
+
if (slot.ok) {
|
|
173
|
+
await fetch(slot.value.url, {
|
|
174
|
+
body: file,
|
|
175
|
+
headers: slot.value.headers,
|
|
176
|
+
method: slot.value.method
|
|
177
|
+
})
|
|
178
|
+
await leads.update({
|
|
179
|
+
expectedRevision: record.revision,
|
|
180
|
+
id: record.id,
|
|
181
|
+
idempotencyKey: crypto.randomUUID(),
|
|
182
|
+
value: { resume: { upload: slot.value.uploadId } }
|
|
183
|
+
})
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
`EntityFileFieldWrite` types the write form of a File field key:
|
|
188
|
+
|
|
189
|
+
- `{ upload: uploadId }` adds a File upload.
|
|
190
|
+
- `{ id }` keeps a file. A File value read before also keeps it; its other keys
|
|
191
|
+
are ignored.
|
|
192
|
+
- `null` removes every file of the field.
|
|
193
|
+
- An ordered array sets the exact list of a multiple File field.
|
|
194
|
+
- An absent key keeps the files unchanged.
|
|
195
|
+
|
|
196
|
+
The definition's create and update schemas must accept this form for each
|
|
197
|
+
File field key. Reads return `EntityFileValue` objects:
|
|
198
|
+
`{ id, url, filename, mimeType, size, source }`, where `source` is `managed` or
|
|
199
|
+
`external_url`. A single File field reads as one File value or `null`; a
|
|
200
|
+
multiple one as an array.
|
|
201
|
+
|
|
202
|
+
A File upload is single use: the first successful write consumes it, and CI
|
|
203
|
+
deletes an unused one after a retention window. Request a new one to retry.
|
|
204
|
+
`upload` fails with `upload_not_supported` when the Organization storage can
|
|
205
|
+
not presign, with `invalid_request` (`details.reason` `not_a_file_field` or
|
|
206
|
+
`type_not_accepted`) for a field or MIME type the schema refuses, and with
|
|
207
|
+
`not_found` for an unknown schema. A write that refuses its write form answers
|
|
208
|
+
`invalid_request` with `details.field` and `details.reason`; a File field of a
|
|
209
|
+
connector-owned entity answers `conflict`.
|
|
210
|
+
|
|
103
211
|
## Workspace development
|
|
104
212
|
|
|
105
213
|
The repository's [Effect demo](../../../demo/external-app-effect/README.md)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as ResourceUpdateRequest, A as ResourceError, At as FederatedAuthOptions, B as ResourceListRequest, C as PortableResourceSchema, Ct as QueryFilter, D as ResourceCreateRequest, Dt as FederatedAuth, E as ResourceCreateInput, Et as ClientFetch, F as ResourceIdentityField, G as ResourceRecord, H as ResourceMutationInput, I as ResourceJsonValue, J as ResourceResult, K as ResourceRecordId, L as ResourceLifecycleInput, M as ResourceFilter, Mt as FederatedSessionIdentity, N as ResourceGetRequest, Nt as createFederatedAuth, O as ResourceCursor, Ot as FederatedAuthError, P as ResourceId, Q as ResourceTransportRequest, R as ResourceLifecycleRequest, S as IdempotencyKey, St as KnowledgeQuery, T as ResourceClient, Tt as WorkflowInvokeTarget, U as ResourcePagination, V as ResourceListResult, W as ResourcePaginationMode, X as ResourceSort, Y as ResourceRevision, Z as ResourceTransport, _ as EntityRequest, _t as isClientOperationId, a as createResourceClient, at as CiResult, b as EntityUploadInput, bt as ConversationHistory, c as EntityDeleteInput, ct as OperationSuccess, d as EntityFileWrite, dt as ClientOperationInput, et as ProxyAuthentication, f as EntityListQuery, ft as ClientOperationMap, g as EntityProtocol, gt as clientOperationIds, h as EntityPage, ht as TypedOperationExecutor, i as createEntityProtocol, it as CiErrorCode, j as ResourceErrorCode, jt as FederatedAuthState, k as ResourceDefinition, kt as FederatedAuthErrorCode, l as EntityFileFieldWrite, lt as ClientOperationDefinition, m as EntityOperationResult, mt as OperationExecutionOptions, n as EntityHttpTransportOptions, nt as createProxyTransport, o as EntityClient, ot as JsonValue, p as EntityOperation, pt as ClientOperationOutput, q as ResourceRequestOptions, r as createEntityHttpTransport, rt as CiError, s as EntityCreateInput, st as OperationRequest, t as EntityHttpDestination, tt as ProxyTransportOptions, u as EntityFileValue, ut as ClientOperationId, v as EntityTransport, vt as AgentInvokeTarget, w as ResourceCapabilities, wt as SearchQuery, x as EntityUploadSlot, xt as JsonObject, y as EntityUpdateInput, yt as ConversationContinueTarget, z as ResourceListQuery } from "./resources-D0bzEPx3.js";
|
|
2
2
|
type ServerSessionAuthOptions = Readonly<{
|
|
3
3
|
basePath: string;
|
|
4
4
|
fetch?: ClientFetch;
|
|
@@ -889,4 +889,4 @@ type DirectTransportOptions = Readonly<{
|
|
|
889
889
|
tenantUrl: string;
|
|
890
890
|
}>;
|
|
891
891
|
declare const createDirectTransport: <Operations extends ClientOperationMap>(options: DirectTransportOptions) => TypedOperationExecutor<Operations>;
|
|
892
|
-
export { type CiError, type CiErrorCode, type CiResult, type CiRunCancellation, type CiStreamEvent, type CiStreamPage, type ClientDomains, type ClientFetch, type ClientOperationDefinition, type ClientOperationId, type ClientOperationInput, type ClientOperationMap, type ClientOperationOutput, type ClientSdkClient, type ClientSdkEntrypoint, DEFAULT_FOLLOW_RUN_DEADLINE_MS, type DelegatedApplicationRuntime, type DelegatedApplicationRuntimeOptions, type DelegatedRuntimeState, type DirectTransportOptions, type EntityClient, type EntityCreateInput, type EntityDeleteInput, type EntityHttpDestination, type EntityHttpTransportOptions, type EntityListQuery, type EntityOperation, type EntityOperationResult, type EntityPage, type EntityProtocol, type EntityRequest, type EntityTransport, type EntityUpdateInput, type FederatedAuth, FederatedAuthError, type FederatedAuthErrorCode, type FederatedAuthOptions, type FederatedAuthState, type FederatedSessionIdentity, type FixedWorkflowClient, type FixedWorkflowClientOptions, type FollowRunOptions, type FollowRunSource, type IdempotencyKey, type JsonObject, type JsonValue, type KnowledgeQuery, type OperationExecutionOptions, type OperationRequest, type OperationSuccess, type OrganizationClient, type PortableResourceSchema, type ProxyAuthentication, type ProxyTransportOptions, type QueryFilter, type ResourceCapabilities, type ResourceClient, type ResourceCreateInput, type ResourceCreateRequest, type ResourceCursor, type ResourceDefinition, type ResourceError, type ResourceErrorCode, type ResourceFilter, type ResourceGetRequest, type ResourceId, type ResourceIdentityField, type ResourceJsonValue, type ResourceLifecycleInput, type ResourceLifecycleRequest, type ResourceListQuery, type ResourceListRequest, type ResourceListResult, type ResourceMutationInput, type ResourcePagination, type ResourcePaginationMode, type ResourceRecord, type ResourceRecordId, type ResourceRequestOptions, type ResourceResult, type ResourceRevision, type ResourceSort, type ResourceTransport, type ResourceTransportRequest, type ResourceUpdateRequest, type SearchQuery, type ServerSessionAuthOptions, type TypedOperationExecutor, type WorkflowInvokeTarget, clientOperationIds, clientSdkProtocolVersion, createClient, createDelegatedApplicationRuntime, createDirectTransport, createEntityHttpTransport, createEntityProtocol, createFederatedAuth, createFixedWorkflowClient, createProxyTransport, createResourceClient, createServerSessionAuth, followRun, isClientOperationId, nextStreamCursor };
|
|
892
|
+
export { type CiError, type CiErrorCode, type CiResult, type CiRunCancellation, type CiStreamEvent, type CiStreamPage, type ClientDomains, type ClientFetch, type ClientOperationDefinition, type ClientOperationId, type ClientOperationInput, type ClientOperationMap, type ClientOperationOutput, type ClientSdkClient, type ClientSdkEntrypoint, DEFAULT_FOLLOW_RUN_DEADLINE_MS, type DelegatedApplicationRuntime, type DelegatedApplicationRuntimeOptions, type DelegatedRuntimeState, type DirectTransportOptions, type EntityClient, type EntityCreateInput, type EntityDeleteInput, type EntityFileFieldWrite, type EntityFileValue, type EntityFileWrite, type EntityHttpDestination, type EntityHttpTransportOptions, type EntityListQuery, type EntityOperation, type EntityOperationResult, type EntityPage, type EntityProtocol, type EntityRequest, type EntityTransport, type EntityUpdateInput, type EntityUploadInput, type EntityUploadSlot, type FederatedAuth, FederatedAuthError, type FederatedAuthErrorCode, type FederatedAuthOptions, type FederatedAuthState, type FederatedSessionIdentity, type FixedWorkflowClient, type FixedWorkflowClientOptions, type FollowRunOptions, type FollowRunSource, type IdempotencyKey, type JsonObject, type JsonValue, type KnowledgeQuery, type OperationExecutionOptions, type OperationRequest, type OperationSuccess, type OrganizationClient, type PortableResourceSchema, type ProxyAuthentication, type ProxyTransportOptions, type QueryFilter, type ResourceCapabilities, type ResourceClient, type ResourceCreateInput, type ResourceCreateRequest, type ResourceCursor, type ResourceDefinition, type ResourceError, type ResourceErrorCode, type ResourceFilter, type ResourceGetRequest, type ResourceId, type ResourceIdentityField, type ResourceJsonValue, type ResourceLifecycleInput, type ResourceLifecycleRequest, type ResourceListQuery, type ResourceListRequest, type ResourceListResult, type ResourceMutationInput, type ResourcePagination, type ResourcePaginationMode, type ResourceRecord, type ResourceRecordId, type ResourceRequestOptions, type ResourceResult, type ResourceRevision, type ResourceSort, type ResourceTransport, type ResourceTransportRequest, type ResourceUpdateRequest, type SearchQuery, type ServerSessionAuthOptions, type TypedOperationExecutor, type WorkflowInvokeTarget, clientOperationIds, clientSdkProtocolVersion, createClient, createDelegatedApplicationRuntime, createDirectTransport, createEntityHttpTransport, createEntityProtocol, createFederatedAuth, createFixedWorkflowClient, createProxyTransport, createResourceClient, createServerSessionAuth, followRun, isClientOperationId, nextStreamCursor };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as parseMountPath, c as isClientOperationId, i as createHttpOperationTransport, n as createResourceClient, o as parseOriginUrl, r as createEntityProtocol, s as clientOperationIds, t as createEntityHttpTransport } from "./resources-
|
|
1
|
+
import { a as parseMountPath, c as isClientOperationId, i as createHttpOperationTransport, n as createResourceClient, o as parseOriginUrl, r as createEntityProtocol, s as clientOperationIds, t as createEntityHttpTransport } from "./resources-C0wYfzcV.js";
|
|
2
2
|
const base64Url = (bytes) => {
|
|
3
3
|
let binary = "";
|
|
4
4
|
for (const byte of bytes) binary += String.fromCodePoint(byte);
|
|
@@ -7575,6 +7575,36 @@ const objectSchema = (properties, required = Object.keys(properties)) => ({
|
|
|
7575
7575
|
required,
|
|
7576
7576
|
type: "object"
|
|
7577
7577
|
});
|
|
7578
|
+
/**
|
|
7579
|
+
* Include Paths: relation fields whose records a read returns in
|
|
7580
|
+
* `included`, such as `["company", "contacts.company"]`, at most three
|
|
7581
|
+
* levels deep. CI refuses a segment that names no relation field.
|
|
7582
|
+
*/
|
|
7583
|
+
const includeSchema = {
|
|
7584
|
+
items: {
|
|
7585
|
+
minLength: 1,
|
|
7586
|
+
pattern: "^[^.]+(\\.[^.]+){0,2}$",
|
|
7587
|
+
type: "string"
|
|
7588
|
+
},
|
|
7589
|
+
type: "array"
|
|
7590
|
+
};
|
|
7591
|
+
const escapePattern = (value) => value.replaceAll(/[$()*+.?[\\\]^{|}]/gu, "\\$&");
|
|
7592
|
+
/**
|
|
7593
|
+
* The Entity References a declared property holds: `one` uuid string, or
|
|
7594
|
+
* `many` as an array of uuid strings.
|
|
7595
|
+
*/
|
|
7596
|
+
const references = (property) => {
|
|
7597
|
+
if (property === null || typeof property !== "object" || Array.isArray(property)) return;
|
|
7598
|
+
if ("format" in property && property.format === "uuid") return "one";
|
|
7599
|
+
const items = "items" in property ? property.items : void 0;
|
|
7600
|
+
return items !== null && typeof items === "object" && !Array.isArray(items) && "format" in items && items.format === "uuid" ? "many" : void 0;
|
|
7601
|
+
};
|
|
7602
|
+
/**
|
|
7603
|
+
* A path through a field that holds Entity References, such as
|
|
7604
|
+
* `company.industry`: at most three relation fields and a field of the
|
|
7605
|
+
* last target, as CI resolves it.
|
|
7606
|
+
*/
|
|
7607
|
+
const relationPath = (field) => ({ pattern: `^${escapePattern(field)}(\\.[^.]+){1,3}$` });
|
|
7578
7608
|
const pointerKey = (key) => key.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
7579
7609
|
const schemaMaps = /* @__PURE__ */ new Set([
|
|
7580
7610
|
"$defs",
|
|
@@ -7651,42 +7681,95 @@ const entityQuerySchema = (definition) => {
|
|
|
7651
7681
|
...definition.query.sortableFields,
|
|
7652
7682
|
...definition.query.textSearchFields ?? []
|
|
7653
7683
|
]) if (!Object.hasOwn(properties, field)) throw new TypeError(`Query field '${field}' has no declared entity property`);
|
|
7654
|
-
const
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
...predicateProperties,
|
|
7666
|
-
value: valueSchema
|
|
7667
|
-
});
|
|
7684
|
+
const leaves = definition.query.filterableFields.flatMap((field) => {
|
|
7685
|
+
const cardinality = references(properties[field]);
|
|
7686
|
+
const value = { $ref: `#/$defs/filterEntity/properties/${pointerKey(field)}` };
|
|
7687
|
+
const nullable = { anyOf: [cardinality === "many" ? {
|
|
7688
|
+
format: "uuid",
|
|
7689
|
+
type: "string"
|
|
7690
|
+
} : value, { type: "null" }] };
|
|
7691
|
+
const predicate = (operators, valueSchema) => {
|
|
7692
|
+
const predicateProperties = {
|
|
7693
|
+
field: { const: field },
|
|
7694
|
+
operator: { enum: operators }
|
|
7668
7695
|
};
|
|
7669
|
-
return
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7696
|
+
if (valueSchema === void 0) return objectSchema(predicateProperties);
|
|
7697
|
+
return objectSchema({
|
|
7698
|
+
...predicateProperties,
|
|
7699
|
+
value: valueSchema
|
|
7700
|
+
});
|
|
7701
|
+
};
|
|
7702
|
+
return [
|
|
7703
|
+
predicate(cardinality === void 0 ? ["is_null", "is_not_null"] : [
|
|
7704
|
+
"is_null",
|
|
7705
|
+
"is_not_null",
|
|
7706
|
+
"is_empty"
|
|
7707
|
+
]),
|
|
7708
|
+
...cardinality === "many" ? [predicate(["contains_any", "contains_all"], {
|
|
7709
|
+
items: { $ref: `${value.$ref}/items` },
|
|
7710
|
+
minItems: 1,
|
|
7711
|
+
type: "array"
|
|
7712
|
+
})] : [],
|
|
7713
|
+
predicate(["eq", "ne"], nullable),
|
|
7714
|
+
predicate([
|
|
7715
|
+
"gt",
|
|
7716
|
+
"gte",
|
|
7717
|
+
"lt",
|
|
7718
|
+
"lte"
|
|
7719
|
+
], { allOf: [value, { type: ["number", "string"] }] }),
|
|
7720
|
+
predicate([
|
|
7721
|
+
"contains",
|
|
7722
|
+
"starts_with",
|
|
7723
|
+
"ends_with"
|
|
7724
|
+
], { allOf: [value, { type: "string" }] }),
|
|
7725
|
+
predicate(["in", "not_in"], {
|
|
7726
|
+
items: nullable,
|
|
7727
|
+
minItems: 1,
|
|
7728
|
+
type: "array"
|
|
7729
|
+
})
|
|
7730
|
+
];
|
|
7731
|
+
});
|
|
7732
|
+
const relationPaths = definition.query.filterableFields.flatMap((field) => references(properties[field]) === void 0 ? [] : [
|
|
7733
|
+
objectSchema({
|
|
7734
|
+
field: relationPath(field),
|
|
7735
|
+
operator: { enum: [
|
|
7736
|
+
"contains",
|
|
7737
|
+
"ends_with",
|
|
7738
|
+
"eq",
|
|
7739
|
+
"gt",
|
|
7740
|
+
"gte",
|
|
7741
|
+
"ne",
|
|
7742
|
+
"lt",
|
|
7743
|
+
"lte",
|
|
7744
|
+
"starts_with"
|
|
7745
|
+
] },
|
|
7746
|
+
value: true
|
|
7747
|
+
}),
|
|
7748
|
+
objectSchema({
|
|
7749
|
+
field: relationPath(field),
|
|
7750
|
+
operator: { enum: [
|
|
7751
|
+
"in",
|
|
7752
|
+
"not_in",
|
|
7753
|
+
"contains_any",
|
|
7754
|
+
"contains_all"
|
|
7755
|
+
] },
|
|
7756
|
+
value: {
|
|
7757
|
+
minItems: 1,
|
|
7758
|
+
type: "array"
|
|
7759
|
+
}
|
|
7689
7760
|
}),
|
|
7761
|
+
objectSchema({
|
|
7762
|
+
field: relationPath(field),
|
|
7763
|
+
operator: { enum: [
|
|
7764
|
+
"is_null",
|
|
7765
|
+
"is_not_null",
|
|
7766
|
+
"is_empty"
|
|
7767
|
+
] }
|
|
7768
|
+
})
|
|
7769
|
+
]);
|
|
7770
|
+
const filter = { oneOf: [
|
|
7771
|
+
...leaves,
|
|
7772
|
+
...relationPaths,
|
|
7690
7773
|
objectSchema({
|
|
7691
7774
|
filters: {
|
|
7692
7775
|
items: { $ref: "#/$defs/filter" },
|
|
@@ -7714,6 +7797,7 @@ const entityQuerySchema = (definition) => {
|
|
|
7714
7797
|
});
|
|
7715
7798
|
const query = objectSchema({
|
|
7716
7799
|
filter: { $ref: "#/$defs/filter" },
|
|
7800
|
+
include: includeSchema,
|
|
7717
7801
|
pagination: page,
|
|
7718
7802
|
sort: {
|
|
7719
7803
|
items: objectSchema({
|
|
@@ -7734,10 +7818,16 @@ const operationKey = {
|
|
|
7734
7818
|
pattern: "^[\\w.-]{1,256}$",
|
|
7735
7819
|
type: "string"
|
|
7736
7820
|
};
|
|
7737
|
-
const
|
|
7821
|
+
const uploadText = {
|
|
7822
|
+
maxLength: 255,
|
|
7823
|
+
minLength: 1,
|
|
7824
|
+
type: "string"
|
|
7825
|
+
};
|
|
7826
|
+
const requestSchema = (definition, operation, properties, optional = {}) => ({
|
|
7738
7827
|
additionalProperties: false,
|
|
7739
7828
|
properties: {
|
|
7740
7829
|
...properties,
|
|
7830
|
+
...optional,
|
|
7741
7831
|
operation: { const: operation },
|
|
7742
7832
|
requestId: identifier,
|
|
7743
7833
|
resourceId: { const: definition.id }
|
|
@@ -7774,7 +7864,7 @@ const createEntityProtocol = (definition) => {
|
|
|
7774
7864
|
},
|
|
7775
7865
|
oneOf: [
|
|
7776
7866
|
requestSchema(definition, "list", { query }),
|
|
7777
|
-
requestSchema(definition, "get", { id: identifier }),
|
|
7867
|
+
requestSchema(definition, "get", { id: identifier }, { include: includeSchema }),
|
|
7778
7868
|
requestSchema(definition, "create", {
|
|
7779
7869
|
idempotencyKey: operationKey,
|
|
7780
7870
|
value: { $ref: "#/$defs/create" }
|
|
@@ -7792,6 +7882,11 @@ const createEntityProtocol = (definition) => {
|
|
|
7792
7882
|
expectedRevision: identifier,
|
|
7793
7883
|
id: identifier,
|
|
7794
7884
|
idempotencyKey: operationKey
|
|
7885
|
+
}),
|
|
7886
|
+
requestSchema(definition, "upload", {
|
|
7887
|
+
field: uploadText,
|
|
7888
|
+
filename: uploadText,
|
|
7889
|
+
mimeType: uploadText
|
|
7795
7890
|
})
|
|
7796
7891
|
]
|
|
7797
7892
|
});
|
|
@@ -7801,7 +7896,12 @@ const createEntityProtocol = (definition) => {
|
|
|
7801
7896
|
type: "string"
|
|
7802
7897
|
},
|
|
7803
7898
|
id: identifier,
|
|
7899
|
+
included: { type: "object" },
|
|
7804
7900
|
revision: identifier,
|
|
7901
|
+
truncated: {
|
|
7902
|
+
items: { type: "string" },
|
|
7903
|
+
type: "array"
|
|
7904
|
+
},
|
|
7805
7905
|
value: { $ref: "#/$defs/entity" }
|
|
7806
7906
|
}, [
|
|
7807
7907
|
"id",
|
|
@@ -7819,7 +7919,8 @@ const createEntityProtocol = (definition) => {
|
|
|
7819
7919
|
"rate_limited",
|
|
7820
7920
|
"transport_error",
|
|
7821
7921
|
"unauthenticated",
|
|
7822
|
-
"unavailable"
|
|
7922
|
+
"unavailable",
|
|
7923
|
+
"upload_not_supported"
|
|
7823
7924
|
] },
|
|
7824
7925
|
details: { type: "object" },
|
|
7825
7926
|
message: { type: "string" },
|
|
@@ -7883,6 +7984,15 @@ const createEntityProtocol = (definition) => {
|
|
|
7883
7984
|
required: [...record.required, "deletedAt"]
|
|
7884
7985
|
}));
|
|
7885
7986
|
const validatePage = ajv.compile(resultSchema(page));
|
|
7987
|
+
const validateUploadSlot = ajv.compile(resultSchema(objectSchema({
|
|
7988
|
+
headers: {
|
|
7989
|
+
additionalProperties: { type: "string" },
|
|
7990
|
+
type: "object"
|
|
7991
|
+
},
|
|
7992
|
+
method: { const: "PUT" },
|
|
7993
|
+
uploadId: identifier,
|
|
7994
|
+
url: identifier
|
|
7995
|
+
})));
|
|
7886
7996
|
const coherentPage = (input) => {
|
|
7887
7997
|
if (!validatePage(input)) return false;
|
|
7888
7998
|
if (!input.ok) return true;
|
|
@@ -7894,7 +8004,8 @@ const createEntityProtocol = (definition) => {
|
|
|
7894
8004
|
delete: validateDeleted,
|
|
7895
8005
|
get: validateRecord,
|
|
7896
8006
|
list: coherentPage,
|
|
7897
|
-
update: validateRecord
|
|
8007
|
+
update: validateRecord,
|
|
8008
|
+
upload: validateUploadSlot
|
|
7898
8009
|
};
|
|
7899
8010
|
return {
|
|
7900
8011
|
decodeRequest: (input) => {
|
|
@@ -7967,7 +8078,8 @@ const createCommonEntityClient = (options) => {
|
|
|
7967
8078
|
delete: "delete",
|
|
7968
8079
|
get: "get",
|
|
7969
8080
|
list: "search",
|
|
7970
|
-
update: "update"
|
|
8081
|
+
update: "update",
|
|
8082
|
+
upload: "upload"
|
|
7971
8083
|
}[input.operation]] !== true) return {
|
|
7972
8084
|
correlationId,
|
|
7973
8085
|
error: {
|
|
@@ -8022,7 +8134,11 @@ const createCommonEntityClient = (options) => {
|
|
|
8022
8134
|
update: (input) => execute({
|
|
8023
8135
|
...input,
|
|
8024
8136
|
operation: "update"
|
|
8025
|
-
})
|
|
8137
|
+
}),
|
|
8138
|
+
upload: (input, requestOptions) => execute({
|
|
8139
|
+
...input,
|
|
8140
|
+
operation: "upload"
|
|
8141
|
+
}, requestOptions)
|
|
8026
8142
|
};
|
|
8027
8143
|
};
|
|
8028
8144
|
const capabilityByOperation = {
|
|
@@ -8118,10 +8234,13 @@ const encode = (request) => {
|
|
|
8118
8234
|
method: "POST",
|
|
8119
8235
|
path: "/search"
|
|
8120
8236
|
};
|
|
8121
|
-
case "get":
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8237
|
+
case "get": {
|
|
8238
|
+
const query = request.include?.length ? `?include=${encodeURIComponent(request.include.join(","))}` : "";
|
|
8239
|
+
return {
|
|
8240
|
+
method: "GET",
|
|
8241
|
+
path: `/records/${encodeURIComponent(request.id)}${query}`
|
|
8242
|
+
};
|
|
8243
|
+
}
|
|
8125
8244
|
case "create": return {
|
|
8126
8245
|
body: JSON.stringify({
|
|
8127
8246
|
idempotencyKey: request.idempotencyKey,
|
|
@@ -8147,6 +8266,15 @@ const encode = (request) => {
|
|
|
8147
8266
|
method: "POST",
|
|
8148
8267
|
path: `/records/${encodeURIComponent(request.id)}/soft-delete`
|
|
8149
8268
|
};
|
|
8269
|
+
case "upload": return {
|
|
8270
|
+
body: JSON.stringify({
|
|
8271
|
+
field: request.field,
|
|
8272
|
+
filename: request.filename,
|
|
8273
|
+
mimeType: request.mimeType
|
|
8274
|
+
}),
|
|
8275
|
+
method: "POST",
|
|
8276
|
+
path: "/uploads"
|
|
8277
|
+
};
|
|
8150
8278
|
}
|
|
8151
8279
|
};
|
|
8152
8280
|
const createEntityHttpTransport = (options) => {
|
|
@@ -376,7 +376,25 @@ interface MemberUserPage {
|
|
|
376
376
|
pageSize: number;
|
|
377
377
|
totalItems: number;
|
|
378
378
|
}
|
|
379
|
+
declare const storageFileIdBrand: unique symbol;
|
|
380
|
+
/** A durable private file of the application's Organization. */
|
|
381
|
+
type StorageFileId = string & Readonly<{
|
|
382
|
+
[storageFileIdBrand]: "StorageFileId";
|
|
383
|
+
}>;
|
|
384
|
+
/**
|
|
385
|
+
* One file of up to 10 MiB, base64-encoded. CI accepts the content types
|
|
386
|
+
* `application/pdf`, `image/jpeg` and `image/png`.
|
|
387
|
+
*/
|
|
388
|
+
interface DurableFileUpload {
|
|
389
|
+
contentBase64: string;
|
|
390
|
+
contentType: string;
|
|
391
|
+
fileName: string;
|
|
392
|
+
sizeBytes: number;
|
|
393
|
+
}
|
|
379
394
|
type ExternalApplicationServiceOperationRequest = {
|
|
395
|
+
input: DurableFileUpload;
|
|
396
|
+
operationId: "files_upload";
|
|
397
|
+
} | {
|
|
380
398
|
input: {
|
|
381
399
|
email: string;
|
|
382
400
|
name: string;
|
|
@@ -404,6 +422,11 @@ type ExternalApplicationServiceOperationRequest = {
|
|
|
404
422
|
userId: string;
|
|
405
423
|
};
|
|
406
424
|
operationId: "members_remove";
|
|
425
|
+
} | {
|
|
426
|
+
input: {
|
|
427
|
+
origin: string;
|
|
428
|
+
};
|
|
429
|
+
operationId: "origins_set_runtime";
|
|
407
430
|
} | {
|
|
408
431
|
input: {
|
|
409
432
|
userId: string;
|
|
@@ -420,10 +443,14 @@ type ExternalApplicationServiceOperationRequest = {
|
|
|
420
443
|
interface UserCompanyLinks {
|
|
421
444
|
entityIds: string[];
|
|
422
445
|
}
|
|
423
|
-
type ExternalApplicationServiceOperationSuccess = EnvelopeSuccess<"
|
|
446
|
+
type ExternalApplicationServiceOperationSuccess = EnvelopeSuccess<"files_upload", {
|
|
447
|
+
storageFileId: StorageFileId;
|
|
448
|
+
}> | EnvelopeSuccess<"members_create_or_get", MemberUser & {
|
|
424
449
|
outcome: MemberUserResolution;
|
|
425
450
|
}> | EnvelopeSuccess<"members_get", MemberUser> | EnvelopeSuccess<"members_list", MemberUserPage> | EnvelopeSuccess<"members_update", MemberUser> | EnvelopeSuccess<"members_remove", {
|
|
426
451
|
userId: string;
|
|
452
|
+
}> | EnvelopeSuccess<"origins_set_runtime", {
|
|
453
|
+
origin: string;
|
|
427
454
|
}> | EnvelopeSuccess<"users_list_company_links", UserCompanyLinks> | EnvelopeSuccess<"users_link_companies", UserCompanyLinks>;
|
|
428
455
|
/** Every operation a confidential server client may invoke. */
|
|
429
456
|
type ExternalApplicationServerOperationRequest = ExternalApplicationOperationRequest | ExternalApplicationServiceOperationRequest;
|
|
@@ -516,6 +543,8 @@ type ResourceCapabilities = Readonly<{
|
|
|
516
543
|
search: true;
|
|
517
544
|
softDelete?: boolean;
|
|
518
545
|
update?: boolean;
|
|
546
|
+
/** File uploads for the File fields of a common entity resource. */
|
|
547
|
+
upload?: boolean;
|
|
519
548
|
}>;
|
|
520
549
|
type ResourcePaginationMode = "cursor" | "page";
|
|
521
550
|
type PortableResourceSchema = Readonly<Record<string, ResourceJsonValue>>;
|
|
@@ -550,13 +579,21 @@ type ResourceDefinition<Entity, Create = Entity, Update = Partial<Entity>> = Rea
|
|
|
550
579
|
}>;
|
|
551
580
|
}>;
|
|
552
581
|
type FilterValue = ResourceJsonValue | readonly ResourceJsonValue[];
|
|
582
|
+
/**
|
|
583
|
+
* A filter predicate. `field` names a declared filterable field, or a path
|
|
584
|
+
* through at most three fields that hold Entity References to a field of
|
|
585
|
+
* the last target, such as `company.industry` or
|
|
586
|
+
* `contacts.company.parent.industry`. On a field that holds Entity
|
|
587
|
+
* References, `is_empty` means no reference, and `contains_any` and
|
|
588
|
+
* `contains_all` compare the ids of a field that holds many.
|
|
589
|
+
*/
|
|
553
590
|
type ResourceFilter = Readonly<{
|
|
554
591
|
field: string;
|
|
555
|
-
operator: "contains" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
|
|
592
|
+
operator: "contains" | "contains_all" | "contains_any" | "ends_with" | "eq" | "gt" | "gte" | "in" | "lt" | "lte" | "ne" | "not_in" | "starts_with";
|
|
556
593
|
value: FilterValue;
|
|
557
594
|
}> | Readonly<{
|
|
558
595
|
field: string;
|
|
559
|
-
operator: "is_not_null" | "is_null";
|
|
596
|
+
operator: "is_empty" | "is_not_null" | "is_null";
|
|
560
597
|
}> | Readonly<{
|
|
561
598
|
filters: readonly ResourceFilter[];
|
|
562
599
|
operator: "and" | "or";
|
|
@@ -579,6 +616,11 @@ type ResourcePagination = Readonly<{
|
|
|
579
616
|
}>;
|
|
580
617
|
type ResourceListQuery = Readonly<{
|
|
581
618
|
filter?: ResourceFilter;
|
|
619
|
+
/**
|
|
620
|
+
* Include Paths, such as `["company", "contacts.company"]`: relation
|
|
621
|
+
* fields whose records each item carries in `included`.
|
|
622
|
+
*/
|
|
623
|
+
include?: readonly string[];
|
|
582
624
|
includeDeleted?: boolean;
|
|
583
625
|
pagination: ResourcePagination;
|
|
584
626
|
sort?: readonly ResourceSort[];
|
|
@@ -587,7 +629,15 @@ type ResourceListQuery = Readonly<{
|
|
|
587
629
|
type ResourceRecord<Entity> = Readonly<{
|
|
588
630
|
deletedAt?: string;
|
|
589
631
|
id: ResourceRecordId;
|
|
632
|
+
/**
|
|
633
|
+
* The records of the read's Include Paths by relation field key: one
|
|
634
|
+
* record, or the records of a `many` field in reference order. Untyped:
|
|
635
|
+
* the target schemas are CI's.
|
|
636
|
+
*/
|
|
637
|
+
included?: Readonly<Record<string, ResourceJsonValue>>;
|
|
590
638
|
revision: ResourceRevision;
|
|
639
|
+
/** The keys whose included records were cut to the first 100. */
|
|
640
|
+
truncated?: readonly string[];
|
|
591
641
|
value: Entity;
|
|
592
642
|
}>;
|
|
593
643
|
type ResourceListResult<Entity> = Readonly<{
|
|
@@ -602,7 +652,9 @@ type ResourceListResult<Entity> = Readonly<{
|
|
|
602
652
|
totalItems: number;
|
|
603
653
|
totalPages: number;
|
|
604
654
|
}>;
|
|
605
|
-
type ResourceErrorCode = "capability_not_supported" | "conflict" | "forbidden" | "internal" | "invalid_request" | "not_found" | "rate_limited" | "transport_error" | "unauthenticated" | "unavailable"
|
|
655
|
+
type ResourceErrorCode = "capability_not_supported" | "conflict" | "forbidden" | "internal" | "invalid_request" | "not_found" | "rate_limited" | "transport_error" | "unauthenticated" | "unavailable" |
|
|
656
|
+
/** The CI Organization storage can not take a presigned File upload. */
|
|
657
|
+
"upload_not_supported";
|
|
606
658
|
type ResourceError = Readonly<{
|
|
607
659
|
code: ResourceErrorCode;
|
|
608
660
|
/** Client-observed dispatch outcome; uncertainty never proves rollback. */
|
|
@@ -694,7 +746,7 @@ interface ResourceClient<Entity, Create = Entity, Update = Partial<Entity>> {
|
|
|
694
746
|
readonly update: (input: ResourceMutationInput<Update>, options?: ResourceRequestOptions) => Promise<ResourceResult<ResourceRecord<Entity>>>;
|
|
695
747
|
}
|
|
696
748
|
/** Common entity operations. Generic resource lifecycle/cursor APIs remain separate. */
|
|
697
|
-
type EntityOperation = "list" | "get" | "create" | "update" | "delete";
|
|
749
|
+
type EntityOperation = "list" | "get" | "create" | "update" | "delete" | "upload";
|
|
698
750
|
type EntityListQuery = Omit<ResourceListQuery, "pagination" | "includeDeleted"> & Readonly<{
|
|
699
751
|
pagination: Extract<ResourcePagination, {
|
|
700
752
|
mode: "page";
|
|
@@ -710,6 +762,42 @@ type EntityUpdateInput<Patch> = ResourceMutationInput<Patch> & Readonly<{
|
|
|
710
762
|
type EntityDeleteInput = ResourceLifecycleInput & Readonly<{
|
|
711
763
|
idempotencyKey: IdempotencyKey;
|
|
712
764
|
}>;
|
|
765
|
+
/** A File upload request for one File field of the entity schema. */
|
|
766
|
+
type EntityUploadInput = Readonly<{
|
|
767
|
+
field: string;
|
|
768
|
+
filename: string;
|
|
769
|
+
mimeType: string;
|
|
770
|
+
}>;
|
|
771
|
+
/** PUT the file bytes to `url` with `headers`; then write `{ upload: uploadId }`. */
|
|
772
|
+
type EntityUploadSlot = Readonly<{
|
|
773
|
+
headers: Readonly<Record<string, string>>;
|
|
774
|
+
method: "PUT";
|
|
775
|
+
uploadId: string;
|
|
776
|
+
url: string;
|
|
777
|
+
}>;
|
|
778
|
+
/** The read-time value of one file of a File field. */
|
|
779
|
+
type EntityFileValue = Readonly<{
|
|
780
|
+
id: string;
|
|
781
|
+
url: string;
|
|
782
|
+
filename: string;
|
|
783
|
+
mimeType: string | null;
|
|
784
|
+
size: number | null;
|
|
785
|
+
source: "managed" | "external_url";
|
|
786
|
+
}>;
|
|
787
|
+
/** `{ upload }` adds a File upload; `{ id }`, or a File value read before, keeps that file. */
|
|
788
|
+
type EntityFileWrite = Readonly<{
|
|
789
|
+
upload: string;
|
|
790
|
+
id?: never;
|
|
791
|
+
}> | Readonly<{
|
|
792
|
+
id: string;
|
|
793
|
+
upload?: never;
|
|
794
|
+
}>;
|
|
795
|
+
/**
|
|
796
|
+
* The write form of a File field key: one file or `null` for a single field,
|
|
797
|
+
* an ordered array for a multiple field, `null` removes every file. Omit the
|
|
798
|
+
* key to keep its files unchanged.
|
|
799
|
+
*/
|
|
800
|
+
type EntityFileFieldWrite = EntityFileWrite | readonly EntityFileWrite[] | null;
|
|
713
801
|
type EntityRequestIdentity = Readonly<{
|
|
714
802
|
requestId: string;
|
|
715
803
|
resourceId: string;
|
|
@@ -720,14 +808,17 @@ type EntityRequest<Create = unknown, Patch = unknown> = EntityRequestIdentity &
|
|
|
720
808
|
}> | Readonly<{
|
|
721
809
|
operation: "get";
|
|
722
810
|
id: ResourceRecordId;
|
|
811
|
+
include?: readonly string[];
|
|
723
812
|
}> | (Readonly<{
|
|
724
813
|
operation: "create";
|
|
725
814
|
}> & EntityCreateInput<Create>) | (Readonly<{
|
|
726
815
|
operation: "update";
|
|
727
816
|
}> & EntityUpdateInput<Patch>) | (Readonly<{
|
|
728
817
|
operation: "delete";
|
|
729
|
-
}> & EntityDeleteInput)
|
|
730
|
-
|
|
818
|
+
}> & EntityDeleteInput) | (Readonly<{
|
|
819
|
+
operation: "upload";
|
|
820
|
+
}> & EntityUploadInput));
|
|
821
|
+
type EntityOperationResult<Value, Operation extends EntityOperation> = Operation extends "list" ? EntityPage<Value> : Operation extends "upload" ? EntityUploadSlot : ResourceRecord<Value>;
|
|
731
822
|
/** Codecs return safe typed failures without coercing values or performing I/O. */
|
|
732
823
|
type EntityProtocol<Value, Create = Value, Patch = Partial<Value>> = Readonly<{
|
|
733
824
|
decodeRequest: (input: unknown) => ResourceResult<EntityRequest<Create, Patch>>;
|
|
@@ -742,10 +833,13 @@ interface EntityClient<Value, Create = Value, Patch = Partial<Value>> {
|
|
|
742
833
|
readonly list: (query: EntityListQuery, options?: ResourceRequestOptions) => Promise<ResourceResult<EntityPage<Value>>>;
|
|
743
834
|
readonly get: (input: Readonly<{
|
|
744
835
|
id: ResourceRecordId;
|
|
836
|
+
include?: readonly string[];
|
|
745
837
|
}>, options?: ResourceRequestOptions) => Promise<ResourceResult<ResourceRecord<Value>>>;
|
|
746
838
|
readonly create: (input: EntityCreateInput<Create>) => Promise<ResourceResult<ResourceRecord<Value>>>;
|
|
747
839
|
readonly update: (input: EntityUpdateInput<Patch>) => Promise<ResourceResult<ResourceRecord<Value>>>;
|
|
748
840
|
readonly delete: (input: EntityDeleteInput) => Promise<ResourceResult<ResourceRecord<Value>>>;
|
|
841
|
+
/** A single-use File upload slot; requires the `upload` capability. */
|
|
842
|
+
readonly upload: (input: EntityUploadInput, options?: ResourceRequestOptions) => Promise<ResourceResult<EntityUploadSlot>>;
|
|
749
843
|
}
|
|
750
844
|
type ClientOptions<Value, Create, Patch> = Readonly<{
|
|
751
845
|
definition: ResourceDefinition<Value, Create, Patch>;
|
|
@@ -775,4 +869,4 @@ type EntityHttpTransportOptions = Readonly<{
|
|
|
775
869
|
fetch?: ClientFetch;
|
|
776
870
|
}>;
|
|
777
871
|
declare const createEntityHttpTransport: (options: EntityHttpTransportOptions) => EntityTransport;
|
|
778
|
-
export {
|
|
872
|
+
export { ResourceUpdateRequest as $, ResourceError as A, FederatedAuthOptions as At, ResourceListRequest as B, PortableResourceSchema as C, QueryFilter as Ct, ResourceCreateRequest as D, FederatedAuth as Dt, ResourceCreateInput as E, ClientFetch as Et, ResourceIdentityField as F, ResourceRecord as G, ResourceMutationInput as H, ResourceJsonValue as I, ResourceResult as J, ResourceRecordId as K, ResourceLifecycleInput as L, ResourceFilter as M, FederatedSessionIdentity as Mt, ResourceGetRequest as N, createFederatedAuth as Nt, ResourceCursor as O, FederatedAuthError as Ot, ResourceId as P, ResourceTransportRequest as Q, ResourceLifecycleRequest as R, IdempotencyKey as S, KnowledgeQuery as St, ResourceClient as T, WorkflowInvokeTarget as Tt, ResourcePagination as U, ResourceListResult as V, ResourcePaginationMode as W, ResourceSort as X, ResourceRevision as Y, ResourceTransport as Z, EntityRequest as _, isClientOperationId as _t, createResourceClient as a, CiResult as at, EntityUploadInput as b, ConversationHistory as bt, EntityDeleteInput as c, OperationSuccess as ct, EntityFileWrite as d, ClientOperationInput as dt, ProxyAuthentication as et, EntityListQuery as f, ClientOperationMap as ft, EntityProtocol as g, clientOperationIds as gt, EntityPage as h, TypedOperationExecutor as ht, createEntityProtocol as i, CiErrorCode as it, ResourceErrorCode as j, FederatedAuthState as jt, ResourceDefinition as k, FederatedAuthErrorCode as kt, EntityFileFieldWrite as l, ClientOperationDefinition as lt, EntityOperationResult as m, OperationExecutionOptions as mt, EntityHttpTransportOptions as n, createProxyTransport as nt, EntityClient as o, JsonValue as ot, EntityOperation as p, ClientOperationOutput as pt, ResourceRequestOptions as q, createEntityHttpTransport as r, CiError as rt, EntityCreateInput as s, OperationRequest as st, EntityHttpDestination as t, ProxyTransportOptions as tt, EntityFileValue as u, ClientOperationId as ut, EntityTransport as v, AgentInvokeTarget as vt, ResourceCapabilities as w, SearchQuery as wt, EntityUploadSlot as x, JsonObject as xt, EntityUpdateInput as y, ConversationContinueTarget as yt, ResourceListQuery as z };
|
package/dist/resources.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { type EntityClient, type EntityCreateInput, type EntityDeleteInput, type EntityHttpDestination, type EntityHttpTransportOptions, type EntityListQuery, type EntityOperation, type EntityOperationResult, type EntityPage, type EntityProtocol, type EntityRequest, type EntityTransport, type EntityUpdateInput, type IdempotencyKey, type PortableResourceSchema, type ResourceCapabilities, type ResourceClient, type ResourceCreateInput, type ResourceCreateRequest, type ResourceCursor, type ResourceDefinition, type ResourceError, type ResourceErrorCode, type ResourceFilter, type ResourceGetRequest, type ResourceId, type ResourceIdentityField, type ResourceJsonValue, type ResourceLifecycleInput, type ResourceLifecycleRequest, type ResourceListQuery, type ResourceListRequest, type ResourceListResult, type ResourceMutationInput, type ResourcePagination, type ResourcePaginationMode, type ResourceRecord, type ResourceRecordId, type ResourceRequestOptions, type ResourceResult, type ResourceRevision, type ResourceSort, type ResourceTransport, type ResourceTransportRequest, type ResourceUpdateRequest, createEntityHttpTransport, createEntityProtocol, createResourceClient };
|
|
1
|
+
import { $ as ResourceUpdateRequest, A as ResourceError, B as ResourceListRequest, C as PortableResourceSchema, D as ResourceCreateRequest, E as ResourceCreateInput, F as ResourceIdentityField, G as ResourceRecord, H as ResourceMutationInput, I as ResourceJsonValue, J as ResourceResult, K as ResourceRecordId, L as ResourceLifecycleInput, M as ResourceFilter, N as ResourceGetRequest, O as ResourceCursor, P as ResourceId, Q as ResourceTransportRequest, R as ResourceLifecycleRequest, S as IdempotencyKey, T as ResourceClient, U as ResourcePagination, V as ResourceListResult, W as ResourcePaginationMode, X as ResourceSort, Y as ResourceRevision, Z as ResourceTransport, _ as EntityRequest, a as createResourceClient, b as EntityUploadInput, c as EntityDeleteInput, d as EntityFileWrite, f as EntityListQuery, g as EntityProtocol, h as EntityPage, i as createEntityProtocol, j as ResourceErrorCode, k as ResourceDefinition, l as EntityFileFieldWrite, m as EntityOperationResult, n as EntityHttpTransportOptions, o as EntityClient, p as EntityOperation, q as ResourceRequestOptions, r as createEntityHttpTransport, s as EntityCreateInput, t as EntityHttpDestination, u as EntityFileValue, v as EntityTransport, w as ResourceCapabilities, x as EntityUploadSlot, y as EntityUpdateInput, z as ResourceListQuery } from "./resources-D0bzEPx3.js";
|
|
2
|
+
export { type EntityClient, type EntityCreateInput, type EntityDeleteInput, type EntityFileFieldWrite, type EntityFileValue, type EntityFileWrite, type EntityHttpDestination, type EntityHttpTransportOptions, type EntityListQuery, type EntityOperation, type EntityOperationResult, type EntityPage, type EntityProtocol, type EntityRequest, type EntityTransport, type EntityUpdateInput, type EntityUploadInput, type EntityUploadSlot, type IdempotencyKey, type PortableResourceSchema, type ResourceCapabilities, type ResourceClient, type ResourceCreateInput, type ResourceCreateRequest, type ResourceCursor, type ResourceDefinition, type ResourceError, type ResourceErrorCode, type ResourceFilter, type ResourceGetRequest, type ResourceId, type ResourceIdentityField, type ResourceJsonValue, type ResourceLifecycleInput, type ResourceLifecycleRequest, type ResourceListQuery, type ResourceListRequest, type ResourceListResult, type ResourceMutationInput, type ResourcePagination, type ResourcePaginationMode, type ResourceRecord, type ResourceRecordId, type ResourceRequestOptions, type ResourceResult, type ResourceRevision, type ResourceSort, type ResourceTransport, type ResourceTransportRequest, type ResourceUpdateRequest, createEntityHttpTransport, createEntityProtocol, createResourceClient };
|
package/dist/resources.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createResourceClient, r as createEntityProtocol, t as createEntityHttpTransport } from "./resources-
|
|
1
|
+
import { n as createResourceClient, r as createEntityProtocol, t as createEntityHttpTransport } from "./resources-C0wYfzcV.js";
|
|
2
2
|
export { createEntityHttpTransport, createEntityProtocol, createResourceClient };
|
package/package.json
CHANGED