@squonk/account-server-client 0.1.7-rc.1 → 0.1.8-rc.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/{custom-instance-0d593da2.d.ts → custom-instance-cc5da68e.d.ts} +12 -5
- package/index.cjs +103 -2
- package/index.cjs.map +3 -3
- package/index.d.ts +1 -1
- package/index.js +69 -2
- package/index.js.map +3 -3
- package/organisation/organisation.cjs +111 -2
- package/organisation/organisation.cjs.map +3 -3
- package/organisation/organisation.d.ts +19 -5
- package/organisation/organisation.js +83 -2
- package/organisation/organisation.js.map +3 -3
- package/organisation/package.json +2 -1
- package/package.json +7 -7
- package/product/package.json +2 -1
- package/product/product.cjs +161 -2
- package/product/product.cjs.map +3 -3
- package/product/product.d.ts +2 -2
- package/product/product.js +127 -2
- package/product/product.js.map +3 -3
- package/src/account-server-api.schemas.ts +278 -0
- package/src/custom-instance.ts +52 -0
- package/src/index.ts +6 -0
- package/src/organisation/organisation.ts +181 -0
- package/src/product/product.ts +289 -0
- package/src/unit/unit.ts +322 -0
- package/src/user/user.ts +340 -0
- package/unit/package.json +2 -1
- package/unit/unit.cjs +168 -2
- package/unit/unit.cjs.map +3 -3
- package/unit/unit.d.ts +52 -3
- package/unit/unit.js +133 -2
- package/unit/unit.js.map +3 -3
- package/user/package.json +2 -1
- package/user/user.cjs +176 -2
- package/user/user.cjs.map +3 -3
- package/user/user.d.ts +7 -7
- package/user/user.js +141 -2
- package/user/user.js.map +3 -3
- package/chunk-33VR3IML.js +0 -2
- package/chunk-33VR3IML.js.map +0 -7
- package/chunk-3KO3PKBX.cjs +0 -2
- package/chunk-3KO3PKBX.cjs.map +0 -7
package/unit/unit.js
CHANGED
|
@@ -1,2 +1,133 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
|
|
21
|
+
// src/unit/unit.ts
|
|
22
|
+
import {
|
|
23
|
+
useQuery,
|
|
24
|
+
useMutation
|
|
25
|
+
} from "react-query";
|
|
26
|
+
|
|
27
|
+
// src/custom-instance.ts
|
|
28
|
+
import Axios from "axios";
|
|
29
|
+
var AXIOS_INSTANCE = Axios.create({ baseURL: "" });
|
|
30
|
+
var customInstance = (config, options) => {
|
|
31
|
+
const source = Axios.CancelToken.source();
|
|
32
|
+
const promise = AXIOS_INSTANCE(__spreadProps(__spreadValues(__spreadValues({}, config), options), { cancelToken: source.token })).then(({ data }) => data);
|
|
33
|
+
promise.cancel = () => {
|
|
34
|
+
source.cancel("Query was cancelled by React Query");
|
|
35
|
+
};
|
|
36
|
+
return promise;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/unit/unit.ts
|
|
40
|
+
var getOrganisationUnits = (orgid, options) => {
|
|
41
|
+
return customInstance({ url: `/organisation/${orgid}/unit`, method: "get" }, options);
|
|
42
|
+
};
|
|
43
|
+
var getGetOrganisationUnitsQueryKey = (orgid) => [
|
|
44
|
+
`/organisation/${orgid}/unit`
|
|
45
|
+
];
|
|
46
|
+
var useGetOrganisationUnits = (orgid, options) => {
|
|
47
|
+
const { query: queryOptions, request: requestOptions } = options || {};
|
|
48
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetOrganisationUnitsQueryKey(orgid);
|
|
49
|
+
const queryFn = () => getOrganisationUnits(orgid, requestOptions);
|
|
50
|
+
const query = useQuery(queryKey, queryFn, __spreadValues({ enabled: !!orgid }, queryOptions));
|
|
51
|
+
return __spreadValues({
|
|
52
|
+
queryKey
|
|
53
|
+
}, query);
|
|
54
|
+
};
|
|
55
|
+
var createOrganisationUnit = (orgid, organisationUnitPostBodyBody, options) => {
|
|
56
|
+
return customInstance({
|
|
57
|
+
url: `/organisation/${orgid}/unit`,
|
|
58
|
+
method: "post",
|
|
59
|
+
data: organisationUnitPostBodyBody
|
|
60
|
+
}, options);
|
|
61
|
+
};
|
|
62
|
+
var useCreateOrganisationUnit = (options) => {
|
|
63
|
+
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
64
|
+
const mutationFn = (props) => {
|
|
65
|
+
const { orgid, data } = props || {};
|
|
66
|
+
return createOrganisationUnit(orgid, data, requestOptions);
|
|
67
|
+
};
|
|
68
|
+
return useMutation(mutationFn, mutationOptions);
|
|
69
|
+
};
|
|
70
|
+
var deleteOrganisationUnit = (orgid, unitid, options) => {
|
|
71
|
+
return customInstance({
|
|
72
|
+
url: `/organisation/${orgid}/unit/${unitid}`,
|
|
73
|
+
method: "delete",
|
|
74
|
+
data: void 0
|
|
75
|
+
}, options);
|
|
76
|
+
};
|
|
77
|
+
var useDeleteOrganisationUnit = (options) => {
|
|
78
|
+
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
79
|
+
const mutationFn = (props) => {
|
|
80
|
+
const { orgid, unitid } = props || {};
|
|
81
|
+
return deleteOrganisationUnit(orgid, unitid, requestOptions);
|
|
82
|
+
};
|
|
83
|
+
return useMutation(mutationFn, mutationOptions);
|
|
84
|
+
};
|
|
85
|
+
var getUnits = (options) => {
|
|
86
|
+
return customInstance({ url: `/unit`, method: "get" }, options);
|
|
87
|
+
};
|
|
88
|
+
var getGetUnitsQueryKey = () => [`/unit`];
|
|
89
|
+
var useGetUnits = (options) => {
|
|
90
|
+
const { query: queryOptions, request: requestOptions } = options || {};
|
|
91
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetUnitsQueryKey();
|
|
92
|
+
const queryFn = () => getUnits(requestOptions);
|
|
93
|
+
const query = useQuery(queryKey, queryFn, queryOptions);
|
|
94
|
+
return __spreadValues({
|
|
95
|
+
queryKey
|
|
96
|
+
}, query);
|
|
97
|
+
};
|
|
98
|
+
var createDefaultUnit = (options) => {
|
|
99
|
+
return customInstance({ url: `/unit`, method: "put", data: void 0 }, options);
|
|
100
|
+
};
|
|
101
|
+
var useCreateDefaultUnit = (options) => {
|
|
102
|
+
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
103
|
+
const mutationFn = () => {
|
|
104
|
+
return createDefaultUnit(requestOptions);
|
|
105
|
+
};
|
|
106
|
+
return useMutation(mutationFn, mutationOptions);
|
|
107
|
+
};
|
|
108
|
+
var deleteDefaultUnit = (options) => {
|
|
109
|
+
return customInstance({ url: `/unit`, method: "delete", data: void 0 }, options);
|
|
110
|
+
};
|
|
111
|
+
var useDeleteDefaultUnit = (options) => {
|
|
112
|
+
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
113
|
+
const mutationFn = () => {
|
|
114
|
+
return deleteDefaultUnit(requestOptions);
|
|
115
|
+
};
|
|
116
|
+
return useMutation(mutationFn, mutationOptions);
|
|
117
|
+
};
|
|
118
|
+
export {
|
|
119
|
+
createDefaultUnit,
|
|
120
|
+
createOrganisationUnit,
|
|
121
|
+
deleteDefaultUnit,
|
|
122
|
+
deleteOrganisationUnit,
|
|
123
|
+
getGetOrganisationUnitsQueryKey,
|
|
124
|
+
getGetUnitsQueryKey,
|
|
125
|
+
getOrganisationUnits,
|
|
126
|
+
getUnits,
|
|
127
|
+
useCreateDefaultUnit,
|
|
128
|
+
useCreateOrganisationUnit,
|
|
129
|
+
useDeleteDefaultUnit,
|
|
130
|
+
useDeleteOrganisationUnit,
|
|
131
|
+
useGetOrganisationUnits,
|
|
132
|
+
useGetUnits
|
|
133
|
+
};
|
package/unit/unit.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/unit/unit.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Generated by orval v6.4.0 \uD83C\uDF7A\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 **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 0.1\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n OrganisationUnitsGetResponse,\n AsError,\n OrganisationUnitPostResponse,\n OrganisationUnitPostBodyBody,\n} from \"../account-server-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Gets Organisational Units you have access to\n\n * @summary Gets Organisational Units\n */\nexport const getOrganisationUnits = (\n orgid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<OrganisationUnitsGetResponse>(\n { url: `/organisation/${orgid}/unit`, method: \"get\" },\n options\n );\n};\n\nexport const getGetOrganisationUnitsQueryKey = (orgid: string) => [\n `/organisation/${orgid}/unit`,\n];\n\nexport const useGetOrganisationUnits = <\n TData = AsyncReturnType<typeof getOrganisationUnits>,\n TError = ErrorType<void | AsError>\n>(\n orgid: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getOrganisationUnits>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgid);\n\n const queryFn: QueryFunction<\n AsyncReturnType<typeof getOrganisationUnits>\n > = () => getOrganisationUnits(orgid, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof getOrganisationUnits>,\n TError,\n TData\n >(queryKey, queryFn, { enabled: !!orgid, ...queryOptions });\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Creates a new organisation unit\n\n * @summary Create a new Organisational Unit\n */\nexport const createOrganisationUnit = (\n orgid: string,\n organisationUnitPostBodyBody: OrganisationUnitPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<OrganisationUnitPostResponse>(\n {\n url: `/organisation/${orgid}/unit`,\n method: \"post\",\n data: organisationUnitPostBodyBody,\n },\n options\n );\n};\n\nexport const useCreateOrganisationUnit = <\n TError = ErrorType<AsError | void>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof createOrganisationUnit>,\n TError,\n { orgid: string; data: OrganisationUnitPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof createOrganisationUnit>,\n { orgid: string; data: OrganisationUnitPostBodyBody }\n > = (props) => {\n const { orgid, data } = props || {};\n\n return createOrganisationUnit(orgid, data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof createOrganisationUnit>,\n TError,\n { orgid: string; data: OrganisationUnitPostBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n"],
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": ["../../src/unit/unit.ts", "../../src/custom-instance.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Generated by orval v6.4.2 \uD83C\uDF7A\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 **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 0.1\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n OrganisationUnitsGetResponse,\n AsError,\n OrganisationUnitPostResponse,\n OrganisationUnitPostBodyBody,\n UnitsGetResponse,\n} from \"../account-server-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Gets Organisational Units you have access to\n\n * @summary Gets Organisational Units\n */\nexport const getOrganisationUnits = (\n orgid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<OrganisationUnitsGetResponse>(\n { url: `/organisation/${orgid}/unit`, method: \"get\" },\n options\n );\n};\n\nexport const getGetOrganisationUnitsQueryKey = (orgid: string) => [\n `/organisation/${orgid}/unit`,\n];\n\nexport const useGetOrganisationUnits = <\n TData = AsyncReturnType<typeof getOrganisationUnits>,\n TError = ErrorType<void | AsError>\n>(\n orgid: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getOrganisationUnits>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetOrganisationUnitsQueryKey(orgid);\n\n const queryFn: QueryFunction<\n AsyncReturnType<typeof getOrganisationUnits>\n > = () => getOrganisationUnits(orgid, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof getOrganisationUnits>,\n TError,\n TData\n >(queryKey, queryFn, { enabled: !!orgid, ...queryOptions });\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Creates a new organisation unit. You need to be inthe Organisation or an Admin user to use this endpoint\n\n * @summary Create a new Organisational Unit\n */\nexport const createOrganisationUnit = (\n orgid: string,\n organisationUnitPostBodyBody: OrganisationUnitPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<OrganisationUnitPostResponse>(\n {\n url: `/organisation/${orgid}/unit`,\n method: \"post\",\n data: organisationUnitPostBodyBody,\n },\n options\n );\n};\n\nexport const useCreateOrganisationUnit = <\n TError = ErrorType<AsError | void>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof createOrganisationUnit>,\n TError,\n { orgid: string; data: OrganisationUnitPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof createOrganisationUnit>,\n { orgid: string; data: OrganisationUnitPostBodyBody }\n > = (props) => {\n const { orgid, data } = props || {};\n\n return createOrganisationUnit(orgid, data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof createOrganisationUnit>,\n TError,\n { orgid: string; data: OrganisationUnitPostBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes an Organisational Unit you have access to. Units can only be deleted by Organisation users or Admin users. You cannot delete a Unit that contains Products\n\n * @summary Deletes an Organisational Unit\n */\nexport const deleteOrganisationUnit = (\n orgid: string,\n unitid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n {\n url: `/organisation/${orgid}/unit/${unitid}`,\n method: \"delete\",\n data: undefined,\n },\n options\n );\n};\n\nexport const useDeleteOrganisationUnit = <\n TError = ErrorType<AsError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteOrganisationUnit>,\n TError,\n { orgid: string; unitid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteOrganisationUnit>,\n { orgid: string; unitid: string }\n > = (props) => {\n const { orgid, unitid } = props || {};\n\n return deleteOrganisationUnit(orgid, unitid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteOrganisationUnit>,\n TError,\n { orgid: string; unitid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Gets all the Units you are a member of. Admin users can see all Units\n\n * @summary Gets Units a User has access to\n */\nexport const getUnits = (options?: SecondParameter<typeof customInstance>) => {\n return customInstance<UnitsGetResponse>(\n { url: `/unit`, method: \"get\" },\n options\n );\n};\n\nexport const getGetUnitsQueryKey = () => [`/unit`];\n\nexport const useGetUnits = <\n TData = AsyncReturnType<typeof getUnits>,\n TError = ErrorType<void | AsError>\n>(options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getUnits>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUnitsQueryKey();\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getUnits>> = () =>\n getUnits(requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getUnits>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Creates a Unit for an independent User. The unit will belong to the built-in **Default** Organisation. Users can only have one Independent Unit and Independent Units cannot have other Users\n\n * @summary Create a new Independent User Unit\n */\nexport const createDefaultUnit = (\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<OrganisationUnitPostResponse>(\n { url: `/unit`, method: \"put\", data: undefined },\n options\n );\n};\n\nexport const useCreateDefaultUnit = <\n TError = ErrorType<AsError | void>,\n TVariables = void,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof createDefaultUnit>,\n TError,\n TVariables,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof createDefaultUnit>,\n TVariables\n > = () => {\n return createDefaultUnit(requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof createDefaultUnit>,\n TError,\n TVariables,\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Deletes an Independent Unit. It must be your Unit, which belongs to the Default Organisation\n\n * @summary Deletes an Independent Unit\n */\nexport const deleteDefaultUnit = (\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/unit`, method: \"delete\", data: undefined },\n options\n );\n};\n\nexport const useDeleteDefaultUnit = <\n TError = ErrorType<AsError>,\n TVariables = void,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteDefaultUnit>,\n TError,\n TVariables,\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteDefaultUnit>,\n TVariables\n > = () => {\n return deleteDefaultUnit(requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteDefaultUnit>,\n TError,\n TVariables,\n TContext\n >(mutationFn, mutationOptions);\n};\n", "/** Based off the example custom-instance from Orval docs\n * https://github.com/anymaniax/orval/blob/master/samples/react-app-with-react-query/src/api/mutator/custom-instance.ts\n *\n * See https://react-query.tanstack.com/guides/query-cancellation\n *\n * TODO: Considering using Fetch-API instead of axios. This instance will have to change. Could be\n * achieved without changing much using `redaxios`\n * Or use 'ky'\n */\n\nimport Axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\n// ? Need the baseUrl or does it default to ''?\nexport const AXIOS_INSTANCE = Axios.create({ baseURL: '' });\n\n/**\n * Set the access token to be added as the `Authorization: Bearer 'token'` header\n * Useful for client only apps where a proxy API route isn't involved to securely add the access token\n * @param token access token\n */\nexport const setAuthToken = (token: string) => {\n AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${token}`;\n};\n\n/**\n * Set the url to which request paths are added to.\n * @param baseUrl origin + subpath e.g. 'https://example.com/subpath' or '/subpath'\n */\nexport const setBaseUrl = (baseUrl: string) => {\n AXIOS_INSTANCE.defaults.baseURL = baseUrl;\n};\n\nexport const customInstance = <TReturn>(\n config: AxiosRequestConfig,\n options?: AxiosRequestConfig,\n): Promise<TReturn> => {\n const source = Axios.CancelToken.source();\n\n const promise = AXIOS_INSTANCE({ ...config, ...options, cancelToken: source.token }).then(\n ({ data }) => data,\n );\n\n // Promise doesn't have a cancel method but react-query requires this method to make cancellations general.\n // This can either be a any assertion or a @ts-ignore comment.\n (promise as any).cancel = () => {\n source.cancel('Query was cancelled by React Query');\n };\n\n return promise;\n};\n\nexport type ErrorType<TError> = AxiosError<TError>;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/user/package.json
CHANGED
package/user/user.cjs
CHANGED
|
@@ -1,2 +1,176 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
|
+
var __export = (target, all) => {
|
|
26
|
+
__markAsModule(target);
|
|
27
|
+
for (var name in all)
|
|
28
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
29
|
+
};
|
|
30
|
+
var __reExport = (target, module2, desc) => {
|
|
31
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
32
|
+
for (let key of __getOwnPropNames(module2))
|
|
33
|
+
if (!__hasOwnProp.call(target, key) && key !== "default")
|
|
34
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
};
|
|
38
|
+
var __toModule = (module2) => {
|
|
39
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// src/user/user.ts
|
|
43
|
+
__export(exports, {
|
|
44
|
+
addOrganisationUnitUser: () => addOrganisationUnitUser,
|
|
45
|
+
addOrganisationUser: () => addOrganisationUser,
|
|
46
|
+
deleteOrganisationUnitUser: () => deleteOrganisationUnitUser,
|
|
47
|
+
deleteOrganisationUser: () => deleteOrganisationUser,
|
|
48
|
+
getGetOrganisationUnitUsersQueryKey: () => getGetOrganisationUnitUsersQueryKey,
|
|
49
|
+
getGetOrganisationUsersQueryKey: () => getGetOrganisationUsersQueryKey,
|
|
50
|
+
getOrganisationUnitUsers: () => getOrganisationUnitUsers,
|
|
51
|
+
getOrganisationUsers: () => getOrganisationUsers,
|
|
52
|
+
useAddOrganisationUnitUser: () => useAddOrganisationUnitUser,
|
|
53
|
+
useAddOrganisationUser: () => useAddOrganisationUser,
|
|
54
|
+
useDeleteOrganisationUnitUser: () => useDeleteOrganisationUnitUser,
|
|
55
|
+
useDeleteOrganisationUser: () => useDeleteOrganisationUser,
|
|
56
|
+
useGetOrganisationUnitUsers: () => useGetOrganisationUnitUsers,
|
|
57
|
+
useGetOrganisationUsers: () => useGetOrganisationUsers
|
|
58
|
+
});
|
|
59
|
+
var import_react_query = __toModule(require("react-query"));
|
|
60
|
+
|
|
61
|
+
// src/custom-instance.ts
|
|
62
|
+
var import_axios = __toModule(require("axios"));
|
|
63
|
+
var AXIOS_INSTANCE = import_axios.default.create({ baseURL: "" });
|
|
64
|
+
var customInstance = (config, options) => {
|
|
65
|
+
const source = import_axios.default.CancelToken.source();
|
|
66
|
+
const promise = AXIOS_INSTANCE(__spreadProps(__spreadValues(__spreadValues({}, config), options), { cancelToken: source.token })).then(({ data }) => data);
|
|
67
|
+
promise.cancel = () => {
|
|
68
|
+
source.cancel("Query was cancelled by React Query");
|
|
69
|
+
};
|
|
70
|
+
return promise;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// src/user/user.ts
|
|
74
|
+
var getOrganisationUsers = (orgid, options) => {
|
|
75
|
+
return customInstance({ url: `/organisation/${orgid}/user`, method: "get" }, options);
|
|
76
|
+
};
|
|
77
|
+
var getGetOrganisationUsersQueryKey = (orgid) => [
|
|
78
|
+
`/organisation/${orgid}/user`
|
|
79
|
+
];
|
|
80
|
+
var useGetOrganisationUsers = (orgid, options) => {
|
|
81
|
+
const { query: queryOptions, request: requestOptions } = options || {};
|
|
82
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetOrganisationUsersQueryKey(orgid);
|
|
83
|
+
const queryFn = () => getOrganisationUsers(orgid, requestOptions);
|
|
84
|
+
const query = (0, import_react_query.useQuery)(queryKey, queryFn, __spreadValues({ enabled: !!orgid }, queryOptions));
|
|
85
|
+
return __spreadValues({
|
|
86
|
+
queryKey
|
|
87
|
+
}, query);
|
|
88
|
+
};
|
|
89
|
+
var addOrganisationUser = (orgid, userid, options) => {
|
|
90
|
+
return customInstance({
|
|
91
|
+
url: `/organisation/${orgid}/user/${userid}`,
|
|
92
|
+
method: "put",
|
|
93
|
+
data: void 0
|
|
94
|
+
}, options);
|
|
95
|
+
};
|
|
96
|
+
var useAddOrganisationUser = (options) => {
|
|
97
|
+
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
98
|
+
const mutationFn = (props) => {
|
|
99
|
+
const { orgid, userid } = props || {};
|
|
100
|
+
return addOrganisationUser(orgid, userid, requestOptions);
|
|
101
|
+
};
|
|
102
|
+
return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
|
|
103
|
+
};
|
|
104
|
+
var deleteOrganisationUser = (orgid, userid, options) => {
|
|
105
|
+
return customInstance({
|
|
106
|
+
url: `/organisation/${orgid}/user/${userid}`,
|
|
107
|
+
method: "delete",
|
|
108
|
+
data: void 0
|
|
109
|
+
}, options);
|
|
110
|
+
};
|
|
111
|
+
var useDeleteOrganisationUser = (options) => {
|
|
112
|
+
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
113
|
+
const mutationFn = (props) => {
|
|
114
|
+
const { orgid, userid } = props || {};
|
|
115
|
+
return deleteOrganisationUser(orgid, userid, requestOptions);
|
|
116
|
+
};
|
|
117
|
+
return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
|
|
118
|
+
};
|
|
119
|
+
var getOrganisationUnitUsers = (unitid, options) => {
|
|
120
|
+
return customInstance({ url: `/unit/${unitid}/user`, method: "get" }, options);
|
|
121
|
+
};
|
|
122
|
+
var getGetOrganisationUnitUsersQueryKey = (unitid) => [
|
|
123
|
+
`/unit/${unitid}/user`
|
|
124
|
+
];
|
|
125
|
+
var useGetOrganisationUnitUsers = (unitid, options) => {
|
|
126
|
+
const { query: queryOptions, request: requestOptions } = options || {};
|
|
127
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetOrganisationUnitUsersQueryKey(unitid);
|
|
128
|
+
const queryFn = () => getOrganisationUnitUsers(unitid, requestOptions);
|
|
129
|
+
const query = (0, import_react_query.useQuery)(queryKey, queryFn, __spreadValues({ enabled: !!unitid }, queryOptions));
|
|
130
|
+
return __spreadValues({
|
|
131
|
+
queryKey
|
|
132
|
+
}, query);
|
|
133
|
+
};
|
|
134
|
+
var addOrganisationUnitUser = (unitid, userid, options) => {
|
|
135
|
+
return customInstance({ url: `/unit/${unitid}/user/${userid}`, method: "put", data: void 0 }, options);
|
|
136
|
+
};
|
|
137
|
+
var useAddOrganisationUnitUser = (options) => {
|
|
138
|
+
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
139
|
+
const mutationFn = (props) => {
|
|
140
|
+
const { unitid, userid } = props || {};
|
|
141
|
+
return addOrganisationUnitUser(unitid, userid, requestOptions);
|
|
142
|
+
};
|
|
143
|
+
return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
|
|
144
|
+
};
|
|
145
|
+
var deleteOrganisationUnitUser = (unitid, userid, options) => {
|
|
146
|
+
return customInstance({
|
|
147
|
+
url: `/unit/${unitid}/user/${userid}`,
|
|
148
|
+
method: "delete",
|
|
149
|
+
data: void 0
|
|
150
|
+
}, options);
|
|
151
|
+
};
|
|
152
|
+
var useDeleteOrganisationUnitUser = (options) => {
|
|
153
|
+
const { mutation: mutationOptions, request: requestOptions } = options || {};
|
|
154
|
+
const mutationFn = (props) => {
|
|
155
|
+
const { unitid, userid } = props || {};
|
|
156
|
+
return deleteOrganisationUnitUser(unitid, userid, requestOptions);
|
|
157
|
+
};
|
|
158
|
+
return (0, import_react_query.useMutation)(mutationFn, mutationOptions);
|
|
159
|
+
};
|
|
160
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
161
|
+
0 && (module.exports = {
|
|
162
|
+
addOrganisationUnitUser,
|
|
163
|
+
addOrganisationUser,
|
|
164
|
+
deleteOrganisationUnitUser,
|
|
165
|
+
deleteOrganisationUser,
|
|
166
|
+
getGetOrganisationUnitUsersQueryKey,
|
|
167
|
+
getGetOrganisationUsersQueryKey,
|
|
168
|
+
getOrganisationUnitUsers,
|
|
169
|
+
getOrganisationUsers,
|
|
170
|
+
useAddOrganisationUnitUser,
|
|
171
|
+
useAddOrganisationUser,
|
|
172
|
+
useDeleteOrganisationUnitUser,
|
|
173
|
+
useDeleteOrganisationUser,
|
|
174
|
+
useGetOrganisationUnitUsers,
|
|
175
|
+
useGetOrganisationUsers
|
|
176
|
+
});
|
package/user/user.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/user/user.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Generated by orval v6.4.0 \uD83C\uDF7A\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 **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 0.1\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type { UsersGetResponse, AsError } from \"../account-server-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Gets users in an organisation\n\n * @summary Gets users in an organisation\n */\nexport const getOrganisationUsers = (\n orgid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/organisation/${orgid}/user`, method: \"get\" },\n options\n );\n};\n\nexport const getGetOrganisationUsersQueryKey = (orgid: string) => [\n `/organisation/${orgid}/user`,\n];\n\nexport const useGetOrganisationUsers = <\n TData = AsyncReturnType<typeof getOrganisationUsers>,\n TError = ErrorType<AsError | void>\n>(\n orgid: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getOrganisationUsers>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetOrganisationUsersQueryKey(orgid);\n\n const queryFn: QueryFunction<\n AsyncReturnType<typeof getOrganisationUsers>\n > = () => getOrganisationUsers(orgid, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof getOrganisationUsers>,\n TError,\n TData\n >(queryKey, queryFn, { enabled: !!orgid, ...queryOptions });\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Adds a user to an organisation\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 return customInstance<void>(\n {\n url: `/organisation/${orgid}/user/${userid}`,\n method: \"put\",\n data: undefined,\n },\n options\n );\n};\n\nexport const useAddOrganisationUser = <\n TError = ErrorType<AsError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof addOrganisationUser>,\n TError,\n { orgid: string; userid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof addOrganisationUser>,\n { orgid: string; userid: string }\n > = (props) => {\n const { orgid, userid } = props || {};\n\n return addOrganisationUser(orgid, userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof addOrganisationUser>,\n TError,\n { orgid: string; userid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Removes a user to an organisation\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 return customInstance<void>(\n {\n url: `/organisation/${orgid}/user/${userid}`,\n method: \"delete\",\n data: undefined,\n },\n options\n );\n};\n\nexport const useDeleteOrganisationUser = <\n TError = ErrorType<AsError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteOrganisationUser>,\n TError,\n { orgid: string; userid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteOrganisationUser>,\n { orgid: string; userid: string }\n > = (props) => {\n const { orgid, userid } = props || {};\n\n return deleteOrganisationUser(orgid, userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteOrganisationUser>,\n TError,\n { orgid: string; userid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Gets users in an Organisational Unit\n\n * @summary Gets users in an Organisational Unit\n */\nexport const getOrganisationUnitUsers = (\n unitid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/unit/${unitid}/user`, method: \"get\" },\n options\n );\n};\n\nexport const getGetOrganisationUnitUsersQueryKey = (unitid: string) => [\n `/unit/${unitid}/user`,\n];\n\nexport const useGetOrganisationUnitUsers = <\n TData = AsyncReturnType<typeof getOrganisationUnitUsers>,\n TError = ErrorType<AsError | void>\n>(\n unitid: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getOrganisationUnitUsers>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetOrganisationUnitUsersQueryKey(unitid);\n\n const queryFn: QueryFunction<\n AsyncReturnType<typeof getOrganisationUnitUsers>\n > = () => getOrganisationUnitUsers(unitid, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof getOrganisationUnitUsers>,\n TError,\n TData\n >(queryKey, queryFn, { enabled: !!unitid, ...queryOptions });\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Adds a user to an Organisationall Unit\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 return customInstance<void>(\n { url: `/unit/${unitid}/user/${userid}`, method: \"put\", data: undefined },\n options\n );\n};\n\nexport const useAddOrganisationUnitUser = <\n TError = ErrorType<AsError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof addOrganisationUnitUser>,\n TError,\n { unitid: string; userid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof addOrganisationUnitUser>,\n { unitid: string; userid: string }\n > = (props) => {\n const { unitid, userid } = props || {};\n\n return addOrganisationUnitUser(unitid, userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof addOrganisationUnitUser>,\n TError,\n { unitid: string; userid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Removes a user to an Organisational Unit\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 return customInstance<void>(\n {\n url: `/unit/${unitid}/user/${userid}`,\n method: \"delete\",\n data: undefined,\n },\n options\n );\n};\n\nexport const useDeleteOrganisationUnitUser = <\n TError = ErrorType<AsError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteOrganisationUnitUser>,\n TError,\n { unitid: string; userid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteOrganisationUnitUser>,\n { unitid: string; userid: string }\n > = (props) => {\n const { unitid, userid } = props || {};\n\n return deleteOrganisationUnitUser(unitid, userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteOrganisationUnitUser>,\n TError,\n { unitid: string; userid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n"],
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": ["../../src/user/user.ts", "../../src/custom-instance.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Generated by orval v6.4.2 \uD83C\uDF7A\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 **Products**, **Organisations**, **Units** and **Users**.\n\n * OpenAPI spec version: 0.1\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type { UsersGetResponse, AsError } from \"../account-server-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Gets users in an Organisation. You have to be in 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>\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/organisation/${orgid}/user`, method: \"get\" },\n options\n );\n};\n\nexport const getGetOrganisationUsersQueryKey = (orgid: string) => [\n `/organisation/${orgid}/user`,\n];\n\nexport const useGetOrganisationUsers = <\n TData = AsyncReturnType<typeof getOrganisationUsers>,\n TError = ErrorType<AsError | void>\n>(\n orgid: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getOrganisationUsers>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetOrganisationUsersQueryKey(orgid);\n\n const queryFn: QueryFunction<\n AsyncReturnType<typeof getOrganisationUsers>\n > = () => getOrganisationUsers(orgid, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof getOrganisationUsers>,\n TError,\n TData\n >(queryKey, queryFn, { enabled: !!orgid, ...queryOptions });\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Adds a user to an organisation. You 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 return customInstance<void>(\n {\n url: `/organisation/${orgid}/user/${userid}`,\n method: \"put\",\n data: undefined,\n },\n options\n );\n};\n\nexport const useAddOrganisationUser = <\n TError = ErrorType<AsError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof addOrganisationUser>,\n TError,\n { orgid: string; userid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof addOrganisationUser>,\n { orgid: string; userid: string }\n > = (props) => {\n const { orgid, userid } = props || {};\n\n return addOrganisationUser(orgid, userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof addOrganisationUser>,\n TError,\n { orgid: string; userid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Removes a user from an organisation. You 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 return customInstance<void>(\n {\n url: `/organisation/${orgid}/user/${userid}`,\n method: \"delete\",\n data: undefined,\n },\n options\n );\n};\n\nexport const useDeleteOrganisationUser = <\n TError = ErrorType<AsError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteOrganisationUser>,\n TError,\n { orgid: string; userid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteOrganisationUser>,\n { orgid: string; userid: string }\n > = (props) => {\n const { orgid, userid } = props || {};\n\n return deleteOrganisationUser(orgid, userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteOrganisationUser>,\n TError,\n { orgid: string; userid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Gets users in an Organisational Unit. You 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>\n) => {\n return customInstance<UsersGetResponse>(\n { url: `/unit/${unitid}/user`, method: \"get\" },\n options\n );\n};\n\nexport const getGetOrganisationUnitUsersQueryKey = (unitid: string) => [\n `/unit/${unitid}/user`,\n];\n\nexport const useGetOrganisationUnitUsers = <\n TData = AsyncReturnType<typeof getOrganisationUnitUsers>,\n TError = ErrorType<AsError | void>\n>(\n unitid: string,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getOrganisationUnitUsers>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey =\n queryOptions?.queryKey ?? getGetOrganisationUnitUsersQueryKey(unitid);\n\n const queryFn: QueryFunction<\n AsyncReturnType<typeof getOrganisationUnitUsers>\n > = () => getOrganisationUnitUsers(unitid, requestOptions);\n\n const query = useQuery<\n AsyncReturnType<typeof getOrganisationUnitUsers>,\n TError,\n TData\n >(queryKey, queryFn, { enabled: !!unitid, ...queryOptions });\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Adds a user to an Organisationall Unit. You 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 return customInstance<void>(\n { url: `/unit/${unitid}/user/${userid}`, method: \"put\", data: undefined },\n options\n );\n};\n\nexport const useAddOrganisationUnitUser = <\n TError = ErrorType<AsError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof addOrganisationUnitUser>,\n TError,\n { unitid: string; userid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof addOrganisationUnitUser>,\n { unitid: string; userid: string }\n > = (props) => {\n const { unitid, userid } = props || {};\n\n return addOrganisationUnitUser(unitid, userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof addOrganisationUnitUser>,\n TError,\n { unitid: string; userid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Removes a user from an Organisational Unit. You 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 return customInstance<void>(\n {\n url: `/unit/${unitid}/user/${userid}`,\n method: \"delete\",\n data: undefined,\n },\n options\n );\n};\n\nexport const useDeleteOrganisationUnitUser = <\n TError = ErrorType<AsError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteOrganisationUnitUser>,\n TError,\n { unitid: string; userid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteOrganisationUnitUser>,\n { unitid: string; userid: string }\n > = (props) => {\n const { unitid, userid } = props || {};\n\n return deleteOrganisationUnitUser(unitid, userid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteOrganisationUnitUser>,\n TError,\n { unitid: string; userid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n", "/** Based off the example custom-instance from Orval docs\n * https://github.com/anymaniax/orval/blob/master/samples/react-app-with-react-query/src/api/mutator/custom-instance.ts\n *\n * See https://react-query.tanstack.com/guides/query-cancellation\n *\n * TODO: Considering using Fetch-API instead of axios. This instance will have to change. Could be\n * achieved without changing much using `redaxios`\n * Or use 'ky'\n */\n\nimport Axios, { AxiosError, AxiosRequestConfig } from 'axios';\n\n// ? Need the baseUrl or does it default to ''?\nexport const AXIOS_INSTANCE = Axios.create({ baseURL: '' });\n\n/**\n * Set the access token to be added as the `Authorization: Bearer 'token'` header\n * Useful for client only apps where a proxy API route isn't involved to securely add the access token\n * @param token access token\n */\nexport const setAuthToken = (token: string) => {\n AXIOS_INSTANCE.defaults.headers.common['Authorization'] = `Bearer ${token}`;\n};\n\n/**\n * Set the url to which request paths are added to.\n * @param baseUrl origin + subpath e.g. 'https://example.com/subpath' or '/subpath'\n */\nexport const setBaseUrl = (baseUrl: string) => {\n AXIOS_INSTANCE.defaults.baseURL = baseUrl;\n};\n\nexport const customInstance = <TReturn>(\n config: AxiosRequestConfig,\n options?: AxiosRequestConfig,\n): Promise<TReturn> => {\n const source = Axios.CancelToken.source();\n\n const promise = AXIOS_INSTANCE({ ...config, ...options, cancelToken: source.token }).then(\n ({ data }) => data,\n );\n\n // Promise doesn't have a cancel method but react-query requires this method to make cancellations general.\n // This can either be a any assertion or a @ts-ignore comment.\n (promise as any).cancel = () => {\n source.cancel('Query was cancelled by React Query');\n };\n\n return promise;\n};\n\nexport type ErrorType<TError> = AxiosError<TError>;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/user/user.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as react_query from 'react-query';
|
|
2
2
|
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
|
|
3
|
-
import {
|
|
3
|
+
import { H as customInstance, B as UsersGetResponse, I as ErrorType, D as AsError } from '../custom-instance-cc5da68e';
|
|
4
4
|
import 'axios';
|
|
5
5
|
|
|
6
6
|
declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
|
|
7
7
|
/**
|
|
8
|
-
* Gets users in an
|
|
8
|
+
* Gets users in an Organisation. You have to be in the Organisation or an Admin user to use this endpoint
|
|
9
9
|
|
|
10
10
|
* @summary Gets users in an organisation
|
|
11
11
|
*/
|
|
@@ -18,7 +18,7 @@ declare const useGetOrganisationUsers: <TData = UsersGetResponse, TError = Error
|
|
|
18
18
|
queryKey: QueryKey;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
|
-
* Adds a user to an organisation
|
|
21
|
+
* Adds a user to an organisation. You have to be in the Organisation or an Admin user to use this endpoint
|
|
22
22
|
|
|
23
23
|
* @summary Adds a user to an organisation
|
|
24
24
|
*/
|
|
@@ -34,7 +34,7 @@ declare const useAddOrganisationUser: <TError = ErrorType<AsError>, TContext = u
|
|
|
34
34
|
userid: string;
|
|
35
35
|
}, TContext>;
|
|
36
36
|
/**
|
|
37
|
-
* Removes a user to an
|
|
37
|
+
* Removes a user from an organisation. You have to be in the Organisation or an Admin user to use this endpoint
|
|
38
38
|
|
|
39
39
|
* @summary Deletes a user from an organisation
|
|
40
40
|
*/
|
|
@@ -50,7 +50,7 @@ declare const useDeleteOrganisationUser: <TError = ErrorType<AsError>, TContext
|
|
|
50
50
|
userid: string;
|
|
51
51
|
}, TContext>;
|
|
52
52
|
/**
|
|
53
|
-
* Gets users in an Organisational Unit
|
|
53
|
+
* Gets users in an Organisational Unit. You have to be in the Organisation or Unit or an Admin user to use this endpoint
|
|
54
54
|
|
|
55
55
|
* @summary Gets users in an Organisational Unit
|
|
56
56
|
*/
|
|
@@ -63,7 +63,7 @@ declare const useGetOrganisationUnitUsers: <TData = UsersGetResponse, TError = E
|
|
|
63
63
|
queryKey: QueryKey;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
|
-
* Adds a user to an Organisationall Unit
|
|
66
|
+
* Adds a user to an Organisationall Unit. You have to be in the Organisation or Unit or an Admin user to use this endpoint
|
|
67
67
|
|
|
68
68
|
* @summary Adds a user to an Organisational Unit
|
|
69
69
|
*/
|
|
@@ -79,7 +79,7 @@ declare const useAddOrganisationUnitUser: <TError = ErrorType<AsError>, TContext
|
|
|
79
79
|
userid: string;
|
|
80
80
|
}, TContext>;
|
|
81
81
|
/**
|
|
82
|
-
* Removes a user
|
|
82
|
+
* Removes a user from an Organisational Unit. You have to be in the Organisation or Unit or an Admin user to use this endpoint
|
|
83
83
|
|
|
84
84
|
* @summary Deletes a user from an Organisational Unit
|
|
85
85
|
*/
|