@squonk/data-manager-client 4.3.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.
Files changed (119) hide show
  1. package/accounting/accounting.cjs +55 -10
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.cts +58 -1
  4. package/accounting/accounting.d.ts +58 -1
  5. package/accounting/accounting.js +46 -1
  6. package/accounting/accounting.js.map +1 -1
  7. package/admin/admin.cjs +15 -15
  8. package/admin/admin.cjs.map +1 -1
  9. package/admin/admin.d.cts +2 -0
  10. package/admin/admin.d.ts +2 -0
  11. package/admin/admin.js +1 -1
  12. package/admin/admin.js.map +1 -1
  13. package/application/application.cjs +5 -5
  14. package/application/application.cjs.map +1 -1
  15. package/application/application.js +1 -1
  16. package/application/application.js.map +1 -1
  17. package/{chunk-OYRETEBZ.js → chunk-76ADQBHZ.js} +3 -3
  18. package/chunk-76ADQBHZ.js.map +1 -0
  19. package/{chunk-ZLY5XEOQ.cjs → chunk-KHB5TJT7.cjs} +3 -3
  20. package/chunk-KHB5TJT7.cjs.map +1 -0
  21. package/chunk-RB2KVIEK.cjs.map +1 -1
  22. package/configuration/configuration.cjs +5 -5
  23. package/configuration/configuration.cjs.map +1 -1
  24. package/configuration/configuration.d.cts +1 -1
  25. package/configuration/configuration.d.ts +1 -1
  26. package/configuration/configuration.js +1 -1
  27. package/configuration/configuration.js.map +1 -1
  28. package/dataset/dataset.cjs +14 -14
  29. package/dataset/dataset.cjs.map +1 -1
  30. package/dataset/dataset.js +1 -1
  31. package/dataset/dataset.js.map +1 -1
  32. package/digest/digest.cjs +3 -3
  33. package/digest/digest.cjs.map +1 -1
  34. package/digest/digest.js +1 -1
  35. package/digest/digest.js.map +1 -1
  36. package/file-and-path/file-and-path.cjs +139 -17
  37. package/file-and-path/file-and-path.cjs.map +1 -1
  38. package/file-and-path/file-and-path.d.cts +162 -2
  39. package/file-and-path/file-and-path.d.ts +162 -2
  40. package/file-and-path/file-and-path.js +123 -1
  41. package/file-and-path/file-and-path.js.map +1 -1
  42. package/index.cjs +4 -2
  43. package/index.cjs.map +1 -1
  44. package/index.d.cts +53 -37
  45. package/index.d.ts +53 -37
  46. package/index.js +3 -1
  47. package/index.js.map +1 -1
  48. package/instance/instance.cjs +10 -10
  49. package/instance/instance.cjs.map +1 -1
  50. package/instance/instance.js +1 -1
  51. package/instance/instance.js.map +1 -1
  52. package/inventory/inventory.cjs +3 -3
  53. package/inventory/inventory.cjs.map +1 -1
  54. package/inventory/inventory.js +1 -1
  55. package/inventory/inventory.js.map +1 -1
  56. package/job/job.cjs +124 -8
  57. package/job/job.cjs.map +1 -1
  58. package/job/job.d.cts +159 -3
  59. package/job/job.d.ts +159 -3
  60. package/job/job.js +119 -3
  61. package/job/job.js.map +1 -1
  62. package/metadata/metadata.cjs +7 -7
  63. package/metadata/metadata.cjs.map +1 -1
  64. package/metadata/metadata.js +1 -1
  65. package/metadata/metadata.js.map +1 -1
  66. package/package.json +1 -1
  67. package/project/project.cjs +15 -137
  68. package/project/project.cjs.map +1 -1
  69. package/project/project.d.cts +3 -163
  70. package/project/project.d.ts +3 -163
  71. package/project/project.js +1 -123
  72. package/project/project.js.map +1 -1
  73. package/src/{data-manager-api.schemas.ts → API_TARGET_NAME.schemas.ts} +52 -43
  74. package/src/accounting/accounting.ts +244 -2
  75. package/src/admin/admin.ts +4 -2
  76. package/src/application/application.ts +2 -2
  77. package/src/configuration/configuration.ts +5 -9
  78. package/src/dataset/dataset.ts +2 -2
  79. package/src/digest/digest.ts +2 -2
  80. package/src/file-and-path/file-and-path.ts +602 -2
  81. package/src/index.ts +2 -2
  82. package/src/instance/instance.ts +2 -2
  83. package/src/inventory/inventory.ts +2 -2
  84. package/src/job/job.ts +599 -3
  85. package/src/metadata/metadata.ts +2 -2
  86. package/src/options-mutator.ts +2 -2
  87. package/src/project/project.ts +5 -604
  88. package/src/task/task.ts +2 -2
  89. package/src/type/type.ts +2 -2
  90. package/src/user/user.ts +2 -2
  91. package/src/workflow/workflow.ts +5 -3
  92. package/task/task.cjs +6 -6
  93. package/task/task.cjs.map +1 -1
  94. package/task/task.js +1 -1
  95. package/task/task.js.map +1 -1
  96. package/type/type.cjs +3 -3
  97. package/type/type.cjs.map +1 -1
  98. package/type/type.js +1 -1
  99. package/type/type.js.map +1 -1
  100. package/user/user.cjs +10 -10
  101. package/user/user.cjs.map +1 -1
  102. package/user/user.js +1 -1
  103. package/user/user.js.map +1 -1
  104. package/workflow/workflow.cjs +20 -20
  105. package/workflow/workflow.cjs.map +1 -1
  106. package/workflow/workflow.d.cts +3 -1
  107. package/workflow/workflow.d.ts +3 -1
  108. package/workflow/workflow.js +1 -1
  109. package/workflow/workflow.js.map +1 -1
  110. package/chunk-OYRETEBZ.js.map +0 -1
  111. package/chunk-ZLY5XEOQ.cjs.map +0 -1
  112. package/exchange-rate/exchange-rate.cjs +0 -255
  113. package/exchange-rate/exchange-rate.cjs.map +0 -1
  114. package/exchange-rate/exchange-rate.d.cts +0 -319
  115. package/exchange-rate/exchange-rate.d.ts +0 -319
  116. package/exchange-rate/exchange-rate.js +0 -255
  117. package/exchange-rate/exchange-rate.js.map +0 -1
  118. package/exchange-rate/package.json +0 -7
  119. package/src/exchange-rate/exchange-rate.ts +0 -1276
@@ -6,7 +6,7 @@
6
6
 
7
7
  A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications**, **Jobs**, and **Workflows** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 4.1
9
+ * OpenAPI spec version: 5.0
10
10
  */
11
11
  import { useMutation, useQuery, useSuspenseQuery } from "@tanstack/react-query";
12
12
  import type {
@@ -28,17 +28,14 @@ import type {
28
28
 
29
29
  import type {
30
30
  DmError,
31
- GetProjectFileParams,
32
- GetProjectFileWithTokenParams,
33
31
  GetProjectsParams,
34
32
  ProjectDetail,
35
- ProjectFilePutBodyBody,
36
33
  ProjectPatchBodyBody,
37
34
  ProjectPostBodyBody,
38
35
  ProjectPostResponse,
39
36
  ProjectsGetResponse,
40
37
  TaskIdentity,
41
- } from "../data-manager-api.schemas";
38
+ } from "../API_TARGET_NAME.schemas";
42
39
 
43
40
  import { customInstance } from ".././custom-instance";
44
41
  import type { ErrorType } from ".././custom-instance";
@@ -370,7 +367,7 @@ export const useCreateProject = <TError = ErrorType<DmError | void>, TContext =
370
367
  /**
371
368
  * Gets the details of a Project that is available to you.
372
369
 
373
- * @summary Get a Project
370
+ * @summary Get a Project (by UUID)
374
371
  */
375
372
  export const getProject = (
376
373
  projectId: string,
@@ -464,7 +461,7 @@ export function useGetProject<
464
461
  queryClient?: QueryClient,
465
462
  ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
466
463
  /**
467
- * @summary Get a Project
464
+ * @summary Get a Project (by UUID)
468
465
  */
469
466
 
470
467
  export function useGetProject<
@@ -552,7 +549,7 @@ export function useGetProjectSuspense<
552
549
  queryClient?: QueryClient,
553
550
  ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
554
551
  /**
555
- * @summary Get a Project
552
+ * @summary Get a Project (by UUID)
556
553
  */
557
554
 
558
555
  export function useGetProjectSuspense<
@@ -1286,599 +1283,3 @@ export const useRemoveObserverFromProject = <
1286
1283
 
1287
1284
  return useMutation(mutationOptions, queryClient);
1288
1285
  };
1289
- /**
1290
- * Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).
1291
-
1292
- For **managed** files you should consider using the `/file/{file_id}` endpoint.
1293
-
1294
- You must be an `editor` of the Project if the Project is `private`
1295
-
1296
- * @summary Download a Project file
1297
- */
1298
- export const getProjectFile = (
1299
- projectId: string,
1300
- params: GetProjectFileParams,
1301
- options?: SecondParameter<typeof customInstance>,
1302
- signal?: AbortSignal,
1303
- ) => {
1304
- return customInstance<void>(
1305
- { url: `/project/${projectId}/file`, method: "GET", params, signal },
1306
- options,
1307
- );
1308
- };
1309
-
1310
- export const getGetProjectFileQueryKey = (projectId: string, params: GetProjectFileParams) => {
1311
- return [`/project/${projectId}/file`, ...(params ? [params] : [])] as const;
1312
- };
1313
-
1314
- export const useGetProjectFileQueryOptions = <
1315
- TData = Awaited<ReturnType<typeof getProjectFile>>,
1316
- TError = ErrorType<void | DmError>,
1317
- >(
1318
- projectId: string,
1319
- params: GetProjectFileParams,
1320
- options?: {
1321
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
1322
- request?: SecondParameter<typeof customInstance>;
1323
- },
1324
- ) => {
1325
- const { query: queryOptions, request: requestOptions } = options ?? {};
1326
-
1327
- const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId, params);
1328
-
1329
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({ signal }) =>
1330
- getProjectFile(projectId, params, requestOptions, signal);
1331
-
1332
- const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
1333
-
1334
- return customOptions as UseQueryOptions<
1335
- Awaited<ReturnType<typeof getProjectFile>>,
1336
- TError,
1337
- TData
1338
- > & { queryKey: DataTag<QueryKey, TData, TError> };
1339
- };
1340
-
1341
- export type GetProjectFileQueryResult = NonNullable<Awaited<ReturnType<typeof getProjectFile>>>;
1342
- export type GetProjectFileQueryError = ErrorType<void | DmError>;
1343
-
1344
- export function useGetProjectFile<
1345
- TData = Awaited<ReturnType<typeof getProjectFile>>,
1346
- TError = ErrorType<void | DmError>,
1347
- >(
1348
- projectId: string,
1349
- params: GetProjectFileParams,
1350
- options: {
1351
- query: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> &
1352
- Pick<
1353
- DefinedInitialDataOptions<
1354
- Awaited<ReturnType<typeof getProjectFile>>,
1355
- TError,
1356
- Awaited<ReturnType<typeof getProjectFile>>
1357
- >,
1358
- "initialData"
1359
- >;
1360
- request?: SecondParameter<typeof customInstance>;
1361
- },
1362
- queryClient?: QueryClient,
1363
- ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1364
- export function useGetProjectFile<
1365
- TData = Awaited<ReturnType<typeof getProjectFile>>,
1366
- TError = ErrorType<void | DmError>,
1367
- >(
1368
- projectId: string,
1369
- params: GetProjectFileParams,
1370
- options?: {
1371
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>> &
1372
- Pick<
1373
- UndefinedInitialDataOptions<
1374
- Awaited<ReturnType<typeof getProjectFile>>,
1375
- TError,
1376
- Awaited<ReturnType<typeof getProjectFile>>
1377
- >,
1378
- "initialData"
1379
- >;
1380
- request?: SecondParameter<typeof customInstance>;
1381
- },
1382
- queryClient?: QueryClient,
1383
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1384
- export function useGetProjectFile<
1385
- TData = Awaited<ReturnType<typeof getProjectFile>>,
1386
- TError = ErrorType<void | DmError>,
1387
- >(
1388
- projectId: string,
1389
- params: GetProjectFileParams,
1390
- options?: {
1391
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
1392
- request?: SecondParameter<typeof customInstance>;
1393
- },
1394
- queryClient?: QueryClient,
1395
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1396
- /**
1397
- * @summary Download a Project file
1398
- */
1399
-
1400
- export function useGetProjectFile<
1401
- TData = Awaited<ReturnType<typeof getProjectFile>>,
1402
- TError = ErrorType<void | DmError>,
1403
- >(
1404
- projectId: string,
1405
- params: GetProjectFileParams,
1406
- options?: {
1407
- query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>>;
1408
- request?: SecondParameter<typeof customInstance>;
1409
- },
1410
- queryClient?: QueryClient,
1411
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
1412
- const queryOptions = useGetProjectFileQueryOptions(projectId, params, options);
1413
-
1414
- const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
1415
- queryKey: DataTag<QueryKey, TData, TError>;
1416
- };
1417
-
1418
- query.queryKey = queryOptions.queryKey;
1419
-
1420
- return query;
1421
- }
1422
-
1423
- export const useGetProjectFileSuspenseQueryOptions = <
1424
- TData = Awaited<ReturnType<typeof getProjectFile>>,
1425
- TError = ErrorType<void | DmError>,
1426
- >(
1427
- projectId: string,
1428
- params: GetProjectFileParams,
1429
- options?: {
1430
- query?: Partial<
1431
- UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>
1432
- >;
1433
- request?: SecondParameter<typeof customInstance>;
1434
- },
1435
- ) => {
1436
- const { query: queryOptions, request: requestOptions } = options ?? {};
1437
-
1438
- const queryKey = queryOptions?.queryKey ?? getGetProjectFileQueryKey(projectId, params);
1439
-
1440
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFile>>> = ({ signal }) =>
1441
- getProjectFile(projectId, params, requestOptions, signal);
1442
-
1443
- const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
1444
-
1445
- return customOptions as UseSuspenseQueryOptions<
1446
- Awaited<ReturnType<typeof getProjectFile>>,
1447
- TError,
1448
- TData
1449
- > & { queryKey: DataTag<QueryKey, TData, TError> };
1450
- };
1451
-
1452
- export type GetProjectFileSuspenseQueryResult = NonNullable<
1453
- Awaited<ReturnType<typeof getProjectFile>>
1454
- >;
1455
- export type GetProjectFileSuspenseQueryError = ErrorType<void | DmError>;
1456
-
1457
- export function useGetProjectFileSuspense<
1458
- TData = Awaited<ReturnType<typeof getProjectFile>>,
1459
- TError = ErrorType<void | DmError>,
1460
- >(
1461
- projectId: string,
1462
- params: GetProjectFileParams,
1463
- options: {
1464
- query: Partial<
1465
- UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>
1466
- >;
1467
- request?: SecondParameter<typeof customInstance>;
1468
- },
1469
- queryClient?: QueryClient,
1470
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1471
- export function useGetProjectFileSuspense<
1472
- TData = Awaited<ReturnType<typeof getProjectFile>>,
1473
- TError = ErrorType<void | DmError>,
1474
- >(
1475
- projectId: string,
1476
- params: GetProjectFileParams,
1477
- options?: {
1478
- query?: Partial<
1479
- UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>
1480
- >;
1481
- request?: SecondParameter<typeof customInstance>;
1482
- },
1483
- queryClient?: QueryClient,
1484
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1485
- export function useGetProjectFileSuspense<
1486
- TData = Awaited<ReturnType<typeof getProjectFile>>,
1487
- TError = ErrorType<void | DmError>,
1488
- >(
1489
- projectId: string,
1490
- params: GetProjectFileParams,
1491
- options?: {
1492
- query?: Partial<
1493
- UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>
1494
- >;
1495
- request?: SecondParameter<typeof customInstance>;
1496
- },
1497
- queryClient?: QueryClient,
1498
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1499
- /**
1500
- * @summary Download a Project file
1501
- */
1502
-
1503
- export function useGetProjectFileSuspense<
1504
- TData = Awaited<ReturnType<typeof getProjectFile>>,
1505
- TError = ErrorType<void | DmError>,
1506
- >(
1507
- projectId: string,
1508
- params: GetProjectFileParams,
1509
- options?: {
1510
- query?: Partial<
1511
- UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFile>>, TError, TData>
1512
- >;
1513
- request?: SecondParameter<typeof customInstance>;
1514
- },
1515
- queryClient?: QueryClient,
1516
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
1517
- const queryOptions = useGetProjectFileSuspenseQueryOptions(projectId, params, options);
1518
-
1519
- const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
1520
- TData,
1521
- TError
1522
- > & { queryKey: DataTag<QueryKey, TData, TError> };
1523
-
1524
- query.queryKey = queryOptions.queryKey;
1525
-
1526
- return query;
1527
- }
1528
-
1529
- /**
1530
- * The user provides an external file for upload to the Project using an optional Path. The path is created if it does not exist.
1531
-
1532
- You must be an `editor` of the project
1533
-
1534
- * @summary Upload a file into a Project
1535
- */
1536
- export const addFileToProject = (
1537
- projectId: string,
1538
- projectFilePutBodyBody: ProjectFilePutBodyBody,
1539
- options?: SecondParameter<typeof customInstance>,
1540
- ) => {
1541
- const formData = new FormData();
1542
- formData.append(`file`, projectFilePutBodyBody.file);
1543
- if (projectFilePutBodyBody.as_filename !== undefined) {
1544
- formData.append(`as_filename`, projectFilePutBodyBody.as_filename);
1545
- }
1546
- if (projectFilePutBodyBody.path !== undefined) {
1547
- formData.append(`path`, projectFilePutBodyBody.path);
1548
- }
1549
-
1550
- return customInstance<void>(
1551
- {
1552
- url: `/project/${projectId}/file`,
1553
- method: "PUT",
1554
- headers: { "Content-Type": "multipart/form-data" },
1555
- data: formData,
1556
- },
1557
- options,
1558
- );
1559
- };
1560
-
1561
- export const useAddFileToProjectMutationOptions = <
1562
- TError = ErrorType<void | DmError>,
1563
- TContext = unknown,
1564
- >(options?: {
1565
- mutation?: UseMutationOptions<
1566
- Awaited<ReturnType<typeof addFileToProject>>,
1567
- TError,
1568
- { projectId: string; data: ProjectFilePutBodyBody },
1569
- TContext
1570
- >;
1571
- request?: SecondParameter<typeof customInstance>;
1572
- }): UseMutationOptions<
1573
- Awaited<ReturnType<typeof addFileToProject>>,
1574
- TError,
1575
- { projectId: string; data: ProjectFilePutBodyBody },
1576
- TContext
1577
- > => {
1578
- const mutationKey = ["addFileToProject"];
1579
- const { mutation: mutationOptions, request: requestOptions } = options
1580
- ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey
1581
- ? options
1582
- : { ...options, mutation: { ...options.mutation, mutationKey } }
1583
- : { mutation: { mutationKey }, request: undefined };
1584
-
1585
- const mutationFn: MutationFunction<
1586
- Awaited<ReturnType<typeof addFileToProject>>,
1587
- { projectId: string; data: ProjectFilePutBodyBody }
1588
- > = (props) => {
1589
- const { projectId, data } = props ?? {};
1590
-
1591
- return addFileToProject(projectId, data, requestOptions);
1592
- };
1593
-
1594
- const customOptions = mutationMutator({ ...mutationOptions, mutationFn });
1595
-
1596
- return customOptions;
1597
- };
1598
-
1599
- export type AddFileToProjectMutationResult = NonNullable<
1600
- Awaited<ReturnType<typeof addFileToProject>>
1601
- >;
1602
- export type AddFileToProjectMutationBody = ProjectFilePutBodyBody;
1603
- export type AddFileToProjectMutationError = ErrorType<void | DmError>;
1604
-
1605
- /**
1606
- * @summary Upload a file into a Project
1607
- */
1608
- export const useAddFileToProject = <TError = ErrorType<void | DmError>, TContext = unknown>(
1609
- options?: {
1610
- mutation?: UseMutationOptions<
1611
- Awaited<ReturnType<typeof addFileToProject>>,
1612
- TError,
1613
- { projectId: string; data: ProjectFilePutBodyBody },
1614
- TContext
1615
- >;
1616
- request?: SecondParameter<typeof customInstance>;
1617
- },
1618
- queryClient?: QueryClient,
1619
- ): UseMutationResult<
1620
- Awaited<ReturnType<typeof addFileToProject>>,
1621
- TError,
1622
- { projectId: string; data: ProjectFilePutBodyBody },
1623
- TContext
1624
- > => {
1625
- const mutationOptions = useAddFileToProjectMutationOptions(options);
1626
-
1627
- return useMutation(mutationOptions, queryClient);
1628
- };
1629
- /**
1630
- * Gets a file from the project, with an optional path. This method should be used to get arbitrary files from the Project's file system (typically **unmanaged** files).
1631
-
1632
- For **managed** files you should consider using the `/file/{file_id}` endpoint.
1633
-
1634
- As there is no authentication for this endpoint you must provide a valid token. The token must be a token valid for the project, usually generated when an **Instance** has been launched in the Project.
1635
-
1636
- * @summary Download a Project file using a Token
1637
- */
1638
- export const getProjectFileWithToken = (
1639
- projectId: string,
1640
- params: GetProjectFileWithTokenParams,
1641
- options?: SecondParameter<typeof customInstance>,
1642
- signal?: AbortSignal,
1643
- ) => {
1644
- return customInstance<void>(
1645
- { url: `/project/${projectId}/file-with-token`, method: "GET", params, signal },
1646
- options,
1647
- );
1648
- };
1649
-
1650
- export const getGetProjectFileWithTokenQueryKey = (
1651
- projectId: string,
1652
- params: GetProjectFileWithTokenParams,
1653
- ) => {
1654
- return [`/project/${projectId}/file-with-token`, ...(params ? [params] : [])] as const;
1655
- };
1656
-
1657
- export const useGetProjectFileWithTokenQueryOptions = <
1658
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
1659
- TError = ErrorType<DmError>,
1660
- >(
1661
- projectId: string,
1662
- params: GetProjectFileWithTokenParams,
1663
- options?: {
1664
- query?: Partial<
1665
- UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>
1666
- >;
1667
- request?: SecondParameter<typeof customInstance>;
1668
- },
1669
- ) => {
1670
- const { query: queryOptions, request: requestOptions } = options ?? {};
1671
-
1672
- const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId, params);
1673
-
1674
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFileWithToken>>> = ({
1675
- signal,
1676
- }) => getProjectFileWithToken(projectId, params, requestOptions, signal);
1677
-
1678
- const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
1679
-
1680
- return customOptions as UseQueryOptions<
1681
- Awaited<ReturnType<typeof getProjectFileWithToken>>,
1682
- TError,
1683
- TData
1684
- > & { queryKey: DataTag<QueryKey, TData, TError> };
1685
- };
1686
-
1687
- export type GetProjectFileWithTokenQueryResult = NonNullable<
1688
- Awaited<ReturnType<typeof getProjectFileWithToken>>
1689
- >;
1690
- export type GetProjectFileWithTokenQueryError = ErrorType<DmError>;
1691
-
1692
- export function useGetProjectFileWithToken<
1693
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
1694
- TError = ErrorType<DmError>,
1695
- >(
1696
- projectId: string,
1697
- params: GetProjectFileWithTokenParams,
1698
- options: {
1699
- query: Partial<
1700
- UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>
1701
- > &
1702
- Pick<
1703
- DefinedInitialDataOptions<
1704
- Awaited<ReturnType<typeof getProjectFileWithToken>>,
1705
- TError,
1706
- Awaited<ReturnType<typeof getProjectFileWithToken>>
1707
- >,
1708
- "initialData"
1709
- >;
1710
- request?: SecondParameter<typeof customInstance>;
1711
- },
1712
- queryClient?: QueryClient,
1713
- ): DefinedUseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1714
- export function useGetProjectFileWithToken<
1715
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
1716
- TError = ErrorType<DmError>,
1717
- >(
1718
- projectId: string,
1719
- params: GetProjectFileWithTokenParams,
1720
- options?: {
1721
- query?: Partial<
1722
- UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>
1723
- > &
1724
- Pick<
1725
- UndefinedInitialDataOptions<
1726
- Awaited<ReturnType<typeof getProjectFileWithToken>>,
1727
- TError,
1728
- Awaited<ReturnType<typeof getProjectFileWithToken>>
1729
- >,
1730
- "initialData"
1731
- >;
1732
- request?: SecondParameter<typeof customInstance>;
1733
- },
1734
- queryClient?: QueryClient,
1735
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1736
- export function useGetProjectFileWithToken<
1737
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
1738
- TError = ErrorType<DmError>,
1739
- >(
1740
- projectId: string,
1741
- params: GetProjectFileWithTokenParams,
1742
- options?: {
1743
- query?: Partial<
1744
- UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>
1745
- >;
1746
- request?: SecondParameter<typeof customInstance>;
1747
- },
1748
- queryClient?: QueryClient,
1749
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1750
- /**
1751
- * @summary Download a Project file using a Token
1752
- */
1753
-
1754
- export function useGetProjectFileWithToken<
1755
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
1756
- TError = ErrorType<DmError>,
1757
- >(
1758
- projectId: string,
1759
- params: GetProjectFileWithTokenParams,
1760
- options?: {
1761
- query?: Partial<
1762
- UseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>
1763
- >;
1764
- request?: SecondParameter<typeof customInstance>;
1765
- },
1766
- queryClient?: QueryClient,
1767
- ): UseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
1768
- const queryOptions = useGetProjectFileWithTokenQueryOptions(projectId, params, options);
1769
-
1770
- const query = useQuery(queryOptions, queryClient) as UseQueryResult<TData, TError> & {
1771
- queryKey: DataTag<QueryKey, TData, TError>;
1772
- };
1773
-
1774
- query.queryKey = queryOptions.queryKey;
1775
-
1776
- return query;
1777
- }
1778
-
1779
- export const useGetProjectFileWithTokenSuspenseQueryOptions = <
1780
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
1781
- TError = ErrorType<DmError>,
1782
- >(
1783
- projectId: string,
1784
- params: GetProjectFileWithTokenParams,
1785
- options?: {
1786
- query?: Partial<
1787
- UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>
1788
- >;
1789
- request?: SecondParameter<typeof customInstance>;
1790
- },
1791
- ) => {
1792
- const { query: queryOptions, request: requestOptions } = options ?? {};
1793
-
1794
- const queryKey = queryOptions?.queryKey ?? getGetProjectFileWithTokenQueryKey(projectId, params);
1795
-
1796
- const queryFn: QueryFunction<Awaited<ReturnType<typeof getProjectFileWithToken>>> = ({
1797
- signal,
1798
- }) => getProjectFileWithToken(projectId, params, requestOptions, signal);
1799
-
1800
- const customOptions = queryMutator({ ...queryOptions, queryKey, queryFn });
1801
-
1802
- return customOptions as UseSuspenseQueryOptions<
1803
- Awaited<ReturnType<typeof getProjectFileWithToken>>,
1804
- TError,
1805
- TData
1806
- > & { queryKey: DataTag<QueryKey, TData, TError> };
1807
- };
1808
-
1809
- export type GetProjectFileWithTokenSuspenseQueryResult = NonNullable<
1810
- Awaited<ReturnType<typeof getProjectFileWithToken>>
1811
- >;
1812
- export type GetProjectFileWithTokenSuspenseQueryError = ErrorType<DmError>;
1813
-
1814
- export function useGetProjectFileWithTokenSuspense<
1815
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
1816
- TError = ErrorType<DmError>,
1817
- >(
1818
- projectId: string,
1819
- params: GetProjectFileWithTokenParams,
1820
- options: {
1821
- query: Partial<
1822
- UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>
1823
- >;
1824
- request?: SecondParameter<typeof customInstance>;
1825
- },
1826
- queryClient?: QueryClient,
1827
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1828
- export function useGetProjectFileWithTokenSuspense<
1829
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
1830
- TError = ErrorType<DmError>,
1831
- >(
1832
- projectId: string,
1833
- params: GetProjectFileWithTokenParams,
1834
- options?: {
1835
- query?: Partial<
1836
- UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>
1837
- >;
1838
- request?: SecondParameter<typeof customInstance>;
1839
- },
1840
- queryClient?: QueryClient,
1841
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1842
- export function useGetProjectFileWithTokenSuspense<
1843
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
1844
- TError = ErrorType<DmError>,
1845
- >(
1846
- projectId: string,
1847
- params: GetProjectFileWithTokenParams,
1848
- options?: {
1849
- query?: Partial<
1850
- UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>
1851
- >;
1852
- request?: SecondParameter<typeof customInstance>;
1853
- },
1854
- queryClient?: QueryClient,
1855
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> };
1856
- /**
1857
- * @summary Download a Project file using a Token
1858
- */
1859
-
1860
- export function useGetProjectFileWithTokenSuspense<
1861
- TData = Awaited<ReturnType<typeof getProjectFileWithToken>>,
1862
- TError = ErrorType<DmError>,
1863
- >(
1864
- projectId: string,
1865
- params: GetProjectFileWithTokenParams,
1866
- options?: {
1867
- query?: Partial<
1868
- UseSuspenseQueryOptions<Awaited<ReturnType<typeof getProjectFileWithToken>>, TError, TData>
1869
- >;
1870
- request?: SecondParameter<typeof customInstance>;
1871
- },
1872
- queryClient?: QueryClient,
1873
- ): UseSuspenseQueryResult<TData, TError> & { queryKey: DataTag<QueryKey, TData, TError> } {
1874
- const queryOptions = useGetProjectFileWithTokenSuspenseQueryOptions(projectId, params, options);
1875
-
1876
- const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult<
1877
- TData,
1878
- TError
1879
- > & { queryKey: DataTag<QueryKey, TData, TError> };
1880
-
1881
- query.queryKey = queryOptions.queryKey;
1882
-
1883
- return query;
1884
- }
package/src/task/task.ts CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications**, **Jobs**, and **Workflows** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 4.1
9
+ * OpenAPI spec version: 5.0
10
10
  */
11
11
  import { useMutation, useQuery, useSuspenseQuery } from "@tanstack/react-query";
12
12
  import type {
@@ -32,7 +32,7 @@ import type {
32
32
  GetTasksParams,
33
33
  TaskGetResponse,
34
34
  TasksGetResponse,
35
- } from "../data-manager-api.schemas";
35
+ } from "../API_TARGET_NAME.schemas";
36
36
 
37
37
  import { customInstance } from ".././custom-instance";
38
38
  import type { ErrorType } from ".././custom-instance";
package/src/type/type.ts CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications**, **Jobs**, and **Workflows** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 4.1
9
+ * OpenAPI spec version: 5.0
10
10
  */
11
11
  import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
12
12
  import type {
@@ -23,7 +23,7 @@ import type {
23
23
  UseSuspenseQueryResult,
24
24
  } from "@tanstack/react-query";
25
25
 
26
- import type { DmError, TypesGetResponse } from "../data-manager-api.schemas";
26
+ import type { DmError, TypesGetResponse } from "../API_TARGET_NAME.schemas";
27
27
 
28
28
  import { customInstance } from ".././custom-instance";
29
29
  import type { ErrorType } from ".././custom-instance";