@squonk/data-manager-client 4.2.0 → 5.0.0-5-0.2173777171
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/accounting/accounting.cjs +140 -94
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.d.cts +104 -47
- package/accounting/accounting.d.ts +104 -47
- package/accounting/accounting.js +146 -100
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +120 -145
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.d.cts +123 -121
- package/admin/admin.d.ts +123 -121
- package/admin/admin.js +127 -152
- package/admin/admin.js.map +1 -1
- package/application/application.cjs +39 -43
- package/application/application.cjs.map +1 -1
- package/application/application.d.cts +25 -25
- package/application/application.d.ts +25 -25
- package/application/application.js +42 -46
- package/application/application.js.map +1 -1
- package/chunk-76ADQBHZ.js +25 -0
- package/chunk-76ADQBHZ.js.map +1 -0
- package/chunk-KHB5TJT7.cjs +25 -0
- package/chunk-KHB5TJT7.cjs.map +1 -0
- package/{chunk-TKLTUR4R.cjs → chunk-RB2KVIEK.cjs} +1 -1
- package/chunk-RB2KVIEK.cjs.map +1 -0
- package/{chunk-EBOQPVLG.js → chunk-XYDLYMQ2.js} +1 -1
- package/chunk-XYDLYMQ2.js.map +1 -0
- package/configuration/configuration.cjs +38 -45
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +26 -26
- package/configuration/configuration.d.ts +26 -26
- package/configuration/configuration.js +42 -49
- package/configuration/configuration.js.map +1 -1
- package/dataset/dataset.cjs +126 -141
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.d.cts +102 -102
- package/dataset/dataset.d.ts +102 -102
- package/dataset/dataset.js +132 -147
- package/dataset/dataset.js.map +1 -1
- package/digest/digest.cjs +22 -24
- package/digest/digest.cjs.map +1 -1
- package/digest/digest.d.cts +14 -14
- package/digest/digest.d.ts +14 -14
- package/digest/digest.js +24 -26
- package/digest/digest.js.map +1 -1
- package/file-and-path/file-and-path.cjs +212 -135
- package/file-and-path/file-and-path.cjs.map +1 -1
- package/file-and-path/file-and-path.d.cts +263 -103
- package/file-and-path/file-and-path.d.ts +263 -103
- package/file-and-path/file-and-path.js +222 -145
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs +83 -103
- package/index.cjs.map +1 -1
- package/index.d.cts +2434 -2343
- package/index.d.ts +2434 -2343
- package/index.js +82 -102
- package/index.js.map +1 -1
- package/instance/instance.cjs +100 -107
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.d.cts +76 -76
- package/instance/instance.d.ts +76 -76
- package/instance/instance.js +105 -112
- package/instance/instance.js.map +1 -1
- package/inventory/inventory.cjs +22 -25
- package/inventory/inventory.cjs.map +1 -1
- package/inventory/inventory.d.cts +14 -14
- package/inventory/inventory.d.ts +14 -14
- package/inventory/inventory.js +24 -27
- package/inventory/inventory.js.map +1 -1
- package/job/job.cjs +170 -66
- package/job/job.cjs.map +1 -1
- package/job/job.d.cts +193 -37
- package/job/job.d.ts +193 -37
- package/job/job.js +176 -72
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +61 -59
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.d.cts +47 -47
- package/metadata/metadata.d.ts +47 -47
- package/metadata/metadata.js +65 -63
- package/metadata/metadata.js.map +1 -1
- package/package.json +13 -16
- package/project/project.cjs +113 -256
- package/project/project.cjs.map +1 -1
- package/project/project.d.cts +122 -282
- package/project/project.d.ts +122 -282
- package/project/project.js +118 -261
- package/project/project.js.map +1 -1
- package/src/{data-manager-api.schemas.ts → API_TARGET_NAME.schemas.ts} +2538 -2483
- package/src/accounting/accounting.ts +1003 -455
- package/src/admin/admin.ts +1190 -788
- package/src/application/application.ts +378 -232
- package/src/configuration/configuration.ts +350 -243
- package/src/custom-instance.ts +3 -3
- package/src/dataset/dataset.ts +1200 -793
- package/src/digest/digest.ts +199 -123
- package/src/file-and-path/file-and-path.ts +1456 -603
- package/src/index.ts +3 -3
- package/src/instance/instance.ts +805 -540
- package/src/inventory/inventory.ts +201 -123
- package/src/job/job.ts +1134 -330
- package/src/metadata/metadata.ts +588 -372
- package/src/options-mutator.ts +27 -0
- package/src/project/project.ts +1064 -1121
- package/src/task/task.ts +435 -296
- package/src/type/type.ts +181 -127
- package/src/user/user.ts +847 -399
- package/src/workflow/workflow.ts +1754 -1091
- package/task/task.cjs +45 -59
- package/task/task.cjs.map +1 -1
- package/task/task.d.cts +33 -33
- package/task/task.d.ts +33 -33
- package/task/task.js +51 -65
- package/task/task.js.map +1 -1
- package/type/type.cjs +21 -26
- package/type/type.cjs.map +1 -1
- package/type/type.d.cts +14 -14
- package/type/type.d.ts +14 -14
- package/type/type.js +24 -29
- package/type/type.js.map +1 -1
- package/user/user.cjs +114 -80
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +107 -48
- package/user/user.d.ts +107 -48
- package/user/user.js +120 -86
- package/user/user.js.map +1 -1
- package/workflow/workflow.cjs +179 -193
- package/workflow/workflow.cjs.map +1 -1
- package/workflow/workflow.d.cts +149 -147
- package/workflow/workflow.d.ts +149 -147
- package/workflow/workflow.js +187 -201
- package/workflow/workflow.js.map +1 -1
- package/chunk-EBOQPVLG.js.map +0 -1
- package/chunk-TKLTUR4R.cjs.map +0 -1
- package/exchange-rate/exchange-rate.cjs +0 -253
- package/exchange-rate/exchange-rate.cjs.map +0 -1
- package/exchange-rate/exchange-rate.d.cts +0 -319
- package/exchange-rate/exchange-rate.d.ts +0 -319
- package/exchange-rate/exchange-rate.js +0 -253
- package/exchange-rate/exchange-rate.js.map +0 -1
- package/exchange-rate/package.json +0 -7
- package/src/exchange-rate/exchange-rate.ts +0 -800
package/digest/digest.js
CHANGED
|
@@ -1,55 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
queryMutator
|
|
3
|
+
} from "../chunk-76ADQBHZ.js";
|
|
1
4
|
import {
|
|
2
5
|
customInstance
|
|
3
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-XYDLYMQ2.js";
|
|
4
7
|
|
|
5
8
|
// src/digest/digest.ts
|
|
6
|
-
import {
|
|
7
|
-
useQuery,
|
|
8
|
-
useSuspenseQuery
|
|
9
|
-
} from "@tanstack/react-query";
|
|
9
|
+
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
10
10
|
var getDatasetDigest = (datasetDigest, options, signal) => {
|
|
11
11
|
return customInstance(
|
|
12
|
-
{
|
|
13
|
-
url: `/digest/dataset/${datasetDigest}`,
|
|
14
|
-
method: "GET",
|
|
15
|
-
signal
|
|
16
|
-
},
|
|
12
|
+
{ url: `/digest/dataset/${datasetDigest}`, method: "GET", signal },
|
|
17
13
|
options
|
|
18
14
|
);
|
|
19
15
|
};
|
|
20
16
|
var getGetDatasetDigestQueryKey = (datasetDigest) => {
|
|
21
|
-
return [
|
|
17
|
+
return [`/digest/dataset/${datasetDigest}`];
|
|
22
18
|
};
|
|
23
|
-
var
|
|
19
|
+
var useGetDatasetDigestQueryOptions = (datasetDigest, options) => {
|
|
24
20
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
25
|
-
const queryKey =
|
|
21
|
+
const queryKey = queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);
|
|
26
22
|
const queryFn = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);
|
|
27
|
-
|
|
23
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
24
|
+
return customOptions;
|
|
28
25
|
};
|
|
29
|
-
function useGetDatasetDigest(datasetDigest, options) {
|
|
30
|
-
const queryOptions =
|
|
31
|
-
const query = useQuery(queryOptions);
|
|
26
|
+
function useGetDatasetDigest(datasetDigest, options, queryClient) {
|
|
27
|
+
const queryOptions = useGetDatasetDigestQueryOptions(datasetDigest, options);
|
|
28
|
+
const query = useQuery(queryOptions, queryClient);
|
|
32
29
|
query.queryKey = queryOptions.queryKey;
|
|
33
30
|
return query;
|
|
34
31
|
}
|
|
35
|
-
var
|
|
32
|
+
var useGetDatasetDigestSuspenseQueryOptions = (datasetDigest, options) => {
|
|
36
33
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
37
|
-
const queryKey =
|
|
34
|
+
const queryKey = queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);
|
|
38
35
|
const queryFn = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);
|
|
39
|
-
|
|
36
|
+
const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
|
|
37
|
+
return customOptions;
|
|
40
38
|
};
|
|
41
|
-
function useGetDatasetDigestSuspense(datasetDigest, options) {
|
|
42
|
-
const queryOptions =
|
|
43
|
-
const query = useSuspenseQuery(queryOptions);
|
|
39
|
+
function useGetDatasetDigestSuspense(datasetDigest, options, queryClient) {
|
|
40
|
+
const queryOptions = useGetDatasetDigestSuspenseQueryOptions(datasetDigest, options);
|
|
41
|
+
const query = useSuspenseQuery(queryOptions, queryClient);
|
|
44
42
|
query.queryKey = queryOptions.queryKey;
|
|
45
43
|
return query;
|
|
46
44
|
}
|
|
47
45
|
export {
|
|
48
46
|
getDatasetDigest,
|
|
49
47
|
getGetDatasetDigestQueryKey,
|
|
50
|
-
getGetDatasetDigestQueryOptions,
|
|
51
|
-
getGetDatasetDigestSuspenseQueryOptions,
|
|
52
48
|
useGetDatasetDigest,
|
|
53
|
-
|
|
49
|
+
useGetDatasetDigestQueryOptions,
|
|
50
|
+
useGetDatasetDigestSuspense,
|
|
51
|
+
useGetDatasetDigestSuspenseQueryOptions
|
|
54
52
|
};
|
|
55
53
|
//# sourceMappingURL=digest.js.map
|
package/digest/digest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/digest/digest.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * Generated by orval v7.4.1 🍺\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**, **Jobs**, and **Workflows** using **Projects** and **Files**.\n\n * OpenAPI spec version: 4.1\n */\nimport {\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DatasetDigestGetResponse,\n DmError\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 dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-character hex string.\n\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const getDatasetDigest = (\n datasetDigest: string,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetDigestGetResponse>(\n {url: `/digest/dataset/${datasetDigest}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string,) => {\n return [\"data-manager-api\", `/digest/dataset/${datasetDigest}`] as const;\n }\n\n \nexport const getGetDatasetDigestQueryOptions = <TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(datasetDigest: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasetDigest>>> = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetDigest), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetDatasetDigestQueryResult = NonNullable<Awaited<ReturnType<typeof getDatasetDigest>>>\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>\n\n\nexport function useGetDatasetDigest<TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options: { query:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>> & Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetDatasetDigest<TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>> & Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n > , 'initialData'\n >, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetDatasetDigest<TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets the first Dataset that matches the provided digest\n */\n\nexport function useGetDatasetDigest<TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetDatasetDigestQueryOptions(datasetDigest,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetDatasetDigestSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(datasetDigest: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasetDigest>>> = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData> & { queryKey: DataTag<QueryKey, TData, TError> }\n}\n\nexport type GetDatasetDigestSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getDatasetDigest>>>\nexport type GetDatasetDigestSuspenseQueryError = ErrorType<void | DmError>\n\n\nexport function useGetDatasetDigestSuspense<TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options: { query:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetDatasetDigestSuspense<TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\nexport function useGetDatasetDigestSuspense<TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> }\n/**\n * @summary Gets the first Dataset that matches the provided digest\n */\n\nexport function useGetDatasetDigestSuspense<TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n\n const queryOptions = getGetDatasetDigestSuspenseQueryOptions(datasetDigest,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"],"mappings":";;;;;AAWA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA6BA,IAAM,mBAAmB,CAC5B,eACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,mBAAmB,aAAa;AAAA,MAAI,QAAQ;AAAA,MAAO;AAAA,IAC3D;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,8BAA8B,CAAC,kBAA2B;AACnE,SAAO,CAAC,oBAAoB,mBAAmB,aAAa,EAAE;AAC9D;AAGG,IAAM,kCAAkC,CAA2F,eAAuB,YAC5J;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,4BAA4B,aAAa;AAInF,QAAM,UAAuE,CAAC,EAAE,OAAO,MAAM,iBAAiB,eAAe,gBAAgB,MAAM;AAMpJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,eAAgB,GAAG,aAAY;AAC3E;AAkCO,SAAS,oBACf,eAAuB,SAE6D;AAEnF,QAAM,eAAe,gCAAgC,eAAc,OAAO;AAE1E,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAIO,IAAM,0CAA0C,CAA2F,eAAuB,YACpK;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,4BAA4B,aAAa;AAInF,QAAM,UAAuE,CAAC,EAAE,OAAO,MAAM,iBAAiB,eAAe,gBAAgB,MAAM;AAMpJ,SAAQ,EAAE,UAAU,SAAS,GAAG,aAAY;AAC/C;AAsBO,SAAS,4BACf,eAAuB,SAEqE;AAE3F,QAAM,eAAe,wCAAwC,eAAc,OAAO;AAElF,QAAM,QAAQ,iBAAiB,YAAY;AAE3C,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/digest/digest.ts"],"sourcesContent":["/**\n * Generated by orval v7.10.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**, **Jobs**, and **Workflows** using **Projects** and **Files**.\n\n * OpenAPI spec version: 5.0\n */\nimport { useQuery, useSuspenseQuery } from \"@tanstack/react-query\";\nimport type {\n DataTag,\n DefinedInitialDataOptions,\n DefinedUseQueryResult,\n QueryClient,\n QueryFunction,\n QueryKey,\n UndefinedInitialDataOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult,\n} from \"@tanstack/react-query\";\n\nimport type { DatasetDigestGetResponse, DmError } from \"../API_TARGET_NAME.schemas\";\n\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\nimport { queryMutator } from \".././options-mutator\";\n\ntype SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];\n\n/**\n * Returns a dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-character hex string.\n\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const getDatasetDigest = (\n datasetDigest: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal,\n) => {\n return customInstance<DatasetDigestGetResponse>(\n { url: `/digest/dataset/${datasetDigest}`, method: \"GET\", signal },\n options,\n );\n};\n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string) => {\n return [`/digest/dataset/${datasetDigest}`] as const;\n};\n\nexport const useGetDatasetDigestQueryOptions = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>,\n>(\n datasetDigest: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasetDigest>>> = ({ signal }) =>\n getDatasetDigest(datasetDigest, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetDatasetDigestQueryResult = NonNullable<Awaited<ReturnType<typeof getDatasetDigest>>>;\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>;\n\nexport function useGetDatasetDigest<\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>,\n>(\n datasetDigest: string,\n options: {\n query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>> &\n Pick<\n DefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n Awaited<ReturnType<typeof getDatasetDigest>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetDatasetDigest<\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>,\n>(\n datasetDigest: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>> &\n Pick<\n UndefinedInitialDataOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n Awaited<ReturnType<typeof getDatasetDigest>>\n >,\n \"initialData\"\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetDatasetDigest<\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>,\n>(\n datasetDigest: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the first Dataset that matches the provided digest\n */\n\nexport function useGetDatasetDigest<\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>,\n>(\n datasetDigest: string,\n options?: {\n query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>>;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetDatasetDigestQueryOptions(datasetDigest, options);\n\n const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {\n queryKey: DataTag<QueryKey, TData, TError>;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n\nexport const useGetDatasetDigestSuspenseQueryOptions = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>,\n>(\n datasetDigest: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n) => {\n const { query: queryOptions, request: requestOptions } = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasetDigest>>> = ({ signal }) =>\n getDatasetDigest(datasetDigest, requestOptions, signal);\n\n const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });\n\n return customOptions as UseSuspenseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n};\n\nexport type GetDatasetDigestSuspenseQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasetDigest>>\n>;\nexport type GetDatasetDigestSuspenseQueryError = ErrorType<void | DmError>;\n\nexport function useGetDatasetDigestSuspense<\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>,\n>(\n datasetDigest: string,\n options: {\n query: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetDatasetDigestSuspense<\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>,\n>(\n datasetDigest: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\nexport function useGetDatasetDigestSuspense<\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>,\n>(\n datasetDigest: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };\n/**\n * @summary Gets the first Dataset that matches the provided digest\n */\n\nexport function useGetDatasetDigestSuspense<\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>,\n>(\n datasetDigest: string,\n options?: {\n query?: Partial<\n UseSuspenseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>\n >;\n request?: SecondParameter<typeof customInstance>;\n },\n queryClient?: QueryClient,\n): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {\n const queryOptions = useGetDatasetDigestSuspenseQueryOptions(datasetDigest, options);\n\n const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<\n TData,\n TError\n > & { queryKey: DataTag<QueryKey, TData, TError> };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n}\n"],"mappings":";;;;;;;;AAUA,SAAS,UAAU,wBAAwB;AA4BpC,IAAM,mBAAmB,CAC9B,eACA,SACA,WACG;AACH,SAAO;AAAA,IACL,EAAE,KAAK,mBAAmB,aAAa,IAAI,QAAQ,OAAO,OAAO;AAAA,IACjE;AAAA,EACF;AACF;AAEO,IAAM,8BAA8B,CAAC,kBAA0B;AACpE,SAAO,CAAC,mBAAmB,aAAa,EAAE;AAC5C;AAEO,IAAM,kCAAkC,CAI7C,eACA,YAIG;AACH,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,WAAW,cAAc,YAAY,4BAA4B,aAAa;AAEpF,QAAM,UAAuE,CAAC,EAAE,OAAO,MACrF,iBAAiB,eAAe,gBAAgB,MAAM;AAExD,QAAM,gBAAgB,aAAa,EAAE,GAAG,cAAc,UAAU,QAAQ,CAAC;AAEzE,SAAO;AAKT;AA0DO,SAAS,oBAId,eACA,SAIA,aACgF;AAChF,QAAM,eAAe,gCAAgC,eAAe,OAAO;AAE3E,QAAM,QAAQ,SAAS,cAAc,WAAW;AAIhD,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAEO,IAAM,0CAA0C,CAIrD,eACA,YAMG;AACH,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,WAAW,cAAc,YAAY,4BAA4B,aAAa;AAEpF,QAAM,UAAuE,CAAC,EAAE,OAAO,MACrF,iBAAiB,eAAe,gBAAgB,MAAM;AAExD,QAAM,gBAAgB,aAAa,EAAE,GAAG,cAAc,UAAU,QAAQ,CAAC;AAEzE,SAAO;AAKT;AAkDO,SAAS,4BAId,eACA,SAMA,aACwF;AACxF,QAAM,eAAe,wCAAwC,eAAe,OAAO;AAEnF,QAAM,QAAQ,iBAAiB,cAAc,WAAW;AAKxD,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;","names":[]}
|
|
@@ -1,136 +1,219 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var _chunkTKLTUR4Rcjs = require('../chunk-TKLTUR4R.cjs');
|
|
4
|
-
|
|
5
|
-
// src/file-and-path/file-and-path.ts
|
|
6
3
|
|
|
4
|
+
var _chunkKHB5TJT7cjs = require('../chunk-KHB5TJT7.cjs');
|
|
7
5
|
|
|
8
6
|
|
|
7
|
+
var _chunkRB2KVIEKcjs = require('../chunk-RB2KVIEK.cjs');
|
|
9
8
|
|
|
9
|
+
// src/file-and-path/file-and-path.ts
|
|
10
10
|
var _reactquery = require('@tanstack/react-query');
|
|
11
11
|
var createPath = (params, options) => {
|
|
12
|
-
return
|
|
13
|
-
{
|
|
14
|
-
url: `/path`,
|
|
15
|
-
method: "PUT",
|
|
16
|
-
params
|
|
17
|
-
},
|
|
18
|
-
options
|
|
19
|
-
);
|
|
12
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/path`, method: "PUT", params }, options);
|
|
20
13
|
};
|
|
21
|
-
var
|
|
14
|
+
var useCreatePathMutationOptions = (options) => {
|
|
22
15
|
const mutationKey = ["createPath"];
|
|
23
16
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
24
17
|
const mutationFn = (props) => {
|
|
25
18
|
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
26
19
|
return createPath(params, requestOptions);
|
|
27
20
|
};
|
|
28
|
-
|
|
21
|
+
const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
22
|
+
return customOptions;
|
|
29
23
|
};
|
|
30
|
-
var useCreatePath = (options) => {
|
|
31
|
-
const mutationOptions =
|
|
32
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
24
|
+
var useCreatePath = (options, queryClient) => {
|
|
25
|
+
const mutationOptions = useCreatePathMutationOptions(options);
|
|
26
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
33
27
|
};
|
|
34
28
|
var deletePath = (params, options) => {
|
|
35
|
-
return
|
|
36
|
-
{
|
|
37
|
-
url: `/path`,
|
|
38
|
-
method: "DELETE",
|
|
39
|
-
params
|
|
40
|
-
},
|
|
41
|
-
options
|
|
42
|
-
);
|
|
29
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/path`, method: "DELETE", params }, options);
|
|
43
30
|
};
|
|
44
|
-
var
|
|
31
|
+
var useDeletePathMutationOptions = (options) => {
|
|
45
32
|
const mutationKey = ["deletePath"];
|
|
46
33
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
47
34
|
const mutationFn = (props) => {
|
|
48
35
|
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
49
36
|
return deletePath(params, requestOptions);
|
|
50
37
|
};
|
|
51
|
-
|
|
38
|
+
const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
39
|
+
return customOptions;
|
|
52
40
|
};
|
|
53
|
-
var useDeletePath = (options) => {
|
|
54
|
-
const mutationOptions =
|
|
55
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
41
|
+
var useDeletePath = (options, queryClient) => {
|
|
42
|
+
const mutationOptions = useDeletePathMutationOptions(options);
|
|
43
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
56
44
|
};
|
|
57
45
|
var movePath = (params, options) => {
|
|
58
|
-
return
|
|
59
|
-
{
|
|
60
|
-
url: `/path/move`,
|
|
61
|
-
method: "PUT",
|
|
62
|
-
params
|
|
63
|
-
},
|
|
64
|
-
options
|
|
65
|
-
);
|
|
46
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/path/move`, method: "PUT", params }, options);
|
|
66
47
|
};
|
|
67
|
-
var
|
|
48
|
+
var useMovePathMutationOptions = (options) => {
|
|
68
49
|
const mutationKey = ["movePath"];
|
|
69
50
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
70
51
|
const mutationFn = (props) => {
|
|
71
52
|
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
72
53
|
return movePath(params, requestOptions);
|
|
73
54
|
};
|
|
74
|
-
|
|
55
|
+
const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
56
|
+
return customOptions;
|
|
75
57
|
};
|
|
76
|
-
var useMovePath = (options) => {
|
|
77
|
-
const mutationOptions =
|
|
78
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
58
|
+
var useMovePath = (options, queryClient) => {
|
|
59
|
+
const mutationOptions = useMovePathMutationOptions(options);
|
|
60
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
79
61
|
};
|
|
80
|
-
var
|
|
81
|
-
return
|
|
62
|
+
var getProjectFile = (projectId, params, options, signal) => {
|
|
63
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0,
|
|
64
|
+
{ url: `/project/${projectId}/file`, method: "GET", params, signal },
|
|
65
|
+
options
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
var getGetProjectFileQueryKey = (projectId, params) => {
|
|
69
|
+
return [`/project/${projectId}/file`, ...params ? [params] : []];
|
|
70
|
+
};
|
|
71
|
+
var useGetProjectFileQueryOptions = (projectId, params, options) => {
|
|
72
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
73
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _ => _.queryKey]), () => ( getGetProjectFileQueryKey(projectId, params)));
|
|
74
|
+
const queryFn = ({ signal }) => getProjectFile(projectId, params, requestOptions, signal);
|
|
75
|
+
const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
76
|
+
return customOptions;
|
|
77
|
+
};
|
|
78
|
+
function useGetProjectFile(projectId, params, options, queryClient) {
|
|
79
|
+
const queryOptions = useGetProjectFileQueryOptions(projectId, params, options);
|
|
80
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions, queryClient);
|
|
81
|
+
query.queryKey = queryOptions.queryKey;
|
|
82
|
+
return query;
|
|
83
|
+
}
|
|
84
|
+
var useGetProjectFileSuspenseQueryOptions = (projectId, params, options) => {
|
|
85
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
86
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _2 => _2.queryKey]), () => ( getGetProjectFileQueryKey(projectId, params)));
|
|
87
|
+
const queryFn = ({ signal }) => getProjectFile(projectId, params, requestOptions, signal);
|
|
88
|
+
const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
89
|
+
return customOptions;
|
|
90
|
+
};
|
|
91
|
+
function useGetProjectFileSuspense(projectId, params, options, queryClient) {
|
|
92
|
+
const queryOptions = useGetProjectFileSuspenseQueryOptions(projectId, params, options);
|
|
93
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions, queryClient);
|
|
94
|
+
query.queryKey = queryOptions.queryKey;
|
|
95
|
+
return query;
|
|
96
|
+
}
|
|
97
|
+
var addFileToProject = (projectId, projectFilePutBodyBody, options) => {
|
|
98
|
+
const formData = new FormData();
|
|
99
|
+
formData.append(`file`, projectFilePutBodyBody.file);
|
|
100
|
+
if (projectFilePutBodyBody.as_filename !== void 0) {
|
|
101
|
+
formData.append(`as_filename`, projectFilePutBodyBody.as_filename);
|
|
102
|
+
}
|
|
103
|
+
if (projectFilePutBodyBody.path !== void 0) {
|
|
104
|
+
formData.append(`path`, projectFilePutBodyBody.path);
|
|
105
|
+
}
|
|
106
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0,
|
|
82
107
|
{
|
|
83
|
-
url: `/file`,
|
|
84
|
-
method: "
|
|
85
|
-
|
|
86
|
-
|
|
108
|
+
url: `/project/${projectId}/file`,
|
|
109
|
+
method: "PUT",
|
|
110
|
+
headers: { "Content-Type": "multipart/form-data" },
|
|
111
|
+
data: formData
|
|
87
112
|
},
|
|
88
113
|
options
|
|
89
114
|
);
|
|
90
115
|
};
|
|
116
|
+
var useAddFileToProjectMutationOptions = (options) => {
|
|
117
|
+
const mutationKey = ["addFileToProject"];
|
|
118
|
+
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
119
|
+
const mutationFn = (props) => {
|
|
120
|
+
const { projectId, data } = _nullishCoalesce(props, () => ( {}));
|
|
121
|
+
return addFileToProject(projectId, data, requestOptions);
|
|
122
|
+
};
|
|
123
|
+
const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
124
|
+
return customOptions;
|
|
125
|
+
};
|
|
126
|
+
var useAddFileToProject = (options, queryClient) => {
|
|
127
|
+
const mutationOptions = useAddFileToProjectMutationOptions(options);
|
|
128
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
129
|
+
};
|
|
130
|
+
var getProjectFileWithToken = (projectId, params, options, signal) => {
|
|
131
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0,
|
|
132
|
+
{ url: `/project/${projectId}/file-with-token`, method: "GET", params, signal },
|
|
133
|
+
options
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
var getGetProjectFileWithTokenQueryKey = (projectId, params) => {
|
|
137
|
+
return [`/project/${projectId}/file-with-token`, ...params ? [params] : []];
|
|
138
|
+
};
|
|
139
|
+
var useGetProjectFileWithTokenQueryOptions = (projectId, params, options) => {
|
|
140
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
141
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _3 => _3.queryKey]), () => ( getGetProjectFileWithTokenQueryKey(projectId, params)));
|
|
142
|
+
const queryFn = ({
|
|
143
|
+
signal
|
|
144
|
+
}) => getProjectFileWithToken(projectId, params, requestOptions, signal);
|
|
145
|
+
const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
146
|
+
return customOptions;
|
|
147
|
+
};
|
|
148
|
+
function useGetProjectFileWithToken(projectId, params, options, queryClient) {
|
|
149
|
+
const queryOptions = useGetProjectFileWithTokenQueryOptions(projectId, params, options);
|
|
150
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions, queryClient);
|
|
151
|
+
query.queryKey = queryOptions.queryKey;
|
|
152
|
+
return query;
|
|
153
|
+
}
|
|
154
|
+
var useGetProjectFileWithTokenSuspenseQueryOptions = (projectId, params, options) => {
|
|
155
|
+
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
156
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _4 => _4.queryKey]), () => ( getGetProjectFileWithTokenQueryKey(projectId, params)));
|
|
157
|
+
const queryFn = ({
|
|
158
|
+
signal
|
|
159
|
+
}) => getProjectFileWithToken(projectId, params, requestOptions, signal);
|
|
160
|
+
const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
161
|
+
return customOptions;
|
|
162
|
+
};
|
|
163
|
+
function useGetProjectFileWithTokenSuspense(projectId, params, options, queryClient) {
|
|
164
|
+
const queryOptions = useGetProjectFileWithTokenSuspenseQueryOptions(projectId, params, options);
|
|
165
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions, queryClient);
|
|
166
|
+
query.queryKey = queryOptions.queryKey;
|
|
167
|
+
return query;
|
|
168
|
+
}
|
|
169
|
+
var getFiles = (params, options, signal) => {
|
|
170
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/file`, method: "GET", params, signal }, options);
|
|
171
|
+
};
|
|
91
172
|
var getGetFilesQueryKey = (params) => {
|
|
92
|
-
return [
|
|
173
|
+
return [`/file`, ...params ? [params] : []];
|
|
93
174
|
};
|
|
94
|
-
var
|
|
175
|
+
var useGetFilesQueryOptions = (params, options) => {
|
|
95
176
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
96
|
-
const queryKey = _nullishCoalesce((queryOptions
|
|
177
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _5 => _5.queryKey]), () => ( getGetFilesQueryKey(params)));
|
|
97
178
|
const queryFn = ({ signal }) => getFiles(params, requestOptions, signal);
|
|
98
|
-
|
|
179
|
+
const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
180
|
+
return customOptions;
|
|
99
181
|
};
|
|
100
|
-
function useGetFiles(params, options) {
|
|
101
|
-
const queryOptions =
|
|
102
|
-
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
182
|
+
function useGetFiles(params, options, queryClient) {
|
|
183
|
+
const queryOptions = useGetFilesQueryOptions(params, options);
|
|
184
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions, queryClient);
|
|
103
185
|
query.queryKey = queryOptions.queryKey;
|
|
104
186
|
return query;
|
|
105
187
|
}
|
|
106
|
-
var
|
|
188
|
+
var useGetFilesSuspenseQueryOptions = (params, options) => {
|
|
107
189
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
108
|
-
const queryKey = _nullishCoalesce((queryOptions
|
|
190
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _6 => _6.queryKey]), () => ( getGetFilesQueryKey(params)));
|
|
109
191
|
const queryFn = ({ signal }) => getFiles(params, requestOptions, signal);
|
|
110
|
-
|
|
192
|
+
const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
193
|
+
return customOptions;
|
|
111
194
|
};
|
|
112
|
-
function useGetFilesSuspense(params, options) {
|
|
113
|
-
const queryOptions =
|
|
114
|
-
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
195
|
+
function useGetFilesSuspense(params, options, queryClient) {
|
|
196
|
+
const queryOptions = useGetFilesSuspenseQueryOptions(params, options);
|
|
197
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions, queryClient);
|
|
115
198
|
query.queryKey = queryOptions.queryKey;
|
|
116
199
|
return query;
|
|
117
200
|
}
|
|
118
201
|
var attachFile = (filePostBodyBody, options, signal) => {
|
|
119
202
|
const formUrlEncoded = new URLSearchParams();
|
|
120
|
-
formUrlEncoded.append(
|
|
121
|
-
formUrlEncoded.append(
|
|
122
|
-
formUrlEncoded.append(
|
|
123
|
-
formUrlEncoded.append(
|
|
203
|
+
formUrlEncoded.append(`dataset_id`, filePostBodyBody.dataset_id);
|
|
204
|
+
formUrlEncoded.append(`dataset_version`, filePostBodyBody.dataset_version.toString());
|
|
205
|
+
formUrlEncoded.append(`project_id`, filePostBodyBody.project_id);
|
|
206
|
+
formUrlEncoded.append(`as_type`, filePostBodyBody.as_type);
|
|
124
207
|
if (filePostBodyBody.path !== void 0) {
|
|
125
|
-
formUrlEncoded.append(
|
|
208
|
+
formUrlEncoded.append(`path`, filePostBodyBody.path);
|
|
126
209
|
}
|
|
127
210
|
if (filePostBodyBody.compress !== void 0) {
|
|
128
|
-
formUrlEncoded.append(
|
|
211
|
+
formUrlEncoded.append(`compress`, filePostBodyBody.compress.toString());
|
|
129
212
|
}
|
|
130
213
|
if (filePostBodyBody.immutable !== void 0) {
|
|
131
|
-
formUrlEncoded.append(
|
|
214
|
+
formUrlEncoded.append(`immutable`, filePostBodyBody.immutable.toString());
|
|
132
215
|
}
|
|
133
|
-
return
|
|
216
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0,
|
|
134
217
|
{
|
|
135
218
|
url: `/file`,
|
|
136
219
|
method: "POST",
|
|
@@ -141,121 +224,100 @@ var attachFile = (filePostBodyBody, options, signal) => {
|
|
|
141
224
|
options
|
|
142
225
|
);
|
|
143
226
|
};
|
|
144
|
-
var
|
|
227
|
+
var useAttachFileMutationOptions = (options) => {
|
|
145
228
|
const mutationKey = ["attachFile"];
|
|
146
229
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
147
230
|
const mutationFn = (props) => {
|
|
148
231
|
const { data } = _nullishCoalesce(props, () => ( {}));
|
|
149
232
|
return attachFile(data, requestOptions);
|
|
150
233
|
};
|
|
151
|
-
|
|
234
|
+
const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
235
|
+
return customOptions;
|
|
152
236
|
};
|
|
153
|
-
var useAttachFile = (options) => {
|
|
154
|
-
const mutationOptions =
|
|
155
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
237
|
+
var useAttachFile = (options, queryClient) => {
|
|
238
|
+
const mutationOptions = useAttachFileMutationOptions(options);
|
|
239
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
156
240
|
};
|
|
157
241
|
var deleteUnmanagedFile = (params, options) => {
|
|
158
|
-
return
|
|
159
|
-
{
|
|
160
|
-
url: `/file`,
|
|
161
|
-
method: "DELETE",
|
|
162
|
-
params
|
|
163
|
-
},
|
|
164
|
-
options
|
|
165
|
-
);
|
|
242
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/file`, method: "DELETE", params }, options);
|
|
166
243
|
};
|
|
167
|
-
var
|
|
244
|
+
var useDeleteUnmanagedFileMutationOptions = (options) => {
|
|
168
245
|
const mutationKey = ["deleteUnmanagedFile"];
|
|
169
246
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
170
247
|
const mutationFn = (props) => {
|
|
171
248
|
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
172
249
|
return deleteUnmanagedFile(params, requestOptions);
|
|
173
250
|
};
|
|
174
|
-
|
|
251
|
+
const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
252
|
+
return customOptions;
|
|
175
253
|
};
|
|
176
|
-
var useDeleteUnmanagedFile = (options) => {
|
|
177
|
-
const mutationOptions =
|
|
178
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
254
|
+
var useDeleteUnmanagedFile = (options, queryClient) => {
|
|
255
|
+
const mutationOptions = useDeleteUnmanagedFileMutationOptions(options);
|
|
256
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
179
257
|
};
|
|
180
258
|
var moveFileInProject = (params, options) => {
|
|
181
|
-
return
|
|
182
|
-
{
|
|
183
|
-
url: `/file/move`,
|
|
184
|
-
method: "PUT",
|
|
185
|
-
params
|
|
186
|
-
},
|
|
187
|
-
options
|
|
188
|
-
);
|
|
259
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/file/move`, method: "PUT", params }, options);
|
|
189
260
|
};
|
|
190
|
-
var
|
|
261
|
+
var useMoveFileInProjectMutationOptions = (options) => {
|
|
191
262
|
const mutationKey = ["moveFileInProject"];
|
|
192
263
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
193
264
|
const mutationFn = (props) => {
|
|
194
265
|
const { params } = _nullishCoalesce(props, () => ( {}));
|
|
195
266
|
return moveFileInProject(params, requestOptions);
|
|
196
267
|
};
|
|
197
|
-
|
|
268
|
+
const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
269
|
+
return customOptions;
|
|
198
270
|
};
|
|
199
|
-
var useMoveFileInProject = (options) => {
|
|
200
|
-
const mutationOptions =
|
|
201
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
271
|
+
var useMoveFileInProject = (options, queryClient) => {
|
|
272
|
+
const mutationOptions = useMoveFileInProjectMutationOptions(options);
|
|
273
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
202
274
|
};
|
|
203
275
|
var deleteFile = (fileId, options) => {
|
|
204
|
-
return
|
|
205
|
-
{
|
|
206
|
-
url: `/file/${fileId}`,
|
|
207
|
-
method: "DELETE"
|
|
208
|
-
},
|
|
209
|
-
options
|
|
210
|
-
);
|
|
276
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/file/${fileId}`, method: "DELETE" }, options);
|
|
211
277
|
};
|
|
212
|
-
var
|
|
278
|
+
var useDeleteFileMutationOptions = (options) => {
|
|
213
279
|
const mutationKey = ["deleteFile"];
|
|
214
280
|
const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: void 0 };
|
|
215
281
|
const mutationFn = (props) => {
|
|
216
282
|
const { fileId } = _nullishCoalesce(props, () => ( {}));
|
|
217
283
|
return deleteFile(fileId, requestOptions);
|
|
218
284
|
};
|
|
219
|
-
|
|
285
|
+
const customOptions = _chunkKHB5TJT7cjs.mutationMutator.call(void 0, { ...mutationOptions, mutationFn });
|
|
286
|
+
return customOptions;
|
|
220
287
|
};
|
|
221
|
-
var useDeleteFile = (options) => {
|
|
222
|
-
const mutationOptions =
|
|
223
|
-
return _reactquery.useMutation.call(void 0, mutationOptions);
|
|
288
|
+
var useDeleteFile = (options, queryClient) => {
|
|
289
|
+
const mutationOptions = useDeleteFileMutationOptions(options);
|
|
290
|
+
return _reactquery.useMutation.call(void 0, mutationOptions, queryClient);
|
|
224
291
|
};
|
|
225
292
|
var downloadFile = (fileId, options, signal) => {
|
|
226
|
-
return
|
|
227
|
-
{
|
|
228
|
-
url: `/file/${fileId}`,
|
|
229
|
-
method: "GET",
|
|
230
|
-
signal
|
|
231
|
-
},
|
|
232
|
-
options
|
|
233
|
-
);
|
|
293
|
+
return _chunkRB2KVIEKcjs.customInstance.call(void 0, { url: `/file/${fileId}`, method: "GET", signal }, options);
|
|
234
294
|
};
|
|
235
295
|
var getDownloadFileQueryKey = (fileId) => {
|
|
236
|
-
return [
|
|
296
|
+
return [`/file/${fileId}`];
|
|
237
297
|
};
|
|
238
|
-
var
|
|
298
|
+
var useDownloadFileQueryOptions = (fileId, options) => {
|
|
239
299
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
240
|
-
const queryKey = _nullishCoalesce((queryOptions
|
|
300
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _7 => _7.queryKey]), () => ( getDownloadFileQueryKey(fileId)));
|
|
241
301
|
const queryFn = ({ signal }) => downloadFile(fileId, requestOptions, signal);
|
|
242
|
-
|
|
302
|
+
const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
303
|
+
return customOptions;
|
|
243
304
|
};
|
|
244
|
-
function useDownloadFile(fileId, options) {
|
|
245
|
-
const queryOptions =
|
|
246
|
-
const query = _reactquery.useQuery.call(void 0, queryOptions);
|
|
305
|
+
function useDownloadFile(fileId, options, queryClient) {
|
|
306
|
+
const queryOptions = useDownloadFileQueryOptions(fileId, options);
|
|
307
|
+
const query = _reactquery.useQuery.call(void 0, queryOptions, queryClient);
|
|
247
308
|
query.queryKey = queryOptions.queryKey;
|
|
248
309
|
return query;
|
|
249
310
|
}
|
|
250
|
-
var
|
|
311
|
+
var useDownloadFileSuspenseQueryOptions = (fileId, options) => {
|
|
251
312
|
const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
|
|
252
|
-
const queryKey = _nullishCoalesce((queryOptions
|
|
313
|
+
const queryKey = _nullishCoalesce(_optionalChain([queryOptions, 'optionalAccess', _8 => _8.queryKey]), () => ( getDownloadFileQueryKey(fileId)));
|
|
253
314
|
const queryFn = ({ signal }) => downloadFile(fileId, requestOptions, signal);
|
|
254
|
-
|
|
315
|
+
const customOptions = _chunkKHB5TJT7cjs.queryMutator.call(void 0, { ...queryOptions, queryKey, queryFn });
|
|
316
|
+
return customOptions;
|
|
255
317
|
};
|
|
256
|
-
function useDownloadFileSuspense(fileId, options) {
|
|
257
|
-
const queryOptions =
|
|
258
|
-
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions);
|
|
318
|
+
function useDownloadFileSuspense(fileId, options, queryClient) {
|
|
319
|
+
const queryOptions = useDownloadFileSuspenseQueryOptions(fileId, options);
|
|
320
|
+
const query = _reactquery.useSuspenseQuery.call(void 0, queryOptions, queryClient);
|
|
259
321
|
query.queryKey = queryOptions.queryKey;
|
|
260
322
|
return query;
|
|
261
323
|
}
|
|
@@ -293,5 +355,20 @@ function useDownloadFileSuspense(fileId, options) {
|
|
|
293
355
|
|
|
294
356
|
|
|
295
357
|
|
|
296
|
-
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
exports.addFileToProject = addFileToProject; exports.attachFile = attachFile; exports.createPath = createPath; exports.deleteFile = deleteFile; exports.deletePath = deletePath; exports.deleteUnmanagedFile = deleteUnmanagedFile; exports.downloadFile = downloadFile; exports.getDownloadFileQueryKey = getDownloadFileQueryKey; exports.getFiles = getFiles; exports.getGetFilesQueryKey = getGetFilesQueryKey; exports.getGetProjectFileQueryKey = getGetProjectFileQueryKey; exports.getGetProjectFileWithTokenQueryKey = getGetProjectFileWithTokenQueryKey; exports.getProjectFile = getProjectFile; exports.getProjectFileWithToken = getProjectFileWithToken; exports.moveFileInProject = moveFileInProject; exports.movePath = movePath; exports.useAddFileToProject = useAddFileToProject; exports.useAddFileToProjectMutationOptions = useAddFileToProjectMutationOptions; exports.useAttachFile = useAttachFile; exports.useAttachFileMutationOptions = useAttachFileMutationOptions; exports.useCreatePath = useCreatePath; exports.useCreatePathMutationOptions = useCreatePathMutationOptions; exports.useDeleteFile = useDeleteFile; exports.useDeleteFileMutationOptions = useDeleteFileMutationOptions; exports.useDeletePath = useDeletePath; exports.useDeletePathMutationOptions = useDeletePathMutationOptions; exports.useDeleteUnmanagedFile = useDeleteUnmanagedFile; exports.useDeleteUnmanagedFileMutationOptions = useDeleteUnmanagedFileMutationOptions; exports.useDownloadFile = useDownloadFile; exports.useDownloadFileQueryOptions = useDownloadFileQueryOptions; exports.useDownloadFileSuspense = useDownloadFileSuspense; exports.useDownloadFileSuspenseQueryOptions = useDownloadFileSuspenseQueryOptions; exports.useGetFiles = useGetFiles; exports.useGetFilesQueryOptions = useGetFilesQueryOptions; exports.useGetFilesSuspense = useGetFilesSuspense; exports.useGetFilesSuspenseQueryOptions = useGetFilesSuspenseQueryOptions; exports.useGetProjectFile = useGetProjectFile; exports.useGetProjectFileQueryOptions = useGetProjectFileQueryOptions; exports.useGetProjectFileSuspense = useGetProjectFileSuspense; exports.useGetProjectFileSuspenseQueryOptions = useGetProjectFileSuspenseQueryOptions; exports.useGetProjectFileWithToken = useGetProjectFileWithToken; exports.useGetProjectFileWithTokenQueryOptions = useGetProjectFileWithTokenQueryOptions; exports.useGetProjectFileWithTokenSuspense = useGetProjectFileWithTokenSuspense; exports.useGetProjectFileWithTokenSuspenseQueryOptions = useGetProjectFileWithTokenSuspenseQueryOptions; exports.useMoveFileInProject = useMoveFileInProject; exports.useMoveFileInProjectMutationOptions = useMoveFileInProjectMutationOptions; exports.useMovePath = useMovePath; exports.useMovePathMutationOptions = useMovePathMutationOptions;
|
|
297
374
|
//# sourceMappingURL=file-and-path.cjs.map
|