@scryme/chat 2.91.7 → 2.91.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -3
- package/dist/generated/v3-client.d.ts +474 -20
- package/dist/generated/v3-client.js +287 -4
- package/dist/generated/v3-server.d.ts +178 -20
- package/dist/generated/v3-server.js +112 -3
- package/dist/sdk.d.ts +168 -1
- package/dist/sdk.js +166 -0
- package/package.json +1 -1
- package/src/__tests__/sdk.test.ts +49 -0
- package/src/generated/v3-client.ts +1001 -222
- package/src/generated/v3-server.ts +346 -21
- package/src/sdk.ts +254 -0
package/README.md
CHANGED
|
@@ -104,12 +104,38 @@ await sdk.workspace.members.delete('acme-corp', 'member_id_xyz');
|
|
|
104
104
|
// List channels in a workspace
|
|
105
105
|
const channels = await sdk.workspace.channels.list('acme-corp');
|
|
106
106
|
|
|
107
|
-
// Create a new channel
|
|
107
|
+
// Create a new channel with custom visibility, icon, metadata, and initial members
|
|
108
108
|
const channel = await sdk.workspace.channels.create('acme-corp', {
|
|
109
|
-
name: '
|
|
110
|
-
|
|
109
|
+
name: 'engineering',
|
|
110
|
+
description: 'Engineering discussion channel',
|
|
111
|
+
type: 'private',
|
|
112
|
+
isPrivate: true,
|
|
113
|
+
icon: 'code',
|
|
114
|
+
metadata: { department: 'eng' },
|
|
111
115
|
});
|
|
112
116
|
|
|
117
|
+
// Update channel settings, visibility, and metadata
|
|
118
|
+
await sdk.channel.update('acme-corp', 'channel_id_123', {
|
|
119
|
+
name: 'eng-tech',
|
|
120
|
+
description: 'Updated description',
|
|
121
|
+
icon: 'terminal',
|
|
122
|
+
metadata: { priority: 'high' },
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
// Manage channel member access and permissions
|
|
126
|
+
await sdk.channel.members.add('acme-corp', 'channel_id_123', {
|
|
127
|
+
userIds: ['user_456'],
|
|
128
|
+
role: 'moderator',
|
|
129
|
+
permissions: '2048',
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
await sdk.channel.members.update('acme-corp', 'channel_id_123', 'user_456', {
|
|
133
|
+
role: 'admin',
|
|
134
|
+
permissions: '4096',
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
await sdk.channel.members.remove('acme-corp', 'channel_id_123', 'user_456');
|
|
138
|
+
|
|
113
139
|
// Send a message to a channel
|
|
114
140
|
await sdk.channel.message.create('channel_id_123', {
|
|
115
141
|
content: 'Hello Team! This is automated via our new TS SDK 🚀',
|
|
@@ -218,12 +218,6 @@ export type V3WorkspacesControllerDeleteWorkspace200 = {
|
|
|
218
218
|
success?: boolean;
|
|
219
219
|
timestamp?: string;
|
|
220
220
|
};
|
|
221
|
-
/**
|
|
222
|
-
* @nullable
|
|
223
|
-
*/
|
|
224
|
-
export type V3WorkspacesControllerUpdateWorkspace200DataWorkspaceBrandingConfig = {
|
|
225
|
-
[key: string]: unknown;
|
|
226
|
-
} | null;
|
|
227
221
|
export type V3WorkspacesControllerUpdateWorkspace200DataWorkspace = {
|
|
228
222
|
/** @nullable */
|
|
229
223
|
brandingConfig?: V3WorkspacesControllerUpdateWorkspace200DataWorkspaceBrandingConfig;
|
|
@@ -246,11 +240,12 @@ export type V3WorkspacesControllerUpdateWorkspace200 = {
|
|
|
246
240
|
success?: boolean;
|
|
247
241
|
timestamp?: string;
|
|
248
242
|
};
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
243
|
+
/**
|
|
244
|
+
* @nullable
|
|
245
|
+
*/
|
|
246
|
+
export type V3WorkspacesControllerUpdateWorkspace200DataWorkspaceBrandingConfig = {
|
|
247
|
+
[key: string]: unknown;
|
|
248
|
+
} | null;
|
|
254
249
|
/**
|
|
255
250
|
* @nullable
|
|
256
251
|
*/
|
|
@@ -274,8 +269,8 @@ export type V3WorkspacesControllerGetWorkspaceBySlug200DataWorkspace = {
|
|
|
274
269
|
export type V3WorkspacesControllerGetWorkspaceBySlug200Data = {
|
|
275
270
|
workspace?: V3WorkspacesControllerGetWorkspaceBySlug200DataWorkspace;
|
|
276
271
|
};
|
|
277
|
-
export type
|
|
278
|
-
data?:
|
|
272
|
+
export type V3WorkspacesControllerGetWorkspaceBySlug200 = {
|
|
273
|
+
data?: V3WorkspacesControllerGetWorkspaceBySlug200Data;
|
|
279
274
|
success?: boolean;
|
|
280
275
|
timestamp?: string;
|
|
281
276
|
};
|
|
@@ -293,6 +288,11 @@ export type V3WorkspacesControllerProvisionWorkspace201Data = {
|
|
|
293
288
|
bot?: V3WorkspacesControllerProvisionWorkspace201DataBot;
|
|
294
289
|
workspace?: V3WorkspacesControllerProvisionWorkspace201DataWorkspace;
|
|
295
290
|
};
|
|
291
|
+
export type V3WorkspacesControllerProvisionWorkspace201 = {
|
|
292
|
+
data?: V3WorkspacesControllerProvisionWorkspace201Data;
|
|
293
|
+
success?: boolean;
|
|
294
|
+
timestamp?: string;
|
|
295
|
+
};
|
|
296
296
|
export type V3WorkspacesControllerGetWorkspaces200DataWorkspacesItem = {
|
|
297
297
|
createdAt?: string;
|
|
298
298
|
/** @nullable */
|
|
@@ -534,14 +534,57 @@ export interface CreateWorkspaceDepartmentDto {
|
|
|
534
534
|
settings?: CreateWorkspaceDepartmentDtoSettings;
|
|
535
535
|
slug: string;
|
|
536
536
|
}
|
|
537
|
+
export type UpdateChannelMemberDtoRole = typeof UpdateChannelMemberDtoRole[keyof typeof UpdateChannelMemberDtoRole];
|
|
538
|
+
export declare const UpdateChannelMemberDtoRole: {
|
|
539
|
+
readonly admin: "admin";
|
|
540
|
+
readonly moderator: "moderator";
|
|
541
|
+
readonly member: "member";
|
|
542
|
+
};
|
|
543
|
+
/**
|
|
544
|
+
* Bitwise permission string or integer value
|
|
545
|
+
*/
|
|
546
|
+
export type UpdateChannelMemberDtoPermissions = {
|
|
547
|
+
[key: string]: unknown;
|
|
548
|
+
};
|
|
549
|
+
export interface UpdateChannelMemberDto {
|
|
550
|
+
/** Bitwise permission string or integer value */
|
|
551
|
+
permissions?: UpdateChannelMemberDtoPermissions;
|
|
552
|
+
role?: UpdateChannelMemberDtoRole;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Bitwise permission string or integer value
|
|
556
|
+
*/
|
|
557
|
+
export type AddChannelMemberDtoPermissions = {
|
|
558
|
+
[key: string]: unknown;
|
|
559
|
+
};
|
|
560
|
+
export interface AddChannelMemberDto {
|
|
561
|
+
/** Bitwise permission string or integer value */
|
|
562
|
+
permissions?: AddChannelMemberDtoPermissions;
|
|
563
|
+
/** Channel role */
|
|
564
|
+
role?: string;
|
|
565
|
+
/** User ID to add */
|
|
566
|
+
userId?: string;
|
|
567
|
+
/** Array of user IDs to add */
|
|
568
|
+
userIds?: string[];
|
|
569
|
+
}
|
|
537
570
|
export type UpdateWorkspaceChannelDtoType = typeof UpdateWorkspaceChannelDtoType[keyof typeof UpdateWorkspaceChannelDtoType];
|
|
538
571
|
export declare const UpdateWorkspaceChannelDtoType: {
|
|
539
572
|
readonly public: "public";
|
|
540
573
|
readonly private: "private";
|
|
541
574
|
};
|
|
575
|
+
/**
|
|
576
|
+
* Custom channel metadata or branding settings
|
|
577
|
+
*/
|
|
578
|
+
export type UpdateWorkspaceChannelDtoMetadata = {
|
|
579
|
+
[key: string]: unknown;
|
|
580
|
+
};
|
|
542
581
|
export interface UpdateWorkspaceChannelDto {
|
|
543
582
|
description?: string;
|
|
544
583
|
icon?: string;
|
|
584
|
+
/** Explicit private status flag */
|
|
585
|
+
isPrivate?: boolean;
|
|
586
|
+
/** Custom channel metadata or branding settings */
|
|
587
|
+
metadata?: UpdateWorkspaceChannelDtoMetadata;
|
|
545
588
|
name?: string;
|
|
546
589
|
type?: UpdateWorkspaceChannelDtoType;
|
|
547
590
|
}
|
|
@@ -550,10 +593,20 @@ export declare const CreateWorkspaceChannelDtoType: {
|
|
|
550
593
|
readonly public: "public";
|
|
551
594
|
readonly private: "private";
|
|
552
595
|
};
|
|
596
|
+
/**
|
|
597
|
+
* Custom channel metadata or branding settings
|
|
598
|
+
*/
|
|
599
|
+
export type CreateWorkspaceChannelDtoMetadata = {
|
|
600
|
+
[key: string]: unknown;
|
|
601
|
+
};
|
|
553
602
|
export interface CreateWorkspaceChannelDto {
|
|
554
603
|
departmentId?: string;
|
|
555
604
|
description?: string;
|
|
556
605
|
icon?: string;
|
|
606
|
+
/** Explicit private status flag */
|
|
607
|
+
isPrivate?: boolean;
|
|
608
|
+
/** Custom channel metadata or branding settings */
|
|
609
|
+
metadata?: CreateWorkspaceChannelDtoMetadata;
|
|
557
610
|
name: string;
|
|
558
611
|
type?: CreateWorkspaceChannelDtoType;
|
|
559
612
|
}
|
|
@@ -656,12 +709,6 @@ export declare const CreateIntegrationDtoService: {
|
|
|
656
709
|
readonly custom: "custom";
|
|
657
710
|
readonly huly: "huly";
|
|
658
711
|
};
|
|
659
|
-
export interface CreateIntegrationDto {
|
|
660
|
-
config: CreateIntegrationDtoConfig;
|
|
661
|
-
description?: string;
|
|
662
|
-
name: string;
|
|
663
|
-
service: CreateIntegrationDtoService;
|
|
664
|
-
}
|
|
665
712
|
export type CreateIntegrationDtoConfigCustomHeaders = {
|
|
666
713
|
[key: string]: unknown;
|
|
667
714
|
};
|
|
@@ -679,6 +726,12 @@ export type CreateIntegrationDtoConfig = {
|
|
|
679
726
|
teamId?: string;
|
|
680
727
|
webhookUrl?: string;
|
|
681
728
|
};
|
|
729
|
+
export interface CreateIntegrationDto {
|
|
730
|
+
config: CreateIntegrationDtoConfig;
|
|
731
|
+
description?: string;
|
|
732
|
+
name: string;
|
|
733
|
+
service: CreateIntegrationDtoService;
|
|
734
|
+
}
|
|
682
735
|
export interface CreateIntegrationWebhookDto {
|
|
683
736
|
events: string[];
|
|
684
737
|
name: string;
|
|
@@ -765,6 +818,91 @@ export interface V3CreateWebhookDto {
|
|
|
765
818
|
name: string;
|
|
766
819
|
url: string;
|
|
767
820
|
}
|
|
821
|
+
export type V3UpdateChannelMemberDtoRole = typeof V3UpdateChannelMemberDtoRole[keyof typeof V3UpdateChannelMemberDtoRole];
|
|
822
|
+
export declare const V3UpdateChannelMemberDtoRole: {
|
|
823
|
+
readonly admin: "admin";
|
|
824
|
+
readonly moderator: "moderator";
|
|
825
|
+
readonly member: "member";
|
|
826
|
+
};
|
|
827
|
+
/**
|
|
828
|
+
* Bitwise permission string or integer value
|
|
829
|
+
*/
|
|
830
|
+
export type V3UpdateChannelMemberDtoPermissions = {
|
|
831
|
+
[key: string]: unknown;
|
|
832
|
+
};
|
|
833
|
+
export interface V3UpdateChannelMemberDto {
|
|
834
|
+
/** Bitwise permission string or integer value */
|
|
835
|
+
permissions?: V3UpdateChannelMemberDtoPermissions;
|
|
836
|
+
role?: V3UpdateChannelMemberDtoRole;
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* Bitwise permission string or integer value
|
|
840
|
+
*/
|
|
841
|
+
export type V3AddChannelMemberDtoPermissions = {
|
|
842
|
+
[key: string]: unknown;
|
|
843
|
+
};
|
|
844
|
+
export interface V3AddChannelMemberDto {
|
|
845
|
+
/** Bitwise permission string or integer value */
|
|
846
|
+
permissions?: V3AddChannelMemberDtoPermissions;
|
|
847
|
+
/** Channel role */
|
|
848
|
+
role?: string;
|
|
849
|
+
/** User ID to add to channel */
|
|
850
|
+
userId?: string;
|
|
851
|
+
/** Array of user IDs to add */
|
|
852
|
+
userIds?: string[];
|
|
853
|
+
}
|
|
854
|
+
export type V3UpdateChannelDtoType = typeof V3UpdateChannelDtoType[keyof typeof V3UpdateChannelDtoType];
|
|
855
|
+
export declare const V3UpdateChannelDtoType: {
|
|
856
|
+
readonly public: "public";
|
|
857
|
+
readonly private: "private";
|
|
858
|
+
};
|
|
859
|
+
export type V3UpdateChannelDtoMetadata = {
|
|
860
|
+
[key: string]: unknown;
|
|
861
|
+
};
|
|
862
|
+
export interface V3UpdateChannelDto {
|
|
863
|
+
description?: string;
|
|
864
|
+
icon?: string;
|
|
865
|
+
isPrivate?: boolean;
|
|
866
|
+
metadata?: V3UpdateChannelDtoMetadata;
|
|
867
|
+
name?: string;
|
|
868
|
+
type?: V3UpdateChannelDtoType;
|
|
869
|
+
}
|
|
870
|
+
export type V3CreateChannelDtoType = typeof V3CreateChannelDtoType[keyof typeof V3CreateChannelDtoType];
|
|
871
|
+
export declare const V3CreateChannelDtoType: {
|
|
872
|
+
readonly public: "public";
|
|
873
|
+
readonly private: "private";
|
|
874
|
+
};
|
|
875
|
+
/**
|
|
876
|
+
* Custom channel metadata
|
|
877
|
+
*/
|
|
878
|
+
export type V3CreateChannelDtoMetadata = {
|
|
879
|
+
[key: string]: unknown;
|
|
880
|
+
};
|
|
881
|
+
export type V3CreateChannelDtoInitialMembersItemRole = typeof V3CreateChannelDtoInitialMembersItemRole[keyof typeof V3CreateChannelDtoInitialMembersItemRole];
|
|
882
|
+
export declare const V3CreateChannelDtoInitialMembersItemRole: {
|
|
883
|
+
readonly admin: "admin";
|
|
884
|
+
readonly moderator: "moderator";
|
|
885
|
+
readonly member: "member";
|
|
886
|
+
};
|
|
887
|
+
export type V3CreateChannelDtoInitialMembersItem = {
|
|
888
|
+
permissions?: string;
|
|
889
|
+
role?: V3CreateChannelDtoInitialMembersItemRole;
|
|
890
|
+
userId?: string;
|
|
891
|
+
};
|
|
892
|
+
export interface V3CreateChannelDto {
|
|
893
|
+
description?: string;
|
|
894
|
+
/** Icon identifier */
|
|
895
|
+
icon?: string;
|
|
896
|
+
/** Initial members to add to the channel */
|
|
897
|
+
initialMembers?: V3CreateChannelDtoInitialMembersItem[];
|
|
898
|
+
/** Explicit private status flag */
|
|
899
|
+
isPrivate?: boolean;
|
|
900
|
+
/** Custom channel metadata */
|
|
901
|
+
metadata?: V3CreateChannelDtoMetadata;
|
|
902
|
+
/** Name of the channel */
|
|
903
|
+
name: string;
|
|
904
|
+
type?: V3CreateChannelDtoType;
|
|
905
|
+
}
|
|
768
906
|
export type V3UpdateMemberRoleDtoRole = typeof V3UpdateMemberRoleDtoRole[keyof typeof V3UpdateMemberRoleDtoRole];
|
|
769
907
|
export declare const V3UpdateMemberRoleDtoRole: {
|
|
770
908
|
readonly owner: "owner";
|
|
@@ -1987,6 +2125,279 @@ export declare const useV3WorkspacesControllerDeleteWorkspaceMember: <TError = E
|
|
|
1987
2125
|
slug: string;
|
|
1988
2126
|
userId: string;
|
|
1989
2127
|
}, TContext>;
|
|
2128
|
+
/**
|
|
2129
|
+
* Retrieve all public channels and authorized private channels in a workspace. Requires channels:read scope.
|
|
2130
|
+
* @summary List channels in a workspace (Enterprise M2M)
|
|
2131
|
+
*/
|
|
2132
|
+
export declare const v3WorkspacesControllerGetChannels: (slug: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<void>;
|
|
2133
|
+
export declare const getV3WorkspacesControllerGetChannelsQueryKey: (slug: string) => readonly [`/api/v3/workspaces/${string}/channels`];
|
|
2134
|
+
export declare const getV3WorkspacesControllerGetChannelsQueryOptions: <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>, TError = ErrorType<void>>(slug: string, options?: {
|
|
2135
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>, TError, TData>>;
|
|
2136
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2137
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>, TError, TData> & {
|
|
2138
|
+
queryKey: QueryKey;
|
|
2139
|
+
};
|
|
2140
|
+
export type V3WorkspacesControllerGetChannelsQueryResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>>;
|
|
2141
|
+
export type V3WorkspacesControllerGetChannelsQueryError = ErrorType<void>;
|
|
2142
|
+
/**
|
|
2143
|
+
* @summary List channels in a workspace (Enterprise M2M)
|
|
2144
|
+
*/
|
|
2145
|
+
export declare const useV3WorkspacesControllerGetChannels: <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>, TError = ErrorType<void>>(slug: string, options?: {
|
|
2146
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>, TError, TData>>;
|
|
2147
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2148
|
+
}) => UseQueryResult<TData, TError> & {
|
|
2149
|
+
queryKey: QueryKey;
|
|
2150
|
+
};
|
|
2151
|
+
/**
|
|
2152
|
+
* Create a new channel with customizable visibility, icon, metadata, and members. Requires channels:write scope.
|
|
2153
|
+
* @summary Create a channel in a workspace (Enterprise M2M)
|
|
2154
|
+
*/
|
|
2155
|
+
export declare const v3WorkspacesControllerCreateChannel: (slug: string, v3CreateChannelDto: BodyType<V3CreateChannelDto>, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
2156
|
+
export declare const getV3WorkspacesControllerCreateChannelMutationOptions: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
2157
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerCreateChannel>>, TError, {
|
|
2158
|
+
slug: string;
|
|
2159
|
+
data: BodyType<V3CreateChannelDto>;
|
|
2160
|
+
}, TContext>;
|
|
2161
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2162
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerCreateChannel>>, TError, {
|
|
2163
|
+
slug: string;
|
|
2164
|
+
data: BodyType<V3CreateChannelDto>;
|
|
2165
|
+
}, TContext>;
|
|
2166
|
+
export type V3WorkspacesControllerCreateChannelMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerCreateChannel>>>;
|
|
2167
|
+
export type V3WorkspacesControllerCreateChannelMutationBody = BodyType<V3CreateChannelDto>;
|
|
2168
|
+
export type V3WorkspacesControllerCreateChannelMutationError = ErrorType<void>;
|
|
2169
|
+
/**
|
|
2170
|
+
* @summary Create a channel in a workspace (Enterprise M2M)
|
|
2171
|
+
*/
|
|
2172
|
+
export declare const useV3WorkspacesControllerCreateChannel: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
2173
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerCreateChannel>>, TError, {
|
|
2174
|
+
slug: string;
|
|
2175
|
+
data: BodyType<V3CreateChannelDto>;
|
|
2176
|
+
}, TContext>;
|
|
2177
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2178
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof v3WorkspacesControllerCreateChannel>>, TError, {
|
|
2179
|
+
slug: string;
|
|
2180
|
+
data: BodyType<V3CreateChannelDto>;
|
|
2181
|
+
}, TContext>;
|
|
2182
|
+
/**
|
|
2183
|
+
* Retrieve details of a specific channel in a workspace. Requires channels:read scope.
|
|
2184
|
+
* @summary Get channel details (Enterprise M2M)
|
|
2185
|
+
*/
|
|
2186
|
+
export declare const v3WorkspacesControllerGetChannel: (slug: string, channelId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<void>;
|
|
2187
|
+
export declare const getV3WorkspacesControllerGetChannelQueryKey: (slug: string, channelId: string) => readonly [`/api/v3/workspaces/${string}/channels/${string}`];
|
|
2188
|
+
export declare const getV3WorkspacesControllerGetChannelQueryOptions: <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>, TError = ErrorType<void>>(slug: string, channelId: string, options?: {
|
|
2189
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>, TError, TData>>;
|
|
2190
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2191
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>, TError, TData> & {
|
|
2192
|
+
queryKey: QueryKey;
|
|
2193
|
+
};
|
|
2194
|
+
export type V3WorkspacesControllerGetChannelQueryResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>>;
|
|
2195
|
+
export type V3WorkspacesControllerGetChannelQueryError = ErrorType<void>;
|
|
2196
|
+
/**
|
|
2197
|
+
* @summary Get channel details (Enterprise M2M)
|
|
2198
|
+
*/
|
|
2199
|
+
export declare const useV3WorkspacesControllerGetChannel: <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>, TError = ErrorType<void>>(slug: string, channelId: string, options?: {
|
|
2200
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>, TError, TData>>;
|
|
2201
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2202
|
+
}) => UseQueryResult<TData, TError> & {
|
|
2203
|
+
queryKey: QueryKey;
|
|
2204
|
+
};
|
|
2205
|
+
/**
|
|
2206
|
+
* Update settings, name, description, icon, metadata, or visibility of a channel. Requires channels:write scope.
|
|
2207
|
+
* @summary Update channel configuration and visibility (Enterprise M2M)
|
|
2208
|
+
*/
|
|
2209
|
+
export declare const v3WorkspacesControllerUpdateChannel: (slug: string, channelId: string, v3UpdateChannelDto: BodyType<V3UpdateChannelDto>, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
2210
|
+
export declare const getV3WorkspacesControllerUpdateChannelMutationOptions: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
2211
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannel>>, TError, {
|
|
2212
|
+
slug: string;
|
|
2213
|
+
channelId: string;
|
|
2214
|
+
data: BodyType<V3UpdateChannelDto>;
|
|
2215
|
+
}, TContext>;
|
|
2216
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2217
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannel>>, TError, {
|
|
2218
|
+
slug: string;
|
|
2219
|
+
channelId: string;
|
|
2220
|
+
data: BodyType<V3UpdateChannelDto>;
|
|
2221
|
+
}, TContext>;
|
|
2222
|
+
export type V3WorkspacesControllerUpdateChannelMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannel>>>;
|
|
2223
|
+
export type V3WorkspacesControllerUpdateChannelMutationBody = BodyType<V3UpdateChannelDto>;
|
|
2224
|
+
export type V3WorkspacesControllerUpdateChannelMutationError = ErrorType<void>;
|
|
2225
|
+
/**
|
|
2226
|
+
* @summary Update channel configuration and visibility (Enterprise M2M)
|
|
2227
|
+
*/
|
|
2228
|
+
export declare const useV3WorkspacesControllerUpdateChannel: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
2229
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannel>>, TError, {
|
|
2230
|
+
slug: string;
|
|
2231
|
+
channelId: string;
|
|
2232
|
+
data: BodyType<V3UpdateChannelDto>;
|
|
2233
|
+
}, TContext>;
|
|
2234
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2235
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannel>>, TError, {
|
|
2236
|
+
slug: string;
|
|
2237
|
+
channelId: string;
|
|
2238
|
+
data: BodyType<V3UpdateChannelDto>;
|
|
2239
|
+
}, TContext>;
|
|
2240
|
+
/**
|
|
2241
|
+
* Permanently deletes a channel from a workspace. Requires channels:write scope.
|
|
2242
|
+
* @summary Delete a channel (Enterprise M2M)
|
|
2243
|
+
*/
|
|
2244
|
+
export declare const v3WorkspacesControllerDeleteChannel: (slug: string, channelId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
2245
|
+
export declare const getV3WorkspacesControllerDeleteChannelMutationOptions: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
2246
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannel>>, TError, {
|
|
2247
|
+
slug: string;
|
|
2248
|
+
channelId: string;
|
|
2249
|
+
}, TContext>;
|
|
2250
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2251
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannel>>, TError, {
|
|
2252
|
+
slug: string;
|
|
2253
|
+
channelId: string;
|
|
2254
|
+
}, TContext>;
|
|
2255
|
+
export type V3WorkspacesControllerDeleteChannelMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannel>>>;
|
|
2256
|
+
export type V3WorkspacesControllerDeleteChannelMutationError = ErrorType<void>;
|
|
2257
|
+
/**
|
|
2258
|
+
* @summary Delete a channel (Enterprise M2M)
|
|
2259
|
+
*/
|
|
2260
|
+
export declare const useV3WorkspacesControllerDeleteChannel: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
2261
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannel>>, TError, {
|
|
2262
|
+
slug: string;
|
|
2263
|
+
channelId: string;
|
|
2264
|
+
}, TContext>;
|
|
2265
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2266
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannel>>, TError, {
|
|
2267
|
+
slug: string;
|
|
2268
|
+
channelId: string;
|
|
2269
|
+
}, TContext>;
|
|
2270
|
+
/**
|
|
2271
|
+
* Retrieve members belonging to a specific channel. Requires channels:read scope.
|
|
2272
|
+
* @summary List channel members (Enterprise M2M)
|
|
2273
|
+
*/
|
|
2274
|
+
export declare const v3WorkspacesControllerGetChannelMembers: (slug: string, channelId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<void>;
|
|
2275
|
+
export declare const getV3WorkspacesControllerGetChannelMembersQueryKey: (slug: string, channelId: string) => readonly [`/api/v3/workspaces/${string}/channels/${string}/members`];
|
|
2276
|
+
export declare const getV3WorkspacesControllerGetChannelMembersQueryOptions: <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>, TError = ErrorType<unknown>>(slug: string, channelId: string, options?: {
|
|
2277
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>, TError, TData>>;
|
|
2278
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2279
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>, TError, TData> & {
|
|
2280
|
+
queryKey: QueryKey;
|
|
2281
|
+
};
|
|
2282
|
+
export type V3WorkspacesControllerGetChannelMembersQueryResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>>;
|
|
2283
|
+
export type V3WorkspacesControllerGetChannelMembersQueryError = ErrorType<unknown>;
|
|
2284
|
+
/**
|
|
2285
|
+
* @summary List channel members (Enterprise M2M)
|
|
2286
|
+
*/
|
|
2287
|
+
export declare const useV3WorkspacesControllerGetChannelMembers: <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>, TError = ErrorType<unknown>>(slug: string, channelId: string, options?: {
|
|
2288
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>, TError, TData>>;
|
|
2289
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2290
|
+
}) => UseQueryResult<TData, TError> & {
|
|
2291
|
+
queryKey: QueryKey;
|
|
2292
|
+
};
|
|
2293
|
+
/**
|
|
2294
|
+
* Add user(s) to a channel with customizable role and permissions. Requires channels:write scope.
|
|
2295
|
+
* @summary Add members to a channel (Enterprise M2M)
|
|
2296
|
+
*/
|
|
2297
|
+
export declare const v3WorkspacesControllerAddChannelMembers: (slug: string, channelId: string, v3AddChannelMemberDto: BodyType<V3AddChannelMemberDto>, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
2298
|
+
export declare const getV3WorkspacesControllerAddChannelMembersMutationOptions: <TError = ErrorType<unknown>, TContext = unknown>(options?: {
|
|
2299
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerAddChannelMembers>>, TError, {
|
|
2300
|
+
slug: string;
|
|
2301
|
+
channelId: string;
|
|
2302
|
+
data: BodyType<V3AddChannelMemberDto>;
|
|
2303
|
+
}, TContext>;
|
|
2304
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2305
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerAddChannelMembers>>, TError, {
|
|
2306
|
+
slug: string;
|
|
2307
|
+
channelId: string;
|
|
2308
|
+
data: BodyType<V3AddChannelMemberDto>;
|
|
2309
|
+
}, TContext>;
|
|
2310
|
+
export type V3WorkspacesControllerAddChannelMembersMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerAddChannelMembers>>>;
|
|
2311
|
+
export type V3WorkspacesControllerAddChannelMembersMutationBody = BodyType<V3AddChannelMemberDto>;
|
|
2312
|
+
export type V3WorkspacesControllerAddChannelMembersMutationError = ErrorType<unknown>;
|
|
2313
|
+
/**
|
|
2314
|
+
* @summary Add members to a channel (Enterprise M2M)
|
|
2315
|
+
*/
|
|
2316
|
+
export declare const useV3WorkspacesControllerAddChannelMembers: <TError = ErrorType<unknown>, TContext = unknown>(options?: {
|
|
2317
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerAddChannelMembers>>, TError, {
|
|
2318
|
+
slug: string;
|
|
2319
|
+
channelId: string;
|
|
2320
|
+
data: BodyType<V3AddChannelMemberDto>;
|
|
2321
|
+
}, TContext>;
|
|
2322
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2323
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof v3WorkspacesControllerAddChannelMembers>>, TError, {
|
|
2324
|
+
slug: string;
|
|
2325
|
+
channelId: string;
|
|
2326
|
+
data: BodyType<V3AddChannelMemberDto>;
|
|
2327
|
+
}, TContext>;
|
|
2328
|
+
/**
|
|
2329
|
+
* Update the role or bitwise permissions of a channel member. Requires channels:write scope.
|
|
2330
|
+
* @summary Update channel member role and permissions (Enterprise M2M)
|
|
2331
|
+
*/
|
|
2332
|
+
export declare const v3WorkspacesControllerUpdateChannelMember: (slug: string, channelId: string, userId: string, v3UpdateChannelMemberDto: BodyType<V3UpdateChannelMemberDto>, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
2333
|
+
export declare const getV3WorkspacesControllerUpdateChannelMemberMutationOptions: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
2334
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannelMember>>, TError, {
|
|
2335
|
+
slug: string;
|
|
2336
|
+
channelId: string;
|
|
2337
|
+
userId: string;
|
|
2338
|
+
data: BodyType<V3UpdateChannelMemberDto>;
|
|
2339
|
+
}, TContext>;
|
|
2340
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2341
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannelMember>>, TError, {
|
|
2342
|
+
slug: string;
|
|
2343
|
+
channelId: string;
|
|
2344
|
+
userId: string;
|
|
2345
|
+
data: BodyType<V3UpdateChannelMemberDto>;
|
|
2346
|
+
}, TContext>;
|
|
2347
|
+
export type V3WorkspacesControllerUpdateChannelMemberMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannelMember>>>;
|
|
2348
|
+
export type V3WorkspacesControllerUpdateChannelMemberMutationBody = BodyType<V3UpdateChannelMemberDto>;
|
|
2349
|
+
export type V3WorkspacesControllerUpdateChannelMemberMutationError = ErrorType<void>;
|
|
2350
|
+
/**
|
|
2351
|
+
* @summary Update channel member role and permissions (Enterprise M2M)
|
|
2352
|
+
*/
|
|
2353
|
+
export declare const useV3WorkspacesControllerUpdateChannelMember: <TError = ErrorType<void>, TContext = unknown>(options?: {
|
|
2354
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannelMember>>, TError, {
|
|
2355
|
+
slug: string;
|
|
2356
|
+
channelId: string;
|
|
2357
|
+
userId: string;
|
|
2358
|
+
data: BodyType<V3UpdateChannelMemberDto>;
|
|
2359
|
+
}, TContext>;
|
|
2360
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2361
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannelMember>>, TError, {
|
|
2362
|
+
slug: string;
|
|
2363
|
+
channelId: string;
|
|
2364
|
+
userId: string;
|
|
2365
|
+
data: BodyType<V3UpdateChannelMemberDto>;
|
|
2366
|
+
}, TContext>;
|
|
2367
|
+
/**
|
|
2368
|
+
* Remove a specific member from a channel. Requires channels:write scope.
|
|
2369
|
+
* @summary Remove a member from a channel (Enterprise M2M)
|
|
2370
|
+
*/
|
|
2371
|
+
export declare const v3WorkspacesControllerDeleteChannelMember: (slug: string, channelId: string, userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
2372
|
+
export declare const getV3WorkspacesControllerDeleteChannelMemberMutationOptions: <TError = ErrorType<unknown>, TContext = unknown>(options?: {
|
|
2373
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannelMember>>, TError, {
|
|
2374
|
+
slug: string;
|
|
2375
|
+
channelId: string;
|
|
2376
|
+
userId: string;
|
|
2377
|
+
}, TContext>;
|
|
2378
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2379
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannelMember>>, TError, {
|
|
2380
|
+
slug: string;
|
|
2381
|
+
channelId: string;
|
|
2382
|
+
userId: string;
|
|
2383
|
+
}, TContext>;
|
|
2384
|
+
export type V3WorkspacesControllerDeleteChannelMemberMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannelMember>>>;
|
|
2385
|
+
export type V3WorkspacesControllerDeleteChannelMemberMutationError = ErrorType<unknown>;
|
|
2386
|
+
/**
|
|
2387
|
+
* @summary Remove a member from a channel (Enterprise M2M)
|
|
2388
|
+
*/
|
|
2389
|
+
export declare const useV3WorkspacesControllerDeleteChannelMember: <TError = ErrorType<unknown>, TContext = unknown>(options?: {
|
|
2390
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannelMember>>, TError, {
|
|
2391
|
+
slug: string;
|
|
2392
|
+
channelId: string;
|
|
2393
|
+
userId: string;
|
|
2394
|
+
}, TContext>;
|
|
2395
|
+
request?: SecondParameter<typeof customInstance>;
|
|
2396
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannelMember>>, TError, {
|
|
2397
|
+
slug: string;
|
|
2398
|
+
channelId: string;
|
|
2399
|
+
userId: string;
|
|
2400
|
+
}, TContext>;
|
|
1990
2401
|
/**
|
|
1991
2402
|
* Requires webhooks:read scope. Retrieves all webhooks configured for this workspace.
|
|
1992
2403
|
* @summary List all webhooks in the workspace
|
|
@@ -4960,18 +5371,21 @@ export declare const useChannelsControllerGetChannelMembers: <TData = Awaited<Re
|
|
|
4960
5371
|
/**
|
|
4961
5372
|
* @summary Add members to a channel
|
|
4962
5373
|
*/
|
|
4963
|
-
export declare const channelsControllerAddChannelMembers: (slug: string, channelId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
5374
|
+
export declare const channelsControllerAddChannelMembers: (slug: string, channelId: string, addChannelMemberDto: BodyType<AddChannelMemberDto>, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
4964
5375
|
export declare const getChannelsControllerAddChannelMembersMutationOptions: <TError = ErrorType<unknown>, TContext = unknown>(options?: {
|
|
4965
5376
|
mutation?: UseMutationOptions<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, TError, {
|
|
4966
5377
|
slug: string;
|
|
4967
5378
|
channelId: string;
|
|
5379
|
+
data: BodyType<AddChannelMemberDto>;
|
|
4968
5380
|
}, TContext>;
|
|
4969
5381
|
request?: SecondParameter<typeof customInstance>;
|
|
4970
5382
|
}) => UseMutationOptions<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, TError, {
|
|
4971
5383
|
slug: string;
|
|
4972
5384
|
channelId: string;
|
|
5385
|
+
data: BodyType<AddChannelMemberDto>;
|
|
4973
5386
|
}, TContext>;
|
|
4974
5387
|
export type ChannelsControllerAddChannelMembersMutationResult = NonNullable<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>>;
|
|
5388
|
+
export type ChannelsControllerAddChannelMembersMutationBody = BodyType<AddChannelMemberDto>;
|
|
4975
5389
|
export type ChannelsControllerAddChannelMembersMutationError = ErrorType<unknown>;
|
|
4976
5390
|
/**
|
|
4977
5391
|
* @summary Add members to a channel
|
|
@@ -4980,11 +5394,51 @@ export declare const useChannelsControllerAddChannelMembers: <TError = ErrorType
|
|
|
4980
5394
|
mutation?: UseMutationOptions<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, TError, {
|
|
4981
5395
|
slug: string;
|
|
4982
5396
|
channelId: string;
|
|
5397
|
+
data: BodyType<AddChannelMemberDto>;
|
|
4983
5398
|
}, TContext>;
|
|
4984
5399
|
request?: SecondParameter<typeof customInstance>;
|
|
4985
5400
|
}) => UseMutationResult<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, TError, {
|
|
4986
5401
|
slug: string;
|
|
4987
5402
|
channelId: string;
|
|
5403
|
+
data: BodyType<AddChannelMemberDto>;
|
|
5404
|
+
}, TContext>;
|
|
5405
|
+
/**
|
|
5406
|
+
* @summary Update channel member role and permissions
|
|
5407
|
+
*/
|
|
5408
|
+
export declare const channelsControllerUpdateChannelMember: (slug: string, channelId: string, targetUserId: string, updateChannelMemberDto: BodyType<UpdateChannelMemberDto>, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
5409
|
+
export declare const getChannelsControllerUpdateChannelMemberMutationOptions: <TError = ErrorType<unknown>, TContext = unknown>(options?: {
|
|
5410
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof channelsControllerUpdateChannelMember>>, TError, {
|
|
5411
|
+
slug: string;
|
|
5412
|
+
channelId: string;
|
|
5413
|
+
targetUserId: string;
|
|
5414
|
+
data: BodyType<UpdateChannelMemberDto>;
|
|
5415
|
+
}, TContext>;
|
|
5416
|
+
request?: SecondParameter<typeof customInstance>;
|
|
5417
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof channelsControllerUpdateChannelMember>>, TError, {
|
|
5418
|
+
slug: string;
|
|
5419
|
+
channelId: string;
|
|
5420
|
+
targetUserId: string;
|
|
5421
|
+
data: BodyType<UpdateChannelMemberDto>;
|
|
5422
|
+
}, TContext>;
|
|
5423
|
+
export type ChannelsControllerUpdateChannelMemberMutationResult = NonNullable<Awaited<ReturnType<typeof channelsControllerUpdateChannelMember>>>;
|
|
5424
|
+
export type ChannelsControllerUpdateChannelMemberMutationBody = BodyType<UpdateChannelMemberDto>;
|
|
5425
|
+
export type ChannelsControllerUpdateChannelMemberMutationError = ErrorType<unknown>;
|
|
5426
|
+
/**
|
|
5427
|
+
* @summary Update channel member role and permissions
|
|
5428
|
+
*/
|
|
5429
|
+
export declare const useChannelsControllerUpdateChannelMember: <TError = ErrorType<unknown>, TContext = unknown>(options?: {
|
|
5430
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof channelsControllerUpdateChannelMember>>, TError, {
|
|
5431
|
+
slug: string;
|
|
5432
|
+
channelId: string;
|
|
5433
|
+
targetUserId: string;
|
|
5434
|
+
data: BodyType<UpdateChannelMemberDto>;
|
|
5435
|
+
}, TContext>;
|
|
5436
|
+
request?: SecondParameter<typeof customInstance>;
|
|
5437
|
+
}) => UseMutationResult<Awaited<ReturnType<typeof channelsControllerUpdateChannelMember>>, TError, {
|
|
5438
|
+
slug: string;
|
|
5439
|
+
channelId: string;
|
|
5440
|
+
targetUserId: string;
|
|
5441
|
+
data: BodyType<UpdateChannelMemberDto>;
|
|
4988
5442
|
}, TContext>;
|
|
4989
5443
|
/**
|
|
4990
5444
|
* @summary Remove a member from a channel
|