@squonk/data-manager-client 0.6.29-rc.1 → 0.7.0

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 (66) hide show
  1. package/accounting/accounting.cjs +30 -0
  2. package/accounting/accounting.cjs.map +1 -0
  3. package/accounting/accounting.d.ts +31 -0
  4. package/accounting/accounting.js +30 -0
  5. package/accounting/accounting.js.map +1 -0
  6. package/accounting/package.json +7 -0
  7. package/admin/admin.cjs.map +1 -1
  8. package/admin/admin.d.ts +1 -1
  9. package/admin/admin.js.map +1 -1
  10. package/annotation/annotation.cjs +64 -0
  11. package/annotation/annotation.cjs.map +1 -0
  12. package/annotation/annotation.d.ts +58 -0
  13. package/annotation/annotation.js +64 -0
  14. package/annotation/annotation.js.map +1 -0
  15. package/annotation/package.json +7 -0
  16. package/application/application.cjs.map +1 -1
  17. package/application/application.d.ts +2 -2
  18. package/application/application.js.map +1 -1
  19. package/{custom-instance-3c2397cc.d.ts → custom-instance-9873bed3.d.ts} +51 -59
  20. package/dataset/dataset.cjs +7 -62
  21. package/dataset/dataset.cjs.map +1 -1
  22. package/dataset/dataset.d.ts +4 -54
  23. package/dataset/dataset.js +6 -61
  24. package/dataset/dataset.js.map +1 -1
  25. package/file/file.cjs.map +1 -1
  26. package/file/file.d.ts +1 -1
  27. package/file/file.js.map +1 -1
  28. package/index.cjs +5 -8
  29. package/index.cjs.map +1 -1
  30. package/index.d.ts +1 -1
  31. package/index.js +5 -8
  32. package/index.js.map +1 -1
  33. package/instance/instance.cjs +8 -6
  34. package/instance/instance.cjs.map +1 -1
  35. package/instance/instance.d.ts +4 -4
  36. package/instance/instance.js +8 -6
  37. package/instance/instance.js.map +1 -1
  38. package/job/job.cjs.map +1 -1
  39. package/job/job.d.ts +2 -2
  40. package/job/job.js.map +1 -1
  41. package/package.json +1 -1
  42. package/project/project.cjs.map +1 -1
  43. package/project/project.d.ts +1 -1
  44. package/project/project.js.map +1 -1
  45. package/src/accounting/accounting.ts +87 -0
  46. package/src/admin/admin.ts +1 -1
  47. package/src/annotation/annotation.ts +217 -0
  48. package/src/application/application.ts +1 -1
  49. package/src/data-manager-api.schemas.ts +57 -69
  50. package/src/dataset/dataset.ts +9 -196
  51. package/src/file/file.ts +1 -1
  52. package/src/instance/instance.ts +7 -12
  53. package/src/job/job.ts +1 -1
  54. package/src/project/project.ts +1 -1
  55. package/src/task/task.ts +1 -1
  56. package/src/type/type.ts +1 -1
  57. package/src/user/user.ts +1 -1
  58. package/task/task.cjs.map +1 -1
  59. package/task/task.d.ts +1 -1
  60. package/task/task.js.map +1 -1
  61. package/type/type.cjs.map +1 -1
  62. package/type/type.d.ts +2 -2
  63. package/type/type.js.map +1 -1
  64. package/user/user.cjs.map +1 -1
  65. package/user/user.d.ts +1 -1
  66. package/user/user.js.map +1 -1
@@ -6,7 +6,7 @@
6
6
 
7
7
  A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 0.6
9
+ * OpenAPI spec version: 0.7
10
10
  */
11
11
  import {
12
12
  useQuery,
@@ -30,9 +30,6 @@ import type {
30
30
  DatasetVersionDeleteResponse,
31
31
  DeleteDatasetParams,
32
32
  DatasetDigestGetResponse,
33
- DatasetMetaGetResponse,
34
- DatasetAnnotationsPostResponse,
35
- DatasetAnnotationsPostBodyBody,
36
33
  DatasetSchemaGetResponse,
37
34
  } from "../data-manager-api.schemas";
38
35
  import { customInstance, ErrorType } from ".././custom-instance";
@@ -53,13 +50,13 @@ type SecondParameter<T extends (...args: any) => any> = T extends (
53
50
  : never;
54
51
 
55
52
  /**
56
- * Using a File in a Project as a source a Dataset (or new Dataset version) is created.
53
+ * Using an unmanaged file in a Project as a source a Dataset (or new Dataset version) is created.
57
54
 
58
55
  The dataset is assigned a unique identity if it has no **Parent**. If a Parent dataset is named during the upload the uploaded file inherits the Parent's identity and is issued with a new unique version number within the Dataset.
59
56
 
60
57
  Behaves like the corresponding **POST** method except the file is expected to exist on a Project path.
61
58
 
62
- * @summary Add a File from a Project as a Dataset
59
+ * @summary Create a Dataset from a file in a Project
63
60
  */
64
61
  export const createDatasetFromFile = (
65
62
  datasetPutBodyBody: DatasetPutBodyBody,
@@ -82,14 +79,8 @@ export const createDatasetFromFile = (
82
79
  formData.append("project_id", datasetPutBodyBody.project_id);
83
80
  formData.append("path", datasetPutBodyBody.path);
84
81
  formData.append("file_name", datasetPutBodyBody.file_name);
85
- if (datasetPutBodyBody.parent_id !== undefined) {
86
- formData.append("parent_id", datasetPutBodyBody.parent_id);
87
- }
88
- if (datasetPutBodyBody.parent_version !== undefined) {
89
- formData.append(
90
- "parent_version",
91
- datasetPutBodyBody.parent_version.toString()
92
- );
82
+ if (datasetPutBodyBody.dataset_id !== undefined) {
83
+ formData.append("dataset_id", datasetPutBodyBody.dataset_id);
93
84
  }
94
85
  if (datasetPutBodyBody.organisation_id !== undefined) {
95
86
  formData.append("organisation_id", datasetPutBodyBody.organisation_id);
@@ -166,15 +157,11 @@ export const uploadDataset = (
166
157
  datasetPostBodyBody.skip_molecule_load.toString()
167
158
  );
168
159
  }
169
- formData.append("as_filename", datasetPostBodyBody.as_filename);
170
- if (datasetPostBodyBody.parent_id !== undefined) {
171
- formData.append("parent_id", datasetPostBodyBody.parent_id);
160
+ if (datasetPostBodyBody.as_filename !== undefined) {
161
+ formData.append("as_filename", datasetPostBodyBody.as_filename);
172
162
  }
173
- if (datasetPostBodyBody.parent_version !== undefined) {
174
- formData.append(
175
- "parent_version",
176
- datasetPostBodyBody.parent_version.toString()
177
- );
163
+ if (datasetPostBodyBody.dataset_id !== undefined) {
164
+ formData.append("dataset_id", datasetPostBodyBody.dataset_id);
178
165
  }
179
166
  formData.append("organisation_id", datasetPostBodyBody.organisation_id);
180
167
  formData.append("unit_id", datasetPostBodyBody.unit_id);
@@ -594,180 +581,6 @@ export const useGetDatasetDigest = <
594
581
  };
595
582
  };
596
583
 
597
- /**
598
- * Returns the metadata for a Dataset versions in JSON format.
599
-
600
- * @summary Gets the metadata for a specific Dataset
601
- */
602
- export const getMetadata = (
603
- datasetid: string,
604
- datasetversion: number,
605
- options?: SecondParameter<typeof customInstance>
606
- ) => {
607
- return customInstance<DatasetMetaGetResponse>(
608
- { url: `/dataset/${datasetid}/meta/${datasetversion}`, method: "get" },
609
- options
610
- );
611
- };
612
-
613
- export const getGetMetadataQueryKey = (
614
- datasetid: string,
615
- datasetversion: number
616
- ) => [`/dataset/${datasetid}/meta/${datasetversion}`];
617
-
618
- export const useGetMetadata = <
619
- TData = AsyncReturnType<typeof getMetadata>,
620
- TError = ErrorType<void | DmError>
621
- >(
622
- datasetid: string,
623
- datasetversion: number,
624
- options?: {
625
- query?: UseQueryOptions<AsyncReturnType<typeof getMetadata>, TError, TData>;
626
- request?: SecondParameter<typeof customInstance>;
627
- }
628
- ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
629
- const { query: queryOptions, request: requestOptions } = options || {};
630
-
631
- const queryKey =
632
- queryOptions?.queryKey ?? getGetMetadataQueryKey(datasetid, datasetversion);
633
-
634
- const queryFn: QueryFunction<AsyncReturnType<typeof getMetadata>> = () =>
635
- getMetadata(datasetid, datasetversion, requestOptions);
636
-
637
- const query = useQuery<AsyncReturnType<typeof getMetadata>, TError, TData>(
638
- queryKey,
639
- queryFn,
640
- { enabled: !!(datasetid && datasetversion), ...queryOptions }
641
- );
642
-
643
- return {
644
- queryKey,
645
- ...query,
646
- };
647
- };
648
-
649
- /**
650
- * Updates the metadata for a Dataset based on the given parameter array.
651
-
652
- * @summary Update the metadata for a specific Dataset
653
- */
654
- export const updateMetadata = (
655
- datasetid: string,
656
- datasetversion: number,
657
- metaparameters: string,
658
- options?: SecondParameter<typeof customInstance>
659
- ) => {
660
- return customInstance<void>(
661
- {
662
- url: `/dataset/${datasetid}/meta/${datasetversion}/${metaparameters}`,
663
- method: "patch",
664
- },
665
- options
666
- );
667
- };
668
-
669
- export const useUpdateMetadata = <
670
- TError = ErrorType<DmError>,
671
- TContext = unknown
672
- >(options?: {
673
- mutation?: UseMutationOptions<
674
- AsyncReturnType<typeof updateMetadata>,
675
- TError,
676
- { datasetid: string; datasetversion: number; metaparameters: string },
677
- TContext
678
- >;
679
- request?: SecondParameter<typeof customInstance>;
680
- }) => {
681
- const { mutation: mutationOptions, request: requestOptions } = options || {};
682
-
683
- const mutationFn: MutationFunction<
684
- AsyncReturnType<typeof updateMetadata>,
685
- { datasetid: string; datasetversion: number; metaparameters: string }
686
- > = (props) => {
687
- const { datasetid, datasetversion, metaparameters } = props || {};
688
-
689
- return updateMetadata(
690
- datasetid,
691
- datasetversion,
692
- metaparameters,
693
- requestOptions
694
- );
695
- };
696
-
697
- return useMutation<
698
- AsyncReturnType<typeof updateMetadata>,
699
- TError,
700
- { datasetid: string; datasetversion: number; metaparameters: string },
701
- TContext
702
- >(mutationFn, mutationOptions);
703
- };
704
- /**
705
- * Creates new annotations of the specified type(s) and add to the metadata for the dataset.
706
- The annotations are provided in a list in JSON format. For details of the annotations that can be created, see the data-manager-metadata library,
707
-
708
- * @summary Add new annotations to the Metadata for the Dataset
709
- */
710
- export const addAnnotations = (
711
- datasetid: string,
712
- datasetversion: number,
713
- datasetAnnotationsPostBodyBody: DatasetAnnotationsPostBodyBody,
714
- options?: SecondParameter<typeof customInstance>
715
- ) => {
716
- const formData = new FormData();
717
- formData.append("annotations", datasetAnnotationsPostBodyBody.annotations);
718
-
719
- return customInstance<DatasetAnnotationsPostResponse>(
720
- {
721
- url: `/dataset/${datasetid}/annotations/${datasetversion}`,
722
- method: "post",
723
- data: formData,
724
- },
725
- options
726
- );
727
- };
728
-
729
- export const useAddAnnotations = <
730
- TError = ErrorType<DmError | void>,
731
- TContext = unknown
732
- >(options?: {
733
- mutation?: UseMutationOptions<
734
- AsyncReturnType<typeof addAnnotations>,
735
- TError,
736
- {
737
- datasetid: string;
738
- datasetversion: number;
739
- data: DatasetAnnotationsPostBodyBody;
740
- },
741
- TContext
742
- >;
743
- request?: SecondParameter<typeof customInstance>;
744
- }) => {
745
- const { mutation: mutationOptions, request: requestOptions } = options || {};
746
-
747
- const mutationFn: MutationFunction<
748
- AsyncReturnType<typeof addAnnotations>,
749
- {
750
- datasetid: string;
751
- datasetversion: number;
752
- data: DatasetAnnotationsPostBodyBody;
753
- }
754
- > = (props) => {
755
- const { datasetid, datasetversion, data } = props || {};
756
-
757
- return addAnnotations(datasetid, datasetversion, data, requestOptions);
758
- };
759
-
760
- return useMutation<
761
- AsyncReturnType<typeof addAnnotations>,
762
- TError,
763
- {
764
- datasetid: string;
765
- datasetversion: number;
766
- data: DatasetAnnotationsPostBodyBody;
767
- },
768
- TContext
769
- >(mutationFn, mutationOptions);
770
- };
771
584
  /**
772
585
  * Returns the property schema for a Dataset versions in JSON format (if available).
773
586
 
package/src/file/file.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** and **Jobs** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 0.6
9
+ * OpenAPI spec version: 0.7
10
10
  */
11
11
  import {
12
12
  useQuery,
@@ -6,7 +6,7 @@
6
6
 
7
7
  A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 0.6
9
+ * OpenAPI spec version: 0.7
10
10
  */
11
11
  import {
12
12
  useQuery,
@@ -25,7 +25,6 @@ import type {
25
25
  InstancesGetResponse,
26
26
  GetInstancesParams,
27
27
  InstanceGetResponse,
28
- GetInstanceParams,
29
28
  InstanceDeleteResponse,
30
29
  PatchInstanceParams,
31
30
  } from "../data-manager-api.schemas";
@@ -172,26 +171,23 @@ export const useGetInstances = <
172
171
  */
173
172
  export const getInstance = (
174
173
  instanceid: string,
175
- params?: GetInstanceParams,
176
174
  options?: SecondParameter<typeof customInstance>
177
175
  ) => {
178
176
  return customInstance<InstanceGetResponse>(
179
- { url: `/instance/${instanceid}`, method: "get", params },
177
+ { url: `/instance/${instanceid}`, method: "get" },
180
178
  options
181
179
  );
182
180
  };
183
181
 
184
- export const getGetInstanceQueryKey = (
185
- instanceid: string,
186
- params?: GetInstanceParams
187
- ) => [`/instance/${instanceid}`, ...(params ? [params] : [])];
182
+ export const getGetInstanceQueryKey = (instanceid: string) => [
183
+ `/instance/${instanceid}`,
184
+ ];
188
185
 
189
186
  export const useGetInstance = <
190
187
  TData = AsyncReturnType<typeof getInstance>,
191
188
  TError = ErrorType<void | DmError>
192
189
  >(
193
190
  instanceid: string,
194
- params?: GetInstanceParams,
195
191
  options?: {
196
192
  query?: UseQueryOptions<AsyncReturnType<typeof getInstance>, TError, TData>;
197
193
  request?: SecondParameter<typeof customInstance>;
@@ -199,11 +195,10 @@ export const useGetInstance = <
199
195
  ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
200
196
  const { query: queryOptions, request: requestOptions } = options || {};
201
197
 
202
- const queryKey =
203
- queryOptions?.queryKey ?? getGetInstanceQueryKey(instanceid, params);
198
+ const queryKey = queryOptions?.queryKey ?? getGetInstanceQueryKey(instanceid);
204
199
 
205
200
  const queryFn: QueryFunction<AsyncReturnType<typeof getInstance>> = () =>
206
- getInstance(instanceid, params, requestOptions);
201
+ getInstance(instanceid, requestOptions);
207
202
 
208
203
  const query = useQuery<AsyncReturnType<typeof getInstance>, TError, TData>(
209
204
  queryKey,
package/src/job/job.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** and **Jobs** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 0.6
9
+ * OpenAPI spec version: 0.7
10
10
  */
11
11
  import {
12
12
  useQuery,
@@ -6,7 +6,7 @@
6
6
 
7
7
  A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 0.6
9
+ * OpenAPI spec version: 0.7
10
10
  */
11
11
  import {
12
12
  useQuery,
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** and **Jobs** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 0.6
9
+ * OpenAPI spec version: 0.7
10
10
  */
11
11
  import {
12
12
  useQuery,
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** and **Jobs** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 0.6
9
+ * OpenAPI spec version: 0.7
10
10
  */
11
11
  import {
12
12
  useQuery,
package/src/user/user.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** and **Jobs** using **Projects** and **Files**.
8
8
 
9
- * OpenAPI spec version: 0.6
9
+ * OpenAPI spec version: 0.7
10
10
  */
11
11
  import {
12
12
  useQuery,
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.6\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,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"]}
package/task/task.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_query from 'react-query';
2
2
  import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
3
- import { d as GetTasksParams, b6 as customInstance, az as TasksGetResponse, b7 as ErrorType, b2 as DmError, c as GetTaskParams, aB as TaskGetResponse } from '../custom-instance-3c2397cc';
3
+ import { d as GetTasksParams, b7 as customInstance, ax as TasksGetResponse, b8 as ErrorType, b3 as DmError, c as GetTaskParams, az as TaskGetResponse } from '../custom-instance-9873bed3';
4
4
  import 'axios';
5
5
 
6
6
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
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.6\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.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":[]}
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.6\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,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"]}
package/type/type.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { UseQueryOptions, QueryKey, UseQueryResult } from 'react-query';
2
- import { b6 as customInstance, ay as TypesGetResponse, b7 as ErrorType, b2 as DmError } from '../custom-instance-3c2397cc';
2
+ import { b7 as customInstance, aw as TypesGetResponse, b8 as ErrorType, b3 as DmError } from '../custom-instance-9873bed3';
3
3
  import 'axios';
4
4
 
5
5
  /**
@@ -10,7 +10,7 @@ import 'axios';
10
10
 
11
11
  A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.
12
12
 
13
- * OpenAPI spec version: 0.6
13
+ * OpenAPI spec version: 0.7
14
14
  */
15
15
 
16
16
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
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.6\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.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":[]}
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.6\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,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"]}
package/user/user.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_query from 'react-query';
2
2
  import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
3
- import { b6 as customInstance, av as UsersGetResponse, b7 as ErrorType, b2 as DmError, a as GetUserAccountParams, V as UserAccountDetail, H as UserAccountPatchBodyBody, G as GetUserApiLogParams, aw as UserApiLogGetResponse } from '../custom-instance-3c2397cc';
3
+ import { b7 as customInstance, at as UsersGetResponse, b8 as ErrorType, b3 as DmError, a as GetUserAccountParams, T as UserAccountDetail, F as UserAccountPatchBodyBody, G as GetUserApiLogParams, au as UserApiLogGetResponse } from '../custom-instance-9873bed3';
4
4
  import 'axios';
5
5
 
6
6
  declare type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
package/user/user.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/user/user.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.6\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"],"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;","names":[]}
1
+ {"version":3,"sources":["../../src/user/user.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 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"],"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;","names":[]}