@rool-dev/sdk 0.9.0 → 0.10.0-dev.2e3d7c6
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 +359 -166
- package/dist/channel.d.ts +94 -184
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +360 -351
- 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 +59 -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 +114 -128
- package/dist/graphql.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -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/machine.d.ts +16 -0
- package/dist/machine.d.ts.map +1 -0
- package/dist/machine.js +51 -0
- package/dist/machine.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 +20 -4
- package/dist/space.d.ts.map +1 -1
- package/dist/space.js +31 -45
- package/dist/space.js.map +1 -1
- package/dist/subscription.d.ts.map +1 -1
- package/dist/subscription.js +11 -12
- package/dist/subscription.js.map +1 -1
- package/dist/types.d.ts +79 -59
- package/dist/types.d.ts.map +1 -1
- package/dist/webdav.d.ts +153 -0
- package/dist/webdav.d.ts.map +1 -0
- package/dist/webdav.js +458 -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,EAA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AAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAmBrD,cAAc,CAAC,OAAO,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;
|
|
@@ -31,6 +32,7 @@ export class GraphQLClient {
|
|
|
31
32
|
listSpaces {
|
|
32
33
|
id
|
|
33
34
|
name
|
|
35
|
+
inboundEmailAddress
|
|
34
36
|
role
|
|
35
37
|
ownerId
|
|
36
38
|
size
|
|
@@ -44,34 +46,6 @@ export class GraphQLClient {
|
|
|
44
46
|
const response = await this.request(query);
|
|
45
47
|
return response.listSpaces;
|
|
46
48
|
}
|
|
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
49
|
async createSpace(name) {
|
|
76
50
|
const mutation = `
|
|
77
51
|
mutation CreateSpace($name: String!) {
|
|
@@ -85,7 +59,21 @@ export class GraphQLClient {
|
|
|
85
59
|
});
|
|
86
60
|
return { spaceId: response.createSpace.spaceId };
|
|
87
61
|
}
|
|
88
|
-
|
|
62
|
+
async duplicateSpace(sourceSpaceId, name) {
|
|
63
|
+
const mutation = `
|
|
64
|
+
mutation DuplicateSpace($sourceSpaceId: String!, $name: String!) {
|
|
65
|
+
duplicateSpace(sourceSpaceId: $sourceSpaceId, name: $name) {
|
|
66
|
+
spaceId
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
const response = await this.request(mutation, {
|
|
71
|
+
sourceSpaceId,
|
|
72
|
+
name,
|
|
73
|
+
});
|
|
74
|
+
return { spaceId: response.duplicateSpace.spaceId };
|
|
75
|
+
}
|
|
76
|
+
/** Full space data — object locations, schema, metadata, all channels. */
|
|
89
77
|
async openSpaceFull(spaceId) {
|
|
90
78
|
const query = `
|
|
91
79
|
query OpenSpaceFull($id: String!) {
|
|
@@ -95,9 +83,9 @@ export class GraphQLClient {
|
|
|
95
83
|
userId
|
|
96
84
|
linkAccess
|
|
97
85
|
memberCount
|
|
98
|
-
|
|
86
|
+
objectLocations
|
|
99
87
|
objectStatEntries {
|
|
100
|
-
|
|
88
|
+
location
|
|
101
89
|
modifiedAt
|
|
102
90
|
modifiedBy
|
|
103
91
|
modifiedByName
|
|
@@ -114,8 +102,8 @@ export class GraphQLClient {
|
|
|
114
102
|
const response = await this.request(query, { id: spaceId });
|
|
115
103
|
const r = response.openSpace;
|
|
116
104
|
const objectStats = {};
|
|
117
|
-
for (const
|
|
118
|
-
objectStats[
|
|
105
|
+
for (const stat of r.objectStatEntries ?? []) {
|
|
106
|
+
objectStats[stat.location] = stat;
|
|
119
107
|
}
|
|
120
108
|
return {
|
|
121
109
|
name: r.name,
|
|
@@ -123,7 +111,7 @@ export class GraphQLClient {
|
|
|
123
111
|
userId: r.userId,
|
|
124
112
|
linkAccess: r.linkAccess,
|
|
125
113
|
memberCount: r.memberCount,
|
|
126
|
-
|
|
114
|
+
objectLocations: r.objectLocations,
|
|
127
115
|
objectStats,
|
|
128
116
|
schema: r.schema ?? {},
|
|
129
117
|
meta: r.meta ?? {},
|
|
@@ -151,9 +139,7 @@ export class GraphQLClient {
|
|
|
151
139
|
deleteSpace(id: $id)
|
|
152
140
|
}
|
|
153
141
|
`;
|
|
154
|
-
await this.request(mutation, {
|
|
155
|
-
id: spaceId,
|
|
156
|
-
});
|
|
142
|
+
await this.request(mutation, { id: spaceId });
|
|
157
143
|
}
|
|
158
144
|
async renameSpace(spaceId, name) {
|
|
159
145
|
const mutation = `
|
|
@@ -161,35 +147,34 @@ export class GraphQLClient {
|
|
|
161
147
|
renameSpace(id: $id, name: $name)
|
|
162
148
|
}
|
|
163
149
|
`;
|
|
164
|
-
await this.request(mutation, {
|
|
165
|
-
id: spaceId,
|
|
166
|
-
name,
|
|
167
|
-
});
|
|
150
|
+
await this.request(mutation, { id: spaceId, name });
|
|
168
151
|
}
|
|
169
152
|
async setSpaceMeta(spaceId, meta, channelId, conversationId) {
|
|
170
153
|
const mutation = `
|
|
171
|
-
mutation SetSpaceMeta($id: String!, $meta:
|
|
154
|
+
mutation SetSpaceMeta($id: String!, $meta: JSON!, $channelId: String!, $conversationId: String!) {
|
|
172
155
|
setSpaceMeta(id: $id, meta: $meta, channelId: $channelId, conversationId: $conversationId)
|
|
173
156
|
}
|
|
174
157
|
`;
|
|
175
158
|
await this.request(mutation, {
|
|
176
159
|
id: spaceId,
|
|
177
|
-
meta
|
|
160
|
+
meta,
|
|
178
161
|
channelId,
|
|
179
162
|
conversationId,
|
|
180
163
|
});
|
|
181
164
|
}
|
|
182
|
-
async deleteObjects(spaceId,
|
|
165
|
+
async deleteObjects(spaceId, locations, channelId, conversationId, interactionId, parentInteractionId) {
|
|
183
166
|
const mutation = `
|
|
184
|
-
mutation DeleteObjects($spaceId: String!, $
|
|
185
|
-
deleteObjects(spaceId: $spaceId,
|
|
167
|
+
mutation DeleteObjects($spaceId: String!, $locations: [String!]!, $channelId: String!, $conversationId: String!, $interactionId: String, $parentInteractionId: String) {
|
|
168
|
+
deleteObjects(spaceId: $spaceId, locations: $locations, channelId: $channelId, conversationId: $conversationId, interactionId: $interactionId, parentInteractionId: $parentInteractionId)
|
|
186
169
|
}
|
|
187
170
|
`;
|
|
188
171
|
await this.request(mutation, {
|
|
189
172
|
spaceId,
|
|
190
|
-
|
|
173
|
+
locations,
|
|
191
174
|
channelId,
|
|
192
175
|
conversationId,
|
|
176
|
+
interactionId,
|
|
177
|
+
parentInteractionId,
|
|
193
178
|
});
|
|
194
179
|
}
|
|
195
180
|
async deleteChannel(spaceId, channelId) {
|
|
@@ -198,10 +183,7 @@ export class GraphQLClient {
|
|
|
198
183
|
deleteChannel(spaceId: $spaceId, channelId: $channelId)
|
|
199
184
|
}
|
|
200
185
|
`;
|
|
201
|
-
await this.request(mutation, {
|
|
202
|
-
spaceId,
|
|
203
|
-
channelId,
|
|
204
|
-
});
|
|
186
|
+
await this.request(mutation, { spaceId, channelId });
|
|
205
187
|
}
|
|
206
188
|
async renameChannel(spaceId, channelId, name) {
|
|
207
189
|
const mutation = `
|
|
@@ -209,11 +191,7 @@ export class GraphQLClient {
|
|
|
209
191
|
updateChannel(spaceId: $spaceId, channelId: $channelId, name: $name)
|
|
210
192
|
}
|
|
211
193
|
`;
|
|
212
|
-
await this.request(mutation, {
|
|
213
|
-
spaceId,
|
|
214
|
-
channelId,
|
|
215
|
-
name,
|
|
216
|
-
});
|
|
194
|
+
await this.request(mutation, { spaceId, channelId, name });
|
|
217
195
|
}
|
|
218
196
|
async updateConversation(spaceId, channelId, conversationId, options) {
|
|
219
197
|
const mutation = `
|
|
@@ -235,11 +213,7 @@ export class GraphQLClient {
|
|
|
235
213
|
deleteConversation(spaceId: $spaceId, channelId: $channelId, conversationId: $conversationId)
|
|
236
214
|
}
|
|
237
215
|
`;
|
|
238
|
-
await this.request(mutation, {
|
|
239
|
-
spaceId,
|
|
240
|
-
channelId,
|
|
241
|
-
conversationId,
|
|
242
|
-
});
|
|
216
|
+
await this.request(mutation, { spaceId, channelId, conversationId });
|
|
243
217
|
}
|
|
244
218
|
async checkpoint(spaceId, label, channelId) {
|
|
245
219
|
const mutation = `
|
|
@@ -264,10 +238,7 @@ export class GraphQLClient {
|
|
|
264
238
|
}
|
|
265
239
|
}
|
|
266
240
|
`;
|
|
267
|
-
const result = await this.request(mutation, {
|
|
268
|
-
spaceId,
|
|
269
|
-
channelId,
|
|
270
|
-
});
|
|
241
|
+
const result = await this.request(mutation, { spaceId, channelId });
|
|
271
242
|
return result.undo;
|
|
272
243
|
}
|
|
273
244
|
async redo(spaceId, channelId) {
|
|
@@ -278,10 +249,7 @@ export class GraphQLClient {
|
|
|
278
249
|
}
|
|
279
250
|
}
|
|
280
251
|
`;
|
|
281
|
-
const result = await this.request(mutation, {
|
|
282
|
-
spaceId,
|
|
283
|
-
channelId,
|
|
284
|
-
});
|
|
252
|
+
const result = await this.request(mutation, { spaceId, channelId });
|
|
285
253
|
return result.redo;
|
|
286
254
|
}
|
|
287
255
|
async checkpointStatus(spaceId, channelId) {
|
|
@@ -293,10 +261,7 @@ export class GraphQLClient {
|
|
|
293
261
|
}
|
|
294
262
|
}
|
|
295
263
|
`;
|
|
296
|
-
const result = await this.request(query, {
|
|
297
|
-
spaceId,
|
|
298
|
-
channelId,
|
|
299
|
-
});
|
|
264
|
+
const result = await this.request(query, { spaceId, channelId });
|
|
300
265
|
return result.checkpointStatus;
|
|
301
266
|
}
|
|
302
267
|
async clearCheckpointHistory(spaceId, channelId) {
|
|
@@ -305,42 +270,37 @@ export class GraphQLClient {
|
|
|
305
270
|
clearCheckpointHistory(spaceId: $spaceId, channelId: $channelId)
|
|
306
271
|
}
|
|
307
272
|
`;
|
|
308
|
-
await this.request(mutation, {
|
|
309
|
-
spaceId,
|
|
310
|
-
channelId,
|
|
311
|
-
});
|
|
273
|
+
await this.request(mutation, { spaceId, channelId });
|
|
312
274
|
}
|
|
313
275
|
async createCollection(spaceId, name, fields, channelId, conversationId) {
|
|
314
276
|
const mutation = `
|
|
315
|
-
mutation CreateCollection($spaceId: String!, $name: String!, $fields:
|
|
277
|
+
mutation CreateCollection($spaceId: String!, $name: String!, $fields: JSON!, $channelId: String!, $conversationId: String!) {
|
|
316
278
|
createCollection(spaceId: $spaceId, name: $name, fields: $fields, channelId: $channelId, conversationId: $conversationId)
|
|
317
279
|
}
|
|
318
280
|
`;
|
|
319
281
|
const result = await this.request(mutation, {
|
|
320
282
|
spaceId,
|
|
321
283
|
name,
|
|
322
|
-
fields
|
|
284
|
+
fields,
|
|
323
285
|
channelId,
|
|
324
286
|
conversationId,
|
|
325
287
|
});
|
|
326
|
-
|
|
327
|
-
return parsed[name];
|
|
288
|
+
return result.createCollection;
|
|
328
289
|
}
|
|
329
290
|
async alterCollection(spaceId, name, fields, channelId, conversationId) {
|
|
330
291
|
const mutation = `
|
|
331
|
-
mutation AlterCollection($spaceId: String!, $name: String!, $fields:
|
|
292
|
+
mutation AlterCollection($spaceId: String!, $name: String!, $fields: JSON!, $channelId: String!, $conversationId: String!) {
|
|
332
293
|
alterCollection(spaceId: $spaceId, name: $name, fields: $fields, channelId: $channelId, conversationId: $conversationId)
|
|
333
294
|
}
|
|
334
295
|
`;
|
|
335
296
|
const result = await this.request(mutation, {
|
|
336
297
|
spaceId,
|
|
337
298
|
name,
|
|
338
|
-
fields
|
|
299
|
+
fields,
|
|
339
300
|
channelId,
|
|
340
301
|
conversationId,
|
|
341
302
|
});
|
|
342
|
-
|
|
343
|
-
return parsed[name];
|
|
303
|
+
return result.alterCollection;
|
|
344
304
|
}
|
|
345
305
|
async dropCollection(spaceId, name, channelId, conversationId) {
|
|
346
306
|
const mutation = `
|
|
@@ -348,113 +308,131 @@ export class GraphQLClient {
|
|
|
348
308
|
dropCollection(spaceId: $spaceId, name: $name, channelId: $channelId, conversationId: $conversationId)
|
|
349
309
|
}
|
|
350
310
|
`;
|
|
351
|
-
await this.request(mutation, {
|
|
311
|
+
await this.request(mutation, { spaceId, name, channelId, conversationId });
|
|
312
|
+
}
|
|
313
|
+
async createObject(spaceId, location, body, channelId, conversationId, interactionId, options) {
|
|
314
|
+
const mutation = `
|
|
315
|
+
mutation CreateObject($spaceId: String!, $location: String!, $body: JSON!, $channelId: String!, $conversationId: String!, $interactionId: String!, $ephemeral: Boolean!, $parentInteractionId: String) {
|
|
316
|
+
createObject(spaceId: $spaceId, location: $location, body: $body, channelId: $channelId, conversationId: $conversationId, interactionId: $interactionId, ephemeral: $ephemeral, parentInteractionId: $parentInteractionId) {
|
|
317
|
+
location
|
|
318
|
+
object { ${SPACE_OBJECT_FIELDS} }
|
|
319
|
+
message
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
`;
|
|
323
|
+
const result = await this.request(mutation, {
|
|
352
324
|
spaceId,
|
|
353
|
-
|
|
325
|
+
location,
|
|
326
|
+
body,
|
|
354
327
|
channelId,
|
|
355
328
|
conversationId,
|
|
329
|
+
interactionId,
|
|
330
|
+
ephemeral: options?.ephemeral ?? false,
|
|
331
|
+
parentInteractionId: options?.parentInteractionId,
|
|
356
332
|
});
|
|
333
|
+
return result.createObject;
|
|
357
334
|
}
|
|
358
|
-
async
|
|
335
|
+
async updateObject(spaceId, location, channelId, conversationId, interactionId, options) {
|
|
359
336
|
const mutation = `
|
|
360
|
-
mutation
|
|
361
|
-
|
|
362
|
-
|
|
337
|
+
mutation UpdateObject($spaceId: String!, $location: String!, $patch: JSON, $prompt: String, $channelId: String!, $conversationId: String!, $interactionId: String!, $ephemeral: Boolean!, $parentInteractionId: String) {
|
|
338
|
+
updateObject(spaceId: $spaceId, location: $location, patch: $patch, prompt: $prompt, channelId: $channelId, conversationId: $conversationId, interactionId: $interactionId, ephemeral: $ephemeral, parentInteractionId: $parentInteractionId) {
|
|
339
|
+
location
|
|
340
|
+
object { ${SPACE_OBJECT_FIELDS} }
|
|
363
341
|
message
|
|
364
342
|
}
|
|
365
343
|
}
|
|
366
344
|
`;
|
|
367
345
|
const result = await this.request(mutation, {
|
|
368
346
|
spaceId,
|
|
369
|
-
|
|
347
|
+
location,
|
|
348
|
+
patch: options?.patch,
|
|
349
|
+
prompt: options?.prompt,
|
|
370
350
|
channelId,
|
|
371
351
|
conversationId,
|
|
372
|
-
ephemeral,
|
|
373
352
|
interactionId,
|
|
353
|
+
ephemeral: options?.ephemeral ?? false,
|
|
354
|
+
parentInteractionId: options?.parentInteractionId,
|
|
374
355
|
});
|
|
375
|
-
return result.
|
|
356
|
+
return result.updateObject;
|
|
376
357
|
}
|
|
377
|
-
async
|
|
358
|
+
async moveObject(spaceId, from, to, channelId, conversationId, interactionId, options) {
|
|
378
359
|
const mutation = `
|
|
379
|
-
mutation
|
|
380
|
-
|
|
381
|
-
|
|
360
|
+
mutation MoveObject($spaceId: String!, $from: String!, $to: String!, $body: JSON, $channelId: String!, $conversationId: String!, $interactionId: String!, $ephemeral: Boolean!, $parentInteractionId: String) {
|
|
361
|
+
moveObject(spaceId: $spaceId, from: $from, to: $to, body: $body, channelId: $channelId, conversationId: $conversationId, interactionId: $interactionId, ephemeral: $ephemeral, parentInteractionId: $parentInteractionId) {
|
|
362
|
+
location
|
|
363
|
+
object { ${SPACE_OBJECT_FIELDS} }
|
|
382
364
|
message
|
|
383
365
|
}
|
|
384
366
|
}
|
|
385
367
|
`;
|
|
386
368
|
const result = await this.request(mutation, {
|
|
387
369
|
spaceId,
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
370
|
+
from,
|
|
371
|
+
to,
|
|
372
|
+
body: options?.body,
|
|
391
373
|
channelId,
|
|
392
374
|
conversationId,
|
|
393
|
-
ephemeral,
|
|
394
375
|
interactionId,
|
|
376
|
+
ephemeral: options?.ephemeral ?? false,
|
|
377
|
+
parentInteractionId: options?.parentInteractionId,
|
|
395
378
|
});
|
|
396
|
-
return result.
|
|
379
|
+
return result.moveObject;
|
|
397
380
|
}
|
|
398
|
-
async getObject(spaceId,
|
|
381
|
+
async getObject(spaceId, location) {
|
|
399
382
|
const query = `
|
|
400
|
-
query GetObject($spaceId: String!, $
|
|
401
|
-
getObject(spaceId: $spaceId,
|
|
383
|
+
query GetObject($spaceId: String!, $location: String!) {
|
|
384
|
+
getObject(spaceId: $spaceId, location: $location) { ${SPACE_OBJECT_FIELDS} }
|
|
402
385
|
}
|
|
403
386
|
`;
|
|
404
|
-
const result = await this.request(query, {
|
|
405
|
-
spaceId,
|
|
406
|
-
objectId,
|
|
407
|
-
});
|
|
387
|
+
const result = await this.request(query, { spaceId, location });
|
|
408
388
|
return result.getObject ?? undefined;
|
|
409
389
|
}
|
|
410
390
|
async findObjects(spaceId, options, channelId, conversationId) {
|
|
411
391
|
const query = `
|
|
412
|
-
query FindObjects($spaceId: String!, $where:
|
|
413
|
-
findObjects(spaceId: $spaceId, where: $where, collection: $collection, prompt: $prompt, limit: $limit,
|
|
414
|
-
objects
|
|
392
|
+
query FindObjects($spaceId: String!, $where: JSON, $collection: String, $prompt: String, $limit: Int, $locations: [String!]!, $order: String, $channelId: String!, $conversationId: String!, $ephemeral: Boolean!) {
|
|
393
|
+
findObjects(spaceId: $spaceId, where: $where, collection: $collection, prompt: $prompt, limit: $limit, locations: $locations, order: $order, channelId: $channelId, conversationId: $conversationId, ephemeral: $ephemeral) {
|
|
394
|
+
objects { ${SPACE_OBJECT_FIELDS} }
|
|
415
395
|
message
|
|
416
396
|
}
|
|
417
397
|
}
|
|
418
398
|
`;
|
|
419
399
|
const result = await this.request(query, {
|
|
420
400
|
spaceId,
|
|
421
|
-
where: options.where
|
|
401
|
+
where: options.where,
|
|
422
402
|
collection: options.collection,
|
|
423
403
|
prompt: options.prompt,
|
|
424
404
|
limit: options.limit,
|
|
425
|
-
|
|
405
|
+
locations: options.locations ?? [],
|
|
426
406
|
order: options.order,
|
|
427
407
|
channelId,
|
|
428
408
|
conversationId,
|
|
429
|
-
ephemeral: options.ephemeral,
|
|
409
|
+
ephemeral: options.ephemeral ?? false,
|
|
430
410
|
});
|
|
431
|
-
return
|
|
432
|
-
objects: JSON.parse(result.findObjects.objects),
|
|
433
|
-
message: result.findObjects.message,
|
|
434
|
-
};
|
|
411
|
+
return result.findObjects;
|
|
435
412
|
}
|
|
436
413
|
async prompt(spaceId, prompt, channelId, conversationId, options) {
|
|
437
414
|
const mutation = `
|
|
438
|
-
mutation Prompt($spaceId: String!, $prompt: String!, $
|
|
439
|
-
prompt(spaceId: $spaceId, prompt: $prompt,
|
|
415
|
+
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, $eventName: String!) {
|
|
416
|
+
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, eventName: $eventName) {
|
|
440
417
|
message
|
|
441
|
-
|
|
418
|
+
modifiedObjectLocations
|
|
442
419
|
}
|
|
443
420
|
}
|
|
444
421
|
`;
|
|
445
422
|
const response = await this.request(mutation, {
|
|
446
423
|
spaceId,
|
|
447
424
|
prompt,
|
|
448
|
-
|
|
425
|
+
locations: options.locations ?? [],
|
|
449
426
|
responseSchema: options.responseSchema,
|
|
450
427
|
channelId,
|
|
451
428
|
conversationId,
|
|
452
|
-
effort: options.effort,
|
|
453
|
-
ephemeral: options.ephemeral,
|
|
454
|
-
readOnly: options.readOnly,
|
|
455
|
-
attachments: options.
|
|
429
|
+
effort: options.effort ?? 'STANDARD',
|
|
430
|
+
ephemeral: options.ephemeral ?? false,
|
|
431
|
+
readOnly: options.readOnly ?? false,
|
|
432
|
+
attachments: options.attachmentRefs ?? [],
|
|
456
433
|
interactionId: options.interactionId,
|
|
457
434
|
parentInteractionId: options.parentInteractionId,
|
|
435
|
+
eventName: options.eventName ?? 'prompt_user',
|
|
458
436
|
});
|
|
459
437
|
return response.prompt;
|
|
460
438
|
}
|
|
@@ -514,6 +492,14 @@ export class GraphQLClient {
|
|
|
514
492
|
const response = await this.request(mutation, { input });
|
|
515
493
|
return response.updateCurrentUser;
|
|
516
494
|
}
|
|
495
|
+
async deleteCurrentUser() {
|
|
496
|
+
const mutation = `
|
|
497
|
+
mutation DeleteCurrentUser {
|
|
498
|
+
deleteCurrentUser
|
|
499
|
+
}
|
|
500
|
+
`;
|
|
501
|
+
await this.request(mutation);
|
|
502
|
+
}
|
|
517
503
|
async findExtensions(options) {
|
|
518
504
|
const query = `
|
|
519
505
|
query FindExtensions($query: String, $limit: Int) {
|