@squonk/account-server-client 4.1.0 → 4.1.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 +18 -10
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +60 -60
- package/asset/asset.d.ts +60 -60
- package/asset/asset.js +18 -10
- package/asset/asset.js.map +1 -1
- package/charges/charges.cjs +3 -3
- package/charges/charges.cjs.map +1 -1
- package/charges/charges.d.cts +33 -33
- package/charges/charges.d.ts +33 -33
- package/charges/charges.js +3 -3
- package/charges/charges.js.map +1 -1
- package/event-stream/event-stream.cjs +8 -5
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.d.cts +30 -30
- package/event-stream/event-stream.d.ts +30 -30
- package/event-stream/event-stream.js +8 -5
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs +8 -8
- package/index.cjs.map +1 -1
- package/index.d.cts +172 -172
- package/index.d.ts +172 -172
- package/index.js +8 -8
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +1 -1
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +17 -17
- package/merchant/merchant.d.ts +17 -17
- package/merchant/merchant.js +1 -1
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +10 -6
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +44 -44
- package/organisation/organisation.d.ts +44 -44
- package/organisation/organisation.js +10 -6
- package/organisation/organisation.js.map +1 -1
- package/package.json +11 -11
- package/product/product.cjs +12 -8
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +68 -68
- package/product/product.d.ts +68 -68
- package/product/product.js +12 -8
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +180 -180
- package/src/asset/asset.ts +120 -83
- package/src/charges/charges.ts +50 -49
- package/src/event-stream/event-stream.ts +55 -43
- package/src/merchant/merchant.ts +26 -25
- package/src/organisation/organisation.ts +80 -63
- package/src/product/product.ts +116 -99
- package/src/state/state.ts +14 -13
- package/src/unit/unit.ts +106 -79
- package/src/user/user.ts +90 -69
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +9 -9
- package/state/state.d.ts +9 -9
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +15 -9
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +56 -56
- package/unit/unit.d.ts +56 -56
- package/unit/unit.js +15 -9
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +10 -6
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +49 -49
- package/user/user.d.ts +49 -49
- package/user/user.js +10 -6
- package/user/user.js.map +1 -1
package/unit/unit.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseQueryOptions, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
1
|
+
import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
2
2
|
import { customInstance, OrganisationUnitsGetResponse, ErrorType, AsError, OrganisationUnitPostBodyBody, OrganisationUnitPostResponse, UnitAllDetail, UnitPatchBodyBody, GetUnitsParams, UnitsGetResponse, PersonalUnitPutBodyBody, PersonalUnitPutResponse } from '../index.cjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ declare const getGetOrganisationUnitsQueryOptions: <TData = OrganisationUnitsGet
|
|
|
14
14
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
15
15
|
request?: SecondParameter<typeof customInstance>;
|
|
16
16
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData> & {
|
|
17
|
-
queryKey: QueryKey
|
|
17
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
18
18
|
};
|
|
19
19
|
type GetOrganisationUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnits>>>;
|
|
20
20
|
type GetOrganisationUnitsQueryError = ErrorType<void | AsError>;
|
|
@@ -22,25 +22,25 @@ declare function useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOr
|
|
|
22
22
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>, 'initialData'>;
|
|
23
23
|
request?: SecondParameter<typeof customInstance>;
|
|
24
24
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
25
|
-
queryKey: QueryKey
|
|
25
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
26
26
|
};
|
|
27
27
|
declare function useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
28
28
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>, 'initialData'>;
|
|
29
29
|
request?: SecondParameter<typeof customInstance>;
|
|
30
30
|
}): UseQueryResult<TData, TError> & {
|
|
31
|
-
queryKey: QueryKey
|
|
31
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
32
32
|
};
|
|
33
33
|
declare function useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
34
34
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
35
35
|
request?: SecondParameter<typeof customInstance>;
|
|
36
36
|
}): UseQueryResult<TData, TError> & {
|
|
37
|
-
queryKey: QueryKey
|
|
37
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
38
38
|
};
|
|
39
39
|
declare const getGetOrganisationUnitsSuspenseQueryOptions: <TData = OrganisationUnitsGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
40
40
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
41
41
|
request?: SecondParameter<typeof customInstance>;
|
|
42
42
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData> & {
|
|
43
|
-
queryKey: QueryKey
|
|
43
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
44
44
|
};
|
|
45
45
|
type GetOrganisationUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnits>>>;
|
|
46
46
|
type GetOrganisationUnitsSuspenseQueryError = ErrorType<void | AsError>;
|
|
@@ -48,19 +48,19 @@ declare function useGetOrganisationUnitsSuspense<TData = Awaited<ReturnType<type
|
|
|
48
48
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
49
49
|
request?: SecondParameter<typeof customInstance>;
|
|
50
50
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
51
|
-
queryKey: QueryKey
|
|
51
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
52
52
|
};
|
|
53
53
|
declare function useGetOrganisationUnitsSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
54
54
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
55
55
|
request?: SecondParameter<typeof customInstance>;
|
|
56
56
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
57
|
-
queryKey: QueryKey
|
|
57
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
58
58
|
};
|
|
59
59
|
declare function useGetOrganisationUnitsSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
60
60
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
61
61
|
request?: SecondParameter<typeof customInstance>;
|
|
62
62
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
63
|
-
queryKey: QueryKey
|
|
63
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* Creates a new Organisation Unit.
|
|
@@ -71,14 +71,14 @@ You need to be a member of the **Organisation** or have administration rights t
|
|
|
71
71
|
|
|
72
72
|
* @summary Create a new Organisational Unit
|
|
73
73
|
*/
|
|
74
|
-
declare const createOrganisationUnit: (orgId: string, organisationUnitPostBodyBody: OrganisationUnitPostBodyBody, options?: SecondParameter<typeof customInstance
|
|
75
|
-
declare const getCreateOrganisationUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
76
|
-
mutation?: UseMutationOptions<
|
|
74
|
+
declare const createOrganisationUnit: (orgId: string, organisationUnitPostBodyBody: OrganisationUnitPostBodyBody, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationUnitPostResponse>;
|
|
75
|
+
declare const getCreateOrganisationUnitMutationOptions: <TData = OrganisationUnitPostResponse, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
76
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
77
77
|
orgId: string;
|
|
78
78
|
data: OrganisationUnitPostBodyBody;
|
|
79
79
|
}, TContext>;
|
|
80
80
|
request?: SecondParameter<typeof customInstance>;
|
|
81
|
-
}) => UseMutationOptions<
|
|
81
|
+
}) => UseMutationOptions<TData, TError, {
|
|
82
82
|
orgId: string;
|
|
83
83
|
data: OrganisationUnitPostBodyBody;
|
|
84
84
|
}, TContext>;
|
|
@@ -88,13 +88,13 @@ type CreateOrganisationUnitMutationError = ErrorType<AsError | void>;
|
|
|
88
88
|
/**
|
|
89
89
|
* @summary Create a new Organisational Unit
|
|
90
90
|
*/
|
|
91
|
-
declare const useCreateOrganisationUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
92
|
-
mutation?: UseMutationOptions<
|
|
91
|
+
declare const useCreateOrganisationUnit: <TData = OrganisationUnitPostResponse, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
92
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
93
93
|
orgId: string;
|
|
94
94
|
data: OrganisationUnitPostBodyBody;
|
|
95
95
|
}, TContext>;
|
|
96
96
|
request?: SecondParameter<typeof customInstance>;
|
|
97
|
-
}) => UseMutationResult<
|
|
97
|
+
}) => UseMutationResult<TData, TError, {
|
|
98
98
|
orgId: string;
|
|
99
99
|
data: OrganisationUnitPostBodyBody;
|
|
100
100
|
}, TContext>;
|
|
@@ -109,7 +109,7 @@ declare const getGetUnitQueryOptions: <TData = UnitAllDetail, TError = ErrorType
|
|
|
109
109
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
110
110
|
request?: SecondParameter<typeof customInstance>;
|
|
111
111
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData> & {
|
|
112
|
-
queryKey: QueryKey
|
|
112
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
113
113
|
};
|
|
114
114
|
type GetUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;
|
|
115
115
|
type GetUnitQueryError = ErrorType<void | AsError>;
|
|
@@ -117,25 +117,25 @@ declare function useGetUnit<TData = Awaited<ReturnType<typeof getUnit>>, TError
|
|
|
117
117
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>, 'initialData'>;
|
|
118
118
|
request?: SecondParameter<typeof customInstance>;
|
|
119
119
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
120
|
-
queryKey: QueryKey
|
|
120
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
121
121
|
};
|
|
122
122
|
declare function useGetUnit<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
123
123
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>, 'initialData'>;
|
|
124
124
|
request?: SecondParameter<typeof customInstance>;
|
|
125
125
|
}): UseQueryResult<TData, TError> & {
|
|
126
|
-
queryKey: QueryKey
|
|
126
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
127
127
|
};
|
|
128
128
|
declare function useGetUnit<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
129
129
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
130
130
|
request?: SecondParameter<typeof customInstance>;
|
|
131
131
|
}): UseQueryResult<TData, TError> & {
|
|
132
|
-
queryKey: QueryKey
|
|
132
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
133
133
|
};
|
|
134
134
|
declare const getGetUnitSuspenseQueryOptions: <TData = UnitAllDetail, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
135
135
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
136
136
|
request?: SecondParameter<typeof customInstance>;
|
|
137
137
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData> & {
|
|
138
|
-
queryKey: QueryKey
|
|
138
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
139
139
|
};
|
|
140
140
|
type GetUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;
|
|
141
141
|
type GetUnitSuspenseQueryError = ErrorType<void | AsError>;
|
|
@@ -143,19 +143,19 @@ declare function useGetUnitSuspense<TData = Awaited<ReturnType<typeof getUnit>>,
|
|
|
143
143
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
144
144
|
request?: SecondParameter<typeof customInstance>;
|
|
145
145
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
146
|
-
queryKey: QueryKey
|
|
146
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
147
147
|
};
|
|
148
148
|
declare function useGetUnitSuspense<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
149
149
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
150
150
|
request?: SecondParameter<typeof customInstance>;
|
|
151
151
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
152
|
-
queryKey: QueryKey
|
|
152
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
153
153
|
};
|
|
154
154
|
declare function useGetUnitSuspense<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
155
155
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
156
156
|
request?: SecondParameter<typeof customInstance>;
|
|
157
157
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
158
|
-
queryKey: QueryKey
|
|
158
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
159
159
|
};
|
|
160
160
|
/**
|
|
161
161
|
* Used to update existing Unit.
|
|
@@ -165,13 +165,13 @@ You have to be a member of the **Unit**, a member of its **Organisation**, or an
|
|
|
165
165
|
* @summary Adjust an existing Unit
|
|
166
166
|
*/
|
|
167
167
|
declare const patchUnit: (unitId: string, unitPatchBodyBody: UnitPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
168
|
-
declare const getPatchUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
169
|
-
mutation?: UseMutationOptions<
|
|
168
|
+
declare const getPatchUnitMutationOptions: <TData = void, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
169
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
170
170
|
unitId: string;
|
|
171
171
|
data: UnitPatchBodyBody;
|
|
172
172
|
}, TContext>;
|
|
173
173
|
request?: SecondParameter<typeof customInstance>;
|
|
174
|
-
}) => UseMutationOptions<
|
|
174
|
+
}) => UseMutationOptions<TData, TError, {
|
|
175
175
|
unitId: string;
|
|
176
176
|
data: UnitPatchBodyBody;
|
|
177
177
|
}, TContext>;
|
|
@@ -181,13 +181,13 @@ type PatchUnitMutationError = ErrorType<void | AsError>;
|
|
|
181
181
|
/**
|
|
182
182
|
* @summary Adjust an existing Unit
|
|
183
183
|
*/
|
|
184
|
-
declare const usePatchUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
185
|
-
mutation?: UseMutationOptions<
|
|
184
|
+
declare const usePatchUnit: <TData = void, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
185
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
186
186
|
unitId: string;
|
|
187
187
|
data: UnitPatchBodyBody;
|
|
188
188
|
}, TContext>;
|
|
189
189
|
request?: SecondParameter<typeof customInstance>;
|
|
190
|
-
}) => UseMutationResult<
|
|
190
|
+
}) => UseMutationResult<TData, TError, {
|
|
191
191
|
unitId: string;
|
|
192
192
|
data: UnitPatchBodyBody;
|
|
193
193
|
}, TContext>;
|
|
@@ -201,12 +201,12 @@ You cannot delete a Unit that contains undeleted **Products**
|
|
|
201
201
|
* @summary Deletes an Organisational Unit
|
|
202
202
|
*/
|
|
203
203
|
declare const deleteOrganisationUnit: (unitId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
204
|
-
declare const getDeleteOrganisationUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
205
|
-
mutation?: UseMutationOptions<
|
|
204
|
+
declare const getDeleteOrganisationUnitMutationOptions: <TData = void, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
205
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
206
206
|
unitId: string;
|
|
207
207
|
}, TContext>;
|
|
208
208
|
request?: SecondParameter<typeof customInstance>;
|
|
209
|
-
}) => UseMutationOptions<
|
|
209
|
+
}) => UseMutationOptions<TData, TError, {
|
|
210
210
|
unitId: string;
|
|
211
211
|
}, TContext>;
|
|
212
212
|
type DeleteOrganisationUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnit>>>;
|
|
@@ -214,12 +214,12 @@ type DeleteOrganisationUnitMutationError = ErrorType<void | AsError>;
|
|
|
214
214
|
/**
|
|
215
215
|
* @summary Deletes an Organisational Unit
|
|
216
216
|
*/
|
|
217
|
-
declare const useDeleteOrganisationUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
218
|
-
mutation?: UseMutationOptions<
|
|
217
|
+
declare const useDeleteOrganisationUnit: <TData = void, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
218
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
219
219
|
unitId: string;
|
|
220
220
|
}, TContext>;
|
|
221
221
|
request?: SecondParameter<typeof customInstance>;
|
|
222
|
-
}) => UseMutationResult<
|
|
222
|
+
}) => UseMutationResult<TData, TError, {
|
|
223
223
|
unitId: string;
|
|
224
224
|
}, TContext>;
|
|
225
225
|
/**
|
|
@@ -235,7 +235,7 @@ declare const getGetUnitsQueryOptions: <TData = UnitsGetResponse, TError = Error
|
|
|
235
235
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
236
236
|
request?: SecondParameter<typeof customInstance>;
|
|
237
237
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData> & {
|
|
238
|
-
queryKey: QueryKey
|
|
238
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
239
239
|
};
|
|
240
240
|
type GetUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;
|
|
241
241
|
type GetUnitsQueryError = ErrorType<void | AsError>;
|
|
@@ -243,25 +243,25 @@ declare function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TErro
|
|
|
243
243
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>, 'initialData'>;
|
|
244
244
|
request?: SecondParameter<typeof customInstance>;
|
|
245
245
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
246
|
-
queryKey: QueryKey
|
|
246
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
247
247
|
};
|
|
248
248
|
declare function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
249
249
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>, 'initialData'>;
|
|
250
250
|
request?: SecondParameter<typeof customInstance>;
|
|
251
251
|
}): UseQueryResult<TData, TError> & {
|
|
252
|
-
queryKey: QueryKey
|
|
252
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
253
253
|
};
|
|
254
254
|
declare function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
255
255
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
256
256
|
request?: SecondParameter<typeof customInstance>;
|
|
257
257
|
}): UseQueryResult<TData, TError> & {
|
|
258
|
-
queryKey: QueryKey
|
|
258
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
259
259
|
};
|
|
260
260
|
declare const getGetUnitsSuspenseQueryOptions: <TData = UnitsGetResponse, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
261
261
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
262
262
|
request?: SecondParameter<typeof customInstance>;
|
|
263
263
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData> & {
|
|
264
|
-
queryKey: QueryKey
|
|
264
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
265
265
|
};
|
|
266
266
|
type GetUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;
|
|
267
267
|
type GetUnitsSuspenseQueryError = ErrorType<void | AsError>;
|
|
@@ -269,19 +269,19 @@ declare function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>
|
|
|
269
269
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
270
270
|
request?: SecondParameter<typeof customInstance>;
|
|
271
271
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
272
|
-
queryKey: QueryKey
|
|
272
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
273
273
|
};
|
|
274
274
|
declare function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
275
275
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
276
276
|
request?: SecondParameter<typeof customInstance>;
|
|
277
277
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
278
|
-
queryKey: QueryKey
|
|
278
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
279
279
|
};
|
|
280
280
|
declare function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
281
281
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
282
282
|
request?: SecondParameter<typeof customInstance>;
|
|
283
283
|
}): UseSuspenseQueryResult<TData, TError> & {
|
|
284
|
-
queryKey: QueryKey
|
|
284
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
285
285
|
};
|
|
286
286
|
/**
|
|
287
287
|
* Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.
|
|
@@ -291,12 +291,12 @@ Users can only create one Personal unit and you cannot add other Users to a Pers
|
|
|
291
291
|
* @summary Create a new Personal Unit
|
|
292
292
|
*/
|
|
293
293
|
declare const createDefaultUnit: (personalUnitPutBodyBody: PersonalUnitPutBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<PersonalUnitPutResponse>;
|
|
294
|
-
declare const getCreateDefaultUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
295
|
-
mutation?: UseMutationOptions<
|
|
294
|
+
declare const getCreateDefaultUnitMutationOptions: <TData = PersonalUnitPutResponse, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
295
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
296
296
|
data: PersonalUnitPutBodyBody;
|
|
297
297
|
}, TContext>;
|
|
298
298
|
request?: SecondParameter<typeof customInstance>;
|
|
299
|
-
}) => UseMutationOptions<
|
|
299
|
+
}) => UseMutationOptions<TData, TError, {
|
|
300
300
|
data: PersonalUnitPutBodyBody;
|
|
301
301
|
}, TContext>;
|
|
302
302
|
type CreateDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createDefaultUnit>>>;
|
|
@@ -305,12 +305,12 @@ type CreateDefaultUnitMutationError = ErrorType<AsError | void>;
|
|
|
305
305
|
/**
|
|
306
306
|
* @summary Create a new Personal Unit
|
|
307
307
|
*/
|
|
308
|
-
declare const useCreateDefaultUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
309
|
-
mutation?: UseMutationOptions<
|
|
308
|
+
declare const useCreateDefaultUnit: <TData = PersonalUnitPutResponse, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
309
|
+
mutation?: UseMutationOptions<TData, TError, {
|
|
310
310
|
data: PersonalUnitPutBodyBody;
|
|
311
311
|
}, TContext>;
|
|
312
312
|
request?: SecondParameter<typeof customInstance>;
|
|
313
|
-
}) => UseMutationResult<
|
|
313
|
+
}) => UseMutationResult<TData, TError, {
|
|
314
314
|
data: PersonalUnitPutBodyBody;
|
|
315
315
|
}, TContext>;
|
|
316
316
|
/**
|
|
@@ -319,18 +319,18 @@ declare const useCreateDefaultUnit: <TError = ErrorType<void | AsError>, TContex
|
|
|
319
319
|
* @summary Deletes a Personal Unit
|
|
320
320
|
*/
|
|
321
321
|
declare const deleteDefaultUnit: (options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
322
|
-
declare const getDeleteDefaultUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
323
|
-
mutation?: UseMutationOptions<
|
|
322
|
+
declare const getDeleteDefaultUnitMutationOptions: <TData = void, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
323
|
+
mutation?: UseMutationOptions<TData, TError, void, TContext>;
|
|
324
324
|
request?: SecondParameter<typeof customInstance>;
|
|
325
|
-
}) => UseMutationOptions<
|
|
325
|
+
}) => UseMutationOptions<TData, TError, void, TContext>;
|
|
326
326
|
type DeleteDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteDefaultUnit>>>;
|
|
327
327
|
type DeleteDefaultUnitMutationError = ErrorType<void | AsError>;
|
|
328
328
|
/**
|
|
329
329
|
* @summary Deletes a Personal Unit
|
|
330
330
|
*/
|
|
331
|
-
declare const useDeleteDefaultUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
332
|
-
mutation?: UseMutationOptions<
|
|
331
|
+
declare const useDeleteDefaultUnit: <TData = void, TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
332
|
+
mutation?: UseMutationOptions<TData, TError, void, TContext>;
|
|
333
333
|
request?: SecondParameter<typeof customInstance>;
|
|
334
|
-
}) => UseMutationResult<
|
|
334
|
+
}) => UseMutationResult<TData, TError, void, TContext>;
|
|
335
335
|
|
|
336
336
|
export { type CreateDefaultUnitMutationBody, type CreateDefaultUnitMutationError, type CreateDefaultUnitMutationResult, type CreateOrganisationUnitMutationBody, type CreateOrganisationUnitMutationError, type CreateOrganisationUnitMutationResult, type DeleteDefaultUnitMutationError, type DeleteDefaultUnitMutationResult, type DeleteOrganisationUnitMutationError, type DeleteOrganisationUnitMutationResult, type GetOrganisationUnitsQueryError, type GetOrganisationUnitsQueryResult, type GetOrganisationUnitsSuspenseQueryError, type GetOrganisationUnitsSuspenseQueryResult, type GetUnitQueryError, type GetUnitQueryResult, type GetUnitSuspenseQueryError, type GetUnitSuspenseQueryResult, type GetUnitsQueryError, type GetUnitsQueryResult, type GetUnitsSuspenseQueryError, type GetUnitsSuspenseQueryResult, type PatchUnitMutationBody, type PatchUnitMutationError, type PatchUnitMutationResult, createDefaultUnit, createOrganisationUnit, deleteDefaultUnit, deleteOrganisationUnit, getCreateDefaultUnitMutationOptions, getCreateOrganisationUnitMutationOptions, getDeleteDefaultUnitMutationOptions, getDeleteOrganisationUnitMutationOptions, getGetOrganisationUnitsQueryKey, getGetOrganisationUnitsQueryOptions, getGetOrganisationUnitsSuspenseQueryOptions, getGetUnitQueryKey, getGetUnitQueryOptions, getGetUnitSuspenseQueryOptions, getGetUnitsQueryKey, getGetUnitsQueryOptions, getGetUnitsSuspenseQueryOptions, getOrganisationUnits, getPatchUnitMutationOptions, getUnit, getUnits, patchUnit, useCreateDefaultUnit, useCreateOrganisationUnit, useDeleteDefaultUnit, useDeleteOrganisationUnit, useGetOrganisationUnits, useGetOrganisationUnitsSuspense, useGetUnit, useGetUnitSuspense, useGetUnits, useGetUnitsSuspense, usePatchUnit };
|