@chatu-ai/builder-sdk 0.8.6 → 0.9.0
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 +32 -0
- package/dist/client.js +5 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -45,6 +45,11 @@ export interface SandboxStatus {
|
|
|
45
45
|
xid?: string | null;
|
|
46
46
|
sinceMs?: number | null;
|
|
47
47
|
} | null;
|
|
48
|
+
/** 关闭过程中(休眠/强制关闭,Pod 尚未真正释放):此时不应唤醒,前端显示"关闭中" */
|
|
49
|
+
closing?: boolean;
|
|
50
|
+
/** 编排阶段:creating-pod|assigning|restoring|starting-devserver|ready|hibernating|releasing|terminating|hibernated|recycled|failed */
|
|
51
|
+
phase?: string | null;
|
|
52
|
+
phaseMessage?: string | null;
|
|
48
53
|
}
|
|
49
54
|
export interface VersionInfo {
|
|
50
55
|
sha: string;
|
|
@@ -457,6 +462,33 @@ export interface BuilderClient {
|
|
|
457
462
|
dropped?: boolean;
|
|
458
463
|
}>;
|
|
459
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
|
+
};
|
|
460
492
|
/** 资源面板:对象存储浏览 */
|
|
461
493
|
storage: {
|
|
462
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 }) }),
|