@squonk/account-server-client 2.1.0-rc.1 → 2.1.0-rc.11

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.
Files changed (78) hide show
  1. package/README.md +1 -1
  2. package/admin/admin.cjs +30 -8
  3. package/admin/admin.cjs.map +1 -1
  4. package/admin/admin.d.cts +50 -0
  5. package/admin/admin.d.ts +26 -6
  6. package/admin/admin.js +30 -8
  7. package/admin/admin.js.map +1 -1
  8. package/asset/asset.cjs +62 -22
  9. package/asset/asset.cjs.map +1 -1
  10. package/asset/asset.d.cts +260 -0
  11. package/asset/asset.d.ts +79 -36
  12. package/asset/asset.js +54 -14
  13. package/asset/asset.js.map +1 -1
  14. package/{chunk-3RNIDX7T.js → chunk-EBOQPVLG.js} +2 -2
  15. package/{chunk-3RNIDX7T.js.map → chunk-EBOQPVLG.js.map} +1 -1
  16. package/{chunk-UZTHSGDT.cjs → chunk-TKLTUR4R.cjs} +2 -2
  17. package/chunk-TKLTUR4R.cjs.map +1 -0
  18. package/event-stream/event-stream.cjs +64 -19
  19. package/event-stream/event-stream.cjs.map +1 -1
  20. package/event-stream/event-stream.d.cts +142 -0
  21. package/event-stream/event-stream.d.ts +66 -20
  22. package/event-stream/event-stream.js +61 -16
  23. package/event-stream/event-stream.js.map +1 -1
  24. package/index.cjs +10 -10
  25. package/index.cjs.map +1 -1
  26. package/{custom-instance-35e5d4fd.d.ts → index.d.cts} +163 -163
  27. package/index.d.ts +700 -2
  28. package/index.js +9 -9
  29. package/index.js.map +1 -1
  30. package/merchant/merchant.cjs +53 -14
  31. package/merchant/merchant.cjs.map +1 -1
  32. package/merchant/merchant.d.cts +91 -0
  33. package/merchant/merchant.d.ts +48 -8
  34. package/merchant/merchant.js +52 -13
  35. package/merchant/merchant.js.map +1 -1
  36. package/organisation/organisation.cjs +110 -28
  37. package/organisation/organisation.cjs.map +1 -1
  38. package/organisation/organisation.d.cts +271 -0
  39. package/organisation/organisation.d.ts +114 -25
  40. package/organisation/organisation.js +103 -21
  41. package/organisation/organisation.js.map +1 -1
  42. package/package.json +12 -12
  43. package/product/product.cjs +182 -47
  44. package/product/product.cjs.map +1 -1
  45. package/product/product.d.cts +399 -0
  46. package/product/product.d.ts +180 -31
  47. package/product/product.js +172 -37
  48. package/product/product.js.map +1 -1
  49. package/src/account-server-api.schemas.ts +272 -280
  50. package/src/admin/admin.ts +114 -84
  51. package/src/asset/asset.ts +480 -565
  52. package/src/custom-instance.ts +3 -4
  53. package/src/event-stream/event-stream.ts +300 -275
  54. package/src/merchant/merchant.ts +206 -142
  55. package/src/organisation/organisation.ts +549 -490
  56. package/src/product/product.ts +829 -688
  57. package/src/state/state.ts +112 -75
  58. package/src/unit/unit.ts +645 -599
  59. package/src/user/user.ts +489 -469
  60. package/state/state.cjs +29 -8
  61. package/state/state.cjs.map +1 -1
  62. package/state/state.d.cts +46 -0
  63. package/state/state.d.ts +26 -6
  64. package/state/state.js +29 -8
  65. package/state/state.js.map +1 -1
  66. package/unit/unit.cjs +120 -32
  67. package/unit/unit.cjs.map +1 -1
  68. package/unit/unit.d.cts +322 -0
  69. package/unit/unit.d.ts +133 -38
  70. package/unit/unit.js +112 -24
  71. package/unit/unit.js.map +1 -1
  72. package/user/user.cjs +96 -22
  73. package/user/user.cjs.map +1 -1
  74. package/user/user.d.cts +271 -0
  75. package/user/user.d.ts +96 -24
  76. package/user/user.js +90 -16
  77. package/user/user.js.map +1 -1
  78. package/chunk-UZTHSGDT.cjs.map +0 -1
@@ -0,0 +1,271 @@
1
+ import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
2
+ import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
3
+ import { customInstance, UserAccountDetail, ErrorType, AsError, UsersGetResponse } from '../index.cjs';
4
+ import 'axios';
5
+
6
+ type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
7
+ /**
8
+ * Returns a summary of your account
9
+
10
+ * @summary Get information about your account
11
+ */
12
+ declare const getUserAccount: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UserAccountDetail>;
13
+ declare const getGetUserAccountQueryKey: () => readonly ["account-server-api", "/user/account"];
14
+ declare const getGetUserAccountQueryOptions: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
15
+ query?: Partial<UseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
16
+ request?: SecondParameter<typeof customInstance>;
17
+ } | undefined) => UseQueryOptions<UserAccountDetail, TError, TData, QueryKey> & {
18
+ queryKey: QueryKey;
19
+ };
20
+ type GetUserAccountQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>;
21
+ type GetUserAccountQueryError = ErrorType<void | AsError>;
22
+ /**
23
+ * @summary Get information about your account
24
+ */
25
+ declare const useGetUserAccount: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
26
+ query?: Partial<UseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
27
+ request?: SecondParameter<typeof customInstance>;
28
+ } | undefined) => UseQueryResult<TData, TError> & {
29
+ queryKey: QueryKey;
30
+ };
31
+ declare const getGetUserAccountSuspenseQueryOptions: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
32
+ query?: Partial<UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
33
+ request?: SecondParameter<typeof customInstance>;
34
+ } | undefined) => UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey> & {
35
+ queryKey: QueryKey;
36
+ };
37
+ type GetUserAccountSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>;
38
+ type GetUserAccountSuspenseQueryError = ErrorType<void | AsError>;
39
+ /**
40
+ * @summary Get information about your account
41
+ */
42
+ declare const useGetUserAccountSuspense: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
43
+ query?: Partial<UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
44
+ request?: SecondParameter<typeof customInstance>;
45
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
46
+ queryKey: QueryKey;
47
+ };
48
+ /**
49
+ * Gets Users in an Organisation.
50
+
51
+ You have to be a member of the Organisation or an admin user to use this endpoint
52
+
53
+ * @summary Gets users in an Organisation
54
+ */
55
+ declare const getOrganisationUsers: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UsersGetResponse>;
56
+ declare const getGetOrganisationUsersQueryKey: (orgId: string) => readonly ["account-server-api", `/organisation/${string}/user`];
57
+ declare const getGetOrganisationUsersQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
58
+ query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
59
+ request?: SecondParameter<typeof customInstance>;
60
+ } | undefined) => UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
61
+ queryKey: QueryKey;
62
+ };
63
+ type GetOrganisationUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>;
64
+ type GetOrganisationUsersQueryError = ErrorType<AsError | void>;
65
+ /**
66
+ * @summary Gets users in an Organisation
67
+ */
68
+ declare const useGetOrganisationUsers: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
69
+ query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
70
+ request?: SecondParameter<typeof customInstance>;
71
+ } | undefined) => UseQueryResult<TData, TError> & {
72
+ queryKey: QueryKey;
73
+ };
74
+ declare const getGetOrganisationUsersSuspenseQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
75
+ query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
76
+ request?: SecondParameter<typeof customInstance>;
77
+ } | undefined) => UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
78
+ queryKey: QueryKey;
79
+ };
80
+ type GetOrganisationUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>;
81
+ type GetOrganisationUsersSuspenseQueryError = ErrorType<AsError | void>;
82
+ /**
83
+ * @summary Gets users in an Organisation
84
+ */
85
+ declare const useGetOrganisationUsersSuspense: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
86
+ query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
87
+ request?: SecondParameter<typeof customInstance>;
88
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
89
+ queryKey: QueryKey;
90
+ };
91
+ /**
92
+ * Adds a User to an **Organisation**.
93
+
94
+ You have to be in the Organisation or an admin user to use this endpoint
95
+
96
+ * @summary Adds a User to an Organisation
97
+ */
98
+ declare const addOrganisationUser: (orgId: string, userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
99
+ declare const getAddOrganisationUserMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
100
+ mutation?: UseMutationOptions<void, TError, {
101
+ orgId: string;
102
+ userId: string;
103
+ }, TContext> | undefined;
104
+ request?: SecondParameter<typeof customInstance>;
105
+ } | undefined) => UseMutationOptions<void, TError, {
106
+ orgId: string;
107
+ userId: string;
108
+ }, TContext>;
109
+ type AddOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUser>>>;
110
+ type AddOrganisationUserMutationError = ErrorType<AsError>;
111
+ /**
112
+ * @summary Adds a User to an Organisation
113
+ */
114
+ declare const useAddOrganisationUser: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
115
+ mutation?: UseMutationOptions<void, TError, {
116
+ orgId: string;
117
+ userId: string;
118
+ }, TContext> | undefined;
119
+ request?: SecondParameter<typeof customInstance>;
120
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
121
+ orgId: string;
122
+ userId: string;
123
+ }, TContext>;
124
+ /**
125
+ * Removes a User from an **Organisation**.
126
+
127
+ You have to be in the Organisation or an admin user to use this endpoint
128
+
129
+ * @summary Deletes a User from an Organisation
130
+ */
131
+ declare const deleteOrganisationUser: (orgId: string, userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
132
+ declare const getDeleteOrganisationUserMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
133
+ mutation?: UseMutationOptions<void, TError, {
134
+ orgId: string;
135
+ userId: string;
136
+ }, TContext> | undefined;
137
+ request?: SecondParameter<typeof customInstance>;
138
+ } | undefined) => UseMutationOptions<void, TError, {
139
+ orgId: string;
140
+ userId: string;
141
+ }, TContext>;
142
+ type DeleteOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUser>>>;
143
+ type DeleteOrganisationUserMutationError = ErrorType<AsError>;
144
+ /**
145
+ * @summary Deletes a User from an Organisation
146
+ */
147
+ declare const useDeleteOrganisationUser: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
148
+ mutation?: UseMutationOptions<void, TError, {
149
+ orgId: string;
150
+ userId: string;
151
+ }, TContext> | undefined;
152
+ request?: SecondParameter<typeof customInstance>;
153
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
154
+ orgId: string;
155
+ userId: string;
156
+ }, TContext>;
157
+ /**
158
+ * Gets users in an Organisational Unit.
159
+
160
+ You have to be in the Organisation or Unit or an Admin user to use this endpoint
161
+
162
+ * @summary Gets users in an Organisational Unit
163
+ */
164
+ declare const getOrganisationUnitUsers: (unitId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UsersGetResponse>;
165
+ declare const getGetOrganisationUnitUsersQueryKey: (unitId: string) => readonly ["account-server-api", `/unit/${string}/user`];
166
+ declare const getGetOrganisationUnitUsersQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
167
+ query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
168
+ request?: SecondParameter<typeof customInstance>;
169
+ } | undefined) => UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
170
+ queryKey: QueryKey;
171
+ };
172
+ type GetOrganisationUnitUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>;
173
+ type GetOrganisationUnitUsersQueryError = ErrorType<AsError | void>;
174
+ /**
175
+ * @summary Gets users in an Organisational Unit
176
+ */
177
+ declare const useGetOrganisationUnitUsers: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
178
+ query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
179
+ request?: SecondParameter<typeof customInstance>;
180
+ } | undefined) => UseQueryResult<TData, TError> & {
181
+ queryKey: QueryKey;
182
+ };
183
+ declare const getGetOrganisationUnitUsersSuspenseQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
184
+ query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
185
+ request?: SecondParameter<typeof customInstance>;
186
+ } | undefined) => UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
187
+ queryKey: QueryKey;
188
+ };
189
+ type GetOrganisationUnitUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>;
190
+ type GetOrganisationUnitUsersSuspenseQueryError = ErrorType<AsError | void>;
191
+ /**
192
+ * @summary Gets users in an Organisational Unit
193
+ */
194
+ declare const useGetOrganisationUnitUsersSuspense: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
195
+ query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
196
+ request?: SecondParameter<typeof customInstance>;
197
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
198
+ queryKey: QueryKey;
199
+ };
200
+ /**
201
+ * Adds a user to an Organisational Unit.
202
+
203
+ Users cannot be added to **Personal Units** (Units that are part of the ***Default** Organisation).
204
+
205
+ You have to be in the Organisation or Unit or an Admin user to use this endpoint
206
+
207
+ * @summary Adds a user to an Organisational Unit
208
+ */
209
+ declare const addOrganisationUnitUser: (unitId: string, userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
210
+ declare const getAddOrganisationUnitUserMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
211
+ mutation?: UseMutationOptions<void, TError, {
212
+ unitId: string;
213
+ userId: string;
214
+ }, TContext> | undefined;
215
+ request?: SecondParameter<typeof customInstance>;
216
+ } | undefined) => UseMutationOptions<void, TError, {
217
+ unitId: string;
218
+ userId: string;
219
+ }, TContext>;
220
+ type AddOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUnitUser>>>;
221
+ type AddOrganisationUnitUserMutationError = ErrorType<AsError>;
222
+ /**
223
+ * @summary Adds a user to an Organisational Unit
224
+ */
225
+ declare const useAddOrganisationUnitUser: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
226
+ mutation?: UseMutationOptions<void, TError, {
227
+ unitId: string;
228
+ userId: string;
229
+ }, TContext> | undefined;
230
+ request?: SecondParameter<typeof customInstance>;
231
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
232
+ unitId: string;
233
+ userId: string;
234
+ }, TContext>;
235
+ /**
236
+ * Removes a User from an Organisational Unit.
237
+
238
+ Users cannot be removed from **Personal Units** (Units that are part of the ***Default** Organisation).
239
+
240
+ You have to be in the Organisation or Unit or an Admin user to use this endpoint
241
+
242
+ * @summary Deletes a User from an Organisational Unit
243
+ */
244
+ declare const deleteOrganisationUnitUser: (unitId: string, userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
245
+ declare const getDeleteOrganisationUnitUserMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
246
+ mutation?: UseMutationOptions<void, TError, {
247
+ unitId: string;
248
+ userId: string;
249
+ }, TContext> | undefined;
250
+ request?: SecondParameter<typeof customInstance>;
251
+ } | undefined) => UseMutationOptions<void, TError, {
252
+ unitId: string;
253
+ userId: string;
254
+ }, TContext>;
255
+ type DeleteOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>>;
256
+ type DeleteOrganisationUnitUserMutationError = ErrorType<AsError>;
257
+ /**
258
+ * @summary Deletes a User from an Organisational Unit
259
+ */
260
+ declare const useDeleteOrganisationUnitUser: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
261
+ mutation?: UseMutationOptions<void, TError, {
262
+ unitId: string;
263
+ userId: string;
264
+ }, TContext> | undefined;
265
+ request?: SecondParameter<typeof customInstance>;
266
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
267
+ unitId: string;
268
+ userId: string;
269
+ }, TContext>;
270
+
271
+ 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, getAddOrganisationUnitUserMutationOptions, getAddOrganisationUserMutationOptions, getDeleteOrganisationUnitUserMutationOptions, getDeleteOrganisationUserMutationOptions, getGetOrganisationUnitUsersQueryKey, getGetOrganisationUnitUsersQueryOptions, getGetOrganisationUnitUsersSuspenseQueryOptions, getGetOrganisationUsersQueryKey, getGetOrganisationUsersQueryOptions, getGetOrganisationUsersSuspenseQueryOptions, getGetUserAccountQueryKey, getGetUserAccountQueryOptions, getGetUserAccountSuspenseQueryOptions, getOrganisationUnitUsers, getOrganisationUsers, getUserAccount, useAddOrganisationUnitUser, useAddOrganisationUser, useDeleteOrganisationUnitUser, useDeleteOrganisationUser, useGetOrganisationUnitUsers, useGetOrganisationUnitUsersSuspense, useGetOrganisationUsers, useGetOrganisationUsersSuspense, useGetUserAccount, useGetUserAccountSuspense };
package/user/user.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
3
- import { aF as customInstance, v as UserAccountDetail, aG as ErrorType, aB as AsError, au as UsersGetResponse } from '../custom-instance-35e5d4fd.js';
1
+ import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
2
+ import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
3
+ import { customInstance, UserAccountDetail, ErrorType, AsError, UsersGetResponse } from '../index.js';
4
4
  import 'axios';
5
5
 
6
- type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
6
+ type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
7
7
  /**
8
8
  * Returns a summary of your account
9
9
 
@@ -12,19 +12,39 @@ type SecondParameter<T extends (...args: any) => any> = T extends (config: any,
12
12
  declare const getUserAccount: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UserAccountDetail>;
13
13
  declare const getGetUserAccountQueryKey: () => readonly ["account-server-api", "/user/account"];
14
14
  declare const getGetUserAccountQueryOptions: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
15
- query?: UseQueryOptions<UserAccountDetail, TError, TData, QueryKey> | undefined;
15
+ query?: Partial<UseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
16
16
  request?: SecondParameter<typeof customInstance>;
17
17
  } | undefined) => UseQueryOptions<UserAccountDetail, TError, TData, QueryKey> & {
18
18
  queryKey: QueryKey;
19
19
  };
20
20
  type GetUserAccountQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>;
21
21
  type GetUserAccountQueryError = ErrorType<void | AsError>;
22
+ /**
23
+ * @summary Get information about your account
24
+ */
22
25
  declare const useGetUserAccount: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
23
- query?: UseQueryOptions<UserAccountDetail, TError, TData, QueryKey> | undefined;
26
+ query?: Partial<UseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
24
27
  request?: SecondParameter<typeof customInstance>;
25
28
  } | undefined) => UseQueryResult<TData, TError> & {
26
29
  queryKey: QueryKey;
27
30
  };
31
+ declare const getGetUserAccountSuspenseQueryOptions: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
32
+ query?: Partial<UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
33
+ request?: SecondParameter<typeof customInstance>;
34
+ } | undefined) => UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey> & {
35
+ queryKey: QueryKey;
36
+ };
37
+ type GetUserAccountSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>;
38
+ type GetUserAccountSuspenseQueryError = ErrorType<void | AsError>;
39
+ /**
40
+ * @summary Get information about your account
41
+ */
42
+ declare const useGetUserAccountSuspense: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
43
+ query?: Partial<UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
44
+ request?: SecondParameter<typeof customInstance>;
45
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
46
+ queryKey: QueryKey;
47
+ };
28
48
  /**
29
49
  * Gets Users in an Organisation.
30
50
 
@@ -35,19 +55,39 @@ You have to be a member of the Organisation or an admin user to use this endpoin
35
55
  declare const getOrganisationUsers: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UsersGetResponse>;
36
56
  declare const getGetOrganisationUsersQueryKey: (orgId: string) => readonly ["account-server-api", `/organisation/${string}/user`];
37
57
  declare const getGetOrganisationUsersQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
38
- query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> | undefined;
58
+ query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
39
59
  request?: SecondParameter<typeof customInstance>;
40
60
  } | undefined) => UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
41
61
  queryKey: QueryKey;
42
62
  };
43
63
  type GetOrganisationUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>;
44
64
  type GetOrganisationUsersQueryError = ErrorType<AsError | void>;
65
+ /**
66
+ * @summary Gets users in an Organisation
67
+ */
45
68
  declare const useGetOrganisationUsers: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
46
- query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> | undefined;
69
+ query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
47
70
  request?: SecondParameter<typeof customInstance>;
48
71
  } | undefined) => UseQueryResult<TData, TError> & {
49
72
  queryKey: QueryKey;
50
73
  };
74
+ declare const getGetOrganisationUsersSuspenseQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
75
+ query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
76
+ request?: SecondParameter<typeof customInstance>;
77
+ } | undefined) => UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
78
+ queryKey: QueryKey;
79
+ };
80
+ type GetOrganisationUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>;
81
+ type GetOrganisationUsersSuspenseQueryError = ErrorType<AsError | void>;
82
+ /**
83
+ * @summary Gets users in an Organisation
84
+ */
85
+ declare const useGetOrganisationUsersSuspense: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
86
+ query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
87
+ request?: SecondParameter<typeof customInstance>;
88
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
89
+ queryKey: QueryKey;
90
+ };
51
91
  /**
52
92
  * Adds a User to an **Organisation**.
53
93
 
@@ -68,23 +108,26 @@ declare const getAddOrganisationUserMutationOptions: <TError = ErrorType<AsError
68
108
  }, TContext>;
69
109
  type AddOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUser>>>;
70
110
  type AddOrganisationUserMutationError = ErrorType<AsError>;
111
+ /**
112
+ * @summary Adds a User to an Organisation
113
+ */
71
114
  declare const useAddOrganisationUser: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
72
115
  mutation?: UseMutationOptions<void, TError, {
73
116
  orgId: string;
74
117
  userId: string;
75
118
  }, TContext> | undefined;
76
119
  request?: SecondParameter<typeof customInstance>;
77
- } | undefined) => _tanstack_react_query.UseMutationResult<void, TError, {
120
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
78
121
  orgId: string;
79
122
  userId: string;
80
123
  }, TContext>;
81
124
  /**
82
- * Removes a User from an **Organisation**.
125
+ * Removes a User from an **Organisation**.
83
126
 
84
127
  You have to be in the Organisation or an admin user to use this endpoint
85
128
 
86
- * @summary Deletes a User from an Organisation
87
- */
129
+ * @summary Deletes a User from an Organisation
130
+ */
88
131
  declare const deleteOrganisationUser: (orgId: string, userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
89
132
  declare const getDeleteOrganisationUserMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
90
133
  mutation?: UseMutationOptions<void, TError, {
@@ -98,39 +141,62 @@ declare const getDeleteOrganisationUserMutationOptions: <TError = ErrorType<AsEr
98
141
  }, TContext>;
99
142
  type DeleteOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUser>>>;
100
143
  type DeleteOrganisationUserMutationError = ErrorType<AsError>;
144
+ /**
145
+ * @summary Deletes a User from an Organisation
146
+ */
101
147
  declare const useDeleteOrganisationUser: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
102
148
  mutation?: UseMutationOptions<void, TError, {
103
149
  orgId: string;
104
150
  userId: string;
105
151
  }, TContext> | undefined;
106
152
  request?: SecondParameter<typeof customInstance>;
107
- } | undefined) => _tanstack_react_query.UseMutationResult<void, TError, {
153
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
108
154
  orgId: string;
109
155
  userId: string;
110
156
  }, TContext>;
111
157
  /**
112
- * Gets users in an Organisational Unit.
158
+ * Gets users in an Organisational Unit.
113
159
 
114
160
  You have to be in the Organisation or Unit or an Admin user to use this endpoint
115
161
 
116
- * @summary Gets users in an Organisational Unit
117
- */
162
+ * @summary Gets users in an Organisational Unit
163
+ */
118
164
  declare const getOrganisationUnitUsers: (unitId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UsersGetResponse>;
119
165
  declare const getGetOrganisationUnitUsersQueryKey: (unitId: string) => readonly ["account-server-api", `/unit/${string}/user`];
120
166
  declare const getGetOrganisationUnitUsersQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
121
- query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> | undefined;
167
+ query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
122
168
  request?: SecondParameter<typeof customInstance>;
123
169
  } | undefined) => UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
124
170
  queryKey: QueryKey;
125
171
  };
126
172
  type GetOrganisationUnitUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>;
127
173
  type GetOrganisationUnitUsersQueryError = ErrorType<AsError | void>;
174
+ /**
175
+ * @summary Gets users in an Organisational Unit
176
+ */
128
177
  declare const useGetOrganisationUnitUsers: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
129
- query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> | undefined;
178
+ query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
130
179
  request?: SecondParameter<typeof customInstance>;
131
180
  } | undefined) => UseQueryResult<TData, TError> & {
132
181
  queryKey: QueryKey;
133
182
  };
183
+ declare const getGetOrganisationUnitUsersSuspenseQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
184
+ query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
185
+ request?: SecondParameter<typeof customInstance>;
186
+ } | undefined) => UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
187
+ queryKey: QueryKey;
188
+ };
189
+ type GetOrganisationUnitUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>;
190
+ type GetOrganisationUnitUsersSuspenseQueryError = ErrorType<AsError | void>;
191
+ /**
192
+ * @summary Gets users in an Organisational Unit
193
+ */
194
+ declare const useGetOrganisationUnitUsersSuspense: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
195
+ query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
196
+ request?: SecondParameter<typeof customInstance>;
197
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
198
+ queryKey: QueryKey;
199
+ };
134
200
  /**
135
201
  * Adds a user to an Organisational Unit.
136
202
 
@@ -153,25 +219,28 @@ declare const getAddOrganisationUnitUserMutationOptions: <TError = ErrorType<AsE
153
219
  }, TContext>;
154
220
  type AddOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUnitUser>>>;
155
221
  type AddOrganisationUnitUserMutationError = ErrorType<AsError>;
222
+ /**
223
+ * @summary Adds a user to an Organisational Unit
224
+ */
156
225
  declare const useAddOrganisationUnitUser: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
157
226
  mutation?: UseMutationOptions<void, TError, {
158
227
  unitId: string;
159
228
  userId: string;
160
229
  }, TContext> | undefined;
161
230
  request?: SecondParameter<typeof customInstance>;
162
- } | undefined) => _tanstack_react_query.UseMutationResult<void, TError, {
231
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
163
232
  unitId: string;
164
233
  userId: string;
165
234
  }, TContext>;
166
235
  /**
167
- * Removes a User from an Organisational Unit.
236
+ * Removes a User from an Organisational Unit.
168
237
 
169
238
  Users cannot be removed from **Personal Units** (Units that are part of the ***Default** Organisation).
170
239
 
171
240
  You have to be in the Organisation or Unit or an Admin user to use this endpoint
172
241
 
173
- * @summary Deletes a User from an Organisational Unit
174
- */
242
+ * @summary Deletes a User from an Organisational Unit
243
+ */
175
244
  declare const deleteOrganisationUnitUser: (unitId: string, userId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
176
245
  declare const getDeleteOrganisationUnitUserMutationOptions: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
177
246
  mutation?: UseMutationOptions<void, TError, {
@@ -185,15 +254,18 @@ declare const getDeleteOrganisationUnitUserMutationOptions: <TError = ErrorType<
185
254
  }, TContext>;
186
255
  type DeleteOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>>;
187
256
  type DeleteOrganisationUnitUserMutationError = ErrorType<AsError>;
257
+ /**
258
+ * @summary Deletes a User from an Organisational Unit
259
+ */
188
260
  declare const useDeleteOrganisationUnitUser: <TError = ErrorType<AsError>, TContext = unknown>(options?: {
189
261
  mutation?: UseMutationOptions<void, TError, {
190
262
  unitId: string;
191
263
  userId: string;
192
264
  }, TContext> | undefined;
193
265
  request?: SecondParameter<typeof customInstance>;
194
- } | undefined) => _tanstack_react_query.UseMutationResult<void, TError, {
266
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
195
267
  unitId: string;
196
268
  userId: string;
197
269
  }, TContext>;
198
270
 
199
- export { AddOrganisationUnitUserMutationError, AddOrganisationUnitUserMutationResult, AddOrganisationUserMutationError, AddOrganisationUserMutationResult, DeleteOrganisationUnitUserMutationError, DeleteOrganisationUnitUserMutationResult, DeleteOrganisationUserMutationError, DeleteOrganisationUserMutationResult, GetOrganisationUnitUsersQueryError, GetOrganisationUnitUsersQueryResult, GetOrganisationUsersQueryError, GetOrganisationUsersQueryResult, GetUserAccountQueryError, GetUserAccountQueryResult, addOrganisationUnitUser, addOrganisationUser, deleteOrganisationUnitUser, deleteOrganisationUser, getAddOrganisationUnitUserMutationOptions, getAddOrganisationUserMutationOptions, getDeleteOrganisationUnitUserMutationOptions, getDeleteOrganisationUserMutationOptions, getGetOrganisationUnitUsersQueryKey, getGetOrganisationUnitUsersQueryOptions, getGetOrganisationUsersQueryKey, getGetOrganisationUsersQueryOptions, getGetUserAccountQueryKey, getGetUserAccountQueryOptions, getOrganisationUnitUsers, getOrganisationUsers, getUserAccount, useAddOrganisationUnitUser, useAddOrganisationUser, useDeleteOrganisationUnitUser, useDeleteOrganisationUser, useGetOrganisationUnitUsers, useGetOrganisationUsers, useGetUserAccount };
271
+ 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, getAddOrganisationUnitUserMutationOptions, getAddOrganisationUserMutationOptions, getDeleteOrganisationUnitUserMutationOptions, getDeleteOrganisationUserMutationOptions, getGetOrganisationUnitUsersQueryKey, getGetOrganisationUnitUsersQueryOptions, getGetOrganisationUnitUsersSuspenseQueryOptions, getGetOrganisationUsersQueryKey, getGetOrganisationUsersQueryOptions, getGetOrganisationUsersSuspenseQueryOptions, getGetUserAccountQueryKey, getGetUserAccountQueryOptions, getGetUserAccountSuspenseQueryOptions, getOrganisationUnitUsers, getOrganisationUsers, getUserAccount, useAddOrganisationUnitUser, useAddOrganisationUser, useDeleteOrganisationUnitUser, useDeleteOrganisationUser, useGetOrganisationUnitUsers, useGetOrganisationUnitUsersSuspense, useGetOrganisationUsers, useGetOrganisationUsersSuspense, useGetUserAccount, useGetUserAccountSuspense };