@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
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
1
|
+
import { UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, QueryClient, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
|
|
2
2
|
import { GetOrganisationsParams, customInstance, OrganisationsGetResponse, ErrorType, AsError, OrganisationPostBodyBody, OrganisationPostResponse, OrganisationAllDetail, OrganisationPatchBodyBody, OrganisationGetDefaultResponse } from '../index.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
|
-
type SecondParameter<T extends (...args:
|
|
5
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
6
6
|
/**
|
|
7
7
|
* Gets all the Organisations that you are a member of, or a specific Organisation by name.
|
|
8
8
|
|
|
@@ -11,8 +11,8 @@ You can see an Organisation if you are a member of it, the owner (creator) of it
|
|
|
11
11
|
* @summary Gets Organisations
|
|
12
12
|
*/
|
|
13
13
|
declare const getOrganisations: (params?: GetOrganisationsParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationsGetResponse>;
|
|
14
|
-
declare const getGetOrganisationsQueryKey: (params?: GetOrganisationsParams) => readonly ["
|
|
15
|
-
declare const
|
|
14
|
+
declare const getGetOrganisationsQueryKey: (params?: GetOrganisationsParams) => readonly ["/organisation", ...GetOrganisationsParams[]];
|
|
15
|
+
declare const useGetOrganisationsQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
16
16
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
17
17
|
request?: SecondParameter<typeof customInstance>;
|
|
18
18
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & {
|
|
@@ -21,24 +21,24 @@ declare const getGetOrganisationsQueryOptions: <TData = OrganisationsGetResponse
|
|
|
21
21
|
type GetOrganisationsQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisations>>>;
|
|
22
22
|
type GetOrganisationsQueryError = ErrorType<void | AsError>;
|
|
23
23
|
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params: undefined | GetOrganisationsParams, options: {
|
|
24
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisations>>, TError,
|
|
24
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, Awaited<ReturnType<typeof getOrganisations>>>, "initialData">;
|
|
25
25
|
request?: SecondParameter<typeof customInstance>;
|
|
26
|
-
}): DefinedUseQueryResult<TData, TError> & {
|
|
26
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
27
27
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
28
28
|
};
|
|
29
29
|
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
30
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisations>>, TError,
|
|
30
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, Awaited<ReturnType<typeof getOrganisations>>>, "initialData">;
|
|
31
31
|
request?: SecondParameter<typeof customInstance>;
|
|
32
|
-
}): UseQueryResult<TData, TError> & {
|
|
32
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
33
33
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
34
34
|
};
|
|
35
35
|
declare function useGetOrganisations<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
36
36
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
37
37
|
request?: SecondParameter<typeof customInstance>;
|
|
38
|
-
}): UseQueryResult<TData, TError> & {
|
|
38
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
39
39
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
40
40
|
};
|
|
41
|
-
declare const
|
|
41
|
+
declare const useGetOrganisationsSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
42
42
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
43
43
|
request?: SecondParameter<typeof customInstance>;
|
|
44
44
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData> & {
|
|
@@ -49,19 +49,19 @@ type GetOrganisationsSuspenseQueryError = ErrorType<void | AsError>;
|
|
|
49
49
|
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params: undefined | GetOrganisationsParams, options: {
|
|
50
50
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
51
51
|
request?: SecondParameter<typeof customInstance>;
|
|
52
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
52
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
53
53
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
54
54
|
};
|
|
55
55
|
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
56
56
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
57
57
|
request?: SecondParameter<typeof customInstance>;
|
|
58
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
58
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
59
59
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
60
60
|
};
|
|
61
61
|
declare function useGetOrganisationsSuspense<TData = Awaited<ReturnType<typeof getOrganisations>>, TError = ErrorType<void | AsError>>(params?: GetOrganisationsParams, options?: {
|
|
62
62
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisations>>, TError, TData>>;
|
|
63
63
|
request?: SecondParameter<typeof customInstance>;
|
|
64
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
64
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
65
65
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
66
66
|
};
|
|
67
67
|
/**
|
|
@@ -74,38 +74,38 @@ You need admin rights to use this method
|
|
|
74
74
|
* @summary Create a new organisation
|
|
75
75
|
*/
|
|
76
76
|
declare const createOrganisation: (organisationPostBodyBody: OrganisationPostBodyBody, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationPostResponse>;
|
|
77
|
-
declare const
|
|
78
|
-
mutation?: UseMutationOptions<
|
|
77
|
+
declare const useCreateOrganisationMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
78
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError, {
|
|
79
79
|
data: OrganisationPostBodyBody;
|
|
80
80
|
}, TContext>;
|
|
81
81
|
request?: SecondParameter<typeof customInstance>;
|
|
82
|
-
}) => UseMutationOptions<
|
|
82
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError, {
|
|
83
83
|
data: OrganisationPostBodyBody;
|
|
84
84
|
}, TContext>;
|
|
85
85
|
type CreateOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof createOrganisation>>>;
|
|
86
86
|
type CreateOrganisationMutationBody = OrganisationPostBodyBody;
|
|
87
87
|
type CreateOrganisationMutationError = ErrorType<AsError | void>;
|
|
88
88
|
/**
|
|
89
|
-
* @summary Create a new organisation
|
|
90
|
-
*/
|
|
91
|
-
declare const useCreateOrganisation: <
|
|
92
|
-
mutation?: UseMutationOptions<
|
|
89
|
+
* @summary Create a new organisation
|
|
90
|
+
*/
|
|
91
|
+
declare const useCreateOrganisation: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
92
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof createOrganisation>>, TError, {
|
|
93
93
|
data: OrganisationPostBodyBody;
|
|
94
94
|
}, TContext>;
|
|
95
95
|
request?: SecondParameter<typeof customInstance>;
|
|
96
|
-
}) => UseMutationResult<
|
|
96
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createOrganisation>>, TError, {
|
|
97
97
|
data: OrganisationPostBodyBody;
|
|
98
98
|
}, TContext>;
|
|
99
99
|
/**
|
|
100
|
-
* Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.
|
|
100
|
+
* Gets an Organisation. To see the Organisation you need admin rights or need to be a member of the Organisation or are its *creator*.
|
|
101
101
|
|
|
102
102
|
Members of an Organisation's **Unit** do not have access to the Organisation.
|
|
103
103
|
|
|
104
|
-
* @summary Gets an Organisation
|
|
105
|
-
*/
|
|
104
|
+
* @summary Gets an Organisation
|
|
105
|
+
*/
|
|
106
106
|
declare const getOrganisation: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationAllDetail>;
|
|
107
|
-
declare const getGetOrganisationQueryKey: (orgId: string) => readonly [
|
|
108
|
-
declare const
|
|
107
|
+
declare const getGetOrganisationQueryKey: (orgId: string) => readonly [`/organisation/${string}`];
|
|
108
|
+
declare const useGetOrganisationQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
109
109
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>;
|
|
110
110
|
request?: SecondParameter<typeof customInstance>;
|
|
111
111
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & {
|
|
@@ -114,24 +114,24 @@ declare const getGetOrganisationQueryOptions: <TData = OrganisationAllDetail, TE
|
|
|
114
114
|
type GetOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisation>>>;
|
|
115
115
|
type GetOrganisationQueryError = ErrorType<void | AsError>;
|
|
116
116
|
declare function useGetOrganisation<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options: {
|
|
117
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisation>>, TError,
|
|
117
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, Awaited<ReturnType<typeof getOrganisation>>>, "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 useGetOrganisation<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
123
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisation>>, TError,
|
|
123
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, Awaited<ReturnType<typeof getOrganisation>>>, "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 useGetOrganisation<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
129
129
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, 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 useGetOrganisationSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
135
135
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData>>;
|
|
136
136
|
request?: SecondParameter<typeof customInstance>;
|
|
137
137
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, TError, TData> & {
|
|
@@ -142,36 +142,38 @@ type GetOrganisationSuspenseQueryError = ErrorType<void | AsError>;
|
|
|
142
142
|
declare function useGetOrganisationSuspense<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options: {
|
|
143
143
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, 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 useGetOrganisationSuspense<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
149
149
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, 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 useGetOrganisationSuspense<TData = Awaited<ReturnType<typeof getOrganisation>>, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
155
155
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisation>>, 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 Organisation.
|
|
161
|
+
* Used to update existing Organisation. You can change an Organisation's **name** or its **default_product_privacy**.
|
|
162
|
+
|
|
163
|
+
Changes to the default product privacy may conflict with those settings in any existing Units where the default product privacy of those existing units will be honoured. Any new Organisation value will only apply to new Units.
|
|
162
164
|
|
|
163
165
|
You have to be a member of the **Organisation**, its creator, or an administrator to patch an Organisation.
|
|
164
166
|
|
|
165
167
|
* @summary Adjust an existing Organisation
|
|
166
168
|
*/
|
|
167
169
|
declare const patchOrganisation: (orgId: string, organisationPatchBodyBody: OrganisationPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
168
|
-
declare const
|
|
169
|
-
mutation?: UseMutationOptions<
|
|
170
|
+
declare const usePatchOrganisationMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
171
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError, {
|
|
170
172
|
orgId: string;
|
|
171
173
|
data: OrganisationPatchBodyBody;
|
|
172
174
|
}, TContext>;
|
|
173
175
|
request?: SecondParameter<typeof customInstance>;
|
|
174
|
-
}) => UseMutationOptions<
|
|
176
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError, {
|
|
175
177
|
orgId: string;
|
|
176
178
|
data: OrganisationPatchBodyBody;
|
|
177
179
|
}, TContext>;
|
|
@@ -179,57 +181,57 @@ type PatchOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof pat
|
|
|
179
181
|
type PatchOrganisationMutationBody = OrganisationPatchBodyBody;
|
|
180
182
|
type PatchOrganisationMutationError = ErrorType<void | AsError>;
|
|
181
183
|
/**
|
|
182
|
-
* @summary Adjust an existing Organisation
|
|
183
|
-
*/
|
|
184
|
-
declare const usePatchOrganisation: <
|
|
185
|
-
mutation?: UseMutationOptions<
|
|
184
|
+
* @summary Adjust an existing Organisation
|
|
185
|
+
*/
|
|
186
|
+
declare const usePatchOrganisation: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
|
|
187
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof patchOrganisation>>, TError, {
|
|
186
188
|
orgId: string;
|
|
187
189
|
data: OrganisationPatchBodyBody;
|
|
188
190
|
}, TContext>;
|
|
189
191
|
request?: SecondParameter<typeof customInstance>;
|
|
190
|
-
}) => UseMutationResult<
|
|
192
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof patchOrganisation>>, TError, {
|
|
191
193
|
orgId: string;
|
|
192
194
|
data: OrganisationPatchBodyBody;
|
|
193
195
|
}, TContext>;
|
|
194
196
|
/**
|
|
195
|
-
* Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.
|
|
197
|
+
* Before an Organisation can be deleted all its underlying **Units** must also be deleted, remembering that **Units** that have undeleted **Products** cannot be deleted.
|
|
196
198
|
|
|
197
199
|
You need admin rights to use this method
|
|
198
200
|
|
|
199
|
-
* @summary Deletes an Organisation
|
|
200
|
-
*/
|
|
201
|
+
* @summary Deletes an Organisation
|
|
202
|
+
*/
|
|
201
203
|
declare const deleteOrganisation: (orgId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
|
|
202
|
-
declare const
|
|
203
|
-
mutation?: UseMutationOptions<
|
|
204
|
+
declare const useDeleteOrganisationMutationOptions: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
205
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError, {
|
|
204
206
|
orgId: string;
|
|
205
207
|
}, TContext>;
|
|
206
208
|
request?: SecondParameter<typeof customInstance>;
|
|
207
|
-
}) => UseMutationOptions<
|
|
209
|
+
}) => UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError, {
|
|
208
210
|
orgId: string;
|
|
209
211
|
}, TContext>;
|
|
210
212
|
type DeleteOrganisationMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisation>>>;
|
|
211
213
|
type DeleteOrganisationMutationError = ErrorType<AsError | void>;
|
|
212
214
|
/**
|
|
213
|
-
* @summary Deletes an Organisation
|
|
214
|
-
*/
|
|
215
|
-
declare const useDeleteOrganisation: <
|
|
216
|
-
mutation?: UseMutationOptions<
|
|
215
|
+
* @summary Deletes an Organisation
|
|
216
|
+
*/
|
|
217
|
+
declare const useDeleteOrganisation: <TError = ErrorType<AsError | void>, TContext = unknown>(options?: {
|
|
218
|
+
mutation?: UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisation>>, TError, {
|
|
217
219
|
orgId: string;
|
|
218
220
|
}, TContext>;
|
|
219
221
|
request?: SecondParameter<typeof customInstance>;
|
|
220
|
-
}) => UseMutationResult<
|
|
222
|
+
}, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof deleteOrganisation>>, TError, {
|
|
221
223
|
orgId: string;
|
|
222
224
|
}, TContext>;
|
|
223
225
|
/**
|
|
224
|
-
* Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.
|
|
226
|
+
* Gets the Default Organisation, a built-in Organisation used exclusively for **Personal Units**.
|
|
225
227
|
|
|
226
228
|
Any authorised user can see the Default Organisation.
|
|
227
229
|
|
|
228
|
-
* @summary Gets the Default Organisation
|
|
229
|
-
*/
|
|
230
|
+
* @summary Gets the Default Organisation
|
|
231
|
+
*/
|
|
230
232
|
declare const getDefaultOrganisation: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<OrganisationGetDefaultResponse>;
|
|
231
|
-
declare const getGetDefaultOrganisationQueryKey: () => readonly ["
|
|
232
|
-
declare const
|
|
233
|
+
declare const getGetDefaultOrganisationQueryKey: () => readonly ["/default/organisation"];
|
|
234
|
+
declare const useGetDefaultOrganisationQueryOptions: <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(options?: {
|
|
233
235
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>;
|
|
234
236
|
request?: SecondParameter<typeof customInstance>;
|
|
235
237
|
}) => UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & {
|
|
@@ -238,24 +240,24 @@ declare const getGetDefaultOrganisationQueryOptions: <TData = OrganisationGetDef
|
|
|
238
240
|
type GetDefaultOrganisationQueryResult = NonNullable<Awaited<ReturnType<typeof getDefaultOrganisation>>>;
|
|
239
241
|
type GetDefaultOrganisationQueryError = ErrorType<void | AsError>;
|
|
240
242
|
declare function useGetDefaultOrganisation<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(options: {
|
|
241
|
-
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError,
|
|
243
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, Awaited<ReturnType<typeof getDefaultOrganisation>>>, "initialData">;
|
|
242
244
|
request?: SecondParameter<typeof customInstance>;
|
|
243
|
-
}): DefinedUseQueryResult<TData, TError> & {
|
|
245
|
+
}, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
|
|
244
246
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
245
247
|
};
|
|
246
248
|
declare function useGetDefaultOrganisation<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(options?: {
|
|
247
|
-
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError,
|
|
249
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, Awaited<ReturnType<typeof getDefaultOrganisation>>>, "initialData">;
|
|
248
250
|
request?: SecondParameter<typeof customInstance>;
|
|
249
|
-
}): UseQueryResult<TData, TError> & {
|
|
251
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
250
252
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
251
253
|
};
|
|
252
254
|
declare function useGetDefaultOrganisation<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(options?: {
|
|
253
255
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>;
|
|
254
256
|
request?: SecondParameter<typeof customInstance>;
|
|
255
|
-
}): UseQueryResult<TData, TError> & {
|
|
257
|
+
}, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
|
|
256
258
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
257
259
|
};
|
|
258
|
-
declare const
|
|
260
|
+
declare const useGetDefaultOrganisationSuspenseQueryOptions: <TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(options?: {
|
|
259
261
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>;
|
|
260
262
|
request?: SecondParameter<typeof customInstance>;
|
|
261
263
|
}) => UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData> & {
|
|
@@ -266,20 +268,20 @@ type GetDefaultOrganisationSuspenseQueryError = ErrorType<void | AsError>;
|
|
|
266
268
|
declare function useGetDefaultOrganisationSuspense<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(options: {
|
|
267
269
|
query: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>;
|
|
268
270
|
request?: SecondParameter<typeof customInstance>;
|
|
269
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
271
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
270
272
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
271
273
|
};
|
|
272
274
|
declare function useGetDefaultOrganisationSuspense<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(options?: {
|
|
273
275
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>;
|
|
274
276
|
request?: SecondParameter<typeof customInstance>;
|
|
275
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
277
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
276
278
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
277
279
|
};
|
|
278
280
|
declare function useGetDefaultOrganisationSuspense<TData = Awaited<ReturnType<typeof getDefaultOrganisation>>, TError = ErrorType<void | AsError>>(options?: {
|
|
279
281
|
query?: Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDefaultOrganisation>>, TError, TData>>;
|
|
280
282
|
request?: SecondParameter<typeof customInstance>;
|
|
281
|
-
}): UseSuspenseQueryResult<TData, TError> & {
|
|
283
|
+
}, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError> & {
|
|
282
284
|
queryKey: DataTag<QueryKey, TData, TError>;
|
|
283
285
|
};
|
|
284
286
|
|
|
285
|
-
export { type CreateOrganisationMutationBody, type CreateOrganisationMutationError, type CreateOrganisationMutationResult, type DeleteOrganisationMutationError, type DeleteOrganisationMutationResult, type GetDefaultOrganisationQueryError, type GetDefaultOrganisationQueryResult, type GetDefaultOrganisationSuspenseQueryError, type GetDefaultOrganisationSuspenseQueryResult, type GetOrganisationQueryError, type GetOrganisationQueryResult, type GetOrganisationSuspenseQueryError, type GetOrganisationSuspenseQueryResult, type GetOrganisationsQueryError, type GetOrganisationsQueryResult, type GetOrganisationsSuspenseQueryError, type GetOrganisationsSuspenseQueryResult, type PatchOrganisationMutationBody, type PatchOrganisationMutationError, type PatchOrganisationMutationResult, createOrganisation, deleteOrganisation,
|
|
287
|
+
export { type CreateOrganisationMutationBody, type CreateOrganisationMutationError, type CreateOrganisationMutationResult, type DeleteOrganisationMutationError, type DeleteOrganisationMutationResult, type GetDefaultOrganisationQueryError, type GetDefaultOrganisationQueryResult, type GetDefaultOrganisationSuspenseQueryError, type GetDefaultOrganisationSuspenseQueryResult, type GetOrganisationQueryError, type GetOrganisationQueryResult, type GetOrganisationSuspenseQueryError, type GetOrganisationSuspenseQueryResult, type GetOrganisationsQueryError, type GetOrganisationsQueryResult, type GetOrganisationsSuspenseQueryError, type GetOrganisationsSuspenseQueryResult, type PatchOrganisationMutationBody, type PatchOrganisationMutationError, type PatchOrganisationMutationResult, createOrganisation, deleteOrganisation, getDefaultOrganisation, getGetDefaultOrganisationQueryKey, getGetOrganisationQueryKey, getGetOrganisationsQueryKey, getOrganisation, getOrganisations, patchOrganisation, useCreateOrganisation, useCreateOrganisationMutationOptions, useDeleteOrganisation, useDeleteOrganisationMutationOptions, useGetDefaultOrganisation, useGetDefaultOrganisationQueryOptions, useGetDefaultOrganisationSuspense, useGetDefaultOrganisationSuspenseQueryOptions, useGetOrganisation, useGetOrganisationQueryOptions, useGetOrganisationSuspense, useGetOrganisationSuspenseQueryOptions, useGetOrganisations, useGetOrganisationsQueryOptions, useGetOrganisationsSuspense, useGetOrganisationsSuspenseQueryOptions, usePatchOrganisation, usePatchOrganisationMutationOptions };
|