@squonk/account-server-client 4.2.1 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset/asset.cjs +99 -126
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +99 -99
- package/asset/asset.d.ts +99 -99
- package/asset/asset.js +107 -134
- package/asset/asset.js.map +1 -1
- package/charges/charges.cjs +73 -85
- package/charges/charges.cjs.map +1 -1
- package/charges/charges.d.cts +47 -47
- package/charges/charges.d.ts +47 -47
- package/charges/charges.js +78 -90
- package/charges/charges.js.map +1 -1
- package/chunk-3WKSNKHE.js +25 -0
- package/chunk-3WKSNKHE.js.map +1 -0
- package/chunk-NY2VJJG7.cjs +25 -0
- package/chunk-NY2VJJG7.cjs.map +1 -0
- package/{chunk-TKLTUR4R.cjs → chunk-RB2KVIEK.cjs} +1 -1
- package/chunk-RB2KVIEK.cjs.map +1 -0
- package/{chunk-EBOQPVLG.js → chunk-XYDLYMQ2.js} +1 -1
- package/chunk-XYDLYMQ2.js.map +1 -0
- package/event-stream/event-stream.cjs +53 -61
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.d.cts +45 -45
- package/event-stream/event-stream.d.ts +45 -45
- package/event-stream/event-stream.js +58 -66
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs +49 -57
- package/index.cjs.map +1 -1
- package/index.d.cts +796 -773
- package/index.d.ts +796 -773
- package/index.js +48 -56
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +38 -45
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +25 -25
- package/merchant/merchant.d.ts +25 -25
- package/merchant/merchant.js +42 -49
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +77 -87
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +72 -70
- package/organisation/organisation.d.ts +72 -70
- package/organisation/organisation.js +83 -93
- package/organisation/organisation.js.map +1 -1
- package/package.json +13 -16
- package/product/product.cjs +143 -153
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +100 -100
- package/product/product.d.ts +100 -100
- package/product/product.js +153 -163
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +863 -856
- package/src/asset/asset.ts +899 -634
- package/src/charges/charges.ts +822 -498
- package/src/custom-instance.ts +3 -3
- package/src/event-stream/event-stream.ts +531 -345
- package/src/index.ts +2 -2
- package/src/merchant/merchant.ts +355 -234
- package/src/options-mutator.ts +27 -0
- package/src/organisation/organisation.ts +812 -504
- package/src/product/product.ts +1373 -841
- package/src/state/state.ts +174 -127
- package/src/unit/unit.ts +1273 -603
- package/src/user/user.ts +895 -564
- package/state/state.cjs +22 -24
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +14 -14
- package/state/state.d.ts +14 -14
- package/state/state.js +24 -26
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +171 -106
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +200 -90
- package/unit/unit.d.ts +200 -90
- package/unit/unit.js +179 -114
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +94 -110
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +77 -77
- package/user/user.d.ts +77 -77
- package/user/user.js +101 -117
- package/user/user.js.map +1 -1
- package/chunk-EBOQPVLG.js.map +0 -1
- package/chunk-TKLTUR4R.cjs.map +0 -1
package/user/user.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
1
|
+
import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, QueryClient, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
2
2
|
import { customInstance, UserAccountDetail, ErrorType, AsError, UsersGetResponse } from '../index.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
|
-
type SecondParameter<T extends (...args:
|
|
5
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
6
6
|
/**
|
|
7
7
|
* Returns a summary of your account
|
|
8
8
|
|
|
9
9
|
* @summary Get information about your account
|
|
10
10
|
*/
|
|
11
11
|
declare const getUserAccount: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UserAccountDetail>;
|
|
12
|
-
declare const getGetUserAccountQueryKey: () => readonly ["
|
|
13
|
-
declare const
|
|
12
|
+
declare const getGetUserAccountQueryKey: () => readonly ["/user/account"];
|
|
13
|
+
declare const useGetUserAccountQueryOptions: <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(options?: {
|
|
14
14
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>;
|
|
15
15
|
request?: SecondParameter<typeof customInstance>;
|
|
16
16
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData> & {
|
|
@@ -19,24 +19,24 @@ declare const getGetUserAccountQueryOptions: <TData = UserAccountDetail, TError
|
|
|
19
19
|
type GetUserAccountQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>;
|
|
20
20
|
type GetUserAccountQueryError = ErrorType<void | AsError>;
|
|
21
21
|
declare function useGetUserAccount<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(options: {
|
|
22
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUserAccount>>, TError,
|
|
22
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, Awaited<ReturnType<typeof getUserAccount>>>, "initialData">;
|
|
23
23
|
request?: SecondParameter<typeof customInstance>;
|
|
24
|
-
}): DefinedUseQueryResult<TData, TError> & {
|
|
24
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
25
25
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
26
26
|
};
|
|
27
27
|
declare function useGetUserAccount<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(options?: {
|
|
28
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUserAccount>>, TError,
|
|
28
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, Awaited<ReturnType<typeof getUserAccount>>>, "initialData">;
|
|
29
29
|
request?: SecondParameter<typeof customInstance>;
|
|
30
|
-
}): UseQueryResult<TData, TError> & {
|
|
30
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
31
31
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
32
32
|
};
|
|
33
33
|
declare function useGetUserAccount<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(options?: {
|
|
34
34
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>;
|
|
35
35
|
request?: SecondParameter<typeof customInstance>;
|
|
36
|
-
}): UseQueryResult<TData, TError> & {
|
|
36
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
37
37
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
38
38
|
};
|
|
39
|
-
declare const
|
|
39
|
+
declare const useGetUserAccountSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(options?: {
|
|
40
40
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>;
|
|
41
41
|
request?: SecondParameter<typeof customInstance>;
|
|
42
42
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData> & {
|
|
@@ -47,19 +47,19 @@ type GetUserAccountSuspenseQueryError = ErrorType<void | AsError>;
|
|
|
47
47
|
declare function useGetUserAccountSuspense<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(options: {
|
|
48
48
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>;
|
|
49
49
|
request?: SecondParameter<typeof customInstance>;
|
|
50
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
50
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
51
51
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
52
52
|
};
|
|
53
53
|
declare function useGetUserAccountSuspense<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(options?: {
|
|
54
54
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>;
|
|
55
55
|
request?: SecondParameter<typeof customInstance>;
|
|
56
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
56
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
57
57
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
58
58
|
};
|
|
59
59
|
declare function useGetUserAccountSuspense<TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(options?: {
|
|
60
60
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>;
|
|
61
61
|
request?: SecondParameter<typeof customInstance>;
|
|
62
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
62
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
63
63
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
@@ -72,8 +72,8 @@ You have to be a member of the Organisation or an admin user to use this endpoin
|
|
|
72
72
|
* @summary Gets users in an Organisation
|
|
73
73
|
*/
|
|
74
74
|
declare const getOrganisationUsers: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UsersGetResponse>;
|
|
75
|
-
declare const getGetOrganisationUsersQueryKey: (orgId: string) => readonly [
|
|
76
|
-
declare const
|
|
75
|
+
declare const getGetOrganisationUsersQueryKey: (orgId: string) => readonly [`/organisation/${string}/user`];
|
|
76
|
+
declare const useGetOrganisationUsersQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(orgId: string, options?: {
|
|
77
77
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>;
|
|
78
78
|
request?: SecondParameter<typeof customInstance>;
|
|
79
79
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData> & {
|
|
@@ -82,24 +82,24 @@ declare const getGetOrganisationUsersQueryOptions: <TData = UsersGetResponse, TE
|
|
|
82
82
|
type GetOrganisationUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>;
|
|
83
83
|
type GetOrganisationUsersQueryError = ErrorType<AsError | void>;
|
|
84
84
|
declare function useGetOrganisationUsers<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(orgId: string, options: {
|
|
85
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError,
|
|
85
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, Awaited<ReturnType<typeof getOrganisationUsers>>>, "initialData">;
|
|
86
86
|
request?: SecondParameter<typeof customInstance>;
|
|
87
|
-
}): DefinedUseQueryResult<TData, TError> & {
|
|
87
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
88
88
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
89
89
|
};
|
|
90
90
|
declare function useGetOrganisationUsers<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(orgId: string, options?: {
|
|
91
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError,
|
|
91
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, Awaited<ReturnType<typeof getOrganisationUsers>>>, "initialData">;
|
|
92
92
|
request?: SecondParameter<typeof customInstance>;
|
|
93
|
-
}): UseQueryResult<TData, TError> & {
|
|
93
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
94
94
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
95
95
|
};
|
|
96
96
|
declare function useGetOrganisationUsers<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(orgId: string, options?: {
|
|
97
97
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>;
|
|
98
98
|
request?: SecondParameter<typeof customInstance>;
|
|
99
|
-
}): UseQueryResult<TData, TError> & {
|
|
99
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
100
100
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
101
101
|
};
|
|
102
|
-
declare const
|
|
102
|
+
declare const useGetOrganisationUsersSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(orgId: string, options?: {
|
|
103
103
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>;
|
|
104
104
|
request?: SecondParameter<typeof customInstance>;
|
|
105
105
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData> & {
|
|
@@ -110,19 +110,19 @@ type GetOrganisationUsersSuspenseQueryError = ErrorType<AsError | void>;
|
|
|
110
110
|
declare function useGetOrganisationUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(orgId: string, options: {
|
|
111
111
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>;
|
|
112
112
|
request?: SecondParameter<typeof customInstance>;
|
|
113
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
113
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
114
114
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
115
115
|
};
|
|
116
116
|
declare function useGetOrganisationUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(orgId: string, options?: {
|
|
117
117
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>;
|
|
118
118
|
request?: SecondParameter<typeof customInstance>;
|
|
119
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
119
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
120
120
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
121
121
|
};
|
|
122
122
|
declare function useGetOrganisationUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(orgId: string, options?: {
|
|
123
123
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>;
|
|
124
124
|
request?: SecondParameter<typeof customInstance>;
|
|
125
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
125
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
126
126
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
127
127
|
};
|
|
128
128
|
/**
|
|
@@ -133,76 +133,76 @@ You have to be in the Organisation or an admin user to use this endpoint
|
|
|
133
133
|
* @summary Adds a User to an Organisation
|
|
134
134
|
*/
|
|
135
135
|
declare const addOrganisationUser: (orgId: string, userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
136
|
-
declare const
|
|
137
|
-
mutation?: UseMutationOptions<
|
|
136
|
+
declare const useAddOrganisationUserMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
137
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError, {
|
|
138
138
|
orgId: string;
|
|
139
139
|
userId: string;
|
|
140
140
|
}, TContext>;
|
|
141
141
|
request?: SecondParameter<typeof customInstance>;
|
|
142
|
-
}) => UseMutationOptions<
|
|
142
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError, {
|
|
143
143
|
orgId: string;
|
|
144
144
|
userId: string;
|
|
145
145
|
}, TContext>;
|
|
146
146
|
type AddOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUser>>>;
|
|
147
147
|
type AddOrganisationUserMutationError = ErrorType<AsError | void>;
|
|
148
148
|
/**
|
|
149
|
-
* @summary Adds a User to an Organisation
|
|
150
|
-
*/
|
|
151
|
-
declare const useAddOrganisationUser: <
|
|
152
|
-
mutation?: UseMutationOptions<
|
|
149
|
+
* @summary Adds a User to an Organisation
|
|
150
|
+
*/
|
|
151
|
+
declare const useAddOrganisationUser: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
152
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError, {
|
|
153
153
|
orgId: string;
|
|
154
154
|
userId: string;
|
|
155
155
|
}, TContext>;
|
|
156
156
|
request?: SecondParameter<typeof customInstance>;
|
|
157
|
-
}) => UseMutationResult<
|
|
157
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof addOrganisationUser>>, TError, {
|
|
158
158
|
orgId: string;
|
|
159
159
|
userId: string;
|
|
160
160
|
}, TContext>;
|
|
161
161
|
/**
|
|
162
|
-
* Removes a User from an **Organisation**.
|
|
162
|
+
* Removes a User from an **Organisation**.
|
|
163
163
|
|
|
164
164
|
You have to be in the Organisation or an admin user to use this endpoint
|
|
165
165
|
|
|
166
|
-
* @summary Deletes a User from an Organisation
|
|
167
|
-
*/
|
|
166
|
+
* @summary Deletes a User from an Organisation
|
|
167
|
+
*/
|
|
168
168
|
declare const deleteOrganisationUser: (orgId: string, userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
169
|
-
declare const
|
|
170
|
-
mutation?: UseMutationOptions<
|
|
169
|
+
declare const useDeleteOrganisationUserMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
170
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError, {
|
|
171
171
|
orgId: string;
|
|
172
172
|
userId: string;
|
|
173
173
|
}, TContext>;
|
|
174
174
|
request?: SecondParameter<typeof customInstance>;
|
|
175
|
-
}) => UseMutationOptions<
|
|
175
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError, {
|
|
176
176
|
orgId: string;
|
|
177
177
|
userId: string;
|
|
178
178
|
}, TContext>;
|
|
179
179
|
type DeleteOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUser>>>;
|
|
180
180
|
type DeleteOrganisationUserMutationError = ErrorType<AsError | void>;
|
|
181
181
|
/**
|
|
182
|
-
* @summary Deletes a User from an Organisation
|
|
183
|
-
*/
|
|
184
|
-
declare const useDeleteOrganisationUser: <
|
|
185
|
-
mutation?: UseMutationOptions<
|
|
182
|
+
* @summary Deletes a User from an Organisation
|
|
183
|
+
*/
|
|
184
|
+
declare const useDeleteOrganisationUser: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
185
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError, {
|
|
186
186
|
orgId: string;
|
|
187
187
|
userId: string;
|
|
188
188
|
}, TContext>;
|
|
189
189
|
request?: SecondParameter<typeof customInstance>;
|
|
190
|
-
}) => UseMutationResult<
|
|
190
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError, {
|
|
191
191
|
orgId: string;
|
|
192
192
|
userId: string;
|
|
193
193
|
}, TContext>;
|
|
194
194
|
/**
|
|
195
|
-
* Gets users in an Organisational Unit.
|
|
195
|
+
* Gets users in an Organisational Unit.
|
|
196
196
|
|
|
197
197
|
You have to be in the Organisation or Unit or an Admin user to use this endpoint
|
|
198
198
|
|
|
199
199
|
**WARNING**: This endpoint is **DEPRECATED** and will be removed in a future release. Please use the `GET /unit/{unit_id}` endpoint instead.
|
|
200
200
|
|
|
201
|
-
* @summary Gets users in an Organisational Unit
|
|
202
|
-
*/
|
|
201
|
+
* @summary Gets users in an Organisational Unit
|
|
202
|
+
*/
|
|
203
203
|
declare const getOrganisationUnitUsers: (unitId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UsersGetResponse>;
|
|
204
|
-
declare const getGetOrganisationUnitUsersQueryKey: (unitId: string) => readonly [
|
|
205
|
-
declare const
|
|
204
|
+
declare const getGetOrganisationUnitUsersQueryKey: (unitId: string) => readonly [`/unit/${string}/user`];
|
|
205
|
+
declare const useGetOrganisationUnitUsersQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(unitId: string, options?: {
|
|
206
206
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>;
|
|
207
207
|
request?: SecondParameter<typeof customInstance>;
|
|
208
208
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData> & {
|
|
@@ -211,24 +211,24 @@ declare const getGetOrganisationUnitUsersQueryOptions: <TData = UsersGetResponse
|
|
|
211
211
|
type GetOrganisationUnitUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>;
|
|
212
212
|
type GetOrganisationUnitUsersQueryError = ErrorType<AsError | void>;
|
|
213
213
|
declare function useGetOrganisationUnitUsers<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(unitId: string, options: {
|
|
214
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError,
|
|
214
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, Awaited<ReturnType<typeof getOrganisationUnitUsers>>>, "initialData">;
|
|
215
215
|
request?: SecondParameter<typeof customInstance>;
|
|
216
|
-
}): DefinedUseQueryResult<TData, TError> & {
|
|
216
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
217
217
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
218
218
|
};
|
|
219
219
|
declare function useGetOrganisationUnitUsers<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(unitId: string, options?: {
|
|
220
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError,
|
|
220
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, Awaited<ReturnType<typeof getOrganisationUnitUsers>>>, "initialData">;
|
|
221
221
|
request?: SecondParameter<typeof customInstance>;
|
|
222
|
-
}): UseQueryResult<TData, TError> & {
|
|
222
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
223
223
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
224
224
|
};
|
|
225
225
|
declare function useGetOrganisationUnitUsers<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(unitId: string, options?: {
|
|
226
226
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>;
|
|
227
227
|
request?: SecondParameter<typeof customInstance>;
|
|
228
|
-
}): UseQueryResult<TData, TError> & {
|
|
228
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
229
229
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
230
230
|
};
|
|
231
|
-
declare const
|
|
231
|
+
declare const useGetOrganisationUnitUsersSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(unitId: string, options?: {
|
|
232
232
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>;
|
|
233
233
|
request?: SecondParameter<typeof customInstance>;
|
|
234
234
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData> & {
|
|
@@ -239,19 +239,19 @@ type GetOrganisationUnitUsersSuspenseQueryError = ErrorType<AsError | void>;
|
|
|
239
239
|
declare function useGetOrganisationUnitUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(unitId: string, options: {
|
|
240
240
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>;
|
|
241
241
|
request?: SecondParameter<typeof customInstance>;
|
|
242
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
242
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
243
243
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
244
244
|
};
|
|
245
245
|
declare function useGetOrganisationUnitUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(unitId: string, options?: {
|
|
246
246
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>;
|
|
247
247
|
request?: SecondParameter<typeof customInstance>;
|
|
248
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
248
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
249
249
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
250
250
|
};
|
|
251
251
|
declare function useGetOrganisationUnitUsersSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(unitId: string, options?: {
|
|
252
252
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>;
|
|
253
253
|
request?: SecondParameter<typeof customInstance>;
|
|
254
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
254
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
255
255
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
256
256
|
};
|
|
257
257
|
/**
|
|
@@ -264,65 +264,65 @@ You have to be in the Organisation or Unit or an Admin user to use this endpoint
|
|
|
264
264
|
* @summary Adds a user to an Organisational Unit
|
|
265
265
|
*/
|
|
266
266
|
declare const addOrganisationUnitUser: (unitId: string, userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
267
|
-
declare const
|
|
268
|
-
mutation?: UseMutationOptions<
|
|
267
|
+
declare const useAddOrganisationUnitUserMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
268
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError, {
|
|
269
269
|
unitId: string;
|
|
270
270
|
userId: string;
|
|
271
271
|
}, TContext>;
|
|
272
272
|
request?: SecondParameter<typeof customInstance>;
|
|
273
|
-
}) => UseMutationOptions<
|
|
273
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError, {
|
|
274
274
|
unitId: string;
|
|
275
275
|
userId: string;
|
|
276
276
|
}, TContext>;
|
|
277
277
|
type AddOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUnitUser>>>;
|
|
278
278
|
type AddOrganisationUnitUserMutationError = ErrorType<AsError | void>;
|
|
279
279
|
/**
|
|
280
|
-
* @summary Adds a user to an Organisational Unit
|
|
281
|
-
*/
|
|
282
|
-
declare const useAddOrganisationUnitUser: <
|
|
283
|
-
mutation?: UseMutationOptions<
|
|
280
|
+
* @summary Adds a user to an Organisational Unit
|
|
281
|
+
*/
|
|
282
|
+
declare const useAddOrganisationUnitUser: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
283
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError, {
|
|
284
284
|
unitId: string;
|
|
285
285
|
userId: string;
|
|
286
286
|
}, TContext>;
|
|
287
287
|
request?: SecondParameter<typeof customInstance>;
|
|
288
|
-
}) => UseMutationResult<
|
|
288
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError, {
|
|
289
289
|
unitId: string;
|
|
290
290
|
userId: string;
|
|
291
291
|
}, TContext>;
|
|
292
292
|
/**
|
|
293
|
-
* Removes a User from an Organisational Unit.
|
|
293
|
+
* Removes a User from an Organisational Unit.
|
|
294
294
|
|
|
295
295
|
Users cannot be removed from **Personal Units** (Units that are part of the ***Default** Organisation).
|
|
296
296
|
|
|
297
297
|
You have to be in the Organisation or Unit or an Admin user to use this endpoint
|
|
298
298
|
|
|
299
|
-
* @summary Deletes a User from an Organisational Unit
|
|
300
|
-
*/
|
|
299
|
+
* @summary Deletes a User from an Organisational Unit
|
|
300
|
+
*/
|
|
301
301
|
declare const deleteOrganisationUnitUser: (unitId: string, userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
302
|
-
declare const
|
|
303
|
-
mutation?: UseMutationOptions<
|
|
302
|
+
declare const useDeleteOrganisationUnitUserMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
303
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError, {
|
|
304
304
|
unitId: string;
|
|
305
305
|
userId: string;
|
|
306
306
|
}, TContext>;
|
|
307
307
|
request?: SecondParameter<typeof customInstance>;
|
|
308
|
-
}) => UseMutationOptions<
|
|
308
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError, {
|
|
309
309
|
unitId: string;
|
|
310
310
|
userId: string;
|
|
311
311
|
}, TContext>;
|
|
312
312
|
type DeleteOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>>;
|
|
313
313
|
type DeleteOrganisationUnitUserMutationError = ErrorType<AsError | void>;
|
|
314
314
|
/**
|
|
315
|
-
* @summary Deletes a User from an Organisational Unit
|
|
316
|
-
*/
|
|
317
|
-
declare const useDeleteOrganisationUnitUser: <
|
|
318
|
-
mutation?: UseMutationOptions<
|
|
315
|
+
* @summary Deletes a User from an Organisational Unit
|
|
316
|
+
*/
|
|
317
|
+
declare const useDeleteOrganisationUnitUser: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
318
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError, {
|
|
319
319
|
unitId: string;
|
|
320
320
|
userId: string;
|
|
321
321
|
}, TContext>;
|
|
322
322
|
request?: SecondParameter<typeof customInstance>;
|
|
323
|
-
}) => UseMutationResult<
|
|
323
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError, {
|
|
324
324
|
unitId: string;
|
|
325
325
|
userId: string;
|
|
326
326
|
}, TContext>;
|
|
327
327
|
|
|
328
|
-
export { type AddOrganisationUnitUserMutationError, type AddOrganisationUnitUserMutationResult, type AddOrganisationUserMutationError, type AddOrganisationUserMutationResult, type DeleteOrganisationUnitUserMutationError, type DeleteOrganisationUnitUserMutationResult, type DeleteOrganisationUserMutationError, type DeleteOrganisationUserMutationResult, type GetOrganisationUnitUsersQueryError, type GetOrganisationUnitUsersQueryResult, type GetOrganisationUnitUsersSuspenseQueryError, type GetOrganisationUnitUsersSuspenseQueryResult, type GetOrganisationUsersQueryError, type GetOrganisationUsersQueryResult, type GetOrganisationUsersSuspenseQueryError, type GetOrganisationUsersSuspenseQueryResult, type GetUserAccountQueryError, type GetUserAccountQueryResult, type GetUserAccountSuspenseQueryError, type GetUserAccountSuspenseQueryResult, addOrganisationUnitUser, addOrganisationUser, deleteOrganisationUnitUser, deleteOrganisationUser,
|
|
328
|
+
export { type AddOrganisationUnitUserMutationError, type AddOrganisationUnitUserMutationResult, type AddOrganisationUserMutationError, type AddOrganisationUserMutationResult, type DeleteOrganisationUnitUserMutationError, type DeleteOrganisationUnitUserMutationResult, type DeleteOrganisationUserMutationError, type DeleteOrganisationUserMutationResult, type GetOrganisationUnitUsersQueryError, type GetOrganisationUnitUsersQueryResult, type GetOrganisationUnitUsersSuspenseQueryError, type GetOrganisationUnitUsersSuspenseQueryResult, type GetOrganisationUsersQueryError, type GetOrganisationUsersQueryResult, type GetOrganisationUsersSuspenseQueryError, type GetOrganisationUsersSuspenseQueryResult, type GetUserAccountQueryError, type GetUserAccountQueryResult, type GetUserAccountSuspenseQueryError, type GetUserAccountSuspenseQueryResult, addOrganisationUnitUser, addOrganisationUser, deleteOrganisationUnitUser, deleteOrganisationUser, getGetOrganisationUnitUsersQueryKey, getGetOrganisationUsersQueryKey, getGetUserAccountQueryKey, getOrganisationUnitUsers, getOrganisationUsers, getUserAccount, useAddOrganisationUnitUser, useAddOrganisationUnitUserMutationOptions, useAddOrganisationUser, useAddOrganisationUserMutationOptions, useDeleteOrganisationUnitUser, useDeleteOrganisationUnitUserMutationOptions, useDeleteOrganisationUser, useDeleteOrganisationUserMutationOptions, useGetOrganisationUnitUsers, useGetOrganisationUnitUsersQueryOptions, useGetOrganisationUnitUsersSuspense, useGetOrganisationUnitUsersSuspenseQueryOptions, useGetOrganisationUsers, useGetOrganisationUsersQueryOptions, useGetOrganisationUsersSuspense, useGetOrganisationUsersSuspenseQueryOptions, useGetUserAccount, useGetUserAccountQueryOptions, useGetUserAccountSuspense, useGetUserAccountSuspenseQueryOptions };
|