@collective-intelligence/external-apps-server-sdk 0.1.10 → 0.1.11
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/runtime/nestjs.d.ts
CHANGED
|
@@ -214,7 +214,7 @@ export type ResourceCreateInput<Value> = Readonly<{
|
|
|
214
214
|
value: Value;
|
|
215
215
|
}>;
|
|
216
216
|
/** Common entity operations. Generic resource lifecycle/cursor APIs remain separate. */
|
|
217
|
-
export type EntityOperation = "list" | "get" | "create" | "update" | "delete" | "upload";
|
|
217
|
+
export type EntityOperation = "list_members" | "list" | "get" | "create" | "update" | "delete" | "upload";
|
|
218
218
|
export type EntityListQuery = Omit<ResourceListQuery, "pagination" | "includeDeleted"> & Readonly<{
|
|
219
219
|
pagination: Extract<ResourcePagination, {
|
|
220
220
|
mode: "page";
|
|
@@ -223,6 +223,8 @@ export type EntityListQuery = Omit<ResourceListQuery, "pagination" | "includeDel
|
|
|
223
223
|
export type EntityPage<Value> = Extract<ResourceListResult<Value>, {
|
|
224
224
|
pagination: "page";
|
|
225
225
|
}>;
|
|
226
|
+
/** Member schemas are resolved by CI, independently of the parent resource. */
|
|
227
|
+
export type EntityMemberValue = Readonly<Record<string, ResourceJsonValue>>;
|
|
226
228
|
export type EntityCreateInput<Value> = ResourceCreateInput<Value>;
|
|
227
229
|
export type EntityUpdateInput<Patch> = ResourceMutationInput<Patch> & Readonly<{
|
|
228
230
|
idempotencyKey: IdempotencyKey;
|
|
@@ -250,6 +252,11 @@ export type EntityRequestIdentity = Readonly<{
|
|
|
250
252
|
export type EntityRequest<Create = unknown, Patch = unknown> = EntityRequestIdentity & (Readonly<{
|
|
251
253
|
operation: "list";
|
|
252
254
|
query: EntityListQuery;
|
|
255
|
+
}> | Readonly<{
|
|
256
|
+
operation: "list_members";
|
|
257
|
+
parentId: ResourceRecordId;
|
|
258
|
+
field: string;
|
|
259
|
+
query: EntityListQuery;
|
|
253
260
|
}> | Readonly<{
|
|
254
261
|
operation: "get";
|
|
255
262
|
id: ResourceRecordId;
|
|
@@ -263,7 +270,7 @@ export type EntityRequest<Create = unknown, Patch = unknown> = EntityRequestIden
|
|
|
263
270
|
}> & EntityDeleteInput) | (Readonly<{
|
|
264
271
|
operation: "upload";
|
|
265
272
|
}> & EntityUploadInput));
|
|
266
|
-
export type EntityOperationResult<Value, Operation extends EntityOperation> = Operation extends "list" ? EntityPage<Value> : Operation extends "upload" ? EntityUploadSlot : ResourceRecord<Value>;
|
|
273
|
+
export type EntityOperationResult<Value, Operation extends EntityOperation> = Operation extends "list_members" ? EntityPage<EntityMemberValue> : Operation extends "list" ? EntityPage<Value> : Operation extends "upload" ? EntityUploadSlot : ResourceRecord<Value>;
|
|
267
274
|
/** Application login identities are separate from gateway machine callers. */
|
|
268
275
|
export type ApplicationUserIdentity = Readonly<{
|
|
269
276
|
kind: "local_user";
|
|
@@ -283,13 +290,15 @@ export type ApplicationUserIdentity = Readonly<{
|
|
|
283
290
|
* and request/correlation IDs are deliberately not part of that logical identity.
|
|
284
291
|
*/
|
|
285
292
|
export type EntityInvocationContext = Readonly<{
|
|
293
|
+
/** The App Permissions of the user's effective roles on the app. */
|
|
294
|
+
appPermissions: readonly string[];
|
|
286
295
|
applicationId: string;
|
|
287
296
|
issuer: string;
|
|
288
297
|
organizationId: string;
|
|
289
298
|
resourceId: string;
|
|
299
|
+
/** The user's effective roles on the app, read from CI at this lookup. */
|
|
290
300
|
roles: readonly string[];
|
|
291
301
|
scopes: readonly string[];
|
|
292
|
-
groupIds: readonly string[];
|
|
293
302
|
user: ApplicationUserIdentity;
|
|
294
303
|
}>;
|
|
295
304
|
export type PrincipalKind = "detached_user" | "service_principal";
|