@squonk/data-manager-client 1.2.3-rc.2 → 1.2.4-rc.1

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 (112) hide show
  1. package/accounting/accounting.cjs +31 -13
  2. package/accounting/accounting.cjs.map +1 -1
  3. package/accounting/accounting.d.cts +77 -0
  4. package/accounting/accounting.d.ts +10 -1
  5. package/accounting/accounting.js +29 -11
  6. package/accounting/accounting.js.map +1 -1
  7. package/admin/admin.cjs +67 -27
  8. package/admin/admin.cjs.map +1 -1
  9. package/admin/admin.d.cts +324 -0
  10. package/admin/admin.d.ts +55 -22
  11. package/admin/admin.js +57 -17
  12. package/admin/admin.js.map +1 -1
  13. package/application/application.cjs +23 -13
  14. package/application/application.cjs.map +1 -1
  15. package/application/application.d.cts +57 -0
  16. package/application/application.d.ts +7 -1
  17. package/application/application.js +22 -12
  18. package/application/application.js.map +1 -1
  19. package/{chunk-UZTHSGDT.cjs → chunk-J22A7LHX.cjs} +1 -1
  20. package/chunk-J22A7LHX.cjs.map +1 -0
  21. package/{chunk-3RNIDX7T.js → chunk-UKA7G3OB.js} +1 -1
  22. package/{chunk-3RNIDX7T.js.map → chunk-UKA7G3OB.js.map} +1 -1
  23. package/configuration/configuration.cjs +13 -7
  24. package/configuration/configuration.cjs.map +1 -1
  25. package/configuration/configuration.d.cts +29 -0
  26. package/configuration/configuration.d.ts +4 -1
  27. package/configuration/configuration.js +13 -7
  28. package/configuration/configuration.js.map +1 -1
  29. package/{custom-instance-50c9dd5d.d.ts → custom-instance-a2110e78.d.ts} +825 -825
  30. package/dataset/dataset.cjs +71 -72
  31. package/dataset/dataset.cjs.map +1 -1
  32. package/dataset/dataset.d.cts +315 -0
  33. package/dataset/dataset.d.ts +46 -16
  34. package/dataset/dataset.js +62 -63
  35. package/dataset/dataset.js.map +1 -1
  36. package/exchange-rate/exchange-rate.cjs +43 -32
  37. package/exchange-rate/exchange-rate.cjs.map +1 -1
  38. package/exchange-rate/exchange-rate.d.cts +180 -0
  39. package/exchange-rate/exchange-rate.d.ts +25 -7
  40. package/exchange-rate/exchange-rate.js +38 -27
  41. package/exchange-rate/exchange-rate.js.map +1 -1
  42. package/file/file.cjs +38 -22
  43. package/file/file.cjs.map +1 -1
  44. package/file/file.d.cts +154 -0
  45. package/file/file.d.ts +25 -10
  46. package/file/file.js +34 -18
  47. package/file/file.js.map +1 -1
  48. package/index.cjs +10 -10
  49. package/index.cjs.map +1 -1
  50. package/index.d.cts +2 -0
  51. package/index.d.ts +1 -1
  52. package/index.js +9 -9
  53. package/index.js.map +1 -1
  54. package/instance/instance.cjs +47 -37
  55. package/instance/instance.cjs.map +1 -1
  56. package/instance/instance.d.cts +215 -0
  57. package/instance/instance.d.ts +33 -12
  58. package/instance/instance.js +41 -31
  59. package/instance/instance.js.map +1 -1
  60. package/job/job.cjs +36 -19
  61. package/job/job.cjs.map +1 -1
  62. package/job/job.d.cts +85 -0
  63. package/job/job.d.ts +10 -1
  64. package/job/job.js +34 -17
  65. package/job/job.js.map +1 -1
  66. package/metadata/metadata.cjs +23 -26
  67. package/metadata/metadata.cjs.map +1 -1
  68. package/metadata/metadata.d.cts +132 -0
  69. package/metadata/metadata.d.ts +19 -7
  70. package/metadata/metadata.js +20 -23
  71. package/metadata/metadata.js.map +1 -1
  72. package/package.json +12 -12
  73. package/project/project.cjs +70 -48
  74. package/project/project.cjs.map +1 -1
  75. package/project/project.d.cts +377 -0
  76. package/project/project.d.ts +61 -25
  77. package/project/project.js +59 -37
  78. package/project/project.js.map +1 -1
  79. package/src/accounting/accounting.ts +179 -194
  80. package/src/admin/admin.ts +590 -735
  81. package/src/application/application.ts +125 -141
  82. package/src/configuration/configuration.ts +72 -60
  83. package/src/data-manager-api.schemas.ts +940 -941
  84. package/src/dataset/dataset.ts +591 -770
  85. package/src/exchange-rate/exchange-rate.ts +362 -478
  86. package/src/file/file.ts +292 -357
  87. package/src/instance/instance.ts +427 -533
  88. package/src/job/job.ts +187 -198
  89. package/src/metadata/metadata.ts +247 -339
  90. package/src/project/project.ts +669 -860
  91. package/src/task/task.ts +181 -202
  92. package/src/type/type.ts +72 -68
  93. package/src/user/user.ts +248 -286
  94. package/task/task.cjs +31 -15
  95. package/task/task.cjs.map +1 -1
  96. package/task/task.d.cts +103 -0
  97. package/task/task.d.ts +10 -1
  98. package/task/task.js +29 -13
  99. package/task/task.js.map +1 -1
  100. package/type/type.cjs +13 -7
  101. package/type/type.cjs.map +1 -1
  102. package/type/type.d.cts +31 -0
  103. package/type/type.d.ts +4 -1
  104. package/type/type.js +13 -7
  105. package/type/type.js.map +1 -1
  106. package/user/user.cjs +39 -28
  107. package/user/user.cjs.map +1 -1
  108. package/user/user.d.cts +104 -0
  109. package/user/user.d.ts +16 -4
  110. package/user/user.js +36 -25
  111. package/user/user.js.map +1 -1
  112. package/chunk-UZTHSGDT.cjs.map +0 -1
@@ -1,23 +1,20 @@
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
- var _chunkUZTHSGDTcjs = require('../chunk-UZTHSGDT.cjs');
3
+ var _chunkJ22A7LHXcjs = require('../chunk-J22A7LHX.cjs');
4
4
 
5
5
  // src/dataset/dataset.ts
6
+
7
+
8
+
6
9
  var _reactquery = require('@tanstack/react-query');
7
10
  var createDatasetFromFile = (datasetPutBodyBody, options) => {
8
11
  const formData = new FormData();
9
12
  formData.append("dataset_type", datasetPutBodyBody.dataset_type);
10
13
  if (datasetPutBodyBody.format_extra_variables !== void 0) {
11
- formData.append(
12
- "format_extra_variables",
13
- datasetPutBodyBody.format_extra_variables
14
- );
14
+ formData.append("format_extra_variables", datasetPutBodyBody.format_extra_variables);
15
15
  }
16
16
  if (datasetPutBodyBody.skip_molecule_load !== void 0) {
17
- formData.append(
18
- "skip_molecule_load",
19
- datasetPutBodyBody.skip_molecule_load.toString()
20
- );
17
+ formData.append("skip_molecule_load", datasetPutBodyBody.skip_molecule_load.toString());
21
18
  }
22
19
  formData.append("project_id", datasetPutBodyBody.project_id);
23
20
  formData.append("path", datasetPutBodyBody.path);
@@ -28,7 +25,7 @@ var createDatasetFromFile = (datasetPutBodyBody, options) => {
28
25
  if (datasetPutBodyBody.unit_id !== void 0) {
29
26
  formData.append("unit_id", datasetPutBodyBody.unit_id);
30
27
  }
31
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
28
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
32
29
  {
33
30
  url: `/dataset`,
34
31
  method: "put",
@@ -55,16 +52,10 @@ var uploadDataset = (datasetPostBodyBody, options) => {
55
52
  formData.append("dataset_file", datasetPostBodyBody.dataset_file);
56
53
  formData.append("dataset_type", datasetPostBodyBody.dataset_type);
57
54
  if (datasetPostBodyBody.format_extra_variables !== void 0) {
58
- formData.append(
59
- "format_extra_variables",
60
- datasetPostBodyBody.format_extra_variables
61
- );
55
+ formData.append("format_extra_variables", datasetPostBodyBody.format_extra_variables);
62
56
  }
63
57
  if (datasetPostBodyBody.skip_molecule_load !== void 0) {
64
- formData.append(
65
- "skip_molecule_load",
66
- datasetPostBodyBody.skip_molecule_load.toString()
67
- );
58
+ formData.append("skip_molecule_load", datasetPostBodyBody.skip_molecule_load.toString());
68
59
  }
69
60
  if (datasetPostBodyBody.as_filename !== void 0) {
70
61
  formData.append("as_filename", datasetPostBodyBody.as_filename);
@@ -73,7 +64,7 @@ var uploadDataset = (datasetPostBodyBody, options) => {
73
64
  formData.append("dataset_id", datasetPostBodyBody.dataset_id);
74
65
  }
75
66
  formData.append("unit_id", datasetPostBodyBody.unit_id);
76
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
67
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
77
68
  {
78
69
  url: `/dataset`,
79
70
  method: "post",
@@ -96,18 +87,23 @@ var useUploadDataset = (options) => {
96
87
  return _reactquery.useMutation.call(void 0, mutationOptions);
97
88
  };
98
89
  var getDatasets = (params, options, signal) => {
99
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
100
- { url: `/dataset`, method: "get", params, signal },
90
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
91
+ {
92
+ url: `/dataset`,
93
+ method: "get",
94
+ params,
95
+ signal
96
+ },
101
97
  options
102
98
  );
103
99
  };
104
- var getGetDatasetsQueryKey = (params) => ["data-manager-api", `/dataset`, ...params ? [params] : []];
100
+ var getGetDatasetsQueryKey = (params) => {
101
+ return ["data-manager-api", `/dataset`, ...params ? [params] : []];
102
+ };
105
103
  var getGetDatasetsQueryOptions = (params, options) => {
106
104
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
107
105
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetDatasetsQueryKey(params)));
108
- const queryFn = ({
109
- signal
110
- }) => getDatasets(params, requestOptions, signal);
106
+ const queryFn = ({ signal }) => getDatasets(params, requestOptions, signal);
111
107
  return { queryKey, queryFn, ...queryOptions };
112
108
  };
113
109
  var useGetDatasets = (params, options) => {
@@ -117,18 +113,23 @@ var useGetDatasets = (params, options) => {
117
113
  return query;
118
114
  };
119
115
  var getVersions = (datasetId, params, options, signal) => {
120
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
121
- { url: `/dataset/${datasetId}/versions`, method: "get", params, signal },
116
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
117
+ {
118
+ url: `/dataset/${datasetId}/versions`,
119
+ method: "get",
120
+ params,
121
+ signal
122
+ },
122
123
  options
123
124
  );
124
125
  };
125
- var getGetVersionsQueryKey = (datasetId, params) => ["data-manager-api", `/dataset/${datasetId}/versions`, ...params ? [params] : []];
126
+ var getGetVersionsQueryKey = (datasetId, params) => {
127
+ return ["data-manager-api", `/dataset/${datasetId}/versions`, ...params ? [params] : []];
128
+ };
126
129
  var getGetVersionsQueryOptions = (datasetId, params, options) => {
127
130
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
128
131
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetVersionsQueryKey(datasetId, params)));
129
- const queryFn = ({
130
- signal
131
- }) => getVersions(datasetId, params, requestOptions, signal);
132
+ const queryFn = ({ signal }) => getVersions(datasetId, params, requestOptions, signal);
132
133
  return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };
133
134
  };
134
135
  var useGetVersions = (datasetId, params, options) => {
@@ -138,7 +139,7 @@ var useGetVersions = (datasetId, params, options) => {
138
139
  return query;
139
140
  };
140
141
  var deleteDataset = (datasetId, datasetVersion, params, options) => {
141
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
142
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
142
143
  {
143
144
  url: `/dataset/${datasetId}/${datasetVersion}`,
144
145
  method: "delete",
@@ -160,38 +161,36 @@ var useDeleteDataset = (options) => {
160
161
  return _reactquery.useMutation.call(void 0, mutationOptions);
161
162
  };
162
163
  var downloadDataset = (datasetId, datasetVersion, options, signal) => {
163
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
164
- { url: `/dataset/${datasetId}/${datasetVersion}`, method: "get", signal },
164
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
165
+ {
166
+ url: `/dataset/${datasetId}/${datasetVersion}`,
167
+ method: "get",
168
+ signal
169
+ },
165
170
  options
166
171
  );
167
172
  };
168
- var getDownloadDatasetQueryKey = (datasetId, datasetVersion) => ["data-manager-api", `/dataset/${datasetId}/${datasetVersion}`];
173
+ var getDownloadDatasetQueryKey = (datasetId, datasetVersion) => {
174
+ return ["data-manager-api", `/dataset/${datasetId}/${datasetVersion}`];
175
+ };
169
176
  var getDownloadDatasetQueryOptions = (datasetId, datasetVersion, options) => {
170
177
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
171
178
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getDownloadDatasetQueryKey(datasetId, datasetVersion)));
172
- const queryFn = ({
173
- signal
174
- }) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);
175
- return {
176
- queryKey,
177
- queryFn,
178
- enabled: !!(datasetId && datasetVersion),
179
- ...queryOptions
180
- };
179
+ const queryFn = ({ signal }) => downloadDataset(datasetId, datasetVersion, requestOptions, signal);
180
+ return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions };
181
181
  };
182
182
  var useDownloadDataset = (datasetId, datasetVersion, options) => {
183
- const queryOptions = getDownloadDatasetQueryOptions(
184
- datasetId,
185
- datasetVersion,
186
- options
187
- );
183
+ const queryOptions = getDownloadDatasetQueryOptions(datasetId, datasetVersion, options);
188
184
  const query = _reactquery.useQuery.call(void 0, queryOptions);
189
185
  query.queryKey = queryOptions.queryKey;
190
186
  return query;
191
187
  };
192
188
  var removeEditorFromDataset = (datasetId, userId, options) => {
193
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
194
- { url: `/dataset/${datasetId}/editor/${userId}`, method: "delete" },
189
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
190
+ {
191
+ url: `/dataset/${datasetId}/editor/${userId}`,
192
+ method: "delete"
193
+ },
195
194
  options
196
195
  );
197
196
  };
@@ -208,8 +207,11 @@ var useRemoveEditorFromDataset = (options) => {
208
207
  return _reactquery.useMutation.call(void 0, mutationOptions);
209
208
  };
210
209
  var addEditorToDataset = (datasetId, userId, options) => {
211
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
212
- { url: `/dataset/${datasetId}/editor/${userId}`, method: "put" },
210
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
211
+ {
212
+ url: `/dataset/${datasetId}/editor/${userId}`,
213
+ method: "put"
214
+ },
213
215
  options
214
216
  );
215
217
  };
@@ -226,12 +228,18 @@ var useAddEditorToDataset = (options) => {
226
228
  return _reactquery.useMutation.call(void 0, mutationOptions);
227
229
  };
228
230
  var getDatasetDigest = (datasetDigest, options, signal) => {
229
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
230
- { url: `/dataset/digest/${datasetDigest}`, method: "get", signal },
231
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
232
+ {
233
+ url: `/dataset/digest/${datasetDigest}`,
234
+ method: "get",
235
+ signal
236
+ },
231
237
  options
232
238
  );
233
239
  };
234
- var getGetDatasetDigestQueryKey = (datasetDigest) => ["data-manager-api", `/dataset/digest/${datasetDigest}`];
240
+ var getGetDatasetDigestQueryKey = (datasetDigest) => {
241
+ return ["data-manager-api", `/dataset/digest/${datasetDigest}`];
242
+ };
235
243
  var getGetDatasetDigestQueryOptions = (datasetDigest, options) => {
236
244
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
237
245
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetDatasetDigestQueryKey(datasetDigest)));
@@ -245,7 +253,7 @@ var useGetDatasetDigest = (datasetDigest, options) => {
245
253
  return query;
246
254
  };
247
255
  var getSchema = (datasetId, datasetVersion, options, signal) => {
248
- return _chunkUZTHSGDTcjs.customInstance.call(void 0,
256
+ return _chunkJ22A7LHXcjs.customInstance.call(void 0,
249
257
  {
250
258
  url: `/dataset/${datasetId}/schema/${datasetVersion}`,
251
259
  method: "get",
@@ -254,26 +262,17 @@ var getSchema = (datasetId, datasetVersion, options, signal) => {
254
262
  options
255
263
  );
256
264
  };
257
- var getGetSchemaQueryKey = (datasetId, datasetVersion) => ["data-manager-api", `/dataset/${datasetId}/schema/${datasetVersion}`];
265
+ var getGetSchemaQueryKey = (datasetId, datasetVersion) => {
266
+ return ["data-manager-api", `/dataset/${datasetId}/schema/${datasetVersion}`];
267
+ };
258
268
  var getGetSchemaQueryOptions = (datasetId, datasetVersion, options) => {
259
269
  const { query: queryOptions, request: requestOptions } = _nullishCoalesce(options, () => ( {}));
260
270
  const queryKey = _nullishCoalesce((queryOptions == null ? void 0 : queryOptions.queryKey), () => ( getGetSchemaQueryKey(datasetId, datasetVersion)));
261
- const queryFn = ({
262
- signal
263
- }) => getSchema(datasetId, datasetVersion, requestOptions, signal);
264
- return {
265
- queryKey,
266
- queryFn,
267
- enabled: !!(datasetId && datasetVersion),
268
- ...queryOptions
269
- };
271
+ const queryFn = ({ signal }) => getSchema(datasetId, datasetVersion, requestOptions, signal);
272
+ return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions };
270
273
  };
271
274
  var useGetSchema = (datasetId, datasetVersion, options) => {
272
- const queryOptions = getGetSchemaQueryOptions(
273
- datasetId,
274
- datasetVersion,
275
- options
276
- );
275
+ const queryOptions = getGetSchemaQueryOptions(datasetId, datasetVersion, options);
277
276
  const query = _reactquery.useQuery.call(void 0, queryOptions);
278
277
  query.queryKey = queryOptions.queryKey;
279
278
  return query;
@@ -1 +1 @@
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,KA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B,gBAAgB;AAEnE,IAAM,2BAA2B,CAItC,WACA,gBACA,YAUG;AACH,QAAM,EAAE,OAAO,cAAc,SAAS,eAAe,IAAI,WAAW,CAAC;AAErE,QAAM,YACJ,6CAAc,aAAY,qBAAqB,WAAW,cAAc;AAE1E,QAAM,UAAgE,CAAC;AAAA,IACrE;AAAA,EACF,MAAM,UAAU,WAAW,gBAAgB,gBAAgB,MAAM;AAEjE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,SAAS,CAAC,EAAE,aAAa;AAAA,IACzB,GAAG;AAAA,EACL;AACF;AAOO,IAAM,eAAe,CAI1B,WACA,gBACA,YAQ2D;AAC3D,QAAM,eAAe;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,QAAQ,SAAS,YAAY;AAInC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.15.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: 1.2\n */\nimport { useQuery, useMutation } from \"@tanstack/react-query\";\nimport type {\n UseQueryOptions,\n UseMutationOptions,\n QueryFunction,\n MutationFunction,\n UseQueryResult,\n QueryKey,\n} from \"@tanstack/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 const getCreateDatasetFromFileMutationOptions = <\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}): UseMutationOptions<\n Awaited<ReturnType<typeof createDatasetFromFile>>,\n TError,\n { data: DatasetPutBodyBody },\n TContext\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 { mutationFn, ...mutationOptions };\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 mutationOptions = getCreateDatasetFromFileMutationOptions(options);\n\n return useMutation(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 const getUploadDatasetMutationOptions = <\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}): UseMutationOptions<\n Awaited<ReturnType<typeof uploadDataset>>,\n TError,\n { data: DatasetPostBodyBody },\n TContext\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 { mutationFn, ...mutationOptions };\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 mutationOptions = getUploadDatasetMutationOptions(options);\n\n return useMutation(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 the `owner username`, `mime_type`, a list of `owners`, a list of `editors`, `Labels` or `Label/Value` pairs.\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 [\"data-manager-api\", `/dataset`, ...(params ? [params] : [])] as const;\n\nexport const getGetDatasetsQueryOptions = <\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): UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, ...queryOptions };\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 queryOptions = getGetDatasetsQueryOptions(params, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.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) => [\"data-manager-api\", `/dataset/${datasetId}/versions`, ...(params ? [params] : [])] as const;\n\nexport const getGetVersionsQueryOptions = <\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): UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return { queryKey, queryFn, enabled: !!datasetId, ...queryOptions };\n};\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 queryOptions = getGetVersionsQueryOptions(datasetId, params, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.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 const getDeleteDatasetMutationOptions = <\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}): UseMutationOptions<\n Awaited<ReturnType<typeof deleteDataset>>,\n TError,\n { datasetId: string; datasetVersion: number; params?: DeleteDatasetParams },\n TContext\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 { mutationFn, ...mutationOptions };\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 mutationOptions = getDeleteDatasetMutationOptions(options);\n\n return useMutation(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) => [\"data-manager-api\", `/dataset/${datasetId}/${datasetVersion}`] as const;\n\nexport const getDownloadDatasetQueryOptions = <\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): UseQueryOptions<\n Awaited<ReturnType<typeof downloadDataset>>,\n TError,\n TData\n> & { 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 return {\n queryKey,\n queryFn,\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n };\n};\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 queryOptions = getDownloadDatasetQueryOptions(\n datasetId,\n datasetVersion,\n options\n );\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.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 const getRemoveEditorFromDatasetMutationOptions = <\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}): UseMutationOptions<\n Awaited<ReturnType<typeof removeEditorFromDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\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 { mutationFn, ...mutationOptions };\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 mutationOptions = getRemoveEditorFromDatasetMutationOptions(options);\n\n return useMutation(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 const getAddEditorToDatasetMutationOptions = <\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}): UseMutationOptions<\n Awaited<ReturnType<typeof addEditorToDataset>>,\n TError,\n { datasetId: string; userId: string },\n TContext\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 { mutationFn, ...mutationOptions };\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 mutationOptions = getAddEditorToDatasetMutationOptions(options);\n\n return useMutation(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 [\"data-manager-api\", `/dataset/digest/${datasetDigest}`] as const;\n\nexport const getGetDatasetDigestQueryOptions = <\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): UseQueryOptions<\n Awaited<ReturnType<typeof getDatasetDigest>>,\n TError,\n TData\n> & { 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 return { queryKey, queryFn, enabled: !!datasetDigest, ...queryOptions };\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 queryOptions = getGetDatasetDigestQueryOptions(datasetDigest, options);\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.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) => [\"data-manager-api\", `/dataset/${datasetId}/schema/${datasetVersion}`] as const;\n\nexport const getGetSchemaQueryOptions = <\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): UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData> & {\n queryKey: QueryKey;\n} => {\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 return {\n queryKey,\n queryFn,\n enabled: !!(datasetId && datasetVersion),\n ...queryOptions,\n };\n};\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 queryOptions = getGetSchemaQueryOptions(\n datasetId,\n datasetVersion,\n options\n );\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {\n queryKey: QueryKey;\n };\n\n query.queryKey = queryOptions.queryKey;\n\n return query;\n};\n"]}
1
+ {"version":3,"sources":["../../src/dataset/dataset.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA6CA,IAAM,wBAAwB,CACjC,oBACH,YAAsD;AAEjD,QAAM,WAAW,IAAI,SAAS;AACpC,WAAS,OAAO,gBAAgB,mBAAmB,YAAY;AAC/D,MAAG,mBAAmB,2BAA2B,QAAW;AAC3D,aAAS,OAAO,0BAA0B,mBAAmB,sBAAsB;AAAA,EACnF;AACD,MAAG,mBAAmB,uBAAuB,QAAW;AACvD,aAAS,OAAO,sBAAsB,mBAAmB,mBAAmB,SAAS,CAAC;AAAA,EACtF;AACD,WAAS,OAAO,cAAc,mBAAmB,UAAU;AAC3D,WAAS,OAAO,QAAQ,mBAAmB,IAAI;AAC/C,WAAS,OAAO,aAAa,mBAAmB,SAAS;AACzD,MAAG,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C,EAAE,OAAO,MAAM,iBAAiB,eAAe,gBAAgB,MAAM;AAMpJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,eAAgB,GAAG,aAAY;AAC3E;AAQO,IAAM,sBAAsB,CAClC,eAAuB,YAEwC;AAE9D,QAAM,eAAe,gCAAgC,eAAc,OAAO;AAE1E,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AASO,IAAM,YAAY,CACrB,WACA,gBACH,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,YAAY,SAAS,WAAW,cAAc;AAAA,MAAI,QAAQ;AAAA,MAAO;AAAA,IACzE;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,uBAAuB,CAAC,WACjC,mBAA4B;AAE5B,SAAO,CAAC,oBAAoB,YAAY,SAAS,WAAW,cAAc,EAAE;AAC5E;AAGG,IAAM,2BAA2B,CAAoF,WACxH,gBAAwB,YACvB;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,qBAAqB,WAAU,cAAc;AAIvF,QAAM,UAAgE,CAAC,EAAE,OAAO,MAAM,UAAU,WAAU,gBAAgB,gBAAgB,MAAM;AAMjJ,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,EAAE,aAAa,iBAAiB,GAAG,aAAY;AACzF;AAQO,IAAM,eAAe,CAC3B,WACG,gBAAwB,YAEoC;AAE9D,QAAM,eAAe,yBAAyB,WAAU,gBAAe,OAAO;AAE9E,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT","sourcesContent":["/**\n * Generated by orval v6.20.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: 1.2\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n DatasetDetail,\n DatasetDigestGetResponse,\n DatasetPostBodyBody,\n DatasetPutBodyBody,\n DatasetPutPostResponse,\n DatasetSchemaGetResponse,\n DatasetsGetResponse,\n DeleteDatasetParams,\n DmError,\n GetDatasetsParams,\n GetVersionsParams,\n TaskIdentity\n} from '../data-manager-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\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();\nformData.append('dataset_type', datasetPutBodyBody.dataset_type)\nif(datasetPutBodyBody.format_extra_variables !== undefined) {\n formData.append('format_extra_variables', datasetPutBodyBody.format_extra_variables)\n }\nif(datasetPutBodyBody.skip_molecule_load !== undefined) {\n formData.append('skip_molecule_load', datasetPutBodyBody.skip_molecule_load.toString())\n }\nformData.append('project_id', datasetPutBodyBody.project_id)\nformData.append('path', datasetPutBodyBody.path)\nformData.append('file_name', datasetPutBodyBody.file_name)\nif(datasetPutBodyBody.dataset_id !== undefined) {\n formData.append('dataset_id', datasetPutBodyBody.dataset_id)\n }\nif(datasetPutBodyBody.unit_id !== undefined) {\n formData.append('unit_id', datasetPutBodyBody.unit_id)\n }\n\n return customInstance<DatasetPutPostResponse>(\n {url: `/dataset`, method: 'put',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getCreateDatasetFromFileMutationOptions = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDatasetFromFile>>, TError,{data: DatasetPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createDatasetFromFile>>, TError,{data: DatasetPutBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createDatasetFromFile>>, {data: DatasetPutBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return createDatasetFromFile(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateDatasetFromFileMutationResult = NonNullable<Awaited<ReturnType<typeof createDatasetFromFile>>>\n export type CreateDatasetFromFileMutationBody = DatasetPutBodyBody\n export type CreateDatasetFromFileMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Create a Dataset from a file in a Project\n */\nexport const useCreateDatasetFromFile = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createDatasetFromFile>>, TError,{data: DatasetPutBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateDatasetFromFileMutationOptions(options);\n\n return useMutation(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();\nformData.append('dataset_file', datasetPostBodyBody.dataset_file)\nformData.append('dataset_type', datasetPostBodyBody.dataset_type)\nif(datasetPostBodyBody.format_extra_variables !== undefined) {\n formData.append('format_extra_variables', datasetPostBodyBody.format_extra_variables)\n }\nif(datasetPostBodyBody.skip_molecule_load !== undefined) {\n formData.append('skip_molecule_load', datasetPostBodyBody.skip_molecule_load.toString())\n }\nif(datasetPostBodyBody.as_filename !== undefined) {\n formData.append('as_filename', datasetPostBodyBody.as_filename)\n }\nif(datasetPostBodyBody.dataset_id !== undefined) {\n formData.append('dataset_id', datasetPostBodyBody.dataset_id)\n }\nformData.append('unit_id', datasetPostBodyBody.unit_id)\n\n return customInstance<DatasetPutPostResponse>(\n {url: `/dataset`, method: 'post',\n headers: {'Content-Type': 'multipart/form-data', },\n data: formData\n },\n options);\n }\n \n\n\nexport const getUploadDatasetMutationOptions = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof uploadDataset>>, TError,{data: DatasetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof uploadDataset>>, TError,{data: DatasetPostBodyBody}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof uploadDataset>>, {data: DatasetPostBodyBody}> = (props) => {\n const {data} = props ?? {};\n\n return uploadDataset(data,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type UploadDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof uploadDataset>>>\n export type UploadDatasetMutationBody = DatasetPostBodyBody\n export type UploadDatasetMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Upload an external file as a Dataset\n */\nexport const useUploadDataset = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof uploadDataset>>, TError,{data: DatasetPostBodyBody}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getUploadDatasetMutationOptions(options);\n\n return useMutation(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 the `owner username`, `mime_type`, a list of `owners`, a list of `editors`, `Labels` or `Label/Value` pairs.\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetsGetResponse>(\n {url: `/dataset`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetDatasetsQueryKey = (params?: GetDatasetsParams,) => {\n \n return [\"data-manager-api\", `/dataset`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetDatasetsQueryOptions = <TData = Awaited<ReturnType<typeof getDatasets>>, TError = ErrorType<void | DmError>>(params?: GetDatasetsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetsQueryKey(params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasets>>> = ({ signal }) => getDatasets(params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDatasetsQueryResult = NonNullable<Awaited<ReturnType<typeof getDatasets>>>\nexport type GetDatasetsQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Get Datasets that are available to you\n */\nexport const useGetDatasets = <TData = Awaited<ReturnType<typeof getDatasets>>, TError = ErrorType<void | DmError>>(\n params?: GetDatasetsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getDatasets>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDatasetsQueryOptions(params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetDetail>(\n {url: `/dataset/${datasetId}/versions`, method: 'get',\n params, signal\n },\n options);\n }\n \n\nexport const getGetVersionsQueryKey = (datasetId: string,\n params?: GetVersionsParams,) => {\n \n return [\"data-manager-api\", `/dataset/${datasetId}/versions`, ...(params ? [params]: [])] as const;\n }\n\n \nexport const getGetVersionsQueryOptions = <TData = Awaited<ReturnType<typeof getVersions>>, TError = ErrorType<void | DmError>>(datasetId: string,\n params?: GetVersionsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetVersionsQueryKey(datasetId,params);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getVersions>>> = ({ signal }) => getVersions(datasetId,params, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetVersionsQueryResult = NonNullable<Awaited<ReturnType<typeof getVersions>>>\nexport type GetVersionsQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets all the Versions of a specific Dataset\n */\nexport const useGetVersions = <TData = Awaited<ReturnType<typeof getVersions>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n params?: GetVersionsParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getVersions>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetVersionsQueryOptions(datasetId,params,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\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 \n return customInstance<TaskIdentity>(\n {url: `/dataset/${datasetId}/${datasetVersion}`, method: 'delete',\n params\n },\n options);\n }\n \n\n\nexport const getDeleteDatasetMutationOptions = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDataset>>, TError,{datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteDataset>>, TError,{datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteDataset>>, {datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}> = (props) => {\n const {datasetId,datasetVersion,params} = props ?? {};\n\n return deleteDataset(datasetId,datasetVersion,params,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof deleteDataset>>>\n \n export type DeleteDatasetMutationError = ErrorType<void | DmError>\n\n /**\n * @summary Delete a Dataset\n */\nexport const useDeleteDataset = <TError = ErrorType<void | DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteDataset>>, TError,{datasetId: string;datasetVersion: number;params?: DeleteDatasetParams}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteDatasetMutationOptions(options);\n\n return useMutation(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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<void>(\n {url: `/dataset/${datasetId}/${datasetVersion}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getDownloadDatasetQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n \n return [\"data-manager-api\", `/dataset/${datasetId}/${datasetVersion}`] as const;\n }\n\n \nexport const getDownloadDatasetQueryOptions = <TData = Awaited<ReturnType<typeof downloadDataset>>, TError = ErrorType<DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getDownloadDatasetQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof downloadDataset>>> = ({ signal }) => downloadDataset(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type DownloadDatasetQueryResult = NonNullable<Awaited<ReturnType<typeof downloadDataset>>>\nexport type DownloadDatasetQueryError = ErrorType<DmError>\n\n/**\n * @summary Download a Dataset\n */\nexport const useDownloadDataset = <TData = Awaited<ReturnType<typeof downloadDataset>>, TError = ErrorType<DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof downloadDataset>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getDownloadDatasetQueryOptions(datasetId,datasetVersion,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\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 \n return customInstance<void>(\n {url: `/dataset/${datasetId}/editor/${userId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getRemoveEditorFromDatasetMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromDataset>>, TError,{datasetId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof removeEditorFromDataset>>, {datasetId: string;userId: string}> = (props) => {\n const {datasetId,userId} = props ?? {};\n\n return removeEditorFromDataset(datasetId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type RemoveEditorFromDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof removeEditorFromDataset>>>\n \n export type RemoveEditorFromDatasetMutationError = ErrorType<DmError>\n\n /**\n * @summary Remove a user's edit permission for a Dataset\n */\nexport const useRemoveEditorFromDataset = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof removeEditorFromDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getRemoveEditorFromDatasetMutationOptions(options);\n\n return useMutation(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 \n return customInstance<void>(\n {url: `/dataset/${datasetId}/editor/${userId}`, method: 'put'\n },\n options);\n }\n \n\n\nexport const getAddEditorToDatasetMutationOptions = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof addEditorToDataset>>, TError,{datasetId: string;userId: string}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof addEditorToDataset>>, {datasetId: string;userId: string}> = (props) => {\n const {datasetId,userId} = props ?? {};\n\n return addEditorToDataset(datasetId,userId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type AddEditorToDatasetMutationResult = NonNullable<Awaited<ReturnType<typeof addEditorToDataset>>>\n \n export type AddEditorToDatasetMutationError = ErrorType<DmError>\n\n /**\n * @summary Give a user edit permission for a Dataset\n */\nexport const useAddEditorToDataset = <TError = ErrorType<DmError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof addEditorToDataset>>, TError,{datasetId: string;userId: string}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getAddEditorToDatasetMutationOptions(options);\n\n return useMutation(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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetDigestGetResponse>(\n {url: `/dataset/digest/${datasetDigest}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetDatasetDigestQueryKey = (datasetDigest: string,) => {\n \n return [\"data-manager-api\", `/dataset/digest/${datasetDigest}`] as const;\n }\n\n \nexport const getGetDatasetDigestQueryOptions = <TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(datasetDigest: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetDatasetDigestQueryKey(datasetDigest);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getDatasetDigest>>> = ({ signal }) => getDatasetDigest(datasetDigest, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetDigest), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetDatasetDigestQueryResult = NonNullable<Awaited<ReturnType<typeof getDatasetDigest>>>\nexport type GetDatasetDigestQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the first Dataset that matches the provided digest\n */\nexport const useGetDatasetDigest = <TData = Awaited<ReturnType<typeof getDatasetDigest>>, TError = ErrorType<void | DmError>>(\n datasetDigest: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getDatasetDigest>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetDatasetDigestQueryOptions(datasetDigest,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\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>,signal?: AbortSignal\n) => {\n \n \n return customInstance<DatasetSchemaGetResponse>(\n {url: `/dataset/${datasetId}/schema/${datasetVersion}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetSchemaQueryKey = (datasetId: string,\n datasetVersion: number,) => {\n \n return [\"data-manager-api\", `/dataset/${datasetId}/schema/${datasetVersion}`] as const;\n }\n\n \nexport const getGetSchemaQueryOptions = <TData = Awaited<ReturnType<typeof getSchema>>, TError = ErrorType<void | DmError>>(datasetId: string,\n datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetSchemaQueryKey(datasetId,datasetVersion);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getSchema>>> = ({ signal }) => getSchema(datasetId,datasetVersion, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(datasetId && datasetVersion), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetSchemaQueryResult = NonNullable<Awaited<ReturnType<typeof getSchema>>>\nexport type GetSchemaQueryError = ErrorType<void | DmError>\n\n/**\n * @summary Gets the property schema for a specific Dataset\n */\nexport const useGetSchema = <TData = Awaited<ReturnType<typeof getSchema>>, TError = ErrorType<void | DmError>>(\n datasetId: string,\n datasetVersion: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getSchema>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetSchemaQueryOptions(datasetId,datasetVersion,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n"]}