@scryme/chat 2.13.3 → 2.15.1

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/sdk.d.ts CHANGED
@@ -1,26 +1,404 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
2
  import { getSkyrmeChatAPI } from './generated/v3-server';
3
- import type { V3ProvisionWorkspaceDto, V3UpdateWorkspaceDto, V3AddMemberDto, V3UpdateMemberRoleDto, CreateWorkspaceChannelDto, UpdateWorkspaceChannelDto, ChannelsControllerGetMessagesParams, ChannelsControllerUpdateMessageBody, ChannelsControllerAddReactionBody, CreateDmDto, UsersControllerSearchUsersParams, DmsControllerGetMessagesParams, V3WorkspacesControllerGetWorkspacesResult, V3WorkspacesControllerGetWorkspaceBySlugResult, V3WorkspacesControllerProvisionWorkspaceResult, V3WorkspacesControllerUpdateWorkspaceResult, V3WorkspacesControllerDeleteWorkspaceResult, V3WorkspacesControllerGetWorkspaceMembersResult, V3WorkspacesControllerAddWorkspaceMemberResult, V3WorkspacesControllerGetWorkspaceMemberResult, V3WorkspacesControllerUpdateWorkspaceMemberResult, V3WorkspacesControllerDeleteWorkspaceMemberResult, ChannelsControllerGetWorkspaceChannelsResult, ChannelsControllerCreateChannelResult, ChannelsControllerGetChannelResult, ChannelsControllerUpdateChannelResult, ChannelsControllerDeleteChannelResult, ChannelsControllerGetMessagesResult, ChannelsControllerCreateMessageResult, ChannelsControllerUpdateMessageResult, ChannelsControllerDeleteMessageResult, ChannelsControllerAddReactionResult, ChannelsControllerRemoveReactionResult, DmsControllerGetDmsResult, DmsControllerCreateDmResult, DmsControllerGetDmResult, DmsControllerDeleteDmResult, DmsControllerGetMessagesResult, DmsControllerCreateMessageResult, UsersControllerGetMeResult, UsersControllerGetUserResult, UsersControllerSearchUsersResult } from './generated/v3-server';
3
+ import type { V3ProvisionWorkspaceDto, V3UpdateWorkspaceDto, V3AddMemberDto, V3UpdateMemberRoleDto, CreateWorkspaceChannelDto, UpdateWorkspaceChannelDto, ChannelsControllerGetMessagesParams, ChannelsControllerUpdateMessageBody, ChannelsControllerAddReactionBody, CreateDmDto, UpdateDmMessageDto, UsersControllerSearchUsersParams, DmsControllerGetMessagesParams, CreateMessageDto, V3CreateWebhookDto, V3UpdateWebhookDto, CreateChannelIncomingWebhookDto, UpdateChannelIncomingWebhookDto, ExecuteChannelIncomingWebhookDto, V3ChannelIncomingWebhooksControllerExecuteWebhookByChannelIdParams, ChannelsControllerAddReactionResult, ChannelsControllerRemoveReactionResult, DmsControllerAddReactionBody, DmsControllerAddReactionResult, DmsControllerRemoveReactionResult, V3WebhooksControllerGetWebhooksResult, V3WebhooksControllerCreateWebhookResult, V3WebhooksControllerGetWebhookResult, V3WebhooksControllerUpdateWebhookResult, V3WebhooksControllerDeleteWebhookResult, V3ChannelIncomingWebhooksControllerGetChannelWebhooksResult, V3ChannelIncomingWebhooksControllerCreateChannelWebhookResult, V3ChannelIncomingWebhooksControllerGetChannelWebhookResult, V3ChannelIncomingWebhooksControllerUpdateChannelWebhookResult, V3ChannelIncomingWebhooksControllerDeleteChannelWebhookResult, V3ChannelIncomingWebhooksControllerExecuteWebhookByUrlTokenResult, V3ChannelIncomingWebhooksControllerExecuteWebhookByChannelIdResult, V3OAuthControllerGetTokenResult } from './generated/v3-server';
4
+ /**
5
+ * Represents a message attachment.
6
+ */
7
+ export interface MessageAttachment {
8
+ id: string;
9
+ messageId?: string | null;
10
+ name: string;
11
+ type: string;
12
+ url: string;
13
+ size?: string | null;
14
+ createdAt: string;
15
+ }
16
+ /**
17
+ * Represents a user reaction to a message.
18
+ */
19
+ export interface MessageReaction {
20
+ id: string;
21
+ messageId: string;
22
+ userId: string;
23
+ emoji: string;
24
+ customEmojiId?: string | null;
25
+ createdAt: string;
26
+ }
27
+ /**
28
+ * Represents a workspace in the Scryme platform (Enterprise M2M API V3).
29
+ */
30
+ export interface V3Workspace {
31
+ /** Unique workspace identifier. */
32
+ id: string;
33
+ /** Display name of the workspace. */
34
+ name: string;
35
+ /** Unique URL-friendly slug representing the workspace. */
36
+ slug: string;
37
+ /** Description of the workspace. */
38
+ description?: string | null;
39
+ /** Icon identifier or URL. */
40
+ icon?: string | null;
41
+ /** Industry categorization of the workspace. */
42
+ industry?: string | null;
43
+ /** Custom branding configuration object. */
44
+ brandingConfig?: Record<string, unknown> | null;
45
+ /** ISO timestamp when the workspace was created. */
46
+ createdAt: string;
47
+ /** ISO timestamp when the workspace was last updated. */
48
+ updatedAt?: string;
49
+ }
50
+ /**
51
+ * Envelope response containing a list of workspaces.
52
+ */
53
+ export interface V3WorkspacesResponse {
54
+ /** Indicates whether the API call was successful. */
55
+ success: boolean;
56
+ /** The payload of the response containing the workspaces. */
57
+ data: {
58
+ /** List of workspaces returned by the API. */
59
+ workspaces: V3Workspace[];
60
+ };
61
+ /** ISO timestamp of when the response was generated. */
62
+ timestamp: string;
63
+ }
64
+ /**
65
+ * Envelope response containing a single workspace.
66
+ */
67
+ export interface V3WorkspaceResponse {
68
+ /** Indicates whether the API call was successful. */
69
+ success: boolean;
70
+ /** The payload of the response containing the workspace. */
71
+ data: {
72
+ /** The retrieved workspace details. */
73
+ workspace: V3Workspace;
74
+ };
75
+ /** ISO timestamp of when the response was generated. */
76
+ timestamp: string;
77
+ }
78
+ /**
79
+ * Envelope response containing provisioned workspace details and its default system bot.
80
+ */
81
+ export interface V3ProvisionWorkspaceResponse {
82
+ /** Indicates whether the API call was successful. */
83
+ success: boolean;
84
+ /** The payload containing details of the newly provisioned workspace and bot. */
85
+ data: {
86
+ /** Basic details of the provisioned workspace. */
87
+ workspace: {
88
+ /** Unique workspace identifier. */
89
+ id: string;
90
+ /** Display name of the workspace. */
91
+ name: string;
92
+ /** Unique slug for the workspace. */
93
+ slug: string;
94
+ };
95
+ /** Details of the automatically generated system bot for the workspace. */
96
+ bot: {
97
+ /** Unique identifier of the bot. */
98
+ id: string;
99
+ /** Client ID used for bot authentication. */
100
+ clientId: string;
101
+ /** Client Secret used for bot authentication. */
102
+ clientSecret: string;
103
+ };
104
+ };
105
+ /** ISO timestamp of when the response was generated. */
106
+ timestamp: string;
107
+ }
108
+ /**
109
+ * Envelope response containing workspace deletion confirmation.
110
+ */
111
+ export interface V3DeleteWorkspaceResponse {
112
+ /** Indicates whether the API call was successful. */
113
+ success: boolean;
114
+ /** The payload indicating deletion status. */
115
+ data: {
116
+ /** True if the workspace was deleted successfully. */
117
+ success: boolean;
118
+ };
119
+ /** ISO timestamp of when the response was generated. */
120
+ timestamp: string;
121
+ }
122
+ /**
123
+ * Details of a member belonging to a workspace.
124
+ */
125
+ export interface V3WorkspaceMember {
126
+ /** Unique membership identifier. */
127
+ id: string;
128
+ /** Unique workspace identifier. */
129
+ workspaceId: string;
130
+ /** Unique user identifier. */
131
+ userId: string;
132
+ /** Associated department identifier if the member is assigned to one. */
133
+ departmentId?: string | null;
134
+ /** The member's role (e.g., owner, admin, moderator, member, guest). */
135
+ role: string;
136
+ /** Type of member (e.g., regular user, bot, guest). */
137
+ memberType: string;
138
+ /** ISO timestamp of when the member joined the workspace. */
139
+ joinedAt: string;
140
+ /** Member's notification preferences. */
141
+ notificationPreference: string;
142
+ /** Nested basic details of the member's user profile. */
143
+ user: {
144
+ /** Unique user identifier. */
145
+ id: string;
146
+ /** Full name of the user. */
147
+ name: string;
148
+ /** Email address of the user. */
149
+ email: string;
150
+ /** URL to the user's avatar image. */
151
+ avatar?: string | null;
152
+ /** Current status message or indicator of the user. */
153
+ status?: string | null;
154
+ };
155
+ }
156
+ /**
157
+ * Envelope response containing a list of workspace members.
158
+ */
159
+ export interface V3WorkspaceMembersResponse {
160
+ /** Indicates whether the API call was successful. */
161
+ success: boolean;
162
+ /** The payload containing workspace members. */
163
+ data: {
164
+ /** List of members belonging to the workspace. */
165
+ members: V3WorkspaceMember[];
166
+ };
167
+ /** ISO timestamp of when the response was generated. */
168
+ timestamp: string;
169
+ }
170
+ /**
171
+ * Envelope response containing a newly added workspace member.
172
+ */
173
+ export interface V3AddWorkspaceMemberResponse {
174
+ /** Indicates whether the API call was successful. */
175
+ success: boolean;
176
+ /** The payload containing the added workspace member. */
177
+ data: {
178
+ /** Details of the added member. */
179
+ member: V3WorkspaceMember;
180
+ };
181
+ /** ISO timestamp of when the response was generated. */
182
+ timestamp: string;
183
+ }
184
+ /**
185
+ * Envelope response containing details of a specific workspace member.
186
+ */
187
+ export interface V3GetWorkspaceMemberResponse {
188
+ /** Indicates whether the API call was successful. */
189
+ success: boolean;
190
+ /** The payload containing the workspace member details. */
191
+ data: {
192
+ /** Details of the workspace member. */
193
+ member: V3WorkspaceMember;
194
+ };
195
+ /** ISO timestamp of when the response was generated. */
196
+ timestamp: string;
197
+ }
198
+ /**
199
+ * Envelope response containing the updated workspace member details.
200
+ */
201
+ export interface V3UpdateWorkspaceMemberResponse {
202
+ /** Indicates whether the API call was successful. */
203
+ success: boolean;
204
+ /** The payload containing the updated workspace member. */
205
+ data: {
206
+ /** Details of the updated member. */
207
+ member: V3WorkspaceMember;
208
+ };
209
+ /** ISO timestamp of when the response was generated. */
210
+ timestamp: string;
211
+ }
212
+ /**
213
+ * Envelope response containing workspace member removal confirmation.
214
+ */
215
+ export interface V3DeleteWorkspaceMemberResponse {
216
+ /** Indicates whether the API call was successful. */
217
+ success: boolean;
218
+ /** The payload indicating deletion status. */
219
+ data: {
220
+ /** True if the workspace member was removed successfully. */
221
+ success: boolean;
222
+ };
223
+ /** ISO timestamp of when the response was generated. */
224
+ timestamp: string;
225
+ }
226
+ /**
227
+ * Represents a channel in a workspace.
228
+ */
229
+ export interface WorkspaceChannel {
230
+ /** Unique channel identifier. */
231
+ id: string;
232
+ /** Display name of the channel. */
233
+ name: string;
234
+ /** Unique URL-friendly slug representing the channel. */
235
+ slug: string;
236
+ /** Optional icon name or identifier for the channel. */
237
+ icon?: string;
238
+ /** Type of the channel. */
239
+ type: 'public' | 'private';
240
+ /** Optional descriptive text about the channel. */
241
+ description?: string | null;
242
+ /** True if the channel is private and restricted. */
243
+ isPrivate: boolean;
244
+ /** Unique workspace identifier. */
245
+ workspaceId: string;
246
+ /** Optional parent channel or category identifier. */
247
+ parentId?: string | null;
248
+ /** ISO timestamp when the channel was created. */
249
+ createdAt: string;
250
+ /** ISO timestamp when the channel was last updated. */
251
+ updatedAt: string;
252
+ /** Unread message count in this channel for the active user. */
253
+ unreadCount?: number;
254
+ /** Mentions count in this channel for the active user. */
255
+ mentionCount?: number;
256
+ }
257
+ /**
258
+ * Represents a message sent to a workspace channel or direct message conversation.
259
+ */
260
+ export interface ChannelMessage {
261
+ /** Unique message identifier. */
262
+ id: string;
263
+ /** The text content of the message. */
264
+ content: string;
265
+ /** ISO timestamp when the message was sent. */
266
+ createdAt: string;
267
+ /** ISO timestamp when the message was last updated. */
268
+ updatedAt: string;
269
+ /** The unique channel identifier if sent within a channel. */
270
+ channelId: string;
271
+ /** Unique identifier of the user who sent the message. */
272
+ userId: string;
273
+ /** Basic profile details of the user who sent the message. */
274
+ user: {
275
+ /** Unique user identifier. */
276
+ id: string;
277
+ /** Display name of the user. */
278
+ name: string;
279
+ /** Username of the user. */
280
+ username?: string;
281
+ /** URL to the user's avatar image. */
282
+ avatar?: string | null;
283
+ };
284
+ /** Optional identifier of the message this message is replying to. */
285
+ replyToId?: string | null;
286
+ /** Optional identifier of the root thread message. */
287
+ threadId?: string | null;
288
+ /** Optional attachments uploaded with the message. */
289
+ attachments?: MessageAttachment[];
290
+ /** Reactions associated with this message. */
291
+ reactions?: MessageReaction[];
292
+ }
293
+ /**
294
+ * Represents a direct message conversation between users.
295
+ */
296
+ export interface DmConversation {
297
+ /** Unique conversation identifier. */
298
+ id: string;
299
+ /** ISO timestamp when the DM conversation was created. */
300
+ createdAt: string;
301
+ /** ISO timestamp when the DM conversation was last updated. */
302
+ updatedAt: string;
303
+ /** List of participant profiles in this conversation. */
304
+ participants: {
305
+ /** Participant record ID. */
306
+ id: string;
307
+ /** Unique user ID of the participant. */
308
+ userId: string;
309
+ /** Associated conversation ID. */
310
+ conversationId: string;
311
+ /** Profile details of the participant user. */
312
+ user: {
313
+ /** Unique user identifier. */
314
+ id: string;
315
+ /** Display name of the user. */
316
+ name: string;
317
+ /** Username of the user. */
318
+ username?: string;
319
+ /** URL to the user's avatar image. */
320
+ avatar?: string | null;
321
+ };
322
+ }[];
323
+ /** Messages belonging to this DM conversation. */
324
+ messages?: ChannelMessage[];
325
+ /** Metadata count summaries for the conversation. */
326
+ _count?: {
327
+ /** Total number of messages in the conversation. */
328
+ messages: number;
329
+ };
330
+ }
331
+ /**
332
+ * Public or private profile information of a user.
333
+ */
334
+ export interface UserProfile {
335
+ /** Unique user identifier. */
336
+ id: string;
337
+ /** Display name of the user. */
338
+ name: string;
339
+ /** Unique username of the user. */
340
+ username: string;
341
+ /** Email address of the user (available only on self profile or with appropriate access). */
342
+ email?: string;
343
+ /** URL to the user's avatar image. */
344
+ avatar?: string | null;
345
+ /** Current status message or custom presence text. */
346
+ status?: string | null;
347
+ /** Global application role of the user (e.g., admin, member). */
348
+ role?: string;
349
+ /** ISO timestamp when the user account was created. */
350
+ createdAt?: string;
351
+ }
352
+ /**
353
+ * Configuration options for initializing the Scryme SDK.
354
+ */
4
355
  export interface ScrymeSDKOptions {
356
+ /**
357
+ * The base URL of the Scryme API server.
358
+ * If not provided, the SDK will automatically resolve it from localStorage or environment variables.
359
+ */
5
360
  baseURL?: string;
361
+ /** OAuth2 Client ID for Machine-to-Machine (M2M) authentication. */
6
362
  clientId?: string;
363
+ /** OAuth2 Client Secret for Machine-to-Machine (M2M) authentication. */
7
364
  clientSecret?: string;
365
+ /** Static Bearer token or pre-fetched session token. */
8
366
  token?: string;
9
367
  }
368
+ /**
369
+ * The primary client SDK class for accessing the Scryme Chat platform APIs.
370
+ * Supports automated OAuth2 Token management and provides clean, type-safe namespaces.
371
+ */
10
372
  export declare class ScrymeSDK {
373
+ /** The currently cached access token. */
11
374
  private token;
375
+ /** Timestamp in milliseconds indicating when the cached token will expire. */
12
376
  private tokenExpiresAt;
377
+ /** Normalized base URL of the target API server. */
13
378
  baseURL: string;
379
+ /** OAuth2 Client ID used for client credentials flow. */
14
380
  private clientId?;
381
+ /** OAuth2 Client Secret used for client credentials flow. */
15
382
  private clientSecret?;
383
+ /**
384
+ * Synchronizes the authentication token to local storage and the global configuration.
385
+ * @param token The token to synchronize.
386
+ */
16
387
  private syncToken;
388
+ /**
389
+ * Constructs a new ScrymeSDK instance.
390
+ * @param options Configuration options for baseURL, tokens, and credentials.
391
+ */
17
392
  constructor(options?: ScrymeSDKOptions);
18
393
  /**
19
- * Automatically retrieves or refreshes the M2M OAuth2 Token using client_credentials
394
+ * Automatically retrieves a cached token, or fetches a new one via M2M OAuth2 Client Credentials
395
+ * if a clientId and clientSecret are configured.
396
+ * @returns A promise resolving to the token string, or null if unauthenticated.
20
397
  */
21
398
  getOrFetchToken(): Promise<string | null>;
22
399
  /**
23
- * Gets the axios request config containing authorization and base url
400
+ * Generates the default request configuration containing the authorization headers and baseURL.
401
+ * @returns Request configuration object.
24
402
  */
25
403
  private getRequestConfig;
26
404
  /**
@@ -28,52 +406,566 @@ export declare class ScrymeSDK {
28
406
  * injecting authentication token and baseURL automatically.
29
407
  */
30
408
  get raw(): ReturnType<typeof getSkyrmeChatAPI>;
409
+ /**
410
+ * Operations for managing workspaces, including creation, updating, retrieval,
411
+ * members, and channels.
412
+ */
31
413
  get workspace(): {
32
- list: (options?: AxiosRequestConfig) => Promise<V3WorkspacesControllerGetWorkspacesResult>;
33
- get: (slug: string, options?: AxiosRequestConfig) => Promise<V3WorkspacesControllerGetWorkspaceBySlugResult>;
34
- create: (data: V3ProvisionWorkspaceDto, options?: AxiosRequestConfig) => Promise<V3WorkspacesControllerProvisionWorkspaceResult>;
35
- update: (slug: string, data: V3UpdateWorkspaceDto, options?: AxiosRequestConfig) => Promise<V3WorkspacesControllerUpdateWorkspaceResult>;
36
- delete: (slug: string, options?: AxiosRequestConfig) => Promise<V3WorkspacesControllerDeleteWorkspaceResult>;
414
+ /**
415
+ * Lists all workspaces in the authenticated organization context.
416
+ * @param options Optional request config override.
417
+ * @returns List of workspaces returned exactly from the endpoint.
418
+ */
419
+ list: (options?: AxiosRequestConfig) => Promise<V3WorkspacesResponse>;
420
+ /**
421
+ * Retrieves detailed information of a specific workspace by its slug.
422
+ * @param slug The unique workspace slug identifier.
423
+ * @param options Optional request config override.
424
+ * @returns Workspace details returned exactly from the endpoint.
425
+ */
426
+ get: (slug: string, options?: AxiosRequestConfig) => Promise<V3WorkspaceResponse>;
427
+ /**
428
+ * Provisions a new workspace inside the organization.
429
+ * @param data Workspace creation and configuration data.
430
+ * @param options Optional request config override.
431
+ * @returns Provisioned workspace and bot configuration exactly from the endpoint.
432
+ */
433
+ create: (data: V3ProvisionWorkspaceDto, options?: AxiosRequestConfig) => Promise<V3ProvisionWorkspaceResponse>;
434
+ /**
435
+ * Updates the configurations and metadata of an existing workspace.
436
+ * @param slug The unique workspace slug identifier.
437
+ * @param data Fields to update.
438
+ * @param options Optional request config override.
439
+ * @returns The updated workspace details exactly from the endpoint.
440
+ */
441
+ update: (slug: string, data: V3UpdateWorkspaceDto, options?: AxiosRequestConfig) => Promise<V3WorkspaceResponse>;
442
+ /**
443
+ * Permanently deletes a specific workspace by its slug.
444
+ * @param slug The unique workspace slug identifier.
445
+ * @param options Optional request config override.
446
+ * @returns Deletion status response exactly from the endpoint.
447
+ */
448
+ delete: (slug: string, options?: AxiosRequestConfig) => Promise<V3DeleteWorkspaceResponse>;
449
+ /**
450
+ * Operations for managing workspace members, including listing, adding, role updates, and removal.
451
+ */
37
452
  members: {
38
- list: (slug: string, options?: AxiosRequestConfig) => Promise<V3WorkspacesControllerGetWorkspaceMembersResult>;
39
- add: (slug: string, data: V3AddMemberDto, options?: AxiosRequestConfig) => Promise<V3WorkspacesControllerAddWorkspaceMemberResult>;
40
- get: (slug: string, memberId: string, options?: AxiosRequestConfig) => Promise<V3WorkspacesControllerGetWorkspaceMemberResult>;
41
- update: (slug: string, memberId: string, data: V3UpdateMemberRoleDto, options?: AxiosRequestConfig) => Promise<V3WorkspacesControllerUpdateWorkspaceMemberResult>;
42
- delete: (slug: string, memberId: string, options?: AxiosRequestConfig) => Promise<V3WorkspacesControllerDeleteWorkspaceMemberResult>;
453
+ /**
454
+ * Lists all members currently in a workspace.
455
+ * @param slug The unique workspace slug identifier.
456
+ * @param options Optional request config override.
457
+ * @returns List of workspace members exactly from the endpoint.
458
+ */
459
+ list: (slug: string, options?: AxiosRequestConfig) => Promise<V3WorkspaceMembersResponse>;
460
+ /**
461
+ * Adds a new member to the workspace.
462
+ * @param slug The unique workspace slug identifier.
463
+ * @param data Input DTO containing the user's email and role.
464
+ * @param options Optional request config override.
465
+ * @returns Newly added member details exactly from the endpoint.
466
+ */
467
+ add: (slug: string, data: V3AddMemberDto, options?: AxiosRequestConfig) => Promise<V3AddWorkspaceMemberResponse>;
468
+ /**
469
+ * Retrieves membership details of a specific member in a workspace.
470
+ * @param slug The unique workspace slug identifier.
471
+ * @param memberId Unique ID of the workspace member (user ID).
472
+ * @param options Optional request config override.
473
+ * @returns Workspace member details exactly from the endpoint.
474
+ */
475
+ get: (slug: string, memberId: string, options?: AxiosRequestConfig) => Promise<V3GetWorkspaceMemberResponse>;
476
+ /**
477
+ * Updates the role or configuration of a workspace member.
478
+ * @param slug The unique workspace slug identifier.
479
+ * @param memberId Unique ID of the workspace member (user ID).
480
+ * @param data Update details containing the target role.
481
+ * @param options Optional request config override.
482
+ * @returns The updated workspace member details exactly from the endpoint.
483
+ */
484
+ update: (slug: string, memberId: string, data: V3UpdateMemberRoleDto, options?: AxiosRequestConfig) => Promise<V3UpdateWorkspaceMemberResponse>;
485
+ /**
486
+ * Removes a member from the workspace.
487
+ * @param slug The unique workspace slug identifier.
488
+ * @param memberId Unique ID of the workspace member (user ID).
489
+ * @param options Optional request config override.
490
+ * @returns Workspace member deletion confirmation exactly from the endpoint.
491
+ */
492
+ delete: (slug: string, memberId: string, options?: AxiosRequestConfig) => Promise<V3DeleteWorkspaceMemberResponse>;
43
493
  };
494
+ /**
495
+ * Operations for listing and creating channels inside a workspace.
496
+ */
44
497
  channels: {
45
- list: (slug: string, options?: AxiosRequestConfig) => Promise<ChannelsControllerGetWorkspaceChannelsResult>;
46
- create: (slug: string, data: CreateWorkspaceChannelDto, options?: AxiosRequestConfig) => Promise<ChannelsControllerCreateChannelResult>;
498
+ /**
499
+ * Lists all public channels (and private channels the user has access to) in a workspace.
500
+ * @param slug The unique workspace slug identifier.
501
+ * @param options Optional request config override.
502
+ * @returns List of channels returned exactly from the endpoint.
503
+ */
504
+ list: (slug: string, options?: AxiosRequestConfig) => Promise<WorkspaceChannel[]>;
505
+ /**
506
+ * Creates a new channel within a workspace.
507
+ * @param slug The unique workspace slug identifier.
508
+ * @param data Configuration DTO for the new channel.
509
+ * @param options Optional request config override.
510
+ * @returns Details of the created channel exactly from the endpoint.
511
+ */
512
+ create: (slug: string, data: CreateWorkspaceChannelDto, options?: AxiosRequestConfig) => Promise<WorkspaceChannel>;
47
513
  };
48
514
  };
515
+ /**
516
+ * Operations for managing specific channels and channel message actions.
517
+ */
49
518
  get channel(): {
50
- get: (slug: string, channelId: string, options?: AxiosRequestConfig) => Promise<ChannelsControllerGetChannelResult>;
51
- update: (slug: string, channelId: string, data: UpdateWorkspaceChannelDto, options?: AxiosRequestConfig) => Promise<ChannelsControllerUpdateChannelResult>;
52
- delete: (slug: string, channelId: string, options?: AxiosRequestConfig) => Promise<ChannelsControllerDeleteChannelResult>;
519
+ /**
520
+ * Retrieves detailed information of a specific channel.
521
+ * @param slug The unique workspace slug identifier.
522
+ * @param channelId Unique identifier of the channel.
523
+ * @param options Optional request config override.
524
+ * @returns Channel details returned exactly from the endpoint.
525
+ */
526
+ get: (slug: string, channelId: string, options?: AxiosRequestConfig) => Promise<WorkspaceChannel>;
527
+ /**
528
+ * Updates configuration, description, icon or status of an existing channel.
529
+ * @param slug The unique workspace slug identifier.
530
+ * @param channelId Unique identifier of the channel.
531
+ * @param data Configuration options to update.
532
+ * @param options Optional request config override.
533
+ * @returns The updated channel details exactly from the endpoint.
534
+ */
535
+ update: (slug: string, channelId: string, data: UpdateWorkspaceChannelDto, options?: AxiosRequestConfig) => Promise<WorkspaceChannel>;
536
+ /**
537
+ * Permanently deletes a channel from a workspace.
538
+ * @param slug The unique workspace slug identifier.
539
+ * @param channelId Unique identifier of the channel to delete.
540
+ * @param options Optional request config override.
541
+ * @returns Success status indicating that the channel was deleted exactly from the endpoint.
542
+ */
543
+ delete: (slug: string, channelId: string, options?: AxiosRequestConfig) => Promise<{
544
+ success: boolean;
545
+ }>;
546
+ /**
547
+ * Sub-namespace for managing messages inside a channel.
548
+ */
53
549
  message: {
54
- list: (channelId: string, params?: ChannelsControllerGetMessagesParams, options?: AxiosRequestConfig) => Promise<ChannelsControllerGetMessagesResult>;
55
- create: (channelId: string, options?: AxiosRequestConfig) => Promise<ChannelsControllerCreateMessageResult>;
550
+ /**
551
+ * Lists messages in a channel with cursor pagination support.
552
+ * @param channelId Unique identifier of the channel.
553
+ * @param params Query parameters for limiting, sorting, or pagination cursors.
554
+ * @param options Optional request config override.
555
+ * @returns Object containing the messages array and next pagination cursor exactly from the endpoint.
556
+ */
557
+ list: (channelId: string, params?: ChannelsControllerGetMessagesParams, options?: AxiosRequestConfig) => Promise<{
558
+ messages: ChannelMessage[];
559
+ nextCursor?: string;
560
+ }>;
561
+ /**
562
+ * Sends a new message to a channel.
563
+ * @param channelId Unique identifier of the target channel.
564
+ * @param data The message content string or structured CreateMessageDto object.
565
+ * @param options Optional request config override.
566
+ * @returns The created message exactly from the endpoint.
567
+ */
568
+ create: (channelId: string, data: CreateMessageDto | string, options?: AxiosRequestConfig) => Promise<ChannelMessage>;
569
+ /**
570
+ * Updates the content of a previously sent message in a channel.
571
+ * @param channelId Unique identifier of the channel containing the message.
572
+ * @param messageId Unique identifier of the message to update.
573
+ * @param data The new content payload.
574
+ * @param options Optional request config override.
575
+ * @returns The updated message details exactly from the endpoint.
576
+ */
577
+ update: (channelId: string, messageId: string, data: ChannelsControllerUpdateMessageBody, options?: AxiosRequestConfig) => Promise<ChannelMessage>;
578
+ /**
579
+ * Permanently deletes a message in a channel.
580
+ * @param channelId Unique identifier of the channel containing the message.
581
+ * @param messageId Unique identifier of the message to delete.
582
+ * @param options Optional request config override.
583
+ * @returns Success status indicating that the message was deleted exactly from the endpoint.
584
+ */
585
+ delete: (channelId: string, messageId: string, options?: AxiosRequestConfig) => Promise<{
586
+ success: boolean;
587
+ }>;
588
+ /**
589
+ * Adds a reaction (emoji) to a message in a channel.
590
+ * @param channelId Unique identifier of the channel containing the message.
591
+ * @param messageId Unique identifier of the message.
592
+ * @param data Object containing the target emoji character.
593
+ * @param options Optional request config override.
594
+ * @returns The reaction response returned exactly from the endpoint.
595
+ */
596
+ addReaction: (channelId: string, messageId: string, data: ChannelsControllerAddReactionBody, options?: AxiosRequestConfig) => Promise<ChannelsControllerAddReactionResult>;
597
+ /**
598
+ * Removes a reaction (emoji) from a message in a channel.
599
+ * @param channelId Unique identifier of the channel containing the message.
600
+ * @param messageId Unique identifier of the message.
601
+ * @param emoji The emoji character to remove.
602
+ * @param options Optional request config override.
603
+ * @returns The reaction removal response returned exactly from the endpoint.
604
+ */
605
+ removeReaction: (channelId: string, messageId: string, emoji: string, options?: AxiosRequestConfig) => Promise<ChannelsControllerRemoveReactionResult>;
56
606
  };
57
607
  };
608
+ /**
609
+ * Operations for modifying, reacting to, or deleting existing messages (both channel & direct messages).
610
+ * Automatically intercepts direct messages starting with 'dm-' and routes them correctly.
611
+ */
58
612
  get message(): {
59
- update: (channelId: string, messageId: string, data: ChannelsControllerUpdateMessageBody, options?: AxiosRequestConfig) => Promise<ChannelsControllerUpdateMessageResult>;
60
- delete: (channelId: string, messageId: string, options?: AxiosRequestConfig) => Promise<ChannelsControllerDeleteMessageResult>;
61
- addReaction: (channelId: string, messageId: string, data: ChannelsControllerAddReactionBody, options?: AxiosRequestConfig) => Promise<ChannelsControllerAddReactionResult>;
62
- removeReaction: (channelId: string, messageId: string, emoji: string, options?: AxiosRequestConfig) => Promise<ChannelsControllerRemoveReactionResult>;
613
+ /**
614
+ * Updates the content of a previously sent message.
615
+ * @param channelId Unique identifier of the channel or DM conversation containing the message.
616
+ * @param messageId Unique identifier of the message to update.
617
+ * @param data The new content payload.
618
+ * @param options Optional request config override.
619
+ * @returns The updated message details exactly from the endpoint.
620
+ */
621
+ update: (channelId: string, messageId: string, data: ChannelsControllerUpdateMessageBody | UpdateDmMessageDto, options?: AxiosRequestConfig) => Promise<ChannelMessage>;
622
+ /**
623
+ * Permanently deletes a message.
624
+ * @param channelId Unique identifier of the channel or DM conversation containing the message.
625
+ * @param messageId Unique identifier of the message to delete.
626
+ * @param options Optional request config override.
627
+ * @returns Success status indicating that the message was deleted exactly from the endpoint.
628
+ */
629
+ delete: (channelId: string, messageId: string, options?: AxiosRequestConfig) => Promise<{
630
+ success: boolean;
631
+ }>;
632
+ /**
633
+ * Adds a reaction (emoji) to a message.
634
+ * @param channelId Unique identifier of the channel or DM conversation containing the message.
635
+ * @param messageId Unique identifier of the message.
636
+ * @param data Object containing the target emoji character.
637
+ * @param options Optional request config override.
638
+ * @returns The reaction response returned exactly from the endpoint.
639
+ */
640
+ addReaction: (channelId: string, messageId: string, data: ChannelsControllerAddReactionBody | DmsControllerAddReactionBody, options?: AxiosRequestConfig) => Promise<ChannelsControllerAddReactionResult | DmsControllerAddReactionResult>;
641
+ /**
642
+ * Removes a reaction (emoji) from a message.
643
+ * @param channelId Unique identifier of the channel or DM conversation containing the message.
644
+ * @param messageId Unique identifier of the message.
645
+ * @param emoji The emoji character to remove.
646
+ * @param options Optional request config override.
647
+ * @returns The reaction removal response returned exactly from the endpoint.
648
+ */
649
+ removeReaction: (channelId: string, messageId: string, emoji: string, options?: AxiosRequestConfig) => Promise<ChannelsControllerRemoveReactionResult | DmsControllerRemoveReactionResult>;
63
650
  };
651
+ /**
652
+ * Operations for managing direct messages (DMs) and direct message conversations.
653
+ */
64
654
  get dm(): {
65
- list: (options?: AxiosRequestConfig) => Promise<DmsControllerGetDmsResult>;
66
- create: (data: CreateDmDto, options?: AxiosRequestConfig) => Promise<DmsControllerCreateDmResult>;
67
- get: (dmId: string, options?: AxiosRequestConfig) => Promise<DmsControllerGetDmResult>;
68
- delete: (dmId: string, options?: AxiosRequestConfig) => Promise<DmsControllerDeleteDmResult>;
655
+ /**
656
+ * Lists all active direct message conversations for the authenticated user.
657
+ * @param options Optional request config override.
658
+ * @returns List of active DM conversations returned exactly from the endpoint.
659
+ */
660
+ list: (options?: AxiosRequestConfig) => Promise<DmConversation[]>;
661
+ /**
662
+ * Creates/initiates a direct message conversation with specified users.
663
+ * @param data Create direct message details containing target participant IDs.
664
+ * @param options Optional request config override.
665
+ * @returns Details of the created DM conversation exactly from the endpoint.
666
+ */
667
+ create: (data: CreateDmDto, options?: AxiosRequestConfig) => Promise<DmConversation>;
668
+ /**
669
+ * Retrieves details of a specific direct message conversation.
670
+ * @param dmId Unique identifier of the direct message conversation.
671
+ * @param options Optional request config override.
672
+ * @returns Detailed direct message conversation object exactly from the endpoint.
673
+ */
674
+ get: (dmId: string, options?: AxiosRequestConfig) => Promise<DmConversation>;
675
+ /**
676
+ * Deletes/closes an active direct message conversation.
677
+ * @param dmId Unique identifier of the direct message conversation to close.
678
+ * @param options Optional request config override.
679
+ * @returns Success status indicating that the DM conversation was deleted exactly from the endpoint.
680
+ */
681
+ delete: (dmId: string, options?: AxiosRequestConfig) => Promise<{
682
+ success: boolean;
683
+ }>;
684
+ /**
685
+ * Sub-namespace for managing direct messages in a specific DM conversation.
686
+ */
69
687
  message: {
70
- list: (dmId: string, params?: DmsControllerGetMessagesParams, options?: AxiosRequestConfig) => Promise<DmsControllerGetMessagesResult>;
71
- create: (dmId: string, options?: AxiosRequestConfig) => Promise<DmsControllerCreateMessageResult>;
688
+ /**
689
+ * Lists messages in a direct message conversation with cursor pagination.
690
+ * @param dmId Unique identifier of the direct message conversation.
691
+ * @param params Query parameters for pagination limits, cursors or search filters.
692
+ * @param options Optional request config override.
693
+ * @returns List of direct messages and next pagination cursor exactly from the endpoint.
694
+ */
695
+ list: (dmId: string, params?: DmsControllerGetMessagesParams, options?: AxiosRequestConfig) => Promise<{
696
+ messages: ChannelMessage[];
697
+ nextCursor?: string;
698
+ }>;
699
+ /**
700
+ * Sends a new message in a direct message conversation.
701
+ * @param dmId Unique identifier of the direct message conversation.
702
+ * @param data The message content string or structured CreateMessageDto object.
703
+ * @param options Optional request config override.
704
+ * @returns The sent message exactly from the endpoint.
705
+ */
706
+ create: (dmId: string, data: CreateMessageDto | {
707
+ content: string;
708
+ } | string, options?: AxiosRequestConfig) => Promise<ChannelMessage>;
709
+ /**
710
+ * Updates the content of a previously sent direct message.
711
+ * @param dmId Unique identifier of the direct message conversation.
712
+ * @param messageId Unique identifier of the message to update.
713
+ * @param data The new content payload.
714
+ * @param options Optional request config override.
715
+ * @returns The updated message details exactly from the endpoint.
716
+ */
717
+ update: (dmId: string, messageId: string, data: UpdateDmMessageDto, options?: AxiosRequestConfig) => Promise<ChannelMessage>;
718
+ /**
719
+ * Permanently deletes a direct message.
720
+ * @param dmId Unique identifier of the direct message conversation.
721
+ * @param messageId Unique identifier of the message to delete.
722
+ * @param options Optional request config override.
723
+ * @returns Success status indicating that the message was deleted exactly from the endpoint.
724
+ */
725
+ delete: (dmId: string, messageId: string, options?: AxiosRequestConfig) => Promise<{
726
+ success: boolean;
727
+ }>;
728
+ /**
729
+ * Adds a reaction (emoji) to a direct message.
730
+ * @param dmId Unique identifier of the direct message conversation.
731
+ * @param messageId Unique identifier of the message.
732
+ * @param data Object containing the target emoji character.
733
+ * @param options Optional request config override.
734
+ * @returns The reaction response returned exactly from the endpoint.
735
+ */
736
+ addReaction: (dmId: string, messageId: string, data: DmsControllerAddReactionBody, options?: AxiosRequestConfig) => Promise<DmsControllerAddReactionResult>;
737
+ /**
738
+ * Removes a reaction (emoji) from a direct message.
739
+ * @param dmId Unique identifier of the direct message conversation.
740
+ * @param messageId Unique identifier of the message.
741
+ * @param emoji The emoji character to remove.
742
+ * @param options Optional request config override.
743
+ * @returns The reaction removal response returned exactly from the endpoint.
744
+ */
745
+ removeReaction: (dmId: string, messageId: string, emoji: string, options?: AxiosRequestConfig) => Promise<DmsControllerRemoveReactionResult>;
72
746
  };
73
747
  };
748
+ /**
749
+ * Operations for retrieving information about the current user or other user profiles,
750
+ * as well as performing user searches.
751
+ */
74
752
  get user(): {
75
- me: (options?: AxiosRequestConfig) => Promise<UsersControllerGetMeResult>;
76
- get: (userId: string, options?: AxiosRequestConfig) => Promise<UsersControllerGetUserResult>;
77
- search: (params: UsersControllerSearchUsersParams, options?: AxiosRequestConfig) => Promise<UsersControllerSearchUsersResult>;
753
+ /**
754
+ * Retrieves the profile details of the currently authenticated user.
755
+ * @param options Optional request config override.
756
+ * @returns The active user's profile returned exactly from the endpoint.
757
+ */
758
+ me: (options?: AxiosRequestConfig) => Promise<UserProfile>;
759
+ /**
760
+ * Retrieves the public profile of a user by their user ID.
761
+ * @param userId Unique identifier of the target user.
762
+ * @param options Optional request config override.
763
+ * @returns Public user profile returned exactly from the endpoint.
764
+ */
765
+ get: (userId: string, options?: AxiosRequestConfig) => Promise<UserProfile>;
766
+ /**
767
+ * Searches the organization or workspace directory for user profiles matching specific queries.
768
+ * @param params Object containing search filters and query string parameters.
769
+ * @param options Optional request config override.
770
+ * @returns List of matching user profiles returned exactly from the endpoint.
771
+ */
772
+ search: (params: UsersControllerSearchUsersParams, options?: AxiosRequestConfig) => Promise<UserProfile[]>;
773
+ };
774
+ /**
775
+ * Operations for managing webhooks (both standard workspace webhooks and channel incoming webhooks).
776
+ */
777
+ get webhooks(): {
778
+ /**
779
+ * Lists all configured webhooks for a workspace. Requires webhooks:read scope.
780
+ * @param slug The unique workspace slug.
781
+ * @param options Optional request config override.
782
+ */
783
+ list: (slug: string, options?: AxiosRequestConfig) => Promise<V3WebhooksControllerGetWebhooksResult>;
784
+ /**
785
+ * Creates a new standard webhook for a workspace. Requires webhooks:write scope.
786
+ * @param slug The unique workspace slug.
787
+ * @param data Configuration options for the standard webhook.
788
+ * @param options Optional request config override.
789
+ */
790
+ create: (slug: string, data: V3CreateWebhookDto, options?: AxiosRequestConfig) => Promise<V3WebhooksControllerCreateWebhookResult>;
791
+ /**
792
+ * Retrieves details of a specific webhook. Requires webhooks:read scope.
793
+ * @param slug The unique workspace slug.
794
+ * @param webhookId The unique webhook identifier.
795
+ * @param options Optional request config override.
796
+ */
797
+ get: (slug: string, webhookId: string, options?: AxiosRequestConfig) => Promise<V3WebhooksControllerGetWebhookResult>;
798
+ /**
799
+ * Updates a standard webhook for a workspace. Requires webhooks:write scope.
800
+ * @param slug The unique workspace slug.
801
+ * @param webhookId The unique webhook identifier.
802
+ * @param data Fields to update on the webhook.
803
+ * @param options Optional request config override.
804
+ */
805
+ update: (slug: string, webhookId: string, data: V3UpdateWebhookDto, options?: AxiosRequestConfig) => Promise<V3WebhooksControllerUpdateWebhookResult>;
806
+ /**
807
+ * Permanently deletes a standard webhook. Requires webhooks:write scope.
808
+ * @param slug The unique workspace slug.
809
+ * @param webhookId The unique webhook identifier.
810
+ * @param options Optional request config override.
811
+ */
812
+ delete: (slug: string, webhookId: string, options?: AxiosRequestConfig) => Promise<V3WebhooksControllerDeleteWebhookResult>;
813
+ /**
814
+ * Sub-namespace for managing channel incoming webhooks.
815
+ */
816
+ incoming: {
817
+ /**
818
+ * Lists incoming webhooks configured for a specific channel. Requires webhooks:read scope.
819
+ * @param slug The unique workspace slug.
820
+ * @param channelId The unique channel identifier.
821
+ * @param options Optional request config override.
822
+ */
823
+ list: (slug: string, channelId: string, options?: AxiosRequestConfig) => Promise<V3ChannelIncomingWebhooksControllerGetChannelWebhooksResult>;
824
+ /**
825
+ * Creates an incoming webhook for a specific channel. Requires webhooks:write scope.
826
+ * @param slug The unique workspace slug.
827
+ * @param channelId The unique channel identifier.
828
+ * @param data Configuration options for the incoming webhook.
829
+ * @param options Optional request config override.
830
+ */
831
+ create: (slug: string, channelId: string, data: CreateChannelIncomingWebhookDto, options?: AxiosRequestConfig) => Promise<V3ChannelIncomingWebhooksControllerCreateChannelWebhookResult>;
832
+ /**
833
+ * Retrieves details of a specific channel incoming webhook. Requires webhooks:read scope.
834
+ * @param slug The unique workspace slug.
835
+ * @param channelId The unique channel identifier.
836
+ * @param webhookId The unique webhook identifier.
837
+ * @param options Optional request config override.
838
+ */
839
+ get: (slug: string, channelId: string, webhookId: string, options?: AxiosRequestConfig) => Promise<V3ChannelIncomingWebhooksControllerGetChannelWebhookResult>;
840
+ /**
841
+ * Updates a channel incoming webhook. Requires webhooks:write scope.
842
+ * @param slug The unique workspace slug.
843
+ * @param channelId The unique channel identifier.
844
+ * @param webhookId The unique webhook identifier.
845
+ * @param data Fields to update on the incoming webhook.
846
+ * @param options Optional request config override.
847
+ */
848
+ update: (slug: string, channelId: string, webhookId: string, data: UpdateChannelIncomingWebhookDto, options?: AxiosRequestConfig) => Promise<V3ChannelIncomingWebhooksControllerUpdateChannelWebhookResult>;
849
+ /**
850
+ * Deletes a channel incoming webhook. Requires webhooks:write scope.
851
+ * @param slug The unique workspace slug.
852
+ * @param channelId The unique channel identifier.
853
+ * @param webhookId The unique webhook identifier.
854
+ * @param options Optional request config override.
855
+ */
856
+ delete: (slug: string, channelId: string, webhookId: string, options?: AxiosRequestConfig) => Promise<V3ChannelIncomingWebhooksControllerDeleteChannelWebhookResult>;
857
+ /**
858
+ * Executes an incoming webhook using its unique url token directly. No auth headers required.
859
+ * @param token The unique webhook token from the webhook URL.
860
+ * @param data The payload payload consisting of content/attachments/metadata.
861
+ * @param options Optional request config override.
862
+ */
863
+ executeByUrlToken: (token: string, data: ExecuteChannelIncomingWebhookDto, options?: AxiosRequestConfig) => Promise<V3ChannelIncomingWebhooksControllerExecuteWebhookByUrlTokenResult>;
864
+ /**
865
+ * Executes an incoming webhook by channel ID.
866
+ * @param channelId The target channel identifier.
867
+ * @param data The payload payload consisting of content/attachments/metadata.
868
+ * @param params Optional query parameters like token or signature.
869
+ * @param options Optional request config override.
870
+ */
871
+ executeByChannelId: (channelId: string, data: ExecuteChannelIncomingWebhookDto, params?: V3ChannelIncomingWebhooksControllerExecuteWebhookByChannelIdParams, options?: AxiosRequestConfig) => Promise<V3ChannelIncomingWebhooksControllerExecuteWebhookByChannelIdResult>;
872
+ };
873
+ };
874
+ /**
875
+ * First-class namespace for Machine-to-Machine (M2M) operations,
876
+ * grouping V3 Enterprise M2M APIs into logical, highly cohesive spaces.
877
+ */
878
+ get m2m(): {
879
+ /**
880
+ * M2M Workspace Operations (Provisioning, Retrieval, and Lifecycle management).
881
+ */
882
+ workspace: {
883
+ /**
884
+ * Provisions a brand new tenant workspace in the organization.
885
+ * @param data Configuration payload for workspace name, slug, owner, and initial setups.
886
+ * @param options Optional request config override.
887
+ */
888
+ provision: (data: V3ProvisionWorkspaceDto, options?: AxiosRequestConfig) => Promise<V3ProvisionWorkspaceResponse>;
889
+ /**
890
+ * Retrieves detailed information of a specific workspace by its slug.
891
+ * @param slug The unique workspace slug.
892
+ * @param options Optional request config override.
893
+ */
894
+ get: (slug: string, options?: AxiosRequestConfig) => Promise<V3WorkspaceResponse>;
895
+ /**
896
+ * Lists all workspaces under the organization context.
897
+ * @param options Optional request config override.
898
+ */
899
+ list: (options?: AxiosRequestConfig) => Promise<V3WorkspacesResponse>;
900
+ /**
901
+ * Updates configuration and branding metadata of a specific workspace.
902
+ * @param slug The unique workspace slug.
903
+ * @param data Workspace update DTO.
904
+ * @param options Optional request config override.
905
+ */
906
+ update: (slug: string, data: V3UpdateWorkspaceDto, options?: AxiosRequestConfig) => Promise<V3WorkspaceResponse>;
907
+ /**
908
+ * Permanently deletes a specific workspace by its slug.
909
+ * @param slug The unique workspace slug.
910
+ * @param options Optional request config override.
911
+ */
912
+ delete: (slug: string, options?: AxiosRequestConfig) => Promise<V3DeleteWorkspaceResponse>;
913
+ };
914
+ /**
915
+ * M2M Workspace Membership Operations (Adding, modifying roles, and removing workspace members).
916
+ */
917
+ member: {
918
+ /**
919
+ * Lists all members currently in a workspace.
920
+ * @param slug The unique workspace slug.
921
+ * @param options Optional request config override.
922
+ */
923
+ list: (slug: string, options?: AxiosRequestConfig) => Promise<V3WorkspaceMembersResponse>;
924
+ /**
925
+ * Adds a new member to a workspace.
926
+ * @param slug The unique workspace slug.
927
+ * @param data Configuration containing user email and target role.
928
+ * @param options Optional request config override.
929
+ */
930
+ add: (slug: string, data: V3AddMemberDto, options?: AxiosRequestConfig) => Promise<V3AddWorkspaceMemberResponse>;
931
+ /**
932
+ * Retrieves membership details of a specific workspace member.
933
+ * @param slug The unique workspace slug.
934
+ * @param memberId Unique ID of the workspace member (user ID).
935
+ * @param options Optional request config override.
936
+ */
937
+ get: (slug: string, memberId: string, options?: AxiosRequestConfig) => Promise<V3GetWorkspaceMemberResponse>;
938
+ /**
939
+ * Updates the role or settings of an existing member in a workspace.
940
+ * @param slug The unique workspace slug.
941
+ * @param memberId Unique ID of the workspace member (user ID).
942
+ * @param data Updated role.
943
+ * @param options Optional request config override.
944
+ */
945
+ update: (slug: string, memberId: string, data: V3UpdateMemberRoleDto, options?: AxiosRequestConfig) => Promise<V3UpdateWorkspaceMemberResponse>;
946
+ /**
947
+ * Removes a member from a workspace.
948
+ * @param slug The unique workspace slug.
949
+ * @param memberId Unique ID of the workspace member (user ID).
950
+ * @param options Optional request config override.
951
+ */
952
+ delete: (slug: string, memberId: string, options?: AxiosRequestConfig) => Promise<V3DeleteWorkspaceMemberResponse>;
953
+ };
954
+ /**
955
+ * M2M Authentication and Token Management Utilities.
956
+ */
957
+ auth: {
958
+ /**
959
+ * Explicitly exchanges Client Credentials for a V3 access token.
960
+ * @param clientId The unique M2M Client ID.
961
+ * @param clientSecret The secure M2M Client Secret.
962
+ * @param options Optional request config override.
963
+ */
964
+ token: (clientId: string, clientSecret: string, options?: AxiosRequestConfig) => Promise<V3OAuthControllerGetTokenResult>;
965
+ /**
966
+ * Dynamically retrieves the current cached M2M token, or proactively fetches a new one.
967
+ */
968
+ getOrFetchToken: () => Promise<string | null>;
969
+ };
78
970
  };
79
971
  }