@squonk/account-server-client 2.1.0-rc.8 → 2.1.0
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/README.md +1 -1
- package/admin/admin.cjs +19 -4
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +23 -6
- package/admin/admin.d.ts +23 -6
- package/admin/admin.js +19 -4
- package/admin/admin.js.map +1 -1
- package/asset/asset.cjs +33 -18
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.d.cts +31 -14
- package/asset/asset.d.ts +31 -14
- package/asset/asset.js +25 -10
- package/asset/asset.js.map +1 -1
- package/{chunk-UKA7G3OB.js → chunk-EBOQPVLG.js} +2 -2
- package/{chunk-UKA7G3OB.js.map → chunk-EBOQPVLG.js.map} +1 -1
- package/{chunk-J22A7LHX.cjs → chunk-TKLTUR4R.cjs} +2 -2
- package/chunk-TKLTUR4R.cjs.map +1 -0
- package/event-stream/event-stream.cjs +39 -10
- package/event-stream/event-stream.cjs.map +1 -1
- package/event-stream/event-stream.d.cts +51 -17
- package/event-stream/event-stream.d.ts +51 -17
- package/event-stream/event-stream.js +36 -7
- package/event-stream/event-stream.js.map +1 -1
- package/index.cjs +2 -2
- package/index.cjs.map +1 -1
- package/index.d.cts +702 -2
- package/index.d.ts +702 -2
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/merchant/merchant.cjs +35 -6
- package/merchant/merchant.cjs.map +1 -1
- package/merchant/merchant.d.cts +42 -8
- package/merchant/merchant.d.ts +42 -8
- package/merchant/merchant.js +34 -5
- package/merchant/merchant.js.map +1 -1
- package/organisation/organisation.cjs +73 -16
- package/organisation/organisation.cjs.map +1 -1
- package/organisation/organisation.d.cts +84 -16
- package/organisation/organisation.d.ts +84 -16
- package/organisation/organisation.js +66 -9
- package/organisation/organisation.js.map +1 -1
- package/package.json +12 -12
- package/product/product.cjs +121 -22
- package/product/product.cjs.map +1 -1
- package/product/product.d.cts +141 -22
- package/product/product.d.ts +141 -22
- package/product/product.js +111 -12
- package/product/product.js.map +1 -1
- package/src/account-server-api.schemas.ts +4 -2
- package/src/admin/admin.ts +50 -14
- package/src/asset/asset.ts +57 -35
- package/src/custom-instance.ts +3 -4
- package/src/event-stream/event-stream.ts +100 -29
- package/src/merchant/merchant.ts +93 -18
- package/src/organisation/organisation.ts +184 -35
- package/src/product/product.ts +313 -47
- package/src/state/state.ts +50 -14
- package/src/unit/unit.ts +190 -45
- package/src/user/user.ts +140 -34
- package/state/state.cjs +19 -4
- package/state/state.cjs.map +1 -1
- package/state/state.d.cts +23 -6
- package/state/state.d.ts +23 -6
- package/state/state.js +19 -4
- package/state/state.js.map +1 -1
- package/unit/unit.cjs +77 -20
- package/unit/unit.cjs.map +1 -1
- package/unit/unit.d.cts +91 -23
- package/unit/unit.d.ts +91 -23
- package/unit/unit.js +68 -11
- package/unit/unit.js.map +1 -1
- package/user/user.cjs +59 -16
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +66 -15
- package/user/user.d.ts +66 -15
- package/user/user.js +53 -10
- package/user/user.js.map +1 -1
- package/chunk-J22A7LHX.cjs.map +0 -1
- package/custom-instance-6780910b.d.ts +0 -700
package/user/user.cjs
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkTKLTUR4Rcjs = require('../chunk-TKLTUR4R.cjs');
|
|
4
4
|
|
|
5
5
|
// src/user/user.ts
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
var _reactquery = require('@tanstack/react-query');
|
|
10
11
|
var getUserAccount = (options, signal) => {
|
|
11
|
-
return
|
|
12
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
12
13
|
{
|
|
13
14
|
url: `/user/account`,
|
|
14
|
-
method: "
|
|
15
|
+
method: "GET",
|
|
15
16
|
signal
|
|
16
17
|
},
|
|
17
18
|
options
|
|
@@ -32,11 +33,23 @@ var useGetUserAccount = (options) => {
|
|
|
32
33
|
query.queryKey = queryOptions.queryKey;
|
|
33
34
|
return query;
|
|
34
35
|
};
|
|
36
|
+
var getGetUserAccountSuspenseQueryOptions = (options) => {
|
|
37
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
38
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUserAccountQueryKey()));
|
|
39
|
+
const queryFn = ({ signal }) => getUserAccount(requestOptions, signal);
|
|
40
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
41
|
+
};
|
|
42
|
+
var useGetUserAccountSuspense = (options) => {
|
|
43
|
+
const queryOptions = getGetUserAccountSuspenseQueryOptions(options);
|
|
44
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
45
|
+
query.queryKey = queryOptions.queryKey;
|
|
46
|
+
return query;
|
|
47
|
+
};
|
|
35
48
|
var getOrganisationUsers = (orgId, options, signal) => {
|
|
36
|
-
return
|
|
49
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
37
50
|
{
|
|
38
51
|
url: `/organisation/${orgId}/user`,
|
|
39
|
-
method: "
|
|
52
|
+
method: "GET",
|
|
40
53
|
signal
|
|
41
54
|
},
|
|
42
55
|
options
|
|
@@ -57,11 +70,23 @@ var useGetOrganisationUsers = (orgId, options) => {
|
|
|
57
70
|
query.queryKey = queryOptions.queryKey;
|
|
58
71
|
return query;
|
|
59
72
|
};
|
|
73
|
+
var getGetOrganisationUsersSuspenseQueryOptions = (orgId, options) => {
|
|
74
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
75
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationUsersQueryKey(orgId)));
|
|
76
|
+
const queryFn = ({ signal }) => getOrganisationUsers(orgId, requestOptions, signal);
|
|
77
|
+
return { queryKey, queryFn, enabled: !!orgId, ...queryOptions };
|
|
78
|
+
};
|
|
79
|
+
var useGetOrganisationUsersSuspense = (orgId, options) => {
|
|
80
|
+
const queryOptions = getGetOrganisationUsersSuspenseQueryOptions(orgId, options);
|
|
81
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
82
|
+
query.queryKey = queryOptions.queryKey;
|
|
83
|
+
return query;
|
|
84
|
+
};
|
|
60
85
|
var addOrganisationUser = (orgId, userId, options) => {
|
|
61
|
-
return
|
|
86
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
62
87
|
{
|
|
63
88
|
url: `/organisation/${orgId}/user/${userId}`,
|
|
64
|
-
method: "
|
|
89
|
+
method: "PUT"
|
|
65
90
|
},
|
|
66
91
|
options
|
|
67
92
|
);
|
|
@@ -79,10 +104,10 @@ var useAddOrganisationUser = (options) => {
|
|
|
79
104
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
80
105
|
};
|
|
81
106
|
var deleteOrganisationUser = (orgId, userId, options) => {
|
|
82
|
-
return
|
|
107
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
83
108
|
{
|
|
84
109
|
url: `/organisation/${orgId}/user/${userId}`,
|
|
85
|
-
method: "
|
|
110
|
+
method: "DELETE"
|
|
86
111
|
},
|
|
87
112
|
options
|
|
88
113
|
);
|
|
@@ -100,10 +125,10 @@ var useDeleteOrganisationUser = (options) => {
|
|
|
100
125
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
101
126
|
};
|
|
102
127
|
var getOrganisationUnitUsers = (unitId, options, signal) => {
|
|
103
|
-
return
|
|
128
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
104
129
|
{
|
|
105
130
|
url: `/unit/${unitId}/user`,
|
|
106
|
-
method: "
|
|
131
|
+
method: "GET",
|
|
107
132
|
signal
|
|
108
133
|
},
|
|
109
134
|
options
|
|
@@ -124,11 +149,23 @@ var useGetOrganisationUnitUsers = (unitId, options) => {
|
|
|
124
149
|
query.queryKey = queryOptions.queryKey;
|
|
125
150
|
return query;
|
|
126
151
|
};
|
|
152
|
+
var getGetOrganisationUnitUsersSuspenseQueryOptions = (unitId, options) => {
|
|
153
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
154
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetOrganisationUnitUsersQueryKey(unitId)));
|
|
155
|
+
const queryFn = ({ signal }) => getOrganisationUnitUsers(unitId, requestOptions, signal);
|
|
156
|
+
return { queryKey, queryFn, enabled: !!unitId, ...queryOptions };
|
|
157
|
+
};
|
|
158
|
+
var useGetOrganisationUnitUsersSuspense = (unitId, options) => {
|
|
159
|
+
const queryOptions = getGetOrganisationUnitUsersSuspenseQueryOptions(unitId, options);
|
|
160
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
161
|
+
query.queryKey = queryOptions.queryKey;
|
|
162
|
+
return query;
|
|
163
|
+
};
|
|
127
164
|
var addOrganisationUnitUser = (unitId, userId, options) => {
|
|
128
|
-
return
|
|
165
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
129
166
|
{
|
|
130
167
|
url: `/unit/${unitId}/user/${userId}`,
|
|
131
|
-
method: "
|
|
168
|
+
method: "PUT"
|
|
132
169
|
},
|
|
133
170
|
options
|
|
134
171
|
);
|
|
@@ -146,10 +183,10 @@ var useAddOrganisationUnitUser = (options) => {
|
|
|
146
183
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
147
184
|
};
|
|
148
185
|
var deleteOrganisationUnitUser = (unitId, userId, options) => {
|
|
149
|
-
return
|
|
186
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
150
187
|
{
|
|
151
188
|
url: `/unit/${unitId}/user/${userId}`,
|
|
152
|
-
method: "
|
|
189
|
+
method: "DELETE"
|
|
153
190
|
},
|
|
154
191
|
options
|
|
155
192
|
);
|
|
@@ -191,5 +228,11 @@ var useDeleteOrganisationUnitUser = (options) => {
|
|
|
191
228
|
|
|
192
229
|
|
|
193
230
|
|
|
194
|
-
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
exports.addOrganisationUnitUser = addOrganisationUnitUser; exports.addOrganisationUser = addOrganisationUser; exports.deleteOrganisationUnitUser = deleteOrganisationUnitUser; exports.deleteOrganisationUser = deleteOrganisationUser; exports.getAddOrganisationUnitUserMutationOptions = getAddOrganisationUnitUserMutationOptions; exports.getAddOrganisationUserMutationOptions = getAddOrganisationUserMutationOptions; exports.getDeleteOrganisationUnitUserMutationOptions = getDeleteOrganisationUnitUserMutationOptions; exports.getDeleteOrganisationUserMutationOptions = getDeleteOrganisationUserMutationOptions; exports.getGetOrganisationUnitUsersQueryKey = getGetOrganisationUnitUsersQueryKey; exports.getGetOrganisationUnitUsersQueryOptions = getGetOrganisationUnitUsersQueryOptions; exports.getGetOrganisationUnitUsersSuspenseQueryOptions = getGetOrganisationUnitUsersSuspenseQueryOptions; exports.getGetOrganisationUsersQueryKey = getGetOrganisationUsersQueryKey; exports.getGetOrganisationUsersQueryOptions = getGetOrganisationUsersQueryOptions; exports.getGetOrganisationUsersSuspenseQueryOptions = getGetOrganisationUsersSuspenseQueryOptions; exports.getGetUserAccountQueryKey = getGetUserAccountQueryKey; exports.getGetUserAccountQueryOptions = getGetUserAccountQueryOptions; exports.getGetUserAccountSuspenseQueryOptions = getGetUserAccountSuspenseQueryOptions; exports.getOrganisationUnitUsers = getOrganisationUnitUsers; exports.getOrganisationUsers = getOrganisationUsers; exports.getUserAccount = getUserAccount; exports.useAddOrganisationUnitUser = useAddOrganisationUnitUser; exports.useAddOrganisationUser = useAddOrganisationUser; exports.useDeleteOrganisationUnitUser = useDeleteOrganisationUnitUser; exports.useDeleteOrganisationUser = useDeleteOrganisationUser; exports.useGetOrganisationUnitUsers = useGetOrganisationUnitUsers; exports.useGetOrganisationUnitUsersSuspense = useGetOrganisationUnitUsersSuspense; exports.useGetOrganisationUsers = useGetOrganisationUsers; exports.useGetOrganisationUsersSuspense = useGetOrganisationUsersSuspense; exports.useGetUserAccount = useGetUserAccount; exports.useGetUserAccountSuspense = useGetUserAccountSuspense;
|
|
195
238
|
//# sourceMappingURL=user.cjs.map
|
package/user/user.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/user/user.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAgCA,IAAM,iBAAiB,CAE7B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAiB,QAAQ;AAAA,MAAO;AAAA,IACxC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,4BAA4B,MAAM;AAE3C,SAAO,CAAC,sBAAsB,eAAe;AAC7C;AAGG,IAAM,gCAAgC,CAA0F,YAClI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,0BAA0B;AAIpE,QAAM,UAAqE,CAAC,EAAE,OAAO,MAAM,eAAe,gBAAgB,MAAM;AAMjI,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,oBAAoB,CAC/B,YAE8D;AAE9D,QAAM,eAAe,8BAA8B,OAAO;AAE1D,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAWO,IAAM,uBAAuB,CAChC,OACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,iBAAiB,KAAK;AAAA,MAAS,QAAQ;AAAA,MAAO;AAAA,IACtD;AAAA,IACE;AAAA,EAAO;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AAA,MAAI,QAAQ;AAAA,IAClD;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,4CAA4C,CAEjC,YACwG;AAC/H,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAqH,CAAC,UAAU;AAClI,UAAM,EAAC,QAAO,OAAM,IAAI,SAAS,CAAC;AAElC,WAAQ,wBAAwB,QAAO,QAAO,cAAc;AAAA,EAC9D;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,6BAA6B,CAElB,YACnB;AAEC,QAAM,kBAAkB,0CAA0C,OAAO;AAEzE,SAAO,YAAY,eAAe;AACpC;AAUG,IAAM,6BAA6B,CACtC,QACA,QACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,SAAS,MAAM,SAAS,MAAM;AAAA,MAAI,QAAQ;AAAA,IAClD;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,+CAA+C,CAEpC,YAC2G;AAClI,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAwH,CAAC,UAAU;AACrI,UAAM,EAAC,QAAO,OAAM,IAAI,SAAS,CAAC;AAElC,WAAQ,2BAA2B,QAAO,QAAO,cAAc;AAAA,EACjE;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,gCAAgC,CAErB,YACnB;AAEC,QAAM,kBAAkB,6CAA6C,OAAO;AAE5E,SAAO,YAAY,eAAe;AACpC","sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.1\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n UserAccountDetail,\n UsersGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * Returns a summary of your account\n\n * @summary Get information about your account\n */\nexport const getUserAccount = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UserAccountDetail>(\n {url: `/user/account`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetUserAccountQueryKey = () => {\n \n return [\"account-server-api\", `/user/account`] as const;\n }\n\n \nexport const getGetUserAccountQueryOptions = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) => getUserAccount(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUserAccountQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>\nexport type GetUserAccountQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Get information about your account\n */\nexport const useGetUserAccount = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUserAccountQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets Users in an Organisation.\n\nYou have to be a member of the Organisation or an admin user to use this endpoint\n\n * @summary Gets users in an Organisation\n */\nexport const getOrganisationUsers = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UsersGetResponse>(\n {url: `/organisation/${orgId}/user`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationUsersQueryKey = (orgId: string,) => {\n \n return [\"account-server-api\", `/organisation/${orgId}/user`] as const;\n }\n\n \nexport const getGetOrganisationUsersQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(orgId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUsersQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUsers>>> = ({ signal }) => getOrganisationUsers(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>\nexport type GetOrganisationUsersQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets users in an Organisation\n */\nexport const useGetOrganisationUsers = <TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(\n orgId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationUsersQueryOptions(orgId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Adds a User to an **Organisation**.\n\nYou have to be in the Organisation or an admin user to use this endpoint\n\n * @summary Adds a User to an Organisation\n */\nexport const addOrganisationUser = (\n orgId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}/user/${userId}`, method: 'put'\n },\n options);\n }\n \n\n\nexport const getAddOrganisationUserMutationOptions = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError,{orgId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addOrganisationUser>>, {orgId: string;userId: string}> = (props) => {\n const {orgId,userId} = props ?? {};\n\n return addOrganisationUser(orgId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUser>>>\n \n export type AddOrganisationUserMutationError = ErrorType<AsError>\n\n /**\n * @summary Adds a User to an Organisation\n */\nexport const useAddOrganisationUser = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddOrganisationUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Removes a User from an **Organisation**.\n\nYou have to be in the Organisation or an admin user to use this endpoint\n\n * @summary Deletes a User from an Organisation\n */\nexport const deleteOrganisationUser = (\n orgId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}/user/${userId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteOrganisationUserMutationOptions = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError,{orgId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteOrganisationUser>>, {orgId: string;userId: string}> = (props) => {\n const {orgId,userId} = props ?? {};\n\n return deleteOrganisationUser(orgId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUser>>>\n \n export type DeleteOrganisationUserMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes a User from an Organisation\n */\nexport const useDeleteOrganisationUser = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteOrganisationUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets users in an Organisational Unit.\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n * @summary Gets users in an Organisational Unit\n */\nexport const getOrganisationUnitUsers = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UsersGetResponse>(\n {url: `/unit/${unitId}/user`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationUnitUsersQueryKey = (unitId: string,) => {\n \n return [\"account-server-api\", `/unit/${unitId}/user`] as const;\n }\n\n \nexport const getGetOrganisationUnitUsersQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(unitId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitUsersQueryKey(unitId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnitUsers>>> = ({ signal }) => getOrganisationUnitUsers(unitId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationUnitUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>\nexport type GetOrganisationUnitUsersQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets users in an Organisational Unit\n */\nexport const useGetOrganisationUnitUsers = <TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(\n unitId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationUnitUsersQueryOptions(unitId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Adds a user to an Organisational Unit.\n\nUsers cannot be added to **Personal Units** (Units that are part of the ***Default** Organisation).\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n * @summary Adds a user to an Organisational Unit\n */\nexport const addOrganisationUnitUser = (\n unitId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/unit/${unitId}/user/${userId}`, method: 'put'\n },\n options);\n }\n \n\n\nexport const getAddOrganisationUnitUserMutationOptions = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addOrganisationUnitUser>>, {unitId: string;userId: string}> = (props) => {\n const {unitId,userId} = props ?? {};\n\n return addOrganisationUnitUser(unitId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUnitUser>>>\n \n export type AddOrganisationUnitUserMutationError = ErrorType<AsError>\n\n /**\n * @summary Adds a user to an Organisational Unit\n */\nexport const useAddOrganisationUnitUser = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddOrganisationUnitUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Removes a User from an Organisational Unit.\n\nUsers cannot be removed from **Personal Units** (Units that are part of the ***Default** Organisation).\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n * @summary Deletes a User from an Organisational Unit\n */\nexport const deleteOrganisationUnitUser = (\n unitId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/unit/${unitId}/user/${userId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteOrganisationUnitUserMutationOptions = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, {unitId: string;userId: string}> = (props) => {\n const {unitId,userId} = props ?? {};\n\n return deleteOrganisationUnitUser(unitId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>>\n \n export type DeleteOrganisationUnitUserMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes a User from an Organisational Unit\n */\nexport const useDeleteOrganisationUnitUser = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteOrganisationUnitUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "]}
|
|
1
|
+
{"version":3,"sources":["../../src/user/user.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA4BA,IAAM,iBAAiB,CAE7B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAiB,QAAQ;AAAA,MAAO;AAAA,IACxC;AAAA,IACE;AAAA,EAAO;AACT;A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SAAS,MAAM;AAAA,MAAI,QAAQ;AAAA,IAClD;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,+CAA+C,CACpC,YAC2G;AAClI,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAwH,CAAC,UAAU;AACrI,UAAM,EAAC,QAAO,OAAM,IAAI,SAAS,CAAC;AAElC,WAAQ,2BAA2B,QAAO,QAAO,cAAc;AAAA,EACjE;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,gCAAgC,CACrB,YACnB;AAEC,QAAM,kBAAkB,6CAA6C,OAAO;AAE5E,SAAO,YAAY,eAAe;AACpC","sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n UserAccountDetail,\n UsersGetResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Returns a summary of your account\n\n * @summary Get information about your account\n */\nexport const getUserAccount = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UserAccountDetail>(\n {url: `/user/account`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetUserAccountQueryKey = () => {\n return [\"account-server-api\", `/user/account`] as const;\n }\n\n \nexport const getGetUserAccountQueryOptions = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) => getUserAccount(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUserAccountQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>\nexport type GetUserAccountQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Get information about your account\n */\nexport const useGetUserAccount = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUserAccountQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetUserAccountSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) => getUserAccount(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUserAccountSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>\nexport type GetUserAccountSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Get information about your account\n */\nexport const useGetUserAccountSuspense = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserAccount>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUserAccountSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Gets Users in an Organisation.\n\nYou have to be a member of the Organisation or an admin user to use this endpoint\n\n * @summary Gets users in an Organisation\n */\nexport const getOrganisationUsers = (\n orgId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UsersGetResponse>(\n {url: `/organisation/${orgId}/user`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationUsersQueryKey = (orgId: string,) => {\n return [\"account-server-api\", `/organisation/${orgId}/user`] as const;\n }\n\n \nexport const getGetOrganisationUsersQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUsersQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUsers>>> = ({ signal }) => getOrganisationUsers(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>\nexport type GetOrganisationUsersQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets users in an Organisation\n */\nexport const useGetOrganisationUsers = <TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(\n orgId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationUsersQueryOptions(orgId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetOrganisationUsersSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUsersQueryKey(orgId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUsers>>> = ({ signal }) => getOrganisationUsers(orgId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(orgId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>\nexport type GetOrganisationUsersSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets users in an Organisation\n */\nexport const useGetOrganisationUsersSuspense = <TData = Awaited<ReturnType<typeof getOrganisationUsers>>, TError = ErrorType<AsError | void>>(\n orgId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationUsersSuspenseQueryOptions(orgId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Adds a User to an **Organisation**.\n\nYou have to be in the Organisation or an admin user to use this endpoint\n\n * @summary Adds a User to an Organisation\n */\nexport const addOrganisationUser = (\n orgId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}/user/${userId}`, method: 'PUT'\n },\n options);\n }\n \n\n\nexport const getAddOrganisationUserMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError,{orgId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addOrganisationUser>>, {orgId: string;userId: string}> = (props) => {\n const {orgId,userId} = props ?? {};\n\n return addOrganisationUser(orgId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUser>>>\n \n export type AddOrganisationUserMutationError = ErrorType<AsError>\n\n /**\n * @summary Adds a User to an Organisation\n */\nexport const useAddOrganisationUser = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddOrganisationUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Removes a User from an **Organisation**.\n\nYou have to be in the Organisation or an admin user to use this endpoint\n\n * @summary Deletes a User from an Organisation\n */\nexport const deleteOrganisationUser = (\n orgId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/organisation/${orgId}/user/${userId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteOrganisationUserMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError,{orgId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteOrganisationUser>>, {orgId: string;userId: string}> = (props) => {\n const {orgId,userId} = props ?? {};\n\n return deleteOrganisationUser(orgId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteOrganisationUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUser>>>\n \n export type DeleteOrganisationUserMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes a User from an Organisation\n */\nexport const useDeleteOrganisationUser = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUser>>, TError,{orgId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteOrganisationUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets users in an Organisational Unit.\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n * @summary Gets users in an Organisational Unit\n */\nexport const getOrganisationUnitUsers = (\n unitId: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UsersGetResponse>(\n {url: `/unit/${unitId}/user`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetOrganisationUnitUsersQueryKey = (unitId: string,) => {\n return [\"account-server-api\", `/unit/${unitId}/user`] as const;\n }\n\n \nexport const getGetOrganisationUnitUsersQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitUsersQueryKey(unitId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnitUsers>>> = ({ signal }) => getOrganisationUnitUsers(unitId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationUnitUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>\nexport type GetOrganisationUnitUsersQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets users in an Organisational Unit\n */\nexport const useGetOrganisationUnitUsers = <TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(\n unitId: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationUnitUsersQueryOptions(unitId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetOrganisationUnitUsersSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetOrganisationUnitUsersQueryKey(unitId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getOrganisationUnitUsers>>> = ({ signal }) => getOrganisationUnitUsers(unitId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(unitId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetOrganisationUnitUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>\nexport type GetOrganisationUnitUsersSuspenseQueryError = ErrorType<AsError | void>\n\n/**\n * @summary Gets users in an Organisational Unit\n */\nexport const useGetOrganisationUnitUsersSuspense = <TData = Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError = ErrorType<AsError | void>>(\n unitId: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getOrganisationUnitUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetOrganisationUnitUsersSuspenseQueryOptions(unitId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Adds a user to an Organisational Unit.\n\nUsers cannot be added to **Personal Units** (Units that are part of the ***Default** Organisation).\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n * @summary Adds a user to an Organisational Unit\n */\nexport const addOrganisationUnitUser = (\n unitId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/unit/${unitId}/user/${userId}`, method: 'PUT'\n },\n options);\n }\n \n\n\nexport const getAddOrganisationUnitUserMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addOrganisationUnitUser>>, {unitId: string;userId: string}> = (props) => {\n const {unitId,userId} = props ?? {};\n\n return addOrganisationUnitUser(unitId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof addOrganisationUnitUser>>>\n \n export type AddOrganisationUnitUserMutationError = ErrorType<AsError>\n\n /**\n * @summary Adds a user to an Organisational Unit\n */\nexport const useAddOrganisationUnitUser = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddOrganisationUnitUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Removes a User from an Organisational Unit.\n\nUsers cannot be removed from **Personal Units** (Units that are part of the ***Default** Organisation).\n\nYou have to be in the Organisation or Unit or an Admin user to use this endpoint\n\n * @summary Deletes a User from an Organisational Unit\n */\nexport const deleteOrganisationUnitUser = (\n unitId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/unit/${unitId}/user/${userId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteOrganisationUnitUserMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, {unitId: string;userId: string}> = (props) => {\n const {unitId,userId} = props ?? {};\n\n return deleteOrganisationUnitUser(unitId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteOrganisationUnitUserMutationResult = NonNullable<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>>\n \n export type DeleteOrganisationUnitUserMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes a User from an Organisational Unit\n */\nexport const useDeleteOrganisationUnitUser = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteOrganisationUnitUser>>, TError,{unitId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteOrganisationUnitUserMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "]}
|
package/user/user.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
1
|
+
import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
|
|
2
|
+
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
+
import { customInstance, UserAccountDetail, ErrorType, AsError, UsersGetResponse } from '../index.cjs';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
|
-
type SecondParameter<T extends (...args: any) => any> = T
|
|
6
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
7
7
|
/**
|
|
8
8
|
* Returns a summary of your account
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ type SecondParameter<T extends (...args: any) => any> = T extends (config: any,
|
|
|
12
12
|
declare const getUserAccount: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UserAccountDetail>;
|
|
13
13
|
declare const getGetUserAccountQueryKey: () => readonly ["account-server-api", "/user/account"];
|
|
14
14
|
declare const getGetUserAccountQueryOptions: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
|
|
15
|
-
query?: UseQueryOptions<UserAccountDetail, TError, TData, QueryKey
|
|
15
|
+
query?: Partial<UseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
16
16
|
request?: SecondParameter<typeof customInstance>;
|
|
17
17
|
} | undefined) => UseQueryOptions<UserAccountDetail, TError, TData, QueryKey> & {
|
|
18
18
|
queryKey: QueryKey;
|
|
@@ -23,11 +23,28 @@ type GetUserAccountQueryError = ErrorType<void | AsError>;
|
|
|
23
23
|
* @summary Get information about your account
|
|
24
24
|
*/
|
|
25
25
|
declare const useGetUserAccount: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
|
|
26
|
-
query?: UseQueryOptions<UserAccountDetail, TError, TData, QueryKey
|
|
26
|
+
query?: Partial<UseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
27
27
|
request?: SecondParameter<typeof customInstance>;
|
|
28
28
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
29
29
|
queryKey: QueryKey;
|
|
30
30
|
};
|
|
31
|
+
declare const getGetUserAccountSuspenseQueryOptions: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
|
|
32
|
+
query?: Partial<UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
33
|
+
request?: SecondParameter<typeof customInstance>;
|
|
34
|
+
} | undefined) => UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey> & {
|
|
35
|
+
queryKey: QueryKey;
|
|
36
|
+
};
|
|
37
|
+
type GetUserAccountSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>;
|
|
38
|
+
type GetUserAccountSuspenseQueryError = ErrorType<void | AsError>;
|
|
39
|
+
/**
|
|
40
|
+
* @summary Get information about your account
|
|
41
|
+
*/
|
|
42
|
+
declare const useGetUserAccountSuspense: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
|
|
43
|
+
query?: Partial<UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
44
|
+
request?: SecondParameter<typeof customInstance>;
|
|
45
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
46
|
+
queryKey: QueryKey;
|
|
47
|
+
};
|
|
31
48
|
/**
|
|
32
49
|
* Gets Users in an Organisation.
|
|
33
50
|
|
|
@@ -38,7 +55,7 @@ You have to be a member of the Organisation or an admin user to use this endpoin
|
|
|
38
55
|
declare const getOrganisationUsers: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UsersGetResponse>;
|
|
39
56
|
declare const getGetOrganisationUsersQueryKey: (orgId: string) => readonly ["account-server-api", `/organisation/${string}/user`];
|
|
40
57
|
declare const getGetOrganisationUsersQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
41
|
-
query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey
|
|
58
|
+
query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
42
59
|
request?: SecondParameter<typeof customInstance>;
|
|
43
60
|
} | undefined) => UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
|
|
44
61
|
queryKey: QueryKey;
|
|
@@ -49,11 +66,28 @@ type GetOrganisationUsersQueryError = ErrorType<AsError | void>;
|
|
|
49
66
|
* @summary Gets users in an Organisation
|
|
50
67
|
*/
|
|
51
68
|
declare const useGetOrganisationUsers: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
52
|
-
query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey
|
|
69
|
+
query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
53
70
|
request?: SecondParameter<typeof customInstance>;
|
|
54
71
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
55
72
|
queryKey: QueryKey;
|
|
56
73
|
};
|
|
74
|
+
declare const getGetOrganisationUsersSuspenseQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
75
|
+
query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
76
|
+
request?: SecondParameter<typeof customInstance>;
|
|
77
|
+
} | undefined) => UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
|
|
78
|
+
queryKey: QueryKey;
|
|
79
|
+
};
|
|
80
|
+
type GetOrganisationUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>;
|
|
81
|
+
type GetOrganisationUsersSuspenseQueryError = ErrorType<AsError | void>;
|
|
82
|
+
/**
|
|
83
|
+
* @summary Gets users in an Organisation
|
|
84
|
+
*/
|
|
85
|
+
declare const useGetOrganisationUsersSuspense: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
86
|
+
query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
87
|
+
request?: SecondParameter<typeof customInstance>;
|
|
88
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
89
|
+
queryKey: QueryKey;
|
|
90
|
+
};
|
|
57
91
|
/**
|
|
58
92
|
* Adds a User to an **Organisation**.
|
|
59
93
|
|
|
@@ -83,7 +117,7 @@ declare const useAddOrganisationUser: <TError = ErrorType<AsError>, TContext = u
|
|
|
83
117
|
userId: string;
|
|
84
118
|
}, TContext> | undefined;
|
|
85
119
|
request?: SecondParameter<typeof customInstance>;
|
|
86
|
-
} | undefined) =>
|
|
120
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
87
121
|
orgId: string;
|
|
88
122
|
userId: string;
|
|
89
123
|
}, TContext>;
|
|
@@ -116,7 +150,7 @@ declare const useDeleteOrganisationUser: <TError = ErrorType<AsError>, TContext
|
|
|
116
150
|
userId: string;
|
|
117
151
|
}, TContext> | undefined;
|
|
118
152
|
request?: SecondParameter<typeof customInstance>;
|
|
119
|
-
} | undefined) =>
|
|
153
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
120
154
|
orgId: string;
|
|
121
155
|
userId: string;
|
|
122
156
|
}, TContext>;
|
|
@@ -130,7 +164,7 @@ You have to be in the Organisation or Unit or an Admin user to use this endpoint
|
|
|
130
164
|
declare const getOrganisationUnitUsers: (unitId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UsersGetResponse>;
|
|
131
165
|
declare const getGetOrganisationUnitUsersQueryKey: (unitId: string) => readonly ["account-server-api", `/unit/${string}/user`];
|
|
132
166
|
declare const getGetOrganisationUnitUsersQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
133
|
-
query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey
|
|
167
|
+
query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
134
168
|
request?: SecondParameter<typeof customInstance>;
|
|
135
169
|
} | undefined) => UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
|
|
136
170
|
queryKey: QueryKey;
|
|
@@ -141,11 +175,28 @@ type GetOrganisationUnitUsersQueryError = ErrorType<AsError | void>;
|
|
|
141
175
|
* @summary Gets users in an Organisational Unit
|
|
142
176
|
*/
|
|
143
177
|
declare const useGetOrganisationUnitUsers: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
144
|
-
query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey
|
|
178
|
+
query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
145
179
|
request?: SecondParameter<typeof customInstance>;
|
|
146
180
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
147
181
|
queryKey: QueryKey;
|
|
148
182
|
};
|
|
183
|
+
declare const getGetOrganisationUnitUsersSuspenseQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
184
|
+
query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
185
|
+
request?: SecondParameter<typeof customInstance>;
|
|
186
|
+
} | undefined) => UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
|
|
187
|
+
queryKey: QueryKey;
|
|
188
|
+
};
|
|
189
|
+
type GetOrganisationUnitUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>;
|
|
190
|
+
type GetOrganisationUnitUsersSuspenseQueryError = ErrorType<AsError | void>;
|
|
191
|
+
/**
|
|
192
|
+
* @summary Gets users in an Organisational Unit
|
|
193
|
+
*/
|
|
194
|
+
declare const useGetOrganisationUnitUsersSuspense: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
195
|
+
query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
196
|
+
request?: SecondParameter<typeof customInstance>;
|
|
197
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
198
|
+
queryKey: QueryKey;
|
|
199
|
+
};
|
|
149
200
|
/**
|
|
150
201
|
* Adds a user to an Organisational Unit.
|
|
151
202
|
|
|
@@ -177,7 +228,7 @@ declare const useAddOrganisationUnitUser: <TError = ErrorType<AsError>, TContext
|
|
|
177
228
|
userId: string;
|
|
178
229
|
}, TContext> | undefined;
|
|
179
230
|
request?: SecondParameter<typeof customInstance>;
|
|
180
|
-
} | undefined) =>
|
|
231
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
181
232
|
unitId: string;
|
|
182
233
|
userId: string;
|
|
183
234
|
}, TContext>;
|
|
@@ -212,9 +263,9 @@ declare const useDeleteOrganisationUnitUser: <TError = ErrorType<AsError>, TCont
|
|
|
212
263
|
userId: string;
|
|
213
264
|
}, TContext> | undefined;
|
|
214
265
|
request?: SecondParameter<typeof customInstance>;
|
|
215
|
-
} | undefined) =>
|
|
266
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
216
267
|
unitId: string;
|
|
217
268
|
userId: string;
|
|
218
269
|
}, TContext>;
|
|
219
270
|
|
|
220
|
-
export { AddOrganisationUnitUserMutationError, AddOrganisationUnitUserMutationResult, AddOrganisationUserMutationError, AddOrganisationUserMutationResult, DeleteOrganisationUnitUserMutationError, DeleteOrganisationUnitUserMutationResult, DeleteOrganisationUserMutationError, DeleteOrganisationUserMutationResult, GetOrganisationUnitUsersQueryError, GetOrganisationUnitUsersQueryResult, GetOrganisationUsersQueryError, GetOrganisationUsersQueryResult, GetUserAccountQueryError, GetUserAccountQueryResult, addOrganisationUnitUser, addOrganisationUser, deleteOrganisationUnitUser, deleteOrganisationUser, getAddOrganisationUnitUserMutationOptions, getAddOrganisationUserMutationOptions, getDeleteOrganisationUnitUserMutationOptions, getDeleteOrganisationUserMutationOptions, getGetOrganisationUnitUsersQueryKey, getGetOrganisationUnitUsersQueryOptions, getGetOrganisationUsersQueryKey, getGetOrganisationUsersQueryOptions, getGetUserAccountQueryKey, getGetUserAccountQueryOptions, getOrganisationUnitUsers, getOrganisationUsers, getUserAccount, useAddOrganisationUnitUser, useAddOrganisationUser, useDeleteOrganisationUnitUser, useDeleteOrganisationUser, useGetOrganisationUnitUsers, useGetOrganisationUsers, useGetUserAccount };
|
|
271
|
+
export { type AddOrganisationUnitUserMutationError, type AddOrganisationUnitUserMutationResult, type AddOrganisationUserMutationError, type AddOrganisationUserMutationResult, type DeleteOrganisationUnitUserMutationError, type DeleteOrganisationUnitUserMutationResult, type DeleteOrganisationUserMutationError, type DeleteOrganisationUserMutationResult, type GetOrganisationUnitUsersQueryError, type GetOrganisationUnitUsersQueryResult, type GetOrganisationUnitUsersSuspenseQueryError, type GetOrganisationUnitUsersSuspenseQueryResult, type GetOrganisationUsersQueryError, type GetOrganisationUsersQueryResult, type GetOrganisationUsersSuspenseQueryError, type GetOrganisationUsersSuspenseQueryResult, type GetUserAccountQueryError, type GetUserAccountQueryResult, type GetUserAccountSuspenseQueryError, type GetUserAccountSuspenseQueryResult, addOrganisationUnitUser, addOrganisationUser, deleteOrganisationUnitUser, deleteOrganisationUser, getAddOrganisationUnitUserMutationOptions, getAddOrganisationUserMutationOptions, getDeleteOrganisationUnitUserMutationOptions, getDeleteOrganisationUserMutationOptions, getGetOrganisationUnitUsersQueryKey, getGetOrganisationUnitUsersQueryOptions, getGetOrganisationUnitUsersSuspenseQueryOptions, getGetOrganisationUsersQueryKey, getGetOrganisationUsersQueryOptions, getGetOrganisationUsersSuspenseQueryOptions, getGetUserAccountQueryKey, getGetUserAccountQueryOptions, getGetUserAccountSuspenseQueryOptions, getOrganisationUnitUsers, getOrganisationUsers, getUserAccount, useAddOrganisationUnitUser, useAddOrganisationUser, useDeleteOrganisationUnitUser, useDeleteOrganisationUser, useGetOrganisationUnitUsers, useGetOrganisationUnitUsersSuspense, useGetOrganisationUsers, useGetOrganisationUsersSuspense, useGetUserAccount, useGetUserAccountSuspense };
|
package/user/user.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
1
|
+
import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
|
|
2
|
+
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
|
|
3
|
+
import { customInstance, UserAccountDetail, ErrorType, AsError, UsersGetResponse } from '../index.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
|
-
type SecondParameter<T extends (...args: any) => any> = T
|
|
6
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
7
7
|
/**
|
|
8
8
|
* Returns a summary of your account
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ type SecondParameter<T extends (...args: any) => any> = T extends (config: any,
|
|
|
12
12
|
declare const getUserAccount: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UserAccountDetail>;
|
|
13
13
|
declare const getGetUserAccountQueryKey: () => readonly ["account-server-api", "/user/account"];
|
|
14
14
|
declare const getGetUserAccountQueryOptions: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
|
|
15
|
-
query?: UseQueryOptions<UserAccountDetail, TError, TData, QueryKey
|
|
15
|
+
query?: Partial<UseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
16
16
|
request?: SecondParameter<typeof customInstance>;
|
|
17
17
|
} | undefined) => UseQueryOptions<UserAccountDetail, TError, TData, QueryKey> & {
|
|
18
18
|
queryKey: QueryKey;
|
|
@@ -23,11 +23,28 @@ type GetUserAccountQueryError = ErrorType<void | AsError>;
|
|
|
23
23
|
* @summary Get information about your account
|
|
24
24
|
*/
|
|
25
25
|
declare const useGetUserAccount: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
|
|
26
|
-
query?: UseQueryOptions<UserAccountDetail, TError, TData, QueryKey
|
|
26
|
+
query?: Partial<UseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
27
27
|
request?: SecondParameter<typeof customInstance>;
|
|
28
28
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
29
29
|
queryKey: QueryKey;
|
|
30
30
|
};
|
|
31
|
+
declare const getGetUserAccountSuspenseQueryOptions: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
|
|
32
|
+
query?: Partial<UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
33
|
+
request?: SecondParameter<typeof customInstance>;
|
|
34
|
+
} | undefined) => UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey> & {
|
|
35
|
+
queryKey: QueryKey;
|
|
36
|
+
};
|
|
37
|
+
type GetUserAccountSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>;
|
|
38
|
+
type GetUserAccountSuspenseQueryError = ErrorType<void | AsError>;
|
|
39
|
+
/**
|
|
40
|
+
* @summary Get information about your account
|
|
41
|
+
*/
|
|
42
|
+
declare const useGetUserAccountSuspense: <TData = UserAccountDetail, TError = ErrorType<void | AsError>>(options?: {
|
|
43
|
+
query?: Partial<UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
44
|
+
request?: SecondParameter<typeof customInstance>;
|
|
45
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
46
|
+
queryKey: QueryKey;
|
|
47
|
+
};
|
|
31
48
|
/**
|
|
32
49
|
* Gets Users in an Organisation.
|
|
33
50
|
|
|
@@ -38,7 +55,7 @@ You have to be a member of the Organisation or an admin user to use this endpoin
|
|
|
38
55
|
declare const getOrganisationUsers: (orgId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UsersGetResponse>;
|
|
39
56
|
declare const getGetOrganisationUsersQueryKey: (orgId: string) => readonly ["account-server-api", `/organisation/${string}/user`];
|
|
40
57
|
declare const getGetOrganisationUsersQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
41
|
-
query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey
|
|
58
|
+
query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
42
59
|
request?: SecondParameter<typeof customInstance>;
|
|
43
60
|
} | undefined) => UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
|
|
44
61
|
queryKey: QueryKey;
|
|
@@ -49,11 +66,28 @@ type GetOrganisationUsersQueryError = ErrorType<AsError | void>;
|
|
|
49
66
|
* @summary Gets users in an Organisation
|
|
50
67
|
*/
|
|
51
68
|
declare const useGetOrganisationUsers: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
52
|
-
query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey
|
|
69
|
+
query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
53
70
|
request?: SecondParameter<typeof customInstance>;
|
|
54
71
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
55
72
|
queryKey: QueryKey;
|
|
56
73
|
};
|
|
74
|
+
declare const getGetOrganisationUsersSuspenseQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
75
|
+
query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
76
|
+
request?: SecondParameter<typeof customInstance>;
|
|
77
|
+
} | undefined) => UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
|
|
78
|
+
queryKey: QueryKey;
|
|
79
|
+
};
|
|
80
|
+
type GetOrganisationUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUsers>>>;
|
|
81
|
+
type GetOrganisationUsersSuspenseQueryError = ErrorType<AsError | void>;
|
|
82
|
+
/**
|
|
83
|
+
* @summary Gets users in an Organisation
|
|
84
|
+
*/
|
|
85
|
+
declare const useGetOrganisationUsersSuspense: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(orgId: string, options?: {
|
|
86
|
+
query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
87
|
+
request?: SecondParameter<typeof customInstance>;
|
|
88
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
89
|
+
queryKey: QueryKey;
|
|
90
|
+
};
|
|
57
91
|
/**
|
|
58
92
|
* Adds a User to an **Organisation**.
|
|
59
93
|
|
|
@@ -83,7 +117,7 @@ declare const useAddOrganisationUser: <TError = ErrorType<AsError>, TContext = u
|
|
|
83
117
|
userId: string;
|
|
84
118
|
}, TContext> | undefined;
|
|
85
119
|
request?: SecondParameter<typeof customInstance>;
|
|
86
|
-
} | undefined) =>
|
|
120
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
87
121
|
orgId: string;
|
|
88
122
|
userId: string;
|
|
89
123
|
}, TContext>;
|
|
@@ -116,7 +150,7 @@ declare const useDeleteOrganisationUser: <TError = ErrorType<AsError>, TContext
|
|
|
116
150
|
userId: string;
|
|
117
151
|
}, TContext> | undefined;
|
|
118
152
|
request?: SecondParameter<typeof customInstance>;
|
|
119
|
-
} | undefined) =>
|
|
153
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
120
154
|
orgId: string;
|
|
121
155
|
userId: string;
|
|
122
156
|
}, TContext>;
|
|
@@ -130,7 +164,7 @@ You have to be in the Organisation or Unit or an Admin user to use this endpoint
|
|
|
130
164
|
declare const getOrganisationUnitUsers: (unitId: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UsersGetResponse>;
|
|
131
165
|
declare const getGetOrganisationUnitUsersQueryKey: (unitId: string) => readonly ["account-server-api", `/unit/${string}/user`];
|
|
132
166
|
declare const getGetOrganisationUnitUsersQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
133
|
-
query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey
|
|
167
|
+
query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
134
168
|
request?: SecondParameter<typeof customInstance>;
|
|
135
169
|
} | undefined) => UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
|
|
136
170
|
queryKey: QueryKey;
|
|
@@ -141,11 +175,28 @@ type GetOrganisationUnitUsersQueryError = ErrorType<AsError | void>;
|
|
|
141
175
|
* @summary Gets users in an Organisational Unit
|
|
142
176
|
*/
|
|
143
177
|
declare const useGetOrganisationUnitUsers: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
144
|
-
query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey
|
|
178
|
+
query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
145
179
|
request?: SecondParameter<typeof customInstance>;
|
|
146
180
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
147
181
|
queryKey: QueryKey;
|
|
148
182
|
};
|
|
183
|
+
declare const getGetOrganisationUnitUsersSuspenseQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
184
|
+
query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
185
|
+
request?: SecondParameter<typeof customInstance>;
|
|
186
|
+
} | undefined) => UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
|
|
187
|
+
queryKey: QueryKey;
|
|
188
|
+
};
|
|
189
|
+
type GetOrganisationUnitUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getOrganisationUnitUsers>>>;
|
|
190
|
+
type GetOrganisationUnitUsersSuspenseQueryError = ErrorType<AsError | void>;
|
|
191
|
+
/**
|
|
192
|
+
* @summary Gets users in an Organisational Unit
|
|
193
|
+
*/
|
|
194
|
+
declare const useGetOrganisationUnitUsersSuspense: <TData = UsersGetResponse, TError = ErrorType<void | AsError>>(unitId: string, options?: {
|
|
195
|
+
query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
196
|
+
request?: SecondParameter<typeof customInstance>;
|
|
197
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
198
|
+
queryKey: QueryKey;
|
|
199
|
+
};
|
|
149
200
|
/**
|
|
150
201
|
* Adds a user to an Organisational Unit.
|
|
151
202
|
|
|
@@ -177,7 +228,7 @@ declare const useAddOrganisationUnitUser: <TError = ErrorType<AsError>, TContext
|
|
|
177
228
|
userId: string;
|
|
178
229
|
}, TContext> | undefined;
|
|
179
230
|
request?: SecondParameter<typeof customInstance>;
|
|
180
|
-
} | undefined) =>
|
|
231
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
181
232
|
unitId: string;
|
|
182
233
|
userId: string;
|
|
183
234
|
}, TContext>;
|
|
@@ -212,9 +263,9 @@ declare const useDeleteOrganisationUnitUser: <TError = ErrorType<AsError>, TCont
|
|
|
212
263
|
userId: string;
|
|
213
264
|
}, TContext> | undefined;
|
|
214
265
|
request?: SecondParameter<typeof customInstance>;
|
|
215
|
-
} | undefined) =>
|
|
266
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
216
267
|
unitId: string;
|
|
217
268
|
userId: string;
|
|
218
269
|
}, TContext>;
|
|
219
270
|
|
|
220
|
-
export { AddOrganisationUnitUserMutationError, AddOrganisationUnitUserMutationResult, AddOrganisationUserMutationError, AddOrganisationUserMutationResult, DeleteOrganisationUnitUserMutationError, DeleteOrganisationUnitUserMutationResult, DeleteOrganisationUserMutationError, DeleteOrganisationUserMutationResult, GetOrganisationUnitUsersQueryError, GetOrganisationUnitUsersQueryResult, GetOrganisationUsersQueryError, GetOrganisationUsersQueryResult, GetUserAccountQueryError, GetUserAccountQueryResult, addOrganisationUnitUser, addOrganisationUser, deleteOrganisationUnitUser, deleteOrganisationUser, getAddOrganisationUnitUserMutationOptions, getAddOrganisationUserMutationOptions, getDeleteOrganisationUnitUserMutationOptions, getDeleteOrganisationUserMutationOptions, getGetOrganisationUnitUsersQueryKey, getGetOrganisationUnitUsersQueryOptions, getGetOrganisationUsersQueryKey, getGetOrganisationUsersQueryOptions, getGetUserAccountQueryKey, getGetUserAccountQueryOptions, getOrganisationUnitUsers, getOrganisationUsers, getUserAccount, useAddOrganisationUnitUser, useAddOrganisationUser, useDeleteOrganisationUnitUser, useDeleteOrganisationUser, useGetOrganisationUnitUsers, useGetOrganisationUsers, useGetUserAccount };
|
|
271
|
+
export { type AddOrganisationUnitUserMutationError, type AddOrganisationUnitUserMutationResult, type AddOrganisationUserMutationError, type AddOrganisationUserMutationResult, type DeleteOrganisationUnitUserMutationError, type DeleteOrganisationUnitUserMutationResult, type DeleteOrganisationUserMutationError, type DeleteOrganisationUserMutationResult, type GetOrganisationUnitUsersQueryError, type GetOrganisationUnitUsersQueryResult, type GetOrganisationUnitUsersSuspenseQueryError, type GetOrganisationUnitUsersSuspenseQueryResult, type GetOrganisationUsersQueryError, type GetOrganisationUsersQueryResult, type GetOrganisationUsersSuspenseQueryError, type GetOrganisationUsersSuspenseQueryResult, type GetUserAccountQueryError, type GetUserAccountQueryResult, type GetUserAccountSuspenseQueryError, type GetUserAccountSuspenseQueryResult, addOrganisationUnitUser, addOrganisationUser, deleteOrganisationUnitUser, deleteOrganisationUser, getAddOrganisationUnitUserMutationOptions, getAddOrganisationUserMutationOptions, getDeleteOrganisationUnitUserMutationOptions, getDeleteOrganisationUserMutationOptions, getGetOrganisationUnitUsersQueryKey, getGetOrganisationUnitUsersQueryOptions, getGetOrganisationUnitUsersSuspenseQueryOptions, getGetOrganisationUsersQueryKey, getGetOrganisationUsersQueryOptions, getGetOrganisationUsersSuspenseQueryOptions, getGetUserAccountQueryKey, getGetUserAccountQueryOptions, getGetUserAccountSuspenseQueryOptions, getOrganisationUnitUsers, getOrganisationUsers, getUserAccount, useAddOrganisationUnitUser, useAddOrganisationUser, useDeleteOrganisationUnitUser, useDeleteOrganisationUser, useGetOrganisationUnitUsers, useGetOrganisationUnitUsersSuspense, useGetOrganisationUsers, useGetOrganisationUsersSuspense, useGetUserAccount, useGetUserAccountSuspense };
|