@squonk/data-manager-client 1.2.8 → 1.2.9
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/accounting/accounting.cjs +51 -8
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +61 -10
- package/accounting/accounting.d.ts +61 -10
- package/accounting/accounting.js +49 -6
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +67 -24
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +75 -24
- package/admin/admin.d.ts +75 -24
- package/admin/admin.js +56 -13
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +35 -6
- package/application/application.cjs.map +1 -1
- package/application/application.d.cts +42 -8
- package/application/application.d.ts +42 -8
- package/application/application.js +34 -5
- package/application/application.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/configuration/configuration.cjs +19 -4
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +23 -6
- package/configuration/configuration.d.ts +23 -6
- package/configuration/configuration.js +19 -4
- package/configuration/configuration.js.map +1 -1
- package/dataset/dataset.cjs +93 -22
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.cts +105 -20
- package/dataset/dataset.d.ts +105 -20
- package/dataset/dataset.js +83 -12
- package/dataset/dataset.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +71 -14
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.d.cts +83 -15
- package/exchange-rate/exchange-rate.d.ts +83 -15
- package/exchange-rate/exchange-rate.js +65 -8
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file-and-path/file-and-path.cjs +45 -16
- package/file-and-path/file-and-path.cjs.map +1 -1
- package/file-and-path/file-and-path.d.cts +48 -14
- package/file-and-path/file-and-path.d.ts +48 -14
- package/file-and-path/file-and-path.js +39 -10
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs +9 -2
- package/index.cjs.map +1 -1
- package/index.d.cts +2033 -2
- package/index.d.ts +2033 -2
- package/index.js +8 -1
- package/index.js.map +1 -1
- package/instance/instance.cjs +45 -16
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.cts +48 -14
- package/instance/instance.d.ts +48 -14
- package/instance/instance.js +38 -9
- package/instance/instance.js.map +1 -1
- package/job/job.cjs +51 -8
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +61 -10
- package/job/job.d.ts +61 -10
- package/job/job.js +49 -6
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +39 -10
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.cts +45 -11
- package/metadata/metadata.d.ts +45 -11
- package/metadata/metadata.js +36 -7
- package/metadata/metadata.js.map +1 -1
- package/package.json +11 -11
- package/project/project.cjs +83 -26
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +89 -21
- package/project/project.d.ts +89 -21
- package/project/project.js +71 -14
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +136 -22
- package/src/admin/admin.ts +148 -50
- package/src/application/application.ts +93 -18
- package/src/configuration/configuration.ts +50 -14
- package/src/custom-instance.ts +3 -4
- package/src/data-manager-api.schemas.ts +59 -33
- package/src/dataset/dataset.ts +233 -45
- package/src/exchange-rate/exchange-rate.ts +185 -32
- package/src/file-and-path/file-and-path.ts +98 -33
- package/src/instance/instance.ts +98 -33
- package/src/job/job.ts +138 -22
- package/src/metadata/metadata.ts +97 -24
- package/src/project/project.ts +191 -50
- package/src/task/task.ts +96 -21
- package/src/type/type.ts +50 -14
- package/src/user/user.ts +137 -25
- package/task/task.cjs +37 -8
- package/task/task.cjs.map +1 -1
- package/task/task.d.cts +44 -10
- package/task/task.d.ts +44 -10
- package/task/task.js +35 -6
- package/task/task.js.map +1 -1
- package/type/type.cjs +19 -4
- package/type/type.cjs.map +1 -1
- package/type/type.d.cts +23 -6
- package/type/type.d.ts +23 -6
- package/type/type.js +19 -4
- package/type/type.js.map +1 -1
- package/user/user.cjs +53 -10
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +63 -12
- package/user/user.d.ts +63 -12
- package/user/user.js +49 -6
- package/user/user.js.map +1 -1
- package/chunk-J22A7LHX.cjs.map +0 -1
- package/custom-instance-37ed2460.d.ts +0 -2014
package/type/type.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
1
|
+
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { customInstance, TypesGetResponse, ErrorType, DmError } from '../index.cjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
|
-
type SecondParameter<T extends (...args: any) => any> = T
|
|
5
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
6
6
|
/**
|
|
7
7
|
* Returns the supported Dataset and File (MIME) Types
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ type SecondParameter<T extends (...args: any) => any> = T extends (config: any,
|
|
|
11
11
|
declare const getFileTypes: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<TypesGetResponse>;
|
|
12
12
|
declare const getGetFileTypesQueryKey: () => readonly ["data-manager-api", "/type"];
|
|
13
13
|
declare const getGetFileTypesQueryOptions: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
14
|
-
query?: UseQueryOptions<TypesGetResponse, TError, TData, QueryKey
|
|
14
|
+
query?: Partial<UseQueryOptions<TypesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
15
15
|
request?: SecondParameter<typeof customInstance>;
|
|
16
16
|
} | undefined) => UseQueryOptions<TypesGetResponse, TError, TData, QueryKey> & {
|
|
17
17
|
queryKey: QueryKey;
|
|
@@ -22,10 +22,27 @@ type GetFileTypesQueryError = ErrorType<void | DmError>;
|
|
|
22
22
|
* @summary Get the supported File Types
|
|
23
23
|
*/
|
|
24
24
|
declare const useGetFileTypes: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
25
|
-
query?: UseQueryOptions<TypesGetResponse, TError, TData, QueryKey
|
|
25
|
+
query?: Partial<UseQueryOptions<TypesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
26
26
|
request?: SecondParameter<typeof customInstance>;
|
|
27
27
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
28
28
|
queryKey: QueryKey;
|
|
29
29
|
};
|
|
30
|
+
declare const getGetFileTypesSuspenseQueryOptions: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
31
|
+
query?: Partial<UseSuspenseQueryOptions<TypesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
32
|
+
request?: SecondParameter<typeof customInstance>;
|
|
33
|
+
} | undefined) => UseSuspenseQueryOptions<TypesGetResponse, TError, TData, QueryKey> & {
|
|
34
|
+
queryKey: QueryKey;
|
|
35
|
+
};
|
|
36
|
+
type GetFileTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>;
|
|
37
|
+
type GetFileTypesSuspenseQueryError = ErrorType<void | DmError>;
|
|
38
|
+
/**
|
|
39
|
+
* @summary Get the supported File Types
|
|
40
|
+
*/
|
|
41
|
+
declare const useGetFileTypesSuspense: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
42
|
+
query?: Partial<UseSuspenseQueryOptions<TypesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
43
|
+
request?: SecondParameter<typeof customInstance>;
|
|
44
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
45
|
+
queryKey: QueryKey;
|
|
46
|
+
};
|
|
30
47
|
|
|
31
|
-
export { GetFileTypesQueryError, GetFileTypesQueryResult, getFileTypes, getGetFileTypesQueryKey, getGetFileTypesQueryOptions, useGetFileTypes };
|
|
48
|
+
export { type GetFileTypesQueryError, type GetFileTypesQueryResult, type GetFileTypesSuspenseQueryError, type GetFileTypesSuspenseQueryResult, getFileTypes, getGetFileTypesQueryKey, getGetFileTypesQueryOptions, getGetFileTypesSuspenseQueryOptions, useGetFileTypes, useGetFileTypesSuspense };
|
package/type/type.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { UseQueryOptions, QueryKey, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
1
|
+
import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { customInstance, TypesGetResponse, ErrorType, DmError } from '../index.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
|
-
type SecondParameter<T extends (...args: any) => any> = T
|
|
5
|
+
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
|
|
6
6
|
/**
|
|
7
7
|
* Returns the supported Dataset and File (MIME) Types
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ type SecondParameter<T extends (...args: any) => any> = T extends (config: any,
|
|
|
11
11
|
declare const getFileTypes: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<TypesGetResponse>;
|
|
12
12
|
declare const getGetFileTypesQueryKey: () => readonly ["data-manager-api", "/type"];
|
|
13
13
|
declare const getGetFileTypesQueryOptions: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
14
|
-
query?: UseQueryOptions<TypesGetResponse, TError, TData, QueryKey
|
|
14
|
+
query?: Partial<UseQueryOptions<TypesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
15
15
|
request?: SecondParameter<typeof customInstance>;
|
|
16
16
|
} | undefined) => UseQueryOptions<TypesGetResponse, TError, TData, QueryKey> & {
|
|
17
17
|
queryKey: QueryKey;
|
|
@@ -22,10 +22,27 @@ type GetFileTypesQueryError = ErrorType<void | DmError>;
|
|
|
22
22
|
* @summary Get the supported File Types
|
|
23
23
|
*/
|
|
24
24
|
declare const useGetFileTypes: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
25
|
-
query?: UseQueryOptions<TypesGetResponse, TError, TData, QueryKey
|
|
25
|
+
query?: Partial<UseQueryOptions<TypesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
26
26
|
request?: SecondParameter<typeof customInstance>;
|
|
27
27
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
28
28
|
queryKey: QueryKey;
|
|
29
29
|
};
|
|
30
|
+
declare const getGetFileTypesSuspenseQueryOptions: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
31
|
+
query?: Partial<UseSuspenseQueryOptions<TypesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
32
|
+
request?: SecondParameter<typeof customInstance>;
|
|
33
|
+
} | undefined) => UseSuspenseQueryOptions<TypesGetResponse, TError, TData, QueryKey> & {
|
|
34
|
+
queryKey: QueryKey;
|
|
35
|
+
};
|
|
36
|
+
type GetFileTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>;
|
|
37
|
+
type GetFileTypesSuspenseQueryError = ErrorType<void | DmError>;
|
|
38
|
+
/**
|
|
39
|
+
* @summary Get the supported File Types
|
|
40
|
+
*/
|
|
41
|
+
declare const useGetFileTypesSuspense: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
42
|
+
query?: Partial<UseSuspenseQueryOptions<TypesGetResponse, TError, TData, QueryKey>> | undefined;
|
|
43
|
+
request?: SecondParameter<typeof customInstance>;
|
|
44
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
45
|
+
queryKey: QueryKey;
|
|
46
|
+
};
|
|
30
47
|
|
|
31
|
-
export { GetFileTypesQueryError, GetFileTypesQueryResult, getFileTypes, getGetFileTypesQueryKey, getGetFileTypesQueryOptions, useGetFileTypes };
|
|
48
|
+
export { type GetFileTypesQueryError, type GetFileTypesQueryResult, type GetFileTypesSuspenseQueryError, type GetFileTypesSuspenseQueryResult, getFileTypes, getGetFileTypesQueryKey, getGetFileTypesQueryOptions, getGetFileTypesSuspenseQueryOptions, useGetFileTypes, useGetFileTypesSuspense };
|
package/type/type.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
customInstance
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-EBOQPVLG.js";
|
|
4
4
|
|
|
5
5
|
// src/type/type.ts
|
|
6
6
|
import {
|
|
7
|
-
useQuery
|
|
7
|
+
useQuery,
|
|
8
|
+
useSuspenseQuery
|
|
8
9
|
} from "@tanstack/react-query";
|
|
9
10
|
var getFileTypes = (options, signal) => {
|
|
10
11
|
return customInstance(
|
|
11
12
|
{
|
|
12
13
|
url: `/type`,
|
|
13
|
-
method: "
|
|
14
|
+
method: "GET",
|
|
14
15
|
signal
|
|
15
16
|
},
|
|
16
17
|
options
|
|
@@ -31,10 +32,24 @@ var useGetFileTypes = (options) => {
|
|
|
31
32
|
query.queryKey = queryOptions.queryKey;
|
|
32
33
|
return query;
|
|
33
34
|
};
|
|
35
|
+
var getGetFileTypesSuspenseQueryOptions = (options) => {
|
|
36
|
+
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
37
|
+
const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetFileTypesQueryKey();
|
|
38
|
+
const queryFn = ({ signal }) => getFileTypes(requestOptions, signal);
|
|
39
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
40
|
+
};
|
|
41
|
+
var useGetFileTypesSuspense = (options) => {
|
|
42
|
+
const queryOptions = getGetFileTypesSuspenseQueryOptions(options);
|
|
43
|
+
const query = useSuspenseQuery(queryOptions);
|
|
44
|
+
query.queryKey = queryOptions.queryKey;
|
|
45
|
+
return query;
|
|
46
|
+
};
|
|
34
47
|
export {
|
|
35
48
|
getFileTypes,
|
|
36
49
|
getGetFileTypesQueryKey,
|
|
37
50
|
getGetFileTypesQueryOptions,
|
|
38
|
-
|
|
51
|
+
getGetFileTypesSuspenseQueryOptions,
|
|
52
|
+
useGetFileTypes,
|
|
53
|
+
useGetFileTypesSuspense
|
|
39
54
|
};
|
|
40
55
|
//# sourceMappingURL=type.js.map
|
package/type/type.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/type/type.ts"],"sourcesContent":["/**\n * Generated by orval v6.
|
|
1
|
+
{"version":3,"sources":["../../src/type/type.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n QueryFunction,\n QueryKey,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DmError,\n TypesGetResponse\n} from '../data-manager-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 the supported Dataset and File (MIME) Types\n\n * @summary Get the supported File Types\n */\nexport const getFileTypes = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<TypesGetResponse>(\n {url: `/type`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetFileTypesQueryKey = () => {\n return [\"data-manager-api\", `/type`] as const;\n }\n\n \nexport const getGetFileTypesQueryOptions = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({ signal }) => getFileTypes(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetFileTypesQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>\nexport type GetFileTypesQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get the supported File Types\n */\nexport const useGetFileTypes = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetFileTypesQueryOptions(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 getGetFileTypesSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getFileTypes>>> = ({ signal }) => getFileTypes(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetFileTypesSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getFileTypes>>>\nexport type GetFileTypesSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get the supported File Types\n */\nexport const useGetFileTypesSuspense = <TData = Awaited<ReturnType<typeof getFileTypes>>, TError = ErrorType<void | DmError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getFileTypes>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetFileTypesSuspenseQueryOptions(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"],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAyBA,IAAM,eAAe,CAE3B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAS,QAAQ;AAAA,MAAO;AAAA,IAChC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,0BAA0B,MAAM;AACzC,SAAO,CAAC,oBAAoB,OAAO;AACnC;AAGG,IAAM,8BAA8B,CAAwF,YAC9H;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,wBAAwB;AAIlE,QAAM,UAAmE,CAAC,EAAE,OAAO,MAAM,aAAa,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,kBAAkB,CAC7B,YAE8D;AAE9D,QAAM,eAAe,4BAA4B,OAAO;AAExD,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,sCAAsC,CAAwF,YACtI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,wBAAwB;AAIlE,QAAM,UAAmE,CAAC,EAAE,OAAO,MAAM,aAAa,gBAAgB,MAAM;AAM7H,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAQO,IAAM,0BAA0B,CACrC,YAEsE;AAEtE,QAAM,eAAe,oCAAoC,OAAO;AAEhE,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
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 getUsers = (options, signal) => {
|
|
11
|
-
return
|
|
12
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
12
13
|
{
|
|
13
14
|
url: `/user`,
|
|
14
|
-
method: "
|
|
15
|
+
method: "GET",
|
|
15
16
|
signal
|
|
16
17
|
},
|
|
17
18
|
options
|
|
@@ -32,11 +33,23 @@ var useGetUsers = (options) => {
|
|
|
32
33
|
query.queryKey = queryOptions.queryKey;
|
|
33
34
|
return query;
|
|
34
35
|
};
|
|
36
|
+
var getGetUsersSuspenseQueryOptions = (options) => {
|
|
37
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
38
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUsersQueryKey()));
|
|
39
|
+
const queryFn = ({ signal }) => getUsers(requestOptions, signal);
|
|
40
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
41
|
+
};
|
|
42
|
+
var useGetUsersSuspense = (options) => {
|
|
43
|
+
const queryOptions = getGetUsersSuspenseQueryOptions(options);
|
|
44
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
45
|
+
query.queryKey = queryOptions.queryKey;
|
|
46
|
+
return query;
|
|
47
|
+
};
|
|
35
48
|
var getUserAccount = (params, options, signal) => {
|
|
36
|
-
return
|
|
49
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
37
50
|
{
|
|
38
51
|
url: `/user/account`,
|
|
39
|
-
method: "
|
|
52
|
+
method: "GET",
|
|
40
53
|
params,
|
|
41
54
|
signal
|
|
42
55
|
},
|
|
@@ -58,6 +71,18 @@ var useGetUserAccount = (params, options) => {
|
|
|
58
71
|
query.queryKey = queryOptions.queryKey;
|
|
59
72
|
return query;
|
|
60
73
|
};
|
|
74
|
+
var getGetUserAccountSuspenseQueryOptions = (params, options) => {
|
|
75
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
76
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUserAccountQueryKey(params)));
|
|
77
|
+
const queryFn = ({ signal }) => getUserAccount(params, requestOptions, signal);
|
|
78
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
79
|
+
};
|
|
80
|
+
var useGetUserAccountSuspense = (params, options) => {
|
|
81
|
+
const queryOptions = getGetUserAccountSuspenseQueryOptions(params, options);
|
|
82
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
83
|
+
query.queryKey = queryOptions.queryKey;
|
|
84
|
+
return query;
|
|
85
|
+
};
|
|
61
86
|
var patchUserAccount = (userAccountPatchBodyBody, options) => {
|
|
62
87
|
const formData = new FormData();
|
|
63
88
|
if (userAccountPatchBodyBody.private !== void 0) {
|
|
@@ -72,10 +97,10 @@ var patchUserAccount = (userAccountPatchBodyBody, options) => {
|
|
|
72
97
|
if (userAccountPatchBodyBody.use_impersonation !== void 0) {
|
|
73
98
|
formData.append("use_impersonation", userAccountPatchBodyBody.use_impersonation.toString());
|
|
74
99
|
}
|
|
75
|
-
return
|
|
100
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
76
101
|
{
|
|
77
102
|
url: `/user/account`,
|
|
78
|
-
method: "
|
|
103
|
+
method: "PATCH",
|
|
79
104
|
headers: { "Content-Type": "multipart/form-data" },
|
|
80
105
|
data: formData
|
|
81
106
|
},
|
|
@@ -95,10 +120,10 @@ var usePatchUserAccount = (options) => {
|
|
|
95
120
|
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
96
121
|
};
|
|
97
122
|
var getUserApiLog = (params, options, signal) => {
|
|
98
|
-
return
|
|
123
|
+
return _chunkTKLTUR4Rcjs.customInstance.call(void 0,
|
|
99
124
|
{
|
|
100
125
|
url: `/user/api-log`,
|
|
101
|
-
method: "
|
|
126
|
+
method: "GET",
|
|
102
127
|
params,
|
|
103
128
|
signal
|
|
104
129
|
},
|
|
@@ -120,6 +145,24 @@ var useGetUserApiLog = (params, options) => {
|
|
|
120
145
|
query.queryKey = queryOptions.queryKey;
|
|
121
146
|
return query;
|
|
122
147
|
};
|
|
148
|
+
var getGetUserApiLogSuspenseQueryOptions = (params, options) => {
|
|
149
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
150
|
+
const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUserApiLogQueryKey(params)));
|
|
151
|
+
const queryFn = ({ signal }) => getUserApiLog(params, requestOptions, signal);
|
|
152
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
153
|
+
};
|
|
154
|
+
var useGetUserApiLogSuspense = (params, options) => {
|
|
155
|
+
const queryOptions = getGetUserApiLogSuspenseQueryOptions(params, options);
|
|
156
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
157
|
+
query.queryKey = queryOptions.queryKey;
|
|
158
|
+
return query;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
123
166
|
|
|
124
167
|
|
|
125
168
|
|
|
@@ -136,5 +179,5 @@ var useGetUserApiLog = (params, options) => {
|
|
|
136
179
|
|
|
137
180
|
|
|
138
181
|
|
|
139
|
-
exports.getGetUserAccountQueryKey = getGetUserAccountQueryKey; exports.getGetUserAccountQueryOptions = getGetUserAccountQueryOptions; exports.getGetUserApiLogQueryKey = getGetUserApiLogQueryKey; exports.getGetUserApiLogQueryOptions = getGetUserApiLogQueryOptions; exports.getGetUsersQueryKey = getGetUsersQueryKey; exports.getGetUsersQueryOptions = getGetUsersQueryOptions; exports.getPatchUserAccountMutationOptions = getPatchUserAccountMutationOptions; exports.getUserAccount = getUserAccount; exports.getUserApiLog = getUserApiLog; exports.getUsers = getUsers; exports.patchUserAccount = patchUserAccount; exports.useGetUserAccount = useGetUserAccount; exports.useGetUserApiLog = useGetUserApiLog; exports.useGetUsers = useGetUsers; exports.usePatchUserAccount = usePatchUserAccount;
|
|
182
|
+
exports.getGetUserAccountQueryKey = getGetUserAccountQueryKey; exports.getGetUserAccountQueryOptions = getGetUserAccountQueryOptions; exports.getGetUserAccountSuspenseQueryOptions = getGetUserAccountSuspenseQueryOptions; exports.getGetUserApiLogQueryKey = getGetUserApiLogQueryKey; exports.getGetUserApiLogQueryOptions = getGetUserApiLogQueryOptions; exports.getGetUserApiLogSuspenseQueryOptions = getGetUserApiLogSuspenseQueryOptions; exports.getGetUsersQueryKey = getGetUsersQueryKey; exports.getGetUsersQueryOptions = getGetUsersQueryOptions; exports.getGetUsersSuspenseQueryOptions = getGetUsersSuspenseQueryOptions; exports.getPatchUserAccountMutationOptions = getPatchUserAccountMutationOptions; exports.getUserAccount = getUserAccount; exports.getUserApiLog = getUserApiLog; exports.getUsers = getUsers; exports.patchUserAccount = patchUserAccount; exports.useGetUserAccount = useGetUserAccount; exports.useGetUserAccountSuspense = useGetUserAccountSuspense; exports.useGetUserApiLog = useGetUserApiLog; exports.useGetUserApiLogSuspense = useGetUserApiLogSuspense; exports.useGetUsers = useGetUsers; exports.useGetUsersSuspense = useGetUsersSuspense; exports.usePatchUserAccount = usePatchUserAccount;
|
|
140
183
|
//# sourceMappingURL=user.cjs.map
|
package/user/user.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/user/user.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\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 DmError,\n GetUserAccountParams,\n GetUserApiLogParams,\n UserAccountDetail,\n UserAccountPatchBodyBody,\n UserApiLogGetResponse,\n UsersGetResponse\n} from '../data-manager-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 all users that have accessed the Data Manager API and where the account is not `private`. Users can set their accounts to be private and therefore will not show up in methods like this\n\n * @summary Get information about all known Users\n */\nexport const getUsers = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UsersGetResponse>(\n {url: `/user`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetUsersQueryKey = () => {\n \n return [\"data-manager-api\", `/user`] as const;\n }\n\n \nexport const getGetUsersQueryOptions = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({ signal }) => getUsers(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getUsers>>>\nexport type GetUsersQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get information about all known Users\n */\nexport const useGetUsers = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUsersQueryOptions(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 * @summary Get information about your account\n */\nexport const getUserAccount = (\n params?: GetUserAccountParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UserAccountDetail>(\n {url: `/user/account`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetUserAccountQueryKey = (params?: GetUserAccountParams,) => {\n \n return [\"data-manager-api\", `/user/account`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetUserAccountQueryOptions = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(params?: GetUserAccountParams, 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(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) => getUserAccount(params, 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 | DmError>\n\n/**\n * @summary Get information about your account\n */\nexport const useGetUserAccount = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(\n params?: GetUserAccountParams, 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(params,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 * @summary Patch your account\n */\nexport const patchUserAccount = (\n userAccountPatchBodyBody: UserAccountPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(userAccountPatchBodyBody.private !== undefined) {\n formData.append('private', userAccountPatchBodyBody.private.toString())\n }\nif(userAccountPatchBodyBody.become_admin !== undefined) {\n formData.append('become_admin', userAccountPatchBodyBody.become_admin.toString())\n }\nif(userAccountPatchBodyBody.impersonate !== undefined) {\n formData.append('impersonate', userAccountPatchBodyBody.impersonate)\n }\nif(userAccountPatchBodyBody.use_impersonation !== undefined) {\n formData.append('use_impersonation', userAccountPatchBodyBody.use_impersonation.toString())\n }\n\n return customInstance<void>(\n {url: `/user/account`, method: 'patch',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getPatchUserAccountMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchUserAccount>>, {data: UserAccountPatchBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return patchUserAccount(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchUserAccountMutationResult = NonNullable<Awaited<ReturnType<typeof patchUserAccount>>>\n export type PatchUserAccountMutationBody = UserAccountPatchBodyBody\n export type PatchUserAccountMutationError = ErrorType<DmError>\n\n /**\n * @summary Patch your account\n */\nexport const usePatchUserAccount = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchUserAccountMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns a summary of your API activity optionally filtered by date. The API log does not include the use of GET methods, and only contains records of potential state-changing calls made against the Data Manager using your account\n\n * @summary Get the API call log recorded against your account\n */\nexport const getUserApiLog = (\n params?: GetUserApiLogParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UserApiLogGetResponse>(\n {url: `/user/api-log`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams,) => {\n \n return [\"data-manager-api\", `/user/api-log`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetUserApiLogQueryOptions = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(params?: GetUserApiLogParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({ signal }) => getUserApiLog(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUserApiLogQueryResult = NonNullable<Awaited<ReturnType<typeof getUserApiLog>>>\nexport type GetUserApiLogQueryError = ErrorType<void>\n\n/**\n * @summary Get the API call log recorded against your account\n */\nexport const useGetUserApiLog = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(\n params?: GetUserApiLogParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUserApiLogQueryOptions(params,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"]}
|
|
1
|
+
{"version":3,"sources":["../../src/user/user.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.2\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 DmError,\n GetUserAccountParams,\n GetUserApiLogParams,\n UserAccountDetail,\n UserAccountPatchBodyBody,\n UserApiLogGetResponse,\n UsersGetResponse\n} from '../data-manager-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 all users that have accessed the Data Manager API and where the account is not `private`. Users can set their accounts to be private and therefore will not show up in methods like this\n\n * @summary Get information about all known Users\n */\nexport const getUsers = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UsersGetResponse>(\n {url: `/user`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetUsersQueryKey = () => {\n return [\"data-manager-api\", `/user`] as const;\n }\n\n \nexport const getGetUsersQueryOptions = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({ signal }) => getUsers(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUsersQueryResult = NonNullable<Awaited<ReturnType<typeof getUsers>>>\nexport type GetUsersQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get information about all known Users\n */\nexport const useGetUsers = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUsersQueryOptions(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 getGetUsersSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUsers>>> = ({ signal }) => getUsers(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUsers>>>\nexport type GetUsersSuspenseQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get information about all known Users\n */\nexport const useGetUsersSuspense = <TData = Awaited<ReturnType<typeof getUsers>>, TError = ErrorType<void | DmError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUsers>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUsersSuspenseQueryOptions(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 * @summary Get information about your account\n */\nexport const getUserAccount = (\n params?: GetUserAccountParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UserAccountDetail>(\n {url: `/user/account`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetUserAccountQueryKey = (params?: GetUserAccountParams,) => {\n return [\"data-manager-api\", `/user/account`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetUserAccountQueryOptions = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(params?: GetUserAccountParams, 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(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) => getUserAccount(params, 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 | DmError>\n\n/**\n * @summary Get information about your account\n */\nexport const useGetUserAccount = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(\n params?: GetUserAccountParams, 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(params,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 | DmError>>(params?: GetUserAccountParams, 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(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserAccount>>> = ({ signal }) => getUserAccount(params, 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 | DmError>\n\n/**\n * @summary Get information about your account\n */\nexport const useGetUserAccountSuspense = <TData = Awaited<ReturnType<typeof getUserAccount>>, TError = ErrorType<void | DmError>>(\n params?: GetUserAccountParams, 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(params,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 * @summary Patch your account\n */\nexport const patchUserAccount = (\n userAccountPatchBodyBody: UserAccountPatchBodyBody,\n options?: SecondParameter<typeof customInstance>,) => {\n \n const formData = new FormData();\nif(userAccountPatchBodyBody.private !== undefined) {\n formData.append('private', userAccountPatchBodyBody.private.toString())\n }\nif(userAccountPatchBodyBody.become_admin !== undefined) {\n formData.append('become_admin', userAccountPatchBodyBody.become_admin.toString())\n }\nif(userAccountPatchBodyBody.impersonate !== undefined) {\n formData.append('impersonate', userAccountPatchBodyBody.impersonate)\n }\nif(userAccountPatchBodyBody.use_impersonation !== undefined) {\n formData.append('use_impersonation', userAccountPatchBodyBody.use_impersonation.toString())\n }\n\n return customInstance<void>(\n {url: `/user/account`, method: 'PATCH',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getPatchUserAccountMutationOptions = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof patchUserAccount>>, {data: UserAccountPatchBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return patchUserAccount(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type PatchUserAccountMutationResult = NonNullable<Awaited<ReturnType<typeof patchUserAccount>>>\n export type PatchUserAccountMutationBody = UserAccountPatchBodyBody\n export type PatchUserAccountMutationError = ErrorType<DmError>\n\n /**\n * @summary Patch your account\n */\nexport const usePatchUserAccount = <TError = ErrorType<DmError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof patchUserAccount>>, TError,{data: UserAccountPatchBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getPatchUserAccountMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Returns a summary of your API activity optionally filtered by date. The API log does not include the use of GET methods, and only contains records of potential state-changing calls made against the Data Manager using your account\n\n * @summary Get the API call log recorded against your account\n */\nexport const getUserApiLog = (\n params?: GetUserApiLogParams,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<UserApiLogGetResponse>(\n {url: `/user/api-log`, method: 'GET',\n params, signal\n },\n options);\n }\n \n\nexport const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams,) => {\n return [\"data-manager-api\", `/user/api-log`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetUserApiLogQueryOptions = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(params?: GetUserApiLogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({ signal }) => getUserApiLog(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUserApiLogQueryResult = NonNullable<Awaited<ReturnType<typeof getUserApiLog>>>\nexport type GetUserApiLogQueryError = ErrorType<void>\n\n/**\n * @summary Get the API call log recorded against your account\n */\nexport const useGetUserApiLog = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(\n params?: GetUserApiLogParams, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUserApiLogQueryOptions(params,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 getGetUserApiLogSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(params?: GetUserApiLogParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getUserApiLog>>> = ({ signal }) => getUserApiLog(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetUserApiLogSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUserApiLog>>>\nexport type GetUserApiLogSuspenseQueryError = ErrorType<void>\n\n/**\n * @summary Get the API call log recorded against your account\n */\nexport const useGetUserApiLogSuspense = <TData = Awaited<ReturnType<typeof getUserApiLog>>, TError = ErrorType<void>>(\n params?: GetUserApiLogParams, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getUserApiLog>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetUserApiLogSuspenseQueryOptions(params,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"]}
|
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, UsersGetResponse, ErrorType, DmError, GetUserAccountParams, UserAccountDetail, UserAccountPatchBodyBody, GetUserApiLogParams, UserApiLogGetResponse } 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 all users that have accessed the Data Manager API and where the account is not `private`. Users can set their accounts to be private and therefore will not show up in methods like this
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ type SecondParameter<T extends (...args: any) => any> = T extends (config: any,
|
|
|
12
12
|
declare const getUsers: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UsersGetResponse>;
|
|
13
13
|
declare const getGetUsersQueryKey: () => readonly ["data-manager-api", "/user"];
|
|
14
14
|
declare const getGetUsersQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
15
|
-
query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey
|
|
15
|
+
query?: Partial<UseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
16
16
|
request?: SecondParameter<typeof customInstance>;
|
|
17
17
|
} | undefined) => UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
|
|
18
18
|
queryKey: QueryKey;
|
|
@@ -23,18 +23,35 @@ type GetUsersQueryError = ErrorType<void | DmError>;
|
|
|
23
23
|
* @summary Get information about all known Users
|
|
24
24
|
*/
|
|
25
25
|
declare const useGetUsers: <TData = UsersGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
26
|
-
query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey
|
|
26
|
+
query?: Partial<UseQueryOptions<UsersGetResponse, 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 getGetUsersSuspenseQueryOptions: <TData = UsersGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
32
|
+
query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
33
|
+
request?: SecondParameter<typeof customInstance>;
|
|
34
|
+
} | undefined) => UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey> & {
|
|
35
|
+
queryKey: QueryKey;
|
|
36
|
+
};
|
|
37
|
+
type GetUsersSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUsers>>>;
|
|
38
|
+
type GetUsersSuspenseQueryError = ErrorType<void | DmError>;
|
|
39
|
+
/**
|
|
40
|
+
* @summary Get information about all known Users
|
|
41
|
+
*/
|
|
42
|
+
declare const useGetUsersSuspense: <TData = UsersGetResponse, TError = ErrorType<void | DmError>>(options?: {
|
|
43
|
+
query?: Partial<UseSuspenseQueryOptions<UsersGetResponse, TError, TData, QueryKey>> | undefined;
|
|
44
|
+
request?: SecondParameter<typeof customInstance>;
|
|
45
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
46
|
+
queryKey: QueryKey;
|
|
47
|
+
};
|
|
31
48
|
/**
|
|
32
49
|
* @summary Get information about your account
|
|
33
50
|
*/
|
|
34
51
|
declare const getUserAccount: (params?: GetUserAccountParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UserAccountDetail>;
|
|
35
52
|
declare const getGetUserAccountQueryKey: (params?: GetUserAccountParams) => readonly ["data-manager-api", "/user/account", ...GetUserAccountParams[]];
|
|
36
53
|
declare const getGetUserAccountQueryOptions: <TData = UserAccountDetail, TError = ErrorType<void | DmError>>(params?: GetUserAccountParams, options?: {
|
|
37
|
-
query?: UseQueryOptions<UserAccountDetail, TError, TData, QueryKey
|
|
54
|
+
query?: Partial<UseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
38
55
|
request?: SecondParameter<typeof customInstance>;
|
|
39
56
|
} | undefined) => UseQueryOptions<UserAccountDetail, TError, TData, QueryKey> & {
|
|
40
57
|
queryKey: QueryKey;
|
|
@@ -45,11 +62,28 @@ type GetUserAccountQueryError = ErrorType<void | DmError>;
|
|
|
45
62
|
* @summary Get information about your account
|
|
46
63
|
*/
|
|
47
64
|
declare const useGetUserAccount: <TData = UserAccountDetail, TError = ErrorType<void | DmError>>(params?: GetUserAccountParams, options?: {
|
|
48
|
-
query?: UseQueryOptions<UserAccountDetail, TError, TData, QueryKey
|
|
65
|
+
query?: Partial<UseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
49
66
|
request?: SecondParameter<typeof customInstance>;
|
|
50
67
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
51
68
|
queryKey: QueryKey;
|
|
52
69
|
};
|
|
70
|
+
declare const getGetUserAccountSuspenseQueryOptions: <TData = UserAccountDetail, TError = ErrorType<void | DmError>>(params?: GetUserAccountParams, options?: {
|
|
71
|
+
query?: Partial<UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
72
|
+
request?: SecondParameter<typeof customInstance>;
|
|
73
|
+
} | undefined) => UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey> & {
|
|
74
|
+
queryKey: QueryKey;
|
|
75
|
+
};
|
|
76
|
+
type GetUserAccountSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUserAccount>>>;
|
|
77
|
+
type GetUserAccountSuspenseQueryError = ErrorType<void | DmError>;
|
|
78
|
+
/**
|
|
79
|
+
* @summary Get information about your account
|
|
80
|
+
*/
|
|
81
|
+
declare const useGetUserAccountSuspense: <TData = UserAccountDetail, TError = ErrorType<void | DmError>>(params?: GetUserAccountParams, options?: {
|
|
82
|
+
query?: Partial<UseSuspenseQueryOptions<UserAccountDetail, TError, TData, QueryKey>> | undefined;
|
|
83
|
+
request?: SecondParameter<typeof customInstance>;
|
|
84
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
85
|
+
queryKey: QueryKey;
|
|
86
|
+
};
|
|
53
87
|
/**
|
|
54
88
|
* @summary Patch your account
|
|
55
89
|
*/
|
|
@@ -73,7 +107,7 @@ declare const usePatchUserAccount: <TError = ErrorType<DmError>, TContext = unkn
|
|
|
73
107
|
data: UserAccountPatchBodyBody;
|
|
74
108
|
}, TContext> | undefined;
|
|
75
109
|
request?: SecondParameter<typeof customInstance>;
|
|
76
|
-
} | undefined) =>
|
|
110
|
+
} | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
|
|
77
111
|
data: UserAccountPatchBodyBody;
|
|
78
112
|
}, TContext>;
|
|
79
113
|
/**
|
|
@@ -84,7 +118,7 @@ declare const usePatchUserAccount: <TError = ErrorType<DmError>, TContext = unkn
|
|
|
84
118
|
declare const getUserApiLog: (params?: GetUserApiLogParams, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<UserApiLogGetResponse>;
|
|
85
119
|
declare const getGetUserApiLogQueryKey: (params?: GetUserApiLogParams) => readonly ["data-manager-api", "/user/api-log", ...GetUserApiLogParams[]];
|
|
86
120
|
declare const getGetUserApiLogQueryOptions: <TData = UserApiLogGetResponse, TError = ErrorType<void>>(params?: GetUserApiLogParams, options?: {
|
|
87
|
-
query?: UseQueryOptions<UserApiLogGetResponse, TError, TData, QueryKey
|
|
121
|
+
query?: Partial<UseQueryOptions<UserApiLogGetResponse, TError, TData, QueryKey>> | undefined;
|
|
88
122
|
request?: SecondParameter<typeof customInstance>;
|
|
89
123
|
} | undefined) => UseQueryOptions<UserApiLogGetResponse, TError, TData, QueryKey> & {
|
|
90
124
|
queryKey: QueryKey;
|
|
@@ -95,10 +129,27 @@ type GetUserApiLogQueryError = ErrorType<void>;
|
|
|
95
129
|
* @summary Get the API call log recorded against your account
|
|
96
130
|
*/
|
|
97
131
|
declare const useGetUserApiLog: <TData = UserApiLogGetResponse, TError = ErrorType<void>>(params?: GetUserApiLogParams, options?: {
|
|
98
|
-
query?: UseQueryOptions<UserApiLogGetResponse, TError, TData, QueryKey
|
|
132
|
+
query?: Partial<UseQueryOptions<UserApiLogGetResponse, TError, TData, QueryKey>> | undefined;
|
|
99
133
|
request?: SecondParameter<typeof customInstance>;
|
|
100
134
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
101
135
|
queryKey: QueryKey;
|
|
102
136
|
};
|
|
137
|
+
declare const getGetUserApiLogSuspenseQueryOptions: <TData = UserApiLogGetResponse, TError = ErrorType<void>>(params?: GetUserApiLogParams, options?: {
|
|
138
|
+
query?: Partial<UseSuspenseQueryOptions<UserApiLogGetResponse, TError, TData, QueryKey>> | undefined;
|
|
139
|
+
request?: SecondParameter<typeof customInstance>;
|
|
140
|
+
} | undefined) => UseSuspenseQueryOptions<UserApiLogGetResponse, TError, TData, QueryKey> & {
|
|
141
|
+
queryKey: QueryKey;
|
|
142
|
+
};
|
|
143
|
+
type GetUserApiLogSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getUserApiLog>>>;
|
|
144
|
+
type GetUserApiLogSuspenseQueryError = ErrorType<void>;
|
|
145
|
+
/**
|
|
146
|
+
* @summary Get the API call log recorded against your account
|
|
147
|
+
*/
|
|
148
|
+
declare const useGetUserApiLogSuspense: <TData = UserApiLogGetResponse, TError = ErrorType<void>>(params?: GetUserApiLogParams, options?: {
|
|
149
|
+
query?: Partial<UseSuspenseQueryOptions<UserApiLogGetResponse, TError, TData, QueryKey>> | undefined;
|
|
150
|
+
request?: SecondParameter<typeof customInstance>;
|
|
151
|
+
} | undefined) => UseSuspenseQueryResult<TData, TError> & {
|
|
152
|
+
queryKey: QueryKey;
|
|
153
|
+
};
|
|
103
154
|
|
|
104
|
-
export { GetUserAccountQueryError, GetUserAccountQueryResult, GetUserApiLogQueryError, GetUserApiLogQueryResult, GetUsersQueryError, GetUsersQueryResult, PatchUserAccountMutationBody, PatchUserAccountMutationError, PatchUserAccountMutationResult, getGetUserAccountQueryKey, getGetUserAccountQueryOptions, getGetUserApiLogQueryKey, getGetUserApiLogQueryOptions, getGetUsersQueryKey, getGetUsersQueryOptions, getPatchUserAccountMutationOptions, getUserAccount, getUserApiLog, getUsers, patchUserAccount, useGetUserAccount, useGetUserApiLog, useGetUsers, usePatchUserAccount };
|
|
155
|
+
export { type GetUserAccountQueryError, type GetUserAccountQueryResult, type GetUserAccountSuspenseQueryError, type GetUserAccountSuspenseQueryResult, type GetUserApiLogQueryError, type GetUserApiLogQueryResult, type GetUserApiLogSuspenseQueryError, type GetUserApiLogSuspenseQueryResult, type GetUsersQueryError, type GetUsersQueryResult, type GetUsersSuspenseQueryError, type GetUsersSuspenseQueryResult, type PatchUserAccountMutationBody, type PatchUserAccountMutationError, type PatchUserAccountMutationResult, getGetUserAccountQueryKey, getGetUserAccountQueryOptions, getGetUserAccountSuspenseQueryOptions, getGetUserApiLogQueryKey, getGetUserApiLogQueryOptions, getGetUserApiLogSuspenseQueryOptions, getGetUsersQueryKey, getGetUsersQueryOptions, getGetUsersSuspenseQueryOptions, getPatchUserAccountMutationOptions, getUserAccount, getUserApiLog, getUsers, patchUserAccount, useGetUserAccount, useGetUserAccountSuspense, useGetUserApiLog, useGetUserApiLogSuspense, useGetUsers, useGetUsersSuspense, usePatchUserAccount };
|