lemma-sdk 0.2.2 → 0.2.4
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 +29 -0
- package/dist/auth.d.ts +50 -1
- package/dist/auth.js +219 -3
- package/dist/browser/lemma-client.js +254 -51
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +1 -1
- package/dist/client.d.ts +4 -1
- package/dist/client.js +3 -3
- package/dist/index.d.ts +3 -4
- package/dist/index.js +2 -2
- package/dist/namespaces/agents.d.ts +5 -5
- package/dist/namespaces/assistants.d.ts +36 -41
- package/dist/namespaces/assistants.js +18 -24
- package/dist/namespaces/datastores.d.ts +6 -6
- package/dist/namespaces/desks.d.ts +6 -6
- package/dist/namespaces/files.d.ts +7 -7
- package/dist/namespaces/functions.d.ts +8 -8
- package/dist/namespaces/icons.d.ts +1 -1
- package/dist/namespaces/integrations.d.ts +13 -13
- package/dist/namespaces/organizations.d.ts +8 -8
- package/dist/namespaces/pod-members.d.ts +3 -3
- package/dist/namespaces/pod-surfaces.d.ts +1 -1
- package/dist/namespaces/pods.d.ts +4 -4
- package/dist/namespaces/records.d.ts +7 -7
- package/dist/namespaces/resources.d.ts +9 -5
- package/dist/namespaces/resources.js +3 -2
- package/dist/namespaces/tables.d.ts +7 -7
- package/dist/namespaces/tasks.d.ts +14 -13
- package/dist/namespaces/tasks.js +6 -18
- package/dist/namespaces/users.d.ts +3 -3
- package/dist/namespaces/workflows.d.ts +10 -10
- package/dist/react/useAuth.d.ts +6 -2
- package/dist/react/useAuth.js +1 -1
- package/dist/types.d.ts +8 -9
- package/dist/types.js +5 -1
- package/package.json +1 -1
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import type { HttpClient } from "../http.js";
|
|
2
|
+
import type { AssistantListResponse } from "../openapi_client/models/AssistantListResponse.js";
|
|
3
|
+
import type { AssistantResponse } from "../openapi_client/models/AssistantResponse.js";
|
|
4
|
+
import type { ConversationListResponse } from "../openapi_client/models/ConversationListResponse.js";
|
|
5
|
+
import type { ConversationMessageListResponse } from "../openapi_client/models/ConversationMessageListResponse.js";
|
|
6
|
+
import type { ConversationResponse } from "../openapi_client/models/ConversationResponse.js";
|
|
2
7
|
import type { CreateAssistantRequest } from "../openapi_client/models/CreateAssistantRequest.js";
|
|
3
8
|
import type { CreateConversationRequest } from "../openapi_client/models/CreateConversationRequest.js";
|
|
4
9
|
import type { CreateMessageRequest } from "../openapi_client/models/CreateMessageRequest.js";
|
|
5
10
|
import type { UpdateAssistantRequest } from "../openapi_client/models/UpdateAssistantRequest.js";
|
|
11
|
+
import type { UpdateConversationRequest } from "../openapi_client/models/UpdateConversationRequest.js";
|
|
6
12
|
export declare class AssistantsNamespace {
|
|
7
13
|
private readonly http;
|
|
8
14
|
private readonly podId;
|
|
9
15
|
constructor(http: HttpClient, podId: () => string);
|
|
10
16
|
list(options?: {
|
|
11
17
|
limit?: number;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
delete(assistantName: string): Promise<unknown>;
|
|
18
|
+
page_token?: string;
|
|
19
|
+
}): Promise<AssistantListResponse>;
|
|
20
|
+
create(payload: CreateAssistantRequest): Promise<AssistantResponse>;
|
|
21
|
+
get(assistantName: string): Promise<AssistantResponse>;
|
|
22
|
+
update(assistantName: string, payload: UpdateAssistantRequest): Promise<AssistantResponse>;
|
|
23
|
+
delete(assistantName: string): Promise<void>;
|
|
19
24
|
}
|
|
20
25
|
export declare class ConversationsNamespace {
|
|
21
26
|
private readonly http;
|
|
@@ -24,58 +29,48 @@ export declare class ConversationsNamespace {
|
|
|
24
29
|
private resolvePodId;
|
|
25
30
|
private requirePodId;
|
|
26
31
|
list(options?: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
organizationId?: string;
|
|
32
|
+
assistant_id?: string;
|
|
33
|
+
pod_id?: string;
|
|
34
|
+
organization_id?: string;
|
|
31
35
|
limit?: number;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
organizationId?: string;
|
|
36
|
+
page_token?: string;
|
|
37
|
+
}): Promise<ConversationListResponse>;
|
|
38
|
+
listByAssistant(assistantId: string, options?: {
|
|
39
|
+
pod_id?: string;
|
|
40
|
+
organization_id?: string;
|
|
38
41
|
limit?: number;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
page_token?: string;
|
|
43
|
+
}): Promise<ConversationListResponse>;
|
|
44
|
+
create(payload: CreateConversationRequest): Promise<ConversationResponse>;
|
|
45
|
+
createForAssistant(assistantId: string, payload?: Omit<CreateConversationRequest, "assistant_id">): Promise<ConversationResponse>;
|
|
46
|
+
get(conversationId: string, options?: {
|
|
43
47
|
pod_id?: string;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
createForAssistant(assistantName: string, payload?: Omit<CreateConversationRequest, "pod_id" | "assistant_id"> & {
|
|
48
|
+
}): Promise<ConversationResponse>;
|
|
49
|
+
update(conversationId: string, payload: UpdateConversationRequest, options?: {
|
|
47
50
|
pod_id?: string;
|
|
48
|
-
}): Promise<
|
|
49
|
-
get(conversationId: string, options?: {
|
|
50
|
-
podId?: string;
|
|
51
|
-
}): Promise<unknown>;
|
|
52
|
-
update(conversationId: string, payload: Record<string, unknown>, options?: {
|
|
53
|
-
podId?: string;
|
|
54
|
-
}): Promise<unknown>;
|
|
51
|
+
}): Promise<ConversationResponse>;
|
|
55
52
|
delete(conversationId: string, options?: {
|
|
56
|
-
|
|
53
|
+
pod_id?: string;
|
|
57
54
|
}): Promise<unknown>;
|
|
58
55
|
sendMessageStream(conversationId: string, payload: CreateMessageRequest, options?: {
|
|
59
|
-
|
|
56
|
+
pod_id?: string;
|
|
60
57
|
signal?: AbortSignal;
|
|
61
58
|
}): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
|
|
62
59
|
resumeStream(conversationId: string, options?: {
|
|
63
|
-
|
|
60
|
+
pod_id?: string;
|
|
64
61
|
signal?: AbortSignal;
|
|
65
62
|
}): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
|
|
66
63
|
stopRun(conversationId: string, options?: {
|
|
67
|
-
|
|
64
|
+
pod_id?: string;
|
|
68
65
|
}): Promise<unknown>;
|
|
69
66
|
readonly messages: {
|
|
70
67
|
list: (conversationId: string, options?: {
|
|
71
68
|
limit?: number;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
podId?: string;
|
|
76
|
-
}) => Promise<unknown>;
|
|
69
|
+
page_token?: string;
|
|
70
|
+
pod_id?: string;
|
|
71
|
+
}) => Promise<ConversationMessageListResponse>;
|
|
77
72
|
send: (conversationId: string, payload: CreateMessageRequest, options?: {
|
|
78
|
-
|
|
73
|
+
pod_id?: string;
|
|
79
74
|
}) => Promise<unknown>;
|
|
80
75
|
};
|
|
81
76
|
}
|
|
@@ -9,8 +9,7 @@ export class AssistantsNamespace {
|
|
|
9
9
|
return this.http.request("GET", `/pods/${this.podId()}/assistants`, {
|
|
10
10
|
params: {
|
|
11
11
|
limit: options.limit ?? 100,
|
|
12
|
-
page_token: options.
|
|
13
|
-
cursor: options.cursor,
|
|
12
|
+
page_token: options.page_token,
|
|
14
13
|
},
|
|
15
14
|
});
|
|
16
15
|
}
|
|
@@ -57,58 +56,55 @@ export class ConversationsNamespace {
|
|
|
57
56
|
list(options = {}) {
|
|
58
57
|
return this.http.request("GET", "/conversations", {
|
|
59
58
|
params: {
|
|
60
|
-
assistant_id: options.
|
|
61
|
-
pod_id: this.resolvePodId(options.
|
|
62
|
-
organization_id: options.
|
|
59
|
+
assistant_id: options.assistant_id,
|
|
60
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
61
|
+
organization_id: options.organization_id,
|
|
63
62
|
limit: options.limit ?? 20,
|
|
64
|
-
page_token: options.
|
|
65
|
-
cursor: options.cursor,
|
|
63
|
+
page_token: options.page_token,
|
|
66
64
|
},
|
|
67
65
|
});
|
|
68
66
|
}
|
|
69
|
-
listByAssistant(
|
|
70
|
-
return this.list({ ...options,
|
|
67
|
+
listByAssistant(assistantId, options = {}) {
|
|
68
|
+
return this.list({ ...options, assistant_id: assistantId });
|
|
71
69
|
}
|
|
72
70
|
create(payload) {
|
|
73
71
|
return this.http.request("POST", "/conversations", {
|
|
74
72
|
body: {
|
|
75
73
|
...payload,
|
|
76
|
-
assistant_id: payload.assistant_id ?? payload.assistant_name,
|
|
77
74
|
pod_id: this.resolvePodId(payload.pod_id),
|
|
78
75
|
},
|
|
79
76
|
});
|
|
80
77
|
}
|
|
81
|
-
createForAssistant(
|
|
78
|
+
createForAssistant(assistantId, payload = {}) {
|
|
82
79
|
return this.create({
|
|
83
80
|
...payload,
|
|
84
|
-
|
|
85
|
-
pod_id: payload.pod_id,
|
|
81
|
+
assistant_id: assistantId,
|
|
86
82
|
});
|
|
87
83
|
}
|
|
88
84
|
get(conversationId, options = {}) {
|
|
89
85
|
return this.http.request("GET", `/conversations/${conversationId}`, {
|
|
90
86
|
params: {
|
|
91
|
-
pod_id: this.resolvePodId(options.
|
|
87
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
92
88
|
},
|
|
93
89
|
});
|
|
94
90
|
}
|
|
95
91
|
update(conversationId, payload, options = {}) {
|
|
96
92
|
return this.http.request("PATCH", `/conversations/${conversationId}`, {
|
|
97
93
|
params: {
|
|
98
|
-
pod_id: this.resolvePodId(options.
|
|
94
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
99
95
|
},
|
|
100
96
|
body: payload,
|
|
101
97
|
});
|
|
102
98
|
}
|
|
103
99
|
delete(conversationId, options = {}) {
|
|
104
|
-
const scopedPodId = this.requirePodId(options.
|
|
100
|
+
const scopedPodId = this.requirePodId(options.pod_id);
|
|
105
101
|
return this.http.request("DELETE", `/pods/${scopedPodId}/conversations/${conversationId}`);
|
|
106
102
|
}
|
|
107
103
|
sendMessageStream(conversationId, payload, options = {}) {
|
|
108
104
|
return this.http.stream(`/conversations/${conversationId}/messages`, {
|
|
109
105
|
method: "POST",
|
|
110
106
|
params: {
|
|
111
|
-
pod_id: this.resolvePodId(options.
|
|
107
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
112
108
|
},
|
|
113
109
|
body: payload,
|
|
114
110
|
signal: options.signal,
|
|
@@ -121,7 +117,7 @@ export class ConversationsNamespace {
|
|
|
121
117
|
resumeStream(conversationId, options = {}) {
|
|
122
118
|
return this.http.stream(`/conversations/${conversationId}/stream`, {
|
|
123
119
|
params: {
|
|
124
|
-
pod_id: this.resolvePodId(options.
|
|
120
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
125
121
|
},
|
|
126
122
|
signal: options.signal,
|
|
127
123
|
headers: {
|
|
@@ -132,7 +128,7 @@ export class ConversationsNamespace {
|
|
|
132
128
|
stopRun(conversationId, options = {}) {
|
|
133
129
|
return this.http.request("PATCH", `/conversations/${conversationId}/stop`, {
|
|
134
130
|
params: {
|
|
135
|
-
pod_id: this.resolvePodId(options.
|
|
131
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
136
132
|
},
|
|
137
133
|
body: {},
|
|
138
134
|
});
|
|
@@ -140,16 +136,14 @@ export class ConversationsNamespace {
|
|
|
140
136
|
messages = {
|
|
141
137
|
list: (conversationId, options = {}) => this.http.request("GET", `/conversations/${conversationId}/messages`, {
|
|
142
138
|
params: {
|
|
143
|
-
pod_id: this.resolvePodId(options.
|
|
139
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
144
140
|
limit: options.limit ?? 20,
|
|
145
|
-
page_token: options.
|
|
146
|
-
cursor: options.cursor,
|
|
147
|
-
order: options.order,
|
|
141
|
+
page_token: options.page_token,
|
|
148
142
|
},
|
|
149
143
|
}),
|
|
150
144
|
send: (conversationId, payload, options = {}) => this.http.request("POST", `/conversations/${conversationId}/messages`, {
|
|
151
145
|
params: {
|
|
152
|
-
pod_id: this.resolvePodId(options.
|
|
146
|
+
pod_id: this.resolvePodId(options.pod_id),
|
|
153
147
|
},
|
|
154
148
|
body: payload,
|
|
155
149
|
}),
|
|
@@ -9,10 +9,10 @@ export declare class DatastoresNamespace {
|
|
|
9
9
|
list(options?: {
|
|
10
10
|
limit?: number;
|
|
11
11
|
pageToken?: string;
|
|
12
|
-
}): Promise<import("../
|
|
13
|
-
create(payload: CreateDatastoreRequest): Promise<import("../
|
|
14
|
-
get(name: string): Promise<import("../
|
|
15
|
-
update(name: string, payload: UpdateDatastoreRequest): Promise<import("../
|
|
16
|
-
delete(name: string): Promise<import("../
|
|
17
|
-
query(name: string, request: DatastoreQueryRequest | string): Promise<import("../
|
|
12
|
+
}): Promise<import("../types.js").DatastoreListResponse>;
|
|
13
|
+
create(payload: CreateDatastoreRequest): Promise<import("../types.js").DatastoreResponse>;
|
|
14
|
+
get(name: string): Promise<import("../types.js").DatastoreResponse>;
|
|
15
|
+
update(name: string, payload: UpdateDatastoreRequest): Promise<import("../types.js").DatastoreResponse>;
|
|
16
|
+
delete(name: string): Promise<import("../types.js").DatastoreMessageResponse>;
|
|
17
|
+
query(name: string, request: DatastoreQueryRequest | string): Promise<import("../types.js").RecordQueryResponse>;
|
|
18
18
|
}
|
|
@@ -11,16 +11,16 @@ export declare class DesksNamespace {
|
|
|
11
11
|
list(options?: {
|
|
12
12
|
limit?: number;
|
|
13
13
|
pageToken?: string;
|
|
14
|
-
}): Promise<import("../
|
|
15
|
-
create(payload: CreateDeskRequest): Promise<import("../
|
|
16
|
-
get(name: string): Promise<import("../
|
|
17
|
-
update(name: string, payload: UpdateDeskRequest): Promise<import("../
|
|
18
|
-
delete(name: string): Promise<import("../
|
|
14
|
+
}): Promise<import("../types.js").DeskListResponse>;
|
|
15
|
+
create(payload: CreateDeskRequest): Promise<import("../types.js").DeskResponse>;
|
|
16
|
+
get(name: string): Promise<import("../types.js").DeskResponse>;
|
|
17
|
+
update(name: string, payload: UpdateDeskRequest): Promise<import("../types.js").DeskResponse>;
|
|
18
|
+
delete(name: string): Promise<import("../types.js").DeskMessageResponse>;
|
|
19
19
|
readonly html: {
|
|
20
20
|
get: (name: string) => Promise<string>;
|
|
21
21
|
};
|
|
22
22
|
readonly bundle: {
|
|
23
|
-
upload: (name: string, payload: Body_pod_desk_bundle_upload) => Promise<import("../
|
|
23
|
+
upload: (name: string, payload: Body_pod_desk_bundle_upload) => Promise<import("../types.js").DeskBundleUploadResponse>;
|
|
24
24
|
};
|
|
25
25
|
readonly source: {
|
|
26
26
|
download: (name: string) => Promise<Blob>;
|
|
@@ -10,31 +10,31 @@ export declare class FilesNamespace {
|
|
|
10
10
|
limit?: number;
|
|
11
11
|
pageToken?: string;
|
|
12
12
|
parentId?: string;
|
|
13
|
-
}): Promise<import("../
|
|
14
|
-
get(datastore: string, fileId: string): Promise<import("../
|
|
15
|
-
delete(datastore: string, fileId: string): Promise<import("../
|
|
13
|
+
}): Promise<import("../types.js").FileListResponse>;
|
|
14
|
+
get(datastore: string, fileId: string): Promise<import("../types.js").FileResponse>;
|
|
15
|
+
delete(datastore: string, fileId: string): Promise<import("../types.js").DatastoreMessageResponse>;
|
|
16
16
|
search(datastore: string, query: string, options?: {
|
|
17
17
|
limit?: number;
|
|
18
18
|
searchMethod?: SearchMethod;
|
|
19
|
-
}): Promise<import("../
|
|
19
|
+
}): Promise<import("../types.js").FileSearchResponse>;
|
|
20
20
|
download(datastore: string, fileId: string): Promise<Blob>;
|
|
21
21
|
upload(datastore: string, file: Blob, options?: {
|
|
22
22
|
name?: string;
|
|
23
23
|
parentId?: string;
|
|
24
24
|
searchEnabled?: boolean;
|
|
25
25
|
description?: string;
|
|
26
|
-
}): Promise<import("../
|
|
26
|
+
}): Promise<import("../types.js").FileResponse>;
|
|
27
27
|
update(datastore: string, fileId: string, options?: {
|
|
28
28
|
file?: Blob;
|
|
29
29
|
name?: string;
|
|
30
30
|
description?: string;
|
|
31
31
|
parentId?: string;
|
|
32
32
|
searchEnabled?: boolean;
|
|
33
|
-
}): Promise<import("../
|
|
33
|
+
}): Promise<import("../types.js").FileResponse>;
|
|
34
34
|
readonly folder: {
|
|
35
35
|
create: (datastore: string, name: string, options?: {
|
|
36
36
|
parentId?: string;
|
|
37
37
|
description?: string;
|
|
38
|
-
}) => Promise<import("../
|
|
38
|
+
}) => Promise<import("../types.js").FileResponse>;
|
|
39
39
|
};
|
|
40
40
|
}
|
|
@@ -9,17 +9,17 @@ export declare class FunctionsNamespace {
|
|
|
9
9
|
list(options?: {
|
|
10
10
|
limit?: number;
|
|
11
11
|
pageToken?: string;
|
|
12
|
-
}): Promise<import("../
|
|
13
|
-
create(payload: CreateFunctionRequest): Promise<import("../
|
|
14
|
-
get(name: string): Promise<import("../
|
|
15
|
-
update(name: string, payload: UpdateFunctionRequest): Promise<import("../
|
|
16
|
-
delete(name: string): Promise<import("../
|
|
12
|
+
}): Promise<import("../types.js").FunctionListResponse>;
|
|
13
|
+
create(payload: CreateFunctionRequest): Promise<import("../types.js").FunctionResponse>;
|
|
14
|
+
get(name: string): Promise<import("../types.js").FunctionResponse>;
|
|
15
|
+
update(name: string, payload: UpdateFunctionRequest): Promise<import("../types.js").FunctionResponse>;
|
|
16
|
+
delete(name: string): Promise<import("../types.js").FunctionMessageResponse>;
|
|
17
17
|
readonly runs: {
|
|
18
|
-
create: (name: string, options?: RunFunctionOptions) => Promise<import("../
|
|
18
|
+
create: (name: string, options?: RunFunctionOptions) => Promise<import("../types.js").FunctionRunResponse>;
|
|
19
19
|
list: (name: string, params?: {
|
|
20
20
|
limit?: number;
|
|
21
21
|
pageToken?: string;
|
|
22
|
-
}) => Promise<import("../
|
|
23
|
-
get: (name: string, runId: string) => Promise<import("../
|
|
22
|
+
}) => Promise<import("../types.js").FunctionRunListResponse>;
|
|
23
|
+
get: (name: string, runId: string) => Promise<import("../types.js").FunctionRunResponse>;
|
|
24
24
|
};
|
|
25
25
|
}
|
|
@@ -2,6 +2,6 @@ import type { GeneratedClientAdapter } from "../generated.js";
|
|
|
2
2
|
export declare class IconsNamespace {
|
|
3
3
|
private readonly client;
|
|
4
4
|
constructor(client: GeneratedClientAdapter);
|
|
5
|
-
upload(file: Blob): Promise<import("../
|
|
5
|
+
upload(file: Blob): Promise<import("../types.js").IconUploadResponse>;
|
|
6
6
|
getPublic(iconPath: string): Promise<any>;
|
|
7
7
|
}
|
|
@@ -5,13 +5,13 @@ export declare class IntegrationsNamespace {
|
|
|
5
5
|
list(options?: {
|
|
6
6
|
limit?: number;
|
|
7
7
|
pageToken?: string;
|
|
8
|
-
}): Promise<import("../
|
|
9
|
-
get(applicationId: string): Promise<import("../
|
|
8
|
+
}): Promise<import("../types.js").ApplicationListResponseSchema>;
|
|
9
|
+
get(applicationId: string): Promise<import("../types.js").ApplicationDetailResponseSchema>;
|
|
10
10
|
readonly operations: {
|
|
11
|
-
list: (applicationId: string) => Promise<import("../
|
|
12
|
-
get: (applicationId: string, operationName: string) => Promise<import("../
|
|
13
|
-
execute: (applicationId: string, operationName: string, payload: Record<string, unknown>, accountId?: string) => Promise<import("../
|
|
14
|
-
descriptor: (applicationId: string) => Promise<import("../
|
|
11
|
+
list: (applicationId: string) => Promise<import("../types.js").OperationListResponse>;
|
|
12
|
+
get: (applicationId: string, operationName: string) => Promise<import("../types.js").OperationDetail>;
|
|
13
|
+
execute: (applicationId: string, operationName: string, payload: Record<string, unknown>, accountId?: string) => Promise<import("../types.js").OperationExecutionResponse>;
|
|
14
|
+
descriptor: (applicationId: string) => Promise<import("../types.js").AppDescriptorResponse>;
|
|
15
15
|
};
|
|
16
16
|
readonly triggers: {
|
|
17
17
|
list: (options?: {
|
|
@@ -19,18 +19,18 @@ export declare class IntegrationsNamespace {
|
|
|
19
19
|
search?: string;
|
|
20
20
|
limit?: number;
|
|
21
21
|
pageToken?: string;
|
|
22
|
-
}) => Promise<import("../
|
|
23
|
-
get: (triggerId: string) => Promise<import("../
|
|
22
|
+
}) => Promise<import("../types.js").AppTriggerListResponseSchema>;
|
|
23
|
+
get: (triggerId: string) => Promise<import("../types.js").AppTriggerResponseSchema>;
|
|
24
24
|
};
|
|
25
25
|
readonly accounts: {
|
|
26
26
|
list: (options?: {
|
|
27
27
|
applicationId?: string;
|
|
28
28
|
limit?: number;
|
|
29
29
|
pageToken?: string;
|
|
30
|
-
}) => Promise<import("../
|
|
31
|
-
get: (accountId: string) => Promise<import("../
|
|
32
|
-
credentials: (accountId: string) => Promise<import("../
|
|
33
|
-
delete: (accountId: string) => Promise<import("../
|
|
30
|
+
}) => Promise<import("../types.js").AccountListResponseSchema>;
|
|
31
|
+
get: (accountId: string) => Promise<import("../types.js").AccountResponseSchema>;
|
|
32
|
+
credentials: (accountId: string) => Promise<import("../types.js").AccountCredentialsResponseSchema>;
|
|
33
|
+
delete: (accountId: string) => Promise<import("../types.js").MessageResponseSchema>;
|
|
34
34
|
};
|
|
35
|
-
createConnectRequest(applicationId: string): Promise<import("../
|
|
35
|
+
createConnectRequest(applicationId: string): Promise<import("../types.js").ConnectRequestResponseSchema>;
|
|
36
36
|
}
|
|
@@ -13,16 +13,16 @@ export declare class OrganizationsNamespace {
|
|
|
13
13
|
limit?: number;
|
|
14
14
|
pageToken?: string;
|
|
15
15
|
cursor?: string;
|
|
16
|
-
}): Promise<import("../
|
|
17
|
-
get(orgId: string): Promise<import("../
|
|
18
|
-
create(payload: OrganizationCreateRequest): Promise<import("../
|
|
16
|
+
}): Promise<import("../types.js").OrganizationListResponse>;
|
|
17
|
+
get(orgId: string): Promise<import("../types.js").OrganizationResponse>;
|
|
18
|
+
create(payload: OrganizationCreateRequest): Promise<import("../types.js").OrganizationResponse>;
|
|
19
19
|
readonly members: {
|
|
20
20
|
list: (orgId: string, options?: {
|
|
21
21
|
limit?: number;
|
|
22
22
|
pageToken?: string;
|
|
23
23
|
cursor?: string;
|
|
24
|
-
}) => Promise<import("../
|
|
25
|
-
updateRole: (orgId: string, memberId: string, role: OrganizationRole) => Promise<import("../
|
|
24
|
+
}) => Promise<import("../types.js").OrganizationMemberListResponse>;
|
|
25
|
+
updateRole: (orgId: string, memberId: string, role: OrganizationRole) => Promise<import("../types.js").OrganizationMemberResponse>;
|
|
26
26
|
remove: (orgId: string, memberId: string) => Promise<void>;
|
|
27
27
|
};
|
|
28
28
|
readonly invitations: {
|
|
@@ -38,9 +38,9 @@ export declare class OrganizationsNamespace {
|
|
|
38
38
|
pageToken?: string;
|
|
39
39
|
cursor?: string;
|
|
40
40
|
}) => Promise<OrganizationInvitationListResponse>;
|
|
41
|
-
get: (invitationId: string) => Promise<import("../
|
|
42
|
-
invite: (orgId: string, payload: OrganizationInvitationRequest) => Promise<import("../
|
|
43
|
-
accept: (invitationId: string) => Promise<import("../
|
|
41
|
+
get: (invitationId: string) => Promise<import("../types.js").OrganizationInvitationResponse>;
|
|
42
|
+
invite: (orgId: string, payload: OrganizationInvitationRequest) => Promise<import("../types.js").OrganizationInvitationResponse>;
|
|
43
|
+
accept: (invitationId: string) => Promise<import("../types.js").OrganizationMessageResponse>;
|
|
44
44
|
revoke: (invitationId: string) => Promise<void>;
|
|
45
45
|
};
|
|
46
46
|
}
|
|
@@ -8,8 +8,8 @@ export declare class PodMembersNamespace {
|
|
|
8
8
|
limit?: number;
|
|
9
9
|
pageToken?: string;
|
|
10
10
|
cursor?: string;
|
|
11
|
-
}): Promise<import("../
|
|
12
|
-
add(podId: string, payload: PodMemberAddRequest): Promise<import("../
|
|
13
|
-
updateRole(podId: string, memberId: string, role: PodRole): Promise<import("../
|
|
11
|
+
}): Promise<import("../types.js").PodMemberListResponse>;
|
|
12
|
+
add(podId: string, payload: PodMemberAddRequest): Promise<import("../types.js").PodMemberResponse>;
|
|
13
|
+
updateRole(podId: string, memberId: string, role: PodRole): Promise<import("../types.js").PodMemberResponse>;
|
|
14
14
|
remove(podId: string, memberId: string): Promise<void>;
|
|
15
15
|
}
|
|
@@ -8,7 +8,7 @@ export declare class PodSurfacesNamespace {
|
|
|
8
8
|
limit?: number;
|
|
9
9
|
pageToken?: string;
|
|
10
10
|
cursor?: string;
|
|
11
|
-
}): Promise<import("../
|
|
11
|
+
}): Promise<import("../types.js").AssistantSurfaceListResponse>;
|
|
12
12
|
create(podId: string, payload: CreateSurfaceRequest): Promise<any>;
|
|
13
13
|
get(podId: string, surfaceId: string): Promise<any>;
|
|
14
14
|
updateConfig(podId: string, surfaceId: string, payload: UpdateSurfaceRequest): Promise<any>;
|
|
@@ -18,9 +18,9 @@ export declare class PodsNamespace {
|
|
|
18
18
|
pageToken?: string;
|
|
19
19
|
cursor?: string;
|
|
20
20
|
}): Promise<PodListResponse>;
|
|
21
|
-
get(podId: string): Promise<import("../
|
|
22
|
-
create(payload: PodCreateRequest): Promise<import("../
|
|
23
|
-
update(podId: string, payload: PodUpdateRequest): Promise<import("../
|
|
21
|
+
get(podId: string): Promise<import("../types.js").PodResponse>;
|
|
22
|
+
create(payload: PodCreateRequest): Promise<import("../types.js").PodResponse>;
|
|
23
|
+
update(podId: string, payload: PodUpdateRequest): Promise<import("../types.js").PodResponse>;
|
|
24
24
|
delete(podId: string): Promise<void>;
|
|
25
|
-
config(podId: string): Promise<import("../
|
|
25
|
+
config(podId: string): Promise<import("../types.js").PodConfigResponse>;
|
|
26
26
|
}
|
|
@@ -10,14 +10,14 @@ export declare class RecordsNamespace {
|
|
|
10
10
|
constructor(client: GeneratedClientAdapter, http: HttpClient, podId: () => string);
|
|
11
11
|
list(datastore: string, table: string, options?: ListRecordsOptions): Promise<RecordListResponse>;
|
|
12
12
|
listWithParams(datastore: string, table: string, params: Record<string, string | number | boolean | undefined | null>): Promise<RecordListResponse>;
|
|
13
|
-
create(datastore: string, table: string, data: Record<string, unknown>): Promise<import("../
|
|
14
|
-
get(datastore: string, table: string, recordId: string): Promise<import("../
|
|
15
|
-
update(datastore: string, table: string, recordId: string, data: Record<string, unknown>): Promise<import("../
|
|
16
|
-
delete(datastore: string, table: string, recordId: string): Promise<import("../
|
|
13
|
+
create(datastore: string, table: string, data: Record<string, unknown>): Promise<import("../types.js").RecordResponse>;
|
|
14
|
+
get(datastore: string, table: string, recordId: string): Promise<import("../types.js").RecordResponse>;
|
|
15
|
+
update(datastore: string, table: string, recordId: string, data: Record<string, unknown>): Promise<import("../types.js").RecordResponse>;
|
|
16
|
+
delete(datastore: string, table: string, recordId: string): Promise<import("../types.js").DatastoreMessageResponse>;
|
|
17
17
|
query(datastore: string, table: string, payload: RecordQueryRequest): Promise<RecordListResponse>;
|
|
18
18
|
readonly bulk: {
|
|
19
|
-
create: (datastore: string, table: string, records: Record<string, unknown>[]) => Promise<import("../
|
|
20
|
-
update: (datastore: string, table: string, records: Record<string, unknown>[]) => Promise<import("../
|
|
21
|
-
delete: (datastore: string, table: string, recordIds: string[]) => Promise<import("../
|
|
19
|
+
create: (datastore: string, table: string, records: Record<string, unknown>[]) => Promise<import("../types.js").DatastoreMessageResponse>;
|
|
20
|
+
update: (datastore: string, table: string, records: Record<string, unknown>[]) => Promise<import("../types.js").DatastoreMessageResponse>;
|
|
21
|
+
delete: (datastore: string, table: string, recordIds: string[]) => Promise<import("../types.js").DatastoreMessageResponse>;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import type { HttpClient } from "../http.js";
|
|
2
|
-
|
|
2
|
+
import type { FileUploadResponse } from "../openapi_client/models/FileUploadResponse.js";
|
|
3
|
+
import type { ResourceFileListResponse } from "../openapi_client/models/ResourceFileListResponse.js";
|
|
4
|
+
import type { ResourceType as OpenApiResourceType } from "../openapi_client/models/ResourceType.js";
|
|
5
|
+
export type ResourceType = `${OpenApiResourceType}`;
|
|
3
6
|
export declare class ResourcesNamespace {
|
|
4
7
|
private readonly http;
|
|
5
8
|
constructor(http: HttpClient);
|
|
6
9
|
list(resourceType: ResourceType, resourceId: string, options?: {
|
|
7
10
|
path?: string;
|
|
8
|
-
|
|
11
|
+
limit?: number;
|
|
12
|
+
page_token?: string;
|
|
13
|
+
}): Promise<ResourceFileListResponse>;
|
|
9
14
|
upload(resourceType: ResourceType, resourceId: string, file: Blob, options?: {
|
|
10
15
|
path?: string;
|
|
11
16
|
name?: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
delete(resourceType: ResourceType, resourceId: string, filePath: string): Promise<unknown>;
|
|
17
|
+
}): Promise<FileUploadResponse>;
|
|
18
|
+
delete(resourceType: ResourceType, resourceId: string, filePath: string): Promise<Record<string, unknown>>;
|
|
15
19
|
download(resourceType: ResourceType, resourceId: string, filePath: string): Promise<Blob>;
|
|
16
20
|
}
|
|
@@ -7,14 +7,15 @@ export class ResourcesNamespace {
|
|
|
7
7
|
return this.http.request("GET", `/files/${resourceType}/${resourceId}/list`, {
|
|
8
8
|
params: {
|
|
9
9
|
path: options.path,
|
|
10
|
+
limit: options.limit ?? 100,
|
|
11
|
+
page_token: options.page_token,
|
|
10
12
|
},
|
|
11
13
|
});
|
|
12
14
|
}
|
|
13
15
|
upload(resourceType, resourceId, file, options = {}) {
|
|
14
16
|
const formData = new FormData();
|
|
15
|
-
const fieldName = options.fieldName ?? "file";
|
|
16
17
|
const name = options.name ?? (file instanceof File ? file.name : "upload.bin");
|
|
17
|
-
formData.append(
|
|
18
|
+
formData.append("file", file, name);
|
|
18
19
|
return this.http.request("POST", `/files/${resourceType}/${resourceId}/upload`, {
|
|
19
20
|
params: {
|
|
20
21
|
path: options.path,
|
|
@@ -14,14 +14,14 @@ export declare class TablesNamespace {
|
|
|
14
14
|
list(datastore: string, options?: {
|
|
15
15
|
limit?: number;
|
|
16
16
|
pageToken?: string;
|
|
17
|
-
}): Promise<import("../
|
|
18
|
-
create(datastore: string, payload: CreateTableInput): Promise<import("../
|
|
19
|
-
get(datastore: string, tableName: string): Promise<import("../
|
|
20
|
-
update(datastore: string, tableName: string, payload: UpdateTableRequest): Promise<import("../
|
|
21
|
-
delete(datastore: string, tableName: string): Promise<import("../
|
|
17
|
+
}): Promise<import("../types.js").TableListResponse>;
|
|
18
|
+
create(datastore: string, payload: CreateTableInput): Promise<import("../types.js").TableResponse>;
|
|
19
|
+
get(datastore: string, tableName: string): Promise<import("../types.js").TableResponse>;
|
|
20
|
+
update(datastore: string, tableName: string, payload: UpdateTableRequest): Promise<import("../types.js").TableResponse>;
|
|
21
|
+
delete(datastore: string, tableName: string): Promise<import("../types.js").DatastoreMessageResponse>;
|
|
22
22
|
readonly columns: {
|
|
23
|
-
add: (datastore: string, tableName: string, request: AddColumnRequest | AddColumnRequest["column"]) => Promise<import("../
|
|
24
|
-
remove: (datastore: string, tableName: string, columnName: string) => Promise<import("../
|
|
23
|
+
add: (datastore: string, tableName: string, request: AddColumnRequest | AddColumnRequest["column"]) => Promise<import("../types.js").TableResponse>;
|
|
24
|
+
remove: (datastore: string, tableName: string, columnName: string) => Promise<import("../types.js").DatastoreMessageResponse>;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
export {};
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import type { HttpClient } from "../http.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AddMessageRequest } from "../openapi_client/models/AddMessageRequest.js";
|
|
3
|
+
import type { CreateTaskRequest } from "../openapi_client/models/CreateTaskRequest.js";
|
|
4
|
+
import type { TaskListResponse } from "../openapi_client/models/TaskListResponse.js";
|
|
5
|
+
import type { TaskMessageListResponse } from "../openapi_client/models/TaskMessageListResponse.js";
|
|
6
|
+
import type { TaskResponse } from "../openapi_client/models/TaskResponse.js";
|
|
3
7
|
export declare class TasksNamespace {
|
|
4
8
|
private readonly http;
|
|
5
9
|
private readonly podId;
|
|
6
10
|
constructor(http: HttpClient, podId: () => string);
|
|
7
11
|
list(options?: {
|
|
8
|
-
|
|
9
|
-
agentId?: string;
|
|
12
|
+
agent_name?: string;
|
|
10
13
|
limit?: number;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
stop(taskId: string): Promise<unknown>;
|
|
14
|
+
page_token?: string;
|
|
15
|
+
}): Promise<TaskListResponse>;
|
|
16
|
+
create(payload: CreateTaskRequest): Promise<TaskResponse>;
|
|
17
|
+
get(taskId: string): Promise<TaskResponse>;
|
|
18
|
+
stop(taskId: string): Promise<TaskResponse>;
|
|
17
19
|
stream(taskId: string, options?: {
|
|
18
20
|
signal?: AbortSignal;
|
|
19
21
|
}): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
|
|
20
22
|
readonly messages: {
|
|
21
23
|
list: (taskId: string, options?: {
|
|
22
24
|
limit?: number;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
add: (taskId: string, content: string) => Promise<unknown>;
|
|
25
|
+
page_token?: string;
|
|
26
|
+
}) => Promise<TaskMessageListResponse>;
|
|
27
|
+
add: (taskId: string, payload: AddMessageRequest) => Promise<TaskResponse>;
|
|
27
28
|
};
|
|
28
29
|
}
|