@rool-dev/sdk 0.9.0-dev.bcd88e4 → 0.9.0-dev.c1da33d
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 +328 -159
- package/dist/channel.d.ts +95 -184
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +363 -349
- package/dist/channel.js.map +1 -1
- package/dist/client.d.ts +32 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +57 -57
- package/dist/client.js.map +1 -1
- package/dist/graphql.d.ts +35 -19
- package/dist/graphql.d.ts.map +1 -1
- package/dist/graphql.js +112 -128
- package/dist/graphql.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/locations.d.ts +34 -0
- package/dist/locations.d.ts.map +1 -0
- package/dist/locations.js +90 -0
- package/dist/locations.js.map +1 -0
- package/dist/rest.d.ts +18 -0
- package/dist/rest.d.ts.map +1 -0
- package/dist/rest.js +46 -0
- package/dist/rest.js.map +1 -0
- package/dist/space.d.ts +11 -4
- package/dist/space.d.ts.map +1 -1
- package/dist/space.js +25 -45
- package/dist/space.js.map +1 -1
- package/dist/subscription.d.ts.map +1 -1
- package/dist/subscription.js +9 -12
- package/dist/subscription.js.map +1 -1
- package/dist/types.d.ts +62 -56
- package/dist/types.d.ts.map +1 -1
- package/dist/webdav.d.ts +159 -0
- package/dist/webdav.d.ts.map +1 -0
- package/dist/webdav.js +483 -0
- package/dist/webdav.js.map +1 -0
- package/package.json +1 -1
- package/dist/media.d.ts +0 -70
- package/dist/media.d.ts.map +0 -1
- package/dist/media.js +0 -228
- package/dist/media.js.map +0 -1
package/dist/graphql.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { PromptOptions, FindObjectsOptions, RoolSpaceInfo, SpaceMember, CurrentUser, UserResult, RoolObject, RoolObjectStat, LinkAccess, CollectionDef, FieldDef,
|
|
1
|
+
import type { PromptOptions, FindObjectsOptions, RoolSpaceInfo, SpaceMember, CurrentUser, UserResult, RoolObject, RoolObjectStat, LinkAccess, CollectionDef, FieldDef, Channel, SpaceSchema, PublishedExtensionInfo, FindExtensionsOptions } from './types.js';
|
|
2
2
|
import type { AuthManager } from './auth.js';
|
|
3
3
|
export interface GraphQLClientConfig {
|
|
4
4
|
graphqlUrl: string;
|
|
5
5
|
authManager: AuthManager;
|
|
6
6
|
onRefused?: () => Promise<string>;
|
|
7
7
|
}
|
|
8
|
-
/** Result from the openSpace full query — space data + all channels */
|
|
8
|
+
/** Result from the openSpace full query — space data + all channels. */
|
|
9
9
|
export interface OpenSpaceFullResult {
|
|
10
10
|
name: string;
|
|
11
11
|
role: string;
|
|
12
12
|
userId: string;
|
|
13
13
|
linkAccess: LinkAccess;
|
|
14
14
|
memberCount: number;
|
|
15
|
-
|
|
15
|
+
objectLocations: string[];
|
|
16
16
|
objectStats: Record<string, RoolObjectStat>;
|
|
17
17
|
schema: SpaceSchema;
|
|
18
18
|
meta: Record<string, unknown>;
|
|
@@ -26,17 +26,13 @@ export declare class GraphQLClient {
|
|
|
26
26
|
setGraphqlUrl(url: string): void;
|
|
27
27
|
setOnRefused(onRefused: () => Promise<string>): void;
|
|
28
28
|
listSpaces(): Promise<RoolSpaceInfo[]>;
|
|
29
|
-
openSpace(spaceId: string): Promise<{
|
|
30
|
-
name: string;
|
|
31
|
-
role: string;
|
|
32
|
-
linkAccess: LinkAccess;
|
|
33
|
-
memberCount: number;
|
|
34
|
-
channels: ChannelInfo[];
|
|
35
|
-
}>;
|
|
36
29
|
createSpace(name: string): Promise<{
|
|
37
30
|
spaceId: string;
|
|
38
31
|
}>;
|
|
39
|
-
|
|
32
|
+
duplicateSpace(sourceSpaceId: string, name: string): Promise<{
|
|
33
|
+
spaceId: string;
|
|
34
|
+
}>;
|
|
35
|
+
/** Full space data — object locations, schema, metadata, all channels. */
|
|
40
36
|
openSpaceFull(spaceId: string): Promise<OpenSpaceFullResult>;
|
|
41
37
|
/** Create a channel. Throws if channel already exists. */
|
|
42
38
|
createChannel(spaceId: string, channelId: string, options?: {
|
|
@@ -46,7 +42,7 @@ export declare class GraphQLClient {
|
|
|
46
42
|
deleteSpace(spaceId: string): Promise<void>;
|
|
47
43
|
renameSpace(spaceId: string, name: string): Promise<void>;
|
|
48
44
|
setSpaceMeta(spaceId: string, meta: Record<string, unknown>, channelId: string, conversationId: string): Promise<void>;
|
|
49
|
-
deleteObjects(spaceId: string,
|
|
45
|
+
deleteObjects(spaceId: string, locations: string[], channelId: string, conversationId: string, interactionId?: string, parentInteractionId?: string | null): Promise<void>;
|
|
50
46
|
deleteChannel(spaceId: string, channelId: string): Promise<void>;
|
|
51
47
|
renameChannel(spaceId: string, channelId: string, name: string): Promise<void>;
|
|
52
48
|
updateConversation(spaceId: string, channelId: string, conversationId: string, options: {
|
|
@@ -71,25 +67,44 @@ export declare class GraphQLClient {
|
|
|
71
67
|
createCollection(spaceId: string, name: string, fields: FieldDef[], channelId: string, conversationId: string): Promise<CollectionDef>;
|
|
72
68
|
alterCollection(spaceId: string, name: string, fields: FieldDef[], channelId: string, conversationId: string): Promise<CollectionDef>;
|
|
73
69
|
dropCollection(spaceId: string, name: string, channelId: string, conversationId: string): Promise<void>;
|
|
74
|
-
createObject(spaceId: string,
|
|
75
|
-
|
|
70
|
+
createObject(spaceId: string, location: string, body: Record<string, unknown>, channelId: string, conversationId: string, interactionId: string, options?: {
|
|
71
|
+
ephemeral?: boolean;
|
|
72
|
+
parentInteractionId?: string | null;
|
|
73
|
+
}): Promise<{
|
|
74
|
+
location: string;
|
|
75
|
+
object: RoolObject | null;
|
|
76
76
|
message: string;
|
|
77
77
|
}>;
|
|
78
|
-
updateObject(spaceId: string,
|
|
79
|
-
|
|
78
|
+
updateObject(spaceId: string, location: string, channelId: string, conversationId: string, interactionId: string, options?: {
|
|
79
|
+
patch?: Record<string, unknown>;
|
|
80
|
+
prompt?: string;
|
|
81
|
+
ephemeral?: boolean;
|
|
82
|
+
parentInteractionId?: string | null;
|
|
83
|
+
}): Promise<{
|
|
84
|
+
location: string;
|
|
85
|
+
object: RoolObject | null;
|
|
86
|
+
message: string;
|
|
87
|
+
}>;
|
|
88
|
+
moveObject(spaceId: string, from: string, to: string, channelId: string, conversationId: string, interactionId: string, options?: {
|
|
89
|
+
body?: Record<string, unknown>;
|
|
90
|
+
ephemeral?: boolean;
|
|
91
|
+
parentInteractionId?: string | null;
|
|
92
|
+
}): Promise<{
|
|
93
|
+
location: string;
|
|
94
|
+
object: RoolObject | null;
|
|
80
95
|
message: string;
|
|
81
96
|
}>;
|
|
82
|
-
getObject(spaceId: string,
|
|
97
|
+
getObject(spaceId: string, location: string): Promise<RoolObject | undefined>;
|
|
83
98
|
findObjects(spaceId: string, options: FindObjectsOptions, channelId: string, conversationId: string): Promise<{
|
|
84
99
|
objects: RoolObject[];
|
|
85
100
|
message: string;
|
|
86
101
|
}>;
|
|
87
102
|
prompt(spaceId: string, prompt: string, channelId: string, conversationId: string, options: Omit<PromptOptions, 'attachments'> & {
|
|
88
|
-
|
|
103
|
+
attachmentRefs?: string[];
|
|
89
104
|
interactionId: string;
|
|
90
105
|
}): Promise<{
|
|
91
106
|
message: string;
|
|
92
|
-
|
|
107
|
+
modifiedObjectLocations: string[];
|
|
93
108
|
}>;
|
|
94
109
|
stopInteraction(spaceId: string, interactionId: string): Promise<boolean>;
|
|
95
110
|
getCurrentUser(): Promise<CurrentUser>;
|
|
@@ -97,6 +112,7 @@ export declare class GraphQLClient {
|
|
|
97
112
|
name?: string;
|
|
98
113
|
slug?: string;
|
|
99
114
|
}): Promise<CurrentUser>;
|
|
115
|
+
deleteCurrentUser(): Promise<void>;
|
|
100
116
|
findExtensions(options?: FindExtensionsOptions): Promise<PublishedExtensionInfo[]>;
|
|
101
117
|
installExtension(spaceId: string, extensionId: string, channelId: string): Promise<string>;
|
|
102
118
|
publishExtensionToPublic(extensionId: string): Promise<void>;
|
package/dist/graphql.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../src/graphql.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,cAAc,EACd,UAAU,EACV,aAAa,EACb,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../src/graphql.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,cAAc,EACd,UAAU,EACV,aAAa,EACb,QAAQ,EACR,OAAO,EACP,WAAW,EACX,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAa7C,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CACnC;AAED,wEAAwE;AACxE,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AASD,qBAAa,aAAa;IACxB,OAAO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EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAevD,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS1E,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS/D,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASvE;;;OAGG;IACG,KAAK,CAAC,CAAC,EACX,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,OAAO,CAAC,CAAC,CAAC;YAIC,OAAO;CA4DtB"}
|
package/dist/graphql.js
CHANGED
|
@@ -9,6 +9,7 @@ function getTimezone() {
|
|
|
9
9
|
return undefined;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
+
const SPACE_OBJECT_FIELDS = `location collection basename body`;
|
|
12
13
|
export class GraphQLClient {
|
|
13
14
|
config;
|
|
14
15
|
_graphqlUrl;
|
|
@@ -44,34 +45,6 @@ export class GraphQLClient {
|
|
|
44
45
|
const response = await this.request(query);
|
|
45
46
|
return response.listSpaces;
|
|
46
47
|
}
|
|
47
|
-
async openSpace(spaceId) {
|
|
48
|
-
const query = `
|
|
49
|
-
query OpenSpace($id: String!) {
|
|
50
|
-
openSpace(id: $id) {
|
|
51
|
-
name
|
|
52
|
-
role
|
|
53
|
-
linkAccess
|
|
54
|
-
memberCount
|
|
55
|
-
channels
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
`;
|
|
59
|
-
const response = await this.request(query, { id: spaceId });
|
|
60
|
-
const r = response.openSpace;
|
|
61
|
-
// Convert full channel data to ChannelInfo summaries
|
|
62
|
-
const channelInfos = Object.entries(r.channels ?? {}).map(([id, ch]) => ({
|
|
63
|
-
id,
|
|
64
|
-
name: ch.name ?? null,
|
|
65
|
-
createdAt: ch.createdAt,
|
|
66
|
-
createdBy: ch.createdBy,
|
|
67
|
-
createdByName: ch.createdByName ?? null,
|
|
68
|
-
interactionCount: Object.values(ch.conversations ?? {}).reduce((sum, conv) => sum + (conv.interactions ? Object.keys(conv.interactions).length : 0), 0),
|
|
69
|
-
extensionUrl: ch.extensionUrl ?? null,
|
|
70
|
-
extensionId: ch.extensionId ?? null,
|
|
71
|
-
manifest: ch.manifest ?? null,
|
|
72
|
-
}));
|
|
73
|
-
return { name: r.name, role: r.role, linkAccess: r.linkAccess, memberCount: r.memberCount, channels: channelInfos };
|
|
74
|
-
}
|
|
75
48
|
async createSpace(name) {
|
|
76
49
|
const mutation = `
|
|
77
50
|
mutation CreateSpace($name: String!) {
|
|
@@ -85,7 +58,21 @@ export class GraphQLClient {
|
|
|
85
58
|
});
|
|
86
59
|
return { spaceId: response.createSpace.spaceId };
|
|
87
60
|
}
|
|
88
|
-
|
|
61
|
+
async duplicateSpace(sourceSpaceId, name) {
|
|
62
|
+
const mutation = `
|
|
63
|
+
mutation DuplicateSpace($sourceSpaceId: String!, $name: String!) {
|
|
64
|
+
duplicateSpace(sourceSpaceId: $sourceSpaceId, name: $name) {
|
|
65
|
+
spaceId
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
const response = await this.request(mutation, {
|
|
70
|
+
sourceSpaceId,
|
|
71
|
+
name,
|
|
72
|
+
});
|
|
73
|
+
return { spaceId: response.duplicateSpace.spaceId };
|
|
74
|
+
}
|
|
75
|
+
/** Full space data — object locations, schema, metadata, all channels. */
|
|
89
76
|
async openSpaceFull(spaceId) {
|
|
90
77
|
const query = `
|
|
91
78
|
query OpenSpaceFull($id: String!) {
|
|
@@ -95,9 +82,9 @@ export class GraphQLClient {
|
|
|
95
82
|
userId
|
|
96
83
|
linkAccess
|
|
97
84
|
memberCount
|
|
98
|
-
|
|
85
|
+
objectLocations
|
|
99
86
|
objectStatEntries {
|
|
100
|
-
|
|
87
|
+
location
|
|
101
88
|
modifiedAt
|
|
102
89
|
modifiedBy
|
|
103
90
|
modifiedByName
|
|
@@ -114,8 +101,8 @@ export class GraphQLClient {
|
|
|
114
101
|
const response = await this.request(query, { id: spaceId });
|
|
115
102
|
const r = response.openSpace;
|
|
116
103
|
const objectStats = {};
|
|
117
|
-
for (const
|
|
118
|
-
objectStats[
|
|
104
|
+
for (const stat of r.objectStatEntries ?? []) {
|
|
105
|
+
objectStats[stat.location] = stat;
|
|
119
106
|
}
|
|
120
107
|
return {
|
|
121
108
|
name: r.name,
|
|
@@ -123,7 +110,7 @@ export class GraphQLClient {
|
|
|
123
110
|
userId: r.userId,
|
|
124
111
|
linkAccess: r.linkAccess,
|
|
125
112
|
memberCount: r.memberCount,
|
|
126
|
-
|
|
113
|
+
objectLocations: r.objectLocations,
|
|
127
114
|
objectStats,
|
|
128
115
|
schema: r.schema ?? {},
|
|
129
116
|
meta: r.meta ?? {},
|
|
@@ -151,9 +138,7 @@ export class GraphQLClient {
|
|
|
151
138
|
deleteSpace(id: $id)
|
|
152
139
|
}
|
|
153
140
|
`;
|
|
154
|
-
await this.request(mutation, {
|
|
155
|
-
id: spaceId,
|
|
156
|
-
});
|
|
141
|
+
await this.request(mutation, { id: spaceId });
|
|
157
142
|
}
|
|
158
143
|
async renameSpace(spaceId, name) {
|
|
159
144
|
const mutation = `
|
|
@@ -161,35 +146,34 @@ export class GraphQLClient {
|
|
|
161
146
|
renameSpace(id: $id, name: $name)
|
|
162
147
|
}
|
|
163
148
|
`;
|
|
164
|
-
await this.request(mutation, {
|
|
165
|
-
id: spaceId,
|
|
166
|
-
name,
|
|
167
|
-
});
|
|
149
|
+
await this.request(mutation, { id: spaceId, name });
|
|
168
150
|
}
|
|
169
151
|
async setSpaceMeta(spaceId, meta, channelId, conversationId) {
|
|
170
152
|
const mutation = `
|
|
171
|
-
mutation SetSpaceMeta($id: String!, $meta:
|
|
153
|
+
mutation SetSpaceMeta($id: String!, $meta: JSON!, $channelId: String!, $conversationId: String!) {
|
|
172
154
|
setSpaceMeta(id: $id, meta: $meta, channelId: $channelId, conversationId: $conversationId)
|
|
173
155
|
}
|
|
174
156
|
`;
|
|
175
157
|
await this.request(mutation, {
|
|
176
158
|
id: spaceId,
|
|
177
|
-
meta
|
|
159
|
+
meta,
|
|
178
160
|
channelId,
|
|
179
161
|
conversationId,
|
|
180
162
|
});
|
|
181
163
|
}
|
|
182
|
-
async deleteObjects(spaceId,
|
|
164
|
+
async deleteObjects(spaceId, locations, channelId, conversationId, interactionId, parentInteractionId) {
|
|
183
165
|
const mutation = `
|
|
184
|
-
mutation DeleteObjects($spaceId: String!, $
|
|
185
|
-
deleteObjects(spaceId: $spaceId,
|
|
166
|
+
mutation DeleteObjects($spaceId: String!, $locations: [String!]!, $channelId: String!, $conversationId: String!, $interactionId: String, $parentInteractionId: String) {
|
|
167
|
+
deleteObjects(spaceId: $spaceId, locations: $locations, channelId: $channelId, conversationId: $conversationId, interactionId: $interactionId, parentInteractionId: $parentInteractionId)
|
|
186
168
|
}
|
|
187
169
|
`;
|
|
188
170
|
await this.request(mutation, {
|
|
189
171
|
spaceId,
|
|
190
|
-
|
|
172
|
+
locations,
|
|
191
173
|
channelId,
|
|
192
174
|
conversationId,
|
|
175
|
+
interactionId,
|
|
176
|
+
parentInteractionId,
|
|
193
177
|
});
|
|
194
178
|
}
|
|
195
179
|
async deleteChannel(spaceId, channelId) {
|
|
@@ -198,10 +182,7 @@ export class GraphQLClient {
|
|
|
198
182
|
deleteChannel(spaceId: $spaceId, channelId: $channelId)
|
|
199
183
|
}
|
|
200
184
|
`;
|
|
201
|
-
await this.request(mutation, {
|
|
202
|
-
spaceId,
|
|
203
|
-
channelId,
|
|
204
|
-
});
|
|
185
|
+
await this.request(mutation, { spaceId, channelId });
|
|
205
186
|
}
|
|
206
187
|
async renameChannel(spaceId, channelId, name) {
|
|
207
188
|
const mutation = `
|
|
@@ -209,11 +190,7 @@ export class GraphQLClient {
|
|
|
209
190
|
updateChannel(spaceId: $spaceId, channelId: $channelId, name: $name)
|
|
210
191
|
}
|
|
211
192
|
`;
|
|
212
|
-
await this.request(mutation, {
|
|
213
|
-
spaceId,
|
|
214
|
-
channelId,
|
|
215
|
-
name,
|
|
216
|
-
});
|
|
193
|
+
await this.request(mutation, { spaceId, channelId, name });
|
|
217
194
|
}
|
|
218
195
|
async updateConversation(spaceId, channelId, conversationId, options) {
|
|
219
196
|
const mutation = `
|
|
@@ -235,11 +212,7 @@ export class GraphQLClient {
|
|
|
235
212
|
deleteConversation(spaceId: $spaceId, channelId: $channelId, conversationId: $conversationId)
|
|
236
213
|
}
|
|
237
214
|
`;
|
|
238
|
-
await this.request(mutation, {
|
|
239
|
-
spaceId,
|
|
240
|
-
channelId,
|
|
241
|
-
conversationId,
|
|
242
|
-
});
|
|
215
|
+
await this.request(mutation, { spaceId, channelId, conversationId });
|
|
243
216
|
}
|
|
244
217
|
async checkpoint(spaceId, label, channelId) {
|
|
245
218
|
const mutation = `
|
|
@@ -264,10 +237,7 @@ export class GraphQLClient {
|
|
|
264
237
|
}
|
|
265
238
|
}
|
|
266
239
|
`;
|
|
267
|
-
const result = await this.request(mutation, {
|
|
268
|
-
spaceId,
|
|
269
|
-
channelId,
|
|
270
|
-
});
|
|
240
|
+
const result = await this.request(mutation, { spaceId, channelId });
|
|
271
241
|
return result.undo;
|
|
272
242
|
}
|
|
273
243
|
async redo(spaceId, channelId) {
|
|
@@ -278,10 +248,7 @@ export class GraphQLClient {
|
|
|
278
248
|
}
|
|
279
249
|
}
|
|
280
250
|
`;
|
|
281
|
-
const result = await this.request(mutation, {
|
|
282
|
-
spaceId,
|
|
283
|
-
channelId,
|
|
284
|
-
});
|
|
251
|
+
const result = await this.request(mutation, { spaceId, channelId });
|
|
285
252
|
return result.redo;
|
|
286
253
|
}
|
|
287
254
|
async checkpointStatus(spaceId, channelId) {
|
|
@@ -293,10 +260,7 @@ export class GraphQLClient {
|
|
|
293
260
|
}
|
|
294
261
|
}
|
|
295
262
|
`;
|
|
296
|
-
const result = await this.request(query, {
|
|
297
|
-
spaceId,
|
|
298
|
-
channelId,
|
|
299
|
-
});
|
|
263
|
+
const result = await this.request(query, { spaceId, channelId });
|
|
300
264
|
return result.checkpointStatus;
|
|
301
265
|
}
|
|
302
266
|
async clearCheckpointHistory(spaceId, channelId) {
|
|
@@ -305,42 +269,37 @@ export class GraphQLClient {
|
|
|
305
269
|
clearCheckpointHistory(spaceId: $spaceId, channelId: $channelId)
|
|
306
270
|
}
|
|
307
271
|
`;
|
|
308
|
-
await this.request(mutation, {
|
|
309
|
-
spaceId,
|
|
310
|
-
channelId,
|
|
311
|
-
});
|
|
272
|
+
await this.request(mutation, { spaceId, channelId });
|
|
312
273
|
}
|
|
313
274
|
async createCollection(spaceId, name, fields, channelId, conversationId) {
|
|
314
275
|
const mutation = `
|
|
315
|
-
mutation CreateCollection($spaceId: String!, $name: String!, $fields:
|
|
276
|
+
mutation CreateCollection($spaceId: String!, $name: String!, $fields: JSON!, $channelId: String!, $conversationId: String!) {
|
|
316
277
|
createCollection(spaceId: $spaceId, name: $name, fields: $fields, channelId: $channelId, conversationId: $conversationId)
|
|
317
278
|
}
|
|
318
279
|
`;
|
|
319
280
|
const result = await this.request(mutation, {
|
|
320
281
|
spaceId,
|
|
321
282
|
name,
|
|
322
|
-
fields
|
|
283
|
+
fields,
|
|
323
284
|
channelId,
|
|
324
285
|
conversationId,
|
|
325
286
|
});
|
|
326
|
-
|
|
327
|
-
return parsed[name];
|
|
287
|
+
return result.createCollection;
|
|
328
288
|
}
|
|
329
289
|
async alterCollection(spaceId, name, fields, channelId, conversationId) {
|
|
330
290
|
const mutation = `
|
|
331
|
-
mutation AlterCollection($spaceId: String!, $name: String!, $fields:
|
|
291
|
+
mutation AlterCollection($spaceId: String!, $name: String!, $fields: JSON!, $channelId: String!, $conversationId: String!) {
|
|
332
292
|
alterCollection(spaceId: $spaceId, name: $name, fields: $fields, channelId: $channelId, conversationId: $conversationId)
|
|
333
293
|
}
|
|
334
294
|
`;
|
|
335
295
|
const result = await this.request(mutation, {
|
|
336
296
|
spaceId,
|
|
337
297
|
name,
|
|
338
|
-
fields
|
|
298
|
+
fields,
|
|
339
299
|
channelId,
|
|
340
300
|
conversationId,
|
|
341
301
|
});
|
|
342
|
-
|
|
343
|
-
return parsed[name];
|
|
302
|
+
return result.alterCollection;
|
|
344
303
|
}
|
|
345
304
|
async dropCollection(spaceId, name, channelId, conversationId) {
|
|
346
305
|
const mutation = `
|
|
@@ -348,111 +307,128 @@ export class GraphQLClient {
|
|
|
348
307
|
dropCollection(spaceId: $spaceId, name: $name, channelId: $channelId, conversationId: $conversationId)
|
|
349
308
|
}
|
|
350
309
|
`;
|
|
351
|
-
await this.request(mutation, {
|
|
310
|
+
await this.request(mutation, { spaceId, name, channelId, conversationId });
|
|
311
|
+
}
|
|
312
|
+
async createObject(spaceId, location, body, channelId, conversationId, interactionId, options) {
|
|
313
|
+
const mutation = `
|
|
314
|
+
mutation CreateObject($spaceId: String!, $location: String!, $body: JSON!, $channelId: String!, $conversationId: String!, $interactionId: String!, $ephemeral: Boolean!, $parentInteractionId: String) {
|
|
315
|
+
createObject(spaceId: $spaceId, location: $location, body: $body, channelId: $channelId, conversationId: $conversationId, interactionId: $interactionId, ephemeral: $ephemeral, parentInteractionId: $parentInteractionId) {
|
|
316
|
+
location
|
|
317
|
+
object { ${SPACE_OBJECT_FIELDS} }
|
|
318
|
+
message
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
`;
|
|
322
|
+
const result = await this.request(mutation, {
|
|
352
323
|
spaceId,
|
|
353
|
-
|
|
324
|
+
location,
|
|
325
|
+
body,
|
|
354
326
|
channelId,
|
|
355
327
|
conversationId,
|
|
328
|
+
interactionId,
|
|
329
|
+
ephemeral: options?.ephemeral ?? false,
|
|
330
|
+
parentInteractionId: options?.parentInteractionId,
|
|
356
331
|
});
|
|
332
|
+
return result.createObject;
|
|
357
333
|
}
|
|
358
|
-
async
|
|
334
|
+
async updateObject(spaceId, location, channelId, conversationId, interactionId, options) {
|
|
359
335
|
const mutation = `
|
|
360
|
-
mutation
|
|
361
|
-
|
|
362
|
-
|
|
336
|
+
mutation UpdateObject($spaceId: String!, $location: String!, $patch: JSON, $prompt: String, $channelId: String!, $conversationId: String!, $interactionId: String!, $ephemeral: Boolean!, $parentInteractionId: String) {
|
|
337
|
+
updateObject(spaceId: $spaceId, location: $location, patch: $patch, prompt: $prompt, channelId: $channelId, conversationId: $conversationId, interactionId: $interactionId, ephemeral: $ephemeral, parentInteractionId: $parentInteractionId) {
|
|
338
|
+
location
|
|
339
|
+
object { ${SPACE_OBJECT_FIELDS} }
|
|
363
340
|
message
|
|
364
341
|
}
|
|
365
342
|
}
|
|
366
343
|
`;
|
|
367
344
|
const result = await this.request(mutation, {
|
|
368
345
|
spaceId,
|
|
369
|
-
|
|
346
|
+
location,
|
|
347
|
+
patch: options?.patch,
|
|
348
|
+
prompt: options?.prompt,
|
|
370
349
|
channelId,
|
|
371
350
|
conversationId,
|
|
372
|
-
ephemeral,
|
|
373
351
|
interactionId,
|
|
352
|
+
ephemeral: options?.ephemeral ?? false,
|
|
353
|
+
parentInteractionId: options?.parentInteractionId,
|
|
374
354
|
});
|
|
375
|
-
return result.
|
|
355
|
+
return result.updateObject;
|
|
376
356
|
}
|
|
377
|
-
async
|
|
357
|
+
async moveObject(spaceId, from, to, channelId, conversationId, interactionId, options) {
|
|
378
358
|
const mutation = `
|
|
379
|
-
mutation
|
|
380
|
-
|
|
381
|
-
|
|
359
|
+
mutation MoveObject($spaceId: String!, $from: String!, $to: String!, $body: JSON, $channelId: String!, $conversationId: String!, $interactionId: String!, $ephemeral: Boolean!, $parentInteractionId: String) {
|
|
360
|
+
moveObject(spaceId: $spaceId, from: $from, to: $to, body: $body, channelId: $channelId, conversationId: $conversationId, interactionId: $interactionId, ephemeral: $ephemeral, parentInteractionId: $parentInteractionId) {
|
|
361
|
+
location
|
|
362
|
+
object { ${SPACE_OBJECT_FIELDS} }
|
|
382
363
|
message
|
|
383
364
|
}
|
|
384
365
|
}
|
|
385
366
|
`;
|
|
386
367
|
const result = await this.request(mutation, {
|
|
387
368
|
spaceId,
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
369
|
+
from,
|
|
370
|
+
to,
|
|
371
|
+
body: options?.body,
|
|
391
372
|
channelId,
|
|
392
373
|
conversationId,
|
|
393
|
-
ephemeral,
|
|
394
374
|
interactionId,
|
|
375
|
+
ephemeral: options?.ephemeral ?? false,
|
|
376
|
+
parentInteractionId: options?.parentInteractionId,
|
|
395
377
|
});
|
|
396
|
-
return result.
|
|
378
|
+
return result.moveObject;
|
|
397
379
|
}
|
|
398
|
-
async getObject(spaceId,
|
|
380
|
+
async getObject(spaceId, location) {
|
|
399
381
|
const query = `
|
|
400
|
-
query GetObject($spaceId: String!, $
|
|
401
|
-
getObject(spaceId: $spaceId,
|
|
382
|
+
query GetObject($spaceId: String!, $location: String!) {
|
|
383
|
+
getObject(spaceId: $spaceId, location: $location) { ${SPACE_OBJECT_FIELDS} }
|
|
402
384
|
}
|
|
403
385
|
`;
|
|
404
|
-
const result = await this.request(query, {
|
|
405
|
-
spaceId,
|
|
406
|
-
objectId,
|
|
407
|
-
});
|
|
386
|
+
const result = await this.request(query, { spaceId, location });
|
|
408
387
|
return result.getObject ?? undefined;
|
|
409
388
|
}
|
|
410
389
|
async findObjects(spaceId, options, channelId, conversationId) {
|
|
411
390
|
const query = `
|
|
412
|
-
query FindObjects($spaceId: String!, $where:
|
|
413
|
-
findObjects(spaceId: $spaceId, where: $where, collection: $collection, prompt: $prompt, limit: $limit,
|
|
414
|
-
objects
|
|
391
|
+
query FindObjects($spaceId: String!, $where: JSON, $collection: String, $prompt: String, $limit: Int, $locations: [String!]!, $order: String, $channelId: String!, $conversationId: String!, $ephemeral: Boolean!) {
|
|
392
|
+
findObjects(spaceId: $spaceId, where: $where, collection: $collection, prompt: $prompt, limit: $limit, locations: $locations, order: $order, channelId: $channelId, conversationId: $conversationId, ephemeral: $ephemeral) {
|
|
393
|
+
objects { ${SPACE_OBJECT_FIELDS} }
|
|
415
394
|
message
|
|
416
395
|
}
|
|
417
396
|
}
|
|
418
397
|
`;
|
|
419
398
|
const result = await this.request(query, {
|
|
420
399
|
spaceId,
|
|
421
|
-
where: options.where
|
|
400
|
+
where: options.where,
|
|
422
401
|
collection: options.collection,
|
|
423
402
|
prompt: options.prompt,
|
|
424
403
|
limit: options.limit,
|
|
425
|
-
|
|
404
|
+
locations: options.locations ?? [],
|
|
426
405
|
order: options.order,
|
|
427
406
|
channelId,
|
|
428
407
|
conversationId,
|
|
429
|
-
ephemeral: options.ephemeral,
|
|
408
|
+
ephemeral: options.ephemeral ?? false,
|
|
430
409
|
});
|
|
431
|
-
return
|
|
432
|
-
objects: JSON.parse(result.findObjects.objects),
|
|
433
|
-
message: result.findObjects.message,
|
|
434
|
-
};
|
|
410
|
+
return result.findObjects;
|
|
435
411
|
}
|
|
436
412
|
async prompt(spaceId, prompt, channelId, conversationId, options) {
|
|
437
413
|
const mutation = `
|
|
438
|
-
mutation Prompt($spaceId: String!, $prompt: String!, $
|
|
439
|
-
prompt(spaceId: $spaceId, prompt: $prompt,
|
|
414
|
+
mutation Prompt($spaceId: String!, $prompt: String!, $locations: [String!]!, $responseSchema: JSON, $channelId: String!, $conversationId: String!, $effort: PromptEffort!, $ephemeral: Boolean!, $readOnly: Boolean!, $attachments: [String!]!, $interactionId: String!, $parentInteractionId: String) {
|
|
415
|
+
prompt(spaceId: $spaceId, prompt: $prompt, locations: $locations, responseSchema: $responseSchema, channelId: $channelId, conversationId: $conversationId, effort: $effort, ephemeral: $ephemeral, readOnly: $readOnly, attachments: $attachments, interactionId: $interactionId, parentInteractionId: $parentInteractionId) {
|
|
440
416
|
message
|
|
441
|
-
|
|
417
|
+
modifiedObjectLocations
|
|
442
418
|
}
|
|
443
419
|
}
|
|
444
420
|
`;
|
|
445
421
|
const response = await this.request(mutation, {
|
|
446
422
|
spaceId,
|
|
447
423
|
prompt,
|
|
448
|
-
|
|
424
|
+
locations: options.locations ?? [],
|
|
449
425
|
responseSchema: options.responseSchema,
|
|
450
426
|
channelId,
|
|
451
427
|
conversationId,
|
|
452
|
-
effort: options.effort,
|
|
453
|
-
ephemeral: options.ephemeral,
|
|
454
|
-
readOnly: options.readOnly,
|
|
455
|
-
attachments: options.
|
|
428
|
+
effort: options.effort ?? 'STANDARD',
|
|
429
|
+
ephemeral: options.ephemeral ?? false,
|
|
430
|
+
readOnly: options.readOnly ?? false,
|
|
431
|
+
attachments: options.attachmentRefs ?? [],
|
|
456
432
|
interactionId: options.interactionId,
|
|
457
433
|
parentInteractionId: options.parentInteractionId,
|
|
458
434
|
});
|
|
@@ -514,6 +490,14 @@ export class GraphQLClient {
|
|
|
514
490
|
const response = await this.request(mutation, { input });
|
|
515
491
|
return response.updateCurrentUser;
|
|
516
492
|
}
|
|
493
|
+
async deleteCurrentUser() {
|
|
494
|
+
const mutation = `
|
|
495
|
+
mutation DeleteCurrentUser {
|
|
496
|
+
deleteCurrentUser
|
|
497
|
+
}
|
|
498
|
+
`;
|
|
499
|
+
await this.request(mutation);
|
|
500
|
+
}
|
|
517
501
|
async findExtensions(options) {
|
|
518
502
|
const query = `
|
|
519
503
|
query FindExtensions($query: String, $limit: Int) {
|