@collective-intelligence/external-apps-client-sdk 0.1.36 → 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.
@@ -0,0 +1,109 @@
1
+ import { T as CiTransportError, f as runEntityRequest, l as makeEntityCore, r as fromEntityTransport, u as makeLegacyResourceCore } from "./service-C7kswu6e.js";
2
+ import * as Layer from "effect/Layer";
3
+ import * as ManagedRuntime from "effect/ManagedRuntime";
4
+ /**
5
+ * The `.` facade of the entity client core (`./service`), in a runtime of
6
+ * its own; `close` disposes it. A transport failure, or an abort in flight,
7
+ * resolves `transport_error`: `rejected` for a read, `uncertain` for a
8
+ * write.
9
+ */
10
+ const createCommonEntityClient = (options) => {
11
+ const runtime = ManagedRuntime.make(Layer.empty);
12
+ const core = makeEntityCore({
13
+ definition: options.definition,
14
+ execute: fromEntityTransport(options.transport),
15
+ requestId: options.requestId
16
+ });
17
+ const execute = (input, requestOptions = {}) => {
18
+ const correlationId = core.requestId();
19
+ return runEntityRequest(runtime, core.execute(input, correlationId, requestOptions), {
20
+ correlationId,
21
+ message: "The entity transport failed",
22
+ operation: input.operation,
23
+ signal: requestOptions.signal
24
+ });
25
+ };
26
+ return {
27
+ close: () => runtime.dispose(),
28
+ create: (input) => execute({
29
+ ...input,
30
+ operation: "create"
31
+ }),
32
+ definition: options.definition,
33
+ delete: (input) => execute({
34
+ ...input,
35
+ operation: "delete"
36
+ }),
37
+ get: (input, requestOptions) => execute({
38
+ ...input,
39
+ operation: "get"
40
+ }, requestOptions),
41
+ list: (query, requestOptions) => execute({
42
+ operation: "list",
43
+ query
44
+ }, requestOptions),
45
+ listMembers: (parentId, field, query, requestOptions) => execute({
46
+ field,
47
+ operation: "list_members",
48
+ parentId,
49
+ query
50
+ }, requestOptions),
51
+ update: (input) => execute({
52
+ ...input,
53
+ operation: "update"
54
+ }),
55
+ upload: (input, requestOptions) => execute({
56
+ ...input,
57
+ operation: "upload"
58
+ }, requestOptions)
59
+ };
60
+ };
61
+ const unavailable = (cause) => ({
62
+ code: "transport_error",
63
+ details: { cause: cause instanceof Error ? cause.message : String(cause) },
64
+ message: "The resource transport failed",
65
+ retryable: true
66
+ });
67
+ const defaultRequestId = () => globalThis.crypto.randomUUID();
68
+ /**
69
+ * The `.` facade of the resource core (`./service`), in a runtime of its
70
+ * own that holds no service: the core needs none. `close` disposes it. A
71
+ * transport that rejects resolves `transport_error`.
72
+ */
73
+ const createLegacyResourceClient = (options) => {
74
+ const runtime = ManagedRuntime.make(Layer.empty);
75
+ const requestId = options.requestId ?? defaultRequestId;
76
+ const legacy = makeLegacyResourceCore({
77
+ definition: options.definition,
78
+ transport: options.transport
79
+ });
80
+ const run = async (call, requestOptions) => {
81
+ const correlationId = requestId();
82
+ try {
83
+ return await runtime.runPromise(call(correlationId, requestOptions));
84
+ } catch (error) {
85
+ if (!(error instanceof CiTransportError)) throw error;
86
+ return {
87
+ correlationId,
88
+ error: unavailable(error.cause),
89
+ ok: false
90
+ };
91
+ }
92
+ };
93
+ return {
94
+ capabilities: options.definition.capabilities,
95
+ close: () => runtime.dispose(),
96
+ create: (input, requestOptions) => run(legacy.create(input), requestOptions),
97
+ definition: options.definition,
98
+ get: (input, requestOptions) => run(legacy.get(input), requestOptions),
99
+ hardDelete: (input, requestOptions) => run(legacy.hardDelete(input), requestOptions),
100
+ list: (query, requestOptions) => run(legacy.list(query), requestOptions),
101
+ restore: (input, requestOptions) => run(legacy.restore(input), requestOptions),
102
+ softDelete: (input, requestOptions) => run(legacy.softDelete(input), requestOptions),
103
+ update: (input, requestOptions) => run(legacy.update(input), requestOptions)
104
+ };
105
+ };
106
+ function createResourceClient(options) {
107
+ return options.protocol === "entity" ? createCommonEntityClient(options) : createLegacyResourceClient(options);
108
+ }
109
+ export { createResourceClient as t };
@@ -1,4 +1,167 @@
1
- import { t as ClientFetch } from "./federated-auth-lotz7RGT.js";
1
+ import * as Schema from "effect/Schema";
2
+ import * as Config from "effect/Config";
3
+ import * as Context from "effect/Context";
4
+ import * as Effect from "effect/Effect";
5
+ import * as Layer from "effect/Layer";
6
+ import * as Stream from "effect/Stream";
7
+ import "effect/ManagedRuntime";
8
+ /** Code of an Expected Error that CI returns for an operation. */
9
+ declare const CiErrorCode$1: Schema.Literals<readonly ["unauthenticated", "forbidden", "not_found", "conflict", "invalid_request", "rate_limited", "unavailable", "internal"]>;
10
+ type CiErrorCode$1 = typeof CiErrorCode$1.Type;
11
+ /** Code of an Expected Error of the federated sign-in flow. */
12
+ declare const FederatedAuthErrorCode: Schema.Literals<readonly ["configuration_error", "invalid_return_target", "invalid_callback", "invalid_state", "transaction_expired", "authorization_failed", "token_exchange_failed", "reauthorization_required"]>;
13
+ type FederatedAuthErrorCode = typeof FederatedAuthErrorCode.Type;
14
+ declare const CiError_base: Schema.Class<CiError$1, Schema.TaggedStruct<"CiError", {
15
+ readonly code: Schema.Literals<readonly ["unauthenticated", "forbidden", "not_found", "conflict", "invalid_request", "rate_limited", "unavailable", "internal"]>;
16
+ readonly details: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
17
+ readonly message: Schema.String;
18
+ readonly retryable: Schema.Boolean;
19
+ }>, import("effect/Cause").YieldableError>;
20
+ /** An Expected Error that CI returns for an operation. */
21
+ declare class CiError$1 extends CiError_base {}
22
+ type FederatedAuthErrorFields = Readonly<{
23
+ code: FederatedAuthErrorCode;
24
+ message: string;
25
+ }>;
26
+ declare const FederatedAuthError_base: Schema.Class<FederatedAuthError, Schema.TaggedStruct<"FederatedAuthError", {
27
+ readonly code: Schema.Literals<readonly ["configuration_error", "invalid_return_target", "invalid_callback", "invalid_state", "transaction_expired", "authorization_failed", "token_exchange_failed", "reauthorization_required"]>;
28
+ readonly message: Schema.String;
29
+ }>, import("effect/Cause").YieldableError>;
30
+ /** An Expected Error of the federated sign-in flow. */
31
+ declare class FederatedAuthError extends FederatedAuthError_base {
32
+ constructor(fields: FederatedAuthErrorFields, options?: Schema.MakeOptions);
33
+ /** The positional form that `.` callers used before the tagged class. */
34
+ constructor(code: FederatedAuthErrorCode, message: string);
35
+ }
36
+ declare const CiTransportError_base: Schema.Class<CiTransportError, Schema.TaggedStruct<"CiTransportError", {
37
+ readonly cause: Schema.Defect;
38
+ }>, import("effect/Cause").YieldableError>;
39
+ /** The request did not reach CI, or CI's response was not readable. */
40
+ declare class CiTransportError extends CiTransportError_base {}
41
+ type ServerSessionAuthOptions = Readonly<{
42
+ basePath: string;
43
+ fetch?: ClientFetch;
44
+ navigate?: (url: string) => void;
45
+ now?: () => number;
46
+ origin?: string;
47
+ }>;
48
+ /**
49
+ * Browser session client for a sealed-cookie BFF. The access token never
50
+ * leaves the server. A bad option throws `FederatedAuthError`
51
+ * `configuration_error`. `close` disposes the runtime of the client.
52
+ */
53
+ declare const createServerSessionAuth: (options: ServerSessionAuthOptions) => FederatedAuth & Readonly<{
54
+ close: () => Promise<void>;
55
+ }>;
56
+ type ReturnTarget = Readonly<{
57
+ returnTo: string;
58
+ }>;
59
+ type FederatedAuthValue = Readonly<{
60
+ beginLogin: (options: ReturnTarget) => Effect.Effect<string, FederatedAuthError>;
61
+ completeLogin: (callbackUrl: string) => Effect.Effect<ReturnTarget, FederatedAuthError | CiTransportError>;
62
+ getAccessToken: Effect.Effect<string, FederatedAuthError>;
63
+ logout: Effect.Effect<void>;
64
+ reauthorize: (options?: Readonly<{
65
+ returnTo?: string;
66
+ }>) => Effect.Effect<string, FederatedAuthError>;
67
+ /** The current state, read at once. */
68
+ getState: () => FederatedAuthState;
69
+ /** Calls `listener` at each state change, in the call that changes it. */
70
+ subscribe: (listener: (state: FederatedAuthState) => void) => () => void;
71
+ /** Each state change, from the subscription on. */
72
+ changes: Stream.Stream<FederatedAuthState>;
73
+ }>;
74
+ declare const FederatedAuth_base: Context.ServiceClass<FederatedAuth$1, "@collective-intelligence/external-apps-client-sdk/FederatedAuth", Readonly<{
75
+ beginLogin: (options: ReturnTarget) => Effect.Effect<string, FederatedAuthError>;
76
+ completeLogin: (callbackUrl: string) => Effect.Effect<ReturnTarget, FederatedAuthError | CiTransportError>;
77
+ getAccessToken: Effect.Effect<string, FederatedAuthError>;
78
+ logout: Effect.Effect<void>;
79
+ reauthorize: (options?: Readonly<{
80
+ returnTo?: string;
81
+ }>) => Effect.Effect<string, FederatedAuthError>;
82
+ /** The current state, read at once. */
83
+ getState: () => FederatedAuthState;
84
+ /** Calls `listener` at each state change, in the call that changes it. */
85
+ subscribe: (listener: (state: FederatedAuthState) => void) => () => void;
86
+ /** Each state change, from the subscription on. */
87
+ changes: Stream.Stream<FederatedAuthState>;
88
+ }>>;
89
+ declare class FederatedAuth$1 extends FederatedAuth_base {}
90
+ /** `FederatedAuth` of browser federated sign-in; a bad option fails with `configuration_error`. */
91
+ declare const layerFederated: (options: FederatedAuthOptions) => Layer.Layer<FederatedAuth$1, FederatedAuthError, never>;
92
+ /** `FederatedAuth` of a sealed-cookie BFF session; a bad option fails with `configuration_error`. */
93
+ declare const layerServerSession: (options: ServerSessionAuthOptions) => Layer.Layer<FederatedAuth$1, FederatedAuthError, never>;
94
+ /** `layerFederated` with options that Effect `Config` reads. */
95
+ declare const layerFederatedConfig: (config: Config.Wrap<FederatedAuthOptions>) => Layer.Layer<FederatedAuth$1, FederatedAuthError | Config.ConfigError, never>;
96
+ /** `layerServerSession` with options that Effect `Config` reads. */
97
+ declare const layerServerSessionConfig: (config: Config.Wrap<ServerSessionAuthOptions>) => Layer.Layer<FederatedAuth$1, FederatedAuthError | Config.ConfigError, never>;
98
+ /**
99
+ * The signed-in CI user as the application's BFF reports it: the fields of
100
+ * CI's `/oauth/identity`, read live by the server, plus email and name.
101
+ */
102
+ type FederatedSessionIdentity = Readonly<{
103
+ appId: string;
104
+ /** The App Permissions of the user's effective roles. */
105
+ appPermissions: readonly string[];
106
+ email: string | null;
107
+ /** A person is a member or an External App User of one Organization, never both. */
108
+ kind: "member" | "external_app_user";
109
+ name: string | null;
110
+ organizationId: string;
111
+ /** The user's effective roles on the app. */
112
+ roles: readonly string[];
113
+ userId: string;
114
+ }>;
115
+ type FederatedAuthState = Readonly<{
116
+ status: "anonymous";
117
+ }> | Readonly<{
118
+ status: "redirecting";
119
+ }> | Readonly<{
120
+ expiresAt: number;
121
+ identity?: FederatedSessionIdentity;
122
+ status: "authenticated";
123
+ }> | Readonly<{
124
+ status: "expired";
125
+ }> | Readonly<{
126
+ error: FederatedAuthError;
127
+ status: "error";
128
+ }>;
129
+ type FederatedAuth = Readonly<{
130
+ beginLogin: (options: Readonly<{
131
+ returnTo: string;
132
+ }>) => Promise<string>;
133
+ completeLogin: (callbackUrl: string) => Promise<Readonly<{
134
+ returnTo: string;
135
+ }>>;
136
+ getAccessToken: () => Promise<string>;
137
+ getState: () => FederatedAuthState;
138
+ logout: () => Promise<void>;
139
+ reauthorize: (options?: Readonly<{
140
+ returnTo?: string;
141
+ }>) => Promise<string>;
142
+ subscribe: (listener: (state: FederatedAuthState) => void) => () => void;
143
+ }>;
144
+ type ClientFetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
145
+ type FederatedAuthOptions = Readonly<{
146
+ clientId: string;
147
+ crypto?: Pick<Crypto, "getRandomValues" | "subtle">;
148
+ fetch?: ClientFetch;
149
+ navigate?: (url: string) => void;
150
+ now?: () => number;
151
+ redirectUri: string;
152
+ scopes: readonly string[];
153
+ sessionStorage?: Pick<Storage, "getItem" | "removeItem" | "setItem">;
154
+ tenantUrl: string;
155
+ }>;
156
+ /**
157
+ * Browser federated sign-in with PKCE; the access token stays in memory. A
158
+ * bad option throws `FederatedAuthError` `configuration_error`. Methods
159
+ * reject with `FederatedAuthError`, or with `CiTransportError` when the
160
+ * tenant cannot be reached. `close` disposes the runtime of the client.
161
+ */
162
+ declare const createFederatedAuth: (options: FederatedAuthOptions) => FederatedAuth & Readonly<{
163
+ close: () => Promise<void>;
164
+ }>;
2
165
  type ExternalApplicationsListAppUsersResponses = {
3
166
  /**
4
167
  * Success
@@ -515,7 +678,13 @@ type ProxyTransportOptions = Readonly<{
515
678
  path: string;
516
679
  serverUrl: string;
517
680
  }>;
518
- declare const createProxyTransport: <Operations extends ClientOperationMap>(options: ProxyTransportOptions) => TypedOperationExecutor<Operations>;
681
+ /**
682
+ * The Vanilla Facade of `CiClient.layerProxy`, in a runtime of its own;
683
+ * `close` disposes it. A bad `serverUrl` or `path` throws `TypeError`.
684
+ */
685
+ declare const createProxyTransport: <Operations extends ClientOperationMap>(options: ProxyTransportOptions) => TypedOperationExecutor<Operations> & Readonly<{
686
+ close: () => Promise<void>;
687
+ }>;
519
688
  type ResourceJsonValue = null | boolean | number | string | readonly ResourceJsonValue[] | Readonly<{
520
689
  [key: string]: ResourceJsonValue;
521
690
  }>;
@@ -863,10 +1032,14 @@ type ClientOptions<Value, Create, Patch> = Readonly<{
863
1032
  declare function createResourceClient<Value, Create = Value, Patch = Partial<Value>>(options: ClientOptions<Value, Create, Patch> & Readonly<{
864
1033
  protocol: "entity";
865
1034
  transport: EntityTransport;
866
- }>): EntityClient<Value, Create, Patch>;
1035
+ }>): EntityClient<Value, Create, Patch> & Readonly<{
1036
+ close: () => Promise<void>;
1037
+ }>;
867
1038
  declare function createResourceClient<Value, Create = Value, Patch = Partial<Value>>(options: ClientOptions<Value, Create, Patch> & Readonly<{
868
1039
  transport: ResourceTransport;
869
- }>): ResourceClient<Value, Create, Patch>;
1040
+ }>): ResourceClient<Value, Create, Patch> & Readonly<{
1041
+ close: () => Promise<void>;
1042
+ }>;
870
1043
  /** Narrow a decoded resource failure to its documented request-wide read limit. */
871
1044
  declare const isEntityReadLimitError: (error: ResourceError) => error is ResourceError & Readonly<{
872
1045
  code: "invalid_request";
@@ -874,6 +1047,86 @@ declare const isEntityReadLimitError: (error: ResourceError) => error is Resourc
874
1047
  }>;
875
1048
  /** Common entity wire codec; transport and persistence remain with their owners. */
876
1049
  declare const createEntityProtocol: <Value, Create = Value, Patch = Partial<Value>>(definition: ResourceDefinition<Value, Create, Patch>) => EntityProtocol<Value, Create, Patch>;
1050
+ type ResourceFailure = CiError$1 | CiTransportError;
1051
+ /** The entity client of one Resource Definition for `./effect`. */
1052
+ type ResourceEntityClient<Value, Create, Patch> = Readonly<{
1053
+ definition: ResourceDefinition<Value, Create, Patch>;
1054
+ get: (input: Readonly<{
1055
+ id: ResourceRecordId;
1056
+ include?: readonly string[];
1057
+ }>) => Effect.Effect<ResourceRecord<Value>, ResourceFailure>;
1058
+ list: (query: EntityListQuery) => Effect.Effect<EntityPage<Value>, ResourceFailure>;
1059
+ listMembers: (parentId: ResourceRecordId, field: string, query: EntityListQuery) => Effect.Effect<EntityPage<EntityMemberValue>, ResourceFailure>;
1060
+ create: (input: EntityCreateInput<Create>) => Effect.Effect<ResourceRecord<Value>, ResourceFailure>;
1061
+ update: (input: EntityUpdateInput<Patch>) => Effect.Effect<ResourceRecord<Value>, ResourceFailure>;
1062
+ delete: (input: EntityDeleteInput) => Effect.Effect<ResourceRecord<Value>, ResourceFailure>;
1063
+ upload: (input: EntityUploadInput) => Effect.Effect<EntityUploadSlot, ResourceFailure>;
1064
+ }>;
1065
+ type ResourcesValue = Readonly<{
1066
+ /** The entity client of `definition`; a bad destination dies with `TypeError`. */
1067
+ bind: <Value, Create = Value, Patch = Partial<Value>>(definition: ResourceDefinition<Value, Create, Patch>) => ResourceEntityClient<Value, Create, Patch>;
1068
+ }>;
1069
+ declare const Resources_base: Context.ServiceClass<Resources, "@collective-intelligence/external-apps-client-sdk/Resources", Readonly<{
1070
+ /** The entity client of `definition`; a bad destination dies with `TypeError`. */
1071
+ bind: <Value, Create = Value, Patch = Partial<Value>>(definition: ResourceDefinition<Value, Create, Patch>) => ResourceEntityClient<Value, Create, Patch>;
1072
+ }>>;
1073
+ declare class Resources extends Resources_base {}
1074
+ type ResourcesLayerOptions = Readonly<{
1075
+ authentication: ProxyAuthentication;
1076
+ /** The HTTP destination of each Resource Definition, by its id. */
1077
+ destination: (resourceId: string) => EntityHttpDestination;
1078
+ fetch?: ClientFetch;
1079
+ requestId?: () => string;
1080
+ }>;
1081
+ /** `Resources` over the entity HTTP routes of `destination`. */
1082
+ declare const layer: (options: ResourcesLayerOptions) => Layer.Layer<Resources, never, never>;
1083
+ /** `layer` with options that Effect `Config` reads. */
1084
+ declare const layerConfig: (config: Config.Wrap<ResourcesLayerOptions>) => Layer.Layer<Resources, Config.ConfigError, never>;
1085
+ type ResourcesFromEntityTransportOptions = Readonly<{
1086
+ requestId?: () => string;
1087
+ transport: EntityTransport;
1088
+ }>;
1089
+ /**
1090
+ * `Resources` over an `EntityTransport` of the app, as
1091
+ * `createResourceClient` with `protocol: "entity"`. A rejection of the
1092
+ * transport fails with `CiTransportError`.
1093
+ */
1094
+ declare const layerFromEntityTransport: (options: ResourcesFromEntityTransportOptions) => Layer.Layer<Resources, never, never>;
1095
+ /**
1096
+ * The legacy resource client of one Resource Definition for `./effect`,
1097
+ * with the lifecycle operations. It fails as a `Resources` client does.
1098
+ */
1099
+ type LegacyResourceClient<Entity, Create, Update> = Readonly<{
1100
+ create: (input: ResourceCreateInput<Create>) => Effect.Effect<ResourceRecord<Entity>, ResourceFailure>;
1101
+ definition: ResourceDefinition<Entity, Create, Update>;
1102
+ get: (input: Readonly<{
1103
+ id: ResourceRecordId;
1104
+ includeDeleted?: boolean;
1105
+ }>) => Effect.Effect<ResourceRecord<Entity>, ResourceFailure>;
1106
+ hardDelete: (input: ResourceLifecycleInput) => Effect.Effect<void, ResourceFailure>;
1107
+ list: (query: ResourceListQuery) => Effect.Effect<ResourceListResult<Entity>, ResourceFailure>;
1108
+ restore: (input: ResourceLifecycleInput) => Effect.Effect<ResourceRecord<Entity>, ResourceFailure>;
1109
+ softDelete: (input: ResourceLifecycleInput) => Effect.Effect<ResourceRecord<Entity>, ResourceFailure>;
1110
+ update: (input: ResourceMutationInput<Update>) => Effect.Effect<ResourceRecord<Entity>, ResourceFailure>;
1111
+ }>;
1112
+ type LegacyResourcesValue = Readonly<{
1113
+ /** The legacy client of `definition` over the `ResourceTransport` of the layer. */
1114
+ bind: <Entity, Create = Entity, Update = Partial<Entity>>(definition: ResourceDefinition<Entity, Create, Update>) => LegacyResourceClient<Entity, Create, Update>;
1115
+ }>;
1116
+ declare const LegacyResources_base: Context.ServiceClass<LegacyResources, "@collective-intelligence/external-apps-client-sdk/LegacyResources", Readonly<{
1117
+ /** The legacy client of `definition` over the `ResourceTransport` of the layer. */
1118
+ bind: <Entity, Create = Entity, Update = Partial<Entity>>(definition: ResourceDefinition<Entity, Create, Update>) => LegacyResourceClient<Entity, Create, Update>;
1119
+ }>>;
1120
+ /** The `./effect` form of `createResourceClient` over a `ResourceTransport`. */
1121
+ declare class LegacyResources extends LegacyResources_base {}
1122
+ type LegacyResourcesLayerOptions = Readonly<{
1123
+ requestId?: () => string;
1124
+ transport: ResourceTransport;
1125
+ }>;
1126
+ /** `LegacyResources` over the `ResourceTransport` of `options`. */
1127
+ declare const layerLegacy: (options: LegacyResourcesLayerOptions) => Layer.Layer<LegacyResources, never, never>;
1128
+ /** `layerLegacy` with options that Effect `Config` reads. */
1129
+ declare const layerLegacyConfig: (config: Config.Wrap<LegacyResourcesLayerOptions>) => Layer.Layer<LegacyResources, Config.ConfigError, never>;
877
1130
  type EntityHttpDestination = Readonly<{
878
1131
  kind: "gateway";
879
1132
  endpoint: string;
@@ -888,5 +1141,11 @@ type EntityHttpTransportOptions = Readonly<{
888
1141
  authentication: ProxyAuthentication;
889
1142
  fetch?: ClientFetch;
890
1143
  }>;
891
- declare const createEntityHttpTransport: (options: EntityHttpTransportOptions) => EntityTransport;
892
- export { ResourceSort as $, ResourceCreateRequest as A, ResourceLifecycleInput as B, EntityUploadInput as C, ConversationContinueTarget as Ct, ResourceCapabilities as D, QueryFilter as Dt, PortableResourceSchema as E, KnowledgeQuery as Et, ResourceFilter as F, ResourceMutationInput as G, ResourceListQuery as H, ResourceGetRequest as I, ResourceRecord as J, ResourcePagination as K, ResourceId as L, ResourceDefinition as M, ResourceError as N, ResourceClient as O, SearchQuery as Ot, ResourceErrorCode as P, ResourceRevision as Q, ResourceIdentityField as R, EntityUpdateInput as S, ApplicationRole as St, IdempotencyKey as T, JsonObject as Tt, ResourceListRequest as U, ResourceLifecycleRequest as V, ResourceListResult as W, ResourceRequestOptions as X, ResourceRecordId as Y, ResourceResult as Z, EntityPage as _, OperationExecutionOptions as _t, isEntityReadLimitError as a, createProxyTransport as at, EntityRequest as b, isClientOperationId as bt, EntityCreateInput as c, CiResult as ct, EntityFileValue as d, OperationSuccess as dt, ResourceTransport as et, EntityFileWrite as f, ClientOperationDefinition as ft, EntityOperationResult as g, ClientOperationOutput as gt, EntityOperation as h, ClientOperationMap as ht, createEntityProtocol as i, ProxyTransportOptions as it, ResourceCursor as j, ResourceCreateInput as k, WorkflowInvokeTarget as kt, EntityDeleteInput as l, JsonValue as lt, EntityMemberValue as m, ClientOperationInput as mt, EntityHttpTransportOptions as n, ResourceUpdateRequest as nt, createResourceClient as o, CiError as ot, EntityListQuery as p, ClientOperationId as pt, ResourcePaginationMode as q, createEntityHttpTransport as r, ProxyAuthentication as rt, EntityClient as s, CiErrorCode as st, EntityHttpDestination as t, ResourceTransportRequest as tt, EntityFileFieldWrite as u, OperationRequest as ut, EntityProtocol as v, TypedOperationExecutor as vt, EntityUploadSlot as w, ConversationHistory as wt, EntityTransport as x, AgentInvokeTarget as xt, EntityReadLimitDetails as y, clientOperationIds as yt, ResourceJsonValue as z };
1144
+ /**
1145
+ * The Vanilla Facade of the entity HTTP adapter, in a runtime of its own;
1146
+ * `close` disposes it.
1147
+ */
1148
+ declare const createEntityHttpTransport: (options: EntityHttpTransportOptions) => EntityTransport & Readonly<{
1149
+ close: () => Promise<void>;
1150
+ }>;
1151
+ export { ResourceJsonValue as $, layerFederatedConfig as $t, EntityOperationResult as A, ClientOperationOutput as At, PortableResourceSchema as B, KnowledgeQuery as Bt, EntityDeleteInput as C, JsonValue as Ct, EntityListQuery as D, ClientOperationId as Dt, EntityFileWrite as E, ClientOperationDefinition as Et, EntityTransport as F, AgentInvokeTarget as Ft, ResourceCursor as G, FederatedAuth as Gt, ResourceClient as H, SearchQuery as Ht, EntityUpdateInput as I, ApplicationRole as It, ResourceErrorCode as J, FederatedSessionIdentity as Jt, ResourceDefinition as K, FederatedAuthOptions as Kt, EntityUploadInput as L, ConversationContinueTarget as Lt, EntityProtocol as M, TypedOperationExecutor as Mt, EntityReadLimitDetails as N, clientOperationIds as Nt, EntityMemberValue as O, ClientOperationInput as Ot, EntityRequest as P, isClientOperationId as Pt, ResourceIdentityField as Q, layerFederated as Qt, EntityUploadSlot as R, ConversationHistory as Rt, EntityCreateInput as S, CiResult as St, EntityFileValue as T, OperationSuccess as Tt, ResourceCreateInput as U, WorkflowInvokeTarget as Ut, ResourceCapabilities as V, QueryFilter as Vt, ResourceCreateRequest as W, ClientFetch as Wt, ResourceGetRequest as X, FederatedAuth$1 as Xt, ResourceFilter as Y, createFederatedAuth as Yt, ResourceId as Z, FederatedAuthValue as Zt, layerLegacyConfig as _, ProxyAuthentication as _t, LegacyResources as a, CiErrorCode$1 as an, ResourceMutationInput as at, createResourceClient as b, CiError as bt, ResourceEntityClient as c, FederatedAuthErrorCode as cn, ResourceRecord as ct, ResourcesLayerOptions as d, ResourceResult as dt, layerServerSession as en, ResourceLifecycleInput as et, ResourcesValue as f, ResourceRevision as ft, layerLegacy as g, ResourceUpdateRequest as gt, layerFromEntityTransport as h, ResourceTransportRequest as ht, LegacyResourceClient as i, CiError$1 as in, ResourceListResult as it, EntityPage as j, OperationExecutionOptions as jt, EntityOperation as k, ClientOperationMap as kt, Resources as l, ResourceRecordId as lt, layerConfig as m, ResourceTransport as mt, EntityHttpTransportOptions as n, ServerSessionAuthOptions as nn, ResourceListQuery as nt, LegacyResourcesLayerOptions as o, CiTransportError as on, ResourcePagination as ot, layer as p, ResourceSort as pt, ResourceError as q, FederatedAuthState as qt, createEntityHttpTransport as r, createServerSessionAuth as rn, ResourceListRequest as rt, LegacyResourcesValue as s, FederatedAuthError as sn, ResourcePaginationMode as st, EntityHttpDestination as t, layerServerSessionConfig as tn, ResourceLifecycleRequest as tt, ResourcesFromEntityTransportOptions as u, ResourceRequestOptions as ut, createEntityProtocol as v, ProxyTransportOptions as vt, EntityFileFieldWrite as w, OperationRequest as wt, EntityClient as x, CiErrorCode as xt, isEntityReadLimitError as y, createProxyTransport as yt, IdempotencyKey as z, JsonObject as zt };
@@ -1,2 +1,2 @@
1
- import { $ as ResourceSort, A as ResourceCreateRequest, B as ResourceLifecycleInput, C as EntityUploadInput, D as ResourceCapabilities, E as PortableResourceSchema, F as ResourceFilter, G as ResourceMutationInput, H as ResourceListQuery, I as ResourceGetRequest, J as ResourceRecord, K as ResourcePagination, L as ResourceId, M as ResourceDefinition, N as ResourceError, O as ResourceClient, P as ResourceErrorCode, Q as ResourceRevision, R as ResourceIdentityField, S as EntityUpdateInput, T as IdempotencyKey, U as ResourceListRequest, V as ResourceLifecycleRequest, W as ResourceListResult, X as ResourceRequestOptions, Y as ResourceRecordId, Z as ResourceResult, _ as EntityPage, a as isEntityReadLimitError, b as EntityRequest, c as EntityCreateInput, d as EntityFileValue, et as ResourceTransport, f as EntityFileWrite, g as EntityOperationResult, h as EntityOperation, i as createEntityProtocol, j as ResourceCursor, k as ResourceCreateInput, l as EntityDeleteInput, m as EntityMemberValue, n as EntityHttpTransportOptions, nt as ResourceUpdateRequest, o as createResourceClient, p as EntityListQuery, q as ResourcePaginationMode, r as createEntityHttpTransport, s as EntityClient, t as EntityHttpDestination, tt as ResourceTransportRequest, u as EntityFileFieldWrite, v as EntityProtocol, w as EntityUploadSlot, x as EntityTransport, y as EntityReadLimitDetails, z as ResourceJsonValue } from "./resources-Czlu8xAB.js";
1
+ import { $ as ResourceJsonValue, A as EntityOperationResult, B as PortableResourceSchema, C as EntityDeleteInput, D as EntityListQuery, E as EntityFileWrite, F as EntityTransport, G as ResourceCursor, H as ResourceClient, I as EntityUpdateInput, J as ResourceErrorCode, K as ResourceDefinition, L as EntityUploadInput, M as EntityProtocol, N as EntityReadLimitDetails, O as EntityMemberValue, P as EntityRequest, Q as ResourceIdentityField, R as EntityUploadSlot, S as EntityCreateInput, T as EntityFileValue, U as ResourceCreateInput, V as ResourceCapabilities, W as ResourceCreateRequest, X as ResourceGetRequest, Y as ResourceFilter, Z as ResourceId, at as ResourceMutationInput, b as createResourceClient, ct as ResourceRecord, dt as ResourceResult, et as ResourceLifecycleInput, ft as ResourceRevision, gt as ResourceUpdateRequest, ht as ResourceTransportRequest, it as ResourceListResult, j as EntityPage, k as EntityOperation, lt as ResourceRecordId, mt as ResourceTransport, n as EntityHttpTransportOptions, nt as ResourceListQuery, ot as ResourcePagination, pt as ResourceSort, q as ResourceError, r as createEntityHttpTransport, rt as ResourceListRequest, st as ResourcePaginationMode, t as EntityHttpDestination, tt as ResourceLifecycleRequest, ut as ResourceRequestOptions, v as createEntityProtocol, w as EntityFileFieldWrite, x as EntityClient, y as isEntityReadLimitError, z as IdempotencyKey } from "./resources-tBGn1Exi.js";
2
2
  export { type EntityClient, type EntityCreateInput, type EntityDeleteInput, type EntityFileFieldWrite, type EntityFileValue, type EntityFileWrite, type EntityHttpDestination, type EntityHttpTransportOptions, type EntityListQuery, type EntityMemberValue, type EntityOperation, type EntityOperationResult, type EntityPage, type EntityProtocol, type EntityReadLimitDetails, 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, isEntityReadLimitError };
package/dist/resources.js CHANGED
@@ -1,2 +1,3 @@
1
- import { i as isEntityReadLimitError, n as createResourceClient, r as createEntityProtocol, t as createEntityHttpTransport } from "./resources-BFJrm_N2.js";
1
+ import { d as createEntityHttpTransport, m as isEntityReadLimitError, p as createEntityProtocol } from "./service-C7kswu6e.js";
2
+ import { t as createResourceClient } from "./resources-DT-KqPTd.js";
2
3
  export { createEntityHttpTransport, createEntityProtocol, createResourceClient, isEntityReadLimitError };