export type AuthSessionId = string; export type AuthSessionsAllResponse = AuthSessionsAllResponseValueItem[]; export interface AuthSessionsAllResponseValueItem { /** * The unique identifier for the authentication session */ id: string; type: "CREDENTIALS" | "RECORDER" | "RUNTIME"; status: "PENDING" | "READY" | "EXPIRED"; } export type AuthSessionsCreateResultResponse = AuthSessionsCreateResultResponseValueDone | AuthSessionsCreateResultResponseValuePending | AuthSessionsCreateResultResponseValueCanceled | AuthSessionsCreateResultResponseValueInProgress | AuthSessionsCreateResultResponseValueFailed; export interface AuthSessionsCreateResultResponseValueCanceled { status: "canceled"; message: string; reason: AuthSessionsCreateResultResponseValueCanceledReason; } export interface AuthSessionsCreateResultResponseValueCanceledReason { type: "auth-session-validate-dependency-failed" | "terminated" | "job-run-paused" | "job-run-terminated" | "failed-to-initialize-job-run" | "api-access-disabled" | "cancelled-user-action"; message: string; /** * Optional URL to documentation for this error */ docUrl?: string; details?: unknown; } export interface AuthSessionsCreateResultResponseValueDone { status: "done"; /** * The unique identifier for the authentication session */ authSessionId: string; } export interface AuthSessionsCreateResultResponseValueFailed { status: "failed"; message: string; error: AuthSessionsCreateResultResponseValueFailedError; } export interface AuthSessionsCreateResultResponseValueFailedError { /** * Error message describing the failure */ message: string; /** * Optional error code for more specific error identification */ code?: "internal-server-error" | "script-process-crashed" | "unexpected" | "script-process-crashed" | "script-execution-exception" | "script-no-valid-output-received" | "result-too-big-error" | "script-timeout" | "script-unexpected-error" | "auth-check-failed" | "all-attempts-failed" | "check-attempts-failed" | "create-attempts-failed" | "post-create-check-attempts-failed" | "api-attempts-failed" | "onepassword-integration-error" | "job-run-terminated"; category: "infrastructure" | "execution" | "auth" | "user" | "billing"; retirable?: boolean; /** * Optional URL to documentation for this error */ docUrl?: string; /** * Optional correlation ID for tracing the error in logs */ correlationId?: string; details?: unknown; } export interface AuthSessionsCreateResultResponseValueInProgress { status: "in_progress"; /** * Unique identifier for the run, prefixed nanoId (ru_...) */ runId: string; } export interface AuthSessionsCreateResultResponseValuePending { status: "pending"; } export interface AuthSessionsCreateStartRequestBody { /** * The unique identifier for the authentication session */ id?: string; /** * The parameters to be passed to the API. */ parameters: Record; /** * Proxy configuration for the job */ proxy?: string | null; /** * Number of attempts to create a new AuthSession if the current one is invalid or expired. */ createAttempts?: number; /** * Number of attempts to check the validity of the AuthSession before recreating it. */ checkAttempts?: number; saveTrace?: boolean; } export interface AuthSessionsCreateStartResponse { status: "started"; operationId: string; } export interface AuthSessionsOneResponse { /** * The unique identifier for the authentication session */ id: string; type: "CREDENTIALS" | "RECORDER" | "RUNTIME"; status: "PENDING" | "READY" | "EXPIRED"; } export type AuthSessionsUpdateResultResponse = AuthSessionsUpdateResultResponseValueDone | AuthSessionsUpdateResultResponseValuePending | AuthSessionsUpdateResultResponseValueCanceled | AuthSessionsUpdateResultResponseValueInProgress | AuthSessionsUpdateResultResponseValueFailed; export interface AuthSessionsUpdateResultResponseValueCanceled { status: "canceled"; message: string; reason: AuthSessionsUpdateResultResponseValueCanceledReason; } export interface AuthSessionsUpdateResultResponseValueCanceledReason { type: "auth-session-validate-dependency-failed" | "terminated" | "job-run-paused" | "job-run-terminated" | "failed-to-initialize-job-run" | "api-access-disabled" | "cancelled-user-action"; message: string; /** * Optional URL to documentation for this error */ docUrl?: string; details?: unknown; } export interface AuthSessionsUpdateResultResponseValueDone { status: "done"; /** * The unique identifier for the authentication session */ authSessionId: string; } export interface AuthSessionsUpdateResultResponseValueFailed { status: "failed"; message: string; error: AuthSessionsUpdateResultResponseValueFailedError; } export interface AuthSessionsUpdateResultResponseValueFailedError { /** * Error message describing the failure */ message: string; /** * Optional error code for more specific error identification */ code?: "internal-server-error" | "script-process-crashed" | "unexpected" | "script-process-crashed" | "script-execution-exception" | "script-no-valid-output-received" | "result-too-big-error" | "script-timeout" | "script-unexpected-error" | "auth-check-failed" | "all-attempts-failed" | "check-attempts-failed" | "create-attempts-failed" | "post-create-check-attempts-failed" | "api-attempts-failed" | "onepassword-integration-error" | "job-run-terminated"; category: "infrastructure" | "execution" | "auth" | "user" | "billing"; retirable?: boolean; /** * Optional URL to documentation for this error */ docUrl?: string; /** * Optional correlation ID for tracing the error in logs */ correlationId?: string; details?: unknown; } export interface AuthSessionsUpdateResultResponseValueInProgress { status: "in_progress"; /** * Unique identifier for the run, prefixed nanoId (ru_...) */ runId: string; } export interface AuthSessionsUpdateResultResponseValuePending { status: "pending"; } export interface AuthSessionsUpdateStartRequestBody { /** * The parameters to be passed to the API. */ parameters: Record; /** * Proxy configuration for the job */ proxy?: string | null; /** * Number of attempts to create a new AuthSession if the current one is invalid or expired. */ createAttempts?: number; /** * Number of attempts to check the validity of the AuthSession before recreating it. */ checkAttempts?: number; saveTrace?: boolean; } export interface AuthSessionsUpdateStartResponse { status: "started"; operationId: string; } export type AuthSessionsValidateResultResponse = AuthSessionsValidateResultResponseValueDone | AuthSessionsValidateResultResponseValuePending | AuthSessionsValidateResultResponseValueCanceled | AuthSessionsValidateResultResponseValueInProgress | AuthSessionsValidateResultResponseValueFailed; export interface AuthSessionsValidateResultResponseValueCanceled { status: "canceled"; message: string; reason: AuthSessionsValidateResultResponseValueCanceledReason; } export interface AuthSessionsValidateResultResponseValueCanceledReason { type: "auth-session-validate-dependency-failed" | "terminated" | "job-run-paused" | "job-run-terminated" | "failed-to-initialize-job-run" | "api-access-disabled" | "cancelled-user-action"; message: string; /** * Optional URL to documentation for this error */ docUrl?: string; details?: unknown; } export interface AuthSessionsValidateResultResponseValueDone { status: "done"; /** * The unique identifier for the authentication session */ authSessionId: string; } export interface AuthSessionsValidateResultResponseValueFailed { status: "failed"; message: string; error: AuthSessionsValidateResultResponseValueFailedError; } export interface AuthSessionsValidateResultResponseValueFailedError { /** * Error message describing the failure */ message: string; /** * Optional error code for more specific error identification */ code?: "internal-server-error" | "script-process-crashed" | "unexpected" | "script-process-crashed" | "script-execution-exception" | "script-no-valid-output-received" | "result-too-big-error" | "script-timeout" | "script-unexpected-error" | "auth-check-failed" | "all-attempts-failed" | "check-attempts-failed" | "create-attempts-failed" | "post-create-check-attempts-failed" | "api-attempts-failed" | "onepassword-integration-error" | "job-run-terminated"; category: "infrastructure" | "execution" | "auth" | "user" | "billing"; retirable?: boolean; /** * Optional URL to documentation for this error */ docUrl?: string; /** * Optional correlation ID for tracing the error in logs */ correlationId?: string; details?: unknown; } export interface AuthSessionsValidateResultResponseValueInProgress { status: "in_progress"; /** * Unique identifier for the run, prefixed nanoId (ru_...) */ runId: string; } export interface AuthSessionsValidateResultResponseValuePending { status: "pending"; } export interface AuthSessionsValidateStartRequestBody { /** * If true, the AuthSession will be automatically recreated if the check fails. */ autoRecreate?: boolean; /** * Number of attempts to check the validity of the AuthSession before recreating it. */ checkAttempts?: number; /** * Number of attempts to create a new AuthSession if the current one is invalid or expired. */ createAttempts?: number; /** * Proxy URL to be used for the API call. This is optional and can be used to route the API call through a proxy server. */ proxy?: string | null; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; } export interface AuthSessionsValidateStartResponse { status: "pending"; operationId: string; } export type JobId = string; export type JobRunId = string; /** * Get Job Runs */ export interface JobRunsAllRequest { /** * The name you assigned when creating the Project. */ projectName: string; /** * The ID you assigned when creating the Job. */ jobId: string; pageSize?: string; pageNumber?: string; sortBy?: string; } export interface JobRunsAllResponse { jobRuns: JobRunsAllResponseJobRunsItem[]; /** * Total number of JobRuns available. */ totalCount: number; } export interface JobRunsAllResponseJobRunsItem { /** * Unique identifier for the JobRun (jr_...). */ id: string; /** * Timestamp when the JobRun started. */ startTime: string; /** * Timestamp when the job run ended (null if still running) */ endTime: string | null; /** * UUID of the workspace this JobRun belongs to. */ workspaceId: string; /** * UUID of the project this JobRun belongs to. */ projectId: string; /** * ID of the job this run belongs to */ jobId: string; /** * Timestamp when the JobRun was created. */ createdAt: string; /** * Timestamp when the JobRun was last updated. */ updatedAt: string; /** * Type of the JobRun. */ type: "MANUAL" | "SCHEDULED"; /** * Current status of the JobRun. */ status: "CANCELED" | "PENDING" | "PAUSED" | "PAUSING" | "RESUMING" | "SUCCESS" | "FAILURE" | "TERMINATED" | "COMPLETED"; /** * Total number of payloads in the JobRun. */ payloads: number | null; /** * Number of successful API calls in the JobRun. */ successfulRuns: number | null; /** * Number of failed API calls in the JobRun. */ failedRuns: number | null; /** * Error information if the job run failed, stored as JSONB */ error?: JobRunsAllResponseJobRunsItemError | null; /** * Reason for JobRun state change., stored as JSONB */ reason?: JobRunsAllResponseJobRunsItemReason | null; /** * Snapshot of job configuration at the time of the job run */ jobConfigurationSnapshot: JobRunsAllResponseJobRunsItemJobConfigurationSnapshot; } /** * Error information if the job run failed, stored as JSONB */ export interface JobRunsAllResponseJobRunsItemError { /** * Error message describing the failure */ message: string; /** * Optional error code for more specific error identification */ code: "internal-server-error" | "insufficient-resource-credits"; details?: unknown; category: "billing" | "infrastructure"; /** * Optional correlation ID for tracking the error */ correlationId?: string; retirable?: boolean; /** * Optional documentation URL for more information */ docUrl?: string; } /** * Snapshot of job configuration at the time of the job run */ export interface JobRunsAllResponseJobRunsItemJobConfigurationSnapshot { /** * Job configuration settings */ configuration: JobRunsAllResponseJobRunsItemJobConfigurationSnapshotConfiguration; /** * Optional sink configuration for the job. Can be a webhook or S3 Compatible sink. */ sink?: JobRunsAllResponseJobRunsItemJobConfigurationSnapshotSinkWebhookSinkConfiguration | JobRunsAllResponseJobRunsItemJobConfigurationSnapshotSinkS3SinkConfiguration | null; /** * Authentication session information for the job */ authSession?: JobRunsAllResponseJobRunsItemJobConfigurationSnapshotAuthSession | null; /** * Proxy configuration for the job, stored as JSONB */ proxy?: JobRunsAllResponseJobRunsItemJobConfigurationSnapshotProxy | null; /** * Array of notification configurations for the job. Notifications are sent when jobs reach a terminal state. */ notifications?: JobRunsAllResponseJobRunsItemJobConfigurationSnapshotNotificationsItemOption1[] | null; } /** * Authentication session information for the job */ export interface JobRunsAllResponseJobRunsItemJobConfigurationSnapshotAuthSession { id: string; /** * Number of attempts to check the validity of the AuthSession before recreating it. */ checkAttempts?: number; /** * Number of attempts to create a new AuthSession if the current one is invalid or expired. */ createAttempts?: number; } /** * Job configuration settings */ export interface JobRunsAllResponseJobRunsItemJobConfigurationSnapshotConfiguration { /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ retry?: JobRunsAllResponseJobRunsItemJobConfigurationSnapshotConfigurationRetry; /** * The batch size of payloads to execute. This does not guarantee that the payloads will be executed at the same time. */ maxConcurrentRequests?: number; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Proxy URL for the job to use when making API calls */ proxy?: string; } /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ export interface JobRunsAllResponseJobRunsItemJobConfigurationSnapshotConfigurationRetry { /** * Maximum number of attempts to retry the run in case of failure */ maximumAttempts?: number; } export interface JobRunsAllResponseJobRunsItemJobConfigurationSnapshotNotificationsItemOption1 { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; } /** * Proxy configuration for the job, stored as JSONB */ export interface JobRunsAllResponseJobRunsItemJobConfigurationSnapshotProxy { version: "v1"; url: string; } /** * Configuration for the S3 sink. */ export interface JobRunsAllResponseJobRunsItemJobConfigurationSnapshotSinkS3SinkConfiguration { type: "s3"; /** * The name of the S3 bucket where the data will be stored. */ bucket: string; /** * The access key ID for the S3 bucket. */ accessKeyId: string; /** * The secret access key for the S3 bucket. */ secretAccessKey: string; /** * The region where the S3 bucket is located. */ region: string; /** * Optional prefix for the S3 objects. This can be used to organize objects within the bucket. */ prefix?: string; /** * If enabled, failed payload runs will ***not*** be written to the bucket. */ skipOnFail?: boolean; /** * List of API names to be sent to the S3 bucket. If not provided, all APIs will be sent. */ apisToSend?: string[]; /** * Optional custom endpoint for the S3 bucket. This can be used for S3-compatible services. */ endpoint?: string; /** * If true, the S3 client will use path-style URLs instead of virtual-hosted-style URLs. This is useful for S3-compatible services that require path-style access. */ forcePathStyle?: boolean; } /** * Configuration for the webhook sink. */ export interface JobRunsAllResponseJobRunsItemJobConfigurationSnapshotSinkWebhookSinkConfiguration { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; /** * If true, the webhook will not be sent if the API execution fails. */ skipOnFail?: boolean; /** * List of API names to be sent to the webhook. If not provided, all APIs will be sent. */ apisToSend?: string[]; } /** * Reason for JobRun state change., stored as JSONB */ export interface JobRunsAllResponseJobRunsItemReason { type: "terminated" | "user-request" | "auth-session-not-found" | "auth-session-invalid-mid-job" | "auth-session-validate-dependency-failed" | "auth-session-locked" | "another-job-run-active" | "insufficient-resource-credits" | "s3-sink-error"; message: string; details?: unknown; /** * Optional documentation URL for more information */ docUrl?: string; } export interface JobRunsOneResponse { jobRun: JobRunsOneResponseJobRun; results?: JobRunsOneResponseResults; } export interface JobRunsOneResponseJobRun { /** * Unique identifier for the JobRun (jr_...). */ id: string; /** * Timestamp when the JobRun started. */ startTime: string; /** * Timestamp when the job run ended (null if still running) */ endTime: string | null; /** * UUID of the workspace this JobRun belongs to. */ workspaceId: string; /** * UUID of the project this JobRun belongs to. */ projectId: string; /** * ID of the job this run belongs to */ jobId: string; /** * Timestamp when the JobRun was created. */ createdAt: string; /** * Timestamp when the JobRun was last updated. */ updatedAt: string; /** * Type of the JobRun. */ type: "MANUAL" | "SCHEDULED"; /** * Current status of the JobRun. */ status: "CANCELED" | "PENDING" | "PAUSED" | "PAUSING" | "RESUMING" | "SUCCESS" | "FAILURE" | "TERMINATED" | "COMPLETED"; /** * Total number of payloads in the JobRun. */ payloads: number | null; /** * Number of successful API calls in the JobRun. */ successfulRuns: number | null; /** * Number of failed API calls in the JobRun. */ failedRuns: number | null; /** * Error information if the job run failed, stored as JSONB */ error?: JobRunsOneResponseJobRunError | null; /** * Reason for JobRun state change., stored as JSONB */ reason?: JobRunsOneResponseJobRunReason | null; /** * Snapshot of job configuration at the time of the job run */ jobConfigurationSnapshot: JobRunsOneResponseJobRunJobConfigurationSnapshot; } /** * Error information if the job run failed, stored as JSONB */ export interface JobRunsOneResponseJobRunError { /** * Error message describing the failure */ message: string; /** * Optional error code for more specific error identification */ code: "internal-server-error" | "insufficient-resource-credits"; details?: unknown; category: "billing" | "infrastructure"; /** * Optional correlation ID for tracking the error */ correlationId?: string; retirable?: boolean; /** * Optional documentation URL for more information */ docUrl?: string; } /** * Snapshot of job configuration at the time of the job run */ export interface JobRunsOneResponseJobRunJobConfigurationSnapshot { /** * Job configuration settings */ configuration: JobRunsOneResponseJobRunJobConfigurationSnapshotConfiguration; /** * Optional sink configuration for the job. Can be a webhook or S3 Compatible sink. */ sink?: JobRunsOneResponseJobRunJobConfigurationSnapshotSinkWebhookSinkConfiguration | JobRunsOneResponseJobRunJobConfigurationSnapshotSinkS3SinkConfiguration | null; /** * Authentication session information for the job */ authSession?: JobRunsOneResponseJobRunJobConfigurationSnapshotAuthSession | null; /** * Proxy configuration for the job, stored as JSONB */ proxy?: JobRunsOneResponseJobRunJobConfigurationSnapshotProxy | null; /** * Array of notification configurations for the job. Notifications are sent when jobs reach a terminal state. */ notifications?: JobRunsOneResponseJobRunJobConfigurationSnapshotNotificationsItemOption1[] | null; } /** * Authentication session information for the job */ export interface JobRunsOneResponseJobRunJobConfigurationSnapshotAuthSession { id: string; /** * Number of attempts to check the validity of the AuthSession before recreating it. */ checkAttempts?: number; /** * Number of attempts to create a new AuthSession if the current one is invalid or expired. */ createAttempts?: number; } /** * Job configuration settings */ export interface JobRunsOneResponseJobRunJobConfigurationSnapshotConfiguration { /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ retry?: JobRunsOneResponseJobRunJobConfigurationSnapshotConfigurationRetry; /** * The batch size of payloads to execute. This does not guarantee that the payloads will be executed at the same time. */ maxConcurrentRequests?: number; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Proxy URL for the job to use when making API calls */ proxy?: string; } /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ export interface JobRunsOneResponseJobRunJobConfigurationSnapshotConfigurationRetry { /** * Maximum number of attempts to retry the run in case of failure */ maximumAttempts?: number; } export interface JobRunsOneResponseJobRunJobConfigurationSnapshotNotificationsItemOption1 { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; } /** * Proxy configuration for the job, stored as JSONB */ export interface JobRunsOneResponseJobRunJobConfigurationSnapshotProxy { version: "v1"; url: string; } /** * Configuration for the S3 sink. */ export interface JobRunsOneResponseJobRunJobConfigurationSnapshotSinkS3SinkConfiguration { type: "s3"; /** * The name of the S3 bucket where the data will be stored. */ bucket: string; /** * The access key ID for the S3 bucket. */ accessKeyId: string; /** * The secret access key for the S3 bucket. */ secretAccessKey: string; /** * The region where the S3 bucket is located. */ region: string; /** * Optional prefix for the S3 objects. This can be used to organize objects within the bucket. */ prefix?: string; /** * If enabled, failed payload runs will ***not*** be written to the bucket. */ skipOnFail?: boolean; /** * List of API names to be sent to the S3 bucket. If not provided, all APIs will be sent. */ apisToSend?: string[]; /** * Optional custom endpoint for the S3 bucket. This can be used for S3-compatible services. */ endpoint?: string; /** * If true, the S3 client will use path-style URLs instead of virtual-hosted-style URLs. This is useful for S3-compatible services that require path-style access. */ forcePathStyle?: boolean; } /** * Configuration for the webhook sink. */ export interface JobRunsOneResponseJobRunJobConfigurationSnapshotSinkWebhookSinkConfiguration { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; /** * If true, the webhook will not be sent if the API execution fails. */ skipOnFail?: boolean; /** * List of API names to be sent to the webhook. If not provided, all APIs will be sent. */ apisToSend?: string[]; } /** * Reason for JobRun state change., stored as JSONB */ export interface JobRunsOneResponseJobRunReason { type: "terminated" | "user-request" | "auth-session-not-found" | "auth-session-invalid-mid-job" | "auth-session-validate-dependency-failed" | "auth-session-locked" | "another-job-run-active" | "insufficient-resource-credits" | "s3-sink-error"; message: string; details?: unknown; /** * Optional documentation URL for more information */ docUrl?: string; } export interface JobRunsOneResponseResults { signedUrl: string; signedUrlExpiration?: string; size?: number; key?: string; format: string; } export interface JobRunsTerminateResponse { /** * Success message confirming JobRun termination. */ message: string; } export type JobsAllResponse = JobsAllResponseValueItem[]; /** * Complete job object as stored in the database */ export interface JobsAllResponseValueItem { /** * The ID of the job. Has to be a valid URL slug. */ id: string; /** * UUID of the workspace this job belongs to */ workspaceId: string; /** * UUID of the project this job belongs to */ projectId: string; /** * Job configuration settings */ configuration: JobsAllResponseValueItemConfiguration; /** * Array of API calls to be executed */ payload: JobsAllResponseValueItemPayloadItem[]; /** * Optional sink configuration for the job. Can be a webhook or S3 Compatible sink. */ sink?: JobsAllResponseValueItemSinkWebhookSinkConfiguration | JobsAllResponseValueItemSinkS3SinkConfiguration | null; /** * Schedule configurations for the job. If set, the job will periodically run according to this configuration. The configurations are used to calculate the closest next run time. */ schedule?: JobsAllResponseValueItemSchedule | null; /** * The timestamp of the next scheduled job run. `null` if the job does not have a schedule. */ nextRunTime?: string | null; /** * Timestamp of the last completed run */ lastRunTime?: string | null; /** * Timestamp when the job was created */ createdAt: string; /** * Authentication session information for the job */ authSession?: JobsAllResponseValueItemAuthSession | null; /** * Array of notification configurations for the job. Notifications are sent when jobs reach a terminal state. */ notifications?: JobsAllResponseValueItemNotificationsItemOption1[] | null; /** * Proxy configuration for the job, stored as JSONB */ proxy?: JobsAllResponseValueItemProxy | null; /** * Reason for job state change, stored as JSONB */ reason?: JobsAllResponseValueItemReason | null; /** * Current state of the job */ state: "ACTIVE" | "PAUSED"; /** * ID of the temporal schedule associated with this job */ scheduleId?: string | null; /** * Source of the job - 'API' for jobs created via API/UI, 'CODE' for jobs defined in the jobs/ folder */ source?: "API" | "CODE"; } /** * Authentication session information for the job */ export interface JobsAllResponseValueItemAuthSession { id: string; /** * Number of attempts to check the validity of the AuthSession before recreating it. */ checkAttempts?: number; /** * Number of attempts to create a new AuthSession if the current one is invalid or expired. */ createAttempts?: number; } /** * Job configuration settings */ export interface JobsAllResponseValueItemConfiguration { /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ retry?: JobsAllResponseValueItemConfigurationRetry; /** * The batch size of payloads to execute. This does not guarantee that the payloads will be executed at the same time. */ maxConcurrentRequests?: number; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Proxy URL for the job to use when making API calls */ proxy?: string; } /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ export interface JobsAllResponseValueItemConfigurationRetry { /** * Maximum number of attempts to retry the run in case of failure */ maximumAttempts?: number; } export interface JobsAllResponseValueItemNotificationsItemOption1 { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; } export interface JobsAllResponseValueItemPayloadItem { /** * The parameters to be passed to the API. */ parameters: Record; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Retry policy configurations in case of failure. */ retry?: JobsAllResponseValueItemPayloadItemRetry; /** * The name of the API to be executed. This is the file path relative to the `api` folder inside your project. */ apiName: string; } /** * Retry policy configurations in case of failure. */ export interface JobsAllResponseValueItemPayloadItemRetry { /** * Maximum number of attempts to retry the run in case of failure */ maximumAttempts?: number; } /** * Proxy configuration for the job, stored as JSONB */ export interface JobsAllResponseValueItemProxy { version: "v1"; url: string; } /** * Reason for job state change, stored as JSONB */ export interface JobsAllResponseValueItemReason { type: "paused" | "terminated"; message: string; details?: unknown; timestamp?: string; } /** * Schedule configurations for the job. If set, the job will periodically run according to this configuration. The configurations are used to calculate the closest next run time. */ export interface JobsAllResponseValueItemSchedule { jitter?: number | string; /** * An array of interval objects */ intervals?: JobsAllResponseValueItemScheduleIntervalsItem[]; /** * An array of calendar objects */ calendars?: JobsAllResponseValueItemScheduleCalendarsItem[]; } /** * A calendar object. It is similar to a cron string, but more verbose. */ export interface JobsAllResponseValueItemScheduleCalendarsItem { /** * Seconds of the calendar, a number in the range 0 - 59 */ second?: number | JobsAllResponseValueItemScheduleCalendarsItemSecondOption2 | JobsAllResponseValueItemScheduleCalendarsItemSecondOption3 | (number | JobsAllResponseValueItemScheduleCalendarsItemSecondOption4ItemOption2 | JobsAllResponseValueItemScheduleCalendarsItemSecondOption4ItemOption3)[] | "*"; /** * Minutes of the calendar, a number in the range 0 - 59 */ minute?: number | JobsAllResponseValueItemScheduleCalendarsItemMinuteOption2 | JobsAllResponseValueItemScheduleCalendarsItemMinuteOption3 | (number | JobsAllResponseValueItemScheduleCalendarsItemMinuteOption4ItemOption2 | JobsAllResponseValueItemScheduleCalendarsItemMinuteOption4ItemOption3)[] | "*"; /** * Hours of the calendar, a number in the range 0 - 23 */ hour?: number | JobsAllResponseValueItemScheduleCalendarsItemHourOption2 | JobsAllResponseValueItemScheduleCalendarsItemHourOption3 | (number | JobsAllResponseValueItemScheduleCalendarsItemHourOption4ItemOption2 | JobsAllResponseValueItemScheduleCalendarsItemHourOption4ItemOption3)[] | "*"; /** * Days of week, one of SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY */ dayOfWeek?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | JobsAllResponseValueItemScheduleCalendarsItemDayOfWeekOption2 | JobsAllResponseValueItemScheduleCalendarsItemDayOfWeekOption3 | ("SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | JobsAllResponseValueItemScheduleCalendarsItemDayOfWeekOption4ItemOption2 | JobsAllResponseValueItemScheduleCalendarsItemDayOfWeekOption4ItemOption3)[] | "*"; /** * Days of the month, a number in the range 1 - 31 */ dayOfMonth?: number | JobsAllResponseValueItemScheduleCalendarsItemDayOfMonthOption2 | JobsAllResponseValueItemScheduleCalendarsItemDayOfMonthOption3 | (number | JobsAllResponseValueItemScheduleCalendarsItemDayOfMonthOption4ItemOption2 | JobsAllResponseValueItemScheduleCalendarsItemDayOfMonthOption4ItemOption3)[] | "*"; /** * Months, one of JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER */ month?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER" | JobsAllResponseValueItemScheduleCalendarsItemMonthOption2 | JobsAllResponseValueItemScheduleCalendarsItemMonthOption3 | ("JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER" | JobsAllResponseValueItemScheduleCalendarsItemMonthOption4ItemOption2 | JobsAllResponseValueItemScheduleCalendarsItemMonthOption4ItemOption3)[] | "*"; /** * Full year. For example: 2024 */ year?: number | JobsAllResponseValueItemScheduleCalendarsItemYearOption2 | JobsAllResponseValueItemScheduleCalendarsItemYearOption3 | (number | JobsAllResponseValueItemScheduleCalendarsItemYearOption4ItemOption2 | JobsAllResponseValueItemScheduleCalendarsItemYearOption4ItemOption3)[] | "*"; /** * A comment to describe what the calendar is supposed to represent */ comment?: string; } export interface JobsAllResponseValueItemScheduleCalendarsItemDayOfMonthOption2 { start: number; step: number; end: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemDayOfMonthOption3 { start: number; end?: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemDayOfMonthOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemDayOfMonthOption4ItemOption3 { start: number; end?: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemDayOfWeekOption2 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; step: number; end: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsAllResponseValueItemScheduleCalendarsItemDayOfWeekOption3 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; end?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsAllResponseValueItemScheduleCalendarsItemDayOfWeekOption4ItemOption2 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; step: number; end: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsAllResponseValueItemScheduleCalendarsItemDayOfWeekOption4ItemOption3 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; end?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsAllResponseValueItemScheduleCalendarsItemHourOption2 { start: number; step: number; end: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemHourOption3 { start: number; end?: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemHourOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemHourOption4ItemOption3 { start: number; end?: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemMinuteOption2 { start: number; step: number; end: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemMinuteOption3 { start: number; end?: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemMinuteOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemMinuteOption4ItemOption3 { start: number; end?: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemMonthOption2 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; step: number; end: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsAllResponseValueItemScheduleCalendarsItemMonthOption3 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; end?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsAllResponseValueItemScheduleCalendarsItemMonthOption4ItemOption2 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; step: number; end: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsAllResponseValueItemScheduleCalendarsItemMonthOption4ItemOption3 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; end?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsAllResponseValueItemScheduleCalendarsItemSecondOption2 { start: number; step: number; end: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemSecondOption3 { start: number; end?: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemSecondOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemSecondOption4ItemOption3 { start: number; end?: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemYearOption2 { start: number; step: number; end: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemYearOption3 { start: number; end?: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemYearOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsAllResponseValueItemScheduleCalendarsItemYearOption4ItemOption3 { start: number; end?: number; } /** * An interval object, which represents a period to trigger the job. The interval is relative to the [Unix epoch](https://en.wikipedia.org/wiki/Unix_time). */ export interface JobsAllResponseValueItemScheduleIntervalsItem { every: number | string; } /** * Configuration for the S3 sink. */ export interface JobsAllResponseValueItemSinkS3SinkConfiguration { type: "s3"; /** * The name of the S3 bucket where the data will be stored. */ bucket: string; /** * The access key ID for the S3 bucket. */ accessKeyId: string; /** * The secret access key for the S3 bucket. */ secretAccessKey: string; /** * The region where the S3 bucket is located. */ region: string; /** * Optional prefix for the S3 objects. This can be used to organize objects within the bucket. */ prefix?: string; /** * If enabled, failed payload runs will ***not*** be written to the bucket. */ skipOnFail?: boolean; /** * List of API names to be sent to the S3 bucket. If not provided, all APIs will be sent. */ apisToSend?: string[]; /** * Optional custom endpoint for the S3 bucket. This can be used for S3-compatible services. */ endpoint?: string; /** * If true, the S3 client will use path-style URLs instead of virtual-hosted-style URLs. This is useful for S3-compatible services that require path-style access. */ forcePathStyle?: boolean; } /** * Configuration for the webhook sink. */ export interface JobsAllResponseValueItemSinkWebhookSinkConfiguration { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; /** * If true, the webhook will not be sent if the API execution fails. */ skipOnFail?: boolean; /** * List of API names to be sent to the webhook. If not provided, all APIs will be sent. */ apisToSend?: string[]; } export interface JobsCreateRequestBody { /** * The ID of the job. Has to be a valid URL slug. */ id: string; /** * Array of API calls to be executed */ payload: JobsCreateRequestBodyPayloadItem[]; /** * Job configuration settings */ configuration: JobsCreateRequestBodyConfiguration; /** * Schedule configurations for the job. If set, the job will periodically run according to this configuration. The configurations are used to calculate the closest next run time. */ schedule?: JobsCreateRequestBodySchedule | null; /** * Optional sink configuration for the job. Can be a webhook or S3 Compatible sink. */ sink?: JobsCreateRequestBodySinkWebhookSinkConfiguration | JobsCreateRequestBodySinkS3SinkConfiguration | null; /** * Proxy configuration for the job */ proxy?: string | null; auth_session?: JobsCreateRequestBodyAuthSession | null; notifications?: JobsCreateRequestBodyNotificationsItemOption1[] | null; } export interface JobsCreateRequestBodyAuthSession { id: string; /** * Number of attempts to check the validity of the AuthSession before recreating it. */ checkAttempts?: number; /** * Number of attempts to create a new AuthSession if the current one is invalid or expired. */ createAttempts?: number; } /** * Job configuration settings */ export interface JobsCreateRequestBodyConfiguration { /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ retry?: JobsCreateRequestBodyConfigurationRetry; /** * The batch size of payloads to execute. This does not guarantee that the payloads will be executed at the same time. */ maxConcurrentRequests?: number; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Proxy URL for the job to use when making API calls */ proxy?: string; } /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ export interface JobsCreateRequestBodyConfigurationRetry { /** * Maximum number of attempts to retry the run in case of failure */ maximumAttempts?: number; } export interface JobsCreateRequestBodyNotificationsItemOption1 { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; } export interface JobsCreateRequestBodyPayloadItem { /** * The parameters to be passed to the API. */ parameters: Record; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Retry policy configurations in case of failure. */ retry?: JobsCreateRequestBodyPayloadItemRetry; /** * The name of the API to be executed. This is the file path relative to the `api` folder inside your project. */ apiName: string; } /** * Retry policy configurations in case of failure. */ export interface JobsCreateRequestBodyPayloadItemRetry { /** * Maximum number of attempts to retry the run in case of failure */ maximumAttempts?: number; } /** * Schedule configurations for the job. If set, the job will periodically run according to this configuration. The configurations are used to calculate the closest next run time. */ export interface JobsCreateRequestBodySchedule { jitter?: number | string; /** * An array of interval objects */ intervals?: JobsCreateRequestBodyScheduleIntervalsItem[]; /** * An array of calendar objects */ calendars?: JobsCreateRequestBodyScheduleCalendarsItem[]; } /** * A calendar object. It is similar to a cron string, but more verbose. */ export interface JobsCreateRequestBodyScheduleCalendarsItem { /** * Seconds of the calendar, a number in the range 0 - 59 */ second?: number | JobsCreateRequestBodyScheduleCalendarsItemSecondOption2 | JobsCreateRequestBodyScheduleCalendarsItemSecondOption3 | (number | JobsCreateRequestBodyScheduleCalendarsItemSecondOption4ItemOption2 | JobsCreateRequestBodyScheduleCalendarsItemSecondOption4ItemOption3)[] | "*"; /** * Minutes of the calendar, a number in the range 0 - 59 */ minute?: number | JobsCreateRequestBodyScheduleCalendarsItemMinuteOption2 | JobsCreateRequestBodyScheduleCalendarsItemMinuteOption3 | (number | JobsCreateRequestBodyScheduleCalendarsItemMinuteOption4ItemOption2 | JobsCreateRequestBodyScheduleCalendarsItemMinuteOption4ItemOption3)[] | "*"; /** * Hours of the calendar, a number in the range 0 - 23 */ hour?: number | JobsCreateRequestBodyScheduleCalendarsItemHourOption2 | JobsCreateRequestBodyScheduleCalendarsItemHourOption3 | (number | JobsCreateRequestBodyScheduleCalendarsItemHourOption4ItemOption2 | JobsCreateRequestBodyScheduleCalendarsItemHourOption4ItemOption3)[] | "*"; /** * Days of week, one of SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY */ dayOfWeek?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | JobsCreateRequestBodyScheduleCalendarsItemDayOfWeekOption2 | JobsCreateRequestBodyScheduleCalendarsItemDayOfWeekOption3 | ("SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | JobsCreateRequestBodyScheduleCalendarsItemDayOfWeekOption4ItemOption2 | JobsCreateRequestBodyScheduleCalendarsItemDayOfWeekOption4ItemOption3)[] | "*"; /** * Days of the month, a number in the range 1 - 31 */ dayOfMonth?: number | JobsCreateRequestBodyScheduleCalendarsItemDayOfMonthOption2 | JobsCreateRequestBodyScheduleCalendarsItemDayOfMonthOption3 | (number | JobsCreateRequestBodyScheduleCalendarsItemDayOfMonthOption4ItemOption2 | JobsCreateRequestBodyScheduleCalendarsItemDayOfMonthOption4ItemOption3)[] | "*"; /** * Months, one of JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER */ month?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER" | JobsCreateRequestBodyScheduleCalendarsItemMonthOption2 | JobsCreateRequestBodyScheduleCalendarsItemMonthOption3 | ("JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER" | JobsCreateRequestBodyScheduleCalendarsItemMonthOption4ItemOption2 | JobsCreateRequestBodyScheduleCalendarsItemMonthOption4ItemOption3)[] | "*"; /** * Full year. For example: 2024 */ year?: number | JobsCreateRequestBodyScheduleCalendarsItemYearOption2 | JobsCreateRequestBodyScheduleCalendarsItemYearOption3 | (number | JobsCreateRequestBodyScheduleCalendarsItemYearOption4ItemOption2 | JobsCreateRequestBodyScheduleCalendarsItemYearOption4ItemOption3)[] | "*"; /** * A comment to describe what the calendar is supposed to represent */ comment?: string; } export interface JobsCreateRequestBodyScheduleCalendarsItemDayOfMonthOption2 { start: number; step: number; end: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemDayOfMonthOption3 { start: number; end?: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemDayOfMonthOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemDayOfMonthOption4ItemOption3 { start: number; end?: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemDayOfWeekOption2 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; step: number; end: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsCreateRequestBodyScheduleCalendarsItemDayOfWeekOption3 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; end?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsCreateRequestBodyScheduleCalendarsItemDayOfWeekOption4ItemOption2 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; step: number; end: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsCreateRequestBodyScheduleCalendarsItemDayOfWeekOption4ItemOption3 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; end?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsCreateRequestBodyScheduleCalendarsItemHourOption2 { start: number; step: number; end: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemHourOption3 { start: number; end?: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemHourOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemHourOption4ItemOption3 { start: number; end?: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemMinuteOption2 { start: number; step: number; end: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemMinuteOption3 { start: number; end?: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemMinuteOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemMinuteOption4ItemOption3 { start: number; end?: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemMonthOption2 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; step: number; end: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsCreateRequestBodyScheduleCalendarsItemMonthOption3 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; end?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsCreateRequestBodyScheduleCalendarsItemMonthOption4ItemOption2 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; step: number; end: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsCreateRequestBodyScheduleCalendarsItemMonthOption4ItemOption3 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; end?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsCreateRequestBodyScheduleCalendarsItemSecondOption2 { start: number; step: number; end: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemSecondOption3 { start: number; end?: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemSecondOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemSecondOption4ItemOption3 { start: number; end?: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemYearOption2 { start: number; step: number; end: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemYearOption3 { start: number; end?: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemYearOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsCreateRequestBodyScheduleCalendarsItemYearOption4ItemOption3 { start: number; end?: number; } /** * An interval object, which represents a period to trigger the job. The interval is relative to the [Unix epoch](https://en.wikipedia.org/wiki/Unix_time). */ export interface JobsCreateRequestBodyScheduleIntervalsItem { every: number | string; } /** * Configuration for the S3 sink. */ export interface JobsCreateRequestBodySinkS3SinkConfiguration { type: "s3"; /** * The name of the S3 bucket where the data will be stored. */ bucket: string; /** * The access key ID for the S3 bucket. */ accessKeyId: string; /** * The secret access key for the S3 bucket. */ secretAccessKey: string; /** * The region where the S3 bucket is located. */ region: string; /** * Optional prefix for the S3 objects. This can be used to organize objects within the bucket. */ prefix?: string; /** * If enabled, failed payload runs will ***not*** be written to the bucket. */ skipOnFail?: boolean; /** * List of API names to be sent to the S3 bucket. If not provided, all APIs will be sent. */ apisToSend?: string[]; /** * Optional custom endpoint for the S3 bucket. This can be used for S3-compatible services. */ endpoint?: string; /** * If true, the S3 client will use path-style URLs instead of virtual-hosted-style URLs. This is useful for S3-compatible services that require path-style access. */ forcePathStyle?: boolean; } /** * Configuration for the webhook sink. */ export interface JobsCreateRequestBodySinkWebhookSinkConfiguration { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; /** * If true, the webhook will not be sent if the API execution fails. */ skipOnFail?: boolean; /** * List of API names to be sent to the webhook. If not provided, all APIs will be sent. */ apisToSend?: string[]; } export interface JobsCreateResponse { /** * The ID of the created job. */ id: string; message: "created"; } /** * Detailed information about a specific job */ export interface JobsOneResponse { /** * The ID of the job. Has to be a valid URL slug. */ id: string; /** * Job configuration settings */ configuration: JobsOneResponseConfiguration; /** * Optional sink configuration for the job. Can be a webhook or S3 Compatible sink. */ sink?: JobsOneResponseSinkWebhookSinkConfiguration | JobsOneResponseSinkS3SinkConfiguration | null; /** * Timestamp when the job was created */ createdAt: string; /** * The timestamp of the next scheduled job run. `null` if the job does not have a schedule. */ nextRunTime?: string | null; /** * Timestamp of the last completed run */ lastRunTime?: string | null; /** * Current state of the job */ state: "ACTIVE" | "PAUSED"; /** * Array of API calls to be executed */ payload?: JobsOneResponsePayloadItem[]; /** * Schedule configurations for the job. If set, the job will periodically run according to this configuration. The configurations are used to calculate the closest next run time. */ schedule?: JobsOneResponseSchedule | null; /** * UUID of the project this job belongs to */ projectId: string; /** * Authentication session information for the job */ authSession?: JobsOneResponseAuthSession | null; /** * Proxy URL if configured for the job */ proxy?: string; } /** * Authentication session information for the job */ export interface JobsOneResponseAuthSession { id: string; /** * Number of attempts to check the validity of the AuthSession before recreating it. */ checkAttempts?: number; /** * Number of attempts to create a new AuthSession if the current one is invalid or expired. */ createAttempts?: number; } /** * Job configuration settings */ export interface JobsOneResponseConfiguration { /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ retry?: JobsOneResponseConfigurationRetry; /** * The batch size of payloads to execute. This does not guarantee that the payloads will be executed at the same time. */ maxConcurrentRequests?: number; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Proxy URL for the job to use when making API calls */ proxy?: string; } /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ export interface JobsOneResponseConfigurationRetry { /** * Maximum number of attempts to retry the run in case of failure */ maximumAttempts?: number; } export interface JobsOneResponsePayloadItem { /** * The parameters to be passed to the API. */ parameters: Record; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Retry policy configurations in case of failure. */ retry?: JobsOneResponsePayloadItemRetry; /** * The name of the API to be executed. This is the file path relative to the `api` folder inside your project. */ apiName: string; } /** * Retry policy configurations in case of failure. */ export interface JobsOneResponsePayloadItemRetry { /** * Maximum number of attempts to retry the run in case of failure */ maximumAttempts?: number; } /** * Schedule configurations for the job. If set, the job will periodically run according to this configuration. The configurations are used to calculate the closest next run time. */ export interface JobsOneResponseSchedule { jitter?: number | string; /** * An array of interval objects */ intervals?: JobsOneResponseScheduleIntervalsItem[]; /** * An array of calendar objects */ calendars?: JobsOneResponseScheduleCalendarsItem[]; } /** * A calendar object. It is similar to a cron string, but more verbose. */ export interface JobsOneResponseScheduleCalendarsItem { /** * Seconds of the calendar, a number in the range 0 - 59 */ second?: number | JobsOneResponseScheduleCalendarsItemSecondOption2 | JobsOneResponseScheduleCalendarsItemSecondOption3 | (number | JobsOneResponseScheduleCalendarsItemSecondOption4ItemOption2 | JobsOneResponseScheduleCalendarsItemSecondOption4ItemOption3)[] | "*"; /** * Minutes of the calendar, a number in the range 0 - 59 */ minute?: number | JobsOneResponseScheduleCalendarsItemMinuteOption2 | JobsOneResponseScheduleCalendarsItemMinuteOption3 | (number | JobsOneResponseScheduleCalendarsItemMinuteOption4ItemOption2 | JobsOneResponseScheduleCalendarsItemMinuteOption4ItemOption3)[] | "*"; /** * Hours of the calendar, a number in the range 0 - 23 */ hour?: number | JobsOneResponseScheduleCalendarsItemHourOption2 | JobsOneResponseScheduleCalendarsItemHourOption3 | (number | JobsOneResponseScheduleCalendarsItemHourOption4ItemOption2 | JobsOneResponseScheduleCalendarsItemHourOption4ItemOption3)[] | "*"; /** * Days of week, one of SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY */ dayOfWeek?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | JobsOneResponseScheduleCalendarsItemDayOfWeekOption2 | JobsOneResponseScheduleCalendarsItemDayOfWeekOption3 | ("SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | JobsOneResponseScheduleCalendarsItemDayOfWeekOption4ItemOption2 | JobsOneResponseScheduleCalendarsItemDayOfWeekOption4ItemOption3)[] | "*"; /** * Days of the month, a number in the range 1 - 31 */ dayOfMonth?: number | JobsOneResponseScheduleCalendarsItemDayOfMonthOption2 | JobsOneResponseScheduleCalendarsItemDayOfMonthOption3 | (number | JobsOneResponseScheduleCalendarsItemDayOfMonthOption4ItemOption2 | JobsOneResponseScheduleCalendarsItemDayOfMonthOption4ItemOption3)[] | "*"; /** * Months, one of JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER */ month?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER" | JobsOneResponseScheduleCalendarsItemMonthOption2 | JobsOneResponseScheduleCalendarsItemMonthOption3 | ("JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER" | JobsOneResponseScheduleCalendarsItemMonthOption4ItemOption2 | JobsOneResponseScheduleCalendarsItemMonthOption4ItemOption3)[] | "*"; /** * Full year. For example: 2024 */ year?: number | JobsOneResponseScheduleCalendarsItemYearOption2 | JobsOneResponseScheduleCalendarsItemYearOption3 | (number | JobsOneResponseScheduleCalendarsItemYearOption4ItemOption2 | JobsOneResponseScheduleCalendarsItemYearOption4ItemOption3)[] | "*"; /** * A comment to describe what the calendar is supposed to represent */ comment?: string; } export interface JobsOneResponseScheduleCalendarsItemDayOfMonthOption2 { start: number; step: number; end: number; } export interface JobsOneResponseScheduleCalendarsItemDayOfMonthOption3 { start: number; end?: number; } export interface JobsOneResponseScheduleCalendarsItemDayOfMonthOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsOneResponseScheduleCalendarsItemDayOfMonthOption4ItemOption3 { start: number; end?: number; } export interface JobsOneResponseScheduleCalendarsItemDayOfWeekOption2 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; step: number; end: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsOneResponseScheduleCalendarsItemDayOfWeekOption3 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; end?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsOneResponseScheduleCalendarsItemDayOfWeekOption4ItemOption2 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; step: number; end: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsOneResponseScheduleCalendarsItemDayOfWeekOption4ItemOption3 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; end?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsOneResponseScheduleCalendarsItemHourOption2 { start: number; step: number; end: number; } export interface JobsOneResponseScheduleCalendarsItemHourOption3 { start: number; end?: number; } export interface JobsOneResponseScheduleCalendarsItemHourOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsOneResponseScheduleCalendarsItemHourOption4ItemOption3 { start: number; end?: number; } export interface JobsOneResponseScheduleCalendarsItemMinuteOption2 { start: number; step: number; end: number; } export interface JobsOneResponseScheduleCalendarsItemMinuteOption3 { start: number; end?: number; } export interface JobsOneResponseScheduleCalendarsItemMinuteOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsOneResponseScheduleCalendarsItemMinuteOption4ItemOption3 { start: number; end?: number; } export interface JobsOneResponseScheduleCalendarsItemMonthOption2 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; step: number; end: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsOneResponseScheduleCalendarsItemMonthOption3 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; end?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsOneResponseScheduleCalendarsItemMonthOption4ItemOption2 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; step: number; end: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsOneResponseScheduleCalendarsItemMonthOption4ItemOption3 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; end?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsOneResponseScheduleCalendarsItemSecondOption2 { start: number; step: number; end: number; } export interface JobsOneResponseScheduleCalendarsItemSecondOption3 { start: number; end?: number; } export interface JobsOneResponseScheduleCalendarsItemSecondOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsOneResponseScheduleCalendarsItemSecondOption4ItemOption3 { start: number; end?: number; } export interface JobsOneResponseScheduleCalendarsItemYearOption2 { start: number; step: number; end: number; } export interface JobsOneResponseScheduleCalendarsItemYearOption3 { start: number; end?: number; } export interface JobsOneResponseScheduleCalendarsItemYearOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsOneResponseScheduleCalendarsItemYearOption4ItemOption3 { start: number; end?: number; } /** * An interval object, which represents a period to trigger the job. The interval is relative to the [Unix epoch](https://en.wikipedia.org/wiki/Unix_time). */ export interface JobsOneResponseScheduleIntervalsItem { every: number | string; } /** * Configuration for the S3 sink. */ export interface JobsOneResponseSinkS3SinkConfiguration { type: "s3"; /** * The name of the S3 bucket where the data will be stored. */ bucket: string; /** * The access key ID for the S3 bucket. */ accessKeyId: string; /** * The secret access key for the S3 bucket. */ secretAccessKey: string; /** * The region where the S3 bucket is located. */ region: string; /** * Optional prefix for the S3 objects. This can be used to organize objects within the bucket. */ prefix?: string; /** * If enabled, failed payload runs will ***not*** be written to the bucket. */ skipOnFail?: boolean; /** * List of API names to be sent to the S3 bucket. If not provided, all APIs will be sent. */ apisToSend?: string[]; /** * Optional custom endpoint for the S3 bucket. This can be used for S3-compatible services. */ endpoint?: string; /** * If true, the S3 client will use path-style URLs instead of virtual-hosted-style URLs. This is useful for S3-compatible services that require path-style access. */ forcePathStyle?: boolean; } /** * Configuration for the webhook sink. */ export interface JobsOneResponseSinkWebhookSinkConfiguration { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; /** * If true, the webhook will not be sent if the API execution fails. */ skipOnFail?: boolean; /** * List of API names to be sent to the webhook. If not provided, all APIs will be sent. */ apisToSend?: string[]; } export interface JobsPauseResponse { message: "Paused"; } export interface JobsResumeResponse { message: "Resumed"; } export interface JobsTriggerResponse { /** * The ID of the triggered JobRun. */ jobRunId: string; /** * A message indicating the result of the trigger action. */ message: string; } /** * Input schema for updating an existing job */ export interface JobsUpdateRequestBody { /** * Array of API calls to be executed */ payload: JobsUpdateRequestBodyPayloadItem[]; /** * Job configuration settings */ configuration: JobsUpdateRequestBodyConfiguration; /** * Schedule configurations for the job. If set, the job will periodically run according to this configuration. The configurations are used to calculate the closest next run time. */ schedule?: JobsUpdateRequestBodySchedule | null; /** * Optional sink configuration for the job. Can be a webhook or S3 Compatible sink. */ sink?: JobsUpdateRequestBodySinkWebhookSinkConfiguration | JobsUpdateRequestBodySinkS3SinkConfiguration | null; /** * Proxy configuration for the job */ proxy?: string | null; auth_session?: JobsUpdateRequestBodyAuthSession | null; notifications?: JobsUpdateRequestBodyNotificationsItemOption1[] | null; } export interface JobsUpdateRequestBodyAuthSession { id: string; /** * Number of attempts to check the validity of the AuthSession before recreating it. */ checkAttempts?: number; /** * Number of attempts to create a new AuthSession if the current one is invalid or expired. */ createAttempts?: number; } /** * Job configuration settings */ export interface JobsUpdateRequestBodyConfiguration { /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ retry?: JobsUpdateRequestBodyConfigurationRetry; /** * The batch size of payloads to execute. This does not guarantee that the payloads will be executed at the same time. */ maxConcurrentRequests?: number; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Proxy URL for the job to use when making API calls */ proxy?: string; } /** * The retry policy of the job. Configure how many retries and the delay between them for each payload. */ export interface JobsUpdateRequestBodyConfigurationRetry { /** * Maximum number of attempts to retry the run in case of failure */ maximumAttempts?: number; } export interface JobsUpdateRequestBodyNotificationsItemOption1 { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; } export interface JobsUpdateRequestBodyPayloadItem { /** * The parameters to be passed to the API. */ parameters: Record; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Retry policy configurations in case of failure. */ retry?: JobsUpdateRequestBodyPayloadItemRetry; /** * The name of the API to be executed. This is the file path relative to the `api` folder inside your project. */ apiName: string; } /** * Retry policy configurations in case of failure. */ export interface JobsUpdateRequestBodyPayloadItemRetry { /** * Maximum number of attempts to retry the run in case of failure */ maximumAttempts?: number; } /** * Schedule configurations for the job. If set, the job will periodically run according to this configuration. The configurations are used to calculate the closest next run time. */ export interface JobsUpdateRequestBodySchedule { jitter?: number | string; /** * An array of interval objects */ intervals?: JobsUpdateRequestBodyScheduleIntervalsItem[]; /** * An array of calendar objects */ calendars?: JobsUpdateRequestBodyScheduleCalendarsItem[]; } /** * A calendar object. It is similar to a cron string, but more verbose. */ export interface JobsUpdateRequestBodyScheduleCalendarsItem { /** * Seconds of the calendar, a number in the range 0 - 59 */ second?: number | JobsUpdateRequestBodyScheduleCalendarsItemSecondOption2 | JobsUpdateRequestBodyScheduleCalendarsItemSecondOption3 | (number | JobsUpdateRequestBodyScheduleCalendarsItemSecondOption4ItemOption2 | JobsUpdateRequestBodyScheduleCalendarsItemSecondOption4ItemOption3)[] | "*"; /** * Minutes of the calendar, a number in the range 0 - 59 */ minute?: number | JobsUpdateRequestBodyScheduleCalendarsItemMinuteOption2 | JobsUpdateRequestBodyScheduleCalendarsItemMinuteOption3 | (number | JobsUpdateRequestBodyScheduleCalendarsItemMinuteOption4ItemOption2 | JobsUpdateRequestBodyScheduleCalendarsItemMinuteOption4ItemOption3)[] | "*"; /** * Hours of the calendar, a number in the range 0 - 23 */ hour?: number | JobsUpdateRequestBodyScheduleCalendarsItemHourOption2 | JobsUpdateRequestBodyScheduleCalendarsItemHourOption3 | (number | JobsUpdateRequestBodyScheduleCalendarsItemHourOption4ItemOption2 | JobsUpdateRequestBodyScheduleCalendarsItemHourOption4ItemOption3)[] | "*"; /** * Days of week, one of SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY */ dayOfWeek?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | JobsUpdateRequestBodyScheduleCalendarsItemDayOfWeekOption2 | JobsUpdateRequestBodyScheduleCalendarsItemDayOfWeekOption3 | ("SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | JobsUpdateRequestBodyScheduleCalendarsItemDayOfWeekOption4ItemOption2 | JobsUpdateRequestBodyScheduleCalendarsItemDayOfWeekOption4ItemOption3)[] | "*"; /** * Days of the month, a number in the range 1 - 31 */ dayOfMonth?: number | JobsUpdateRequestBodyScheduleCalendarsItemDayOfMonthOption2 | JobsUpdateRequestBodyScheduleCalendarsItemDayOfMonthOption3 | (number | JobsUpdateRequestBodyScheduleCalendarsItemDayOfMonthOption4ItemOption2 | JobsUpdateRequestBodyScheduleCalendarsItemDayOfMonthOption4ItemOption3)[] | "*"; /** * Months, one of JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER */ month?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER" | JobsUpdateRequestBodyScheduleCalendarsItemMonthOption2 | JobsUpdateRequestBodyScheduleCalendarsItemMonthOption3 | ("JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER" | JobsUpdateRequestBodyScheduleCalendarsItemMonthOption4ItemOption2 | JobsUpdateRequestBodyScheduleCalendarsItemMonthOption4ItemOption3)[] | "*"; /** * Full year. For example: 2024 */ year?: number | JobsUpdateRequestBodyScheduleCalendarsItemYearOption2 | JobsUpdateRequestBodyScheduleCalendarsItemYearOption3 | (number | JobsUpdateRequestBodyScheduleCalendarsItemYearOption4ItemOption2 | JobsUpdateRequestBodyScheduleCalendarsItemYearOption4ItemOption3)[] | "*"; /** * A comment to describe what the calendar is supposed to represent */ comment?: string; } export interface JobsUpdateRequestBodyScheduleCalendarsItemDayOfMonthOption2 { start: number; step: number; end: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemDayOfMonthOption3 { start: number; end?: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemDayOfMonthOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemDayOfMonthOption4ItemOption3 { start: number; end?: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemDayOfWeekOption2 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; step: number; end: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsUpdateRequestBodyScheduleCalendarsItemDayOfWeekOption3 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; end?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsUpdateRequestBodyScheduleCalendarsItemDayOfWeekOption4ItemOption2 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; step: number; end: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsUpdateRequestBodyScheduleCalendarsItemDayOfWeekOption4ItemOption3 { start: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; end?: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"; } export interface JobsUpdateRequestBodyScheduleCalendarsItemHourOption2 { start: number; step: number; end: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemHourOption3 { start: number; end?: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemHourOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemHourOption4ItemOption3 { start: number; end?: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemMinuteOption2 { start: number; step: number; end: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemMinuteOption3 { start: number; end?: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemMinuteOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemMinuteOption4ItemOption3 { start: number; end?: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemMonthOption2 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; step: number; end: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsUpdateRequestBodyScheduleCalendarsItemMonthOption3 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; end?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsUpdateRequestBodyScheduleCalendarsItemMonthOption4ItemOption2 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; step: number; end: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsUpdateRequestBodyScheduleCalendarsItemMonthOption4ItemOption3 { start: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; end?: "JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"; } export interface JobsUpdateRequestBodyScheduleCalendarsItemSecondOption2 { start: number; step: number; end: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemSecondOption3 { start: number; end?: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemSecondOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemSecondOption4ItemOption3 { start: number; end?: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemYearOption2 { start: number; step: number; end: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemYearOption3 { start: number; end?: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemYearOption4ItemOption2 { start: number; step: number; end: number; } export interface JobsUpdateRequestBodyScheduleCalendarsItemYearOption4ItemOption3 { start: number; end?: number; } /** * An interval object, which represents a period to trigger the job. The interval is relative to the [Unix epoch](https://en.wikipedia.org/wiki/Unix_time). */ export interface JobsUpdateRequestBodyScheduleIntervalsItem { every: number | string; } /** * Configuration for the S3 sink. */ export interface JobsUpdateRequestBodySinkS3SinkConfiguration { type: "s3"; /** * The name of the S3 bucket where the data will be stored. */ bucket: string; /** * The access key ID for the S3 bucket. */ accessKeyId: string; /** * The secret access key for the S3 bucket. */ secretAccessKey: string; /** * The region where the S3 bucket is located. */ region: string; /** * Optional prefix for the S3 objects. This can be used to organize objects within the bucket. */ prefix?: string; /** * If enabled, failed payload runs will ***not*** be written to the bucket. */ skipOnFail?: boolean; /** * List of API names to be sent to the S3 bucket. If not provided, all APIs will be sent. */ apisToSend?: string[]; /** * Optional custom endpoint for the S3 bucket. This can be used for S3-compatible services. */ endpoint?: string; /** * If true, the S3 client will use path-style URLs instead of virtual-hosted-style URLs. This is useful for S3-compatible services that require path-style access. */ forcePathStyle?: boolean; } /** * Configuration for the webhook sink. */ export interface JobsUpdateRequestBodySinkWebhookSinkConfiguration { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; /** * If true, the webhook will not be sent if the API execution fails. */ skipOnFail?: boolean; /** * List of API names to be sent to the webhook. If not provided, all APIs will be sent. */ apisToSend?: string[]; } export interface JobsUpdateResponse { /** * The ID of the updated job. */ id: string; message: "updated job successfully"; } export type OperationId = string; export type ProjectName = string; export type RunId = string; export interface RunResultResponse { /** * Unique identifier for the run, prefixed nanoId (ru_...) */ runId: string; /** * Status of the run execution */ status: "pending" | "started" | "completed" | "canceled" | "failed"; /** * Output result of the run execution */ result?: unknown; /** * Extended payloads from the run execution */ extendedPayloads?: RunResultResponseExtendedPayloadsItem[]; error?: RunResultResponseError; /** * Error or reason message */ message?: string; reason?: RunResultResponseReason; } export interface RunResultResponseError { /** * Error message describing the failure */ message: string; /** * Optional error code for more specific error identification */ code?: "internal-server-error" | "script-process-crashed" | "unexpected" | "script-process-crashed" | "script-execution-exception" | "script-no-valid-output-received" | "result-too-big-error" | "script-timeout" | "script-unexpected-error" | "auth-check-failed" | "all-attempts-failed" | "check-attempts-failed" | "create-attempts-failed" | "post-create-check-attempts-failed" | "api-attempts-failed" | "onepassword-integration-error" | "job-run-terminated"; category: "infrastructure" | "execution" | "auth" | "user" | "billing"; retirable?: boolean; /** * Optional URL to documentation for this error */ docUrl?: string; /** * Optional correlation ID for tracing the error in logs */ correlationId?: string; details?: unknown; } export interface RunResultResponseExtendedPayloadsItem { /** * The name of the API to be executed. This is the file path relative to the `api` folder inside your project. */ api: string; runId?: string; /** * The parameters to be passed to the API. */ parameters?: Record; } export interface RunResultResponseReason { type: "auth-session-validate-dependency-failed" | "terminated" | "job-run-paused" | "job-run-terminated" | "failed-to-initialize-job-run" | "api-access-disabled" | "cancelled-user-action"; message: string; /** * Optional URL to documentation for this error */ docUrl?: string; details?: unknown; } export interface RunStartRequestBody { /** * The parameters to be passed to the API. */ parameters: Record; /** * Proxy URL to be used for the API call. This is optional and can be used to route the API call through a proxy server. */ proxy?: string | null; saveTrace?: boolean; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Retry policy configurations in case of failure. */ retry?: RunStartRequestBodyRetry; /** * AuthSession config to be used with the run. This is a required field if the AuthSession is enabled on the project. */ authSession?: RunStartRequestBodyAuthSessionRuntimeBasedAuthSessionInput | RunStartRequestBodyAuthSessionCredentialsBasedAuthSessionInput; /** * Optional sink configuration for the run. Can be a webhook or S3 sink. */ sink?: RunStartRequestBodySinkWebhookSinkConfiguration | RunStartRequestBodySinkS3SinkConfiguration; /** * The name of the API to be executed. This is the file path relative to the `api` folder inside your project. */ api: string; } /** * Credentials based AuthSession config to be used with the run. This is a required field if the AuthSession is enabled on the project and uses credentials. */ export interface RunStartRequestBodyAuthSessionCredentialsBasedAuthSessionInput { /** * The ID of the AuthSession to use. */ id: string; /** * If true, the AuthSession will be automatically recreated if it is invalid or expired. */ autoRecreate?: boolean; /** * Number of attempts to check the validity of the AuthSession before recreating it. */ checkAttempts?: number; /** * Number of attempts to create a new AuthSession if the current one is invalid or expired. */ createAttempts?: number; /** * Proxy URL to be used for the API call. This is optional and can be used to route the API call through a proxy server. */ proxy?: string | null; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; } /** * Runtime based AuthSession config to be used with the run. This is a required field if the AuthSession is enabled on the project and uses runtime input. */ export interface RunStartRequestBodyAuthSessionRuntimeBasedAuthSessionInput { id?: string; autoRecreate?: true; /** * Number of attempts to check the validity of the AuthSession before recreating it. */ checkAttempts?: number; /** * Number of attempts to create a new AuthSession if the current one is invalid or expired. */ createAttempts?: number; /** * Proxy URL to be used for the API call. This is optional and can be used to route the API call through a proxy server. */ proxy?: string | null; /** * Timeout for the API request in seconds. Default is 10 minutes (600 seconds). */ requestTimeout?: number; /** * Runtime input to be used for the AuthSession. This is optional and can be used to pass dynamic values at runtime. */ runtimeInput: Record; } /** * Retry policy configurations in case of failure. */ export interface RunStartRequestBodyRetry { /** * Maximum number of attempts to retry the run in case of failure */ maximumAttempts?: number; } /** * Configuration for the S3 sink. */ export interface RunStartRequestBodySinkS3SinkConfiguration { type: "s3"; /** * The name of the S3 bucket where the data will be stored. */ bucket: string; /** * The access key ID for the S3 bucket. */ accessKeyId: string; /** * The secret access key for the S3 bucket. */ secretAccessKey: string; /** * The region where the S3 bucket is located. */ region: string; /** * Optional prefix for the S3 objects. This can be used to organize objects within the bucket. */ prefix?: string; /** * If enabled, failed payload runs will ***not*** be written to the bucket. */ skipOnFail?: boolean; /** * List of API names to be sent to the S3 bucket. If not provided, all APIs will be sent. */ apisToSend?: string[]; /** * Optional custom endpoint for the S3 bucket. This can be used for S3-compatible services. */ endpoint?: string; /** * If true, the S3 client will use path-style URLs instead of virtual-hosted-style URLs. This is useful for S3-compatible services that require path-style access. */ forcePathStyle?: boolean; } /** * Configuration for the webhook sink. */ export interface RunStartRequestBodySinkWebhookSinkConfiguration { type: "webhook"; /** * The URL to which the webhook will send the data. */ url: string; /** * Optional headers to be sent with the webhook request. */ headers?: Record; /** * If true, the webhook will not be sent if the API execution fails. */ skipOnFail?: boolean; /** * List of API names to be sent to the webhook. If not provided, all APIs will be sent. */ apisToSend?: string[]; } export interface RunStartResponse { /** * Unique identifier for the run, prefixed nanoId (ru_...) */ runId: string; status: "pending"; } export type WorkspaceId = string; //# sourceMappingURL=models.d.ts.map