@chatu-ai/builder-sdk 0.8.7 → 0.9.1

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/dist/client.d.ts CHANGED
@@ -462,6 +462,33 @@ export interface BuilderClient {
462
462
  dropped?: boolean;
463
463
  }>;
464
464
  };
465
+ /** 资源面板:应用用户(技术方案 21) */
466
+ auth: {
467
+ users(conversationId: string, opts?: {
468
+ env?: 'dev' | 'prod';
469
+ skip?: number;
470
+ limit?: number;
471
+ keyword?: string;
472
+ }): Promise<{
473
+ ok: boolean;
474
+ users: Array<Record<string, unknown>>;
475
+ total: number;
476
+ nextSkip: number | null;
477
+ }>;
478
+ updateUser(conversationId: string, id: string, patch: {
479
+ name?: string | null;
480
+ avatar?: string | null;
481
+ disabled?: boolean;
482
+ meta?: Record<string, unknown>;
483
+ }, env?: 'dev' | 'prod'): Promise<{
484
+ ok: boolean;
485
+ user?: Record<string, unknown>;
486
+ }>;
487
+ removeUser(conversationId: string, id: string, env?: 'dev' | 'prod'): Promise<{
488
+ ok: boolean;
489
+ removed?: boolean;
490
+ }>;
491
+ };
465
492
  /** 资源面板:对象存储浏览 */
466
493
  storage: {
467
494
  list(conversationId: string, opts?: {
package/dist/client.js CHANGED
@@ -119,6 +119,11 @@ export function createBuilderClient(options) {
119
119
  remove: (id, coll, docId, env) => req(`/${id}/data/db/${encPath(coll)}/${encPath(docId)}?${qs({ env })}`, { method: 'DELETE' }),
120
120
  drop: (id, coll, env) => req(`/${id}/data/db/${encPath(coll)}?${qs({ env })}`, { method: 'DELETE' }),
121
121
  },
122
+ auth: {
123
+ users: (id, o) => req(`/${id}/data/auth/users?${qs({ env: o?.env, skip: o?.skip, limit: o?.limit, keyword: o?.keyword })}`),
124
+ updateUser: (id, userId, patch, env) => req(`/${id}/data/auth/users/${encPath(userId)}?${qs({ env })}`, { method: 'PATCH', headers: { 'content-type': 'application/json' }, body: JSON.stringify(patch) }),
125
+ removeUser: (id, userId, env) => req(`/${id}/data/auth/users/${encPath(userId)}?${qs({ env })}`, { method: 'DELETE' }),
126
+ },
122
127
  storage: {
123
128
  list: (id, o) => req(`/${id}/data/storage?${qs({ env: o?.env, prefix: o?.prefix, cursor: o?.cursor ?? undefined, limit: o?.limit })}`),
124
129
  sign: (id, key, o) => req(`/${id}/data/storage/sign?${qs({ env: o?.env })}`, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ key, expiresIn: o?.expiresIn, downloadName: o?.downloadName }) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatu-ai/builder-sdk",
3
- "version": "0.8.7",
3
+ "version": "0.9.1",
4
4
  "description": "ChatU Builder client SDK core: REST + streaming client, zod event schemas, seq resume",
5
5
  "license": "MIT",
6
6
  "type": "module",