@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
|
@@ -286,11 +286,6 @@ export type V3WorkspacesControllerDeleteWorkspace200 = {
|
|
|
286
286
|
timestamp?: string;
|
|
287
287
|
};
|
|
288
288
|
|
|
289
|
-
/**
|
|
290
|
-
* @nullable
|
|
291
|
-
*/
|
|
292
|
-
export type V3WorkspacesControllerUpdateWorkspace200DataWorkspaceBrandingConfig = { [key: string]: unknown } | null;
|
|
293
|
-
|
|
294
289
|
export type V3WorkspacesControllerUpdateWorkspace200DataWorkspace = {
|
|
295
290
|
/** @nullable */
|
|
296
291
|
brandingConfig?: V3WorkspacesControllerUpdateWorkspace200DataWorkspaceBrandingConfig;
|
|
@@ -316,11 +311,10 @@ export type V3WorkspacesControllerUpdateWorkspace200 = {
|
|
|
316
311
|
timestamp?: string;
|
|
317
312
|
};
|
|
318
313
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
};
|
|
314
|
+
/**
|
|
315
|
+
* @nullable
|
|
316
|
+
*/
|
|
317
|
+
export type V3WorkspacesControllerUpdateWorkspace200DataWorkspaceBrandingConfig = { [key: string]: unknown } | null;
|
|
324
318
|
|
|
325
319
|
/**
|
|
326
320
|
* @nullable
|
|
@@ -346,8 +340,8 @@ export type V3WorkspacesControllerGetWorkspaceBySlug200Data = {
|
|
|
346
340
|
workspace?: V3WorkspacesControllerGetWorkspaceBySlug200DataWorkspace;
|
|
347
341
|
};
|
|
348
342
|
|
|
349
|
-
export type
|
|
350
|
-
data?:
|
|
343
|
+
export type V3WorkspacesControllerGetWorkspaceBySlug200 = {
|
|
344
|
+
data?: V3WorkspacesControllerGetWorkspaceBySlug200Data;
|
|
351
345
|
success?: boolean;
|
|
352
346
|
timestamp?: string;
|
|
353
347
|
};
|
|
@@ -369,6 +363,12 @@ export type V3WorkspacesControllerProvisionWorkspace201Data = {
|
|
|
369
363
|
workspace?: V3WorkspacesControllerProvisionWorkspace201DataWorkspace;
|
|
370
364
|
};
|
|
371
365
|
|
|
366
|
+
export type V3WorkspacesControllerProvisionWorkspace201 = {
|
|
367
|
+
data?: V3WorkspacesControllerProvisionWorkspace201Data;
|
|
368
|
+
success?: boolean;
|
|
369
|
+
timestamp?: string;
|
|
370
|
+
};
|
|
371
|
+
|
|
372
372
|
export type V3WorkspacesControllerGetWorkspaces200DataWorkspacesItem = {
|
|
373
373
|
createdAt?: string;
|
|
374
374
|
/** @nullable */
|
|
@@ -648,6 +648,43 @@ export interface CreateWorkspaceDepartmentDto {
|
|
|
648
648
|
slug: string;
|
|
649
649
|
}
|
|
650
650
|
|
|
651
|
+
export type UpdateChannelMemberDtoRole = typeof UpdateChannelMemberDtoRole[keyof typeof UpdateChannelMemberDtoRole];
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
655
|
+
export const UpdateChannelMemberDtoRole = {
|
|
656
|
+
admin: 'admin',
|
|
657
|
+
moderator: 'moderator',
|
|
658
|
+
member: 'member',
|
|
659
|
+
} as const;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* Bitwise permission string or integer value
|
|
663
|
+
*/
|
|
664
|
+
export type UpdateChannelMemberDtoPermissions = { [key: string]: unknown };
|
|
665
|
+
|
|
666
|
+
export interface UpdateChannelMemberDto {
|
|
667
|
+
/** Bitwise permission string or integer value */
|
|
668
|
+
permissions?: UpdateChannelMemberDtoPermissions;
|
|
669
|
+
role?: UpdateChannelMemberDtoRole;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Bitwise permission string or integer value
|
|
674
|
+
*/
|
|
675
|
+
export type AddChannelMemberDtoPermissions = { [key: string]: unknown };
|
|
676
|
+
|
|
677
|
+
export interface AddChannelMemberDto {
|
|
678
|
+
/** Bitwise permission string or integer value */
|
|
679
|
+
permissions?: AddChannelMemberDtoPermissions;
|
|
680
|
+
/** Channel role */
|
|
681
|
+
role?: string;
|
|
682
|
+
/** User ID to add */
|
|
683
|
+
userId?: string;
|
|
684
|
+
/** Array of user IDs to add */
|
|
685
|
+
userIds?: string[];
|
|
686
|
+
}
|
|
687
|
+
|
|
651
688
|
export type UpdateWorkspaceChannelDtoType = typeof UpdateWorkspaceChannelDtoType[keyof typeof UpdateWorkspaceChannelDtoType];
|
|
652
689
|
|
|
653
690
|
|
|
@@ -657,9 +694,18 @@ export const UpdateWorkspaceChannelDtoType = {
|
|
|
657
694
|
private: 'private',
|
|
658
695
|
} as const;
|
|
659
696
|
|
|
697
|
+
/**
|
|
698
|
+
* Custom channel metadata or branding settings
|
|
699
|
+
*/
|
|
700
|
+
export type UpdateWorkspaceChannelDtoMetadata = { [key: string]: unknown };
|
|
701
|
+
|
|
660
702
|
export interface UpdateWorkspaceChannelDto {
|
|
661
703
|
description?: string;
|
|
662
704
|
icon?: string;
|
|
705
|
+
/** Explicit private status flag */
|
|
706
|
+
isPrivate?: boolean;
|
|
707
|
+
/** Custom channel metadata or branding settings */
|
|
708
|
+
metadata?: UpdateWorkspaceChannelDtoMetadata;
|
|
663
709
|
name?: string;
|
|
664
710
|
type?: UpdateWorkspaceChannelDtoType;
|
|
665
711
|
}
|
|
@@ -673,10 +719,19 @@ export const CreateWorkspaceChannelDtoType = {
|
|
|
673
719
|
private: 'private',
|
|
674
720
|
} as const;
|
|
675
721
|
|
|
722
|
+
/**
|
|
723
|
+
* Custom channel metadata or branding settings
|
|
724
|
+
*/
|
|
725
|
+
export type CreateWorkspaceChannelDtoMetadata = { [key: string]: unknown };
|
|
726
|
+
|
|
676
727
|
export interface CreateWorkspaceChannelDto {
|
|
677
728
|
departmentId?: string;
|
|
678
729
|
description?: string;
|
|
679
730
|
icon?: string;
|
|
731
|
+
/** Explicit private status flag */
|
|
732
|
+
isPrivate?: boolean;
|
|
733
|
+
/** Custom channel metadata or branding settings */
|
|
734
|
+
metadata?: CreateWorkspaceChannelDtoMetadata;
|
|
680
735
|
name: string;
|
|
681
736
|
type?: CreateWorkspaceChannelDtoType;
|
|
682
737
|
}
|
|
@@ -804,13 +859,6 @@ export const CreateIntegrationDtoService = {
|
|
|
804
859
|
huly: 'huly',
|
|
805
860
|
} as const;
|
|
806
861
|
|
|
807
|
-
export interface CreateIntegrationDto {
|
|
808
|
-
config: CreateIntegrationDtoConfig;
|
|
809
|
-
description?: string;
|
|
810
|
-
name: string;
|
|
811
|
-
service: CreateIntegrationDtoService;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
862
|
export type CreateIntegrationDtoConfigCustomHeaders = { [key: string]: unknown };
|
|
815
863
|
|
|
816
864
|
export type CreateIntegrationDtoConfig = {
|
|
@@ -828,6 +876,13 @@ export type CreateIntegrationDtoConfig = {
|
|
|
828
876
|
webhookUrl?: string;
|
|
829
877
|
};
|
|
830
878
|
|
|
879
|
+
export interface CreateIntegrationDto {
|
|
880
|
+
config: CreateIntegrationDtoConfig;
|
|
881
|
+
description?: string;
|
|
882
|
+
name: string;
|
|
883
|
+
service: CreateIntegrationDtoService;
|
|
884
|
+
}
|
|
885
|
+
|
|
831
886
|
export interface CreateIntegrationWebhookDto {
|
|
832
887
|
events: string[];
|
|
833
888
|
name: string;
|
|
@@ -933,6 +988,108 @@ export interface V3CreateWebhookDto {
|
|
|
933
988
|
url: string;
|
|
934
989
|
}
|
|
935
990
|
|
|
991
|
+
export type V3UpdateChannelMemberDtoRole = typeof V3UpdateChannelMemberDtoRole[keyof typeof V3UpdateChannelMemberDtoRole];
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
995
|
+
export const V3UpdateChannelMemberDtoRole = {
|
|
996
|
+
admin: 'admin',
|
|
997
|
+
moderator: 'moderator',
|
|
998
|
+
member: 'member',
|
|
999
|
+
} as const;
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* Bitwise permission string or integer value
|
|
1003
|
+
*/
|
|
1004
|
+
export type V3UpdateChannelMemberDtoPermissions = { [key: string]: unknown };
|
|
1005
|
+
|
|
1006
|
+
export interface V3UpdateChannelMemberDto {
|
|
1007
|
+
/** Bitwise permission string or integer value */
|
|
1008
|
+
permissions?: V3UpdateChannelMemberDtoPermissions;
|
|
1009
|
+
role?: V3UpdateChannelMemberDtoRole;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* Bitwise permission string or integer value
|
|
1014
|
+
*/
|
|
1015
|
+
export type V3AddChannelMemberDtoPermissions = { [key: string]: unknown };
|
|
1016
|
+
|
|
1017
|
+
export interface V3AddChannelMemberDto {
|
|
1018
|
+
/** Bitwise permission string or integer value */
|
|
1019
|
+
permissions?: V3AddChannelMemberDtoPermissions;
|
|
1020
|
+
/** Channel role */
|
|
1021
|
+
role?: string;
|
|
1022
|
+
/** User ID to add to channel */
|
|
1023
|
+
userId?: string;
|
|
1024
|
+
/** Array of user IDs to add */
|
|
1025
|
+
userIds?: string[];
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
export type V3UpdateChannelDtoType = typeof V3UpdateChannelDtoType[keyof typeof V3UpdateChannelDtoType];
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
1032
|
+
export const V3UpdateChannelDtoType = {
|
|
1033
|
+
public: 'public',
|
|
1034
|
+
private: 'private',
|
|
1035
|
+
} as const;
|
|
1036
|
+
|
|
1037
|
+
export type V3UpdateChannelDtoMetadata = { [key: string]: unknown };
|
|
1038
|
+
|
|
1039
|
+
export interface V3UpdateChannelDto {
|
|
1040
|
+
description?: string;
|
|
1041
|
+
icon?: string;
|
|
1042
|
+
isPrivate?: boolean;
|
|
1043
|
+
metadata?: V3UpdateChannelDtoMetadata;
|
|
1044
|
+
name?: string;
|
|
1045
|
+
type?: V3UpdateChannelDtoType;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
export type V3CreateChannelDtoType = typeof V3CreateChannelDtoType[keyof typeof V3CreateChannelDtoType];
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
1052
|
+
export const V3CreateChannelDtoType = {
|
|
1053
|
+
public: 'public',
|
|
1054
|
+
private: 'private',
|
|
1055
|
+
} as const;
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Custom channel metadata
|
|
1059
|
+
*/
|
|
1060
|
+
export type V3CreateChannelDtoMetadata = { [key: string]: unknown };
|
|
1061
|
+
|
|
1062
|
+
export type V3CreateChannelDtoInitialMembersItemRole = typeof V3CreateChannelDtoInitialMembersItemRole[keyof typeof V3CreateChannelDtoInitialMembersItemRole];
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
1066
|
+
export const V3CreateChannelDtoInitialMembersItemRole = {
|
|
1067
|
+
admin: 'admin',
|
|
1068
|
+
moderator: 'moderator',
|
|
1069
|
+
member: 'member',
|
|
1070
|
+
} as const;
|
|
1071
|
+
|
|
1072
|
+
export type V3CreateChannelDtoInitialMembersItem = {
|
|
1073
|
+
permissions?: string;
|
|
1074
|
+
role?: V3CreateChannelDtoInitialMembersItemRole;
|
|
1075
|
+
userId?: string;
|
|
1076
|
+
};
|
|
1077
|
+
|
|
1078
|
+
export interface V3CreateChannelDto {
|
|
1079
|
+
description?: string;
|
|
1080
|
+
/** Icon identifier */
|
|
1081
|
+
icon?: string;
|
|
1082
|
+
/** Initial members to add to the channel */
|
|
1083
|
+
initialMembers?: V3CreateChannelDtoInitialMembersItem[];
|
|
1084
|
+
/** Explicit private status flag */
|
|
1085
|
+
isPrivate?: boolean;
|
|
1086
|
+
/** Custom channel metadata */
|
|
1087
|
+
metadata?: V3CreateChannelDtoMetadata;
|
|
1088
|
+
/** Name of the channel */
|
|
1089
|
+
name: string;
|
|
1090
|
+
type?: V3CreateChannelDtoType;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
936
1093
|
export type V3UpdateMemberRoleDtoRole = typeof V3UpdateMemberRoleDtoRole[keyof typeof V3UpdateMemberRoleDtoRole];
|
|
937
1094
|
|
|
938
1095
|
|
|
@@ -3504,36 +3661,652 @@ export const getV3WorkspacesControllerGetWorkspaceBySlugQueryKey = (slug: string
|
|
|
3504
3661
|
}
|
|
3505
3662
|
|
|
3506
3663
|
|
|
3507
|
-
export const getV3WorkspacesControllerGetWorkspaceBySlugQueryOptions = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceBySlug>>, TError = ErrorType<void>>(slug: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceBySlug>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3664
|
+
export const getV3WorkspacesControllerGetWorkspaceBySlugQueryOptions = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceBySlug>>, TError = ErrorType<void>>(slug: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceBySlug>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3665
|
+
) => {
|
|
3666
|
+
|
|
3667
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
3668
|
+
|
|
3669
|
+
const queryKey = queryOptions?.queryKey ?? getV3WorkspacesControllerGetWorkspaceBySlugQueryKey(slug);
|
|
3670
|
+
|
|
3671
|
+
|
|
3672
|
+
|
|
3673
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceBySlug>>> = ({ signal }) => v3WorkspacesControllerGetWorkspaceBySlug(slug, requestOptions, signal);
|
|
3674
|
+
|
|
3675
|
+
|
|
3676
|
+
|
|
3677
|
+
|
|
3678
|
+
|
|
3679
|
+
return { queryKey, queryFn, enabled: !!(slug), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceBySlug>>, TError, TData> & { queryKey: QueryKey }
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
export type V3WorkspacesControllerGetWorkspaceBySlugQueryResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceBySlug>>>
|
|
3683
|
+
export type V3WorkspacesControllerGetWorkspaceBySlugQueryError = ErrorType<void>
|
|
3684
|
+
|
|
3685
|
+
/**
|
|
3686
|
+
* @summary Get workspace details (Enterprise M2M)
|
|
3687
|
+
*/
|
|
3688
|
+
export const useV3WorkspacesControllerGetWorkspaceBySlug = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceBySlug>>, TError = ErrorType<void>>(
|
|
3689
|
+
slug: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceBySlug>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3690
|
+
|
|
3691
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
3692
|
+
|
|
3693
|
+
const queryOptions = getV3WorkspacesControllerGetWorkspaceBySlugQueryOptions(slug,options)
|
|
3694
|
+
|
|
3695
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
3696
|
+
|
|
3697
|
+
query.queryKey = queryOptions.queryKey ;
|
|
3698
|
+
|
|
3699
|
+
return query;
|
|
3700
|
+
}
|
|
3701
|
+
|
|
3702
|
+
|
|
3703
|
+
|
|
3704
|
+
|
|
3705
|
+
/**
|
|
3706
|
+
* Update the configuration and metadata of a specific workspace.
|
|
3707
|
+
* @summary Update a workspace (Enterprise M2M)
|
|
3708
|
+
*/
|
|
3709
|
+
export const v3WorkspacesControllerUpdateWorkspace = (
|
|
3710
|
+
slug: string,
|
|
3711
|
+
v3UpdateWorkspaceDto: BodyType<V3UpdateWorkspaceDto>,
|
|
3712
|
+
options?: SecondParameter<typeof customInstance>,) => {
|
|
3713
|
+
|
|
3714
|
+
|
|
3715
|
+
return customInstance<V3WorkspacesControllerUpdateWorkspace200>(
|
|
3716
|
+
{url: `/api/v3/workspaces/${slug}`, method: 'PATCH',
|
|
3717
|
+
headers: {'Content-Type': 'application/json', },
|
|
3718
|
+
data: v3UpdateWorkspaceDto
|
|
3719
|
+
},
|
|
3720
|
+
options);
|
|
3721
|
+
}
|
|
3722
|
+
|
|
3723
|
+
|
|
3724
|
+
|
|
3725
|
+
export const getV3WorkspacesControllerUpdateWorkspaceMutationOptions = <TError = ErrorType<void>,
|
|
3726
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspace>>, TError,{slug: string;data: BodyType<V3UpdateWorkspaceDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
3727
|
+
): UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspace>>, TError,{slug: string;data: BodyType<V3UpdateWorkspaceDto>}, TContext> => {
|
|
3728
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
3729
|
+
|
|
3730
|
+
|
|
3731
|
+
|
|
3732
|
+
|
|
3733
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspace>>, {slug: string;data: BodyType<V3UpdateWorkspaceDto>}> = (props) => {
|
|
3734
|
+
const {slug,data} = props ?? {};
|
|
3735
|
+
|
|
3736
|
+
return v3WorkspacesControllerUpdateWorkspace(slug,data,requestOptions)
|
|
3737
|
+
}
|
|
3738
|
+
|
|
3739
|
+
|
|
3740
|
+
|
|
3741
|
+
|
|
3742
|
+
return { mutationFn, ...mutationOptions }}
|
|
3743
|
+
|
|
3744
|
+
export type V3WorkspacesControllerUpdateWorkspaceMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspace>>>
|
|
3745
|
+
export type V3WorkspacesControllerUpdateWorkspaceMutationBody = BodyType<V3UpdateWorkspaceDto>
|
|
3746
|
+
export type V3WorkspacesControllerUpdateWorkspaceMutationError = ErrorType<void>
|
|
3747
|
+
|
|
3748
|
+
/**
|
|
3749
|
+
* @summary Update a workspace (Enterprise M2M)
|
|
3750
|
+
*/
|
|
3751
|
+
export const useV3WorkspacesControllerUpdateWorkspace = <TError = ErrorType<void>,
|
|
3752
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspace>>, TError,{slug: string;data: BodyType<V3UpdateWorkspaceDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
3753
|
+
): UseMutationResult<
|
|
3754
|
+
Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspace>>,
|
|
3755
|
+
TError,
|
|
3756
|
+
{slug: string;data: BodyType<V3UpdateWorkspaceDto>},
|
|
3757
|
+
TContext
|
|
3758
|
+
> => {
|
|
3759
|
+
|
|
3760
|
+
const mutationOptions = getV3WorkspacesControllerUpdateWorkspaceMutationOptions(options);
|
|
3761
|
+
|
|
3762
|
+
return useMutation(mutationOptions);
|
|
3763
|
+
}
|
|
3764
|
+
|
|
3765
|
+
/**
|
|
3766
|
+
* Permanently deletes a specific workspace.
|
|
3767
|
+
* @summary Delete a workspace (Enterprise M2M)
|
|
3768
|
+
*/
|
|
3769
|
+
export const v3WorkspacesControllerDeleteWorkspace = (
|
|
3770
|
+
slug: string,
|
|
3771
|
+
options?: SecondParameter<typeof customInstance>,) => {
|
|
3772
|
+
|
|
3773
|
+
|
|
3774
|
+
return customInstance<V3WorkspacesControllerDeleteWorkspace200>(
|
|
3775
|
+
{url: `/api/v3/workspaces/${slug}`, method: 'DELETE'
|
|
3776
|
+
},
|
|
3777
|
+
options);
|
|
3778
|
+
}
|
|
3779
|
+
|
|
3780
|
+
|
|
3781
|
+
|
|
3782
|
+
export const getV3WorkspacesControllerDeleteWorkspaceMutationOptions = <TError = ErrorType<void>,
|
|
3783
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspace>>, TError,{slug: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
3784
|
+
): UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspace>>, TError,{slug: string}, TContext> => {
|
|
3785
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
3786
|
+
|
|
3787
|
+
|
|
3788
|
+
|
|
3789
|
+
|
|
3790
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspace>>, {slug: string}> = (props) => {
|
|
3791
|
+
const {slug} = props ?? {};
|
|
3792
|
+
|
|
3793
|
+
return v3WorkspacesControllerDeleteWorkspace(slug,requestOptions)
|
|
3794
|
+
}
|
|
3795
|
+
|
|
3796
|
+
|
|
3797
|
+
|
|
3798
|
+
|
|
3799
|
+
return { mutationFn, ...mutationOptions }}
|
|
3800
|
+
|
|
3801
|
+
export type V3WorkspacesControllerDeleteWorkspaceMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspace>>>
|
|
3802
|
+
|
|
3803
|
+
export type V3WorkspacesControllerDeleteWorkspaceMutationError = ErrorType<void>
|
|
3804
|
+
|
|
3805
|
+
/**
|
|
3806
|
+
* @summary Delete a workspace (Enterprise M2M)
|
|
3807
|
+
*/
|
|
3808
|
+
export const useV3WorkspacesControllerDeleteWorkspace = <TError = ErrorType<void>,
|
|
3809
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspace>>, TError,{slug: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
3810
|
+
): UseMutationResult<
|
|
3811
|
+
Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspace>>,
|
|
3812
|
+
TError,
|
|
3813
|
+
{slug: string},
|
|
3814
|
+
TContext
|
|
3815
|
+
> => {
|
|
3816
|
+
|
|
3817
|
+
const mutationOptions = getV3WorkspacesControllerDeleteWorkspaceMutationOptions(options);
|
|
3818
|
+
|
|
3819
|
+
return useMutation(mutationOptions);
|
|
3820
|
+
}
|
|
3821
|
+
|
|
3822
|
+
/**
|
|
3823
|
+
* Retrieve all members of a specific workspace. Requires members:read scope.
|
|
3824
|
+
* @summary List all workspace members (Enterprise M2M)
|
|
3825
|
+
*/
|
|
3826
|
+
export const v3WorkspacesControllerGetWorkspaceMembers = (
|
|
3827
|
+
slug: string,
|
|
3828
|
+
options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
|
|
3829
|
+
) => {
|
|
3830
|
+
|
|
3831
|
+
|
|
3832
|
+
return customInstance<void>(
|
|
3833
|
+
{url: `/api/v3/workspaces/${slug}/members`, method: 'GET', signal
|
|
3834
|
+
},
|
|
3835
|
+
options);
|
|
3836
|
+
}
|
|
3837
|
+
|
|
3838
|
+
|
|
3839
|
+
export const getV3WorkspacesControllerGetWorkspaceMembersQueryKey = (slug: string,) => {
|
|
3840
|
+
return [`/api/v3/workspaces/${slug}/members`] as const;
|
|
3841
|
+
}
|
|
3842
|
+
|
|
3843
|
+
|
|
3844
|
+
export const getV3WorkspacesControllerGetWorkspaceMembersQueryOptions = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMembers>>, TError = ErrorType<void>>(slug: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMembers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3845
|
+
) => {
|
|
3846
|
+
|
|
3847
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
3848
|
+
|
|
3849
|
+
const queryKey = queryOptions?.queryKey ?? getV3WorkspacesControllerGetWorkspaceMembersQueryKey(slug);
|
|
3850
|
+
|
|
3851
|
+
|
|
3852
|
+
|
|
3853
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMembers>>> = ({ signal }) => v3WorkspacesControllerGetWorkspaceMembers(slug, requestOptions, signal);
|
|
3854
|
+
|
|
3855
|
+
|
|
3856
|
+
|
|
3857
|
+
|
|
3858
|
+
|
|
3859
|
+
return { queryKey, queryFn, enabled: !!(slug), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMembers>>, TError, TData> & { queryKey: QueryKey }
|
|
3860
|
+
}
|
|
3861
|
+
|
|
3862
|
+
export type V3WorkspacesControllerGetWorkspaceMembersQueryResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMembers>>>
|
|
3863
|
+
export type V3WorkspacesControllerGetWorkspaceMembersQueryError = ErrorType<void>
|
|
3864
|
+
|
|
3865
|
+
/**
|
|
3866
|
+
* @summary List all workspace members (Enterprise M2M)
|
|
3867
|
+
*/
|
|
3868
|
+
export const useV3WorkspacesControllerGetWorkspaceMembers = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMembers>>, TError = ErrorType<void>>(
|
|
3869
|
+
slug: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMembers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3870
|
+
|
|
3871
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
3872
|
+
|
|
3873
|
+
const queryOptions = getV3WorkspacesControllerGetWorkspaceMembersQueryOptions(slug,options)
|
|
3874
|
+
|
|
3875
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
3876
|
+
|
|
3877
|
+
query.queryKey = queryOptions.queryKey ;
|
|
3878
|
+
|
|
3879
|
+
return query;
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3882
|
+
|
|
3883
|
+
|
|
3884
|
+
|
|
3885
|
+
/**
|
|
3886
|
+
* Add a new member to a specific workspace. Requires members:write scope.
|
|
3887
|
+
* @summary Add a member to the workspace (Enterprise M2M)
|
|
3888
|
+
*/
|
|
3889
|
+
export const v3WorkspacesControllerAddWorkspaceMember = (
|
|
3890
|
+
slug: string,
|
|
3891
|
+
v3AddMemberDto: BodyType<V3AddMemberDto>,
|
|
3892
|
+
options?: SecondParameter<typeof customInstance>,) => {
|
|
3893
|
+
|
|
3894
|
+
|
|
3895
|
+
return customInstance<void>(
|
|
3896
|
+
{url: `/api/v3/workspaces/${slug}/members`, method: 'POST',
|
|
3897
|
+
headers: {'Content-Type': 'application/json', },
|
|
3898
|
+
data: v3AddMemberDto
|
|
3899
|
+
},
|
|
3900
|
+
options);
|
|
3901
|
+
}
|
|
3902
|
+
|
|
3903
|
+
|
|
3904
|
+
|
|
3905
|
+
export const getV3WorkspacesControllerAddWorkspaceMemberMutationOptions = <TError = ErrorType<void>,
|
|
3906
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerAddWorkspaceMember>>, TError,{slug: string;data: BodyType<V3AddMemberDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
3907
|
+
): UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerAddWorkspaceMember>>, TError,{slug: string;data: BodyType<V3AddMemberDto>}, TContext> => {
|
|
3908
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
3909
|
+
|
|
3910
|
+
|
|
3911
|
+
|
|
3912
|
+
|
|
3913
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof v3WorkspacesControllerAddWorkspaceMember>>, {slug: string;data: BodyType<V3AddMemberDto>}> = (props) => {
|
|
3914
|
+
const {slug,data} = props ?? {};
|
|
3915
|
+
|
|
3916
|
+
return v3WorkspacesControllerAddWorkspaceMember(slug,data,requestOptions)
|
|
3917
|
+
}
|
|
3918
|
+
|
|
3919
|
+
|
|
3920
|
+
|
|
3921
|
+
|
|
3922
|
+
return { mutationFn, ...mutationOptions }}
|
|
3923
|
+
|
|
3924
|
+
export type V3WorkspacesControllerAddWorkspaceMemberMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerAddWorkspaceMember>>>
|
|
3925
|
+
export type V3WorkspacesControllerAddWorkspaceMemberMutationBody = BodyType<V3AddMemberDto>
|
|
3926
|
+
export type V3WorkspacesControllerAddWorkspaceMemberMutationError = ErrorType<void>
|
|
3927
|
+
|
|
3928
|
+
/**
|
|
3929
|
+
* @summary Add a member to the workspace (Enterprise M2M)
|
|
3930
|
+
*/
|
|
3931
|
+
export const useV3WorkspacesControllerAddWorkspaceMember = <TError = ErrorType<void>,
|
|
3932
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerAddWorkspaceMember>>, TError,{slug: string;data: BodyType<V3AddMemberDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
3933
|
+
): UseMutationResult<
|
|
3934
|
+
Awaited<ReturnType<typeof v3WorkspacesControllerAddWorkspaceMember>>,
|
|
3935
|
+
TError,
|
|
3936
|
+
{slug: string;data: BodyType<V3AddMemberDto>},
|
|
3937
|
+
TContext
|
|
3938
|
+
> => {
|
|
3939
|
+
|
|
3940
|
+
const mutationOptions = getV3WorkspacesControllerAddWorkspaceMemberMutationOptions(options);
|
|
3941
|
+
|
|
3942
|
+
return useMutation(mutationOptions);
|
|
3943
|
+
}
|
|
3944
|
+
|
|
3945
|
+
/**
|
|
3946
|
+
* Retrieve details of a specific workspace member by userId. Requires members:read scope.
|
|
3947
|
+
* @summary Get details of a specific workspace member (Enterprise M2M)
|
|
3948
|
+
*/
|
|
3949
|
+
export const v3WorkspacesControllerGetWorkspaceMember = (
|
|
3950
|
+
slug: string,
|
|
3951
|
+
userId: string,
|
|
3952
|
+
options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
|
|
3953
|
+
) => {
|
|
3954
|
+
|
|
3955
|
+
|
|
3956
|
+
return customInstance<void>(
|
|
3957
|
+
{url: `/api/v3/workspaces/${slug}/members/${userId}`, method: 'GET', signal
|
|
3958
|
+
},
|
|
3959
|
+
options);
|
|
3960
|
+
}
|
|
3961
|
+
|
|
3962
|
+
|
|
3963
|
+
export const getV3WorkspacesControllerGetWorkspaceMemberQueryKey = (slug: string,
|
|
3964
|
+
userId: string,) => {
|
|
3965
|
+
return [`/api/v3/workspaces/${slug}/members/${userId}`] as const;
|
|
3966
|
+
}
|
|
3967
|
+
|
|
3968
|
+
|
|
3969
|
+
export const getV3WorkspacesControllerGetWorkspaceMemberQueryOptions = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>, TError = ErrorType<void>>(slug: string,
|
|
3970
|
+
userId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3971
|
+
) => {
|
|
3972
|
+
|
|
3973
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
3974
|
+
|
|
3975
|
+
const queryKey = queryOptions?.queryKey ?? getV3WorkspacesControllerGetWorkspaceMemberQueryKey(slug,userId);
|
|
3976
|
+
|
|
3977
|
+
|
|
3978
|
+
|
|
3979
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>> = ({ signal }) => v3WorkspacesControllerGetWorkspaceMember(slug,userId, requestOptions, signal);
|
|
3980
|
+
|
|
3981
|
+
|
|
3982
|
+
|
|
3983
|
+
|
|
3984
|
+
|
|
3985
|
+
return { queryKey, queryFn, enabled: !!(slug && userId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>, TError, TData> & { queryKey: QueryKey }
|
|
3986
|
+
}
|
|
3987
|
+
|
|
3988
|
+
export type V3WorkspacesControllerGetWorkspaceMemberQueryResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>>
|
|
3989
|
+
export type V3WorkspacesControllerGetWorkspaceMemberQueryError = ErrorType<void>
|
|
3990
|
+
|
|
3991
|
+
/**
|
|
3992
|
+
* @summary Get details of a specific workspace member (Enterprise M2M)
|
|
3993
|
+
*/
|
|
3994
|
+
export const useV3WorkspacesControllerGetWorkspaceMember = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>, TError = ErrorType<void>>(
|
|
3995
|
+
slug: string,
|
|
3996
|
+
userId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3997
|
+
|
|
3998
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
3999
|
+
|
|
4000
|
+
const queryOptions = getV3WorkspacesControllerGetWorkspaceMemberQueryOptions(slug,userId,options)
|
|
4001
|
+
|
|
4002
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
4003
|
+
|
|
4004
|
+
query.queryKey = queryOptions.queryKey ;
|
|
4005
|
+
|
|
4006
|
+
return query;
|
|
4007
|
+
}
|
|
4008
|
+
|
|
4009
|
+
|
|
4010
|
+
|
|
4011
|
+
|
|
4012
|
+
/**
|
|
4013
|
+
* Update the role of a specific workspace member. Requires members:write scope.
|
|
4014
|
+
* @summary Update a workspace member role (Enterprise M2M)
|
|
4015
|
+
*/
|
|
4016
|
+
export const v3WorkspacesControllerUpdateWorkspaceMember = (
|
|
4017
|
+
slug: string,
|
|
4018
|
+
userId: string,
|
|
4019
|
+
v3UpdateMemberRoleDto: BodyType<V3UpdateMemberRoleDto>,
|
|
4020
|
+
options?: SecondParameter<typeof customInstance>,) => {
|
|
4021
|
+
|
|
4022
|
+
|
|
4023
|
+
return customInstance<void>(
|
|
4024
|
+
{url: `/api/v3/workspaces/${slug}/members/${userId}`, method: 'PATCH',
|
|
4025
|
+
headers: {'Content-Type': 'application/json', },
|
|
4026
|
+
data: v3UpdateMemberRoleDto
|
|
4027
|
+
},
|
|
4028
|
+
options);
|
|
4029
|
+
}
|
|
4030
|
+
|
|
4031
|
+
|
|
4032
|
+
|
|
4033
|
+
export const getV3WorkspacesControllerUpdateWorkspaceMemberMutationOptions = <TError = ErrorType<void>,
|
|
4034
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspaceMember>>, TError,{slug: string;userId: string;data: BodyType<V3UpdateMemberRoleDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
4035
|
+
): UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspaceMember>>, TError,{slug: string;userId: string;data: BodyType<V3UpdateMemberRoleDto>}, TContext> => {
|
|
4036
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
4037
|
+
|
|
4038
|
+
|
|
4039
|
+
|
|
4040
|
+
|
|
4041
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspaceMember>>, {slug: string;userId: string;data: BodyType<V3UpdateMemberRoleDto>}> = (props) => {
|
|
4042
|
+
const {slug,userId,data} = props ?? {};
|
|
4043
|
+
|
|
4044
|
+
return v3WorkspacesControllerUpdateWorkspaceMember(slug,userId,data,requestOptions)
|
|
4045
|
+
}
|
|
4046
|
+
|
|
4047
|
+
|
|
4048
|
+
|
|
4049
|
+
|
|
4050
|
+
return { mutationFn, ...mutationOptions }}
|
|
4051
|
+
|
|
4052
|
+
export type V3WorkspacesControllerUpdateWorkspaceMemberMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspaceMember>>>
|
|
4053
|
+
export type V3WorkspacesControllerUpdateWorkspaceMemberMutationBody = BodyType<V3UpdateMemberRoleDto>
|
|
4054
|
+
export type V3WorkspacesControllerUpdateWorkspaceMemberMutationError = ErrorType<void>
|
|
4055
|
+
|
|
4056
|
+
/**
|
|
4057
|
+
* @summary Update a workspace member role (Enterprise M2M)
|
|
4058
|
+
*/
|
|
4059
|
+
export const useV3WorkspacesControllerUpdateWorkspaceMember = <TError = ErrorType<void>,
|
|
4060
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspaceMember>>, TError,{slug: string;userId: string;data: BodyType<V3UpdateMemberRoleDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
4061
|
+
): UseMutationResult<
|
|
4062
|
+
Awaited<ReturnType<typeof v3WorkspacesControllerUpdateWorkspaceMember>>,
|
|
4063
|
+
TError,
|
|
4064
|
+
{slug: string;userId: string;data: BodyType<V3UpdateMemberRoleDto>},
|
|
4065
|
+
TContext
|
|
4066
|
+
> => {
|
|
4067
|
+
|
|
4068
|
+
const mutationOptions = getV3WorkspacesControllerUpdateWorkspaceMemberMutationOptions(options);
|
|
4069
|
+
|
|
4070
|
+
return useMutation(mutationOptions);
|
|
4071
|
+
}
|
|
4072
|
+
|
|
4073
|
+
/**
|
|
4074
|
+
* Remove a workspace member by userId. Requires members:write scope.
|
|
4075
|
+
* @summary Remove a member from the workspace (Enterprise M2M)
|
|
4076
|
+
*/
|
|
4077
|
+
export const v3WorkspacesControllerDeleteWorkspaceMember = (
|
|
4078
|
+
slug: string,
|
|
4079
|
+
userId: string,
|
|
4080
|
+
options?: SecondParameter<typeof customInstance>,) => {
|
|
4081
|
+
|
|
4082
|
+
|
|
4083
|
+
return customInstance<void>(
|
|
4084
|
+
{url: `/api/v3/workspaces/${slug}/members/${userId}`, method: 'DELETE'
|
|
4085
|
+
},
|
|
4086
|
+
options);
|
|
4087
|
+
}
|
|
4088
|
+
|
|
4089
|
+
|
|
4090
|
+
|
|
4091
|
+
export const getV3WorkspacesControllerDeleteWorkspaceMemberMutationOptions = <TError = ErrorType<void>,
|
|
4092
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspaceMember>>, TError,{slug: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
4093
|
+
): UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspaceMember>>, TError,{slug: string;userId: string}, TContext> => {
|
|
4094
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
4095
|
+
|
|
4096
|
+
|
|
4097
|
+
|
|
4098
|
+
|
|
4099
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspaceMember>>, {slug: string;userId: string}> = (props) => {
|
|
4100
|
+
const {slug,userId} = props ?? {};
|
|
4101
|
+
|
|
4102
|
+
return v3WorkspacesControllerDeleteWorkspaceMember(slug,userId,requestOptions)
|
|
4103
|
+
}
|
|
4104
|
+
|
|
4105
|
+
|
|
4106
|
+
|
|
4107
|
+
|
|
4108
|
+
return { mutationFn, ...mutationOptions }}
|
|
4109
|
+
|
|
4110
|
+
export type V3WorkspacesControllerDeleteWorkspaceMemberMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspaceMember>>>
|
|
4111
|
+
|
|
4112
|
+
export type V3WorkspacesControllerDeleteWorkspaceMemberMutationError = ErrorType<void>
|
|
4113
|
+
|
|
4114
|
+
/**
|
|
4115
|
+
* @summary Remove a member from the workspace (Enterprise M2M)
|
|
4116
|
+
*/
|
|
4117
|
+
export const useV3WorkspacesControllerDeleteWorkspaceMember = <TError = ErrorType<void>,
|
|
4118
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspaceMember>>, TError,{slug: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
4119
|
+
): UseMutationResult<
|
|
4120
|
+
Awaited<ReturnType<typeof v3WorkspacesControllerDeleteWorkspaceMember>>,
|
|
4121
|
+
TError,
|
|
4122
|
+
{slug: string;userId: string},
|
|
4123
|
+
TContext
|
|
4124
|
+
> => {
|
|
4125
|
+
|
|
4126
|
+
const mutationOptions = getV3WorkspacesControllerDeleteWorkspaceMemberMutationOptions(options);
|
|
4127
|
+
|
|
4128
|
+
return useMutation(mutationOptions);
|
|
4129
|
+
}
|
|
4130
|
+
|
|
4131
|
+
/**
|
|
4132
|
+
* Retrieve all public channels and authorized private channels in a workspace. Requires channels:read scope.
|
|
4133
|
+
* @summary List channels in a workspace (Enterprise M2M)
|
|
4134
|
+
*/
|
|
4135
|
+
export const v3WorkspacesControllerGetChannels = (
|
|
4136
|
+
slug: string,
|
|
4137
|
+
options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
|
|
4138
|
+
) => {
|
|
4139
|
+
|
|
4140
|
+
|
|
4141
|
+
return customInstance<void>(
|
|
4142
|
+
{url: `/api/v3/workspaces/${slug}/channels`, method: 'GET', signal
|
|
4143
|
+
},
|
|
4144
|
+
options);
|
|
4145
|
+
}
|
|
4146
|
+
|
|
4147
|
+
|
|
4148
|
+
export const getV3WorkspacesControllerGetChannelsQueryKey = (slug: string,) => {
|
|
4149
|
+
return [`/api/v3/workspaces/${slug}/channels`] as const;
|
|
4150
|
+
}
|
|
4151
|
+
|
|
4152
|
+
|
|
4153
|
+
export const getV3WorkspacesControllerGetChannelsQueryOptions = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>, TError = ErrorType<void>>(slug: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
4154
|
+
) => {
|
|
4155
|
+
|
|
4156
|
+
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
4157
|
+
|
|
4158
|
+
const queryKey = queryOptions?.queryKey ?? getV3WorkspacesControllerGetChannelsQueryKey(slug);
|
|
4159
|
+
|
|
4160
|
+
|
|
4161
|
+
|
|
4162
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>> = ({ signal }) => v3WorkspacesControllerGetChannels(slug, requestOptions, signal);
|
|
4163
|
+
|
|
4164
|
+
|
|
4165
|
+
|
|
4166
|
+
|
|
4167
|
+
|
|
4168
|
+
return { queryKey, queryFn, enabled: !!(slug), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>, TError, TData> & { queryKey: QueryKey }
|
|
4169
|
+
}
|
|
4170
|
+
|
|
4171
|
+
export type V3WorkspacesControllerGetChannelsQueryResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>>
|
|
4172
|
+
export type V3WorkspacesControllerGetChannelsQueryError = ErrorType<void>
|
|
4173
|
+
|
|
4174
|
+
/**
|
|
4175
|
+
* @summary List channels in a workspace (Enterprise M2M)
|
|
4176
|
+
*/
|
|
4177
|
+
export const useV3WorkspacesControllerGetChannels = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>, TError = ErrorType<void>>(
|
|
4178
|
+
slug: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannels>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
4179
|
+
|
|
4180
|
+
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
4181
|
+
|
|
4182
|
+
const queryOptions = getV3WorkspacesControllerGetChannelsQueryOptions(slug,options)
|
|
4183
|
+
|
|
4184
|
+
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
4185
|
+
|
|
4186
|
+
query.queryKey = queryOptions.queryKey ;
|
|
4187
|
+
|
|
4188
|
+
return query;
|
|
4189
|
+
}
|
|
4190
|
+
|
|
4191
|
+
|
|
4192
|
+
|
|
4193
|
+
|
|
4194
|
+
/**
|
|
4195
|
+
* Create a new channel with customizable visibility, icon, metadata, and members. Requires channels:write scope.
|
|
4196
|
+
* @summary Create a channel in a workspace (Enterprise M2M)
|
|
4197
|
+
*/
|
|
4198
|
+
export const v3WorkspacesControllerCreateChannel = (
|
|
4199
|
+
slug: string,
|
|
4200
|
+
v3CreateChannelDto: BodyType<V3CreateChannelDto>,
|
|
4201
|
+
options?: SecondParameter<typeof customInstance>,) => {
|
|
4202
|
+
|
|
4203
|
+
|
|
4204
|
+
return customInstance<void>(
|
|
4205
|
+
{url: `/api/v3/workspaces/${slug}/channels`, method: 'POST',
|
|
4206
|
+
headers: {'Content-Type': 'application/json', },
|
|
4207
|
+
data: v3CreateChannelDto
|
|
4208
|
+
},
|
|
4209
|
+
options);
|
|
4210
|
+
}
|
|
4211
|
+
|
|
4212
|
+
|
|
4213
|
+
|
|
4214
|
+
export const getV3WorkspacesControllerCreateChannelMutationOptions = <TError = ErrorType<void>,
|
|
4215
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerCreateChannel>>, TError,{slug: string;data: BodyType<V3CreateChannelDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
4216
|
+
): UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerCreateChannel>>, TError,{slug: string;data: BodyType<V3CreateChannelDto>}, TContext> => {
|
|
4217
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
4218
|
+
|
|
4219
|
+
|
|
4220
|
+
|
|
4221
|
+
|
|
4222
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof v3WorkspacesControllerCreateChannel>>, {slug: string;data: BodyType<V3CreateChannelDto>}> = (props) => {
|
|
4223
|
+
const {slug,data} = props ?? {};
|
|
4224
|
+
|
|
4225
|
+
return v3WorkspacesControllerCreateChannel(slug,data,requestOptions)
|
|
4226
|
+
}
|
|
4227
|
+
|
|
4228
|
+
|
|
4229
|
+
|
|
4230
|
+
|
|
4231
|
+
return { mutationFn, ...mutationOptions }}
|
|
4232
|
+
|
|
4233
|
+
export type V3WorkspacesControllerCreateChannelMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerCreateChannel>>>
|
|
4234
|
+
export type V3WorkspacesControllerCreateChannelMutationBody = BodyType<V3CreateChannelDto>
|
|
4235
|
+
export type V3WorkspacesControllerCreateChannelMutationError = ErrorType<void>
|
|
4236
|
+
|
|
4237
|
+
/**
|
|
4238
|
+
* @summary Create a channel in a workspace (Enterprise M2M)
|
|
4239
|
+
*/
|
|
4240
|
+
export const useV3WorkspacesControllerCreateChannel = <TError = ErrorType<void>,
|
|
4241
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerCreateChannel>>, TError,{slug: string;data: BodyType<V3CreateChannelDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
4242
|
+
): UseMutationResult<
|
|
4243
|
+
Awaited<ReturnType<typeof v3WorkspacesControllerCreateChannel>>,
|
|
4244
|
+
TError,
|
|
4245
|
+
{slug: string;data: BodyType<V3CreateChannelDto>},
|
|
4246
|
+
TContext
|
|
4247
|
+
> => {
|
|
4248
|
+
|
|
4249
|
+
const mutationOptions = getV3WorkspacesControllerCreateChannelMutationOptions(options);
|
|
4250
|
+
|
|
4251
|
+
return useMutation(mutationOptions);
|
|
4252
|
+
}
|
|
4253
|
+
|
|
4254
|
+
/**
|
|
4255
|
+
* Retrieve details of a specific channel in a workspace. Requires channels:read scope.
|
|
4256
|
+
* @summary Get channel details (Enterprise M2M)
|
|
4257
|
+
*/
|
|
4258
|
+
export const v3WorkspacesControllerGetChannel = (
|
|
4259
|
+
slug: string,
|
|
4260
|
+
channelId: string,
|
|
4261
|
+
options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
|
|
4262
|
+
) => {
|
|
4263
|
+
|
|
4264
|
+
|
|
4265
|
+
return customInstance<void>(
|
|
4266
|
+
{url: `/api/v3/workspaces/${slug}/channels/${channelId}`, method: 'GET', signal
|
|
4267
|
+
},
|
|
4268
|
+
options);
|
|
4269
|
+
}
|
|
4270
|
+
|
|
4271
|
+
|
|
4272
|
+
export const getV3WorkspacesControllerGetChannelQueryKey = (slug: string,
|
|
4273
|
+
channelId: string,) => {
|
|
4274
|
+
return [`/api/v3/workspaces/${slug}/channels/${channelId}`] as const;
|
|
4275
|
+
}
|
|
4276
|
+
|
|
4277
|
+
|
|
4278
|
+
export const getV3WorkspacesControllerGetChannelQueryOptions = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>, TError = ErrorType<void>>(slug: string,
|
|
4279
|
+
channelId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3508
4280
|
) => {
|
|
3509
4281
|
|
|
3510
4282
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
3511
4283
|
|
|
3512
|
-
const queryKey = queryOptions?.queryKey ??
|
|
4284
|
+
const queryKey = queryOptions?.queryKey ?? getV3WorkspacesControllerGetChannelQueryKey(slug,channelId);
|
|
3513
4285
|
|
|
3514
4286
|
|
|
3515
4287
|
|
|
3516
|
-
const queryFn: QueryFunction<Awaited<ReturnType<typeof
|
|
4288
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>> = ({ signal }) => v3WorkspacesControllerGetChannel(slug,channelId, requestOptions, signal);
|
|
3517
4289
|
|
|
3518
4290
|
|
|
3519
4291
|
|
|
3520
4292
|
|
|
3521
4293
|
|
|
3522
|
-
return { queryKey, queryFn, enabled: !!(slug), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof
|
|
4294
|
+
return { queryKey, queryFn, enabled: !!(slug && channelId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>, TError, TData> & { queryKey: QueryKey }
|
|
3523
4295
|
}
|
|
3524
4296
|
|
|
3525
|
-
export type
|
|
3526
|
-
export type
|
|
4297
|
+
export type V3WorkspacesControllerGetChannelQueryResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>>
|
|
4298
|
+
export type V3WorkspacesControllerGetChannelQueryError = ErrorType<void>
|
|
3527
4299
|
|
|
3528
4300
|
/**
|
|
3529
|
-
* @summary Get
|
|
4301
|
+
* @summary Get channel details (Enterprise M2M)
|
|
3530
4302
|
*/
|
|
3531
|
-
export const
|
|
3532
|
-
slug: string,
|
|
4303
|
+
export const useV3WorkspacesControllerGetChannel = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>, TError = ErrorType<void>>(
|
|
4304
|
+
slug: string,
|
|
4305
|
+
channelId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannel>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3533
4306
|
|
|
3534
4307
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
3535
4308
|
|
|
3536
|
-
const queryOptions =
|
|
4309
|
+
const queryOptions = getV3WorkspacesControllerGetChannelQueryOptions(slug,channelId,options)
|
|
3537
4310
|
|
|
3538
4311
|
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
3539
4312
|
|
|
@@ -3546,37 +4319,38 @@ export const useV3WorkspacesControllerGetWorkspaceBySlug = <TData = Awaited<Retu
|
|
|
3546
4319
|
|
|
3547
4320
|
|
|
3548
4321
|
/**
|
|
3549
|
-
* Update
|
|
3550
|
-
* @summary Update
|
|
4322
|
+
* Update settings, name, description, icon, metadata, or visibility of a channel. Requires channels:write scope.
|
|
4323
|
+
* @summary Update channel configuration and visibility (Enterprise M2M)
|
|
3551
4324
|
*/
|
|
3552
|
-
export const
|
|
4325
|
+
export const v3WorkspacesControllerUpdateChannel = (
|
|
3553
4326
|
slug: string,
|
|
3554
|
-
|
|
4327
|
+
channelId: string,
|
|
4328
|
+
v3UpdateChannelDto: BodyType<V3UpdateChannelDto>,
|
|
3555
4329
|
options?: SecondParameter<typeof customInstance>,) => {
|
|
3556
4330
|
|
|
3557
4331
|
|
|
3558
|
-
return customInstance<
|
|
3559
|
-
{url: `/api/v3/workspaces/${slug}`, method: 'PATCH',
|
|
4332
|
+
return customInstance<void>(
|
|
4333
|
+
{url: `/api/v3/workspaces/${slug}/channels/${channelId}`, method: 'PATCH',
|
|
3560
4334
|
headers: {'Content-Type': 'application/json', },
|
|
3561
|
-
data:
|
|
4335
|
+
data: v3UpdateChannelDto
|
|
3562
4336
|
},
|
|
3563
4337
|
options);
|
|
3564
4338
|
}
|
|
3565
4339
|
|
|
3566
4340
|
|
|
3567
4341
|
|
|
3568
|
-
export const
|
|
3569
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof
|
|
3570
|
-
): UseMutationOptions<Awaited<ReturnType<typeof
|
|
4342
|
+
export const getV3WorkspacesControllerUpdateChannelMutationOptions = <TError = ErrorType<void>,
|
|
4343
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannel>>, TError,{slug: string;channelId: string;data: BodyType<V3UpdateChannelDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
4344
|
+
): UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannel>>, TError,{slug: string;channelId: string;data: BodyType<V3UpdateChannelDto>}, TContext> => {
|
|
3571
4345
|
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
3572
4346
|
|
|
3573
4347
|
|
|
3574
4348
|
|
|
3575
4349
|
|
|
3576
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof
|
|
3577
|
-
const {slug,data} = props ?? {};
|
|
4350
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannel>>, {slug: string;channelId: string;data: BodyType<V3UpdateChannelDto>}> = (props) => {
|
|
4351
|
+
const {slug,channelId,data} = props ?? {};
|
|
3578
4352
|
|
|
3579
|
-
return
|
|
4353
|
+
return v3WorkspacesControllerUpdateChannel(slug,channelId,data,requestOptions)
|
|
3580
4354
|
}
|
|
3581
4355
|
|
|
3582
4356
|
|
|
@@ -3584,56 +4358,57 @@ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
|
3584
4358
|
|
|
3585
4359
|
return { mutationFn, ...mutationOptions }}
|
|
3586
4360
|
|
|
3587
|
-
export type
|
|
3588
|
-
export type
|
|
3589
|
-
export type
|
|
4361
|
+
export type V3WorkspacesControllerUpdateChannelMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannel>>>
|
|
4362
|
+
export type V3WorkspacesControllerUpdateChannelMutationBody = BodyType<V3UpdateChannelDto>
|
|
4363
|
+
export type V3WorkspacesControllerUpdateChannelMutationError = ErrorType<void>
|
|
3590
4364
|
|
|
3591
4365
|
/**
|
|
3592
|
-
* @summary Update
|
|
4366
|
+
* @summary Update channel configuration and visibility (Enterprise M2M)
|
|
3593
4367
|
*/
|
|
3594
|
-
export const
|
|
3595
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof
|
|
4368
|
+
export const useV3WorkspacesControllerUpdateChannel = <TError = ErrorType<void>,
|
|
4369
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannel>>, TError,{slug: string;channelId: string;data: BodyType<V3UpdateChannelDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
3596
4370
|
): UseMutationResult<
|
|
3597
|
-
Awaited<ReturnType<typeof
|
|
4371
|
+
Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannel>>,
|
|
3598
4372
|
TError,
|
|
3599
|
-
{slug: string;data: BodyType<
|
|
4373
|
+
{slug: string;channelId: string;data: BodyType<V3UpdateChannelDto>},
|
|
3600
4374
|
TContext
|
|
3601
4375
|
> => {
|
|
3602
4376
|
|
|
3603
|
-
const mutationOptions =
|
|
4377
|
+
const mutationOptions = getV3WorkspacesControllerUpdateChannelMutationOptions(options);
|
|
3604
4378
|
|
|
3605
4379
|
return useMutation(mutationOptions);
|
|
3606
4380
|
}
|
|
3607
4381
|
|
|
3608
4382
|
/**
|
|
3609
|
-
* Permanently deletes a
|
|
3610
|
-
* @summary Delete a
|
|
4383
|
+
* Permanently deletes a channel from a workspace. Requires channels:write scope.
|
|
4384
|
+
* @summary Delete a channel (Enterprise M2M)
|
|
3611
4385
|
*/
|
|
3612
|
-
export const
|
|
4386
|
+
export const v3WorkspacesControllerDeleteChannel = (
|
|
3613
4387
|
slug: string,
|
|
4388
|
+
channelId: string,
|
|
3614
4389
|
options?: SecondParameter<typeof customInstance>,) => {
|
|
3615
4390
|
|
|
3616
4391
|
|
|
3617
|
-
return customInstance<
|
|
3618
|
-
{url: `/api/v3/workspaces/${slug}`, method: 'DELETE'
|
|
4392
|
+
return customInstance<void>(
|
|
4393
|
+
{url: `/api/v3/workspaces/${slug}/channels/${channelId}`, method: 'DELETE'
|
|
3619
4394
|
},
|
|
3620
4395
|
options);
|
|
3621
4396
|
}
|
|
3622
4397
|
|
|
3623
4398
|
|
|
3624
4399
|
|
|
3625
|
-
export const
|
|
3626
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof
|
|
3627
|
-
): UseMutationOptions<Awaited<ReturnType<typeof
|
|
4400
|
+
export const getV3WorkspacesControllerDeleteChannelMutationOptions = <TError = ErrorType<void>,
|
|
4401
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannel>>, TError,{slug: string;channelId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
4402
|
+
): UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannel>>, TError,{slug: string;channelId: string}, TContext> => {
|
|
3628
4403
|
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
3629
4404
|
|
|
3630
4405
|
|
|
3631
4406
|
|
|
3632
4407
|
|
|
3633
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof
|
|
3634
|
-
const {slug} = props ?? {};
|
|
4408
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannel>>, {slug: string;channelId: string}> = (props) => {
|
|
4409
|
+
const {slug,channelId} = props ?? {};
|
|
3635
4410
|
|
|
3636
|
-
return
|
|
4411
|
+
return v3WorkspacesControllerDeleteChannel(slug,channelId,requestOptions)
|
|
3637
4412
|
}
|
|
3638
4413
|
|
|
3639
4414
|
|
|
@@ -3641,79 +4416,83 @@ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
|
3641
4416
|
|
|
3642
4417
|
return { mutationFn, ...mutationOptions }}
|
|
3643
4418
|
|
|
3644
|
-
export type
|
|
4419
|
+
export type V3WorkspacesControllerDeleteChannelMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannel>>>
|
|
3645
4420
|
|
|
3646
|
-
export type
|
|
4421
|
+
export type V3WorkspacesControllerDeleteChannelMutationError = ErrorType<void>
|
|
3647
4422
|
|
|
3648
4423
|
/**
|
|
3649
|
-
* @summary Delete a
|
|
4424
|
+
* @summary Delete a channel (Enterprise M2M)
|
|
3650
4425
|
*/
|
|
3651
|
-
export const
|
|
3652
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof
|
|
4426
|
+
export const useV3WorkspacesControllerDeleteChannel = <TError = ErrorType<void>,
|
|
4427
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannel>>, TError,{slug: string;channelId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
3653
4428
|
): UseMutationResult<
|
|
3654
|
-
Awaited<ReturnType<typeof
|
|
4429
|
+
Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannel>>,
|
|
3655
4430
|
TError,
|
|
3656
|
-
{slug: string},
|
|
4431
|
+
{slug: string;channelId: string},
|
|
3657
4432
|
TContext
|
|
3658
4433
|
> => {
|
|
3659
4434
|
|
|
3660
|
-
const mutationOptions =
|
|
4435
|
+
const mutationOptions = getV3WorkspacesControllerDeleteChannelMutationOptions(options);
|
|
3661
4436
|
|
|
3662
4437
|
return useMutation(mutationOptions);
|
|
3663
4438
|
}
|
|
3664
4439
|
|
|
3665
4440
|
/**
|
|
3666
|
-
* Retrieve
|
|
3667
|
-
* @summary List
|
|
4441
|
+
* Retrieve members belonging to a specific channel. Requires channels:read scope.
|
|
4442
|
+
* @summary List channel members (Enterprise M2M)
|
|
3668
4443
|
*/
|
|
3669
|
-
export const
|
|
4444
|
+
export const v3WorkspacesControllerGetChannelMembers = (
|
|
3670
4445
|
slug: string,
|
|
4446
|
+
channelId: string,
|
|
3671
4447
|
options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
|
|
3672
4448
|
) => {
|
|
3673
4449
|
|
|
3674
4450
|
|
|
3675
4451
|
return customInstance<void>(
|
|
3676
|
-
{url: `/api/v3/workspaces/${slug}/members`, method: 'GET', signal
|
|
4452
|
+
{url: `/api/v3/workspaces/${slug}/channels/${channelId}/members`, method: 'GET', signal
|
|
3677
4453
|
},
|
|
3678
4454
|
options);
|
|
3679
4455
|
}
|
|
3680
4456
|
|
|
3681
4457
|
|
|
3682
|
-
export const
|
|
3683
|
-
|
|
4458
|
+
export const getV3WorkspacesControllerGetChannelMembersQueryKey = (slug: string,
|
|
4459
|
+
channelId: string,) => {
|
|
4460
|
+
return [`/api/v3/workspaces/${slug}/channels/${channelId}/members`] as const;
|
|
3684
4461
|
}
|
|
3685
4462
|
|
|
3686
4463
|
|
|
3687
|
-
export const
|
|
4464
|
+
export const getV3WorkspacesControllerGetChannelMembersQueryOptions = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>, TError = ErrorType<unknown>>(slug: string,
|
|
4465
|
+
channelId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3688
4466
|
) => {
|
|
3689
4467
|
|
|
3690
4468
|
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
3691
4469
|
|
|
3692
|
-
const queryKey = queryOptions?.queryKey ??
|
|
4470
|
+
const queryKey = queryOptions?.queryKey ?? getV3WorkspacesControllerGetChannelMembersQueryKey(slug,channelId);
|
|
3693
4471
|
|
|
3694
4472
|
|
|
3695
4473
|
|
|
3696
|
-
const queryFn: QueryFunction<Awaited<ReturnType<typeof
|
|
4474
|
+
const queryFn: QueryFunction<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>> = ({ signal }) => v3WorkspacesControllerGetChannelMembers(slug,channelId, requestOptions, signal);
|
|
3697
4475
|
|
|
3698
4476
|
|
|
3699
4477
|
|
|
3700
4478
|
|
|
3701
4479
|
|
|
3702
|
-
return { queryKey, queryFn, enabled: !!(slug), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof
|
|
4480
|
+
return { queryKey, queryFn, enabled: !!(slug && channelId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>, TError, TData> & { queryKey: QueryKey }
|
|
3703
4481
|
}
|
|
3704
4482
|
|
|
3705
|
-
export type
|
|
3706
|
-
export type
|
|
4483
|
+
export type V3WorkspacesControllerGetChannelMembersQueryResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>>
|
|
4484
|
+
export type V3WorkspacesControllerGetChannelMembersQueryError = ErrorType<unknown>
|
|
3707
4485
|
|
|
3708
4486
|
/**
|
|
3709
|
-
* @summary List
|
|
4487
|
+
* @summary List channel members (Enterprise M2M)
|
|
3710
4488
|
*/
|
|
3711
|
-
export const
|
|
3712
|
-
slug: string,
|
|
4489
|
+
export const useV3WorkspacesControllerGetChannelMembers = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>, TError = ErrorType<unknown>>(
|
|
4490
|
+
slug: string,
|
|
4491
|
+
channelId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetChannelMembers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3713
4492
|
|
|
3714
4493
|
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
3715
4494
|
|
|
3716
|
-
const queryOptions =
|
|
4495
|
+
const queryOptions = getV3WorkspacesControllerGetChannelMembersQueryOptions(slug,channelId,options)
|
|
3717
4496
|
|
|
3718
4497
|
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
3719
4498
|
|
|
@@ -3726,37 +4505,38 @@ export const useV3WorkspacesControllerGetWorkspaceMembers = <TData = Awaited<Ret
|
|
|
3726
4505
|
|
|
3727
4506
|
|
|
3728
4507
|
/**
|
|
3729
|
-
* Add a
|
|
3730
|
-
* @summary Add
|
|
4508
|
+
* Add user(s) to a channel with customizable role and permissions. Requires channels:write scope.
|
|
4509
|
+
* @summary Add members to a channel (Enterprise M2M)
|
|
3731
4510
|
*/
|
|
3732
|
-
export const
|
|
4511
|
+
export const v3WorkspacesControllerAddChannelMembers = (
|
|
3733
4512
|
slug: string,
|
|
3734
|
-
|
|
4513
|
+
channelId: string,
|
|
4514
|
+
v3AddChannelMemberDto: BodyType<V3AddChannelMemberDto>,
|
|
3735
4515
|
options?: SecondParameter<typeof customInstance>,) => {
|
|
3736
4516
|
|
|
3737
4517
|
|
|
3738
4518
|
return customInstance<void>(
|
|
3739
|
-
{url: `/api/v3/workspaces/${slug}/members`, method: 'POST',
|
|
4519
|
+
{url: `/api/v3/workspaces/${slug}/channels/${channelId}/members`, method: 'POST',
|
|
3740
4520
|
headers: {'Content-Type': 'application/json', },
|
|
3741
|
-
data:
|
|
4521
|
+
data: v3AddChannelMemberDto
|
|
3742
4522
|
},
|
|
3743
4523
|
options);
|
|
3744
4524
|
}
|
|
3745
4525
|
|
|
3746
4526
|
|
|
3747
4527
|
|
|
3748
|
-
export const
|
|
3749
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof
|
|
3750
|
-
): UseMutationOptions<Awaited<ReturnType<typeof
|
|
4528
|
+
export const getV3WorkspacesControllerAddChannelMembersMutationOptions = <TError = ErrorType<unknown>,
|
|
4529
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerAddChannelMembers>>, TError,{slug: string;channelId: string;data: BodyType<V3AddChannelMemberDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
4530
|
+
): UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerAddChannelMembers>>, TError,{slug: string;channelId: string;data: BodyType<V3AddChannelMemberDto>}, TContext> => {
|
|
3751
4531
|
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
3752
4532
|
|
|
3753
4533
|
|
|
3754
4534
|
|
|
3755
4535
|
|
|
3756
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof
|
|
3757
|
-
const {slug,data} = props ?? {};
|
|
4536
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof v3WorkspacesControllerAddChannelMembers>>, {slug: string;channelId: string;data: BodyType<V3AddChannelMemberDto>}> = (props) => {
|
|
4537
|
+
const {slug,channelId,data} = props ?? {};
|
|
3758
4538
|
|
|
3759
|
-
return
|
|
4539
|
+
return v3WorkspacesControllerAddChannelMembers(slug,channelId,data,requestOptions)
|
|
3760
4540
|
}
|
|
3761
4541
|
|
|
3762
4542
|
|
|
@@ -3764,127 +4544,61 @@ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
|
3764
4544
|
|
|
3765
4545
|
return { mutationFn, ...mutationOptions }}
|
|
3766
4546
|
|
|
3767
|
-
export type
|
|
3768
|
-
export type
|
|
3769
|
-
export type
|
|
4547
|
+
export type V3WorkspacesControllerAddChannelMembersMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerAddChannelMembers>>>
|
|
4548
|
+
export type V3WorkspacesControllerAddChannelMembersMutationBody = BodyType<V3AddChannelMemberDto>
|
|
4549
|
+
export type V3WorkspacesControllerAddChannelMembersMutationError = ErrorType<unknown>
|
|
3770
4550
|
|
|
3771
4551
|
/**
|
|
3772
|
-
* @summary Add
|
|
4552
|
+
* @summary Add members to a channel (Enterprise M2M)
|
|
3773
4553
|
*/
|
|
3774
|
-
export const
|
|
3775
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof
|
|
4554
|
+
export const useV3WorkspacesControllerAddChannelMembers = <TError = ErrorType<unknown>,
|
|
4555
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerAddChannelMembers>>, TError,{slug: string;channelId: string;data: BodyType<V3AddChannelMemberDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
3776
4556
|
): UseMutationResult<
|
|
3777
|
-
Awaited<ReturnType<typeof
|
|
4557
|
+
Awaited<ReturnType<typeof v3WorkspacesControllerAddChannelMembers>>,
|
|
3778
4558
|
TError,
|
|
3779
|
-
{slug: string;data: BodyType<
|
|
4559
|
+
{slug: string;channelId: string;data: BodyType<V3AddChannelMemberDto>},
|
|
3780
4560
|
TContext
|
|
3781
4561
|
> => {
|
|
3782
4562
|
|
|
3783
|
-
const mutationOptions =
|
|
4563
|
+
const mutationOptions = getV3WorkspacesControllerAddChannelMembersMutationOptions(options);
|
|
3784
4564
|
|
|
3785
4565
|
return useMutation(mutationOptions);
|
|
3786
4566
|
}
|
|
3787
4567
|
|
|
3788
4568
|
/**
|
|
3789
|
-
*
|
|
3790
|
-
* @summary
|
|
3791
|
-
*/
|
|
3792
|
-
export const v3WorkspacesControllerGetWorkspaceMember = (
|
|
3793
|
-
slug: string,
|
|
3794
|
-
userId: string,
|
|
3795
|
-
options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
|
|
3796
|
-
) => {
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
return customInstance<void>(
|
|
3800
|
-
{url: `/api/v3/workspaces/${slug}/members/${userId}`, method: 'GET', signal
|
|
3801
|
-
},
|
|
3802
|
-
options);
|
|
3803
|
-
}
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
export const getV3WorkspacesControllerGetWorkspaceMemberQueryKey = (slug: string,
|
|
3807
|
-
userId: string,) => {
|
|
3808
|
-
return [`/api/v3/workspaces/${slug}/members/${userId}`] as const;
|
|
3809
|
-
}
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
export const getV3WorkspacesControllerGetWorkspaceMemberQueryOptions = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>, TError = ErrorType<void>>(slug: string,
|
|
3813
|
-
userId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3814
|
-
) => {
|
|
3815
|
-
|
|
3816
|
-
const {query: queryOptions, request: requestOptions} = options ?? {};
|
|
3817
|
-
|
|
3818
|
-
const queryKey = queryOptions?.queryKey ?? getV3WorkspacesControllerGetWorkspaceMemberQueryKey(slug,userId);
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
const queryFn: QueryFunction<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>> = ({ signal }) => v3WorkspacesControllerGetWorkspaceMember(slug,userId, requestOptions, signal);
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
return { queryKey, queryFn, enabled: !!(slug && userId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>, TError, TData> & { queryKey: QueryKey }
|
|
3829
|
-
}
|
|
3830
|
-
|
|
3831
|
-
export type V3WorkspacesControllerGetWorkspaceMemberQueryResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>>
|
|
3832
|
-
export type V3WorkspacesControllerGetWorkspaceMemberQueryError = ErrorType<void>
|
|
3833
|
-
|
|
3834
|
-
/**
|
|
3835
|
-
* @summary Get details of a specific workspace member (Enterprise M2M)
|
|
3836
|
-
*/
|
|
3837
|
-
export const useV3WorkspacesControllerGetWorkspaceMember = <TData = Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>, TError = ErrorType<void>>(
|
|
3838
|
-
slug: string,
|
|
3839
|
-
userId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof v3WorkspacesControllerGetWorkspaceMember>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}
|
|
3840
|
-
|
|
3841
|
-
): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
|
|
3842
|
-
|
|
3843
|
-
const queryOptions = getV3WorkspacesControllerGetWorkspaceMemberQueryOptions(slug,userId,options)
|
|
3844
|
-
|
|
3845
|
-
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
3846
|
-
|
|
3847
|
-
query.queryKey = queryOptions.queryKey ;
|
|
3848
|
-
|
|
3849
|
-
return query;
|
|
3850
|
-
}
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
/**
|
|
3856
|
-
* Update the role of a specific workspace member. Requires members:write scope.
|
|
3857
|
-
* @summary Update a workspace member role (Enterprise M2M)
|
|
4569
|
+
* Update the role or bitwise permissions of a channel member. Requires channels:write scope.
|
|
4570
|
+
* @summary Update channel member role and permissions (Enterprise M2M)
|
|
3858
4571
|
*/
|
|
3859
|
-
export const
|
|
4572
|
+
export const v3WorkspacesControllerUpdateChannelMember = (
|
|
3860
4573
|
slug: string,
|
|
4574
|
+
channelId: string,
|
|
3861
4575
|
userId: string,
|
|
3862
|
-
|
|
4576
|
+
v3UpdateChannelMemberDto: BodyType<V3UpdateChannelMemberDto>,
|
|
3863
4577
|
options?: SecondParameter<typeof customInstance>,) => {
|
|
3864
4578
|
|
|
3865
4579
|
|
|
3866
4580
|
return customInstance<void>(
|
|
3867
|
-
{url: `/api/v3/workspaces/${slug}/members/${userId}`, method: 'PATCH',
|
|
4581
|
+
{url: `/api/v3/workspaces/${slug}/channels/${channelId}/members/${userId}`, method: 'PATCH',
|
|
3868
4582
|
headers: {'Content-Type': 'application/json', },
|
|
3869
|
-
data:
|
|
4583
|
+
data: v3UpdateChannelMemberDto
|
|
3870
4584
|
},
|
|
3871
4585
|
options);
|
|
3872
4586
|
}
|
|
3873
4587
|
|
|
3874
4588
|
|
|
3875
4589
|
|
|
3876
|
-
export const
|
|
3877
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof
|
|
3878
|
-
): UseMutationOptions<Awaited<ReturnType<typeof
|
|
4590
|
+
export const getV3WorkspacesControllerUpdateChannelMemberMutationOptions = <TError = ErrorType<void>,
|
|
4591
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannelMember>>, TError,{slug: string;channelId: string;userId: string;data: BodyType<V3UpdateChannelMemberDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
4592
|
+
): UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannelMember>>, TError,{slug: string;channelId: string;userId: string;data: BodyType<V3UpdateChannelMemberDto>}, TContext> => {
|
|
3879
4593
|
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
3880
4594
|
|
|
3881
4595
|
|
|
3882
4596
|
|
|
3883
4597
|
|
|
3884
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof
|
|
3885
|
-
const {slug,userId,data} = props ?? {};
|
|
4598
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannelMember>>, {slug: string;channelId: string;userId: string;data: BodyType<V3UpdateChannelMemberDto>}> = (props) => {
|
|
4599
|
+
const {slug,channelId,userId,data} = props ?? {};
|
|
3886
4600
|
|
|
3887
|
-
return
|
|
4601
|
+
return v3WorkspacesControllerUpdateChannelMember(slug,channelId,userId,data,requestOptions)
|
|
3888
4602
|
}
|
|
3889
4603
|
|
|
3890
4604
|
|
|
@@ -3892,57 +4606,58 @@ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
|
3892
4606
|
|
|
3893
4607
|
return { mutationFn, ...mutationOptions }}
|
|
3894
4608
|
|
|
3895
|
-
export type
|
|
3896
|
-
export type
|
|
3897
|
-
export type
|
|
4609
|
+
export type V3WorkspacesControllerUpdateChannelMemberMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannelMember>>>
|
|
4610
|
+
export type V3WorkspacesControllerUpdateChannelMemberMutationBody = BodyType<V3UpdateChannelMemberDto>
|
|
4611
|
+
export type V3WorkspacesControllerUpdateChannelMemberMutationError = ErrorType<void>
|
|
3898
4612
|
|
|
3899
4613
|
/**
|
|
3900
|
-
* @summary Update
|
|
4614
|
+
* @summary Update channel member role and permissions (Enterprise M2M)
|
|
3901
4615
|
*/
|
|
3902
|
-
export const
|
|
3903
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof
|
|
4616
|
+
export const useV3WorkspacesControllerUpdateChannelMember = <TError = ErrorType<void>,
|
|
4617
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannelMember>>, TError,{slug: string;channelId: string;userId: string;data: BodyType<V3UpdateChannelMemberDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
3904
4618
|
): UseMutationResult<
|
|
3905
|
-
Awaited<ReturnType<typeof
|
|
4619
|
+
Awaited<ReturnType<typeof v3WorkspacesControllerUpdateChannelMember>>,
|
|
3906
4620
|
TError,
|
|
3907
|
-
{slug: string;userId: string;data: BodyType<
|
|
4621
|
+
{slug: string;channelId: string;userId: string;data: BodyType<V3UpdateChannelMemberDto>},
|
|
3908
4622
|
TContext
|
|
3909
4623
|
> => {
|
|
3910
4624
|
|
|
3911
|
-
const mutationOptions =
|
|
4625
|
+
const mutationOptions = getV3WorkspacesControllerUpdateChannelMemberMutationOptions(options);
|
|
3912
4626
|
|
|
3913
4627
|
return useMutation(mutationOptions);
|
|
3914
4628
|
}
|
|
3915
4629
|
|
|
3916
4630
|
/**
|
|
3917
|
-
* Remove a
|
|
3918
|
-
* @summary Remove a member from
|
|
4631
|
+
* Remove a specific member from a channel. Requires channels:write scope.
|
|
4632
|
+
* @summary Remove a member from a channel (Enterprise M2M)
|
|
3919
4633
|
*/
|
|
3920
|
-
export const
|
|
4634
|
+
export const v3WorkspacesControllerDeleteChannelMember = (
|
|
3921
4635
|
slug: string,
|
|
4636
|
+
channelId: string,
|
|
3922
4637
|
userId: string,
|
|
3923
4638
|
options?: SecondParameter<typeof customInstance>,) => {
|
|
3924
4639
|
|
|
3925
4640
|
|
|
3926
4641
|
return customInstance<void>(
|
|
3927
|
-
{url: `/api/v3/workspaces/${slug}/members/${userId}`, method: 'DELETE'
|
|
4642
|
+
{url: `/api/v3/workspaces/${slug}/channels/${channelId}/members/${userId}`, method: 'DELETE'
|
|
3928
4643
|
},
|
|
3929
4644
|
options);
|
|
3930
4645
|
}
|
|
3931
4646
|
|
|
3932
4647
|
|
|
3933
4648
|
|
|
3934
|
-
export const
|
|
3935
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof
|
|
3936
|
-
): UseMutationOptions<Awaited<ReturnType<typeof
|
|
4649
|
+
export const getV3WorkspacesControllerDeleteChannelMemberMutationOptions = <TError = ErrorType<unknown>,
|
|
4650
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannelMember>>, TError,{slug: string;channelId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
4651
|
+
): UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannelMember>>, TError,{slug: string;channelId: string;userId: string}, TContext> => {
|
|
3937
4652
|
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
3938
4653
|
|
|
3939
4654
|
|
|
3940
4655
|
|
|
3941
4656
|
|
|
3942
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof
|
|
3943
|
-
const {slug,userId} = props ?? {};
|
|
4657
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannelMember>>, {slug: string;channelId: string;userId: string}> = (props) => {
|
|
4658
|
+
const {slug,channelId,userId} = props ?? {};
|
|
3944
4659
|
|
|
3945
|
-
return
|
|
4660
|
+
return v3WorkspacesControllerDeleteChannelMember(slug,channelId,userId,requestOptions)
|
|
3946
4661
|
}
|
|
3947
4662
|
|
|
3948
4663
|
|
|
@@ -3950,23 +4665,23 @@ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
|
3950
4665
|
|
|
3951
4666
|
return { mutationFn, ...mutationOptions }}
|
|
3952
4667
|
|
|
3953
|
-
export type
|
|
4668
|
+
export type V3WorkspacesControllerDeleteChannelMemberMutationResult = NonNullable<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannelMember>>>
|
|
3954
4669
|
|
|
3955
|
-
export type
|
|
4670
|
+
export type V3WorkspacesControllerDeleteChannelMemberMutationError = ErrorType<unknown>
|
|
3956
4671
|
|
|
3957
4672
|
/**
|
|
3958
|
-
* @summary Remove a member from
|
|
4673
|
+
* @summary Remove a member from a channel (Enterprise M2M)
|
|
3959
4674
|
*/
|
|
3960
|
-
export const
|
|
3961
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof
|
|
4675
|
+
export const useV3WorkspacesControllerDeleteChannelMember = <TError = ErrorType<unknown>,
|
|
4676
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannelMember>>, TError,{slug: string;channelId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
3962
4677
|
): UseMutationResult<
|
|
3963
|
-
Awaited<ReturnType<typeof
|
|
4678
|
+
Awaited<ReturnType<typeof v3WorkspacesControllerDeleteChannelMember>>,
|
|
3964
4679
|
TError,
|
|
3965
|
-
{slug: string;userId: string},
|
|
4680
|
+
{slug: string;channelId: string;userId: string},
|
|
3966
4681
|
TContext
|
|
3967
4682
|
> => {
|
|
3968
4683
|
|
|
3969
|
-
const mutationOptions =
|
|
4684
|
+
const mutationOptions = getV3WorkspacesControllerDeleteChannelMemberMutationOptions(options);
|
|
3970
4685
|
|
|
3971
4686
|
return useMutation(mutationOptions);
|
|
3972
4687
|
}
|
|
@@ -10926,11 +11641,14 @@ export const useChannelsControllerGetChannelMembers = <TData = Awaited<ReturnTyp
|
|
|
10926
11641
|
export const channelsControllerAddChannelMembers = (
|
|
10927
11642
|
slug: string,
|
|
10928
11643
|
channelId: string,
|
|
11644
|
+
addChannelMemberDto: BodyType<AddChannelMemberDto>,
|
|
10929
11645
|
options?: SecondParameter<typeof customInstance>,) => {
|
|
10930
11646
|
|
|
10931
11647
|
|
|
10932
11648
|
return customInstance<void>(
|
|
10933
|
-
{url: `/api/workspaces/${slug}/channels/${channelId}/members`, method: 'POST'
|
|
11649
|
+
{url: `/api/workspaces/${slug}/channels/${channelId}/members`, method: 'POST',
|
|
11650
|
+
headers: {'Content-Type': 'application/json', },
|
|
11651
|
+
data: addChannelMemberDto
|
|
10934
11652
|
},
|
|
10935
11653
|
options);
|
|
10936
11654
|
}
|
|
@@ -10938,17 +11656,17 @@ export const channelsControllerAddChannelMembers = (
|
|
|
10938
11656
|
|
|
10939
11657
|
|
|
10940
11658
|
export const getChannelsControllerAddChannelMembersMutationOptions = <TError = ErrorType<unknown>,
|
|
10941
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, TError,{slug: string;channelId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
10942
|
-
): UseMutationOptions<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, TError,{slug: string;channelId: string}, TContext> => {
|
|
11659
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, TError,{slug: string;channelId: string;data: BodyType<AddChannelMemberDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
11660
|
+
): UseMutationOptions<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, TError,{slug: string;channelId: string;data: BodyType<AddChannelMemberDto>}, TContext> => {
|
|
10943
11661
|
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
10944
11662
|
|
|
10945
11663
|
|
|
10946
11664
|
|
|
10947
11665
|
|
|
10948
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, {slug: string;channelId: string}> = (props) => {
|
|
10949
|
-
const {slug,channelId} = props ?? {};
|
|
11666
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, {slug: string;channelId: string;data: BodyType<AddChannelMemberDto>}> = (props) => {
|
|
11667
|
+
const {slug,channelId,data} = props ?? {};
|
|
10950
11668
|
|
|
10951
|
-
return channelsControllerAddChannelMembers(slug,channelId,requestOptions)
|
|
11669
|
+
return channelsControllerAddChannelMembers(slug,channelId,data,requestOptions)
|
|
10952
11670
|
}
|
|
10953
11671
|
|
|
10954
11672
|
|
|
@@ -10957,18 +11675,18 @@ const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
|
10957
11675
|
return { mutationFn, ...mutationOptions }}
|
|
10958
11676
|
|
|
10959
11677
|
export type ChannelsControllerAddChannelMembersMutationResult = NonNullable<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>>
|
|
10960
|
-
|
|
11678
|
+
export type ChannelsControllerAddChannelMembersMutationBody = BodyType<AddChannelMemberDto>
|
|
10961
11679
|
export type ChannelsControllerAddChannelMembersMutationError = ErrorType<unknown>
|
|
10962
11680
|
|
|
10963
11681
|
/**
|
|
10964
11682
|
* @summary Add members to a channel
|
|
10965
11683
|
*/
|
|
10966
11684
|
export const useChannelsControllerAddChannelMembers = <TError = ErrorType<unknown>,
|
|
10967
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, TError,{slug: string;channelId: string}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
11685
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>, TError,{slug: string;channelId: string;data: BodyType<AddChannelMemberDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
10968
11686
|
): UseMutationResult<
|
|
10969
11687
|
Awaited<ReturnType<typeof channelsControllerAddChannelMembers>>,
|
|
10970
11688
|
TError,
|
|
10971
|
-
{slug: string;channelId: string},
|
|
11689
|
+
{slug: string;channelId: string;data: BodyType<AddChannelMemberDto>},
|
|
10972
11690
|
TContext
|
|
10973
11691
|
> => {
|
|
10974
11692
|
|
|
@@ -10977,6 +11695,67 @@ export const useChannelsControllerAddChannelMembers = <TError = ErrorType<unknow
|
|
|
10977
11695
|
return useMutation(mutationOptions);
|
|
10978
11696
|
}
|
|
10979
11697
|
|
|
11698
|
+
/**
|
|
11699
|
+
* @summary Update channel member role and permissions
|
|
11700
|
+
*/
|
|
11701
|
+
export const channelsControllerUpdateChannelMember = (
|
|
11702
|
+
slug: string,
|
|
11703
|
+
channelId: string,
|
|
11704
|
+
targetUserId: string,
|
|
11705
|
+
updateChannelMemberDto: BodyType<UpdateChannelMemberDto>,
|
|
11706
|
+
options?: SecondParameter<typeof customInstance>,) => {
|
|
11707
|
+
|
|
11708
|
+
|
|
11709
|
+
return customInstance<void>(
|
|
11710
|
+
{url: `/api/workspaces/${slug}/channels/${channelId}/members/${targetUserId}`, method: 'PATCH',
|
|
11711
|
+
headers: {'Content-Type': 'application/json', },
|
|
11712
|
+
data: updateChannelMemberDto
|
|
11713
|
+
},
|
|
11714
|
+
options);
|
|
11715
|
+
}
|
|
11716
|
+
|
|
11717
|
+
|
|
11718
|
+
|
|
11719
|
+
export const getChannelsControllerUpdateChannelMemberMutationOptions = <TError = ErrorType<unknown>,
|
|
11720
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof channelsControllerUpdateChannelMember>>, TError,{slug: string;channelId: string;targetUserId: string;data: BodyType<UpdateChannelMemberDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
11721
|
+
): UseMutationOptions<Awaited<ReturnType<typeof channelsControllerUpdateChannelMember>>, TError,{slug: string;channelId: string;targetUserId: string;data: BodyType<UpdateChannelMemberDto>}, TContext> => {
|
|
11722
|
+
const {mutation: mutationOptions, request: requestOptions} = options ?? {};
|
|
11723
|
+
|
|
11724
|
+
|
|
11725
|
+
|
|
11726
|
+
|
|
11727
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<typeof channelsControllerUpdateChannelMember>>, {slug: string;channelId: string;targetUserId: string;data: BodyType<UpdateChannelMemberDto>}> = (props) => {
|
|
11728
|
+
const {slug,channelId,targetUserId,data} = props ?? {};
|
|
11729
|
+
|
|
11730
|
+
return channelsControllerUpdateChannelMember(slug,channelId,targetUserId,data,requestOptions)
|
|
11731
|
+
}
|
|
11732
|
+
|
|
11733
|
+
|
|
11734
|
+
|
|
11735
|
+
|
|
11736
|
+
return { mutationFn, ...mutationOptions }}
|
|
11737
|
+
|
|
11738
|
+
export type ChannelsControllerUpdateChannelMemberMutationResult = NonNullable<Awaited<ReturnType<typeof channelsControllerUpdateChannelMember>>>
|
|
11739
|
+
export type ChannelsControllerUpdateChannelMemberMutationBody = BodyType<UpdateChannelMemberDto>
|
|
11740
|
+
export type ChannelsControllerUpdateChannelMemberMutationError = ErrorType<unknown>
|
|
11741
|
+
|
|
11742
|
+
/**
|
|
11743
|
+
* @summary Update channel member role and permissions
|
|
11744
|
+
*/
|
|
11745
|
+
export const useChannelsControllerUpdateChannelMember = <TError = ErrorType<unknown>,
|
|
11746
|
+
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof channelsControllerUpdateChannelMember>>, TError,{slug: string;channelId: string;targetUserId: string;data: BodyType<UpdateChannelMemberDto>}, TContext>, request?: SecondParameter<typeof customInstance>}
|
|
11747
|
+
): UseMutationResult<
|
|
11748
|
+
Awaited<ReturnType<typeof channelsControllerUpdateChannelMember>>,
|
|
11749
|
+
TError,
|
|
11750
|
+
{slug: string;channelId: string;targetUserId: string;data: BodyType<UpdateChannelMemberDto>},
|
|
11751
|
+
TContext
|
|
11752
|
+
> => {
|
|
11753
|
+
|
|
11754
|
+
const mutationOptions = getChannelsControllerUpdateChannelMemberMutationOptions(options);
|
|
11755
|
+
|
|
11756
|
+
return useMutation(mutationOptions);
|
|
11757
|
+
}
|
|
11758
|
+
|
|
10980
11759
|
/**
|
|
10981
11760
|
* @summary Remove a member from a channel
|
|
10982
11761
|
*/
|