@collective-intelligence/external-apps-server-sdk 0.1.10 → 0.1.12
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 +58 -39
- package/dist/admin.d.ts +190 -308
- package/dist/admin.js +1 -1
- package/dist/auth/better-auth.d.ts +4 -2
- package/dist/auth/federated.d.ts +17 -7
- package/dist/auth/federated.js +1 -1
- package/dist/auth.d.ts +3 -1
- package/dist/gateway.js +2 -2
- package/dist/index.d.ts +156 -76
- package/dist/index.js +2 -2
- package/dist/persistence/drizzle.d.ts +4 -2
- package/dist/persistence/drizzle.js +3 -3
- package/dist/resources.d.ts +15 -3
- package/dist/resources.js +2 -2
- package/dist/runtime/effect.d.ts +12 -3
- package/dist/runtime/effect.js +3 -3
- package/dist/runtime/nestjs.d.ts +12 -3
- package/dist/runtime/nestjs.js +2 -2
- package/dist/runtime/next.d.ts +13 -4
- package/dist/runtime/next.js +2 -2
- package/dist/runtime/web.d.ts +4 -2
- package/dist/runtime/web.js +2 -2
- package/dist/tools/ai-sdk.js +2 -2
- package/package.json +3 -3
package/dist/resources.d.ts
CHANGED
|
@@ -212,7 +212,7 @@ export type ResourceCreateInput<Value> = Readonly<{
|
|
|
212
212
|
value: Value;
|
|
213
213
|
}>;
|
|
214
214
|
/** Common entity operations. Generic resource lifecycle/cursor APIs remain separate. */
|
|
215
|
-
export type EntityOperation = "list" | "get" | "create" | "update" | "delete" | "upload";
|
|
215
|
+
export type EntityOperation = "list_members" | "list" | "get" | "create" | "update" | "delete" | "upload";
|
|
216
216
|
export type EntityListQuery = Omit<ResourceListQuery, "pagination" | "includeDeleted"> & Readonly<{
|
|
217
217
|
pagination: Extract<ResourcePagination, {
|
|
218
218
|
mode: "page";
|
|
@@ -221,6 +221,8 @@ export type EntityListQuery = Omit<ResourceListQuery, "pagination" | "includeDel
|
|
|
221
221
|
export type EntityPage<Value> = Extract<ResourceListResult<Value>, {
|
|
222
222
|
pagination: "page";
|
|
223
223
|
}>;
|
|
224
|
+
/** Member schemas are resolved by CI, independently of the parent resource. */
|
|
225
|
+
export type EntityMemberValue = Readonly<Record<string, ResourceJsonValue>>;
|
|
224
226
|
export type EntityCreateInput<Value> = ResourceCreateInput<Value>;
|
|
225
227
|
export type EntityUpdateInput<Patch> = ResourceMutationInput<Patch> & Readonly<{
|
|
226
228
|
idempotencyKey: IdempotencyKey;
|
|
@@ -248,6 +250,11 @@ export type EntityRequestIdentity = Readonly<{
|
|
|
248
250
|
export type EntityRequest<Create = unknown, Patch = unknown> = EntityRequestIdentity & (Readonly<{
|
|
249
251
|
operation: "list";
|
|
250
252
|
query: EntityListQuery;
|
|
253
|
+
}> | Readonly<{
|
|
254
|
+
operation: "list_members";
|
|
255
|
+
parentId: ResourceRecordId;
|
|
256
|
+
field: string;
|
|
257
|
+
query: EntityListQuery;
|
|
251
258
|
}> | Readonly<{
|
|
252
259
|
operation: "get";
|
|
253
260
|
id: ResourceRecordId;
|
|
@@ -261,7 +268,7 @@ export type EntityRequest<Create = unknown, Patch = unknown> = EntityRequestIden
|
|
|
261
268
|
}> & EntityDeleteInput) | (Readonly<{
|
|
262
269
|
operation: "upload";
|
|
263
270
|
}> & EntityUploadInput));
|
|
264
|
-
export type EntityOperationResult<Value, Operation extends EntityOperation> = Operation extends "list" ? EntityPage<Value> : Operation extends "upload" ? EntityUploadSlot : ResourceRecord<Value>;
|
|
271
|
+
export type EntityOperationResult<Value, Operation extends EntityOperation> = Operation extends "list_members" ? EntityPage<EntityMemberValue> : Operation extends "list" ? EntityPage<Value> : Operation extends "upload" ? EntityUploadSlot : ResourceRecord<Value>;
|
|
265
272
|
/** Application login identities are separate from gateway machine callers. */
|
|
266
273
|
export type ApplicationUserIdentity = Readonly<{
|
|
267
274
|
kind: "local_user";
|
|
@@ -281,13 +288,15 @@ export type ApplicationUserIdentity = Readonly<{
|
|
|
281
288
|
* and request/correlation IDs are deliberately not part of that logical identity.
|
|
282
289
|
*/
|
|
283
290
|
export type EntityInvocationContext = Readonly<{
|
|
291
|
+
/** The App Permissions of the user's effective roles on the app. */
|
|
292
|
+
appPermissions: readonly string[];
|
|
284
293
|
applicationId: string;
|
|
285
294
|
issuer: string;
|
|
286
295
|
organizationId: string;
|
|
287
296
|
resourceId: string;
|
|
297
|
+
/** The user's effective roles on the app, read from CI at this lookup. */
|
|
288
298
|
roles: readonly string[];
|
|
289
299
|
scopes: readonly string[];
|
|
290
|
-
groupIds: readonly string[];
|
|
291
300
|
user: ApplicationUserIdentity;
|
|
292
301
|
}>;
|
|
293
302
|
export type PrincipalKind = "detached_user" | "service_principal";
|
|
@@ -427,6 +436,9 @@ export type ResourceHttpHandlerOptions<Value = unknown, Create = Value, Patch =
|
|
|
427
436
|
}>;
|
|
428
437
|
export type EntityHttpRoute = {
|
|
429
438
|
readonly kind: "search";
|
|
439
|
+
} | {
|
|
440
|
+
readonly kind: "relation_members";
|
|
441
|
+
readonly id: string;
|
|
430
442
|
} | {
|
|
431
443
|
readonly kind: "collection";
|
|
432
444
|
} | {
|