@squonk/data-manager-client 0.7.3-rc.4 → 0.7.7

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 (85) hide show
  1. package/accounting/accounting.cjs +5 -5
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.ts +8 -3
  4. package/accounting/accounting.js +1 -1
  5. package/accounting/accounting.js.map +1 -1
  6. package/admin/admin.cjs +35 -25
  7. package/admin/admin.cjs.map +1 -1
  8. package/admin/admin.d.ts +36 -17
  9. package/admin/admin.js +32 -22
  10. package/admin/admin.js.map +1 -1
  11. package/application/application.cjs +12 -12
  12. package/application/application.cjs.map +1 -1
  13. package/application/application.d.ts +11 -6
  14. package/application/application.js +9 -9
  15. package/application/application.js.map +1 -1
  16. package/{chunk-JR7F532L.js → chunk-6EEIAH4R.js} +1 -1
  17. package/{chunk-JR7F532L.js.map → chunk-6EEIAH4R.js.map} +1 -1
  18. package/{chunk-3DXYUDZH.cjs → chunk-NGBTCJWS.cjs} +1 -1
  19. package/chunk-NGBTCJWS.cjs.map +1 -0
  20. package/{custom-instance-32850190.d.ts → custom-instance-42e56f26.d.ts} +10 -3
  21. package/dataset/dataset.cjs +62 -52
  22. package/dataset/dataset.cjs.map +1 -1
  23. package/dataset/dataset.d.ts +52 -29
  24. package/dataset/dataset.js +54 -44
  25. package/dataset/dataset.js.map +1 -1
  26. package/file/file.cjs +22 -17
  27. package/file/file.cjs.map +1 -1
  28. package/file/file.d.ts +20 -8
  29. package/file/file.js +18 -13
  30. package/file/file.js.map +1 -1
  31. package/index.cjs +2 -2
  32. package/index.cjs.map +1 -1
  33. package/index.d.ts +1 -1
  34. package/index.js +1 -1
  35. package/index.js.map +1 -1
  36. package/instance/instance.cjs +26 -21
  37. package/instance/instance.cjs.map +1 -1
  38. package/instance/instance.d.ts +23 -11
  39. package/instance/instance.js +23 -18
  40. package/instance/instance.js.map +1 -1
  41. package/job/job.cjs +11 -11
  42. package/job/job.cjs.map +1 -1
  43. package/job/job.d.ts +11 -6
  44. package/job/job.js +8 -8
  45. package/job/job.js.map +1 -1
  46. package/metadata/metadata.cjs +34 -28
  47. package/metadata/metadata.cjs.map +1 -1
  48. package/metadata/metadata.d.ts +27 -16
  49. package/metadata/metadata.js +30 -24
  50. package/metadata/metadata.js.map +1 -1
  51. package/package.json +14 -14
  52. package/project/project.cjs +56 -41
  53. package/project/project.cjs.map +1 -1
  54. package/project/project.d.ts +49 -27
  55. package/project/project.js +52 -37
  56. package/project/project.js.map +1 -1
  57. package/src/accounting/accounting.ts +11 -1
  58. package/src/admin/admin.ts +94 -37
  59. package/src/application/application.ts +19 -9
  60. package/src/data-manager-api.schemas.ts +6 -3
  61. package/src/dataset/dataset.ts +130 -65
  62. package/src/file/file.ts +47 -16
  63. package/src/instance/instance.ts +57 -24
  64. package/src/job/job.ts +14 -8
  65. package/src/metadata/metadata.ts +66 -38
  66. package/src/project/project.ts +121 -55
  67. package/src/task/task.ts +28 -16
  68. package/src/type/type.ts +6 -1
  69. package/src/user/user.ts +26 -2
  70. package/task/task.cjs +16 -16
  71. package/task/task.cjs.map +1 -1
  72. package/task/task.d.ts +15 -8
  73. package/task/task.js +13 -13
  74. package/task/task.js.map +1 -1
  75. package/type/type.cjs +3 -3
  76. package/type/type.cjs.map +1 -1
  77. package/type/type.d.ts +6 -3
  78. package/type/type.js +1 -1
  79. package/type/type.js.map +1 -1
  80. package/user/user.cjs +13 -8
  81. package/user/user.cjs.map +1 -1
  82. package/user/user.d.ts +12 -2
  83. package/user/user.js +7 -2
  84. package/user/user.js.map +1 -1
  85. package/chunk-3DXYUDZH.cjs.map +0 -1
package/task/task.cjs CHANGED
@@ -1,7 +1,7 @@
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
3
 
4
- var _chunk3DXYUDZHcjs = require('../chunk-3DXYUDZH.cjs');
4
+ var _chunkNGBTCJWScjs = require('../chunk-NGBTCJWS.cjs');
5
5
 
6
6
  // src/task/task.ts
7
7
 
@@ -9,7 +9,7 @@ var _chunk3DXYUDZHcjs = require('../chunk-3DXYUDZH.cjs');
9
9
 
10
10
  var _reactquery = require('react-query');
11
11
  var getTasks = (params, options) => {
12
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/task`, method: "get", params }, options);
12
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/task`, method: "get", params }, options);
13
13
  };
14
14
  var getGetTasksQueryKey = (params) => [
15
15
  `/task`,
@@ -20,34 +20,34 @@ var useGetTasks = (params, options) => {
20
20
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetTasksQueryKey(params)));
21
21
  const queryFn = () => getTasks(params, requestOptions);
22
22
  const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
23
- return _chunk3DXYUDZHcjs.__spreadValues.call(void 0, {
23
+ return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
24
24
  queryKey
25
25
  }, query);
26
26
  };
27
- var getTask = (taskid, params, options) => {
28
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/task/${taskid}`, method: "get", params }, options);
27
+ var getTask = (taskId, params, options) => {
28
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/task/${taskId}`, method: "get", params }, options);
29
29
  };
30
- var getGetTaskQueryKey = (taskid, params) => [
31
- `/task/${taskid}`,
30
+ var getGetTaskQueryKey = (taskId, params) => [
31
+ `/task/${taskId}`,
32
32
  ...params ? [params] : []
33
33
  ];
34
- var useGetTask = (taskid, params, options) => {
34
+ var useGetTask = (taskId, params, options) => {
35
35
  const { query: queryOptions, request: requestOptions } = options || {};
36
- const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetTaskQueryKey(taskid, params)));
37
- const queryFn = () => getTask(taskid, params, requestOptions);
38
- const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, _chunk3DXYUDZHcjs.__spreadValues.call(void 0, { enabled: !!taskid }, queryOptions));
39
- return _chunk3DXYUDZHcjs.__spreadValues.call(void 0, {
36
+ const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetTaskQueryKey(taskId, params)));
37
+ const queryFn = () => getTask(taskId, params, requestOptions);
38
+ const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, _chunkNGBTCJWScjs.__spreadValues.call(void 0, { enabled: !!taskId }, queryOptions));
39
+ return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
40
40
  queryKey
41
41
  }, query);
42
42
  };
43
- var deleteTask = (taskid, options) => {
44
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/task/${taskid}`, method: "delete" }, options);
43
+ var deleteTask = (taskId, options) => {
44
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/task/${taskId}`, method: "delete" }, options);
45
45
  };
46
46
  var useDeleteTask = (options) => {
47
47
  const { mutation: mutationOptions, request: requestOptions } = options || {};
48
48
  const mutationFn = (props) => {
49
- const { taskid } = props || {};
50
- return deleteTask(taskid, requestOptions);
49
+ const { taskId } = props || {};
50
+ return deleteTask(taskId, requestOptions);
51
51
  };
52
52
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
53
53
  };
package/task/task.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/task/task.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAuCO,IAAM,WAAW,CACtB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,UAC/B;AAAA;AAIG,IAAM,sBAAsB,CAAC,WAA4B;AAAA,EAC9D;AAAA,EACA,GAAI,SAAS,CAAC,UAAU;AAAA;AAGnB,IAAM,cAAc,CAIzB,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY,oBAAoB;AAE/D,QAAM,UAA2D,MAC/D,SAAS,QAAQ;AAEnB,QAAM,QAAQ,SACZ,UACA,SACA;AAGF,SAAO;AAAA,IACL;AAAA,KACG;AAAA;AAyBA,IAAM,UAAU,CACrB,QACA,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,OAAO,UACzC;AAAA;AAIG,IAAM,qBAAqB,CAAC,QAAgB,WAA2B;AAAA,EAC5E,SAAS;AAAA,EACT,GAAI,SAAS,CAAC,UAAU;AAAA;AAGnB,IAAM,aAAa,CAIxB,QACA,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY,mBAAmB,QAAQ;AAEtE,QAAM,UAA0D,MAC9D,QAAQ,QAAQ,QAAQ;AAE1B,QAAM,QAAQ,SACZ,UACA,SACA,iBAAE,SAAS,CAAC,CAAC,UAAW;AAG1B,SAAO;AAAA,IACL;AAAA,KACG;AAAA;AAaA,IAAM,aAAa,CACxB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,YAClC;AAAA;AAIG,IAAM,gBAAgB,CAG3B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,WAAW,SAAS;AAE5B,WAAO,WAAW,QAAQ;AAAA;AAG5B,SAAO,YAKL,YAAY;AAAA","sourcesContent":["/**\n * Generated by orval v6.6.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: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n TasksGetResponse,\n DmError,\n GetTasksParams,\n TaskGetResponse,\n GetTaskParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Returns a list of tasks that you have access to. These will be Tasks that you **own**. Being an editor of the related object does not allow you to see its task.\n\n * @summary Returns a list of tasks\n */\nexport const getTasks = (\n params?: GetTasksParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TasksGetResponse>(\n { url: `/task`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetTasksQueryKey = (params?: GetTasksParams) => [\n `/task`,\n ...(params ? [params] : []),\n];\n\nexport const useGetTasks = <\n TData = AsyncReturnType<typeof getTasks>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetTasksParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getTasks>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getTasks>> = () =>\n getTasks(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getTasks>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Returns Task information including its states and events.\n\nYou can only retrieve a Task if you are its **owner**. For example, you can get a Task relating to an Application **Instance** if you created the **Instance**.\n\nTasks are created in response to creating datasets and launching applications.\n\nTasks contain of a list of `states` and `events`. A task will always have states but may not have events.\n\nStates and events are listed with the oldest occupying the first entry in the list. As the number of events a task accumulates is uncontrolled, by default, only the first 100 events are returned.\n\nYou can control the number of events returned by using the `event_limit` query parameter. You can also retrieve the next set of events by combining it with the `event_prior_ordinal`, setting it to the ordinal of the oldest event you've already received.\n\n**Dataset** tasks must be allowed to complete successfully before you can expect a it to be available through the dataset API endpoints. Application **Instances** are not available until their task state is _STARTED_.\n\nFor **Dataset** tasks, where the task `purpose` is `DATASET`, you must wait until `done` is **true**. The dataset is available when the task object's `done` field is **true** and the `exit_code` field is zero (**0**). If you discover the task is `done` but you have a non-zero `exit_code`, the dataset upload will have failed, and you may need need to inspect the final `state` and any related `events` to understand why.\n\nFor Application **Instance** tasks, where the task `purpose` is `INSTANCE`, you must wait until you find the `STARTED` state in the `states` list. An Application Instance is only `done` when the Application Instance has been deleted.\n\n * @summary Returns task information\n */\nexport const getTask = (\n taskid: string,\n params?: GetTaskParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TaskGetResponse>(\n { url: `/task/${taskid}`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetTaskQueryKey = (taskid: string, params?: GetTaskParams) => [\n `/task/${taskid}`,\n ...(params ? [params] : []),\n];\n\nexport const useGetTask = <\n TData = AsyncReturnType<typeof getTask>,\n TError = ErrorType<void | DmError>\n>(\n taskid: string,\n params?: GetTaskParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getTask>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskid, params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getTask>> = () =>\n getTask(taskid, params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getTask>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!taskid, ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Given a `task_id` the Task will be removed.\n\nYou cannot delete a Task until it is `done`.\n\nYou must be an **owner** of the Task action to delete it. For example you must be the owner of the Dataset to delete **DATASET** tasks and an owner of the ProjectFile to delete **FILE** tasks.\n\n * @summary Delete a Task entry\n */\nexport const deleteTask = (\n taskid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/task/${taskid}`, method: \"delete\" },\n options\n );\n};\n\nexport const useDeleteTask = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteTask>,\n TError,\n { taskid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteTask>,\n { taskid: string }\n > = (props) => {\n const { taskid } = props || {};\n\n return deleteTask(taskid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteTask>,\n TError,\n { taskid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n"]}
1
+ {"version":3,"sources":["../../src/task/task.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAuCO,IAAM,WAAW,CACtB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO,GACtC,OACF;AACF;AAEO,IAAM,sBAAsB,CAAC,WAA4B;AAAA,EAC9D;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAKO,IAAM,cAAc,CAIzB,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,oBAAoB,MAAM;AAErE,QAAM,UAA2D,MAC/D,SAAS,QAAQ,cAAc;AAEjC,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAuBO,IAAM,UAAU,CACrB,QACA,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,OAAO,OAAO,GAChD,OACF;AACF;AAEO,IAAM,qBAAqB,CAAC,QAAgB,WAA2B;AAAA,EAC5E,SAAS;AAAA,EACT,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAKO,IAAM,aAAa,CAIxB,QACA,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,mBAAmB,QAAQ,MAAM;AAE5E,QAAM,UAA0D,MAC9D,QAAQ,QAAQ,QAAQ,cAAc;AAExC,QAAM,QAAQ,SACZ,UACA,SACA,iBAAE,SAAS,CAAC,CAAC,UAAW,aAC1B;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAWO,IAAM,aAAa,CACxB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,SAAS,GAC3C,OACF;AACF;AAQO,IAAM,gBAAgB,CAG3B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,WAAW,SAAS,CAAC;AAE7B,WAAO,WAAW,QAAQ,cAAc;AAAA,EAC1C;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B","sourcesContent":["/**\n * Generated by orval v6.7.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** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n TasksGetResponse,\n DmError,\n GetTasksParams,\n TaskGetResponse,\n GetTaskParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Returns a list of tasks that you have access to. These will be Tasks that you **own**. Being an editor of the related object does not allow you to see its task.\n\n * @summary Returns a list of tasks\n */\nexport const getTasks = (\n params?: GetTasksParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TasksGetResponse>(\n { url: `/task`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetTasksQueryKey = (params?: GetTasksParams) => [\n `/task`,\n ...(params ? [params] : []),\n];\n\nexport type GetTasksQueryResult = NonNullable<AsyncReturnType<typeof getTasks>>;\nexport type GetTasksQueryError = ErrorType<void | DmError>;\n\nexport const useGetTasks = <\n TData = AsyncReturnType<typeof getTasks>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetTasksParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getTasks>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getTasks>> = () =>\n getTasks(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getTasks>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Returns Task information including its states and events.\n\nYou can only retrieve a Task if you are its **owner**. For example, you can get a Task relating to an Application **Instance** if you created the **Instance**.\n\nTasks are created in response to creating datasets and launching applications.\n\nTasks contain of a list of `states` and `events`. A task will always have states but may not have events.\n\nStates and events are listed with the oldest occupying the first entry in the list. As the number of events a task accumulates is uncontrolled, by default, only the first 100 events are returned.\n\nYou can control the number of events returned by using the `event_limit` query parameter. You can also retrieve the next set of events by combining it with the `event_prior_ordinal`, setting it to the ordinal of the oldest event you've already received.\n\n**Dataset** tasks must be allowed to complete successfully before you can expect a it to be available through the dataset API endpoints. Application **Instances** are not available until their task state is _STARTED_.\n\nFor **Dataset** tasks, where the task `purpose` is `DATASET`, you must wait until `done` is **true**. The dataset is available when the task object's `done` field is **true** and the `exit_code` field is zero (**0**). If you discover the task is `done` but you have a non-zero `exit_code`, the dataset upload will have failed, and you may need need to inspect the final `state` and any related `events` to understand why.\n\nFor Application **Instance** tasks, where the task `purpose` is `INSTANCE`, you must wait until you find the `STARTED` state in the `states` list. An Application Instance is only `done` when the Application Instance has been deleted.\n\n * @summary Returns task information\n */\nexport const getTask = (\n taskId: string,\n params?: GetTaskParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TaskGetResponse>(\n { url: `/task/${taskId}`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetTaskQueryKey = (taskId: string, params?: GetTaskParams) => [\n `/task/${taskId}`,\n ...(params ? [params] : []),\n];\n\nexport type GetTaskQueryResult = NonNullable<AsyncReturnType<typeof getTask>>;\nexport type GetTaskQueryError = ErrorType<void | DmError>;\n\nexport const useGetTask = <\n TData = AsyncReturnType<typeof getTask>,\n TError = ErrorType<void | DmError>\n>(\n taskId: string,\n params?: GetTaskParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getTask>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId, params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getTask>> = () =>\n getTask(taskId, params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getTask>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!taskId, ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Given a `task_id` the Task will be removed.\n\nYou cannot delete a Task until it is `done`.\n\nYou must be an **owner** of the Task action to delete it. For example you must be the owner of the Dataset to delete **DATASET** tasks and an owner of the ProjectFile to delete **FILE** tasks.\n\n * @summary Delete a Task entry\n */\nexport const deleteTask = (\n taskId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/task/${taskId}`, method: \"delete\" },\n options\n );\n};\n\nexport type DeleteTaskMutationResult = NonNullable<\n AsyncReturnType<typeof deleteTask>\n>;\n\nexport type DeleteTaskMutationError = ErrorType<DmError>;\n\nexport const useDeleteTask = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteTask>,\n TError,\n { taskId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteTask>,\n { taskId: string }\n > = (props) => {\n const { taskId } = props || {};\n\n return deleteTask(taskId, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteTask>,\n TError,\n { taskId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n"]}
package/task/task.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as react_query from 'react-query';
2
2
  import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
3
- import { c as GetTasksParams, bb as customInstance, aB as TasksGetResponse, bc as ErrorType, b7 as DmError, b as GetTaskParams, aD as TaskGetResponse } from '../custom-instance-32850190';
3
+ import { c as GetTasksParams, bb as customInstance, aB as TasksGetResponse, bc as ErrorType, b7 as DmError, b as GetTaskParams, aD as TaskGetResponse } from '../custom-instance-42e56f26.js';
4
4
  import 'axios';
5
5
 
6
+ declare type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (...args: any) => Promise<infer R> ? R : any;
6
7
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
7
8
  /**
8
9
  * Returns a list of tasks that you have access to. These will be Tasks that you **own**. Being an editor of the related object does not allow you to see its task.
@@ -11,6 +12,8 @@ declare type SecondParameter<T extends (...args: any) => any> = T extends (confi
11
12
  */
12
13
  declare const getTasks: (params?: GetTasksParams | undefined, options?: SecondParameter<typeof customInstance>) => Promise<TasksGetResponse>;
13
14
  declare const getGetTasksQueryKey: (params?: GetTasksParams | undefined) => (string | GetTasksParams)[];
15
+ declare type GetTasksQueryResult = NonNullable<AsyncReturnType<typeof getTasks>>;
16
+ declare type GetTasksQueryError = ErrorType<void | DmError>;
14
17
  declare const useGetTasks: <TData = TasksGetResponse, TError = ErrorType<void | DmError>>(params?: GetTasksParams | undefined, options?: {
15
18
  query?: UseQueryOptions<TasksGetResponse, TError, TData, QueryKey> | undefined;
16
19
  request?: SecondParameter<typeof customInstance>;
@@ -38,9 +41,11 @@ For Application **Instance** tasks, where the task `purpose` is `INSTANCE`, you
38
41
 
39
42
  * @summary Returns task information
40
43
  */
41
- declare const getTask: (taskid: string, params?: GetTaskParams | undefined, options?: SecondParameter<typeof customInstance>) => Promise<TaskGetResponse>;
42
- declare const getGetTaskQueryKey: (taskid: string, params?: GetTaskParams | undefined) => (string | GetTaskParams)[];
43
- declare const useGetTask: <TData = TaskGetResponse, TError = ErrorType<void | DmError>>(taskid: string, params?: GetTaskParams | undefined, options?: {
44
+ declare const getTask: (taskId: string, params?: GetTaskParams | undefined, options?: SecondParameter<typeof customInstance>) => Promise<TaskGetResponse>;
45
+ declare const getGetTaskQueryKey: (taskId: string, params?: GetTaskParams | undefined) => (string | GetTaskParams)[];
46
+ declare type GetTaskQueryResult = NonNullable<AsyncReturnType<typeof getTask>>;
47
+ declare type GetTaskQueryError = ErrorType<void | DmError>;
48
+ declare const useGetTask: <TData = TaskGetResponse, TError = ErrorType<void | DmError>>(taskId: string, params?: GetTaskParams | undefined, options?: {
44
49
  query?: UseQueryOptions<TaskGetResponse, TError, TData, QueryKey> | undefined;
45
50
  request?: SecondParameter<typeof customInstance>;
46
51
  } | undefined) => UseQueryResult<TData, TError> & {
@@ -55,14 +60,16 @@ You must be an **owner** of the Task action to delete it. For example you must b
55
60
 
56
61
  * @summary Delete a Task entry
57
62
  */
58
- declare const deleteTask: (taskid: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
63
+ declare const deleteTask: (taskId: string, options?: SecondParameter<typeof customInstance>) => Promise<void>;
64
+ declare type DeleteTaskMutationResult = NonNullable<AsyncReturnType<typeof deleteTask>>;
65
+ declare type DeleteTaskMutationError = ErrorType<DmError>;
59
66
  declare const useDeleteTask: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
60
67
  mutation?: UseMutationOptions<void, TError, {
61
- taskid: string;
68
+ taskId: string;
62
69
  }, TContext> | undefined;
63
70
  request?: SecondParameter<typeof customInstance>;
64
71
  } | undefined) => react_query.UseMutationResult<void, TError, {
65
- taskid: string;
72
+ taskId: string;
66
73
  }, TContext>;
67
74
 
68
- export { deleteTask, getGetTaskQueryKey, getGetTasksQueryKey, getTask, getTasks, useDeleteTask, useGetTask, useGetTasks };
75
+ export { DeleteTaskMutationError, DeleteTaskMutationResult, GetTaskQueryError, GetTaskQueryResult, GetTasksQueryError, GetTasksQueryResult, deleteTask, getGetTaskQueryKey, getGetTasksQueryKey, getTask, getTasks, useDeleteTask, useGetTask, useGetTasks };
package/task/task.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __spreadValues,
3
3
  customInstance
4
- } from "../chunk-JR7F532L.js";
4
+ } from "../chunk-6EEIAH4R.js";
5
5
 
6
6
  // src/task/task.ts
7
7
  import {
@@ -24,30 +24,30 @@ var useGetTasks = (params, options) => {
24
24
  queryKey
25
25
  }, query);
26
26
  };
27
- var getTask = (taskid, params, options) => {
28
- return customInstance({ url: `/task/${taskid}`, method: "get", params }, options);
27
+ var getTask = (taskId, params, options) => {
28
+ return customInstance({ url: `/task/${taskId}`, method: "get", params }, options);
29
29
  };
30
- var getGetTaskQueryKey = (taskid, params) => [
31
- `/task/${taskid}`,
30
+ var getGetTaskQueryKey = (taskId, params) => [
31
+ `/task/${taskId}`,
32
32
  ...params ? [params] : []
33
33
  ];
34
- var useGetTask = (taskid, params, options) => {
34
+ var useGetTask = (taskId, params, options) => {
35
35
  const { query: queryOptions, request: requestOptions } = options || {};
36
- const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetTaskQueryKey(taskid, params);
37
- const queryFn = () => getTask(taskid, params, requestOptions);
38
- const query = useQuery(queryKey, queryFn, __spreadValues({ enabled: !!taskid }, queryOptions));
36
+ const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetTaskQueryKey(taskId, params);
37
+ const queryFn = () => getTask(taskId, params, requestOptions);
38
+ const query = useQuery(queryKey, queryFn, __spreadValues({ enabled: !!taskId }, queryOptions));
39
39
  return __spreadValues({
40
40
  queryKey
41
41
  }, query);
42
42
  };
43
- var deleteTask = (taskid, options) => {
44
- return customInstance({ url: `/task/${taskid}`, method: "delete" }, options);
43
+ var deleteTask = (taskId, options) => {
44
+ return customInstance({ url: `/task/${taskId}`, method: "delete" }, options);
45
45
  };
46
46
  var useDeleteTask = (options) => {
47
47
  const { mutation: mutationOptions, request: requestOptions } = options || {};
48
48
  const mutationFn = (props) => {
49
- const { taskid } = props || {};
50
- return deleteTask(taskid, requestOptions);
49
+ const { taskId } = props || {};
50
+ return deleteTask(taskId, requestOptions);
51
51
  };
52
52
  return useMutation(mutationFn, mutationOptions);
53
53
  };
package/task/task.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/task/task.ts"],"sourcesContent":["/**\n * Generated by orval v6.6.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: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n TasksGetResponse,\n DmError,\n GetTasksParams,\n TaskGetResponse,\n GetTaskParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Returns a list of tasks that you have access to. These will be Tasks that you **own**. Being an editor of the related object does not allow you to see its task.\n\n * @summary Returns a list of tasks\n */\nexport const getTasks = (\n params?: GetTasksParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TasksGetResponse>(\n { url: `/task`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetTasksQueryKey = (params?: GetTasksParams) => [\n `/task`,\n ...(params ? [params] : []),\n];\n\nexport const useGetTasks = <\n TData = AsyncReturnType<typeof getTasks>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetTasksParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getTasks>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getTasks>> = () =>\n getTasks(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getTasks>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Returns Task information including its states and events.\n\nYou can only retrieve a Task if you are its **owner**. For example, you can get a Task relating to an Application **Instance** if you created the **Instance**.\n\nTasks are created in response to creating datasets and launching applications.\n\nTasks contain of a list of `states` and `events`. A task will always have states but may not have events.\n\nStates and events are listed with the oldest occupying the first entry in the list. As the number of events a task accumulates is uncontrolled, by default, only the first 100 events are returned.\n\nYou can control the number of events returned by using the `event_limit` query parameter. You can also retrieve the next set of events by combining it with the `event_prior_ordinal`, setting it to the ordinal of the oldest event you've already received.\n\n**Dataset** tasks must be allowed to complete successfully before you can expect a it to be available through the dataset API endpoints. Application **Instances** are not available until their task state is _STARTED_.\n\nFor **Dataset** tasks, where the task `purpose` is `DATASET`, you must wait until `done` is **true**. The dataset is available when the task object's `done` field is **true** and the `exit_code` field is zero (**0**). If you discover the task is `done` but you have a non-zero `exit_code`, the dataset upload will have failed, and you may need need to inspect the final `state` and any related `events` to understand why.\n\nFor Application **Instance** tasks, where the task `purpose` is `INSTANCE`, you must wait until you find the `STARTED` state in the `states` list. An Application Instance is only `done` when the Application Instance has been deleted.\n\n * @summary Returns task information\n */\nexport const getTask = (\n taskid: string,\n params?: GetTaskParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TaskGetResponse>(\n { url: `/task/${taskid}`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetTaskQueryKey = (taskid: string, params?: GetTaskParams) => [\n `/task/${taskid}`,\n ...(params ? [params] : []),\n];\n\nexport const useGetTask = <\n TData = AsyncReturnType<typeof getTask>,\n TError = ErrorType<void | DmError>\n>(\n taskid: string,\n params?: GetTaskParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getTask>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskid, params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getTask>> = () =>\n getTask(taskid, params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getTask>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!taskid, ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Given a `task_id` the Task will be removed.\n\nYou cannot delete a Task until it is `done`.\n\nYou must be an **owner** of the Task action to delete it. For example you must be the owner of the Dataset to delete **DATASET** tasks and an owner of the ProjectFile to delete **FILE** tasks.\n\n * @summary Delete a Task entry\n */\nexport const deleteTask = (\n taskid: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/task/${taskid}`, method: \"delete\" },\n options\n );\n};\n\nexport const useDeleteTask = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteTask>,\n TError,\n { taskid: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteTask>,\n { taskid: string }\n > = (props) => {\n const { taskid } = props || {};\n\n return deleteTask(taskid, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteTask>,\n TError,\n { taskid: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n"],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAuCO,IAAM,WAAW,CACtB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,UAC/B;AAAA;AAIG,IAAM,sBAAsB,CAAC,WAA4B;AAAA,EAC9D;AAAA,EACA,GAAI,SAAS,CAAC,UAAU;AAAA;AAGnB,IAAM,cAAc,CAIzB,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY,oBAAoB;AAE/D,QAAM,UAA2D,MAC/D,SAAS,QAAQ;AAEnB,QAAM,QAAQ,SACZ,UACA,SACA;AAGF,SAAO;AAAA,IACL;AAAA,KACG;AAAA;AAyBA,IAAM,UAAU,CACrB,QACA,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,OAAO,UACzC;AAAA;AAIG,IAAM,qBAAqB,CAAC,QAAgB,WAA2B;AAAA,EAC5E,SAAS;AAAA,EACT,GAAI,SAAS,CAAC,UAAU;AAAA;AAGnB,IAAM,aAAa,CAIxB,QACA,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY,mBAAmB,QAAQ;AAEtE,QAAM,UAA0D,MAC9D,QAAQ,QAAQ,QAAQ;AAE1B,QAAM,QAAQ,SACZ,UACA,SACA,iBAAE,SAAS,CAAC,CAAC,UAAW;AAG1B,SAAO;AAAA,IACL;AAAA,KACG;AAAA;AAaA,IAAM,aAAa,CACxB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,YAClC;AAAA;AAIG,IAAM,gBAAgB,CAG3B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,WAAW,SAAS;AAE5B,WAAO,WAAW,QAAQ;AAAA;AAG5B,SAAO,YAKL,YAAY;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/task/task.ts"],"sourcesContent":["/**\n * Generated by orval v6.7.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** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n TasksGetResponse,\n DmError,\n GetTasksParams,\n TaskGetResponse,\n GetTaskParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Returns a list of tasks that you have access to. These will be Tasks that you **own**. Being an editor of the related object does not allow you to see its task.\n\n * @summary Returns a list of tasks\n */\nexport const getTasks = (\n params?: GetTasksParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TasksGetResponse>(\n { url: `/task`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetTasksQueryKey = (params?: GetTasksParams) => [\n `/task`,\n ...(params ? [params] : []),\n];\n\nexport type GetTasksQueryResult = NonNullable<AsyncReturnType<typeof getTasks>>;\nexport type GetTasksQueryError = ErrorType<void | DmError>;\n\nexport const useGetTasks = <\n TData = AsyncReturnType<typeof getTasks>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetTasksParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getTasks>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTasksQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getTasks>> = () =>\n getTasks(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getTasks>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Returns Task information including its states and events.\n\nYou can only retrieve a Task if you are its **owner**. For example, you can get a Task relating to an Application **Instance** if you created the **Instance**.\n\nTasks are created in response to creating datasets and launching applications.\n\nTasks contain of a list of `states` and `events`. A task will always have states but may not have events.\n\nStates and events are listed with the oldest occupying the first entry in the list. As the number of events a task accumulates is uncontrolled, by default, only the first 100 events are returned.\n\nYou can control the number of events returned by using the `event_limit` query parameter. You can also retrieve the next set of events by combining it with the `event_prior_ordinal`, setting it to the ordinal of the oldest event you've already received.\n\n**Dataset** tasks must be allowed to complete successfully before you can expect a it to be available through the dataset API endpoints. Application **Instances** are not available until their task state is _STARTED_.\n\nFor **Dataset** tasks, where the task `purpose` is `DATASET`, you must wait until `done` is **true**. The dataset is available when the task object's `done` field is **true** and the `exit_code` field is zero (**0**). If you discover the task is `done` but you have a non-zero `exit_code`, the dataset upload will have failed, and you may need need to inspect the final `state` and any related `events` to understand why.\n\nFor Application **Instance** tasks, where the task `purpose` is `INSTANCE`, you must wait until you find the `STARTED` state in the `states` list. An Application Instance is only `done` when the Application Instance has been deleted.\n\n * @summary Returns task information\n */\nexport const getTask = (\n taskId: string,\n params?: GetTaskParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TaskGetResponse>(\n { url: `/task/${taskId}`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetTaskQueryKey = (taskId: string, params?: GetTaskParams) => [\n `/task/${taskId}`,\n ...(params ? [params] : []),\n];\n\nexport type GetTaskQueryResult = NonNullable<AsyncReturnType<typeof getTask>>;\nexport type GetTaskQueryError = ErrorType<void | DmError>;\n\nexport const useGetTask = <\n TData = AsyncReturnType<typeof getTask>,\n TError = ErrorType<void | DmError>\n>(\n taskId: string,\n params?: GetTaskParams,\n options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getTask>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(taskId, params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getTask>> = () =>\n getTask(taskId, params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getTask>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!taskId, ...queryOptions }\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Given a `task_id` the Task will be removed.\n\nYou cannot delete a Task until it is `done`.\n\nYou must be an **owner** of the Task action to delete it. For example you must be the owner of the Dataset to delete **DATASET** tasks and an owner of the ProjectFile to delete **FILE** tasks.\n\n * @summary Delete a Task entry\n */\nexport const deleteTask = (\n taskId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/task/${taskId}`, method: \"delete\" },\n options\n );\n};\n\nexport type DeleteTaskMutationResult = NonNullable<\n AsyncReturnType<typeof deleteTask>\n>;\n\nexport type DeleteTaskMutationError = ErrorType<DmError>;\n\nexport const useDeleteTask = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof deleteTask>,\n TError,\n { taskId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof deleteTask>,\n { taskId: string }\n > = (props) => {\n const { taskId } = props || {};\n\n return deleteTask(taskId, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof deleteTask>,\n TError,\n { taskId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n"],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAuCO,IAAM,WAAW,CACtB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,OAAO,OAAO,GACtC,OACF;AACF;AAEO,IAAM,sBAAsB,CAAC,WAA4B;AAAA,EAC9D;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAKO,IAAM,cAAc,CAIzB,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,oBAAoB,MAAM;AAErE,QAAM,UAA2D,MAC/D,SAAS,QAAQ,cAAc;AAEjC,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAuBO,IAAM,UAAU,CACrB,QACA,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,OAAO,OAAO,GAChD,OACF;AACF;AAEO,IAAM,qBAAqB,CAAC,QAAgB,WAA2B;AAAA,EAC5E,SAAS;AAAA,EACT,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAKO,IAAM,aAAa,CAIxB,QACA,QACA,YAI2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,mBAAmB,QAAQ,MAAM;AAE5E,QAAM,UAA0D,MAC9D,QAAQ,QAAQ,QAAQ,cAAc;AAExC,QAAM,QAAQ,SACZ,UACA,SACA,iBAAE,SAAS,CAAC,CAAC,UAAW,aAC1B;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAWO,IAAM,aAAa,CACxB,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,UAAU,QAAQ,SAAS,GAC3C,OACF;AACF;AAQO,IAAM,gBAAgB,CAG3B,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,WAAW,SAAS,CAAC;AAE7B,WAAO,WAAW,QAAQ,cAAc;AAAA,EAC1C;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;","names":[]}
package/type/type.cjs CHANGED
@@ -1,14 +1,14 @@
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
3
 
4
- var _chunk3DXYUDZHcjs = require('../chunk-3DXYUDZH.cjs');
4
+ var _chunkNGBTCJWScjs = require('../chunk-NGBTCJWS.cjs');
5
5
 
6
6
  // src/type/type.ts
7
7
 
8
8
 
9
9
  var _reactquery = require('react-query');
10
10
  var getFileTypes = (options) => {
11
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/type`, method: "get" }, options);
11
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/type`, method: "get" }, options);
12
12
  };
13
13
  var getGetFileTypesQueryKey = () => [`/type`];
14
14
  var useGetFileTypes = (options) => {
@@ -16,7 +16,7 @@ var useGetFileTypes = (options) => {
16
16
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetFileTypesQueryKey()));
17
17
  const queryFn = () => getFileTypes(requestOptions);
18
18
  const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
19
- return _chunk3DXYUDZHcjs.__spreadValues.call(void 0, {
19
+ return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
20
20
  queryKey
21
21
  }, query);
22
22
  };
package/type/type.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/type/type.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AA8BO,IAAM,eAAe,CAC1B,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,SACxB;AAAA;AAIG,IAAM,0BAA0B,MAAM,CAAC;AAEvC,IAAM,kBAAkB,CAG7B,YAG4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY;AAE3C,QAAM,UAA+D,MACnE,aAAa;AAEf,QAAM,QAAQ,SACZ,UACA,SACA;AAGF,SAAO;AAAA,IACL;AAAA,KACG;AAAA","sourcesContent":["/**\n * Generated by orval v6.6.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: 0.7\n */\nimport {\n useQuery,\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type { TypesGetResponse, DmError } from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Returns the supported Dataset and File (MIME) Types\n\n * @summary Get the supported File Types\n */\nexport const getFileTypes = (\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TypesGetResponse>(\n { url: `/type`, method: \"get\" },\n options\n );\n};\n\nexport const getGetFileTypesQueryKey = () => [`/type`];\n\nexport const useGetFileTypes = <\n TData = AsyncReturnType<typeof getFileTypes>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getFileTypes>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getFileTypes>> = () =>\n getFileTypes(requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getFileTypes>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"]}
1
+ {"version":3,"sources":["../../src/type/type.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AA8BO,IAAM,eAAe,CAC1B,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,MAAM,GAC9B,OACF;AACF;AAEO,IAAM,0BAA0B,MAAM,CAAC,OAAO;AAO9C,IAAM,kBAAkB,CAG7B,YAG4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,wBAAwB;AAEnE,QAAM,UAA+D,MACnE,aAAa,cAAc;AAE7B,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP","sourcesContent":["/**\n * Generated by orval v6.7.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** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type { TypesGetResponse, DmError } from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Returns the supported Dataset and File (MIME) Types\n\n * @summary Get the supported File Types\n */\nexport const getFileTypes = (\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TypesGetResponse>(\n { url: `/type`, method: \"get\" },\n options\n );\n};\n\nexport const getGetFileTypesQueryKey = () => [`/type`];\n\nexport type GetFileTypesQueryResult = NonNullable<\n AsyncReturnType<typeof getFileTypes>\n>;\nexport type GetFileTypesQueryError = ErrorType<void | DmError>;\n\nexport const useGetFileTypes = <\n TData = AsyncReturnType<typeof getFileTypes>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getFileTypes>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getFileTypes>> = () =>\n getFileTypes(requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getFileTypes>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"]}
package/type/type.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { UseQueryOptions, QueryKey, UseQueryResult } from 'react-query';
2
- import { bb as customInstance, aA as TypesGetResponse, bc as ErrorType, b7 as DmError } from '../custom-instance-32850190';
2
+ import { bb as customInstance, aA as TypesGetResponse, bc as ErrorType, b7 as DmError } from '../custom-instance-42e56f26.js';
3
3
  import 'axios';
4
4
 
5
5
  /**
6
- * Generated by orval v6.6.0 🍺
6
+ * Generated by orval v6.7.1 🍺
7
7
  * Do not edit manually.
8
8
  * Dataset Manager API
9
9
  * The Dataset Manager API service.
@@ -13,6 +13,7 @@ A service that allows *registered* users to make **Datasets** and associated **M
13
13
  * OpenAPI spec version: 0.7
14
14
  */
15
15
 
16
+ declare type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (...args: any) => Promise<infer R> ? R : any;
16
17
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
17
18
  /**
18
19
  * Returns the supported Dataset and File (MIME) Types
@@ -21,6 +22,8 @@ declare type SecondParameter<T extends (...args: any) => any> = T extends (confi
21
22
  */
22
23
  declare const getFileTypes: (options?: SecondParameter<typeof customInstance>) => Promise<TypesGetResponse>;
23
24
  declare const getGetFileTypesQueryKey: () => string[];
25
+ declare type GetFileTypesQueryResult = NonNullable<AsyncReturnType<typeof getFileTypes>>;
26
+ declare type GetFileTypesQueryError = ErrorType<void | DmError>;
24
27
  declare const useGetFileTypes: <TData = TypesGetResponse, TError = ErrorType<void | DmError>>(options?: {
25
28
  query?: UseQueryOptions<TypesGetResponse, TError, TData, QueryKey> | undefined;
26
29
  request?: SecondParameter<typeof customInstance>;
@@ -28,4 +31,4 @@ declare const useGetFileTypes: <TData = TypesGetResponse, TError = ErrorType<voi
28
31
  queryKey: QueryKey;
29
32
  };
30
33
 
31
- export { getFileTypes, getGetFileTypesQueryKey, useGetFileTypes };
34
+ export { GetFileTypesQueryError, GetFileTypesQueryResult, getFileTypes, getGetFileTypesQueryKey, useGetFileTypes };
package/type/type.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __spreadValues,
3
3
  customInstance
4
- } from "../chunk-JR7F532L.js";
4
+ } from "../chunk-6EEIAH4R.js";
5
5
 
6
6
  // src/type/type.ts
7
7
  import {
package/type/type.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/type/type.ts"],"sourcesContent":["/**\n * Generated by orval v6.6.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: 0.7\n */\nimport {\n useQuery,\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type { TypesGetResponse, DmError } from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Returns the supported Dataset and File (MIME) Types\n\n * @summary Get the supported File Types\n */\nexport const getFileTypes = (\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TypesGetResponse>(\n { url: `/type`, method: \"get\" },\n options\n );\n};\n\nexport const getGetFileTypesQueryKey = () => [`/type`];\n\nexport const useGetFileTypes = <\n TData = AsyncReturnType<typeof getFileTypes>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getFileTypes>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getFileTypes>> = () =>\n getFileTypes(requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getFileTypes>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"],"mappings":";;;;;;AAUA;AAAA;AAAA;AA8BO,IAAM,eAAe,CAC1B,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,SACxB;AAAA;AAIG,IAAM,0BAA0B,MAAM,CAAC;AAEvC,IAAM,kBAAkB,CAG7B,YAG4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY;AAE3C,QAAM,UAA+D,MACnE,aAAa;AAEf,QAAM,QAAQ,SACZ,UACA,SACA;AAGF,SAAO;AAAA,IACL;AAAA,KACG;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../src/type/type.ts"],"sourcesContent":["/**\n * Generated by orval v6.7.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** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n UseQueryOptions,\n QueryFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type { TypesGetResponse, DmError } from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * Returns the supported Dataset and File (MIME) Types\n\n * @summary Get the supported File Types\n */\nexport const getFileTypes = (\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<TypesGetResponse>(\n { url: `/type`, method: \"get\" },\n options\n );\n};\n\nexport const getGetFileTypesQueryKey = () => [`/type`];\n\nexport type GetFileTypesQueryResult = NonNullable<\n AsyncReturnType<typeof getFileTypes>\n>;\nexport type GetFileTypesQueryError = ErrorType<void | DmError>;\n\nexport const useGetFileTypes = <\n TData = AsyncReturnType<typeof getFileTypes>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getFileTypes>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetFileTypesQueryKey();\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getFileTypes>> = () =>\n getFileTypes(requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getFileTypes>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"],"mappings":";;;;;;AAUA;AAAA;AAAA;AA8BO,IAAM,eAAe,CAC1B,YACG;AACH,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,MAAM,GAC9B,OACF;AACF;AAEO,IAAM,0BAA0B,MAAM,CAAC,OAAO;AAO9C,IAAM,kBAAkB,CAG7B,YAG4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,wBAAwB;AAEnE,QAAM,UAA+D,MACnE,aAAa,cAAc;AAE7B,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;","names":[]}
package/user/user.cjs CHANGED
@@ -1,7 +1,7 @@
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
3
 
4
- var _chunk3DXYUDZHcjs = require('../chunk-3DXYUDZH.cjs');
4
+ var _chunkNGBTCJWScjs = require('../chunk-NGBTCJWS.cjs');
5
5
 
6
6
  // src/user/user.ts
7
7
 
@@ -9,7 +9,7 @@ var _chunk3DXYUDZHcjs = require('../chunk-3DXYUDZH.cjs');
9
9
 
10
10
  var _reactquery = require('react-query');
11
11
  var getUsers = (options) => {
12
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/user`, method: "get" }, options);
12
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/user`, method: "get" }, options);
13
13
  };
14
14
  var getGetUsersQueryKey = () => [`/user`];
15
15
  var useGetUsers = (options) => {
@@ -17,12 +17,12 @@ var useGetUsers = (options) => {
17
17
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUsersQueryKey()));
18
18
  const queryFn = () => getUsers(requestOptions);
19
19
  const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
20
- return _chunk3DXYUDZHcjs.__spreadValues.call(void 0, {
20
+ return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
21
21
  queryKey
22
22
  }, query);
23
23
  };
24
24
  var getUserAccount = (params, options) => {
25
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/user/account`, method: "get", params }, options);
25
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/user/account`, method: "get", params }, options);
26
26
  };
27
27
  var getGetUserAccountQueryKey = (params) => [
28
28
  `/user/account`,
@@ -33,7 +33,7 @@ var useGetUserAccount = (params, options) => {
33
33
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUserAccountQueryKey(params)));
34
34
  const queryFn = () => getUserAccount(params, requestOptions);
35
35
  const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
36
- return _chunk3DXYUDZHcjs.__spreadValues.call(void 0, {
36
+ return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
37
37
  queryKey
38
38
  }, query);
39
39
  };
@@ -51,7 +51,12 @@ var patchUserAccount = (userAccountPatchBodyBody, options) => {
51
51
  if (userAccountPatchBodyBody.use_impersonation !== void 0) {
52
52
  formData.append("use_impersonation", userAccountPatchBodyBody.use_impersonation.toString());
53
53
  }
54
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/user/account`, method: "patch", data: formData }, options);
54
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, {
55
+ url: `/user/account`,
56
+ method: "patch",
57
+ headers: { "Content-Type": "multipart/form-data" },
58
+ data: formData
59
+ }, options);
55
60
  };
56
61
  var usePatchUserAccount = (options) => {
57
62
  const { mutation: mutationOptions, request: requestOptions } = options || {};
@@ -62,7 +67,7 @@ var usePatchUserAccount = (options) => {
62
67
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
63
68
  };
64
69
  var getUserApiLog = (params, options) => {
65
- return _chunk3DXYUDZHcjs.customInstance.call(void 0, { url: `/user/api-log`, method: "get", params }, options);
70
+ return _chunkNGBTCJWScjs.customInstance.call(void 0, { url: `/user/api-log`, method: "get", params }, options);
66
71
  };
67
72
  var getGetUserApiLogQueryKey = (params) => [
68
73
  `/user/api-log`,
@@ -73,7 +78,7 @@ var useGetUserApiLog = (params, options) => {
73
78
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetUserApiLogQueryKey(params)));
74
79
  const queryFn = () => getUserApiLog(params, requestOptions);
75
80
  const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, queryOptions);
76
- return _chunk3DXYUDZHcjs.__spreadValues.call(void 0, {
81
+ return _chunkNGBTCJWScjs.__spreadValues.call(void 0, {
77
82
  queryKey
78
83
  }, query);
79
84
  };
package/user/user.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/user/user.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAyCO,IAAM,WAAW,CAAC,YAAqD;AAC5E,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,SACxB;AAAA;AAIG,IAAM,sBAAsB,MAAM,CAAC;AAEnC,IAAM,cAAc,CAGzB,YAG4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY;AAE3C,QAAM,UAA2D,MAC/D,SAAS;AAEX,QAAM,QAAQ,SACZ,UACA,SACA;AAGF,SAAO;AAAA,IACL;AAAA,KACG;AAAA;AASA,IAAM,iBAAiB,CAC5B,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,iBAAiB,QAAQ,OAAO,UACvC;AAAA;AAIG,IAAM,4BAA4B,CAAC,WAAkC;AAAA,EAC1E;AAAA,EACA,GAAI,SAAS,CAAC,UAAU;AAAA;AAGnB,IAAM,oBAAoB,CAI/B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY,0BAA0B;AAErE,QAAM,UAAiE,MACrE,eAAe,QAAQ;AAEzB,QAAM,QAAQ,SACZ,UACA,SACA;AAGF,SAAO;AAAA,IACL;AAAA,KACG;AAAA;AASA,IAAM,mBAAmB,CAC9B,0BACA,YACG;AACH,QAAM,WAAW,IAAI;AACrB,MAAI,yBAAyB,YAAY,QAAW;AAClD,aAAS,OAAO,WAAW,yBAAyB,QAAQ;AAAA;AAE9D,MAAI,yBAAyB,iBAAiB,QAAW;AACvD,aAAS,OACP,gBACA,yBAAyB,aAAa;AAAA;AAG1C,MAAI,yBAAyB,gBAAgB,QAAW;AACtD,aAAS,OAAO,eAAe,yBAAyB;AAAA;AAE1D,MAAI,yBAAyB,sBAAsB,QAAW;AAC5D,aAAS,OACP,qBACA,yBAAyB,kBAAkB;AAAA;AAI/C,SAAO,eACL,EAAE,KAAK,iBAAiB,QAAQ,SAAS,MAAM,YAC/C;AAAA;AAIG,IAAM,sBAAsB,CAGjC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW;AAE1E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,SAAS,SAAS;AAE1B,WAAO,iBAAiB,MAAM;AAAA;AAGhC,SAAO,YAKL,YAAY;AAAA;AAOT,IAAM,gBAAgB,CAC3B,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,iBAAiB,QAAQ,OAAO,UACvC;AAAA;AAIG,IAAM,2BAA2B,CAAC,WAAiC;AAAA,EACxE;AAAA,EACA,GAAI,SAAS,CAAC,UAAU;AAAA;AAGnB,IAAM,mBAAmB,CAI9B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW;AAEpE,QAAM,WAAW,8CAAc,aAAY,yBAAyB;AAEpE,QAAM,UAAgE,MACpE,cAAc,QAAQ;AAExB,QAAM,QAAQ,SACZ,UACA,SACA;AAGF,SAAO;AAAA,IACL;AAAA,KACG;AAAA","sourcesContent":["/**\n * Generated by orval v6.6.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: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n UsersGetResponse,\n DmError,\n UserAccountGetResponse,\n GetUserAccountParams,\n UserAccountPatchBodyBody,\n UserApiLogGetResponse,\n GetUserApiLogParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * 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 therefor do not show up in methods like this\n\n * @summary Get information about all known users\n */\nexport const getUsers = (options?: SecondParameter<typeof customInstance>) => {\n return customInstance<UsersGetResponse>(\n { url: `/user`, method: \"get\" },\n options\n );\n};\n\nexport const getGetUsersQueryKey = () => [`/user`];\n\nexport const useGetUsers = <\n TData = AsyncReturnType<typeof getUsers>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getUsers>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getUsers>> = () =>\n getUsers(requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getUsers>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Returns a summary of your account\n\n * @summary Get information about your account\n */\nexport const getUserAccount = (\n params?: GetUserAccountParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<UserAccountGetResponse>(\n { url: `/user/account`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetUserAccountQueryKey = (params?: GetUserAccountParams) => [\n `/user/account`,\n ...(params ? [params] : []),\n];\n\nexport const useGetUserAccount = <\n TData = AsyncReturnType<typeof getUserAccount>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetUserAccountParams,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getUserAccount>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getUserAccount>> = () =>\n getUserAccount(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getUserAccount>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Make changes to your user account\n\n * @summary Patch your account\n */\nexport const patchUserAccount = (\n userAccountPatchBodyBody: UserAccountPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (userAccountPatchBodyBody.private !== undefined) {\n formData.append(\"private\", userAccountPatchBodyBody.private.toString());\n }\n if (userAccountPatchBodyBody.become_admin !== undefined) {\n formData.append(\n \"become_admin\",\n userAccountPatchBodyBody.become_admin.toString()\n );\n }\n if (userAccountPatchBodyBody.impersonate !== undefined) {\n formData.append(\"impersonate\", userAccountPatchBodyBody.impersonate);\n }\n if (userAccountPatchBodyBody.use_impersonation !== undefined) {\n formData.append(\n \"use_impersonation\",\n userAccountPatchBodyBody.use_impersonation.toString()\n );\n }\n\n return customInstance<void>(\n { url: `/user/account`, method: \"patch\", data: formData },\n options\n );\n};\n\nexport const usePatchUserAccount = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof patchUserAccount>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof patchUserAccount>,\n { data: UserAccountPatchBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return patchUserAccount(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof patchUserAccount>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >(mutationFn, 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>\n) => {\n return customInstance<UserApiLogGetResponse>(\n { url: `/user/api-log`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams) => [\n `/user/api-log`,\n ...(params ? [params] : []),\n];\n\nexport const useGetUserApiLog = <\n TData = AsyncReturnType<typeof getUserApiLog>,\n TError = ErrorType<void>\n>(\n params?: GetUserApiLogParams,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getUserApiLog>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getUserApiLog>> = () =>\n getUserApiLog(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getUserApiLog>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"]}
1
+ {"version":3,"sources":["../../src/user/user.ts"],"names":[],"mappings":";;;;;;AAUA;AAAA;AAAA;AAAA;AAyCO,IAAM,WAAW,CAAC,YAAqD;AAC5E,SAAO,eACL,EAAE,KAAK,SAAS,QAAQ,MAAM,GAC9B,OACF;AACF;AAEO,IAAM,sBAAsB,MAAM,CAAC,OAAO;AAK1C,IAAM,cAAc,CAGzB,YAG4D;AAC5D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,oBAAoB;AAE/D,QAAM,UAA2D,MAC/D,SAAS,cAAc;AAEzB,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAOO,IAAM,iBAAiB,CAC5B,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,iBAAiB,QAAQ,OAAO,OAAO,GAC9C,OACF;AACF;AAEO,IAAM,4BAA4B,CAAC,WAAkC;AAAA,EAC1E;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,oBAAoB,CAI/B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,0BAA0B,MAAM;AAE3E,QAAM,UAAiE,MACrE,eAAe,QAAQ,cAAc;AAEvC,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP;AAOO,IAAM,mBAAmB,CAC9B,0BACA,YACG;AACH,QAAM,WAAW,IAAI,SAAS;AAC9B,MAAI,yBAAyB,YAAY,QAAW;AAClD,aAAS,OAAO,WAAW,yBAAyB,QAAQ,SAAS,CAAC;AAAA,EACxE;AACA,MAAI,yBAAyB,iBAAiB,QAAW;AACvD,aAAS,OACP,gBACA,yBAAyB,aAAa,SAAS,CACjD;AAAA,EACF;AACA,MAAI,yBAAyB,gBAAgB,QAAW;AACtD,aAAS,OAAO,eAAe,yBAAyB,WAAW;AAAA,EACrE;AACA,MAAI,yBAAyB,sBAAsB,QAAW;AAC5D,aAAS,OACP,qBACA,yBAAyB,kBAAkB,SAAS,CACtD;AAAA,EACF;AAEA,SAAO,eACL;AAAA,IACE,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,SAAS,EAAE,gBAAgB,sBAAsB;AAAA,IACjD,MAAM;AAAA,EACR,GACA,OACF;AACF;AAQO,IAAM,sBAAsB,CAGjC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,mBAAmB,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,SAAS,SAAS,CAAC;AAE3B,WAAO,iBAAiB,MAAM,cAAc;AAAA,EAC9C;AAEA,SAAO,YAKL,YAAY,eAAe;AAC/B;AAMO,IAAM,gBAAgB,CAC3B,QACA,YACG;AACH,SAAO,eACL,EAAE,KAAK,iBAAiB,QAAQ,OAAO,OAAO,GAC9C,OACF;AACF;AAEO,IAAM,2BAA2B,CAAC,WAAiC;AAAA,EACxE;AAAA,EACA,GAAI,SAAS,CAAC,MAAM,IAAI,CAAC;AAC3B;AAOO,IAAM,mBAAmB,CAI9B,QACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WAAW,8CAAc,aAAY,yBAAyB,MAAM;AAE1E,QAAM,UAAgE,MACpE,cAAc,QAAQ,cAAc;AAEtC,QAAM,QAAQ,SACZ,UACA,SACA,YACF;AAEA,SAAO;AAAA,IACL;AAAA,KACG;AAEP","sourcesContent":["/**\n * Generated by orval v6.7.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** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport {\n useQuery,\n useMutation,\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n UsersGetResponse,\n DmError,\n UserAccountGetResponse,\n GetUserAccountParams,\n UserAccountPatchBodyBody,\n UserApiLogGetResponse,\n GetUserApiLogParams,\n} from \"../data-manager-api.schemas\";\nimport { customInstance, ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (\n ...args: any\n) => Promise<infer R>\n ? R\n : any;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P\n) => any\n ? P\n : never;\n\n/**\n * 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 therefor do not show up in methods like this\n\n * @summary Get information about all known users\n */\nexport const getUsers = (options?: SecondParameter<typeof customInstance>) => {\n return customInstance<UsersGetResponse>(\n { url: `/user`, method: \"get\" },\n options\n );\n};\n\nexport const getGetUsersQueryKey = () => [`/user`];\n\nexport type GetUsersQueryResult = NonNullable<AsyncReturnType<typeof getUsers>>;\nexport type GetUsersQueryError = ErrorType<void | DmError>;\n\nexport const useGetUsers = <\n TData = AsyncReturnType<typeof getUsers>,\n TError = ErrorType<void | DmError>\n>(options?: {\n query?: UseQueryOptions<AsyncReturnType<typeof getUsers>, TError, TData>;\n request?: SecondParameter<typeof customInstance>;\n}): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUsersQueryKey();\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getUsers>> = () =>\n getUsers(requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getUsers>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Returns a summary of your account\n\n * @summary Get information about your account\n */\nexport const getUserAccount = (\n params?: GetUserAccountParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<UserAccountGetResponse>(\n { url: `/user/account`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetUserAccountQueryKey = (params?: GetUserAccountParams) => [\n `/user/account`,\n ...(params ? [params] : []),\n];\n\nexport type GetUserAccountQueryResult = NonNullable<\n AsyncReturnType<typeof getUserAccount>\n>;\nexport type GetUserAccountQueryError = ErrorType<void | DmError>;\n\nexport const useGetUserAccount = <\n TData = AsyncReturnType<typeof getUserAccount>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetUserAccountParams,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getUserAccount>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserAccountQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getUserAccount>> = () =>\n getUserAccount(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getUserAccount>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n\n/**\n * Make changes to your user account\n\n * @summary Patch your account\n */\nexport const patchUserAccount = (\n userAccountPatchBodyBody: UserAccountPatchBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n if (userAccountPatchBodyBody.private !== undefined) {\n formData.append(\"private\", userAccountPatchBodyBody.private.toString());\n }\n if (userAccountPatchBodyBody.become_admin !== undefined) {\n formData.append(\n \"become_admin\",\n userAccountPatchBodyBody.become_admin.toString()\n );\n }\n if (userAccountPatchBodyBody.impersonate !== undefined) {\n formData.append(\"impersonate\", userAccountPatchBodyBody.impersonate);\n }\n if (userAccountPatchBodyBody.use_impersonation !== undefined) {\n formData.append(\n \"use_impersonation\",\n userAccountPatchBodyBody.use_impersonation.toString()\n );\n }\n\n return customInstance<void>(\n {\n url: `/user/account`,\n method: \"patch\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type PatchUserAccountMutationResult = NonNullable<\n AsyncReturnType<typeof patchUserAccount>\n>;\nexport type PatchUserAccountMutationBody = UserAccountPatchBodyBody;\nexport type PatchUserAccountMutationError = ErrorType<DmError>;\n\nexport const usePatchUserAccount = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n AsyncReturnType<typeof patchUserAccount>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options || {};\n\n const mutationFn: MutationFunction<\n AsyncReturnType<typeof patchUserAccount>,\n { data: UserAccountPatchBodyBody }\n > = (props) => {\n const { data } = props || {};\n\n return patchUserAccount(data, requestOptions);\n };\n\n return useMutation<\n AsyncReturnType<typeof patchUserAccount>,\n TError,\n { data: UserAccountPatchBodyBody },\n TContext\n >(mutationFn, 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>\n) => {\n return customInstance<UserApiLogGetResponse>(\n { url: `/user/api-log`, method: \"get\", params },\n options\n );\n};\n\nexport const getGetUserApiLogQueryKey = (params?: GetUserApiLogParams) => [\n `/user/api-log`,\n ...(params ? [params] : []),\n];\n\nexport type GetUserApiLogQueryResult = NonNullable<\n AsyncReturnType<typeof getUserApiLog>\n>;\nexport type GetUserApiLogQueryError = ErrorType<void>;\n\nexport const useGetUserApiLog = <\n TData = AsyncReturnType<typeof getUserApiLog>,\n TError = ErrorType<void>\n>(\n params?: GetUserApiLogParams,\n options?: {\n query?: UseQueryOptions<\n AsyncReturnType<typeof getUserApiLog>,\n TError,\n TData\n >;\n request?: SecondParameter<typeof customInstance>;\n }\n): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n const { query: queryOptions, request: requestOptions } = options || {};\n\n const queryKey = queryOptions?.queryKey ?? getGetUserApiLogQueryKey(params);\n\n const queryFn: QueryFunction<AsyncReturnType<typeof getUserApiLog>> = () =>\n getUserApiLog(params, requestOptions);\n\n const query = useQuery<AsyncReturnType<typeof getUserApiLog>, TError, TData>(\n queryKey,\n queryFn,\n queryOptions\n );\n\n return {\n queryKey,\n ...query,\n };\n};\n"]}
package/user/user.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as react_query from 'react-query';
2
2
  import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
3
- import { bb as customInstance, ax as UsersGetResponse, bc as ErrorType, b7 as DmError, E as GetUserAccountParams, W as UserAccountDetail, F as UserAccountPatchBodyBody, G as GetUserApiLogParams, ay as UserApiLogGetResponse } from '../custom-instance-32850190';
3
+ import { bb as customInstance, ax as UsersGetResponse, bc as ErrorType, b7 as DmError, E as GetUserAccountParams, W as UserAccountDetail, F as UserAccountPatchBodyBody, G as GetUserApiLogParams, ay as UserApiLogGetResponse } from '../custom-instance-42e56f26.js';
4
4
  import 'axios';
5
5
 
6
+ declare type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (...args: any) => Promise<infer R> ? R : any;
6
7
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
7
8
  /**
8
9
  * 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 therefor do not show up in methods like this
@@ -11,6 +12,8 @@ declare type SecondParameter<T extends (...args: any) => any> = T extends (confi
11
12
  */
12
13
  declare const getUsers: (options?: SecondParameter<typeof customInstance>) => Promise<UsersGetResponse>;
13
14
  declare const getGetUsersQueryKey: () => string[];
15
+ declare type GetUsersQueryResult = NonNullable<AsyncReturnType<typeof getUsers>>;
16
+ declare type GetUsersQueryError = ErrorType<void | DmError>;
14
17
  declare const useGetUsers: <TData = UsersGetResponse, TError = ErrorType<void | DmError>>(options?: {
15
18
  query?: UseQueryOptions<UsersGetResponse, TError, TData, QueryKey> | undefined;
16
19
  request?: SecondParameter<typeof customInstance>;
@@ -24,6 +27,8 @@ declare const useGetUsers: <TData = UsersGetResponse, TError = ErrorType<void |
24
27
  */
25
28
  declare const getUserAccount: (params?: GetUserAccountParams | undefined, options?: SecondParameter<typeof customInstance>) => Promise<UserAccountDetail>;
26
29
  declare const getGetUserAccountQueryKey: (params?: GetUserAccountParams | undefined) => (string | GetUserAccountParams)[];
30
+ declare type GetUserAccountQueryResult = NonNullable<AsyncReturnType<typeof getUserAccount>>;
31
+ declare type GetUserAccountQueryError = ErrorType<void | DmError>;
27
32
  declare const useGetUserAccount: <TData = UserAccountDetail, TError = ErrorType<void | DmError>>(params?: GetUserAccountParams | undefined, options?: {
28
33
  query?: UseQueryOptions<UserAccountDetail, TError, TData, QueryKey> | undefined;
29
34
  request?: SecondParameter<typeof customInstance>;
@@ -36,6 +41,9 @@ declare const useGetUserAccount: <TData = UserAccountDetail, TError = ErrorType<
36
41
  * @summary Patch your account
37
42
  */
38
43
  declare const patchUserAccount: (userAccountPatchBodyBody: UserAccountPatchBodyBody, options?: SecondParameter<typeof customInstance>) => Promise<void>;
44
+ declare type PatchUserAccountMutationResult = NonNullable<AsyncReturnType<typeof patchUserAccount>>;
45
+ declare type PatchUserAccountMutationBody = UserAccountPatchBodyBody;
46
+ declare type PatchUserAccountMutationError = ErrorType<DmError>;
39
47
  declare const usePatchUserAccount: <TError = ErrorType<DmError>, TContext = unknown>(options?: {
40
48
  mutation?: UseMutationOptions<void, TError, {
41
49
  data: UserAccountPatchBodyBody;
@@ -51,6 +59,8 @@ declare const usePatchUserAccount: <TError = ErrorType<DmError>, TContext = unkn
51
59
  */
52
60
  declare const getUserApiLog: (params?: GetUserApiLogParams | undefined, options?: SecondParameter<typeof customInstance>) => Promise<UserApiLogGetResponse>;
53
61
  declare const getGetUserApiLogQueryKey: (params?: GetUserApiLogParams | undefined) => (string | GetUserApiLogParams)[];
62
+ declare type GetUserApiLogQueryResult = NonNullable<AsyncReturnType<typeof getUserApiLog>>;
63
+ declare type GetUserApiLogQueryError = ErrorType<void>;
54
64
  declare const useGetUserApiLog: <TData = UserApiLogGetResponse, TError = ErrorType<void>>(params?: GetUserApiLogParams | undefined, options?: {
55
65
  query?: UseQueryOptions<UserApiLogGetResponse, TError, TData, QueryKey> | undefined;
56
66
  request?: SecondParameter<typeof customInstance>;
@@ -58,4 +68,4 @@ declare const useGetUserApiLog: <TData = UserApiLogGetResponse, TError = ErrorTy
58
68
  queryKey: QueryKey;
59
69
  };
60
70
 
61
- export { getGetUserAccountQueryKey, getGetUserApiLogQueryKey, getGetUsersQueryKey, getUserAccount, getUserApiLog, getUsers, patchUserAccount, useGetUserAccount, useGetUserApiLog, useGetUsers, usePatchUserAccount };
71
+ export { GetUserAccountQueryError, GetUserAccountQueryResult, GetUserApiLogQueryError, GetUserApiLogQueryResult, GetUsersQueryError, GetUsersQueryResult, PatchUserAccountMutationBody, PatchUserAccountMutationError, PatchUserAccountMutationResult, getGetUserAccountQueryKey, getGetUserApiLogQueryKey, getGetUsersQueryKey, getUserAccount, getUserApiLog, getUsers, patchUserAccount, useGetUserAccount, useGetUserApiLog, useGetUsers, usePatchUserAccount };
package/user/user.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __spreadValues,
3
3
  customInstance
4
- } from "../chunk-JR7F532L.js";
4
+ } from "../chunk-6EEIAH4R.js";
5
5
 
6
6
  // src/user/user.ts
7
7
  import {
@@ -51,7 +51,12 @@ var patchUserAccount = (userAccountPatchBodyBody, options) => {
51
51
  if (userAccountPatchBodyBody.use_impersonation !== void 0) {
52
52
  formData.append("use_impersonation", userAccountPatchBodyBody.use_impersonation.toString());
53
53
  }
54
- return customInstance({ url: `/user/account`, method: "patch", data: formData }, options);
54
+ return customInstance({
55
+ url: `/user/account`,
56
+ method: "patch",
57
+ headers: { "Content-Type": "multipart/form-data" },
58
+ data: formData
59
+ }, options);
55
60
  };
56
61
  var usePatchUserAccount = (options) => {
57
62
  const { mutation: mutationOptions, request: requestOptions } = options || {};