/*! * @license * Copyright Squiz Australia Pty Ltd. All Rights Reserved. */ import { AttributeValue } from '@aws-sdk/client-dynamodb'; import { EntityType } from '../../constants/Repository.constants'; import { ListParameters } from '../Base'; /** * Job interface. * @export * @interface Job */ export interface Job { /** * The name of the job. * @type {string} * @memberof Job */ name: string; /** * The description of the job. * @type {string} * @memberof Job */ description: string; /** * The version of the job. * @type {string} * @memberof Job */ version: string; /** * The runtime image the job should execute against (e.g. `node:20`, `node:24`). * @type {string} * @memberof Job */ image: string; /** * The DynamoDB record type ('job'). * @type {EntityType} * @memberof Job */ type: EntityType; } /** * The Job record attributes stored in DynamoDB. * @export * @interface JobRecord */ export interface JobRecord { /** * The partition key ('job'). * @type {EntityType} * @memberof JobRecord */ pk: EntityType; /** * The sort key ('name-version'). * @type {string} * @memberof JobRecord */ sk: string; /** * The name of the job. * @type {string} * @memberof JobRecord */ name: string; /** * The description of the job. * @type {string} * @memberof JobRecord */ description: string; /** * The version of the job. * @type {string} * @memberof JobRecord */ version: string; /** * The runtime image the job should execute against (e.g. `node:20`, `node:24`). * @type {string} * @memberof JobRecord */ image: string; } export type JobDto = Record; /** * The parameters for listing jobs. * @export */ export type ListJobParameters = ListParameters>>; /** * The request body for creating a job (POST /job). * @export */ export type CreateJobRequest = Omit; export type UpdateJobRequest = Partial>; export type JobSk = Pick;