@anticeil/sdk 1.0.0 → 1.1.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/index.d.mts +170 -73
- package/dist/index.d.ts +170 -73
- package/dist/index.js +190 -117
- package/dist/index.mjs +190 -117
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -10,6 +10,7 @@ interface Colony {
|
|
|
10
10
|
name: string;
|
|
11
11
|
icon?: string;
|
|
12
12
|
description?: string;
|
|
13
|
+
category?: string;
|
|
13
14
|
ownerId?: string;
|
|
14
15
|
visibility?: 'public' | 'private';
|
|
15
16
|
accessSettings?: ColonyAccessSettings;
|
|
@@ -31,12 +32,19 @@ interface Channel {
|
|
|
31
32
|
id: string;
|
|
32
33
|
colonyId: string;
|
|
33
34
|
name: string;
|
|
34
|
-
type: 'text' | 'voice' | 'kanban' | 'activity';
|
|
35
|
+
type: 'text' | 'voice' | 'announcement' | 'kanban' | 'forum' | 'activity';
|
|
35
36
|
topic?: string;
|
|
36
37
|
isPrivate?: boolean;
|
|
37
38
|
categoryId?: string;
|
|
38
39
|
position?: number;
|
|
39
40
|
}
|
|
41
|
+
interface Thread {
|
|
42
|
+
id: string;
|
|
43
|
+
channelId: string;
|
|
44
|
+
name: string;
|
|
45
|
+
messageId?: string;
|
|
46
|
+
createdAt?: string;
|
|
47
|
+
}
|
|
40
48
|
interface User {
|
|
41
49
|
id: string;
|
|
42
50
|
name: string;
|
|
@@ -56,24 +64,79 @@ interface Message {
|
|
|
56
64
|
senderName: string;
|
|
57
65
|
senderAvatar?: string;
|
|
58
66
|
senderRole?: string;
|
|
59
|
-
attachments?:
|
|
67
|
+
attachments?: any[];
|
|
60
68
|
replyToId?: string;
|
|
61
69
|
createdAt: string;
|
|
62
70
|
}
|
|
63
71
|
interface SendMessageOptions {
|
|
64
72
|
content: string;
|
|
65
|
-
attachments?:
|
|
73
|
+
attachments?: any[];
|
|
66
74
|
replyToId?: string;
|
|
67
75
|
}
|
|
76
|
+
interface Role {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
color?: string;
|
|
80
|
+
permissions?: string[];
|
|
81
|
+
}
|
|
82
|
+
interface KanbanTask {
|
|
83
|
+
id: string;
|
|
84
|
+
title: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
columnId: 'todo' | 'in_progress' | 'review' | 'done';
|
|
87
|
+
priority: 'low' | 'medium' | 'high' | 'urgent';
|
|
88
|
+
colonyId?: string;
|
|
89
|
+
channelId?: string;
|
|
90
|
+
assigneeName?: string;
|
|
91
|
+
dueDate?: string;
|
|
92
|
+
createdAt?: string;
|
|
93
|
+
}
|
|
94
|
+
interface CalendarEvent {
|
|
95
|
+
id: string;
|
|
96
|
+
title: string;
|
|
97
|
+
description?: string;
|
|
98
|
+
startTime: string;
|
|
99
|
+
endTime?: string;
|
|
100
|
+
colonyId?: string;
|
|
101
|
+
location?: string;
|
|
102
|
+
}
|
|
103
|
+
interface AppCatalogItem {
|
|
104
|
+
id: string;
|
|
105
|
+
title: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
category?: string;
|
|
108
|
+
developer?: string;
|
|
109
|
+
launchUrl?: string;
|
|
110
|
+
}
|
|
111
|
+
interface QuestItem {
|
|
112
|
+
id: string;
|
|
113
|
+
title: string;
|
|
114
|
+
description?: string;
|
|
115
|
+
reward?: string;
|
|
116
|
+
isActive?: boolean;
|
|
117
|
+
}
|
|
68
118
|
interface WebhookPayload {
|
|
69
119
|
username?: string;
|
|
120
|
+
avatarUrl?: string;
|
|
70
121
|
avatar_url?: string;
|
|
71
|
-
content
|
|
72
|
-
|
|
122
|
+
content?: string;
|
|
123
|
+
embeds?: Array<{
|
|
124
|
+
title?: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
color?: string;
|
|
127
|
+
fields?: Array<{
|
|
128
|
+
name: string;
|
|
129
|
+
value: string;
|
|
130
|
+
inline?: boolean;
|
|
131
|
+
}>;
|
|
132
|
+
}>;
|
|
133
|
+
attachments?: any[];
|
|
73
134
|
}
|
|
74
135
|
interface ActivityLaunchOptions {
|
|
75
136
|
channelId: string;
|
|
76
|
-
|
|
137
|
+
type?: string;
|
|
138
|
+
activityId?: string;
|
|
139
|
+
title?: string;
|
|
77
140
|
data?: Record<string, any>;
|
|
78
141
|
}
|
|
79
142
|
|
|
@@ -83,73 +146,24 @@ declare class AnticeilClient {
|
|
|
83
146
|
private socket;
|
|
84
147
|
private eventHandlers;
|
|
85
148
|
constructor(config?: AnticeilConfig);
|
|
86
|
-
/**
|
|
87
|
-
* Connect to the Anticeil WebSocket real-time gateway
|
|
88
|
-
*/
|
|
89
149
|
connect(): void;
|
|
90
|
-
/**
|
|
91
|
-
* Disconnect from the WebSocket real-time gateway
|
|
92
|
-
*/
|
|
93
150
|
disconnect(): void;
|
|
94
|
-
/**
|
|
95
|
-
* Register an event listener (e.g. 'message', 'typing', 'connect', 'disconnect')
|
|
96
|
-
*/
|
|
97
151
|
on<T = any>(event: string, handler: EventHandler<T>): this;
|
|
98
|
-
/**
|
|
99
|
-
* Remove an event listener
|
|
100
|
-
*/
|
|
101
152
|
off<T = any>(event: string, handler: EventHandler<T>): this;
|
|
102
153
|
private emitInternal;
|
|
103
|
-
/**
|
|
104
|
-
* Internal REST fetch helper
|
|
105
|
-
*/
|
|
106
154
|
private request;
|
|
107
|
-
messages: {
|
|
108
|
-
/**
|
|
109
|
-
* Send a text message to a channel
|
|
110
|
-
*/
|
|
111
|
-
send: (channelId: string, options: string | SendMessageOptions) => Promise<Message>;
|
|
112
|
-
/**
|
|
113
|
-
* Fetch recent messages from a channel
|
|
114
|
-
*/
|
|
115
|
-
list: (channelId: string, limit?: number) => Promise<Message[]>;
|
|
116
|
-
/**
|
|
117
|
-
* Delete a message by ID
|
|
118
|
-
*/
|
|
119
|
-
delete: (channelId: string, messageId: string) => Promise<{
|
|
120
|
-
success: boolean;
|
|
121
|
-
}>;
|
|
122
|
-
};
|
|
123
|
-
channels: {
|
|
124
|
-
/**
|
|
125
|
-
* Get details of a channel
|
|
126
|
-
*/
|
|
127
|
-
get: (channelId: string) => Promise<Channel>;
|
|
128
|
-
/**
|
|
129
|
-
* List all channels within a colony
|
|
130
|
-
*/
|
|
131
|
-
list: (colonyId: string) => Promise<Channel[]>;
|
|
132
|
-
/**
|
|
133
|
-
* Create a new channel
|
|
134
|
-
*/
|
|
135
|
-
create: (colonyId: string, data: Partial<Channel>) => Promise<Channel>;
|
|
136
|
-
};
|
|
137
155
|
colonies: {
|
|
138
|
-
/**
|
|
139
|
-
* List colonies that the authenticated user/bot belongs to
|
|
140
|
-
*/
|
|
141
156
|
list: () => Promise<Colony[]>;
|
|
142
|
-
/**
|
|
143
|
-
* Get details of a colony
|
|
144
|
-
*/
|
|
145
157
|
get: (colonyId: string) => Promise<Colony>;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
158
|
+
create: (data: {
|
|
159
|
+
name: string;
|
|
160
|
+
description?: string;
|
|
161
|
+
category?: string;
|
|
162
|
+
}) => Promise<Colony>;
|
|
149
163
|
update: (colonyId: string, updates: Partial<Colony>) => Promise<Colony>;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
164
|
+
delete: (colonyId: string) => Promise<{
|
|
165
|
+
success: boolean;
|
|
166
|
+
}>;
|
|
153
167
|
setPrivacy: (colonyId: string, joinMethod: "invite_only" | "apply" | "discoverable", options?: {
|
|
154
168
|
rulesEnabled?: boolean;
|
|
155
169
|
screeningQuestions?: Array<{
|
|
@@ -158,24 +172,107 @@ declare class AnticeilClient {
|
|
|
158
172
|
required?: boolean;
|
|
159
173
|
}>;
|
|
160
174
|
}) => Promise<Colony>;
|
|
175
|
+
getInsights: (colonyId: string) => Promise<Record<string, any>>;
|
|
161
176
|
};
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
177
|
+
channels: {
|
|
178
|
+
get: (channelId: string) => Promise<Channel>;
|
|
179
|
+
list: (colonyId: string) => Promise<Channel[]>;
|
|
180
|
+
create: (colonyId: string, data: Partial<Channel>) => Promise<Channel>;
|
|
181
|
+
update: (channelId: string, updates: Partial<Channel>) => Promise<Channel>;
|
|
182
|
+
delete: (channelId: string) => Promise<{
|
|
183
|
+
success: boolean;
|
|
184
|
+
}>;
|
|
185
|
+
};
|
|
186
|
+
messages: {
|
|
187
|
+
send: (channelId: string, options: string | SendMessageOptions) => Promise<Message>;
|
|
188
|
+
list: (channelId: string, limit?: number) => Promise<Message[]>;
|
|
189
|
+
delete: (channelId: string, messageId: string) => Promise<{
|
|
190
|
+
success: boolean;
|
|
191
|
+
}>;
|
|
192
|
+
toggleReaction: (messageId: string, emoji: string) => Promise<{
|
|
193
|
+
success: boolean;
|
|
194
|
+
}>;
|
|
195
|
+
togglePin: (messageId: string, channelId?: string) => Promise<{
|
|
196
|
+
success: boolean;
|
|
197
|
+
}>;
|
|
198
|
+
};
|
|
199
|
+
threads: {
|
|
200
|
+
list: (channelId: string) => Promise<Thread[]>;
|
|
201
|
+
create: (channelId: string, data: {
|
|
202
|
+
name: string;
|
|
203
|
+
messageId?: string;
|
|
204
|
+
}) => Promise<Thread>;
|
|
205
|
+
};
|
|
206
|
+
friends: {
|
|
207
|
+
list: () => Promise<any[]>;
|
|
208
|
+
sendRequest: (target: string) => Promise<{
|
|
209
|
+
success: boolean;
|
|
210
|
+
}>;
|
|
211
|
+
listMessageRequests: () => Promise<any[]>;
|
|
212
|
+
respondMessageRequest: (requestId: string, action: "accept" | "ignore" | "spam") => Promise<{
|
|
213
|
+
success: boolean;
|
|
214
|
+
}>;
|
|
215
|
+
};
|
|
216
|
+
members: {
|
|
217
|
+
list: (colonyId?: string) => Promise<User[]>;
|
|
218
|
+
listRoles: (colonyId: string) => Promise<Role[]>;
|
|
219
|
+
updateRole: (colonyId: string, userId: string, roleId: string) => Promise<{
|
|
220
|
+
success: boolean;
|
|
221
|
+
}>;
|
|
222
|
+
ban: (colonyId: string, userId: string, reason?: string) => Promise<{
|
|
223
|
+
success: boolean;
|
|
224
|
+
}>;
|
|
225
|
+
unban: (colonyId: string, userId: string) => Promise<{
|
|
226
|
+
success: boolean;
|
|
227
|
+
}>;
|
|
228
|
+
getAuditLogs: (colonyId: string) => Promise<any[]>;
|
|
229
|
+
};
|
|
230
|
+
tasks: {
|
|
231
|
+
list: (filters?: {
|
|
232
|
+
colonyId?: string;
|
|
233
|
+
channelId?: string;
|
|
234
|
+
}) => Promise<KanbanTask[]>;
|
|
235
|
+
create: (data: Partial<KanbanTask> & {
|
|
236
|
+
title: string;
|
|
237
|
+
}) => Promise<KanbanTask>;
|
|
238
|
+
update: (taskId: string, updates: Partial<KanbanTask>) => Promise<KanbanTask>;
|
|
239
|
+
delete: (taskId: string) => Promise<{
|
|
240
|
+
success: boolean;
|
|
241
|
+
}>;
|
|
242
|
+
};
|
|
243
|
+
events: {
|
|
244
|
+
list: (colonyId?: string) => Promise<CalendarEvent[]>;
|
|
245
|
+
create: (data: Omit<CalendarEvent, "id">) => Promise<CalendarEvent>;
|
|
246
|
+
update: (eventId: string, updates: Partial<CalendarEvent>) => Promise<CalendarEvent>;
|
|
247
|
+
delete: (eventId: string) => Promise<{
|
|
248
|
+
success: boolean;
|
|
249
|
+
}>;
|
|
250
|
+
};
|
|
251
|
+
apps: {
|
|
252
|
+
list: () => Promise<AppCatalogItem[]>;
|
|
253
|
+
install: (colonyId: string, appId: string) => Promise<{
|
|
167
254
|
success: boolean;
|
|
168
255
|
}>;
|
|
169
256
|
};
|
|
170
257
|
activities: {
|
|
171
|
-
/**
|
|
172
|
-
* Launch a voice activity (YouTube Watch Together, Chess, Whiteboard)
|
|
173
|
-
*/
|
|
174
258
|
launch: (options: ActivityLaunchOptions) => Promise<{
|
|
175
259
|
success: boolean;
|
|
176
|
-
activityUrl
|
|
260
|
+
activityUrl?: string;
|
|
261
|
+
}>;
|
|
262
|
+
};
|
|
263
|
+
quests: {
|
|
264
|
+
list: () => Promise<QuestItem[]>;
|
|
265
|
+
create: (data: Omit<QuestItem, "id">) => Promise<QuestItem>;
|
|
266
|
+
update: (questId: string, updates: Partial<QuestItem>) => Promise<QuestItem>;
|
|
267
|
+
delete: (questId: string) => Promise<{
|
|
268
|
+
success: boolean;
|
|
269
|
+
}>;
|
|
270
|
+
};
|
|
271
|
+
webhooks: {
|
|
272
|
+
send: (webhookUrl: string, payload: WebhookPayload) => Promise<{
|
|
273
|
+
success: boolean;
|
|
177
274
|
}>;
|
|
178
275
|
};
|
|
179
276
|
}
|
|
180
277
|
|
|
181
|
-
export { type ActivityLaunchOptions, AnticeilClient, type AnticeilConfig, type Channel, type Colony, type ColonyAccessSettings, type Message, type SendMessageOptions, type User, type WebhookPayload };
|
|
278
|
+
export { type ActivityLaunchOptions, AnticeilClient, type AnticeilConfig, type AppCatalogItem, type CalendarEvent, type Channel, type Colony, type ColonyAccessSettings, type KanbanTask, type Message, type QuestItem, type Role, type SendMessageOptions, type Thread, type User, type WebhookPayload };
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ interface Colony {
|
|
|
10
10
|
name: string;
|
|
11
11
|
icon?: string;
|
|
12
12
|
description?: string;
|
|
13
|
+
category?: string;
|
|
13
14
|
ownerId?: string;
|
|
14
15
|
visibility?: 'public' | 'private';
|
|
15
16
|
accessSettings?: ColonyAccessSettings;
|
|
@@ -31,12 +32,19 @@ interface Channel {
|
|
|
31
32
|
id: string;
|
|
32
33
|
colonyId: string;
|
|
33
34
|
name: string;
|
|
34
|
-
type: 'text' | 'voice' | 'kanban' | 'activity';
|
|
35
|
+
type: 'text' | 'voice' | 'announcement' | 'kanban' | 'forum' | 'activity';
|
|
35
36
|
topic?: string;
|
|
36
37
|
isPrivate?: boolean;
|
|
37
38
|
categoryId?: string;
|
|
38
39
|
position?: number;
|
|
39
40
|
}
|
|
41
|
+
interface Thread {
|
|
42
|
+
id: string;
|
|
43
|
+
channelId: string;
|
|
44
|
+
name: string;
|
|
45
|
+
messageId?: string;
|
|
46
|
+
createdAt?: string;
|
|
47
|
+
}
|
|
40
48
|
interface User {
|
|
41
49
|
id: string;
|
|
42
50
|
name: string;
|
|
@@ -56,24 +64,79 @@ interface Message {
|
|
|
56
64
|
senderName: string;
|
|
57
65
|
senderAvatar?: string;
|
|
58
66
|
senderRole?: string;
|
|
59
|
-
attachments?:
|
|
67
|
+
attachments?: any[];
|
|
60
68
|
replyToId?: string;
|
|
61
69
|
createdAt: string;
|
|
62
70
|
}
|
|
63
71
|
interface SendMessageOptions {
|
|
64
72
|
content: string;
|
|
65
|
-
attachments?:
|
|
73
|
+
attachments?: any[];
|
|
66
74
|
replyToId?: string;
|
|
67
75
|
}
|
|
76
|
+
interface Role {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
color?: string;
|
|
80
|
+
permissions?: string[];
|
|
81
|
+
}
|
|
82
|
+
interface KanbanTask {
|
|
83
|
+
id: string;
|
|
84
|
+
title: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
columnId: 'todo' | 'in_progress' | 'review' | 'done';
|
|
87
|
+
priority: 'low' | 'medium' | 'high' | 'urgent';
|
|
88
|
+
colonyId?: string;
|
|
89
|
+
channelId?: string;
|
|
90
|
+
assigneeName?: string;
|
|
91
|
+
dueDate?: string;
|
|
92
|
+
createdAt?: string;
|
|
93
|
+
}
|
|
94
|
+
interface CalendarEvent {
|
|
95
|
+
id: string;
|
|
96
|
+
title: string;
|
|
97
|
+
description?: string;
|
|
98
|
+
startTime: string;
|
|
99
|
+
endTime?: string;
|
|
100
|
+
colonyId?: string;
|
|
101
|
+
location?: string;
|
|
102
|
+
}
|
|
103
|
+
interface AppCatalogItem {
|
|
104
|
+
id: string;
|
|
105
|
+
title: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
category?: string;
|
|
108
|
+
developer?: string;
|
|
109
|
+
launchUrl?: string;
|
|
110
|
+
}
|
|
111
|
+
interface QuestItem {
|
|
112
|
+
id: string;
|
|
113
|
+
title: string;
|
|
114
|
+
description?: string;
|
|
115
|
+
reward?: string;
|
|
116
|
+
isActive?: boolean;
|
|
117
|
+
}
|
|
68
118
|
interface WebhookPayload {
|
|
69
119
|
username?: string;
|
|
120
|
+
avatarUrl?: string;
|
|
70
121
|
avatar_url?: string;
|
|
71
|
-
content
|
|
72
|
-
|
|
122
|
+
content?: string;
|
|
123
|
+
embeds?: Array<{
|
|
124
|
+
title?: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
color?: string;
|
|
127
|
+
fields?: Array<{
|
|
128
|
+
name: string;
|
|
129
|
+
value: string;
|
|
130
|
+
inline?: boolean;
|
|
131
|
+
}>;
|
|
132
|
+
}>;
|
|
133
|
+
attachments?: any[];
|
|
73
134
|
}
|
|
74
135
|
interface ActivityLaunchOptions {
|
|
75
136
|
channelId: string;
|
|
76
|
-
|
|
137
|
+
type?: string;
|
|
138
|
+
activityId?: string;
|
|
139
|
+
title?: string;
|
|
77
140
|
data?: Record<string, any>;
|
|
78
141
|
}
|
|
79
142
|
|
|
@@ -83,73 +146,24 @@ declare class AnticeilClient {
|
|
|
83
146
|
private socket;
|
|
84
147
|
private eventHandlers;
|
|
85
148
|
constructor(config?: AnticeilConfig);
|
|
86
|
-
/**
|
|
87
|
-
* Connect to the Anticeil WebSocket real-time gateway
|
|
88
|
-
*/
|
|
89
149
|
connect(): void;
|
|
90
|
-
/**
|
|
91
|
-
* Disconnect from the WebSocket real-time gateway
|
|
92
|
-
*/
|
|
93
150
|
disconnect(): void;
|
|
94
|
-
/**
|
|
95
|
-
* Register an event listener (e.g. 'message', 'typing', 'connect', 'disconnect')
|
|
96
|
-
*/
|
|
97
151
|
on<T = any>(event: string, handler: EventHandler<T>): this;
|
|
98
|
-
/**
|
|
99
|
-
* Remove an event listener
|
|
100
|
-
*/
|
|
101
152
|
off<T = any>(event: string, handler: EventHandler<T>): this;
|
|
102
153
|
private emitInternal;
|
|
103
|
-
/**
|
|
104
|
-
* Internal REST fetch helper
|
|
105
|
-
*/
|
|
106
154
|
private request;
|
|
107
|
-
messages: {
|
|
108
|
-
/**
|
|
109
|
-
* Send a text message to a channel
|
|
110
|
-
*/
|
|
111
|
-
send: (channelId: string, options: string | SendMessageOptions) => Promise<Message>;
|
|
112
|
-
/**
|
|
113
|
-
* Fetch recent messages from a channel
|
|
114
|
-
*/
|
|
115
|
-
list: (channelId: string, limit?: number) => Promise<Message[]>;
|
|
116
|
-
/**
|
|
117
|
-
* Delete a message by ID
|
|
118
|
-
*/
|
|
119
|
-
delete: (channelId: string, messageId: string) => Promise<{
|
|
120
|
-
success: boolean;
|
|
121
|
-
}>;
|
|
122
|
-
};
|
|
123
|
-
channels: {
|
|
124
|
-
/**
|
|
125
|
-
* Get details of a channel
|
|
126
|
-
*/
|
|
127
|
-
get: (channelId: string) => Promise<Channel>;
|
|
128
|
-
/**
|
|
129
|
-
* List all channels within a colony
|
|
130
|
-
*/
|
|
131
|
-
list: (colonyId: string) => Promise<Channel[]>;
|
|
132
|
-
/**
|
|
133
|
-
* Create a new channel
|
|
134
|
-
*/
|
|
135
|
-
create: (colonyId: string, data: Partial<Channel>) => Promise<Channel>;
|
|
136
|
-
};
|
|
137
155
|
colonies: {
|
|
138
|
-
/**
|
|
139
|
-
* List colonies that the authenticated user/bot belongs to
|
|
140
|
-
*/
|
|
141
156
|
list: () => Promise<Colony[]>;
|
|
142
|
-
/**
|
|
143
|
-
* Get details of a colony
|
|
144
|
-
*/
|
|
145
157
|
get: (colonyId: string) => Promise<Colony>;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
158
|
+
create: (data: {
|
|
159
|
+
name: string;
|
|
160
|
+
description?: string;
|
|
161
|
+
category?: string;
|
|
162
|
+
}) => Promise<Colony>;
|
|
149
163
|
update: (colonyId: string, updates: Partial<Colony>) => Promise<Colony>;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
164
|
+
delete: (colonyId: string) => Promise<{
|
|
165
|
+
success: boolean;
|
|
166
|
+
}>;
|
|
153
167
|
setPrivacy: (colonyId: string, joinMethod: "invite_only" | "apply" | "discoverable", options?: {
|
|
154
168
|
rulesEnabled?: boolean;
|
|
155
169
|
screeningQuestions?: Array<{
|
|
@@ -158,24 +172,107 @@ declare class AnticeilClient {
|
|
|
158
172
|
required?: boolean;
|
|
159
173
|
}>;
|
|
160
174
|
}) => Promise<Colony>;
|
|
175
|
+
getInsights: (colonyId: string) => Promise<Record<string, any>>;
|
|
161
176
|
};
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
177
|
+
channels: {
|
|
178
|
+
get: (channelId: string) => Promise<Channel>;
|
|
179
|
+
list: (colonyId: string) => Promise<Channel[]>;
|
|
180
|
+
create: (colonyId: string, data: Partial<Channel>) => Promise<Channel>;
|
|
181
|
+
update: (channelId: string, updates: Partial<Channel>) => Promise<Channel>;
|
|
182
|
+
delete: (channelId: string) => Promise<{
|
|
183
|
+
success: boolean;
|
|
184
|
+
}>;
|
|
185
|
+
};
|
|
186
|
+
messages: {
|
|
187
|
+
send: (channelId: string, options: string | SendMessageOptions) => Promise<Message>;
|
|
188
|
+
list: (channelId: string, limit?: number) => Promise<Message[]>;
|
|
189
|
+
delete: (channelId: string, messageId: string) => Promise<{
|
|
190
|
+
success: boolean;
|
|
191
|
+
}>;
|
|
192
|
+
toggleReaction: (messageId: string, emoji: string) => Promise<{
|
|
193
|
+
success: boolean;
|
|
194
|
+
}>;
|
|
195
|
+
togglePin: (messageId: string, channelId?: string) => Promise<{
|
|
196
|
+
success: boolean;
|
|
197
|
+
}>;
|
|
198
|
+
};
|
|
199
|
+
threads: {
|
|
200
|
+
list: (channelId: string) => Promise<Thread[]>;
|
|
201
|
+
create: (channelId: string, data: {
|
|
202
|
+
name: string;
|
|
203
|
+
messageId?: string;
|
|
204
|
+
}) => Promise<Thread>;
|
|
205
|
+
};
|
|
206
|
+
friends: {
|
|
207
|
+
list: () => Promise<any[]>;
|
|
208
|
+
sendRequest: (target: string) => Promise<{
|
|
209
|
+
success: boolean;
|
|
210
|
+
}>;
|
|
211
|
+
listMessageRequests: () => Promise<any[]>;
|
|
212
|
+
respondMessageRequest: (requestId: string, action: "accept" | "ignore" | "spam") => Promise<{
|
|
213
|
+
success: boolean;
|
|
214
|
+
}>;
|
|
215
|
+
};
|
|
216
|
+
members: {
|
|
217
|
+
list: (colonyId?: string) => Promise<User[]>;
|
|
218
|
+
listRoles: (colonyId: string) => Promise<Role[]>;
|
|
219
|
+
updateRole: (colonyId: string, userId: string, roleId: string) => Promise<{
|
|
220
|
+
success: boolean;
|
|
221
|
+
}>;
|
|
222
|
+
ban: (colonyId: string, userId: string, reason?: string) => Promise<{
|
|
223
|
+
success: boolean;
|
|
224
|
+
}>;
|
|
225
|
+
unban: (colonyId: string, userId: string) => Promise<{
|
|
226
|
+
success: boolean;
|
|
227
|
+
}>;
|
|
228
|
+
getAuditLogs: (colonyId: string) => Promise<any[]>;
|
|
229
|
+
};
|
|
230
|
+
tasks: {
|
|
231
|
+
list: (filters?: {
|
|
232
|
+
colonyId?: string;
|
|
233
|
+
channelId?: string;
|
|
234
|
+
}) => Promise<KanbanTask[]>;
|
|
235
|
+
create: (data: Partial<KanbanTask> & {
|
|
236
|
+
title: string;
|
|
237
|
+
}) => Promise<KanbanTask>;
|
|
238
|
+
update: (taskId: string, updates: Partial<KanbanTask>) => Promise<KanbanTask>;
|
|
239
|
+
delete: (taskId: string) => Promise<{
|
|
240
|
+
success: boolean;
|
|
241
|
+
}>;
|
|
242
|
+
};
|
|
243
|
+
events: {
|
|
244
|
+
list: (colonyId?: string) => Promise<CalendarEvent[]>;
|
|
245
|
+
create: (data: Omit<CalendarEvent, "id">) => Promise<CalendarEvent>;
|
|
246
|
+
update: (eventId: string, updates: Partial<CalendarEvent>) => Promise<CalendarEvent>;
|
|
247
|
+
delete: (eventId: string) => Promise<{
|
|
248
|
+
success: boolean;
|
|
249
|
+
}>;
|
|
250
|
+
};
|
|
251
|
+
apps: {
|
|
252
|
+
list: () => Promise<AppCatalogItem[]>;
|
|
253
|
+
install: (colonyId: string, appId: string) => Promise<{
|
|
167
254
|
success: boolean;
|
|
168
255
|
}>;
|
|
169
256
|
};
|
|
170
257
|
activities: {
|
|
171
|
-
/**
|
|
172
|
-
* Launch a voice activity (YouTube Watch Together, Chess, Whiteboard)
|
|
173
|
-
*/
|
|
174
258
|
launch: (options: ActivityLaunchOptions) => Promise<{
|
|
175
259
|
success: boolean;
|
|
176
|
-
activityUrl
|
|
260
|
+
activityUrl?: string;
|
|
261
|
+
}>;
|
|
262
|
+
};
|
|
263
|
+
quests: {
|
|
264
|
+
list: () => Promise<QuestItem[]>;
|
|
265
|
+
create: (data: Omit<QuestItem, "id">) => Promise<QuestItem>;
|
|
266
|
+
update: (questId: string, updates: Partial<QuestItem>) => Promise<QuestItem>;
|
|
267
|
+
delete: (questId: string) => Promise<{
|
|
268
|
+
success: boolean;
|
|
269
|
+
}>;
|
|
270
|
+
};
|
|
271
|
+
webhooks: {
|
|
272
|
+
send: (webhookUrl: string, payload: WebhookPayload) => Promise<{
|
|
273
|
+
success: boolean;
|
|
177
274
|
}>;
|
|
178
275
|
};
|
|
179
276
|
}
|
|
180
277
|
|
|
181
|
-
export { type ActivityLaunchOptions, AnticeilClient, type AnticeilConfig, type Channel, type Colony, type ColonyAccessSettings, type Message, type SendMessageOptions, type User, type WebhookPayload };
|
|
278
|
+
export { type ActivityLaunchOptions, AnticeilClient, type AnticeilConfig, type AppCatalogItem, type CalendarEvent, type Channel, type Colony, type ColonyAccessSettings, type KanbanTask, type Message, type QuestItem, type Role, type SendMessageOptions, type Thread, type User, type WebhookPayload };
|