@squonk/data-manager-client 3.3.2 → 4.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.
- package/accounting/accounting.cjs.map +1 -1
- package/accounting/accounting.js.map +1 -1
- package/admin/admin.cjs +10 -10
- package/admin/admin.cjs.map +1 -1
- package/admin/admin.js +10 -10
- package/admin/admin.js.map +1 -1
- package/application/application.cjs.map +1 -1
- package/application/application.js.map +1 -1
- package/configuration/configuration.cjs +44 -1
- package/configuration/configuration.cjs.map +1 -1
- package/configuration/configuration.d.cts +59 -2
- package/configuration/configuration.d.ts +59 -2
- package/configuration/configuration.js +43 -0
- package/configuration/configuration.js.map +1 -1
- package/dataset/dataset.cjs +11 -11
- package/dataset/dataset.cjs.map +1 -1
- package/dataset/dataset.js +11 -11
- package/dataset/dataset.js.map +1 -1
- package/digest/digest.cjs.map +1 -1
- package/digest/digest.js.map +1 -1
- package/exchange-rate/exchange-rate.cjs +10 -10
- package/exchange-rate/exchange-rate.cjs.map +1 -1
- package/exchange-rate/exchange-rate.js +10 -10
- package/exchange-rate/exchange-rate.js.map +1 -1
- package/file-and-path/file-and-path.cjs +10 -10
- package/file-and-path/file-and-path.cjs.map +1 -1
- package/file-and-path/file-and-path.js +10 -10
- package/file-and-path/file-and-path.js.map +1 -1
- package/index.cjs +39 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +355 -18
- package/index.d.ts +355 -18
- package/index.js +38 -0
- package/index.js.map +1 -1
- package/instance/instance.cjs +24 -24
- package/instance/instance.cjs.map +1 -1
- package/instance/instance.js +24 -24
- package/instance/instance.js.map +1 -1
- package/inventory/inventory.cjs.map +1 -1
- package/inventory/inventory.js.map +1 -1
- package/job/job.cjs.map +1 -1
- package/job/job.js.map +1 -1
- package/metadata/metadata.cjs +10 -10
- package/metadata/metadata.cjs.map +1 -1
- package/metadata/metadata.js +10 -10
- package/metadata/metadata.js.map +1 -1
- package/package.json +1 -1
- package/project/project.cjs +11 -11
- package/project/project.cjs.map +1 -1
- package/project/project.js +11 -11
- package/project/project.js.map +1 -1
- package/src/accounting/accounting.ts +2 -2
- package/src/admin/admin.ts +12 -12
- package/src/application/application.ts +2 -2
- package/src/configuration/configuration.ts +144 -2
- package/src/data-manager-api.schemas.ts +399 -17
- package/src/dataset/dataset.ts +13 -13
- package/src/digest/digest.ts +2 -2
- package/src/exchange-rate/exchange-rate.ts +12 -12
- package/src/file-and-path/file-and-path.ts +12 -12
- package/src/instance/instance.ts +26 -26
- package/src/inventory/inventory.ts +2 -2
- package/src/job/job.ts +2 -2
- package/src/metadata/metadata.ts +12 -12
- package/src/project/project.ts +13 -13
- package/src/task/task.ts +2 -2
- package/src/type/type.ts +2 -2
- package/src/user/user.ts +14 -14
- package/src/workflow/workflow.ts +1399 -0
- package/task/task.cjs.map +1 -1
- package/task/task.js.map +1 -1
- package/type/type.cjs.map +1 -1
- package/type/type.js.map +1 -1
- package/user/user.cjs +11 -11
- package/user/user.cjs.map +1 -1
- package/user/user.d.cts +1 -1
- package/user/user.d.ts +1 -1
- package/user/user.js +11 -11
- package/user/user.js.map +1 -1
- package/workflow/package.json +7 -0
- package/workflow/workflow.cjs +489 -0
- package/workflow/workflow.cjs.map +1 -0
- package/workflow/workflow.d.cts +572 -0
- package/workflow/workflow.d.ts +572 -0
- package/workflow/workflow.js +489 -0
- package/workflow/workflow.js.map +1 -0
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Dataset Manager API
|
|
6
6
|
* The Dataset Manager API service.
|
|
7
7
|
|
|
8
|
-
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **
|
|
8
|
+
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications**, **Jobs**, and **Workflows** using **Projects** and **Files**.
|
|
9
9
|
|
|
10
|
-
* OpenAPI spec version:
|
|
10
|
+
* OpenAPI spec version: 4.0
|
|
11
11
|
*/
|
|
12
12
|
export type GetUserInventoryParams = {
|
|
13
13
|
/**
|
|
@@ -311,7 +311,7 @@ export type GetProjectFileWithTokenParams = {
|
|
|
311
311
|
/**
|
|
312
312
|
* A token
|
|
313
313
|
*/
|
|
314
|
-
token
|
|
314
|
+
token: QTokenParameter;
|
|
315
315
|
/**
|
|
316
316
|
* A project path. If provided it must begin `/` and refers to a path where `/` represents the project's root directory
|
|
317
317
|
|
|
@@ -631,6 +631,93 @@ export type QCurrentParameter = boolean;
|
|
|
631
631
|
*/
|
|
632
632
|
export type QApplicationIdParameter = string;
|
|
633
633
|
|
|
634
|
+
export type WorkflowPatchBodyBody = {
|
|
635
|
+
/**
|
|
636
|
+
* A new name for the Workflow
|
|
637
|
+
|
|
638
|
+
* @minLength 2
|
|
639
|
+
* @maxLength 80
|
|
640
|
+
*/
|
|
641
|
+
name?: string;
|
|
642
|
+
/** A replacement workflow definition, a YAML string.
|
|
643
|
+
|
|
644
|
+
You can provide an inline definition as a YAML string or load a `definition_file`. You must provide one or the other.
|
|
645
|
+
*/
|
|
646
|
+
definition?: string;
|
|
647
|
+
/** A workflow definition, a YAML string.
|
|
648
|
+
|
|
649
|
+
You can provide a file or an inline `definition` as a YAML string. You must provide one or the other. */
|
|
650
|
+
definition_file?: Blob;
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
export type WorkflowVersionPutBodyBody = {
|
|
654
|
+
/** The versions string, anything, but typically a string that complies with the **Semantic Versioning 2.0.0** definition, e.g. `1.0.0-alpha.1`
|
|
655
|
+
*/
|
|
656
|
+
version: string;
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
export type WorkflowRunPostBodyBody = {
|
|
660
|
+
/**
|
|
661
|
+
* The Project to run the Workflow in
|
|
662
|
+
|
|
663
|
+
* @pattern ^project-[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
|
|
664
|
+
*/
|
|
665
|
+
project_id: string;
|
|
666
|
+
/**
|
|
667
|
+
* The name to use for the instance
|
|
668
|
+
|
|
669
|
+
* @minLength 2
|
|
670
|
+
* @maxLength 80
|
|
671
|
+
* @pattern ^[A-Za-z0-9]+[A-Za-z0-9-_. ]*[A-Za-z0-9]+$
|
|
672
|
+
*/
|
|
673
|
+
as_name: string;
|
|
674
|
+
/** A JSON string representation of the variables provided to the workflow
|
|
675
|
+
*/
|
|
676
|
+
variables?: string;
|
|
677
|
+
/** A debug value that may be used by the instance.
|
|
678
|
+
*/
|
|
679
|
+
debug?: string;
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* The scope of the workflow. The default is `GLOBAL`
|
|
684
|
+
|
|
685
|
+
*/
|
|
686
|
+
export type WorkflowPostBodyBodyScope = typeof WorkflowPostBodyBodyScope[keyof typeof WorkflowPostBodyBodyScope];
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
690
|
+
export const WorkflowPostBodyBodyScope = {
|
|
691
|
+
GLOBAL: 'GLOBAL',
|
|
692
|
+
AS_ORGANISATION: 'AS_ORGANISATION',
|
|
693
|
+
AS_PROJECT: 'AS_PROJECT',
|
|
694
|
+
} as const;
|
|
695
|
+
|
|
696
|
+
export type WorkflowPostBodyBody = {
|
|
697
|
+
/**
|
|
698
|
+
* The name to attach to the workflow
|
|
699
|
+
|
|
700
|
+
* @minLength 2
|
|
701
|
+
* @maxLength 80
|
|
702
|
+
*/
|
|
703
|
+
name: string;
|
|
704
|
+
/** The workflow definition, a YAML string. The definition is converted to a YAML object using PyYAML's `SafeLoader`. This limits what is supported but minimises the risk of a User being able to execute arbitrary code from the supplied YAML.
|
|
705
|
+
|
|
706
|
+
You can provide an inline definition as a YAML string or load a `definition_file`. You must provide one or the other.
|
|
707
|
+
*/
|
|
708
|
+
definition?: string;
|
|
709
|
+
/** A workflow definition, a YAML string.
|
|
710
|
+
|
|
711
|
+
You can provide a file or an inline `definition` as a YAML string. You must provide one or the other. */
|
|
712
|
+
definition_file?: Blob;
|
|
713
|
+
/** The scope of the workflow. The default is `GLOBAL`
|
|
714
|
+
*/
|
|
715
|
+
scope: WorkflowPostBodyBodyScope;
|
|
716
|
+
/** If the scope of the Workflow is not `GLOBAL` you need to provide an identity of the chosen scope. This might be the UUID of an Account Server Organisation or Unit ror example.
|
|
717
|
+
*/
|
|
718
|
+
scope_id?: string;
|
|
719
|
+
};
|
|
720
|
+
|
|
634
721
|
export type UserPatchBodyBody = {
|
|
635
722
|
/** If set to a message the user account is suspended, with the user receiving this message when they try and use the API. A suspended user account can be restored by setting the message to `/restore`
|
|
636
723
|
*/
|
|
@@ -675,7 +762,7 @@ export type ProjectPostBodyBody = {
|
|
|
675
762
|
|
|
676
763
|
export type ProjectPatchBodyBody = {
|
|
677
764
|
private?: boolean;
|
|
678
|
-
/** The new name of the
|
|
765
|
+
/** The new name of the Project
|
|
679
766
|
*/
|
|
680
767
|
name?: string;
|
|
681
768
|
};
|
|
@@ -768,7 +855,7 @@ Tokens should therefore be revoked when they're no longer required
|
|
|
768
855
|
*/
|
|
769
856
|
generate_callback_token?: boolean;
|
|
770
857
|
/**
|
|
771
|
-
* An optional 22-character **
|
|
858
|
+
* An optional 22-character **Short UUID** callback token that is supplied by the remote service. If not provided the user can use `generate_callback_token` to have one generated and returned in the response.
|
|
772
859
|
|
|
773
860
|
See the Python module's `shortuuid.get_alphabet()` for the full list of permitted characters
|
|
774
861
|
|
|
@@ -985,9 +1072,9 @@ export interface UserDetail {
|
|
|
985
1072
|
export interface UserAccountDetail {
|
|
986
1073
|
user: UserDetail;
|
|
987
1074
|
/** Whether the caller has admin privilege */
|
|
988
|
-
caller_has_admin_privilege
|
|
1075
|
+
caller_has_admin_privilege?: boolean;
|
|
989
1076
|
/** The Data Manager roles the user has */
|
|
990
|
-
data_manager_roles
|
|
1077
|
+
data_manager_roles?: string[];
|
|
991
1078
|
}
|
|
992
1079
|
|
|
993
1080
|
/**
|
|
@@ -1173,6 +1260,24 @@ export interface ServiceErrorSummary {
|
|
|
1173
1260
|
acknowledging_user?: string;
|
|
1174
1261
|
}
|
|
1175
1262
|
|
|
1263
|
+
export interface RunningWorkflowProject {
|
|
1264
|
+
/** The Project ID
|
|
1265
|
+
*/
|
|
1266
|
+
id?: string;
|
|
1267
|
+
/** The Project name
|
|
1268
|
+
*/
|
|
1269
|
+
name?: string;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
export interface RunningWorkflowWorkflow {
|
|
1273
|
+
/** The Workflow ID
|
|
1274
|
+
*/
|
|
1275
|
+
id?: string;
|
|
1276
|
+
/** The Workflow name
|
|
1277
|
+
*/
|
|
1278
|
+
name?: string;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1176
1281
|
export interface ProjectFileDetail {
|
|
1177
1282
|
/** The code obtained from the Account Server
|
|
1178
1283
|
*/
|
|
@@ -1289,7 +1394,7 @@ export interface JobVariables {
|
|
|
1289
1394
|
}
|
|
1290
1395
|
|
|
1291
1396
|
/**
|
|
1292
|
-
* The optional container image type. Typically a single-container
|
|
1397
|
+
* The optional container image type. Typically a single-container `SIMPLE` (where only one container runs) or a workflow where multiple container images can be spawned (like `NEXTFLOW`)
|
|
1293
1398
|
|
|
1294
1399
|
*/
|
|
1295
1400
|
export type JobSummaryImageType = typeof JobSummaryImageType[keyof typeof JobSummaryImageType];
|
|
@@ -1314,7 +1419,7 @@ export interface JobSummary {
|
|
|
1314
1419
|
/** The Job version
|
|
1315
1420
|
*/
|
|
1316
1421
|
version: string;
|
|
1317
|
-
/** The optional container image type. Typically a single-container
|
|
1422
|
+
/** The optional container image type. Typically a single-container `SIMPLE` (where only one container runs) or a workflow where multiple container images can be spawned (like `NEXTFLOW`)
|
|
1318
1423
|
*/
|
|
1319
1424
|
image_type: JobSummaryImageType;
|
|
1320
1425
|
/** The Job's category
|
|
@@ -1390,7 +1495,7 @@ export interface JobApplication {
|
|
|
1390
1495
|
}
|
|
1391
1496
|
|
|
1392
1497
|
/**
|
|
1393
|
-
* The Job container image type. Typically a single-container
|
|
1498
|
+
* The Job container image type. Typically a single-container `SIMPLE`` (where only one container runs) or a workflow where multiple container images can be spawned (like `NEXTFLOW`)
|
|
1394
1499
|
|
|
1395
1500
|
*/
|
|
1396
1501
|
export type InstanceSummaryJobImageType = typeof InstanceSummaryJobImageType[keyof typeof InstanceSummaryJobImageType];
|
|
@@ -1470,13 +1575,13 @@ The initial phase, indicating that the Instance is preparing to run, is `PENDING
|
|
|
1470
1575
|
/** The data and time (UTC) the instance stopped running
|
|
1471
1576
|
*/
|
|
1472
1577
|
stopped?: string;
|
|
1473
|
-
/** The time the instance has spent running in the cluster. It's a string representation of a Python `timedelta
|
|
1578
|
+
/** The time the instance has spent running in the cluster. It's a string representation of a Python `timedelta` object, e.g. `0:12:32` for a run-time of 12 minutes and 32 seconds. The run-time must be considered as an _estimate_ until the instance has stopped and the instance is only considered to be running once `started` has been set.
|
|
1474
1579
|
*/
|
|
1475
1580
|
run_time: string;
|
|
1476
|
-
/** The application instance owner, the person who launched the application and is the only user
|
|
1581
|
+
/** The application instance owner, the person who launched the application and is the only user that can stop it.
|
|
1477
1582
|
*/
|
|
1478
1583
|
owner: string;
|
|
1479
|
-
/** The Project the instances
|
|
1584
|
+
/** The Project the instances are running in.
|
|
1480
1585
|
*/
|
|
1481
1586
|
project_id: string;
|
|
1482
1587
|
/** The Instance name
|
|
@@ -1500,7 +1605,7 @@ The initial phase, indicating that the Instance is preparing to run, is `PENDING
|
|
|
1500
1605
|
/** If the instance relates to a job, this will be the job's name, as defined in the original collection's job definition.
|
|
1501
1606
|
*/
|
|
1502
1607
|
job_version?: string;
|
|
1503
|
-
/** The Job container image type. Typically a single-container
|
|
1608
|
+
/** The Job container image type. Typically a single-container `SIMPLE`` (where only one container runs) or a workflow where multiple container images can be spawned (like `NEXTFLOW`)
|
|
1504
1609
|
*/
|
|
1505
1610
|
job_image_type?: InstanceSummaryJobImageType;
|
|
1506
1611
|
/** The instance's known outputs, a JSON string defining a map of all the outputs. Typically applied only to JOB application types
|
|
@@ -1828,6 +1933,268 @@ export interface ModeGetResponse {
|
|
|
1828
1933
|
mode: string;
|
|
1829
1934
|
}
|
|
1830
1935
|
|
|
1936
|
+
export type RunningWorkflowStepStatus = typeof RunningWorkflowStepStatus[keyof typeof RunningWorkflowStepStatus];
|
|
1937
|
+
|
|
1938
|
+
|
|
1939
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
1940
|
+
export const RunningWorkflowStepStatus = {
|
|
1941
|
+
RUNNING: 'RUNNING',
|
|
1942
|
+
SUCCESS: 'SUCCESS',
|
|
1943
|
+
FAILURE: 'FAILURE',
|
|
1944
|
+
} as const;
|
|
1945
|
+
|
|
1946
|
+
export type RunningWorkflowStepVariables = { [key: string]: unknown };
|
|
1947
|
+
|
|
1948
|
+
export interface RunningWorkflowStep {
|
|
1949
|
+
/** The Running Workflow Step's unique ID */
|
|
1950
|
+
id: string;
|
|
1951
|
+
variables: RunningWorkflowStepVariables;
|
|
1952
|
+
instance_id?: string;
|
|
1953
|
+
task_id?: string;
|
|
1954
|
+
started: string;
|
|
1955
|
+
stopped?: string;
|
|
1956
|
+
status: RunningWorkflowStepStatus;
|
|
1957
|
+
/** The step name */
|
|
1958
|
+
name: string;
|
|
1959
|
+
/** True if the running workflow step has finished */
|
|
1960
|
+
done: boolean;
|
|
1961
|
+
error_num: number;
|
|
1962
|
+
error_msg?: string;
|
|
1963
|
+
/** True if the running workflow step has finished successfully */
|
|
1964
|
+
success?: boolean;
|
|
1965
|
+
running_workflow: RunningWorkflowSummary;
|
|
1966
|
+
prior_running_workflow_step?: PriorRunningWorkflowStep;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
export interface RunningWorkflowStepsGetResponse {
|
|
1970
|
+
count: number;
|
|
1971
|
+
running_workflow_steps: RunningWorkflowStep[];
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* The variables provided when the running workflow was created
|
|
1976
|
+
|
|
1977
|
+
*/
|
|
1978
|
+
export type RunningWorkflowGetResponseVariables = { [key: string]: unknown };
|
|
1979
|
+
|
|
1980
|
+
/**
|
|
1981
|
+
* The status of the running workflow
|
|
1982
|
+
*/
|
|
1983
|
+
export type RunningWorkflowGetResponseStatus = typeof RunningWorkflowGetResponseStatus[keyof typeof RunningWorkflowGetResponseStatus];
|
|
1984
|
+
|
|
1985
|
+
|
|
1986
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
1987
|
+
export const RunningWorkflowGetResponseStatus = {
|
|
1988
|
+
RUNNING: 'RUNNING',
|
|
1989
|
+
SUCCESS: 'SUCCESS',
|
|
1990
|
+
FAILURE: 'FAILURE',
|
|
1991
|
+
USER_STOPPED: 'USER_STOPPED',
|
|
1992
|
+
} as const;
|
|
1993
|
+
|
|
1994
|
+
export interface RunningWorkflowGetResponse {
|
|
1995
|
+
/** The Running Workflows's unique ID */
|
|
1996
|
+
id: string;
|
|
1997
|
+
/** The user that started the running workflow */
|
|
1998
|
+
running_user: string;
|
|
1999
|
+
/** The name attached to this running workflow */
|
|
2000
|
+
name: string;
|
|
2001
|
+
error_num: number;
|
|
2002
|
+
error_msg?: string;
|
|
2003
|
+
/** True if the running workflow has finished */
|
|
2004
|
+
done: boolean;
|
|
2005
|
+
/** True if the running workflow has finished successfully */
|
|
2006
|
+
success?: boolean;
|
|
2007
|
+
/** An optional string passed to running instances */
|
|
2008
|
+
debug?: string;
|
|
2009
|
+
/** The status of the running workflow */
|
|
2010
|
+
status: RunningWorkflowGetResponseStatus;
|
|
2011
|
+
/** The date and time the running workflow was started */
|
|
2012
|
+
started: string;
|
|
2013
|
+
/** The date and time the running workflow was stopped
|
|
2014
|
+
*/
|
|
2015
|
+
stopped?: string;
|
|
2016
|
+
/** The variables provided when the running workflow was created
|
|
2017
|
+
*/
|
|
2018
|
+
variables: RunningWorkflowGetResponseVariables;
|
|
2019
|
+
/** The user that stopped the running workflow */
|
|
2020
|
+
stopping_user?: string;
|
|
2021
|
+
workflow: RunningWorkflowWorkflow;
|
|
2022
|
+
project: RunningWorkflowProject;
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
/**
|
|
2026
|
+
* The status of the running workflow
|
|
2027
|
+
*/
|
|
2028
|
+
export type RunningWorkflowSummaryStatus = typeof RunningWorkflowSummaryStatus[keyof typeof RunningWorkflowSummaryStatus];
|
|
2029
|
+
|
|
2030
|
+
|
|
2031
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
2032
|
+
export const RunningWorkflowSummaryStatus = {
|
|
2033
|
+
RUNNING: 'RUNNING',
|
|
2034
|
+
SUCCESS: 'SUCCESS',
|
|
2035
|
+
FAILURE: 'FAILURE',
|
|
2036
|
+
USER_STOPPED: 'USER_STOPPED',
|
|
2037
|
+
} as const;
|
|
2038
|
+
|
|
2039
|
+
export interface RunningWorkflowSummary {
|
|
2040
|
+
/** The Running Workflows's unique ID
|
|
2041
|
+
*/
|
|
2042
|
+
id: string;
|
|
2043
|
+
/** The name attached to this running workflow
|
|
2044
|
+
*/
|
|
2045
|
+
name: string;
|
|
2046
|
+
/** The status of the running workflow */
|
|
2047
|
+
status?: RunningWorkflowSummaryStatus;
|
|
2048
|
+
workflow?: RunningWorkflowWorkflow;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
export interface PriorRunningWorkflowStep {
|
|
2052
|
+
/** The Running Workflows Step's unique ID that ran prior to this step
|
|
2053
|
+
*/
|
|
2054
|
+
id: string;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
export interface RunningWorkflowGetAllResponse {
|
|
2058
|
+
/** The number of running workflows in the returned list
|
|
2059
|
+
*/
|
|
2060
|
+
count: number;
|
|
2061
|
+
running_workflows: RunningWorkflowSummary[];
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
export interface WorkflowVersionPutResponse {
|
|
2065
|
+
/** A new workflow ID */
|
|
2066
|
+
id: string;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
export interface WorkflowStepSummary {
|
|
2070
|
+
/** The name of the step
|
|
2071
|
+
*/
|
|
2072
|
+
name: string;
|
|
2073
|
+
/** The JSON string representation of the step specification
|
|
2074
|
+
*/
|
|
2075
|
+
specification: string;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
export interface WorkflowRunPostResponse {
|
|
2079
|
+
/** A running workflow ID */
|
|
2080
|
+
id: string;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
export interface WorkflowDefinitionGetResponse {
|
|
2084
|
+
/** YAML as a string */
|
|
2085
|
+
definition: string;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
/**
|
|
2089
|
+
* The scope of the workflow.
|
|
2090
|
+
*/
|
|
2091
|
+
export type WorkflowGetResponseScope = typeof WorkflowGetResponseScope[keyof typeof WorkflowGetResponseScope];
|
|
2092
|
+
|
|
2093
|
+
|
|
2094
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
2095
|
+
export const WorkflowGetResponseScope = {
|
|
2096
|
+
GLOBAL: 'GLOBAL',
|
|
2097
|
+
AS_ORGANISATION: 'AS_ORGANISATION',
|
|
2098
|
+
AS_UNIT: 'AS_UNIT',
|
|
2099
|
+
} as const;
|
|
2100
|
+
|
|
2101
|
+
export interface WorkflowGetResponse {
|
|
2102
|
+
/** The Workflows's unique ID */
|
|
2103
|
+
id: string;
|
|
2104
|
+
/** The creator of Workflows */
|
|
2105
|
+
creating_user?: string;
|
|
2106
|
+
/** The name attached to this workflow definition */
|
|
2107
|
+
name: string;
|
|
2108
|
+
/** The name of the Workflow. Set if the workflow definition contains a name
|
|
2109
|
+
*/
|
|
2110
|
+
workflow_name?: string;
|
|
2111
|
+
/** The description of the Workflow. Set if the workflow definition contains a description
|
|
2112
|
+
*/
|
|
2113
|
+
workflow_description?: string;
|
|
2114
|
+
/** The date and time the workflow was created */
|
|
2115
|
+
created: string;
|
|
2116
|
+
/** The scope of the workflow. */
|
|
2117
|
+
scope: WorkflowGetResponseScope;
|
|
2118
|
+
/** The scope ID of the workflow. Set if the **Scope** is not **GLOBAL**
|
|
2119
|
+
*/
|
|
2120
|
+
scope_id?: string;
|
|
2121
|
+
/** The version of the workflow. Set if the workflow definition version has been set.
|
|
2122
|
+
*/
|
|
2123
|
+
version?: string;
|
|
2124
|
+
/** The parent Workflow ID. Set if this workflow has been versioned.
|
|
2125
|
+
*/
|
|
2126
|
+
source_id?: string;
|
|
2127
|
+
/** True if the workflow has been validated */
|
|
2128
|
+
validated: boolean;
|
|
2129
|
+
/** A non-zero value if there's been a validation error */
|
|
2130
|
+
validation_error_num?: number;
|
|
2131
|
+
/** A list of validation errors. Only present if the workflow has been validated and errors were found.
|
|
2132
|
+
*/
|
|
2133
|
+
validation_error_msg?: string[];
|
|
2134
|
+
/** The steps, if the Workflow has been validated and has no errors.
|
|
2135
|
+
*/
|
|
2136
|
+
steps?: WorkflowStepSummary[];
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
export interface WorkflowPostResponse {
|
|
2140
|
+
id: string;
|
|
2141
|
+
validated: boolean;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
export interface WorkflowPatchResponse {
|
|
2145
|
+
validated: boolean;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
/**
|
|
2149
|
+
* The scope of the workflow.
|
|
2150
|
+
|
|
2151
|
+
*/
|
|
2152
|
+
export type WorkflowSummaryScope = typeof WorkflowSummaryScope[keyof typeof WorkflowSummaryScope];
|
|
2153
|
+
|
|
2154
|
+
|
|
2155
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
2156
|
+
export const WorkflowSummaryScope = {
|
|
2157
|
+
GLOBAL: 'GLOBAL',
|
|
2158
|
+
AS_ORGANISATION: 'AS_ORGANISATION',
|
|
2159
|
+
AS_UNIT: 'AS_UNIT',
|
|
2160
|
+
} as const;
|
|
2161
|
+
|
|
2162
|
+
export interface WorkflowSummary {
|
|
2163
|
+
/** The Workflows's unique ID
|
|
2164
|
+
*/
|
|
2165
|
+
id: string;
|
|
2166
|
+
/** The name attached to this workflow definitions
|
|
2167
|
+
*/
|
|
2168
|
+
name: string;
|
|
2169
|
+
/** The name of the Workflow. Set if the workflow definition contains a description
|
|
2170
|
+
*/
|
|
2171
|
+
workflow_name?: string;
|
|
2172
|
+
/** The description of the workflow. Set if the workflow definition contains a description
|
|
2173
|
+
*/
|
|
2174
|
+
workflow_description?: string;
|
|
2175
|
+
/** The version of the workflow. Set if the workflow definition contains a description
|
|
2176
|
+
*/
|
|
2177
|
+
version?: string;
|
|
2178
|
+
/** True if the workflow has been validated */
|
|
2179
|
+
validated: boolean;
|
|
2180
|
+
/** The source Workflow ID. Set if this workflow has been versioned.
|
|
2181
|
+
*/
|
|
2182
|
+
source_id?: string;
|
|
2183
|
+
/** The scope of the workflow.
|
|
2184
|
+
*/
|
|
2185
|
+
scope: WorkflowSummaryScope;
|
|
2186
|
+
/** The scope ID of the workflow. Set if the **Scope** is not **GLOBAL**
|
|
2187
|
+
*/
|
|
2188
|
+
scope_id?: string;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
export interface WorkflowGetAllResponse {
|
|
2192
|
+
/** The number of workflows in the returned list
|
|
2193
|
+
*/
|
|
2194
|
+
count: number;
|
|
2195
|
+
workflows: WorkflowSummary[];
|
|
2196
|
+
}
|
|
2197
|
+
|
|
1831
2198
|
export interface VersionGetResponse {
|
|
1832
2199
|
/** The Data Manager version. This is guaranteed to be a valid semantic version for official (tagged) images. The version value format for unofficial images is a string but otherwise undefined
|
|
1833
2200
|
*/
|
|
@@ -2119,7 +2486,7 @@ export interface InstancesGetResponse {
|
|
|
2119
2486
|
}
|
|
2120
2487
|
|
|
2121
2488
|
/**
|
|
2122
|
-
* The Job container image type. Typically a single-container 'SIMPLE' (where only one container runs) or a workflow where multiple container images can be spawned (like NEXTFLOW)
|
|
2489
|
+
* The Job container image type. Typically a single-container 'SIMPLE' (where only one container runs) or a workflow where multiple container images can be spawned (like `NEXTFLOW`)
|
|
2123
2490
|
|
|
2124
2491
|
*/
|
|
2125
2492
|
export type InstanceGetResponseJobImageType = typeof InstanceGetResponseJobImageType[keyof typeof InstanceGetResponseJobImageType];
|
|
@@ -2201,7 +2568,7 @@ export interface InstanceGetResponse {
|
|
|
2201
2568
|
/** The date and time the instance stopped, an ISO-8601 format string.
|
|
2202
2569
|
*/
|
|
2203
2570
|
stopped?: string;
|
|
2204
|
-
/** The time the instance has spent running in the cluster. It's a string representation of a Python timedelta object, e.g. `0:12:32` for a run-time of 12 minutes and 32 seconds. The run-time must be considered as an _estimate_ until the instance has stopped and the instance is only considered to be running once `started` has been set.
|
|
2571
|
+
/** The time the instance has spent running in the cluster. It's a string representation of a Python `timedelta` object, e.g. `0:12:32` for a run-time of 12 minutes and 32 seconds. The run-time must be considered as an _estimate_ until the instance has stopped and the instance is only considered to be running once `started` has been set.
|
|
2205
2572
|
*/
|
|
2206
2573
|
run_time: string;
|
|
2207
2574
|
/** The phase of the application. This is a string, one of a limited number of values that are defined internally within the Data Manager.
|
|
@@ -2226,7 +2593,7 @@ The initial phase, indicating that the Instance is preparing to run, is `PENDING
|
|
|
2226
2593
|
/** If the instance relates to a job, this will be the job's name, as defined in the original collection's job definition.
|
|
2227
2594
|
*/
|
|
2228
2595
|
job_version?: string;
|
|
2229
|
-
/** The Job container image type. Typically a single-container 'SIMPLE' (where only one container runs) or a workflow where multiple container images can be spawned (like NEXTFLOW)
|
|
2596
|
+
/** The Job container image type. Typically a single-container 'SIMPLE' (where only one container runs) or a workflow where multiple container images can be spawned (like `NEXTFLOW`)
|
|
2230
2597
|
*/
|
|
2231
2598
|
job_image_type?: InstanceGetResponseJobImageType;
|
|
2232
2599
|
/** The JSON string representation of the JobDefinition's outputs
|
|
@@ -2262,6 +2629,9 @@ The initial phase, indicating that the Instance is preparing to run, is `PENDING
|
|
|
2262
2629
|
/** A list of Project-relative annotation files.
|
|
2263
2630
|
*/
|
|
2264
2631
|
written_job_annotation_files?: string[];
|
|
2632
|
+
/** This is the UUID of the Running Workflow Step responsible for the Instance if this Instance is part of a Workflow (Job)
|
|
2633
|
+
*/
|
|
2634
|
+
running_workflow_step_id?: string;
|
|
2265
2635
|
}
|
|
2266
2636
|
|
|
2267
2637
|
export type GetExchangeRatesResponseId = number | string;
|
|
@@ -2328,6 +2698,18 @@ export interface InstancePostResponse {
|
|
|
2328
2698
|
command?: string;
|
|
2329
2699
|
}
|
|
2330
2700
|
|
|
2701
|
+
export interface InputHandlerDetail {
|
|
2702
|
+
/** The input type this handler handles */
|
|
2703
|
+
input_type: string;
|
|
2704
|
+
/** A markdown string describing the handler */
|
|
2705
|
+
documentation: string;
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2708
|
+
export interface InputHandlerGetResponse {
|
|
2709
|
+
count: number;
|
|
2710
|
+
input_handlers: InputHandlerDetail[];
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2331
2713
|
export interface InstanceDryRunPostResponse {
|
|
2332
2714
|
/** A token that can be used to access data in the project without further authentication. The token expires automatically or if the user revokes it.
|
|
2333
2715
|
*/
|
package/src/dataset/dataset.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Dataset Manager API
|
|
6
6
|
* The Dataset Manager API service.
|
|
7
7
|
|
|
8
|
-
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **
|
|
8
|
+
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications**, **Jobs**, and **Workflows** using **Projects** and **Files**.
|
|
9
9
|
|
|
10
|
-
* OpenAPI spec version:
|
|
10
|
+
* OpenAPI spec version: 4.0
|
|
11
11
|
*/
|
|
12
12
|
import {
|
|
13
13
|
useMutation,
|
|
@@ -62,28 +62,28 @@ export const createDatasetFromFile = (
|
|
|
62
62
|
datasetPutBodyBody: DatasetPutBodyBody,
|
|
63
63
|
options?: SecondParameter<typeof customInstance>,) => {
|
|
64
64
|
|
|
65
|
-
const
|
|
66
|
-
|
|
65
|
+
const formUrlEncoded = new URLSearchParams();
|
|
66
|
+
formUrlEncoded.append('dataset_type', datasetPutBodyBody.dataset_type)
|
|
67
67
|
if(datasetPutBodyBody.format_extra_variables !== undefined) {
|
|
68
|
-
|
|
68
|
+
formUrlEncoded.append('format_extra_variables', datasetPutBodyBody.format_extra_variables)
|
|
69
69
|
}
|
|
70
70
|
if(datasetPutBodyBody.skip_molecule_load !== undefined) {
|
|
71
|
-
|
|
71
|
+
formUrlEncoded.append('skip_molecule_load', datasetPutBodyBody.skip_molecule_load.toString())
|
|
72
72
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
formUrlEncoded.append('project_id', datasetPutBodyBody.project_id)
|
|
74
|
+
formUrlEncoded.append('path', datasetPutBodyBody.path)
|
|
75
|
+
formUrlEncoded.append('file_name', datasetPutBodyBody.file_name)
|
|
76
76
|
if(datasetPutBodyBody.dataset_id !== undefined) {
|
|
77
|
-
|
|
77
|
+
formUrlEncoded.append('dataset_id', datasetPutBodyBody.dataset_id)
|
|
78
78
|
}
|
|
79
79
|
if(datasetPutBodyBody.unit_id !== undefined) {
|
|
80
|
-
|
|
80
|
+
formUrlEncoded.append('unit_id', datasetPutBodyBody.unit_id)
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
return customInstance<DatasetPutPostResponse>(
|
|
84
84
|
{url: `/dataset`, method: 'PUT',
|
|
85
|
-
headers: {'Content-Type': '
|
|
86
|
-
data:
|
|
85
|
+
headers: {'Content-Type': 'application/x-www-form-urlencoded', },
|
|
86
|
+
data: formUrlEncoded
|
|
87
87
|
},
|
|
88
88
|
options);
|
|
89
89
|
}
|
package/src/digest/digest.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Dataset Manager API
|
|
6
6
|
* The Dataset Manager API service.
|
|
7
7
|
|
|
8
|
-
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **
|
|
8
|
+
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications**, **Jobs**, and **Workflows** using **Projects** and **Files**.
|
|
9
9
|
|
|
10
|
-
* OpenAPI spec version:
|
|
10
|
+
* OpenAPI spec version: 4.0
|
|
11
11
|
*/
|
|
12
12
|
import {
|
|
13
13
|
useQuery,
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Dataset Manager API
|
|
6
6
|
* The Dataset Manager API service.
|
|
7
7
|
|
|
8
|
-
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications** and **
|
|
8
|
+
A service that allows *registered* users to make **Datasets** and associated **Metadata** available to **Applications**, **Jobs**, and **Workflows** using **Projects** and **Files**.
|
|
9
9
|
|
|
10
|
-
* OpenAPI spec version:
|
|
10
|
+
* OpenAPI spec version: 4.0
|
|
11
11
|
*/
|
|
12
12
|
import {
|
|
13
13
|
useMutation,
|
|
@@ -206,16 +206,16 @@ export const setApplicationExchangeRate = (
|
|
|
206
206
|
exchangeRatePutBodyBody: ExchangeRatePutBodyBody,
|
|
207
207
|
options?: SecondParameter<typeof customInstance>,) => {
|
|
208
208
|
|
|
209
|
-
const
|
|
210
|
-
|
|
209
|
+
const formUrlEncoded = new URLSearchParams();
|
|
210
|
+
formUrlEncoded.append('rate', exchangeRatePutBodyBody.rate)
|
|
211
211
|
if(exchangeRatePutBodyBody.comment !== undefined) {
|
|
212
|
-
|
|
212
|
+
formUrlEncoded.append('comment', exchangeRatePutBodyBody.comment)
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
return customInstance<void>(
|
|
216
216
|
{url: `/application/${applicationId}/exchange-rate`, method: 'PUT',
|
|
217
|
-
headers: {'Content-Type': '
|
|
218
|
-
data:
|
|
217
|
+
headers: {'Content-Type': 'application/x-www-form-urlencoded', },
|
|
218
|
+
data: formUrlEncoded
|
|
219
219
|
},
|
|
220
220
|
options);
|
|
221
221
|
}
|
|
@@ -582,16 +582,16 @@ export const setJobPricing = (
|
|
|
582
582
|
exchangeRatePutBodyBody: ExchangeRatePutBodyBody,
|
|
583
583
|
options?: SecondParameter<typeof customInstance>,) => {
|
|
584
584
|
|
|
585
|
-
const
|
|
586
|
-
|
|
585
|
+
const formUrlEncoded = new URLSearchParams();
|
|
586
|
+
formUrlEncoded.append('rate', exchangeRatePutBodyBody.rate)
|
|
587
587
|
if(exchangeRatePutBodyBody.comment !== undefined) {
|
|
588
|
-
|
|
588
|
+
formUrlEncoded.append('comment', exchangeRatePutBodyBody.comment)
|
|
589
589
|
}
|
|
590
590
|
|
|
591
591
|
return customInstance<void>(
|
|
592
592
|
{url: `/job/${jobId}/exchange-rate`, method: 'PUT',
|
|
593
|
-
headers: {'Content-Type': '
|
|
594
|
-
data:
|
|
593
|
+
headers: {'Content-Type': 'application/x-www-form-urlencoded', },
|
|
594
|
+
data: formUrlEncoded
|
|
595
595
|
},
|
|
596
596
|
options);
|
|
597
597
|
}
|