@squonk/account-server-client 4.3.1 → 4.4.0-4-4.2174798239
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/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/api/actions/actions.cjs +85 -0
- package/dist/api/actions/actions.cjs.map +1 -0
- package/dist/api/actions/actions.d.cts +74 -0
- package/dist/api/actions/actions.d.cts.map +1 -0
- package/dist/api/actions/actions.d.ts +74 -0
- package/dist/api/actions/actions.d.ts.map +1 -0
- package/dist/api/actions/actions.js +79 -0
- package/dist/api/actions/actions.js.map +1 -0
- package/dist/api/api.schemas.cjs +142 -0
- package/dist/api/api.schemas.cjs.map +1 -0
- package/dist/api/api.schemas.d.cts +1032 -0
- package/dist/api/api.schemas.d.cts.map +1 -0
- package/dist/api/api.schemas.d.ts +1032 -0
- package/dist/api/api.schemas.d.ts.map +1 -0
- package/dist/api/api.schemas.js +118 -0
- package/dist/api/api.schemas.js.map +1 -0
- package/dist/api/asset/asset.cjs +464 -0
- package/dist/api/asset/asset.cjs.map +1 -0
- package/{asset → dist/api/asset}/asset.d.cts +132 -130
- package/dist/api/asset/asset.d.cts.map +1 -0
- package/{asset → dist/api/asset}/asset.d.ts +132 -130
- package/dist/api/asset/asset.d.ts.map +1 -0
- package/dist/api/asset/asset.js +431 -0
- package/dist/api/asset/asset.js.map +1 -0
- package/dist/api/charges/charges.cjs +272 -0
- package/dist/api/charges/charges.cjs.map +1 -0
- package/{charges → dist/api/charges}/charges.d.cts +106 -104
- package/dist/api/charges/charges.d.cts.map +1 -0
- package/{charges → dist/api/charges}/charges.d.ts +106 -104
- package/dist/api/charges/charges.d.ts.map +1 -0
- package/dist/api/charges/charges.js +248 -0
- package/dist/api/charges/charges.js.map +1 -0
- package/dist/api/event-stream/event-stream.cjs +230 -0
- package/dist/api/event-stream/event-stream.cjs.map +1 -0
- package/{event-stream → dist/api/event-stream}/event-stream.d.cts +75 -73
- package/dist/api/event-stream/event-stream.d.cts.map +1 -0
- package/{event-stream → dist/api/event-stream}/event-stream.d.ts +75 -73
- package/dist/api/event-stream/event-stream.d.ts.map +1 -0
- package/dist/api/event-stream/event-stream.js +212 -0
- package/dist/api/event-stream/event-stream.js.map +1 -0
- package/dist/api/merchant/merchant.cjs +139 -0
- package/dist/api/merchant/merchant.cjs.map +1 -0
- package/{merchant → dist/api/merchant}/merchant.d.cts +56 -54
- package/dist/api/merchant/merchant.d.cts.map +1 -0
- package/{merchant → dist/api/merchant}/merchant.d.ts +56 -54
- package/dist/api/merchant/merchant.d.ts.map +1 -0
- package/dist/api/merchant/merchant.js +127 -0
- package/dist/api/merchant/merchant.js.map +1 -0
- package/dist/api/organisation/organisation.cjs +341 -0
- package/dist/api/organisation/organisation.cjs.map +1 -0
- package/{organisation → dist/api/organisation}/organisation.d.cts +112 -110
- package/dist/api/organisation/organisation.d.cts.map +1 -0
- package/{organisation → dist/api/organisation}/organisation.d.ts +112 -110
- package/dist/api/organisation/organisation.d.ts.map +1 -0
- package/dist/api/organisation/organisation.js +314 -0
- package/dist/api/organisation/organisation.js.map +1 -0
- package/dist/api/product/product.cjs +513 -0
- package/dist/api/product/product.cjs.map +1 -0
- package/{product → dist/api/product}/product.d.cts +188 -186
- package/dist/api/product/product.d.cts.map +1 -0
- package/{product → dist/api/product}/product.d.ts +188 -186
- package/dist/api/product/product.d.ts.map +1 -0
- package/dist/api/product/product.js +468 -0
- package/dist/api/product/product.js.map +1 -0
- package/dist/api/state/state.cjs +76 -0
- package/dist/api/state/state.cjs.map +1 -0
- package/dist/api/state/state.d.cts +66 -0
- package/dist/api/state/state.d.cts.map +1 -0
- package/dist/api/state/state.d.ts +66 -0
- package/dist/api/state/state.d.ts.map +1 -0
- package/dist/api/state/state.js +70 -0
- package/dist/api/state/state.js.map +1 -0
- package/dist/api/unit/unit.cjs +568 -0
- package/dist/api/unit/unit.cjs.map +1 -0
- package/{unit → dist/api/unit}/unit.d.cts +167 -165
- package/dist/api/unit/unit.d.cts.map +1 -0
- package/{unit → dist/api/unit}/unit.d.ts +167 -165
- package/dist/api/unit/unit.d.ts.map +1 -0
- package/dist/api/unit/unit.js +523 -0
- package/dist/api/unit/unit.js.map +1 -0
- package/dist/api/user/user.cjs +380 -0
- package/dist/api/user/user.cjs.map +1 -0
- package/{user → dist/api/user}/user.d.cts +129 -127
- package/dist/api/user/user.d.cts.map +1 -0
- package/{user → dist/api/user}/user.d.ts +129 -127
- package/dist/api/user/user.d.ts.map +1 -0
- package/dist/api/user/user.js +350 -0
- package/dist/api/user/user.js.map +1 -0
- package/dist/custom-instance.cjs +49 -0
- package/dist/custom-instance.cjs.map +1 -0
- package/dist/custom-instance.d.cts +22 -0
- package/dist/custom-instance.d.cts.map +1 -0
- package/dist/custom-instance.d.ts +22 -0
- package/dist/custom-instance.d.ts.map +1 -0
- package/dist/custom-instance.js +44 -0
- package/dist/custom-instance.js.map +1 -0
- package/dist/index.cjs +31 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/options-mutator.cjs +24 -0
- package/dist/options-mutator.cjs.map +1 -0
- package/dist/options-mutator.js +23 -0
- package/dist/options-mutator.js.map +1 -0
- package/orval.config.ts +24 -0
- package/package.json +163 -16
- package/pnpm-workspace.yaml +3 -0
- package/src/api/actions/actions.ts +249 -0
- package/src/{account-server-api.schemas.ts → api/api.schemas.ts} +82 -2
- package/src/{asset → api/asset}/asset.ts +8 -8
- package/src/{charges → api/charges}/charges.ts +9 -9
- package/src/{event-stream → api/event-stream}/event-stream.ts +7 -7
- package/src/{merchant → api/merchant}/merchant.ts +7 -7
- package/src/{organisation → api/organisation}/organisation.ts +8 -8
- package/src/{product → api/product}/product.ts +10 -10
- package/src/{state → api/state}/state.ts +6 -6
- package/src/{unit → api/unit}/unit.ts +9 -9
- package/src/{user → api/user}/user.ts +9 -9
- package/src/index.ts +2 -2
- package/src/options-mutator.ts +2 -2
- package/tsconfig.json +29 -0
- package/tsdown.config.ts +52 -0
- package/asset/asset.cjs +0 -281
- package/asset/asset.cjs.map +0 -1
- package/asset/asset.js +0 -281
- package/asset/asset.js.map +0 -1
- package/asset/package.json +0 -7
- package/charges/charges.cjs +0 -176
- package/charges/charges.cjs.map +0 -1
- package/charges/charges.js +0 -176
- package/charges/charges.js.map +0 -1
- package/charges/package.json +0 -7
- package/chunk-3WKSNKHE.js +0 -25
- package/chunk-3WKSNKHE.js.map +0 -1
- package/chunk-NY2VJJG7.cjs +0 -25
- package/chunk-NY2VJJG7.cjs.map +0 -1
- package/chunk-RB2KVIEK.cjs +0 -27
- package/chunk-RB2KVIEK.cjs.map +0 -1
- package/chunk-XYDLYMQ2.js +0 -27
- package/chunk-XYDLYMQ2.js.map +0 -1
- package/event-stream/event-stream.cjs +0 -144
- package/event-stream/event-stream.cjs.map +0 -1
- package/event-stream/event-stream.js +0 -144
- package/event-stream/event-stream.js.map +0 -1
- package/event-stream/package.json +0 -7
- package/index.cjs +0 -142
- package/index.cjs.map +0 -1
- package/index.d.cts +0 -979
- package/index.d.ts +0 -979
- package/index.js +0 -142
- package/index.js.map +0 -1
- package/merchant/merchant.cjs +0 -91
- package/merchant/merchant.cjs.map +0 -1
- package/merchant/merchant.js +0 -91
- package/merchant/merchant.js.map +0 -1
- package/merchant/package.json +0 -7
- package/organisation/organisation.cjs +0 -213
- package/organisation/organisation.cjs.map +0 -1
- package/organisation/organisation.js +0 -213
- package/organisation/organisation.js.map +0 -1
- package/organisation/package.json +0 -7
- package/product/package.json +0 -7
- package/product/product.cjs +0 -341
- package/product/product.cjs.map +0 -1
- package/product/product.js +0 -341
- package/product/product.js.map +0 -1
- package/state/package.json +0 -7
- package/state/state.cjs +0 -53
- package/state/state.cjs.map +0 -1
- package/state/state.d.cts +0 -64
- package/state/state.d.ts +0 -64
- package/state/state.js +0 -53
- package/state/state.js.map +0 -1
- package/unit/package.json +0 -7
- package/unit/unit.cjs +0 -339
- package/unit/unit.cjs.map +0 -1
- package/unit/unit.js +0 -339
- package/unit/unit.js.map +0 -1
- package/user/package.json +0 -7
- package/user/user.cjs +0 -226
- package/user/user.cjs.map +0 -1
- package/user/user.js +0 -226
- package/user/user.js.map +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { AsError, GetUnitsParams, OrganisationUnitPostBodyBody, OrganisationUnitPostResponse, OrganisationUnitsGetResponse, PersonalUnitPutBodyBody, PersonalUnitPutResponse, UnitAllDetail, UnitPatchBodyBody, UnitsGetResponse } from "../api.schemas.cjs";
|
|
2
|
+
import { ErrorType, customInstance } from "../../custom-instance.cjs";
|
|
3
|
+
import { DataTag, DefinedInitialDataOptions, DefinedUseQueryResult, QueryClient, QueryKey, UndefinedInitialDataOptions, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from "@tanstack/react-query";
|
|
4
4
|
|
|
5
|
+
//#region src/api/unit/unit.d.ts
|
|
5
6
|
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
6
7
|
/**
|
|
7
8
|
* Gets Organisational Units you have access to or that are public
|
|
@@ -9,58 +10,58 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
|
9
10
|
* @summary Gets Organisational Units
|
|
10
11
|
*/
|
|
11
12
|
declare const getOrganisationUnits: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationUnitsGetResponse>;
|
|
12
|
-
declare const getGetOrganisationUnitsQueryKey: (orgId
|
|
13
|
+
declare const getGetOrganisationUnitsQueryKey: (orgId?: string) => readonly [`/organisation/${string}/unit`];
|
|
13
14
|
declare const useGetOrganisationUnitsQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
16
|
+
request?: SecondParameter<typeof customInstance>;
|
|
16
17
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData> & {
|
|
17
|
-
|
|
18
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
18
19
|
};
|
|
19
20
|
type GetOrganisationUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnits>>>;
|
|
20
21
|
type GetOrganisationUnitsQueryError = ErrorType<void | AsError>;
|
|
21
22
|
declare function useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options: {
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, Awaited<ReturnType<typeof getOrganisationUnits>>>, "initialData">;
|
|
24
|
+
request?: SecondParameter<typeof customInstance>;
|
|
24
25
|
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
25
|
-
|
|
26
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
26
27
|
};
|
|
27
28
|
declare function useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, Awaited<ReturnType<typeof getOrganisationUnits>>>, "initialData">;
|
|
30
|
+
request?: SecondParameter<typeof customInstance>;
|
|
30
31
|
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
31
|
-
|
|
32
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
32
33
|
};
|
|
33
34
|
declare function useGetOrganisationUnits<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
36
|
+
request?: SecondParameter<typeof customInstance>;
|
|
36
37
|
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
37
|
-
|
|
38
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
38
39
|
};
|
|
39
40
|
declare const useGetOrganisationUnitsSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
42
|
+
request?: SecondParameter<typeof customInstance>;
|
|
42
43
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData> & {
|
|
43
|
-
|
|
44
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
44
45
|
};
|
|
45
46
|
type GetOrganisationUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnits>>>;
|
|
46
47
|
type GetOrganisationUnitsSuspenseQueryError = ErrorType<void | AsError>;
|
|
47
48
|
declare function useGetOrganisationUnitsSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options: {
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
50
|
+
request?: SecondParameter<typeof customInstance>;
|
|
50
51
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
51
|
-
|
|
52
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
52
53
|
};
|
|
53
54
|
declare function useGetOrganisationUnitsSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
56
|
+
request?: SecondParameter<typeof customInstance>;
|
|
56
57
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
57
|
-
|
|
58
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
58
59
|
};
|
|
59
60
|
declare function useGetOrganisationUnitsSuspense<TData = Awaited<ReturnType<typeof getOrganisationUnits>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnits>>, TError, TData>>;
|
|
62
|
+
request?: SecondParameter<typeof customInstance>;
|
|
62
63
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
63
|
-
|
|
64
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
64
65
|
};
|
|
65
66
|
/**
|
|
66
67
|
* Creates a new Organisation Unit.
|
|
@@ -73,14 +74,14 @@ You need to be a member of the **Organisation** or have administration rights t
|
|
|
73
74
|
*/
|
|
74
75
|
declare const createOrganisationUnit: (orgId: string, organisationUnitPostBodyBody: OrganisationUnitPostBodyBody, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationUnitPostResponse>;
|
|
75
76
|
declare const useCreateOrganisationUnitMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
76
|
-
|
|
77
|
-
orgId: string;
|
|
78
|
-
data: OrganisationUnitPostBodyBody;
|
|
79
|
-
}, TContext>;
|
|
80
|
-
request?: SecondParameter<typeof customInstance>;
|
|
81
|
-
}) => UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError, {
|
|
77
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError, {
|
|
82
78
|
orgId: string;
|
|
83
79
|
data: OrganisationUnitPostBodyBody;
|
|
80
|
+
}, TContext>;
|
|
81
|
+
request?: SecondParameter<typeof customInstance>;
|
|
82
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError, {
|
|
83
|
+
orgId: string;
|
|
84
|
+
data: OrganisationUnitPostBodyBody;
|
|
84
85
|
}, TContext>;
|
|
85
86
|
type CreateOrganisationUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganisationUnit>>>;
|
|
86
87
|
type CreateOrganisationUnitMutationBody = OrganisationUnitPostBodyBody;
|
|
@@ -89,14 +90,14 @@ type CreateOrganisationUnitMutationError = ErrorType<AsError | void>;
|
|
|
89
90
|
* @summary Create a new Organisational Unit
|
|
90
91
|
*/
|
|
91
92
|
declare const useCreateOrganisationUnit: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
92
|
-
|
|
93
|
-
orgId: string;
|
|
94
|
-
data: OrganisationUnitPostBodyBody;
|
|
95
|
-
}, TContext>;
|
|
96
|
-
request?: SecondParameter<typeof customInstance>;
|
|
97
|
-
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createOrganisationUnit>>, TError, {
|
|
93
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createOrganisationUnit>>, TError, {
|
|
98
94
|
orgId: string;
|
|
99
95
|
data: OrganisationUnitPostBodyBody;
|
|
96
|
+
}, TContext>;
|
|
97
|
+
request?: SecondParameter<typeof customInstance>;
|
|
98
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createOrganisationUnit>>, TError, {
|
|
99
|
+
orgId: string;
|
|
100
|
+
data: OrganisationUnitPostBodyBody;
|
|
100
101
|
}, TContext>;
|
|
101
102
|
/**
|
|
102
103
|
* 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.
|
|
@@ -104,58 +105,58 @@ declare const useCreateOrganisationUnit: <TError = ErrorType<AsError | void>, TC
|
|
|
104
105
|
* @summary Gets an Organisational Unit
|
|
105
106
|
*/
|
|
106
107
|
declare const getUnit: (unitId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitAllDetail>;
|
|
107
|
-
declare const getGetUnitQueryKey: (unitId
|
|
108
|
+
declare const getGetUnitQueryKey: (unitId?: string) => readonly [`/unit/${string}`];
|
|
108
109
|
declare const useGetUnitQueryOptions: <TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
111
|
+
request?: SecondParameter<typeof customInstance>;
|
|
111
112
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData> & {
|
|
112
|
-
|
|
113
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
113
114
|
};
|
|
114
115
|
type GetUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;
|
|
115
116
|
type GetUnitQueryError = ErrorType<void | AsError>;
|
|
116
117
|
declare function useGetUnit<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options: {
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnit>>, TError, Awaited<ReturnType<typeof getUnit>>>, "initialData">;
|
|
119
|
+
request?: SecondParameter<typeof customInstance>;
|
|
119
120
|
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
120
|
-
|
|
121
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
121
122
|
};
|
|
122
123
|
declare function useGetUnit<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnit>>, TError, Awaited<ReturnType<typeof getUnit>>>, "initialData">;
|
|
125
|
+
request?: SecondParameter<typeof customInstance>;
|
|
125
126
|
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
126
|
-
|
|
127
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
127
128
|
};
|
|
128
129
|
declare function useGetUnit<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
131
|
+
request?: SecondParameter<typeof customInstance>;
|
|
131
132
|
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
132
|
-
|
|
133
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
133
134
|
};
|
|
134
135
|
declare const useGetUnitSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
137
|
+
request?: SecondParameter<typeof customInstance>;
|
|
137
138
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData> & {
|
|
138
|
-
|
|
139
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
139
140
|
};
|
|
140
141
|
type GetUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnit>>>;
|
|
141
142
|
type GetUnitSuspenseQueryError = ErrorType<void | AsError>;
|
|
142
143
|
declare function useGetUnitSuspense<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options: {
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
145
|
+
request?: SecondParameter<typeof customInstance>;
|
|
145
146
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
146
|
-
|
|
147
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
147
148
|
};
|
|
148
149
|
declare function useGetUnitSuspense<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
151
|
+
request?: SecondParameter<typeof customInstance>;
|
|
151
152
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
152
|
-
|
|
153
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
153
154
|
};
|
|
154
155
|
declare function useGetUnitSuspense<TData = Awaited<ReturnType<typeof getUnit>>, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
155
|
-
|
|
156
|
-
|
|
156
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnit>>, TError, TData>>;
|
|
157
|
+
request?: SecondParameter<typeof customInstance>;
|
|
157
158
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
158
|
-
|
|
159
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
159
160
|
};
|
|
160
161
|
/**
|
|
161
162
|
* 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).
|
|
@@ -166,14 +167,14 @@ You have to be a member of the **Unit**, a member of its **Organisation**, or an
|
|
|
166
167
|
*/
|
|
167
168
|
declare const patchUnit: (unitId: string, unitPatchBodyBody: UnitPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
168
169
|
declare const usePatchUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
169
|
-
|
|
170
|
-
unitId: string;
|
|
171
|
-
data: UnitPatchBodyBody;
|
|
172
|
-
}, TContext>;
|
|
173
|
-
request?: SecondParameter<typeof customInstance>;
|
|
174
|
-
}) => UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError, {
|
|
170
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError, {
|
|
175
171
|
unitId: string;
|
|
176
172
|
data: UnitPatchBodyBody;
|
|
173
|
+
}, TContext>;
|
|
174
|
+
request?: SecondParameter<typeof customInstance>;
|
|
175
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError, {
|
|
176
|
+
unitId: string;
|
|
177
|
+
data: UnitPatchBodyBody;
|
|
177
178
|
}, TContext>;
|
|
178
179
|
type PatchUnitMutationResult = NonNullable<Awaited<ReturnType<typeof patchUnit>>>;
|
|
179
180
|
type PatchUnitMutationBody = UnitPatchBodyBody;
|
|
@@ -182,14 +183,14 @@ type PatchUnitMutationError = ErrorType<void | AsError>;
|
|
|
182
183
|
* @summary Adjust an existing Unit
|
|
183
184
|
*/
|
|
184
185
|
declare const usePatchUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
185
|
-
|
|
186
|
-
unitId: string;
|
|
187
|
-
data: UnitPatchBodyBody;
|
|
188
|
-
}, TContext>;
|
|
189
|
-
request?: SecondParameter<typeof customInstance>;
|
|
190
|
-
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof patchUnit>>, TError, {
|
|
186
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof patchUnit>>, TError, {
|
|
191
187
|
unitId: string;
|
|
192
188
|
data: UnitPatchBodyBody;
|
|
189
|
+
}, TContext>;
|
|
190
|
+
request?: SecondParameter<typeof customInstance>;
|
|
191
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof patchUnit>>, TError, {
|
|
192
|
+
unitId: string;
|
|
193
|
+
data: UnitPatchBodyBody;
|
|
193
194
|
}, TContext>;
|
|
194
195
|
/**
|
|
195
196
|
* Deletes an Organisational Unit you have access to. Units can only be deleted by members of the Unit, its Organisation users or admin users.
|
|
@@ -202,12 +203,12 @@ You cannot delete a Unit that contains undeleted **Products**
|
|
|
202
203
|
*/
|
|
203
204
|
declare const deleteOrganisationUnit: (unitId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
204
205
|
declare const useDeleteOrganisationUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
205
|
-
|
|
206
|
-
unitId: string;
|
|
207
|
-
}, TContext>;
|
|
208
|
-
request?: SecondParameter<typeof customInstance>;
|
|
209
|
-
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError, {
|
|
206
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError, {
|
|
210
207
|
unitId: string;
|
|
208
|
+
}, TContext>;
|
|
209
|
+
request?: SecondParameter<typeof customInstance>;
|
|
210
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError, {
|
|
211
|
+
unitId: string;
|
|
211
212
|
}, TContext>;
|
|
212
213
|
type DeleteOrganisationUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnit>>>;
|
|
213
214
|
type DeleteOrganisationUnitMutationError = ErrorType<void | AsError>;
|
|
@@ -215,12 +216,12 @@ type DeleteOrganisationUnitMutationError = ErrorType<void | AsError>;
|
|
|
215
216
|
* @summary Deletes an Organisational Unit
|
|
216
217
|
*/
|
|
217
218
|
declare const useDeleteOrganisationUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
218
|
-
|
|
219
|
-
unitId: string;
|
|
220
|
-
}, TContext>;
|
|
221
|
-
request?: SecondParameter<typeof customInstance>;
|
|
222
|
-
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError, {
|
|
219
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError, {
|
|
223
220
|
unitId: string;
|
|
221
|
+
}, TContext>;
|
|
222
|
+
request?: SecondParameter<typeof customInstance>;
|
|
223
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteOrganisationUnit>>, TError, {
|
|
224
|
+
unitId: string;
|
|
224
225
|
}, TContext>;
|
|
225
226
|
/**
|
|
226
227
|
* @summary Gets your Personal Unit (if you have one)
|
|
@@ -228,56 +229,56 @@ declare const useDeleteOrganisationUnit: <TError = ErrorType<void | AsError>, TC
|
|
|
228
229
|
declare const getPersonalUnit: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitAllDetail>;
|
|
229
230
|
declare const getGetPersonalUnitQueryKey: () => readonly ["/personal-unit"];
|
|
230
231
|
declare const useGetPersonalUnitQueryOptions: <TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
231
|
-
|
|
232
|
-
|
|
232
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
233
|
+
request?: SecondParameter<typeof customInstance>;
|
|
233
234
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData> & {
|
|
234
|
-
|
|
235
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
235
236
|
};
|
|
236
237
|
type GetPersonalUnitQueryResult = NonNullable<Awaited<ReturnType<typeof getPersonalUnit>>>;
|
|
237
238
|
type GetPersonalUnitQueryError = ErrorType<void | AsError>;
|
|
238
239
|
declare function useGetPersonalUnit<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options: {
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, Awaited<ReturnType<typeof getPersonalUnit>>>, "initialData">;
|
|
241
|
+
request?: SecondParameter<typeof customInstance>;
|
|
241
242
|
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
242
|
-
|
|
243
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
243
244
|
};
|
|
244
245
|
declare function useGetPersonalUnit<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
245
|
-
|
|
246
|
-
|
|
246
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, Awaited<ReturnType<typeof getPersonalUnit>>>, "initialData">;
|
|
247
|
+
request?: SecondParameter<typeof customInstance>;
|
|
247
248
|
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
248
|
-
|
|
249
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
249
250
|
};
|
|
250
251
|
declare function useGetPersonalUnit<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
253
|
+
request?: SecondParameter<typeof customInstance>;
|
|
253
254
|
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
254
|
-
|
|
255
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
255
256
|
};
|
|
256
257
|
declare const useGetPersonalUnitSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
257
|
-
|
|
258
|
-
|
|
258
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
259
|
+
request?: SecondParameter<typeof customInstance>;
|
|
259
260
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData> & {
|
|
260
|
-
|
|
261
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
261
262
|
};
|
|
262
263
|
type GetPersonalUnitSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getPersonalUnit>>>;
|
|
263
264
|
type GetPersonalUnitSuspenseQueryError = ErrorType<void | AsError>;
|
|
264
265
|
declare function useGetPersonalUnitSuspense<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options: {
|
|
265
|
-
|
|
266
|
-
|
|
266
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
267
|
+
request?: SecondParameter<typeof customInstance>;
|
|
267
268
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
268
|
-
|
|
269
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
269
270
|
};
|
|
270
271
|
declare function useGetPersonalUnitSuspense<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
273
|
+
request?: SecondParameter<typeof customInstance>;
|
|
273
274
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
274
|
-
|
|
275
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
275
276
|
};
|
|
276
277
|
declare function useGetPersonalUnitSuspense<TData = Awaited<ReturnType<typeof getPersonalUnit>>, TError = ErrorType<void | AsError>>(options?: {
|
|
277
|
-
|
|
278
|
-
|
|
278
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getPersonalUnit>>, TError, TData>>;
|
|
279
|
+
request?: SecondParameter<typeof customInstance>;
|
|
279
280
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
280
|
-
|
|
281
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
281
282
|
};
|
|
282
283
|
/**
|
|
283
284
|
* Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.
|
|
@@ -288,12 +289,12 @@ Users can only create one Personal unit and you cannot add other Users to a Pers
|
|
|
288
289
|
*/
|
|
289
290
|
declare const createPersonalUnit: (personalUnitPutBodyBody: PersonalUnitPutBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<PersonalUnitPutResponse>;
|
|
290
291
|
declare const useCreatePersonalUnitMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
291
|
-
|
|
292
|
-
data: PersonalUnitPutBodyBody;
|
|
293
|
-
}, TContext>;
|
|
294
|
-
request?: SecondParameter<typeof customInstance>;
|
|
295
|
-
}) => UseMutationOptions<Awaited<ReturnType<typeof createPersonalUnit>>, TError, {
|
|
292
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createPersonalUnit>>, TError, {
|
|
296
293
|
data: PersonalUnitPutBodyBody;
|
|
294
|
+
}, TContext>;
|
|
295
|
+
request?: SecondParameter<typeof customInstance>;
|
|
296
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createPersonalUnit>>, TError, {
|
|
297
|
+
data: PersonalUnitPutBodyBody;
|
|
297
298
|
}, TContext>;
|
|
298
299
|
type CreatePersonalUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createPersonalUnit>>>;
|
|
299
300
|
type CreatePersonalUnitMutationBody = PersonalUnitPutBodyBody;
|
|
@@ -302,12 +303,12 @@ type CreatePersonalUnitMutationError = ErrorType<AsError | void>;
|
|
|
302
303
|
* @summary Create a new Personal Unit
|
|
303
304
|
*/
|
|
304
305
|
declare const useCreatePersonalUnit: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
305
|
-
|
|
306
|
-
data: PersonalUnitPutBodyBody;
|
|
307
|
-
}, TContext>;
|
|
308
|
-
request?: SecondParameter<typeof customInstance>;
|
|
309
|
-
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createPersonalUnit>>, TError, {
|
|
306
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createPersonalUnit>>, TError, {
|
|
310
307
|
data: PersonalUnitPutBodyBody;
|
|
308
|
+
}, TContext>;
|
|
309
|
+
request?: SecondParameter<typeof customInstance>;
|
|
310
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createPersonalUnit>>, TError, {
|
|
311
|
+
data: PersonalUnitPutBodyBody;
|
|
311
312
|
}, TContext>;
|
|
312
313
|
/**
|
|
313
314
|
* Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**
|
|
@@ -316,8 +317,8 @@ declare const useCreatePersonalUnit: <TError = ErrorType<AsError | void>, TConte
|
|
|
316
317
|
*/
|
|
317
318
|
declare const deletePersonalUnit: (options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
318
319
|
declare const useDeletePersonalUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
319
|
-
|
|
320
|
-
|
|
320
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext>;
|
|
321
|
+
request?: SecondParameter<typeof customInstance>;
|
|
321
322
|
}) => UseMutationOptions<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext>;
|
|
322
323
|
type DeletePersonalUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deletePersonalUnit>>>;
|
|
323
324
|
type DeletePersonalUnitMutationError = ErrorType<void | AsError>;
|
|
@@ -325,8 +326,8 @@ type DeletePersonalUnitMutationError = ErrorType<void | AsError>;
|
|
|
325
326
|
* @summary Deletes a Personal Unit
|
|
326
327
|
*/
|
|
327
328
|
declare const useDeletePersonalUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
328
|
-
|
|
329
|
-
|
|
329
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext>;
|
|
330
|
+
request?: SecondParameter<typeof customInstance>;
|
|
330
331
|
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deletePersonalUnit>>, TError, void, TContext>;
|
|
331
332
|
/**
|
|
332
333
|
* Gets all the Units that you are a member of, or a specific Unit by name.
|
|
@@ -338,56 +339,56 @@ You can see a Unit if you are a member of it, the owner (creator) of it, or a me
|
|
|
338
339
|
declare const getUnits: (params?: GetUnitsParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UnitsGetResponse>;
|
|
339
340
|
declare const getGetUnitsQueryKey: (params?: GetUnitsParams) => readonly ["/unit", ...GetUnitsParams[]];
|
|
340
341
|
declare const useGetUnitsQueryOptions: <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
341
|
-
|
|
342
|
-
|
|
342
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
343
|
+
request?: SecondParameter<typeof customInstance>;
|
|
343
344
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData> & {
|
|
344
|
-
|
|
345
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
345
346
|
};
|
|
346
347
|
type GetUnitsQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;
|
|
347
348
|
type GetUnitsQueryError = ErrorType<void | AsError>;
|
|
348
349
|
declare function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params: undefined | GetUnitsParams, options: {
|
|
349
|
-
|
|
350
|
-
|
|
350
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getUnits>>, TError, Awaited<ReturnType<typeof getUnits>>>, "initialData">;
|
|
351
|
+
request?: SecondParameter<typeof customInstance>;
|
|
351
352
|
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
352
|
-
|
|
353
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
353
354
|
};
|
|
354
355
|
declare function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
355
|
-
|
|
356
|
-
|
|
356
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getUnits>>, TError, Awaited<ReturnType<typeof getUnits>>>, "initialData">;
|
|
357
|
+
request?: SecondParameter<typeof customInstance>;
|
|
357
358
|
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
358
|
-
|
|
359
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
359
360
|
};
|
|
360
361
|
declare function useGetUnits<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
361
|
-
|
|
362
|
-
|
|
362
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
363
|
+
request?: SecondParameter<typeof customInstance>;
|
|
363
364
|
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
364
|
-
|
|
365
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
365
366
|
};
|
|
366
367
|
declare const useGetUnitsSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
367
|
-
|
|
368
|
-
|
|
368
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
369
|
+
request?: SecondParameter<typeof customInstance>;
|
|
369
370
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData> & {
|
|
370
|
-
|
|
371
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
371
372
|
};
|
|
372
373
|
type GetUnitsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUnits>>>;
|
|
373
374
|
type GetUnitsSuspenseQueryError = ErrorType<void | AsError>;
|
|
374
375
|
declare function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params: undefined | GetUnitsParams, options: {
|
|
375
|
-
|
|
376
|
-
|
|
376
|
+
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
377
|
+
request?: SecondParameter<typeof customInstance>;
|
|
377
378
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
378
|
-
|
|
379
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
379
380
|
};
|
|
380
381
|
declare function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
381
|
-
|
|
382
|
-
|
|
382
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
383
|
+
request?: SecondParameter<typeof customInstance>;
|
|
383
384
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
384
|
-
|
|
385
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
385
386
|
};
|
|
386
387
|
declare function useGetUnitsSuspense<TData = Awaited<ReturnType<typeof getUnits>>, TError = ErrorType<void | AsError>>(params?: GetUnitsParams, options?: {
|
|
387
|
-
|
|
388
|
-
|
|
388
|
+
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUnits>>, TError, TData>>;
|
|
389
|
+
request?: SecondParameter<typeof customInstance>;
|
|
389
390
|
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
390
|
-
|
|
391
|
+
queryKey: DataTag<QueryKey, TData, TError>;
|
|
391
392
|
};
|
|
392
393
|
/**
|
|
393
394
|
* Creates a Personal Unit for a User. The unit will belong to the built-in **Default Organisation**.
|
|
@@ -400,12 +401,12 @@ This endpoint is DECREMENTED and will be removed in a future release. Please use
|
|
|
400
401
|
*/
|
|
401
402
|
declare const createDefaultUnit: (personalUnitPutBodyBody: PersonalUnitPutBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<PersonalUnitPutResponse>;
|
|
402
403
|
declare const useCreateDefaultUnitMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
403
|
-
|
|
404
|
-
data: PersonalUnitPutBodyBody;
|
|
405
|
-
}, TContext>;
|
|
406
|
-
request?: SecondParameter<typeof customInstance>;
|
|
407
|
-
}) => UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError, {
|
|
404
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError, {
|
|
408
405
|
data: PersonalUnitPutBodyBody;
|
|
406
|
+
}, TContext>;
|
|
407
|
+
request?: SecondParameter<typeof customInstance>;
|
|
408
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError, {
|
|
409
|
+
data: PersonalUnitPutBodyBody;
|
|
409
410
|
}, TContext>;
|
|
410
411
|
type CreateDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof createDefaultUnit>>>;
|
|
411
412
|
type CreateDefaultUnitMutationBody = PersonalUnitPutBodyBody;
|
|
@@ -414,12 +415,12 @@ type CreateDefaultUnitMutationError = ErrorType<AsError | void>;
|
|
|
414
415
|
* @summary Create a new Personal Unit
|
|
415
416
|
*/
|
|
416
417
|
declare const useCreateDefaultUnit: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
417
|
-
|
|
418
|
-
data: PersonalUnitPutBodyBody;
|
|
419
|
-
}, TContext>;
|
|
420
|
-
request?: SecondParameter<typeof customInstance>;
|
|
421
|
-
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createDefaultUnit>>, TError, {
|
|
418
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createDefaultUnit>>, TError, {
|
|
422
419
|
data: PersonalUnitPutBodyBody;
|
|
420
|
+
}, TContext>;
|
|
421
|
+
request?: SecondParameter<typeof customInstance>;
|
|
422
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createDefaultUnit>>, TError, {
|
|
423
|
+
data: PersonalUnitPutBodyBody;
|
|
423
424
|
}, TContext>;
|
|
424
425
|
/**
|
|
425
426
|
* Deletes a Personal Unit. The Unit is *your* Unit, and belongs to the **Default Organisation**
|
|
@@ -430,8 +431,8 @@ This endpoint is DECREMENTED and will be removed in a future release. Please use
|
|
|
430
431
|
*/
|
|
431
432
|
declare const deleteDefaultUnit: (options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
432
433
|
declare const useDeleteDefaultUnitMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
433
|
-
|
|
434
|
-
|
|
434
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext>;
|
|
435
|
+
request?: SecondParameter<typeof customInstance>;
|
|
435
436
|
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext>;
|
|
436
437
|
type DeleteDefaultUnitMutationResult = NonNullable<Awaited<ReturnType<typeof deleteDefaultUnit>>>;
|
|
437
438
|
type DeleteDefaultUnitMutationError = ErrorType<void | AsError>;
|
|
@@ -439,8 +440,9 @@ type DeleteDefaultUnitMutationError = ErrorType<void | AsError>;
|
|
|
439
440
|
* @summary Deletes a Personal Unit
|
|
440
441
|
*/
|
|
441
442
|
declare const useDeleteDefaultUnit: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
442
|
-
|
|
443
|
-
|
|
443
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext>;
|
|
444
|
+
request?: SecondParameter<typeof customInstance>;
|
|
444
445
|
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteDefaultUnit>>, TError, void, TContext>;
|
|
445
|
-
|
|
446
|
-
export {
|
|
446
|
+
//#endregion
|
|
447
|
+
export { CreateDefaultUnitMutationBody, CreateDefaultUnitMutationError, CreateDefaultUnitMutationResult, CreateOrganisationUnitMutationBody, CreateOrganisationUnitMutationError, CreateOrganisationUnitMutationResult, CreatePersonalUnitMutationBody, CreatePersonalUnitMutationError, CreatePersonalUnitMutationResult, DeleteDefaultUnitMutationError, DeleteDefaultUnitMutationResult, DeleteOrganisationUnitMutationError, DeleteOrganisationUnitMutationResult, DeletePersonalUnitMutationError, DeletePersonalUnitMutationResult, GetOrganisationUnitsQueryError, GetOrganisationUnitsQueryResult, GetOrganisationUnitsSuspenseQueryError, GetOrganisationUnitsSuspenseQueryResult, GetPersonalUnitQueryError, GetPersonalUnitQueryResult, GetPersonalUnitSuspenseQueryError, GetPersonalUnitSuspenseQueryResult, GetUnitQueryError, GetUnitQueryResult, GetUnitSuspenseQueryError, GetUnitSuspenseQueryResult, GetUnitsQueryError, GetUnitsQueryResult, GetUnitsSuspenseQueryError, GetUnitsSuspenseQueryResult, PatchUnitMutationBody, PatchUnitMutationError, 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 };
|
|
448
|
+
//# sourceMappingURL=unit.d.cts.map
|