@tapis/tapisui-api
Version:
Typescript library for making api calls with react query
53 lines (52 loc) • 1.75 kB
TypeScript
import { Apps, Jobs, Systems } from '@tapis/tapis-typescript';
type DefaultSystem = {
source?: 'app';
systemId?: string;
};
/**
* Computes the default execution system ID that will be used
*
* @param app
* @returns
*/
export declare const computeDefaultSystem: (app: Apps.TapisApp) => DefaultSystem;
type DefaultQueue = {
source?: 'app' | 'system' | 'app system';
queue?: string;
};
/**
* Computes the logical queue that will be used, if the job does not
* specify one
*
* @param job
* @param app
* @param systems
* @returns
*/
export declare const computeDefaultQueue: (job: Partial<Jobs.ReqSubmitJob>, app: Apps.TapisApp, systems: Array<Systems.TapisSystem>) => DefaultQueue;
type DefaultJobType = {
source: 'app' | 'app system' | 'system' | 'tapis';
jobType: Apps.JobTypeEnum;
};
/**
* Determines the default jobType if one is not specified in the jobType field in a job
* using the algorithm specified at:
*
* https://tapis.readthedocs.io/en/latest/technical/jobs.html#job-type
*
* @param job
* @param app
* @param systems
* @returns
*/
export declare const computeDefaultJobType: (job: Partial<Jobs.ReqSubmitJob>, app: Apps.TapisApp, systems: Array<Systems.TapisSystem>) => DefaultJobType;
export declare enum ValidateExecSystemResult {
Complete = "COMPLETE",
ErrorNoExecSystem = "ERROR_NO_EXEC_SYSTEM",
ErrorExecSystemNotFound = "ERROR_EXEC_SYSTEM_NOT_FOUND",
ErrorExecSystemNoQueues = "ERROR_EXEC_SYSTEM_NO_QUEUES",
ErrorNoQueue = "ERROR_NO_QUEUE",
ErrorQueueNotFound = "ERROR_QUEUE_NOT_FOUND"
}
export declare const validateExecSystem: (job: Partial<Jobs.ReqSubmitJob>, app: Apps.TapisApp, systems: Array<Systems.TapisSystem>) => ValidateExecSystemResult;
export {};