@squonk/data-manager-client 0.7.12-rc.1 → 0.7.13

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.
@@ -25,17 +25,11 @@ export type PatchInstanceParams = { archive?: QInstanceArchiveParameter };
25
25
 
26
26
  export type GetInstancesParams = { project_id?: QProjectIdParameter };
27
27
 
28
- /**
29
- * The ordinal of a previously received event. If set, only events subsequent to the ordinal provided will be returned. Providing a value of 0 will result in retrieving the first and subsequent events.
30
-
31
- */
32
- export type QEventPriorOrdinalParameter = number;
33
-
34
- /**
35
- * Maximum number of events to return. If provided, can be 1 or more.
36
-
37
- */
38
- export type QEventLimitParameter = number;
28
+ export type GetJobByNameParams = {
29
+ collection: QJobCollectionParameter;
30
+ name: QJobNameParameter;
31
+ version: QJobVersionParameter;
32
+ };
39
33
 
40
34
  export type GetTaskParams = {
41
35
  event_limit?: QEventLimitParameter;
@@ -48,6 +42,12 @@ export type GetTasksParams = {
48
42
  project_id?: QProjectIdParameter;
49
43
  };
50
44
 
45
+ /**
46
+ * A project file.
47
+
48
+ */
49
+ export type QFileParameter = string;
50
+
51
51
  export type DeleteUnmanagedFileParams = {
52
52
  file: QFileParameter;
53
53
  path?: QFilePathParameter;
@@ -66,12 +66,6 @@ export type DeleteDatasetParams = {
66
66
 
67
67
  export type GetVersionsParams = { include_deleted?: QIncludeDeletedParameter };
68
68
 
69
- /**
70
- * Filter the datasets by the supplied mime_type.
71
-
72
- */
73
- export type QDatasetMimeTypeParameter = string;
74
-
75
69
  export type GetDatasetsParams = {
76
70
  include_deleted?: QIncludeDeletedParameter;
77
71
  username?: QUsernameParameter;
@@ -132,6 +126,24 @@ export type QProjectIdParameter = string;
132
126
  */
133
127
  export type QLabelsParameter = string;
134
128
 
129
+ /**
130
+ * The version of a Job, i.e. "1.0.0"
131
+
132
+ */
133
+ export type QJobVersionParameter = string;
134
+
135
+ /**
136
+ * The name of a Job, i.e. "nop"
137
+
138
+ */
139
+ export type QJobNameParameter = string;
140
+
141
+ /**
142
+ * The Collection for a Job, i.e. "im-test"
143
+
144
+ */
145
+ export type QJobCollectionParameter = string;
146
+
135
147
  /**
136
148
  * Whether to convert Project managed file instances to unmanged files
137
149
 
@@ -176,12 +188,6 @@ export type QFileProjectIdParameter = string;
176
188
  */
177
189
  export type QFilePathParameter = string;
178
190
 
179
- /**
180
- * A project file.
181
-
182
- */
183
- export type QFileParameter = string;
184
-
185
191
  /**
186
192
  * Set to a dot-separated string of purpose enumerations, i.e. `INSTANCE`, `FILE` or `DATASET`. To exclude file and dataset tasks set to `FILE.DATASET`
187
193
 
@@ -194,6 +200,24 @@ export type QExcludePurposeParameter = string;
194
200
  */
195
201
  export type QExcludeDoneParameter = boolean;
196
202
 
203
+ /**
204
+ * The ordinal of a previously received event. If set, only events subsequent to the ordinal provided will be returned. Providing a value of 0 will result in retrieving the first and subsequent events.
205
+
206
+ */
207
+ export type QEventPriorOrdinalParameter = number;
208
+
209
+ /**
210
+ * Maximum number of events to return. If provided, can be 1 or more.
211
+
212
+ */
213
+ export type QEventLimitParameter = number;
214
+
215
+ /**
216
+ * Filter the datasets by the supplied mime_type.
217
+
218
+ */
219
+ export type QDatasetMimeTypeParameter = string;
220
+
197
221
  /**
198
222
  * Set, if you're an admin, to call the endpoint without impersonation
199
223
 
@@ -952,6 +976,9 @@ export interface DatasetVersionSummary {
952
976
  /** The version of the dataset
953
977
  */
954
978
  version: number;
979
+ /** The name of the Pod handling the creation of the Dataset
980
+ */
981
+ creator_pod_name?: string;
955
982
  /** The processign stage. When loading a Dataset it typically passes through `COPYING`, `FORMATTING` and `LOADING` stages before reaching `DONE` (or `FAILED`). A Dataset can be used (and deleted) as long as it's passed the `FORMATTING` stage
956
983
  */
957
984
  processing_stage: DatasetVersionSummaryProcessingStage;
@@ -1029,6 +1056,9 @@ export interface DatasetVersionDetail {
1029
1056
  /** The version of the dataset
1030
1057
  */
1031
1058
  version: number;
1059
+ /** The name of the Pod handling the creation of the Dataset
1060
+ */
1061
+ creator_pod_name?: string;
1032
1062
  /** The processign stage. When loading a Dataset it typically passes through `COPYING`, `FORMATTING` and `LOADING` stages before reaching `DONE` (or `FAILED`). A Dataset can be used (and deleted) as long as it's passed the `FORMATTING` stage
1033
1063
  */
1034
1064
  processing_stage: DatasetVersionDetailProcessingStage;
package/src/job/job.ts CHANGED
@@ -19,6 +19,7 @@ import type {
19
19
  JobsGetResponse,
20
20
  DmError,
21
21
  JobGetResponse,
22
+ GetJobByNameParams,
22
23
  } from "../data-manager-api.schemas";
23
24
  import { customInstance, ErrorType } from ".././custom-instance";
24
25
 
@@ -85,6 +86,68 @@ export const useGetJobs = <
85
86
  };
86
87
  };
87
88
 
89
+ /**
90
+ * Gets a Job based on the **name**, its **collection** and **version**.
91
+
92
+ Job availability will vary as Jobs are added to the cluster.
93
+
94
+ * @summary Get a Job by name (collection and version)
95
+ */
96
+ export const getJobByName = (
97
+ params?: GetJobByNameParams,
98
+ options?: SecondParameter<typeof customInstance>,
99
+ signal?: AbortSignal
100
+ ) => {
101
+ return customInstance<JobGetResponse>(
102
+ { url: `/job/get-by-name`, method: "get", signal, params },
103
+ options
104
+ );
105
+ };
106
+
107
+ export const getGetJobByNameQueryKey = (params?: GetJobByNameParams) => [
108
+ `/job/get-by-name`,
109
+ ...(params ? [params] : []),
110
+ ];
111
+
112
+ export type GetJobByNameQueryResult = NonNullable<
113
+ Awaited<ReturnType<typeof getJobByName>>
114
+ >;
115
+ export type GetJobByNameQueryError = ErrorType<DmError>;
116
+
117
+ export const useGetJobByName = <
118
+ TData = Awaited<ReturnType<typeof getJobByName>>,
119
+ TError = ErrorType<DmError>
120
+ >(
121
+ params?: GetJobByNameParams,
122
+ options?: {
123
+ query?: UseQueryOptions<
124
+ Awaited<ReturnType<typeof getJobByName>>,
125
+ TError,
126
+ TData
127
+ >;
128
+ request?: SecondParameter<typeof customInstance>;
129
+ }
130
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {
131
+ const { query: queryOptions, request: requestOptions } = options ?? {};
132
+
133
+ const queryKey = queryOptions?.queryKey ?? getGetJobByNameQueryKey(params);
134
+
135
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getJobByName>>> = ({
136
+ signal,
137
+ }) => getJobByName(params, requestOptions, signal);
138
+
139
+ const query = useQuery<
140
+ Awaited<ReturnType<typeof getJobByName>>,
141
+ TError,
142
+ TData
143
+ >(queryKey, queryFn, queryOptions);
144
+
145
+ return {
146
+ queryKey,
147
+ ...query,
148
+ };
149
+ };
150
+
88
151
  /**
89
152
  * Get details of a specific job available to you that can be instantiated.
90
153
 
package/task/task.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_query from 'react-query';
2
2
  import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
3
- import { e as GetTasksParams, bd as customInstance, aD as TasksGetResponse, be as ErrorType, b9 as DmError, d as GetTaskParams, aF as TaskGetResponse } from '../custom-instance-da4fff1f.js';
3
+ import { e as GetTasksParams, bh as customInstance, aH as TasksGetResponse, bi as ErrorType, bd as DmError, d as GetTaskParams, aJ as TaskGetResponse } from '../custom-instance-da28e834.js';
4
4
  import 'axios';
5
5
 
6
6
  declare type AwaitedInput<T> = PromiseLike<T> | T;
package/type/type.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { UseQueryOptions, QueryKey, UseQueryResult } from 'react-query';
2
- import { bd as customInstance, aC as TypesGetResponse, be as ErrorType, b9 as DmError } from '../custom-instance-da4fff1f.js';
2
+ import { bh as customInstance, aG as TypesGetResponse, bi as ErrorType, bd as DmError } from '../custom-instance-da28e834.js';
3
3
  import 'axios';
4
4
 
5
5
  /**
package/user/user.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_query from 'react-query';
2
2
  import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from 'react-query';
3
- import { bd as customInstance, az as UsersGetResponse, be as ErrorType, b9 as DmError, a as GetUserAccountParams, Y as UserAccountDetail, I as UserAccountPatchBodyBody, G as GetUserApiLogParams, aA as UserApiLogGetResponse } from '../custom-instance-da4fff1f.js';
3
+ import { bh as customInstance, aD as UsersGetResponse, bi as ErrorType, bd as DmError, a as GetUserAccountParams, a0 as UserAccountDetail, M as UserAccountPatchBodyBody, G as GetUserApiLogParams, aE as UserApiLogGetResponse } from '../custom-instance-da28e834.js';
4
4
  import 'axios';
5
5
 
6
6
  declare type AwaitedInput<T> = PromiseLike<T> | T;