@squidcloud/client
Version:
A typescript implementation of the Squid client
44 lines (43 loc) • 1.42 kB
TypeScript
import { ServiceFunctionName } from './backend.public-types';
/**
* Configuration for a scheduled task in the platform.
* @category Platform
*/
export interface SchedulerConfig {
/** The name of the service function to be executed on the schedule. */
functionName: ServiceFunctionName;
/** The cron expression defining the schedule timing. */
cronExpression: string;
/** Indicates whether the scheduler should run exclusively, preventing overlaps. */
exclusive: boolean;
}
/**
* Information about a scheduler instance in the platform.
* @category Platform
*/
export interface SchedulerInfo {
/** The unique identifier for the scheduler. */
schedulerId: string;
/** The configuration details for the scheduler. */
config: SchedulerConfig;
/** Indicates whether the scheduler is currently enabled. */
enabled: boolean;
}
/**
* Options for updating an existing scheduler in the platform.
* @category Platform
*/
export interface UpdateSchedulerOptions {
/** The unique identifier of the scheduler to update. */
schedulerId: string;
/** Optional flag to enable or disable the scheduler. */
enabled?: boolean;
}
/**
* Request structure for updating multiple schedulers in the platform.
* @category Platform
*/
export interface UpdateSchedulersRequest {
/** An array of scheduler update options. */
schedulers: UpdateSchedulerOptions[];
}