@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/unit/unit.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
2
|
-
import { customInstance, OrganisationUnitsGetResponse, ErrorType, AsError, OrganisationUnitPostBodyBody, OrganisationUnitPostResponse, UnitAllDetail, UnitPatchBodyBody,
|
|
1
|
+
import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, QueryClient, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
2
|
+
import { customInstance, OrganisationUnitsGetResponse, ErrorType, AsError, OrganisationUnitPostBodyBody, OrganisationUnitPostResponse, UnitAllDetail, UnitPatchBodyBody, PersonalUnitPutBodyBody, PersonalUnitPutResponse, GetUnitsParams, UnitsGetResponse } from '../index.cjs';
|
|
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
|
* Gets Organisational Units you have access to or that are public
|
|
8
8
|
|
|
9
9
|
* @summary Gets Organisational Units
|
|
10
10
|
*/
|
|
11
11
|
declare const getOrganisationUnits: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationUnitsGetResponse>;
|
|
12
|
-
declare const getGetOrganisationUnitsQueryKey: (orgId: string) => readonly [
|
|
13
|
-
declare const
|
|
12
|
+
declare const getGetOrganisationUnitsQueryKey: (orgId: string) => readonly [`/organisation/${string}/unit`];
|
|
13
|
+
declare const useGetOrganisationUnitsQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
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> & {
|
|
@@ -19,24 +19,24 @@ declare const getGetOrganisationUnitsQueryOptions: <TData = OrganisationUnitsGet
|
|
|
19
19
|
type GetOrganisationUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnits>>>;
|
|
20
20
|
type GetOrganisationUnitsQueryError = ErrorType<void | AsError>;
|
|
21
21
|
declare function useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options: {
|
|
22
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError,
|
|
22
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, Awaited<ReturnType<typeof getOrganisationUnits>>>, "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 useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
28
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError,
|
|
28
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, Awaited<ReturnType<typeof getOrganisationUnits>>>, "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 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
|
-
}): UseQueryResult<TData, TError> & {
|
|
36
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
37
37
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
38
38
|
};
|
|
39
|
-
declare const
|
|
39
|
+
declare const useGetOrganisationUnitsSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, 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> & {
|
|
@@ -47,19 +47,19 @@ type GetOrganisationUnitsSuspenseQueryError = ErrorType<void | AsError>;
|
|
|
47
47
|
declare function useGetOrganisationUnitsSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options: {
|
|
48
48
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, 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 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
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
56
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
57
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
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
62
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
63
63
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
@@ -72,13 +72,13 @@ You need to be a member of the **Organisation** or have administration rights t
|
|
|
72
72
|
* @summary Create a new Organisational Unit
|
|
73
73
|
*/
|
|
74
74
|
declare const createOrganisationUnit: (orgId: string, organisationUnitPostBodyBody: OrganisationUnitPostBodyBody, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationUnitPostResponse>;
|
|
75
|
-
declare const
|
|
76
|
-
mutation?: UseMutationOptions<
|
|
75
|
+
declare const useCreateOrganisationUnitMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
76
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError, {
|
|
77
77
|
orgId: string;
|
|
78
78
|
data: OrganisationUnitPostBodyBody;
|
|
79
79
|
}, TContext>;
|
|
80
80
|
request?: SecondParameter<typeof customInstance>;
|
|
81
|
-
}) => UseMutationOptions<
|
|
81
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError, {
|
|
82
82
|
orgId: string;
|
|
83
83
|
data: OrganisationUnitPostBodyBody;
|
|
84
84
|
}, TContext>;
|
|
@@ -86,26 +86,26 @@ type CreateOrganisationUnitMutationResult = NonNullable<Awaited<ReturnType<typeo
|
|
|
86
86
|
type CreateOrganisationUnitMutationBody = OrganisationUnitPostBodyBody;
|
|
87
87
|
type CreateOrganisationUnitMutationError = ErrorType<AsError | void>;
|
|
88
88
|
/**
|
|
89
|
-
* @summary Create a new Organisational Unit
|
|
90
|
-
*/
|
|
91
|
-
declare const useCreateOrganisationUnit: <
|
|
92
|
-
mutation?: UseMutationOptions<
|
|
89
|
+
* @summary Create a new Organisational Unit
|
|
90
|
+
*/
|
|
91
|
+
declare const useCreateOrganisationUnit: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
92
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError, {
|
|
93
93
|
orgId: string;
|
|
94
94
|
data: OrganisationUnitPostBodyBody;
|
|
95
95
|
}, TContext>;
|
|
96
96
|
request?: SecondParameter<typeof customInstance>;
|
|
97
|
-
}) => UseMutationResult<
|
|
97
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createOrganisationUnit>>, TError, {
|
|
98
98
|
orgId: string;
|
|
99
99
|
data: OrganisationUnitPostBodyBody;
|
|
100
100
|
}, TContext>;
|
|
101
101
|
/**
|
|
102
|
-
* Gets a Unit. You can get a Unit if you are a member of it or are its creator. You can also get a Unit if you are a member of its **Organisation**, or its creator or an admin user.
|
|
102
|
+
* Gets a Unit. You can get a Unit if you are a member of it or are its creator. You can also get a Unit if you are a member of its **Organisation**, or its creator or an admin user.
|
|
103
103
|
|
|
104
|
-
* @summary Gets an Organisational Unit
|
|
105
|
-
*/
|
|
104
|
+
* @summary Gets an Organisational Unit
|
|
105
|
+
*/
|
|
106
106
|
declare const getUnit: (unitId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitAllDetail>;
|
|
107
|
-
declare const getGetUnitQueryKey: (unitId: string) => readonly [
|
|
108
|
-
declare const
|
|
107
|
+
declare const getGetUnitQueryKey: (unitId: string) => readonly [`/unit/${string}`];
|
|
108
|
+
declare const useGetUnitQueryOptions: <TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
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> & {
|
|
@@ -114,24 +114,24 @@ declare const getGetUnitQueryOptions: <TData = UnitAllDetail, TError = ErrorType
|
|
|
114
114
|
type GetUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;
|
|
115
115
|
type GetUnitQueryError = ErrorType<void | AsError>;
|
|
116
116
|
declare function useGetUnit<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options: {
|
|
117
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnit>>, TError,
|
|
117
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnit>>, TError, Awaited<ReturnType<typeof getUnit>>>, "initialData">;
|
|
118
118
|
request?: SecondParameter<typeof customInstance>;
|
|
119
|
-
}): DefinedUseQueryResult<TData, TError> & {
|
|
119
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
120
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
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnit>>, TError,
|
|
123
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnit>>, TError, Awaited<ReturnType<typeof getUnit>>>, "initialData">;
|
|
124
124
|
request?: SecondParameter<typeof customInstance>;
|
|
125
|
-
}): UseQueryResult<TData, TError> & {
|
|
125
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
126
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
|
-
}): UseQueryResult<TData, TError> & {
|
|
131
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
132
132
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
133
133
|
};
|
|
134
|
-
declare const
|
|
134
|
+
declare const useGetUnitSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getUnit>>, 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> & {
|
|
@@ -142,36 +142,36 @@ type GetUnitSuspenseQueryError = ErrorType<void | AsError>;
|
|
|
142
142
|
declare function useGetUnitSuspense<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options: {
|
|
143
143
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
144
144
|
request?: SecondParameter<typeof customInstance>;
|
|
145
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
145
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
146
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
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
151
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
152
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
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
157
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
158
158
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
159
159
|
};
|
|
160
160
|
/**
|
|
161
|
-
* Used to update existing Unit.
|
|
161
|
+
* Used to update existing Unit. You can change a Unit's **name** or its **default_product_privacy** (as long as the new privacy does not conflict with the Organisation's value).
|
|
162
162
|
|
|
163
163
|
You have to be a member of the **Unit**, a member of its **Organisation**, or an administrator to patch a Unit.
|
|
164
164
|
|
|
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
|
|
169
|
-
mutation?: UseMutationOptions<
|
|
168
|
+
declare const usePatchUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
169
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError, {
|
|
170
170
|
unitId: string;
|
|
171
171
|
data: UnitPatchBodyBody;
|
|
172
172
|
}, TContext>;
|
|
173
173
|
request?: SecondParameter<typeof customInstance>;
|
|
174
|
-
}) => UseMutationOptions<
|
|
174
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError, {
|
|
175
175
|
unitId: string;
|
|
176
176
|
data: UnitPatchBodyBody;
|
|
177
177
|
}, TContext>;
|
|
@@ -179,59 +179,165 @@ type PatchUnitMutationResult = NonNullable<Awaited<ReturnType<typeof patchUnit>>
|
|
|
179
179
|
type PatchUnitMutationBody = UnitPatchBodyBody;
|
|
180
180
|
type PatchUnitMutationError = ErrorType<void | AsError>;
|
|
181
181
|
/**
|
|
182
|
-
* @summary Adjust an existing Unit
|
|
183
|
-
*/
|
|
184
|
-
declare const usePatchUnit: <
|
|
185
|
-
mutation?: UseMutationOptions<
|
|
182
|
+
* @summary Adjust an existing Unit
|
|
183
|
+
*/
|
|
184
|
+
declare const usePatchUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
185
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError, {
|
|
186
186
|
unitId: string;
|
|
187
187
|
data: UnitPatchBodyBody;
|
|
188
188
|
}, TContext>;
|
|
189
189
|
request?: SecondParameter<typeof customInstance>;
|
|
190
|
-
}) => UseMutationResult<
|
|
190
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof patchUnit>>, TError, {
|
|
191
191
|
unitId: string;
|
|
192
192
|
data: UnitPatchBodyBody;
|
|
193
193
|
}, TContext>;
|
|
194
194
|
/**
|
|
195
|
-
* Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.
|
|
195
|
+
* Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.
|
|
196
196
|
|
|
197
197
|
You cannot delete Units in the **Default Organisation**. These Units are **Personal Units** and need to be deleted using the `DELETE /unit` endpoint.
|
|
198
198
|
|
|
199
199
|
You cannot delete a Unit that contains undeleted **Products**
|
|
200
200
|
|
|
201
|
-
* @summary Deletes an Organisational Unit
|
|
202
|
-
*/
|
|
201
|
+
* @summary Deletes an Organisational Unit
|
|
202
|
+
*/
|
|
203
203
|
declare const deleteOrganisationUnit: (unitId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
204
|
-
declare const
|
|
205
|
-
mutation?: UseMutationOptions<
|
|
204
|
+
declare const useDeleteOrganisationUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
205
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError, {
|
|
206
206
|
unitId: string;
|
|
207
207
|
}, TContext>;
|
|
208
208
|
request?: SecondParameter<typeof customInstance>;
|
|
209
|
-
}) => UseMutationOptions<
|
|
209
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError, {
|
|
210
210
|
unitId: string;
|
|
211
211
|
}, TContext>;
|
|
212
212
|
type DeleteOrganisationUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnit>>>;
|
|
213
213
|
type DeleteOrganisationUnitMutationError = ErrorType<void | AsError>;
|
|
214
214
|
/**
|
|
215
|
-
* @summary Deletes an Organisational Unit
|
|
216
|
-
*/
|
|
217
|
-
declare const useDeleteOrganisationUnit: <
|
|
218
|
-
mutation?: UseMutationOptions<
|
|
215
|
+
* @summary Deletes an Organisational Unit
|
|
216
|
+
*/
|
|
217
|
+
declare const useDeleteOrganisationUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
218
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError, {
|
|
219
219
|
unitId: string;
|
|
220
220
|
}, TContext>;
|
|
221
221
|
request?: SecondParameter<typeof customInstance>;
|
|
222
|
-
}) => UseMutationResult<
|
|
222
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError, {
|
|
223
223
|
unitId: string;
|
|
224
224
|
}, TContext>;
|
|
225
225
|
/**
|
|
226
|
-
* Gets
|
|
226
|
+
* @summary Gets your Personal Unit (if you have one)
|
|
227
|
+
*/
|
|
228
|
+
declare const getPersonalUnit: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitAllDetail>;
|
|
229
|
+
declare const getGetPersonalUnitQueryKey: () => readonly ["/personal-unit"];
|
|
230
|
+
declare const useGetPersonalUnitQueryOptions: <TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
231
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
232
|
+
request?: SecondParameter<typeof customInstance>;
|
|
233
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData> & {
|
|
234
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
235
|
+
};
|
|
236
|
+
type GetPersonalUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getPersonalUnit>>>;
|
|
237
|
+
type GetPersonalUnitQueryError = ErrorType<void | AsError>;
|
|
238
|
+
declare function useGetPersonalUnit<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options: {
|
|
239
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, Awaited<ReturnType<typeof getPersonalUnit>>>, "initialData">;
|
|
240
|
+
request?: SecondParameter<typeof customInstance>;
|
|
241
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
242
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
243
|
+
};
|
|
244
|
+
declare function useGetPersonalUnit<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
245
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, Awaited<ReturnType<typeof getPersonalUnit>>>, "initialData">;
|
|
246
|
+
request?: SecondParameter<typeof customInstance>;
|
|
247
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
248
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
249
|
+
};
|
|
250
|
+
declare function useGetPersonalUnit<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
251
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
252
|
+
request?: SecondParameter<typeof customInstance>;
|
|
253
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
254
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
255
|
+
};
|
|
256
|
+
declare const useGetPersonalUnitSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
257
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
258
|
+
request?: SecondParameter<typeof customInstance>;
|
|
259
|
+
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData> & {
|
|
260
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
261
|
+
};
|
|
262
|
+
type GetPersonalUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getPersonalUnit>>>;
|
|
263
|
+
type GetPersonalUnitSuspenseQueryError = ErrorType<void | AsError>;
|
|
264
|
+
declare function useGetPersonalUnitSuspense<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options: {
|
|
265
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
266
|
+
request?: SecondParameter<typeof customInstance>;
|
|
267
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
268
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
269
|
+
};
|
|
270
|
+
declare function useGetPersonalUnitSuspense<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
271
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
272
|
+
request?: SecondParameter<typeof customInstance>;
|
|
273
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
274
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
275
|
+
};
|
|
276
|
+
declare function useGetPersonalUnitSuspense<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
277
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
278
|
+
request?: SecondParameter<typeof customInstance>;
|
|
279
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
280
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.
|
|
284
|
+
|
|
285
|
+
Users can only create one Personal unit and you cannot add other Users to a Personal Unit.
|
|
286
|
+
|
|
287
|
+
* @summary Create a new Personal Unit
|
|
288
|
+
*/
|
|
289
|
+
declare const createPersonalUnit: (personalUnitPutBodyBody: PersonalUnitPutBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<PersonalUnitPutResponse>;
|
|
290
|
+
declare const useCreatePersonalUnitMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
291
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createPersonalUnit>>, TError, {
|
|
292
|
+
data: PersonalUnitPutBodyBody;
|
|
293
|
+
}, TContext>;
|
|
294
|
+
request?: SecondParameter<typeof customInstance>;
|
|
295
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createPersonalUnit>>, TError, {
|
|
296
|
+
data: PersonalUnitPutBodyBody;
|
|
297
|
+
}, TContext>;
|
|
298
|
+
type CreatePersonalUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createPersonalUnit>>>;
|
|
299
|
+
type CreatePersonalUnitMutationBody = PersonalUnitPutBodyBody;
|
|
300
|
+
type CreatePersonalUnitMutationError = ErrorType<AsError | void>;
|
|
301
|
+
/**
|
|
302
|
+
* @summary Create a new Personal Unit
|
|
303
|
+
*/
|
|
304
|
+
declare const useCreatePersonalUnit: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
305
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createPersonalUnit>>, TError, {
|
|
306
|
+
data: PersonalUnitPutBodyBody;
|
|
307
|
+
}, TContext>;
|
|
308
|
+
request?: SecondParameter<typeof customInstance>;
|
|
309
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createPersonalUnit>>, TError, {
|
|
310
|
+
data: PersonalUnitPutBodyBody;
|
|
311
|
+
}, TContext>;
|
|
312
|
+
/**
|
|
313
|
+
* Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**
|
|
314
|
+
|
|
315
|
+
* @summary Deletes a Personal Unit
|
|
316
|
+
*/
|
|
317
|
+
declare const deletePersonalUnit: (options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
318
|
+
declare const useDeletePersonalUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
319
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext>;
|
|
320
|
+
request?: SecondParameter<typeof customInstance>;
|
|
321
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext>;
|
|
322
|
+
type DeletePersonalUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deletePersonalUnit>>>;
|
|
323
|
+
type DeletePersonalUnitMutationError = ErrorType<void | AsError>;
|
|
324
|
+
/**
|
|
325
|
+
* @summary Deletes a Personal Unit
|
|
326
|
+
*/
|
|
327
|
+
declare const useDeletePersonalUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
328
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext>;
|
|
329
|
+
request?: SecondParameter<typeof customInstance>;
|
|
330
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext>;
|
|
331
|
+
/**
|
|
332
|
+
* Gets all the Units that you are a member of, or a specific Unit by name.
|
|
227
333
|
|
|
228
334
|
You can see a Unit if you are a member of it, the owner (creator) of it, or a member or creator of the Unit's Organisation, or if you are an admin user.
|
|
229
335
|
|
|
230
|
-
* @summary Gets Units
|
|
231
|
-
*/
|
|
336
|
+
* @summary Gets Units
|
|
337
|
+
*/
|
|
232
338
|
declare const getUnits: (params?: GetUnitsParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitsGetResponse>;
|
|
233
|
-
declare const getGetUnitsQueryKey: (params?: GetUnitsParams) => readonly ["
|
|
234
|
-
declare const
|
|
339
|
+
declare const getGetUnitsQueryKey: (params?: GetUnitsParams) => readonly ["/unit", ...GetUnitsParams[]];
|
|
340
|
+
declare const useGetUnitsQueryOptions: <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
235
341
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
236
342
|
request?: SecondParameter<typeof customInstance>;
|
|
237
343
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData> & {
|
|
@@ -240,24 +346,24 @@ declare const getGetUnitsQueryOptions: <TData = UnitsGetResponse, TError = Error
|
|
|
240
346
|
type GetUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;
|
|
241
347
|
type GetUnitsQueryError = ErrorType<void | AsError>;
|
|
242
348
|
declare function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params: undefined | GetUnitsParams, options: {
|
|
243
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnits>>, TError,
|
|
349
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnits>>, TError, Awaited<ReturnType<typeof getUnits>>>, "initialData">;
|
|
244
350
|
request?: SecondParameter<typeof customInstance>;
|
|
245
|
-
}): DefinedUseQueryResult<TData, TError> & {
|
|
351
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
246
352
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
247
353
|
};
|
|
248
354
|
declare function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
249
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnits>>, TError,
|
|
355
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnits>>, TError, Awaited<ReturnType<typeof getUnits>>>, "initialData">;
|
|
250
356
|
request?: SecondParameter<typeof customInstance>;
|
|
251
|
-
}): UseQueryResult<TData, TError> & {
|
|
357
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
252
358
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
253
359
|
};
|
|
254
360
|
declare function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
255
361
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
256
362
|
request?: SecondParameter<typeof customInstance>;
|
|
257
|
-
}): UseQueryResult<TData, TError> & {
|
|
363
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
258
364
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
259
365
|
};
|
|
260
|
-
declare const
|
|
366
|
+
declare const useGetUnitsSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
261
367
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
262
368
|
request?: SecondParameter<typeof customInstance>;
|
|
263
369
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData> & {
|
|
@@ -268,19 +374,19 @@ type GetUnitsSuspenseQueryError = ErrorType<void | AsError>;
|
|
|
268
374
|
declare function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params: undefined | GetUnitsParams, options: {
|
|
269
375
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
270
376
|
request?: SecondParameter<typeof customInstance>;
|
|
271
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
377
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
272
378
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
273
379
|
};
|
|
274
380
|
declare function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
275
381
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
276
382
|
request?: SecondParameter<typeof customInstance>;
|
|
277
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
383
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
278
384
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
279
385
|
};
|
|
280
386
|
declare function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
281
387
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
282
388
|
request?: SecondParameter<typeof customInstance>;
|
|
283
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
389
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
284
390
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
285
391
|
};
|
|
286
392
|
/**
|
|
@@ -288,49 +394,53 @@ declare function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>
|
|
|
288
394
|
|
|
289
395
|
Users can only create one Personal unit and you cannot add other Users to a Personal Unit.
|
|
290
396
|
|
|
397
|
+
This endpoint is DECREMENTED and will be removed in a future release. Please use **PUT** at `/personal-unit`.
|
|
398
|
+
|
|
291
399
|
* @summary Create a new Personal Unit
|
|
292
400
|
*/
|
|
293
401
|
declare const createDefaultUnit: (personalUnitPutBodyBody: PersonalUnitPutBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<PersonalUnitPutResponse>;
|
|
294
|
-
declare const
|
|
295
|
-
mutation?: UseMutationOptions<
|
|
402
|
+
declare const useCreateDefaultUnitMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
403
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError, {
|
|
296
404
|
data: PersonalUnitPutBodyBody;
|
|
297
405
|
}, TContext>;
|
|
298
406
|
request?: SecondParameter<typeof customInstance>;
|
|
299
|
-
}) => UseMutationOptions<
|
|
407
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError, {
|
|
300
408
|
data: PersonalUnitPutBodyBody;
|
|
301
409
|
}, TContext>;
|
|
302
410
|
type CreateDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createDefaultUnit>>>;
|
|
303
411
|
type CreateDefaultUnitMutationBody = PersonalUnitPutBodyBody;
|
|
304
412
|
type CreateDefaultUnitMutationError = ErrorType<AsError | void>;
|
|
305
413
|
/**
|
|
306
|
-
* @summary Create a new Personal Unit
|
|
307
|
-
*/
|
|
308
|
-
declare const useCreateDefaultUnit: <
|
|
309
|
-
mutation?: UseMutationOptions<
|
|
414
|
+
* @summary Create a new Personal Unit
|
|
415
|
+
*/
|
|
416
|
+
declare const useCreateDefaultUnit: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
417
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError, {
|
|
310
418
|
data: PersonalUnitPutBodyBody;
|
|
311
419
|
}, TContext>;
|
|
312
420
|
request?: SecondParameter<typeof customInstance>;
|
|
313
|
-
}) => UseMutationResult<
|
|
421
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createDefaultUnit>>, TError, {
|
|
314
422
|
data: PersonalUnitPutBodyBody;
|
|
315
423
|
}, TContext>;
|
|
316
424
|
/**
|
|
317
|
-
* Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**
|
|
425
|
+
* Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**
|
|
426
|
+
|
|
427
|
+
This endpoint is DECREMENTED and will be removed in a future release. Please use **DELETE** at `/personal-unit`.
|
|
318
428
|
|
|
319
|
-
* @summary Deletes a Personal Unit
|
|
320
|
-
*/
|
|
429
|
+
* @summary Deletes a Personal Unit
|
|
430
|
+
*/
|
|
321
431
|
declare const deleteDefaultUnit: (options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
322
|
-
declare const
|
|
323
|
-
mutation?: UseMutationOptions<
|
|
432
|
+
declare const useDeleteDefaultUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
433
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext>;
|
|
324
434
|
request?: SecondParameter<typeof customInstance>;
|
|
325
|
-
}) => UseMutationOptions<
|
|
435
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext>;
|
|
326
436
|
type DeleteDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteDefaultUnit>>>;
|
|
327
437
|
type DeleteDefaultUnitMutationError = ErrorType<void | AsError>;
|
|
328
438
|
/**
|
|
329
|
-
* @summary Deletes a Personal Unit
|
|
330
|
-
*/
|
|
331
|
-
declare const useDeleteDefaultUnit: <
|
|
332
|
-
mutation?: UseMutationOptions<
|
|
439
|
+
* @summary Deletes a Personal Unit
|
|
440
|
+
*/
|
|
441
|
+
declare const useDeleteDefaultUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
442
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext>;
|
|
333
443
|
request?: SecondParameter<typeof customInstance>;
|
|
334
|
-
}) => UseMutationResult<
|
|
444
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext>;
|
|
335
445
|
|
|
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,
|
|
446
|
+
export { type CreateDefaultUnitMutationBody, type CreateDefaultUnitMutationError, type CreateDefaultUnitMutationResult, type CreateOrganisationUnitMutationBody, type CreateOrganisationUnitMutationError, type CreateOrganisationUnitMutationResult, type CreatePersonalUnitMutationBody, type CreatePersonalUnitMutationError, type CreatePersonalUnitMutationResult, type DeleteDefaultUnitMutationError, type DeleteDefaultUnitMutationResult, type DeleteOrganisationUnitMutationError, type DeleteOrganisationUnitMutationResult, type DeletePersonalUnitMutationError, type DeletePersonalUnitMutationResult, type GetOrganisationUnitsQueryError, type GetOrganisationUnitsQueryResult, type GetOrganisationUnitsSuspenseQueryError, type GetOrganisationUnitsSuspenseQueryResult, type GetPersonalUnitQueryError, type GetPersonalUnitQueryResult, type GetPersonalUnitSuspenseQueryError, type GetPersonalUnitSuspenseQueryResult, type GetUnitQueryError, type GetUnitQueryResult, type GetUnitSuspenseQueryError, type GetUnitSuspenseQueryResult, type GetUnitsQueryError, type GetUnitsQueryResult, type GetUnitsSuspenseQueryError, type GetUnitsSuspenseQueryResult, type PatchUnitMutationBody, type PatchUnitMutationError, type PatchUnitMutationResult, createDefaultUnit, createOrganisationUnit, createPersonalUnit, deleteDefaultUnit, deleteOrganisationUnit, deletePersonalUnit, getGetOrganisationUnitsQueryKey, getGetPersonalUnitQueryKey, getGetUnitQueryKey, getGetUnitsQueryKey, getOrganisationUnits, getPersonalUnit, getUnit, getUnits, patchUnit, useCreateDefaultUnit, useCreateDefaultUnitMutationOptions, useCreateOrganisationUnit, useCreateOrganisationUnitMutationOptions, useCreatePersonalUnit, useCreatePersonalUnitMutationOptions, useDeleteDefaultUnit, useDeleteDefaultUnitMutationOptions, useDeleteOrganisationUnit, useDeleteOrganisationUnitMutationOptions, useDeletePersonalUnit, useDeletePersonalUnitMutationOptions, useGetOrganisationUnits, useGetOrganisationUnitsQueryOptions, useGetOrganisationUnitsSuspense, useGetOrganisationUnitsSuspenseQueryOptions, useGetPersonalUnit, useGetPersonalUnitQueryOptions, useGetPersonalUnitSuspense, useGetPersonalUnitSuspenseQueryOptions, useGetUnit, useGetUnitQueryOptions, useGetUnitSuspense, useGetUnitSuspenseQueryOptions, useGetUnits, useGetUnitsQueryOptions, useGetUnitsSuspense, useGetUnitsSuspenseQueryOptions, usePatchUnit, usePatchUnitMutationOptions };
|