Codehooks · Schema

Codehooks Queue Job

A job in the Codehooks asynchronous queue system. Jobs are enqueued to named topics and processed by registered worker functions.

BackendDatabaseEventsHooksJavaScriptNoSQLQueuesServerlessWebhooksWorkersWorkflows

Properties

Name Type Description
_id string Unique identifier of the enqueued job.
topic string The queue topic name the job belongs to.
payload object The job payload data to be processed by the worker function.
status string The current processing status of the job.
createdAt string Timestamp when the job was enqueued.
completedAt string Timestamp when the job finished processing.
View JSON Schema on GitHub

JSON Schema

codehooks-queue-job-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/codehooks/refs/heads/main/json-schema/codehooks-queue-job-schema.json",
  "title": "Codehooks Queue Job",
  "description": "A job in the Codehooks asynchronous queue system. Jobs are enqueued to named topics and processed by registered worker functions.",
  "type": "object",
  "properties": {
    "_id": {
      "type": "string",
      "description": "Unique identifier of the enqueued job."
    },
    "topic": {
      "type": "string",
      "description": "The queue topic name the job belongs to."
    },
    "payload": {
      "type": "object",
      "additionalProperties": true,
      "description": "The job payload data to be processed by the worker function."
    },
    "status": {
      "type": "string",
      "enum": ["pending", "processing", "completed", "failed"],
      "description": "The current processing status of the job."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the job was enqueued."
    },
    "completedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the job finished processing."
    }
  },
  "required": ["_id", "topic", "payload"],
  "additionalProperties": true,
  "examples": [
    {
      "_id": "job-64a1b2c3d4e5f600",
      "topic": "send-email",
      "payload": {
        "to": "[email protected]",
        "subject": "Welcome",
        "body": "Hello and welcome!"
      },
      "status": "pending",
      "createdAt": "2025-06-01T12:00:00.000Z"
    }
  ]
}