@squonk/data-manager-client 0.7.20 → 1.0.0-rc.2

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 (94) hide show
  1. package/accounting/accounting.cjs +18 -5
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.ts +1 -1
  4. package/accounting/accounting.js +18 -5
  5. package/accounting/accounting.js.map +1 -1
  6. package/admin/admin.cjs +48 -24
  7. package/admin/admin.cjs.map +1 -1
  8. package/admin/admin.d.ts +5 -5
  9. package/admin/admin.js +48 -24
  10. package/admin/admin.js.map +1 -1
  11. package/application/application.cjs +13 -7
  12. package/application/application.cjs.map +1 -1
  13. package/application/application.d.ts +1 -1
  14. package/application/application.js +13 -7
  15. package/application/application.js.map +1 -1
  16. package/chunk-3O5KIRV4.js +27 -0
  17. package/{chunk-3TENYKS7.js.map → chunk-3O5KIRV4.js.map} +1 -1
  18. package/chunk-IUEU2LYC.cjs +27 -0
  19. package/chunk-IUEU2LYC.cjs.map +1 -0
  20. package/{custom-instance-cf29ab06.d.ts → custom-instance-b2f7dca1.d.ts} +132 -45
  21. package/dataset/dataset.cjs +92 -44
  22. package/dataset/dataset.cjs.map +1 -1
  23. package/dataset/dataset.d.ts +2 -2
  24. package/dataset/dataset.js +92 -44
  25. package/dataset/dataset.js.map +1 -1
  26. package/exchange-rate/exchange-rate.cjs +144 -0
  27. package/exchange-rate/exchange-rate.cjs.map +1 -0
  28. package/exchange-rate/exchange-rate.d.ts +116 -0
  29. package/exchange-rate/exchange-rate.js +144 -0
  30. package/exchange-rate/exchange-rate.js.map +1 -0
  31. package/exchange-rate/package.json +7 -0
  32. package/file/file.cjs +39 -17
  33. package/file/file.cjs.map +1 -1
  34. package/file/file.d.ts +2 -2
  35. package/file/file.js +39 -17
  36. package/file/file.js.map +1 -1
  37. package/index.cjs +2 -2
  38. package/index.cjs.map +1 -1
  39. package/index.d.ts +1 -1
  40. package/index.js +1 -1
  41. package/index.js.map +1 -1
  42. package/instance/instance.cjs +44 -18
  43. package/instance/instance.cjs.map +1 -1
  44. package/instance/instance.d.ts +5 -5
  45. package/instance/instance.js +44 -18
  46. package/instance/instance.js.map +1 -1
  47. package/job/job.cjs +30 -14
  48. package/job/job.cjs.map +1 -1
  49. package/job/job.d.ts +9 -9
  50. package/job/job.js +32 -16
  51. package/job/job.js.map +1 -1
  52. package/metadata/metadata.cjs +43 -27
  53. package/metadata/metadata.cjs.map +1 -1
  54. package/metadata/metadata.d.ts +1 -1
  55. package/metadata/metadata.js +43 -27
  56. package/metadata/metadata.js.map +1 -1
  57. package/package.json +1 -1
  58. package/project/project.cjs +74 -39
  59. package/project/project.cjs.map +1 -1
  60. package/project/project.d.ts +3 -3
  61. package/project/project.js +74 -39
  62. package/project/project.js.map +1 -1
  63. package/src/accounting/accounting.ts +1 -1
  64. package/src/admin/admin.ts +5 -5
  65. package/src/application/application.ts +1 -1
  66. package/src/data-manager-api.schemas.ts +145 -44
  67. package/src/dataset/dataset.ts +2 -2
  68. package/src/exchange-rate/exchange-rate.ts +440 -0
  69. package/src/file/file.ts +2 -2
  70. package/src/instance/instance.ts +11 -9
  71. package/src/job/job.ts +20 -20
  72. package/src/metadata/metadata.ts +1 -1
  73. package/src/project/project.ts +3 -3
  74. package/src/task/task.ts +1 -1
  75. package/src/type/type.ts +1 -1
  76. package/src/user/user.ts +1 -1
  77. package/task/task.cjs +23 -7
  78. package/task/task.cjs.map +1 -1
  79. package/task/task.d.ts +1 -1
  80. package/task/task.js +23 -7
  81. package/task/task.js.map +1 -1
  82. package/type/type.cjs +5 -2
  83. package/type/type.cjs.map +1 -1
  84. package/type/type.d.ts +1 -1
  85. package/type/type.js +5 -2
  86. package/type/type.js.map +1 -1
  87. package/user/user.cjs +35 -13
  88. package/user/user.cjs.map +1 -1
  89. package/user/user.d.ts +1 -1
  90. package/user/user.js +35 -13
  91. package/user/user.js.map +1 -1
  92. package/chunk-3TENYKS7.js +0 -46
  93. package/chunk-RHHRF25R.cjs +0 -46
  94. package/chunk-RHHRF25R.cjs.map +0 -1
@@ -1,7 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
-
4
- var _chunkRHHRF25Rcjs = require('../chunk-RHHRF25R.cjs');
3
+ var _chunkIUEU2LYCcjs = require('../chunk-IUEU2LYC.cjs');
5
4
 
6
5
  // src/dataset/dataset.ts
7
6
  var _reactquery = require('react-query');
@@ -9,10 +8,16 @@ var createDatasetFromFile = (datasetPutBodyBody, options) => {
9
8
  const formData = new FormData();
10
9
  formData.append("dataset_type", datasetPutBodyBody.dataset_type);
11
10
  if (datasetPutBodyBody.format_extra_variables !== void 0) {
12
- formData.append("format_extra_variables", datasetPutBodyBody.format_extra_variables);
11
+ formData.append(
12
+ "format_extra_variables",
13
+ datasetPutBodyBody.format_extra_variables
14
+ );
13
15
  }
14
16
  if (datasetPutBodyBody.skip_molecule_load !== void 0) {
15
- formData.append("skip_molecule_load", datasetPutBodyBody.skip_molecule_load.toString());
17
+ formData.append(
18
+ "skip_molecule_load",
19
+ datasetPutBodyBody.skip_molecule_load.toString()
20
+ );
16
21
  }
17
22
  formData.append("project_id", datasetPutBodyBody.project_id);
18
23
  formData.append("path", datasetPutBodyBody.path);
@@ -23,12 +28,15 @@ var createDatasetFromFile = (datasetPutBodyBody, options) => {
23
28
  if (datasetPutBodyBody.unit_id !== void 0) {
24
29
  formData.append("unit_id", datasetPutBodyBody.unit_id);
25
30
  }
26
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, {
27
- url: `/dataset`,
28
- method: "put",
29
- headers: { "Content-Type": "multipart/form-data" },
30
- data: formData
31
- }, options);
31
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
32
+ {
33
+ url: `/dataset`,
34
+ method: "put",
35
+ headers: { "Content-Type": "multipart/form-data" },
36
+ data: formData
37
+ },
38
+ options
39
+ );
32
40
  };
33
41
  var useCreateDatasetFromFile = (options) => {
34
42
  const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
@@ -43,10 +51,16 @@ var uploadDataset = (datasetPostBodyBody, options) => {
43
51
  formData.append("dataset_file", datasetPostBodyBody.dataset_file);
44
52
  formData.append("dataset_type", datasetPostBodyBody.dataset_type);
45
53
  if (datasetPostBodyBody.format_extra_variables !== void 0) {
46
- formData.append("format_extra_variables", datasetPostBodyBody.format_extra_variables);
54
+ formData.append(
55
+ "format_extra_variables",
56
+ datasetPostBodyBody.format_extra_variables
57
+ );
47
58
  }
48
59
  if (datasetPostBodyBody.skip_molecule_load !== void 0) {
49
- formData.append("skip_molecule_load", datasetPostBodyBody.skip_molecule_load.toString());
60
+ formData.append(
61
+ "skip_molecule_load",
62
+ datasetPostBodyBody.skip_molecule_load.toString()
63
+ );
50
64
  }
51
65
  if (datasetPostBodyBody.as_filename !== void 0) {
52
66
  formData.append("as_filename", datasetPostBodyBody.as_filename);
@@ -55,12 +69,15 @@ var uploadDataset = (datasetPostBodyBody, options) => {
55
69
  formData.append("dataset_id", datasetPostBodyBody.dataset_id);
56
70
  }
57
71
  formData.append("unit_id", datasetPostBodyBody.unit_id);
58
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, {
59
- url: `/dataset`,
60
- method: "post",
61
- headers: { "Content-Type": "multipart/form-data" },
62
- data: formData
63
- }, options);
72
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
73
+ {
74
+ url: `/dataset`,
75
+ method: "post",
76
+ headers: { "Content-Type": "multipart/form-data" },
77
+ data: formData
78
+ },
79
+ options
80
+ );
64
81
  };
65
82
  var useUploadDataset = (options) => {
66
83
  const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
@@ -71,7 +88,10 @@ var useUploadDataset = (options) => {
71
88
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
72
89
  };
73
90
  var getDatasets = (params, options, signal) => {
74
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/dataset`, method: "get", params, signal }, options);
91
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
92
+ { url: `/dataset`, method: "get", params, signal },
93
+ options
94
+ );
75
95
  };
76
96
  var getGetDatasetsQueryKey = (params) => [
77
97
  `/dataset`,
@@ -88,7 +108,10 @@ var useGetDatasets = (params, options) => {
88
108
  return query;
89
109
  };
90
110
  var getVersions = (datasetId, params, options, signal) => {
91
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/dataset/${datasetId}/versions`, method: "get", params, signal }, options);
111
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
112
+ { url: `/dataset/${datasetId}/versions`, method: "get", params, signal },
113
+ options
114
+ );
92
115
  };
93
116
  var getGetVersionsQueryKey = (datasetId, params) => [`/dataset/${datasetId}/versions`, ...params ? [params] : []];
94
117
  var useGetVersions = (datasetId, params, options) => {
@@ -97,18 +120,22 @@ var useGetVersions = (datasetId, params, options) => {
97
120
  const queryFn = ({
98
121
  signal
99
122
  }) => getVersions(datasetId, params, requestOptions, signal);
100
- const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, _chunkRHHRF25Rcjs.__spreadValues.call(void 0, {
101
- enabled: !!datasetId
102
- }, queryOptions));
123
+ const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, {
124
+ enabled: !!datasetId,
125
+ ...queryOptions
126
+ });
103
127
  query.queryKey = queryKey;
104
128
  return query;
105
129
  };
106
130
  var deleteDataset = (datasetId, datasetVersion, params, options) => {
107
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, {
108
- url: `/dataset/${datasetId}/${datasetVersion}`,
109
- method: "delete",
110
- params
111
- }, options);
131
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
132
+ {
133
+ url: `/dataset/${datasetId}/${datasetVersion}`,
134
+ method: "delete",
135
+ params
136
+ },
137
+ options
138
+ );
112
139
  };
113
140
  var useDeleteDataset = (options) => {
114
141
  const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
@@ -119,7 +146,10 @@ var useDeleteDataset = (options) => {
119
146
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
120
147
  };
121
148
  var downloadDataset = (datasetId, datasetVersion, options, signal) => {
122
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/dataset/${datasetId}/${datasetVersion}`, method: "get", signal }, options);
149
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
150
+ { url: `/dataset/${datasetId}/${datasetVersion}`, method: "get", signal },
151
+ options
152
+ );
123
153
  };
124
154
  var getDownloadDatasetQueryKey = (datasetId, datasetVersion) => [`/dataset/${datasetId}/${datasetVersion}`];
125
155
  var useDownloadDataset = (datasetId, datasetVersion, options) => {
@@ -128,14 +158,18 @@ var useDownloadDataset = (datasetId, datasetVersion, options) => {
128
158
  const queryFn = ({
129
159
  signal
130
160
  }) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);
131
- const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, _chunkRHHRF25Rcjs.__spreadValues.call(void 0, {
132
- enabled: !!(datasetId && datasetVersion)
133
- }, queryOptions));
161
+ const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, {
162
+ enabled: !!(datasetId && datasetVersion),
163
+ ...queryOptions
164
+ });
134
165
  query.queryKey = queryKey;
135
166
  return query;
136
167
  };
137
168
  var removeEditorFromDataset = (datasetId, userId, options) => {
138
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/dataset/${datasetId}/editor/${userId}`, method: "delete" }, options);
169
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
170
+ { url: `/dataset/${datasetId}/editor/${userId}`, method: "delete" },
171
+ options
172
+ );
139
173
  };
140
174
  var useRemoveEditorFromDataset = (options) => {
141
175
  const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
@@ -146,7 +180,10 @@ var useRemoveEditorFromDataset = (options) => {
146
180
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
147
181
  };
148
182
  var addEditorToDataset = (datasetId, userId, options) => {
149
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/dataset/${datasetId}/editor/${userId}`, method: "put" }, options);
183
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
184
+ { url: `/dataset/${datasetId}/editor/${userId}`, method: "put" },
185
+ options
186
+ );
150
187
  };
151
188
  var useAddEditorToDataset = (options) => {
152
189
  const { mutation: mutationOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
@@ -157,7 +194,10 @@ var useAddEditorToDataset = (options) => {
157
194
  return _reactquery.useMutation.call(void 0, mutationFn, mutationOptions);
158
195
  };
159
196
  var getDatasetDigest = (datasetDigest, options, signal) => {
160
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, { url: `/dataset/digest/${datasetDigest}`, method: "get", signal }, options);
197
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
198
+ { url: `/dataset/digest/${datasetDigest}`, method: "get", signal },
199
+ options
200
+ );
161
201
  };
162
202
  var getGetDatasetDigestQueryKey = (datasetDigest) => [
163
203
  `/dataset/digest/${datasetDigest}`
@@ -166,18 +206,22 @@ var useGetDatasetDigest = (datasetDigest, options) => {
166
206
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
167
207
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetDatasetDigestQueryKey(datasetDigest)));
168
208
  const queryFn = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);
169
- const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, _chunkRHHRF25Rcjs.__spreadValues.call(void 0, {
170
- enabled: !!datasetDigest
171
- }, queryOptions));
209
+ const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, {
210
+ enabled: !!datasetDigest,
211
+ ...queryOptions
212
+ });
172
213
  query.queryKey = queryKey;
173
214
  return query;
174
215
  };
175
216
  var getSchema = (datasetId, datasetVersion, options, signal) => {
176
- return _chunkRHHRF25Rcjs.customInstance.call(void 0, {
177
- url: `/dataset/${datasetId}/schema/${datasetVersion}`,
178
- method: "get",
179
- signal
180
- }, options);
217
+ return _chunkIUEU2LYCcjs.customInstance.call(void 0,
218
+ {
219
+ url: `/dataset/${datasetId}/schema/${datasetVersion}`,
220
+ method: "get",
221
+ signal
222
+ },
223
+ options
224
+ );
181
225
  };
182
226
  var getGetSchemaQueryKey = (datasetId, datasetVersion) => [`/dataset/${datasetId}/schema/${datasetVersion}`];
183
227
  var useGetSchema = (datasetId, datasetVersion, options) => {
@@ -186,7 +230,11 @@ var useGetSchema = (datasetId, datasetVersion, options) => {
186
230
  const queryFn = ({
187
231
  signal
188
232
  }) => getSchema(datasetId, datasetVersion, requestOptions, signal);
189
- const query = _reactquery.useQuery.call(void 0, queryKey, queryFn, _chunkRHHRF25Rcjs.__spreadValues.call(void 0, { enabled: !!(datasetId && datasetVersion) }, queryOptions));
233
+ const query = _reactquery.useQuery.call(void 0,
234
+ queryKey,
235
+ queryFn,
236
+ { enabled: !!(datasetId && datasetVersion), ...queryOptions }
237
+ );
190
238
  query.queryKey = queryKey;
191
239
  return query;
192
240
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/dataset/dataset.ts"],"names":[],"mappings":";;;;;;AAUA;AA2CO,IAAM,wBAAwB,CACnC,oBACA,YACG;AACH,QAAM,WAAW,IAAI,SAAS;AAC9B,WAAS,OAAO,gBAAgB,mBAAmB,YAAY;AAC/D,MAAI,mBAAmB,2BAA2B,QAAW;AAC3D,aAAS,OACP,0BACA,mBAAmB,sBACrB;AAAA,EACF;AACA,MAAI,mBAAmB,uBAAuB,QAAW;AACvD,aAAS,OACP,sBACA,mBAAmB,mBAAmB,SAAS,CACjD;AAAA,EACF;AACA,WAAS,OAAO,cAAc,mBAAmB,UAAU;AAC3D,WAAS,OAAO,QAAQ,mBAAmB,IAAI;AAC/C,WAAS,OAAO,aAAa,mBAAmB,SAAS;AACzD,MAAI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GACA,OACF;AACF;AAEO,IAAM,uBAAuB,CAClC,WACA,mBACG,CAAC,YAAY,oBAAoB,gBAAgB;AAO/C,IAAM,eAAe,CAI1B,WACA,gBACA,YAQ2D;AAC3D,QAAM,EAAE,OAAO,cAAc,SAAS,mBAAmB,WAAW,CAAC;AAErE,QAAM,WACJ,8CAAc,aAAY,qBAAqB,WAAW,cAAc;AAE1E,QAAM,UAAgE,CAAC;AAAA,IACrE;AAAA,QACI,UAAU,WAAW,gBAAgB,gBAAgB,MAAM;AAEjE,QAAM,QAAQ,SACZ,UACA,SACA,iBAAE,SAAS,CAAC,CAAE,cAAa,mBAAoB,aACjD;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 0.7\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n DatasetPutPostResponse,\n DmError,\n DatasetPutBodyBody,\n DatasetPostBodyBody,\n DatasetsGetResponse,\n GetDatasetsParams,\n DatasetVersionsGetResponse,\n GetVersionsParams,\n DatasetVersionDeleteResponse,\n DeleteDatasetParams,\n DatasetDigestGetResponse,\n DatasetSchemaGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\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 * Using an unmanaged file in a Project as a source a Dataset (or new Dataset version) is created.\n\nThe 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.\n\nBehaves like the corresponding **POST** method except the file is expected to exist on a Project path.\n\n * @summary Create a Dataset from a file in a Project\n */\nexport const createDatasetFromFile = (\n datasetPutBodyBody: DatasetPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_type\", datasetPutBodyBody.dataset_type);\n if (datasetPutBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPutBodyBody.format_extra_variables\n );\n }\n if (datasetPutBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPutBodyBody.skip_molecule_load.toString()\n );\n }\n formData.append(\"project_id\", datasetPutBodyBody.project_id);\n formData.append(\"path\", datasetPutBodyBody.path);\n formData.append(\"file_name\", datasetPutBodyBody.file_name);\n if (datasetPutBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPutBodyBody.dataset_id);\n }\n if (datasetPutBodyBody.unit_id !== undefined) {\n formData.append(\"unit_id\", datasetPutBodyBody.unit_id);\n }\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type CreateDatasetFromFileMutationResult = NonNullable<\n Awaited<ReturnType<typeof createDatasetFromFile>>\n>;\nexport type CreateDatasetFromFileMutationBody = DatasetPutBodyBody;\nexport type CreateDatasetFromFileMutationError = ErrorType<void | DmError>;\n\nexport const useCreateDatasetFromFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n { data: DatasetPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createDatasetFromFile(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Uploads a dataset.\n\nDataset file-naming is strictly limited to a fixed set of extensions based on the Dataset **Type**. You can obtain the supported types (and their extensions) via the **\\/type** endpoint. Filenames that do not comply with the supported filename extensions will be rejected.\n\nDatasets can be uploaded in an uncompressed form, or uploaded pre-compressed using the `.gz` extension.\n\nThe 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.\n\nDatasets undergo some processing in an asynchronous `task` after control returns to you. The unique identity of the assigned task (the `task id`) is presented to you in this endpoint's response. Before you can use an uploaded dataset, and before the dataset can be added to any pre-assigned projects, you must wait until the task is complete by making regular calls to the **\\/task/{task-id}** endpoint. A Dataset upload is complete when the corresponding `task.done` is **true** along with a `task.exit_code` of **0**. If the Dataset upload fails `task.done` will be **true** but the `task.exit_code` will be non-zero.\n\n * @summary Upload an external file as a Dataset\n */\nexport const uploadDataset = (\n datasetPostBodyBody: DatasetPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_file\", datasetPostBodyBody.dataset_file);\n formData.append(\"dataset_type\", datasetPostBodyBody.dataset_type);\n if (datasetPostBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPostBodyBody.format_extra_variables\n );\n }\n if (datasetPostBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPostBodyBody.skip_molecule_load.toString()\n );\n }\n if (datasetPostBodyBody.as_filename !== undefined) {\n formData.append(\"as_filename\", datasetPostBodyBody.as_filename);\n }\n if (datasetPostBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPostBodyBody.dataset_id);\n }\n formData.append(\"unit_id\", datasetPostBodyBody.unit_id);\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"post\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type UploadDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof uploadDataset>>\n>;\nexport type UploadDatasetMutationBody = DatasetPostBodyBody;\nexport type UploadDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useUploadDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof uploadDataset>>,\n { data: DatasetPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return uploadDataset(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns datasets that you have access to, whether attached to a project or not.\n\nYou will not see Datasets while their upload is still in progress.\n\nDatasets can be filtered by: 1. `owner username`, 2. `mime_type`, 3. a list of `owners` (a subset of the above) 4. a list of `editors` (a subset of the above) 5. `Labels` or `Label/Value` pairs (a subset of the above)\n\nNote that if `editors` are combined with `owner username`, then the datasets will be filtered by owner username first followed by editors (so it's an AND). If `editors` are combined with `owners`, then the result will be datasets filtered by a combination of owners OR editors.\n\n * @summary Get datasets that are available to you\n */\nexport const getDatasets = (\n params?: GetDatasetsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetsGetResponse>(\n { url: `/dataset`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetDatasetsQueryKey = (params?: GetDatasetsParams) => [\n `/dataset`,\n ...(params ? [params] : []),\n];\n\nexport type GetDatasetsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasets>>\n>;\nexport type GetDatasetsQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasets = <\n TData = Awaited<ReturnType<typeof getDatasets>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasets>>,\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 ?? getGetDatasetsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasets>>> = ({\n signal,\n }) => getDatasets(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getDatasets>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns a list of Dataset versions.\n\nYou will not see Datasets while their upload is still in progress.\n\n * @summary Gets all the versions of a specific Dataset\n */\nexport const getVersions = (\n datasetId: string,\n params?: GetVersionsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetVersionsGetResponse>(\n { url: `/dataset/${datasetId}/versions`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetVersionsQueryKey = (\n datasetId: string,\n params?: GetVersionsParams\n) => [`/dataset/${datasetId}/versions`, ...(params ? [params] : [])];\n\nexport type GetVersionsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getVersions>>\n>;\nexport type GetVersionsQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersions = <\n TData = Awaited<ReturnType<typeof getVersions>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersions>>,\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 =\n queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersions>>> = ({\n signal,\n }) => getVersions(datasetId, params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getVersions>>,\n TError,\n TData\n >(queryKey, queryFn, {\n enabled: !!datasetId,\n ...queryOptions,\n }) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Given the Dataset `id` and `version` the Dataset will be removed. The API does not prevent you removing a Dataset that's been used in a **Project**. When removed using this endpoint the Dataset is automatically detached from any and all Projects that it was attached to and any corresponding Project Files relating to the Dataset are also removed.\n\nYou must be an `editor` or `owner` of the Dataset.\n\nYou cannot delete a Dataset until its upload is complete.\n\n * @summary Delete a dataset\n */\nexport const deleteDataset = (\n datasetId: string,\n datasetVersion: number,\n params?: DeleteDatasetParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetVersionDeleteResponse>(\n {\n url: `/dataset/${datasetId}/${datasetVersion}`,\n method: \"delete\",\n params,\n },\n options\n );\n};\n\nexport type DeleteDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteDataset>>\n>;\n\nexport type DeleteDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useDeleteDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteDataset>>,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams }\n > = (props) => {\n const { datasetId, datasetVersion, params } = props ?? {};\n\n return deleteDataset(datasetId, datasetVersion, params, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `dataset_id` the dataset will be returned if available.\n\nYou cannot get a Dataset until its upload is complete.\n\n * @summary Download a dataset\n */\nexport const downloadDataset = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/${datasetVersion}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getDownloadDatasetQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [`/dataset/${datasetId}/${datasetVersion}`];\n\nexport type DownloadDatasetQueryResult = NonNullable<\n Awaited<ReturnType<typeof downloadDataset>>\n>;\nexport type DownloadDatasetQueryError = ErrorType<DmError>;\n\nexport const useDownloadDataset = <\n TData = Awaited<ReturnType<typeof downloadDataset>>,\n TError = ErrorType<DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\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 =\n queryOptions?.queryKey ??\n getDownloadDatasetQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadDataset>>> = ({\n signal,\n }) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n >(queryKey, queryFn, {\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n }) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * The user is removed from the Dataset's `editor` list. The user is removed from all versions of a dataset. You can remove yourself but an `owner` (creator) will always have access to the dataset.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Remove a user's edit permission for a Dataset\n */\nexport const removeEditorFromDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport type RemoveEditorFromDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof removeEditorFromDataset>>\n>;\n\nexport type RemoveEditorFromDatasetMutationError = ErrorType<DmError>;\n\nexport const useRemoveEditorFromDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return removeEditorFromDataset(datasetId, userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * The user is added to the dataset's editor list. The dataset `owner` is automatically an editor and so does not need to be added as an `editor`.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Give a user edit permission for a dataset\n */\nexport const addEditorToDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport type AddEditorToDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof addEditorToDataset>>\n>;\n\nexport type AddEditorToDatasetMutationError = ErrorType<DmError>;\n\nexport const useAddEditorToDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return addEditorToDataset(datasetId, userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns a dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-charcater hexstring.\n\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const getDatasetDigest = (\n datasetDigest: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetDigestGetResponse>(\n { url: `/dataset/digest/${datasetDigest}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string) => [\n `/dataset/digest/${datasetDigest}`,\n];\n\nexport type GetDatasetDigestQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasetDigest>>\n>;\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasetDigest = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>\n>(\n datasetDigest: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\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 =\n queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getDatasetDigest>>\n > = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n >(queryKey, queryFn, {\n enabled: !!datasetDigest,\n ...queryOptions,\n }) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns the property schema for a Dataset versions in JSON format (if available).\n\n * @summary Gets the property schema for a specific Dataset\n */\nexport const getSchema = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetSchemaGetResponse>(\n {\n url: `/dataset/${datasetId}/schema/${datasetVersion}`,\n method: \"get\",\n signal,\n },\n options\n );\n};\n\nexport const getGetSchemaQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [`/dataset/${datasetId}/schema/${datasetVersion}`];\n\nexport type GetSchemaQueryResult = NonNullable<\n Awaited<ReturnType<typeof getSchema>>\n>;\nexport type GetSchemaQueryError = ErrorType<void | DmError>;\n\nexport const useGetSchema = <\n TData = Awaited<ReturnType<typeof getSchema>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getSchema>>,\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 =\n queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSchema>>> = ({\n signal,\n }) => getSchema(datasetId, datasetVersion, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getSchema>>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!(datasetId && datasetVersion), ...queryOptions }\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"]}
1
+ {"version":3,"sources":["../../src/dataset/dataset.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,UAAU,mBAAmB;AA2C/B,IAAM,wBAAwB,CACnC,oBACA,YACG;AACH,QAAM,WAAW,IAAI,SAAS;AAC9B,WAAS,OAAO,gBAAgB,mBAAmB,YAAY;AAC/D,MAAI,mBAAmB,2BAA2B,QAAW;AAC3D,aAAS;AAAA,MACP;AAAA,MACA,mBAAmB;AAAA,IACrB;AAAA,EACF;AACA,MAAI,mBAAmB,uBAAuB,QAAW;AACvD,aAAS;AAAA,MACP;AAAA,MACA,mBAAmB,mBAAmB,SAAS;AAAA,IACjD;AAAA,EACF;AACA,WAAS,OAAO,cAAc,mBAAmB,UAAU;AAC3D,WAAS,OAAO,QAAQ,mBAAmB,IAAI;AAC/C,WAAS,OAAO,aAAa,mBAAmB,SAAS;AACzD,MAAI,mBAAmB,eAAe,QAAW;AAC/C,aAAS,OAAO,cAAc,mBAAmB,UAAU;AAAA,EAC7D;AACA,MAAI,mBAAmB,YAAY,QAAW;AAC5C,aAAS,OAAO,WAAW,mBAAmB,OAAO;AAAA,EACvD;AAEA,SAAO;AAAA,IACL;AAAA,MACE,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,SAAS,EAAE,gBAAgB,sBAAsB;AAAA,MACjD,MAAM;AAAA,IACR;AAAA,IACA;AAAA,EACF;AACF;AAQO,IAAM,2BAA2B,CAGtC,YAQI;AACJ,QAAM,EAAE,UAAU,iBAAiB,SAAS,eAAe,IAAI,WAAW,CAAC;AAE3E,QAAM,aAGF,CAAC,UAAU;AACb,UAAM,EAAE,KAAK,IAAI,SAAS,CAAC;AAE3B,WAAO,sBAAsB,MAAM,cAAc;AAAA,EACnD;AAEA,SAAO,YAKL,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,QAAM,YACJ,6CAAc,aAAY,qBAAqB,WAAW,cAAc;AAE1E,QAAM,UAAgE,CAAC;AAAA,IACrE;AAAA,EACF,MAAM,UAAU,WAAW,gBAAgB,gBAAgB,MAAM;AAEjE,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA,EAAE,SAAS,CAAC,EAAE,aAAa,iBAAiB,GAAG,aAAa;AAAA,EAC9D;AAEA,QAAM,WAAW;AAEjB,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.9.1 🍺\n * Do not edit manually.\n * Dataset Manager API\n * The Dataset Manager API service.\n\nA service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **Jobs** using **Projects** and **Files**.\n\n * OpenAPI spec version: 1.0\n */\nimport { useQuery, useMutation } from \"react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"react-query\";\nimport type {\n DatasetPutPostResponse,\n DmError,\n DatasetPutBodyBody,\n DatasetPostBodyBody,\n DatasetsGetResponse,\n GetDatasetsParams,\n DatasetVersionsGetResponse,\n GetVersionsParams,\n DatasetVersionDeleteResponse,\n DeleteDatasetParams,\n DatasetDigestGetResponse,\n DatasetSchemaGetResponse,\n} from \"../data-manager-api.schemas\";\nimport { customInstance } from \".././custom-instance\";\nimport type { ErrorType } from \".././custom-instance\";\n\n// eslint-disable-next-line\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 * Using an unmanaged file in a Project as a source a Dataset (or new Dataset version) is created.\n\nThe 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.\n\nBehaves like the corresponding **POST** method except the file is expected to exist on a Project path.\n\n * @summary Create a Dataset from a file in a Project\n */\nexport const createDatasetFromFile = (\n datasetPutBodyBody: DatasetPutBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_type\", datasetPutBodyBody.dataset_type);\n if (datasetPutBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPutBodyBody.format_extra_variables\n );\n }\n if (datasetPutBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPutBodyBody.skip_molecule_load.toString()\n );\n }\n formData.append(\"project_id\", datasetPutBodyBody.project_id);\n formData.append(\"path\", datasetPutBodyBody.path);\n formData.append(\"file_name\", datasetPutBodyBody.file_name);\n if (datasetPutBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPutBodyBody.dataset_id);\n }\n if (datasetPutBodyBody.unit_id !== undefined) {\n formData.append(\"unit_id\", datasetPutBodyBody.unit_id);\n }\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"put\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type CreateDatasetFromFileMutationResult = NonNullable<\n Awaited<ReturnType<typeof createDatasetFromFile>>\n>;\nexport type CreateDatasetFromFileMutationBody = DatasetPutBodyBody;\nexport type CreateDatasetFromFileMutationError = ErrorType<void | DmError>;\n\nexport const useCreateDatasetFromFile = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n { data: DatasetPutBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return createDatasetFromFile(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Uploads a dataset.\n\nDataset file-naming is strictly limited to a fixed set of extensions based on the Dataset **Type**. You can obtain the supported types (and their extensions) via the **\\/type** endpoint. Filenames that do not comply with the supported filename extensions will be rejected.\n\nDatasets can be uploaded in an uncompressed form, or uploaded pre-compressed using the `.gz` extension.\n\nThe 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.\n\nDatasets undergo some processing in an asynchronous `task` after control returns to you. The unique identity of the assigned task (the `task id`) is presented to you in this endpoint's response. Before you can use an uploaded dataset, and before the dataset can be added to any pre-assigned projects, you must wait until the task is complete by making regular calls to the **\\/task/{task-id}** endpoint. A Dataset upload is complete when the corresponding `task.done` is **true** along with a `task.exit_code` of **0**. If the Dataset upload fails `task.done` will be **true** but the `task.exit_code` will be non-zero.\n\n * @summary Upload an external file as a Dataset\n */\nexport const uploadDataset = (\n datasetPostBodyBody: DatasetPostBodyBody,\n options?: SecondParameter<typeof customInstance>\n) => {\n const formData = new FormData();\n formData.append(\"dataset_file\", datasetPostBodyBody.dataset_file);\n formData.append(\"dataset_type\", datasetPostBodyBody.dataset_type);\n if (datasetPostBodyBody.format_extra_variables !== undefined) {\n formData.append(\n \"format_extra_variables\",\n datasetPostBodyBody.format_extra_variables\n );\n }\n if (datasetPostBodyBody.skip_molecule_load !== undefined) {\n formData.append(\n \"skip_molecule_load\",\n datasetPostBodyBody.skip_molecule_load.toString()\n );\n }\n if (datasetPostBodyBody.as_filename !== undefined) {\n formData.append(\"as_filename\", datasetPostBodyBody.as_filename);\n }\n if (datasetPostBodyBody.dataset_id !== undefined) {\n formData.append(\"dataset_id\", datasetPostBodyBody.dataset_id);\n }\n formData.append(\"unit_id\", datasetPostBodyBody.unit_id);\n\n return customInstance<DatasetPutPostResponse>(\n {\n url: `/dataset`,\n method: \"post\",\n headers: { \"Content-Type\": \"multipart/form-data\" },\n data: formData,\n },\n options\n );\n};\n\nexport type UploadDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof uploadDataset>>\n>;\nexport type UploadDatasetMutationBody = DatasetPostBodyBody;\nexport type UploadDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useUploadDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof uploadDataset>>,\n { data: DatasetPostBodyBody }\n > = (props) => {\n const { data } = props ?? {};\n\n return uploadDataset(data, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns datasets that you have access to, whether attached to a project or not.\n\nYou will not see Datasets while their upload is still in progress.\n\nDatasets can be filtered by: 1. `owner username`, 2. `mime_type`, 3. a list of `owners` (a subset of the above) 4. a list of `editors` (a subset of the above) 5. `Labels` or `Label/Value` pairs (a subset of the above)\n\nNote that if `editors` are combined with `owner username`, then the datasets will be filtered by owner username first followed by editors (so it's an AND). If `editors` are combined with `owners`, then the result will be datasets filtered by a combination of owners OR editors.\n\n * @summary Get datasets that are available to you\n */\nexport const getDatasets = (\n params?: GetDatasetsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetsGetResponse>(\n { url: `/dataset`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetDatasetsQueryKey = (params?: GetDatasetsParams) => [\n `/dataset`,\n ...(params ? [params] : []),\n];\n\nexport type GetDatasetsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasets>>\n>;\nexport type GetDatasetsQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasets = <\n TData = Awaited<ReturnType<typeof getDatasets>>,\n TError = ErrorType<void | DmError>\n>(\n params?: GetDatasetsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasets>>,\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 ?? getGetDatasetsQueryKey(params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasets>>> = ({\n signal,\n }) => getDatasets(params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getDatasets>>,\n TError,\n TData\n >(queryKey, queryFn, queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns a list of Dataset versions.\n\nYou will not see Datasets while their upload is still in progress.\n\n * @summary Gets all the versions of a specific Dataset\n */\nexport const getVersions = (\n datasetId: string,\n params?: GetVersionsParams,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetVersionsGetResponse>(\n { url: `/dataset/${datasetId}/versions`, method: \"get\", params, signal },\n options\n );\n};\n\nexport const getGetVersionsQueryKey = (\n datasetId: string,\n params?: GetVersionsParams\n) => [`/dataset/${datasetId}/versions`, ...(params ? [params] : [])];\n\nexport type GetVersionsQueryResult = NonNullable<\n Awaited<ReturnType<typeof getVersions>>\n>;\nexport type GetVersionsQueryError = ErrorType<void | DmError>;\n\nexport const useGetVersions = <\n TData = Awaited<ReturnType<typeof getVersions>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n params?: GetVersionsParams,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getVersions>>,\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 =\n queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetId, params);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersions>>> = ({\n signal,\n }) => getVersions(datasetId, params, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getVersions>>,\n TError,\n TData\n >(queryKey, queryFn, {\n enabled: !!datasetId,\n ...queryOptions,\n }) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Given the Dataset `id` and `version` the Dataset will be removed. The API does not prevent you removing a Dataset that's been used in a **Project**. When removed using this endpoint the Dataset is automatically detached from any and all Projects that it was attached to and any corresponding Project Files relating to the Dataset are also removed.\n\nYou must be an `editor` or `owner` of the Dataset.\n\nYou cannot delete a Dataset until its upload is complete.\n\n * @summary Delete a dataset\n */\nexport const deleteDataset = (\n datasetId: string,\n datasetVersion: number,\n params?: DeleteDatasetParams,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<DatasetVersionDeleteResponse>(\n {\n url: `/dataset/${datasetId}/${datasetVersion}`,\n method: \"delete\",\n params,\n },\n options\n );\n};\n\nexport type DeleteDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof deleteDataset>>\n>;\n\nexport type DeleteDatasetMutationError = ErrorType<void | DmError>;\n\nexport const useDeleteDataset = <\n TError = ErrorType<void | DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof deleteDataset>>,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams }\n > = (props) => {\n const { datasetId, datasetVersion, params } = props ?? {};\n\n return deleteDataset(datasetId, datasetVersion, params, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Given a `dataset_id` the dataset will be returned if available.\n\nYou cannot get a Dataset until its upload is complete.\n\n * @summary Download a dataset\n */\nexport const downloadDataset = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/${datasetVersion}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getDownloadDatasetQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [`/dataset/${datasetId}/${datasetVersion}`];\n\nexport type DownloadDatasetQueryResult = NonNullable<\n Awaited<ReturnType<typeof downloadDataset>>\n>;\nexport type DownloadDatasetQueryError = ErrorType<DmError>;\n\nexport const useDownloadDataset = <\n TData = Awaited<ReturnType<typeof downloadDataset>>,\n TError = ErrorType<DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\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 =\n queryOptions?.queryKey ??\n getDownloadDatasetQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadDataset>>> = ({\n signal,\n }) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n >(queryKey, queryFn, {\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n }) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * The user is removed from the Dataset's `editor` list. The user is removed from all versions of a dataset. You can remove yourself but an `owner` (creator) will always have access to the dataset.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Remove a user's edit permission for a Dataset\n */\nexport const removeEditorFromDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"delete\" },\n options\n );\n};\n\nexport type RemoveEditorFromDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof removeEditorFromDataset>>\n>;\n\nexport type RemoveEditorFromDatasetMutationError = ErrorType<DmError>;\n\nexport const useRemoveEditorFromDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return removeEditorFromDataset(datasetId, userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * The user is added to the dataset's editor list. The dataset `owner` is automatically an editor and so does not need to be added as an `editor`.\n\nYou must be an `editor` or `owner` of the dataset.\n\nYou cannot modify Dataset editors until its upload is complete.\n\n * @summary Give a user edit permission for a dataset\n */\nexport const addEditorToDataset = (\n datasetId: string,\n userId: string,\n options?: SecondParameter<typeof customInstance>\n) => {\n return customInstance<void>(\n { url: `/dataset/${datasetId}/editor/${userId}`, method: \"put\" },\n options\n );\n};\n\nexport type AddEditorToDatasetMutationResult = NonNullable<\n Awaited<ReturnType<typeof addEditorToDataset>>\n>;\n\nexport type AddEditorToDatasetMutationError = ErrorType<DmError>;\n\nexport const useAddEditorToDataset = <\n TError = ErrorType<DmError>,\n TContext = unknown\n>(options?: {\n mutation?: UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >;\n request?: SecondParameter<typeof customInstance>;\n}) => {\n const { mutation: mutationOptions, request: requestOptions } = options ?? {};\n\n const mutationFn: MutationFunction<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n { datasetId: string; userId: string }\n > = (props) => {\n const { datasetId, userId } = props ?? {};\n\n return addEditorToDataset(datasetId, userId, requestOptions);\n };\n\n return useMutation<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\n >(mutationFn, mutationOptions);\n};\n/**\n * Returns a dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-character hex string.\n\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const getDatasetDigest = (\n datasetDigest: string,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetDigestGetResponse>(\n { url: `/dataset/digest/${datasetDigest}`, method: \"get\", signal },\n options\n );\n};\n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string) => [\n `/dataset/digest/${datasetDigest}`,\n];\n\nexport type GetDatasetDigestQueryResult = NonNullable<\n Awaited<ReturnType<typeof getDatasetDigest>>\n>;\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>;\n\nexport const useGetDatasetDigest = <\n TData = Awaited<ReturnType<typeof getDatasetDigest>>,\n TError = ErrorType<void | DmError>\n>(\n datasetDigest: string,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\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 =\n queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n const queryFn: QueryFunction<\n Awaited<ReturnType<typeof getDatasetDigest>>\n > = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n const query = useQuery<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n >(queryKey, queryFn, {\n enabled: !!datasetDigest,\n ...queryOptions,\n }) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n\n/**\n * Returns the property schema for a Dataset versions in JSON format (if available).\n\n * @summary Gets the property schema for a specific Dataset\n */\nexport const getSchema = (\n datasetId: string,\n datasetVersion: number,\n options?: SecondParameter<typeof customInstance>,\n signal?: AbortSignal\n) => {\n return customInstance<DatasetSchemaGetResponse>(\n {\n url: `/dataset/${datasetId}/schema/${datasetVersion}`,\n method: \"get\",\n signal,\n },\n options\n );\n};\n\nexport const getGetSchemaQueryKey = (\n datasetId: string,\n datasetVersion: number\n) => [`/dataset/${datasetId}/schema/${datasetVersion}`];\n\nexport type GetSchemaQueryResult = NonNullable<\n Awaited<ReturnType<typeof getSchema>>\n>;\nexport type GetSchemaQueryError = ErrorType<void | DmError>;\n\nexport const useGetSchema = <\n TData = Awaited<ReturnType<typeof getSchema>>,\n TError = ErrorType<void | DmError>\n>(\n datasetId: string,\n datasetVersion: number,\n options?: {\n query?: UseQueryOptions<\n Awaited<ReturnType<typeof getSchema>>,\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 =\n queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetId, datasetVersion);\n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSchema>>> = ({\n signal,\n }) => getSchema(datasetId, datasetVersion, requestOptions, signal);\n\n const query = useQuery<Awaited<ReturnType<typeof getSchema>>, TError, TData>(\n queryKey,\n queryFn,\n { enabled: !!(datasetId && datasetVersion), ...queryOptions }\n ) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryKey;\n\n return query;\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { X as DatasetPutBodyBody, bj as customInstance, b8 as DatasetPutPostResponse, bk as ErrorType, bf as DmError, _ as DatasetPostBodyBody, i as GetDatasetsParams, b1 as DatasetsGetResponse, h as GetVersionsParams, az as DatasetDetail, g as DeleteDatasetParams, a9 as TaskIdentity, b7 as DatasetDigestGetResponse, b5 as DatasetSchemaGetResponse } from '../custom-instance-cf29ab06.js';
1
+ import { a4 as DatasetPutBodyBody, bz as customInstance, bo as DatasetPutPostResponse, bA as ErrorType, bv as DmError, a7 as DatasetPostBodyBody, m as GetDatasetsParams, bh as DatasetsGetResponse, l as GetVersionsParams, aL as DatasetDetail, k as DeleteDatasetParams, ai as TaskIdentity, bn as DatasetDigestGetResponse, bl as DatasetSchemaGetResponse } from '../custom-instance-b2f7dca1.js';
2
2
  import * as react_query from 'react-query';
3
3
  import { UseMutationOptions, UseQueryOptions, QueryKey, UseQueryResult } from 'react-query';
4
4
  import 'axios';
@@ -174,7 +174,7 @@ declare const useAddEditorToDataset: <TError = ErrorType<DmError>, TContext = un
174
174
  userId: string;
175
175
  }, TContext>;
176
176
  /**
177
- * Returns a dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-charcater hexstring.
177
+ * Returns a dataset ID and version of a dataset that matches the provided SHA256 digest, a 64-character hex string.
178
178
 
179
179
  * @summary Gets the first Dataset that matches the provided digest
180
180
  */
@@ -1,7 +1,6 @@
1
1
  import {
2
- __spreadValues,
3
2
  customInstance
4
- } from "../chunk-3TENYKS7.js";
3
+ } from "../chunk-3O5KIRV4.js";
5
4
 
6
5
  // src/dataset/dataset.ts
7
6
  import { useQuery, useMutation } from "react-query";
@@ -9,10 +8,16 @@ var createDatasetFromFile = (datasetPutBodyBody, options) => {
9
8
  const formData = new FormData();
10
9
  formData.append("dataset_type", datasetPutBodyBody.dataset_type);
11
10
  if (datasetPutBodyBody.format_extra_variables !== void 0) {
12
- formData.append("format_extra_variables", datasetPutBodyBody.format_extra_variables);
11
+ formData.append(
12
+ "format_extra_variables",
13
+ datasetPutBodyBody.format_extra_variables
14
+ );
13
15
  }
14
16
  if (datasetPutBodyBody.skip_molecule_load !== void 0) {
15
- formData.append("skip_molecule_load", datasetPutBodyBody.skip_molecule_load.toString());
17
+ formData.append(
18
+ "skip_molecule_load",
19
+ datasetPutBodyBody.skip_molecule_load.toString()
20
+ );
16
21
  }
17
22
  formData.append("project_id", datasetPutBodyBody.project_id);
18
23
  formData.append("path", datasetPutBodyBody.path);
@@ -23,12 +28,15 @@ var createDatasetFromFile = (datasetPutBodyBody, options) => {
23
28
  if (datasetPutBodyBody.unit_id !== void 0) {
24
29
  formData.append("unit_id", datasetPutBodyBody.unit_id);
25
30
  }
26
- return customInstance({
27
- url: `/dataset`,
28
- method: "put",
29
- headers: { "Content-Type": "multipart/form-data" },
30
- data: formData
31
- }, options);
31
+ return customInstance(
32
+ {
33
+ url: `/dataset`,
34
+ method: "put",
35
+ headers: { "Content-Type": "multipart/form-data" },
36
+ data: formData
37
+ },
38
+ options
39
+ );
32
40
  };
33
41
  var useCreateDatasetFromFile = (options) => {
34
42
  const { mutation: mutationOptions, request: requestOptions } = options ?? {};
@@ -43,10 +51,16 @@ var uploadDataset = (datasetPostBodyBody, options) => {
43
51
  formData.append("dataset_file", datasetPostBodyBody.dataset_file);
44
52
  formData.append("dataset_type", datasetPostBodyBody.dataset_type);
45
53
  if (datasetPostBodyBody.format_extra_variables !== void 0) {
46
- formData.append("format_extra_variables", datasetPostBodyBody.format_extra_variables);
54
+ formData.append(
55
+ "format_extra_variables",
56
+ datasetPostBodyBody.format_extra_variables
57
+ );
47
58
  }
48
59
  if (datasetPostBodyBody.skip_molecule_load !== void 0) {
49
- formData.append("skip_molecule_load", datasetPostBodyBody.skip_molecule_load.toString());
60
+ formData.append(
61
+ "skip_molecule_load",
62
+ datasetPostBodyBody.skip_molecule_load.toString()
63
+ );
50
64
  }
51
65
  if (datasetPostBodyBody.as_filename !== void 0) {
52
66
  formData.append("as_filename", datasetPostBodyBody.as_filename);
@@ -55,12 +69,15 @@ var uploadDataset = (datasetPostBodyBody, options) => {
55
69
  formData.append("dataset_id", datasetPostBodyBody.dataset_id);
56
70
  }
57
71
  formData.append("unit_id", datasetPostBodyBody.unit_id);
58
- return customInstance({
59
- url: `/dataset`,
60
- method: "post",
61
- headers: { "Content-Type": "multipart/form-data" },
62
- data: formData
63
- }, options);
72
+ return customInstance(
73
+ {
74
+ url: `/dataset`,
75
+ method: "post",
76
+ headers: { "Content-Type": "multipart/form-data" },
77
+ data: formData
78
+ },
79
+ options
80
+ );
64
81
  };
65
82
  var useUploadDataset = (options) => {
66
83
  const { mutation: mutationOptions, request: requestOptions } = options ?? {};
@@ -71,7 +88,10 @@ var useUploadDataset = (options) => {
71
88
  return useMutation(mutationFn, mutationOptions);
72
89
  };
73
90
  var getDatasets = (params, options, signal) => {
74
- return customInstance({ url: `/dataset`, method: "get", params, signal }, options);
91
+ return customInstance(
92
+ { url: `/dataset`, method: "get", params, signal },
93
+ options
94
+ );
75
95
  };
76
96
  var getGetDatasetsQueryKey = (params) => [
77
97
  `/dataset`,
@@ -88,7 +108,10 @@ var useGetDatasets = (params, options) => {
88
108
  return query;
89
109
  };
90
110
  var getVersions = (datasetId, params, options, signal) => {
91
- return customInstance({ url: `/dataset/${datasetId}/versions`, method: "get", params, signal }, options);
111
+ return customInstance(
112
+ { url: `/dataset/${datasetId}/versions`, method: "get", params, signal },
113
+ options
114
+ );
92
115
  };
93
116
  var getGetVersionsQueryKey = (datasetId, params) => [`/dataset/${datasetId}/versions`, ...params ? [params] : []];
94
117
  var useGetVersions = (datasetId, params, options) => {
@@ -97,18 +120,22 @@ var useGetVersions = (datasetId, params, options) => {
97
120
  const queryFn = ({
98
121
  signal
99
122
  }) => getVersions(datasetId, params, requestOptions, signal);
100
- const query = useQuery(queryKey, queryFn, __spreadValues({
101
- enabled: !!datasetId
102
- }, queryOptions));
123
+ const query = useQuery(queryKey, queryFn, {
124
+ enabled: !!datasetId,
125
+ ...queryOptions
126
+ });
103
127
  query.queryKey = queryKey;
104
128
  return query;
105
129
  };
106
130
  var deleteDataset = (datasetId, datasetVersion, params, options) => {
107
- return customInstance({
108
- url: `/dataset/${datasetId}/${datasetVersion}`,
109
- method: "delete",
110
- params
111
- }, options);
131
+ return customInstance(
132
+ {
133
+ url: `/dataset/${datasetId}/${datasetVersion}`,
134
+ method: "delete",
135
+ params
136
+ },
137
+ options
138
+ );
112
139
  };
113
140
  var useDeleteDataset = (options) => {
114
141
  const { mutation: mutationOptions, request: requestOptions } = options ?? {};
@@ -119,7 +146,10 @@ var useDeleteDataset = (options) => {
119
146
  return useMutation(mutationFn, mutationOptions);
120
147
  };
121
148
  var downloadDataset = (datasetId, datasetVersion, options, signal) => {
122
- return customInstance({ url: `/dataset/${datasetId}/${datasetVersion}`, method: "get", signal }, options);
149
+ return customInstance(
150
+ { url: `/dataset/${datasetId}/${datasetVersion}`, method: "get", signal },
151
+ options
152
+ );
123
153
  };
124
154
  var getDownloadDatasetQueryKey = (datasetId, datasetVersion) => [`/dataset/${datasetId}/${datasetVersion}`];
125
155
  var useDownloadDataset = (datasetId, datasetVersion, options) => {
@@ -128,14 +158,18 @@ var useDownloadDataset = (datasetId, datasetVersion, options) => {
128
158
  const queryFn = ({
129
159
  signal
130
160
  }) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);
131
- const query = useQuery(queryKey, queryFn, __spreadValues({
132
- enabled: !!(datasetId && datasetVersion)
133
- }, queryOptions));
161
+ const query = useQuery(queryKey, queryFn, {
162
+ enabled: !!(datasetId && datasetVersion),
163
+ ...queryOptions
164
+ });
134
165
  query.queryKey = queryKey;
135
166
  return query;
136
167
  };
137
168
  var removeEditorFromDataset = (datasetId, userId, options) => {
138
- return customInstance({ url: `/dataset/${datasetId}/editor/${userId}`, method: "delete" }, options);
169
+ return customInstance(
170
+ { url: `/dataset/${datasetId}/editor/${userId}`, method: "delete" },
171
+ options
172
+ );
139
173
  };
140
174
  var useRemoveEditorFromDataset = (options) => {
141
175
  const { mutation: mutationOptions, request: requestOptions } = options ?? {};
@@ -146,7 +180,10 @@ var useRemoveEditorFromDataset = (options) => {
146
180
  return useMutation(mutationFn, mutationOptions);
147
181
  };
148
182
  var addEditorToDataset = (datasetId, userId, options) => {
149
- return customInstance({ url: `/dataset/${datasetId}/editor/${userId}`, method: "put" }, options);
183
+ return customInstance(
184
+ { url: `/dataset/${datasetId}/editor/${userId}`, method: "put" },
185
+ options
186
+ );
150
187
  };
151
188
  var useAddEditorToDataset = (options) => {
152
189
  const { mutation: mutationOptions, request: requestOptions } = options ?? {};
@@ -157,7 +194,10 @@ var useAddEditorToDataset = (options) => {
157
194
  return useMutation(mutationFn, mutationOptions);
158
195
  };
159
196
  var getDatasetDigest = (datasetDigest, options, signal) => {
160
- return customInstance({ url: `/dataset/digest/${datasetDigest}`, method: "get", signal }, options);
197
+ return customInstance(
198
+ { url: `/dataset/digest/${datasetDigest}`, method: "get", signal },
199
+ options
200
+ );
161
201
  };
162
202
  var getGetDatasetDigestQueryKey = (datasetDigest) => [
163
203
  `/dataset/digest/${datasetDigest}`
@@ -166,18 +206,22 @@ var useGetDatasetDigest = (datasetDigest, options) => {
166
206
  const { query: queryOptions, request: requestOptions } = options ?? {};
167
207
  const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetDatasetDigestQueryKey(datasetDigest);
168
208
  const queryFn = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);
169
- const query = useQuery(queryKey, queryFn, __spreadValues({
170
- enabled: !!datasetDigest
171
- }, queryOptions));
209
+ const query = useQuery(queryKey, queryFn, {
210
+ enabled: !!datasetDigest,
211
+ ...queryOptions
212
+ });
172
213
  query.queryKey = queryKey;
173
214
  return query;
174
215
  };
175
216
  var getSchema = (datasetId, datasetVersion, options, signal) => {
176
- return customInstance({
177
- url: `/dataset/${datasetId}/schema/${datasetVersion}`,
178
- method: "get",
179
- signal
180
- }, options);
217
+ return customInstance(
218
+ {
219
+ url: `/dataset/${datasetId}/schema/${datasetVersion}`,
220
+ method: "get",
221
+ signal
222
+ },
223
+ options
224
+ );
181
225
  };
182
226
  var getGetSchemaQueryKey = (datasetId, datasetVersion) => [`/dataset/${datasetId}/schema/${datasetVersion}`];
183
227
  var useGetSchema = (datasetId, datasetVersion, options) => {
@@ -186,7 +230,11 @@ var useGetSchema = (datasetId, datasetVersion, options) => {
186
230
  const queryFn = ({
187
231
  signal
188
232
  }) => getSchema(datasetId, datasetVersion, requestOptions, signal);
189
- const query = useQuery(queryKey, queryFn, __spreadValues({ enabled: !!(datasetId && datasetVersion) }, queryOptions));
233
+ const query = useQuery(
234
+ queryKey,
235
+ queryFn,
236
+ { enabled: !!(datasetId && datasetVersion), ...queryOptions }
237
+ );
190
238
  query.queryKey = queryKey;
191
239
  return query;
192
240
  };