{"modulePath":"github.com/worklydev/workly","version":"v0.5.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\nPackage api provides primitives to interact with the openapi HTTP API.\n\nCode generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.\n\n## Constants\n\n```go\nconst CallbackQueue = store.CallbackQueue\n```\nCallbackQueue is the queue every callback goes to. Only Workly enqueues into it.\n\n```go\nconst WorkflowQueue = store.WorkflowQueue\n```\nWorkflowQueue is the queue workflow steps go to unless they name one.\n\n## Functions\n\n```go\nfunc DevEcho(secret []byte, logger *slog.Logger) http.Handler\n```\nDevEcho is a built-in delivery target for \\`workly dev\\`, so the quickstart and demos work without writing an endpoint first. Query parameters shape its response:\n\n\tstatus=503      respond with this status (default 200)\n\tfail_rate=0.3   respond 500 with this probability\n\tdelay_ms=2000   wait before responding\n\nIt verifies the delivery signature and echoes the request back.\n\n```go\nfunc Handler(si ServerInterface) http.Handler\n```\nHandler creates http.Handler with routing matching OpenAPI spec.\n\n```go\nfunc HandlerFromMux(si ServerInterface, m ServeMux) http.Handler\n```\nHandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.\n\n```go\nfunc HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler\n```\n\n```go\nfunc HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler\n```\nHandlerWithOptions creates http.Handler with additional options\n\n```go\nfunc LimitError(status int, code, message string) error\n```\nLimitError is an error an Admission returns to refuse a request; the client gets it as is, in the API's error shape.\n\n```go\nfunc NewHandler(opts Options) http.Handler\n```\nNewHandler builds the full HTTP handler: operational endpoints, the /v1 API and the dashboard.\n\n```go\nfunc QueueSettings(in QueueConfig) (store.QueueConfig, error)\n```\n\n```go\nfunc Reserved(queue string) bool\n```\nReserved reports whether a queue name is reserved for Workly's own queues. Queues with such names that users created before they were reserved keep working, but no new ones can be created.\n\n```go\nfunc ScheduleSettings(in ScheduleConfig, maxBody int64) (store.ScheduleConfig, error)\n```\n\n```go\nfunc SystemQueue(queue string) bool\n```\nSystemQueue reports whether a queue is one of Workly's own, which users can configure but only Workly enqueues into: \\_callbacks and \\_workflows.\n\n```go\nfunc ValidateName(kind, name string) error\n```\n\n```go\nfunc WorkflowSettings(in WorkflowConfig, maxBody int64) (store.WorkflowConfig, error)\n```\nWorkflowSettings validates a workflow definition as PutWorkflow does.\n\n## Types\n\n```go\ntype Activity struct {\n\tBucketSeconds int              `json:\"bucket_seconds\"`\n\tBuckets       []ActivityBucket `json:\"buckets\"`\n\tRange         ActivityRange    `json:\"range\"`\n\n\t// RetentionSeconds How long the server keeps finished tasks (`WORKLY_RETENTION`).\n\t// Absent if it keeps them forever.\n\tRetentionSeconds *float64 `json:\"retention_seconds,omitempty\"`\n}\n```\nActivity defines model for Activity.\n\n```go\ntype ActivityBucket struct {\n\t// Counts Tasks created in the bucket, by queue; queues with none are left out.\n\tCounts map[string]int `json:\"counts\"`\n\n\t// Failed Tasks of every queue that finished in the bucket and failed.\n\tFailed int       `json:\"failed\"`\n\tStart  time.Time `json:\"start\"`\n\n\t// Succeeded Tasks of every queue that finished in the bucket and succeeded.\n\tSucceeded int `json:\"succeeded\"`\n}\n```\nActivityBucket defines model for ActivityBucket.\n\n```go\ntype ActivityRange string\n```\nActivityRange defines model for Activity.Range.\n\n```go\nconst (\n\tActivityRangeN1h  ActivityRange = \"1h\"\n\tActivityRangeN24h ActivityRange = \"24h\"\n\tActivityRangeN7d  ActivityRange = \"7d\"\n)\n```\nDefines values for ActivityRange.\n\n```go\nfunc (e ActivityRange) Valid() bool\n```\nValid indicates whether the value is a known member of the ActivityRange enum.\n\n```go\ntype Admission interface {\n\t// AdmitTasks is called before up to n tasks are enqueued.\n\tAdmitTasks(ctx context.Context, ws workspace.ID, n int) error\n\t// AdmitSchedule is called before a schedule is created or replaced.\n\tAdmitSchedule(ctx context.Context, ws workspace.ID, s ScheduleAdmission) error\n}\n```\nAdmission lets a wrapping server limit what workspaces add, e.g. quotas on a hosted service. Workly itself sets no limits.\n\n```go\ntype AlertChannel struct {\n\tCreatedAt time.Time `json:\"created_at\"`\n\n\t// Id Example: ach_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId string `json:\"id\"`\n\n\t// Target The email address, or the Slack webhook URL with its secret part\n\t// hidden.\n\tTarget string           `json:\"target\"`\n\tType   AlertChannelType `json:\"type\"`\n}\n```\nAlertChannel defines model for AlertChannel.\n\n```go\ntype AlertChannelID = string\n```\nAlertChannelID defines model for AlertChannelID.\n\n```go\ntype AlertChannelList struct {\n\tChannels []AlertChannel `json:\"channels\"`\n\n\t// EmailEnabled Whether this server can send email, so email channels can be added.\n\tEmailEnabled bool `json:\"email_enabled\"`\n}\n```\nAlertChannelList defines model for AlertChannelList.\n\n```go\ntype AlertChannelType string\n```\nAlertChannelType defines model for AlertChannelType.\n\n```go\nconst (\n\tEmail AlertChannelType = \"email\"\n\tSlack AlertChannelType = \"slack\"\n)\n```\nDefines values for AlertChannelType.\n\n```go\nfunc (e AlertChannelType) Valid() bool\n```\nValid indicates whether the value is a known member of the AlertChannelType enum.\n\n```go\ntype Attempt struct {\n\tDurationMs int       `json:\"duration_ms\"`\n\tError      *string   `json:\"error,omitempty\"`\n\tFinishedAt time.Time `json:\"finished_at\"`\n\tId         string    `json:\"id\"`\n\tNumber     int       `json:\"number\"`\n\n\t// Outcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tOutcome Outcome `json:\"outcome\"`\n\n\t// ResponseBody The first 4 KB of the response body.\n\tResponseBody *string `json:\"response_body,omitempty\"`\n\n\t// ResponseHeaders Selected response headers (Content-Type, Retry-After, Location).\n\tResponseHeaders map[string]string `json:\"response_headers\"`\n\n\t// RetriedAt Set when the task or run was retried by hand between the previous\n\t// attempt and this one: when that happened. Absent for automatic\n\t// retries.\n\tRetriedAt *time.Time `json:\"retried_at,omitempty\"`\n\tStartedAt time.Time  `json:\"started_at\"`\n\n\t// StatusCode Absent if there was no response.\n\tStatusCode *int `json:\"status_code,omitempty\"`\n}\n```\nAttempt defines model for Attempt.\n\n```go\ntype AttemptList struct {\n\tAttempts []Attempt `json:\"attempts\"`\n}\n```\nAttemptList defines model for AttemptList.\n\n```go\ntype AutoPauseConfig struct {\n\tAfterFailures int `json:\"after_failures\"`\n}\n```\nAutoPauseConfig Pause the queue by itself when its endpoint looks down: after \\`after\\_failures\\` attempts in a row end with a 5xx, a timeout or a network error. Other 4xx responses, 429 and lost attempts don't count, and only a success resets the count. While auto-paused, tasks wait without using attempts, and one task at a time goes as a probe: 30 seconds after the pause, then after twice as long each time it fails, up to every 10 minutes. The first success resumes the queue. Resuming it by hand does too. Omit for no auto-pause. Not for queues whose tasks go to many endpoints, where one being down would hold up the rest; Workly's own queues can't have it.\n\n```go\ntype AutoPaused struct {\n\t// Error The error of the attempt that paused it, or of the latest failed probe.\n\tError string `json:\"error\"`\n\n\t// NextProbeAt When the next probe goes, unless one is in flight, in which case\n\t// its result sets the next. No probes go while the queue is also\n\t// paused by hand.\n\tNextProbeAt time.Time `json:\"next_probe_at\"`\n\n\t// Probes Probes that failed since it paused.\n\tProbes int `json:\"probes\"`\n\n\t// Since When it paused.\n\tSince time.Time `json:\"since\"`\n}\n```\nAutoPaused The queue paused itself after failures in a row (see \\`auto\\_pause\\`). Absent when it hasn't, or once it resumed.\n\n```go\ntype BatchEnqueueRequest struct {\n\tTasks []EnqueueRequest `json:\"tasks\"`\n}\n```\nBatchEnqueueRequest defines model for BatchEnqueueRequest.\n\n```go\ntype BatchEnqueueResponse struct {\n\tResults []BatchEnqueueResult `json:\"results\"`\n}\n```\nBatchEnqueueResponse defines model for BatchEnqueueResponse.\n\n```go\ntype BatchEnqueueResult struct {\n\t// Created False if a task with the same idempotency key already existed.\n\tCreated bool `json:\"created\"`\n\tTask    Task `json:\"task\"`\n}\n```\nBatchEnqueueResult defines model for BatchEnqueueResult.\n\n```go\ntype Callback struct {\n\t// Headers Headers sent with the callback. `Workly-*` headers are reserved.\n\tHeaders *map[string]string `json:\"headers,omitempty\"`\n\n\t// Url The http(s) URL to deliver the callback to.\n\t//\n\t// Example: https://api.example.com/jobs/refresh-views\n\tUrl string `json:\"url\"`\n}\n```\nCallback A task Workly enqueues when something completes: a \\`POST\\` to \\`url\\` whose JSON body says what completed (\\`TaskSummary\\` for a task, \\`RunSummary\\` for a schedule's run, \\`GroupSummary\\` for a group). Callbacks go to \\`\\_callbacks\\`, a queue Workly creates for them, and are delivered like any task in it, with its retries; its settings can be changed like any queue's.\n\nA task's or a schedule's callback is called each time the task or a run succeeds, fails or is cancelled, and again if it is retried by hand and finishes again; skipped runs don't call it. A group's is called once, when the group completes.\n\n```go\ntype CancelPendingResult struct {\n\t// Cancelled How many pending tasks were cancelled.\n\tCancelled int `json:\"cancelled\"`\n}\n```\nCancelPendingResult defines model for CancelPendingResult.\n\n```go\ntype CancelPendingTasks200JSONResponse CancelPendingResult\n```\n\n```go\nfunc (response CancelPendingTasks200JSONResponse) VisitCancelPendingTasksResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CancelPendingTasksRequestObject struct {\n\tQueue QueueName `json:\"queue\"`\n}\n```\n\n```go\ntype CancelPendingTasksResponseObject interface {\n\tVisitCancelPendingTasksResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype CancelPendingTasksdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response CancelPendingTasksdefaultJSONResponse) VisitCancelPendingTasksResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CancelRun200JSONResponse Run\n```\n\n```go\nfunc (response CancelRun200JSONResponse) VisitCancelRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CancelRunRequestObject struct {\n\tId RunID `json:\"id\"`\n}\n```\n\n```go\ntype CancelRunResponseObject interface {\n\tVisitCancelRunResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype CancelRundefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response CancelRundefaultJSONResponse) VisitCancelRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CancelTask200JSONResponse Task\n```\n\n```go\nfunc (response CancelTask200JSONResponse) VisitCancelTaskResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CancelTaskRequestObject struct {\n\tId TaskID `json:\"id\"`\n}\n```\n\n```go\ntype CancelTaskResponseObject interface {\n\tVisitCancelTaskResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype CancelTaskdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response CancelTaskdefaultJSONResponse) VisitCancelTaskResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CancelWorkflowRun200JSONResponse WorkflowRun\n```\n\n```go\nfunc (response CancelWorkflowRun200JSONResponse) VisitCancelWorkflowRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CancelWorkflowRunRequestObject struct {\n\tId WorkflowRunID `json:\"id\"`\n}\n```\n\n```go\ntype CancelWorkflowRunResponseObject interface {\n\tVisitCancelWorkflowRunResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype CancelWorkflowRundefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response CancelWorkflowRundefaultJSONResponse) VisitCancelWorkflowRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CloseGroup200JSONResponse Group\n```\n\n```go\nfunc (response CloseGroup200JSONResponse) VisitCloseGroupResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CloseGroupRequestObject struct {\n\tId GroupID `json:\"id\"`\n}\n```\n\n```go\ntype CloseGroupResponseObject interface {\n\tVisitCloseGroupResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype CloseGroupdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response CloseGroupdefaultJSONResponse) VisitCloseGroupResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CreateAlertChannel201JSONResponse AlertChannel\n```\n\n```go\nfunc (response CreateAlertChannel201JSONResponse) VisitCreateAlertChannelResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CreateAlertChannelJSONRequestBody = NewAlertChannel\n```\nCreateAlertChannelJSONRequestBody defines body for CreateAlertChannel for application/json ContentType.\n\n```go\ntype CreateAlertChannelRequestObject struct {\n\tBody *CreateAlertChannelJSONRequestBody\n}\n```\n\n```go\ntype CreateAlertChannelResponseObject interface {\n\tVisitCreateAlertChannelResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype CreateAlertChanneldefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response CreateAlertChanneldefaultJSONResponse) VisitCreateAlertChannelResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CreateGroup200JSONResponse Group\n```\n\n```go\nfunc (response CreateGroup200JSONResponse) VisitCreateGroupResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CreateGroup201JSONResponse Group\n```\n\n```go\nfunc (response CreateGroup201JSONResponse) VisitCreateGroupResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CreateGroupJSONRequestBody = NewGroup\n```\nCreateGroupJSONRequestBody defines body for CreateGroup for application/json ContentType.\n\n```go\ntype CreateGroupRequestObject struct {\n\tBody *CreateGroupJSONRequestBody\n}\n```\n\n```go\ntype CreateGroupResponseObject interface {\n\tVisitCreateGroupResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype CreateGroupdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response CreateGroupdefaultJSONResponse) VisitCreateGroupResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CreateTask200JSONResponse Task\n```\n\n```go\nfunc (response CreateTask200JSONResponse) VisitCreateTaskResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CreateTask201JSONResponse Task\n```\n\n```go\nfunc (response CreateTask201JSONResponse) VisitCreateTaskResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CreateTaskJSONRequestBody = EnqueueRequest\n```\nCreateTaskJSONRequestBody defines body for CreateTask for application/json ContentType.\n\n```go\ntype CreateTaskParams struct {\n\t// Traceparent W3C trace context, propagated on delivery.\n\tTraceparent *string `json:\"traceparent,omitempty\"`\n}\n```\nCreateTaskParams defines parameters for CreateTask.\n\n```go\ntype CreateTaskRequestObject struct {\n\tQueue  QueueName `json:\"queue\"`\n\tParams CreateTaskParams\n\tBody   *CreateTaskJSONRequestBody\n}\n```\n\n```go\ntype CreateTaskResponseObject interface {\n\tVisitCreateTaskResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype CreateTaskdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response CreateTaskdefaultJSONResponse) VisitCreateTaskResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CreateTasks200JSONResponse BatchEnqueueResponse\n```\n\n```go\nfunc (response CreateTasks200JSONResponse) VisitCreateTasksResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CreateTasksJSONRequestBody = BatchEnqueueRequest\n```\nCreateTasksJSONRequestBody defines body for CreateTasks for application/json ContentType.\n\n```go\ntype CreateTasksParams struct {\n\t// Traceparent W3C trace context, propagated on delivery of every task.\n\tTraceparent *string `json:\"traceparent,omitempty\"`\n}\n```\nCreateTasksParams defines parameters for CreateTasks.\n\n```go\ntype CreateTasksRequestObject struct {\n\tQueue  QueueName `json:\"queue\"`\n\tParams CreateTasksParams\n\tBody   *CreateTasksJSONRequestBody\n}\n```\n\n```go\ntype CreateTasksResponseObject interface {\n\tVisitCreateTasksResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype CreateTasksdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response CreateTasksdefaultJSONResponse) VisitCreateTasksResponse(w http.ResponseWriter) error\n```\n\n```go\ntype CronPreview struct {\n\t// IntervalSeconds The shortest time between two of its runs.\n\tIntervalSeconds int `json:\"interval_seconds\"`\n\n\t// NextRuns The next 5 runs, from now.\n\tNextRuns []time.Time `json:\"next_runs\"`\n\n\t// Spans With `from` and `until`: every run in the window, earliest first,\n\t// as runs at a fixed interval, so a schedule running every minute is\n\t// one span rather than thousands of times.\n\tSpans *[]CronSpan `json:\"spans,omitempty\"`\n}\n```\nCronPreview defines model for CronPreview.\n\n```go\ntype CronSpan struct {\n\tCount int `json:\"count\"`\n\n\t// EverySeconds 0 when `count` is 1.\n\tEverySeconds int       `json:\"every_seconds\"`\n\tStart        time.Time `json:\"start\"`\n}\n```\nCronSpan \\`count\\` runs, \\`every\\_seconds\\` apart, the first at \\`start\\`.\n\n```go\ntype Cursor = string\n```\nCursor defines model for Cursor.\n\n```go\ntype DeleteAlertChannel204Response struct {\n}\n```\n\n```go\nfunc (response DeleteAlertChannel204Response) VisitDeleteAlertChannelResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteAlertChannelRequestObject struct {\n\tId AlertChannelID `json:\"id\"`\n}\n```\n\n```go\ntype DeleteAlertChannelResponseObject interface {\n\tVisitDeleteAlertChannelResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype DeleteAlertChanneldefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response DeleteAlertChanneldefaultJSONResponse) VisitDeleteAlertChannelResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteQueue204Response struct {\n}\n```\n\n```go\nfunc (response DeleteQueue204Response) VisitDeleteQueueResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteQueueRequestObject struct {\n\tQueue QueueName `json:\"queue\"`\n}\n```\n\n```go\ntype DeleteQueueResponseObject interface {\n\tVisitDeleteQueueResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype DeleteQueuedefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response DeleteQueuedefaultJSONResponse) VisitDeleteQueueResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteSchedule204Response struct {\n}\n```\n\n```go\nfunc (response DeleteSchedule204Response) VisitDeleteScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteScheduleRequestObject struct {\n\tSchedule ScheduleName `json:\"schedule\"`\n}\n```\n\n```go\ntype DeleteScheduleResponseObject interface {\n\tVisitDeleteScheduleResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype DeleteScheduledefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response DeleteScheduledefaultJSONResponse) VisitDeleteScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteWorkflow204Response struct {\n}\n```\n\n```go\nfunc (response DeleteWorkflow204Response) VisitDeleteWorkflowResponse(w http.ResponseWriter) error\n```\n\n```go\ntype DeleteWorkflowRequestObject struct {\n\tWorkflow WorkflowName `json:\"workflow\"`\n}\n```\n\n```go\ntype DeleteWorkflowResponseObject interface {\n\tVisitDeleteWorkflowResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype DeleteWorkflowdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response DeleteWorkflowdefaultJSONResponse) VisitDeleteWorkflowResponse(w http.ResponseWriter) error\n```\n\n```go\ntype Delivery struct {\n\t// Body The body exactly as sent; the signature covers these bytes.\n\tBody string `json:\"body\"`\n\n\t// Headers Every header Workly sets, including the task's own.\n\tHeaders map[string]string `json:\"headers\"`\n\tMethod  HTTPMethod        `json:\"method\"`\n\tUrl     string            `json:\"url\"`\n}\n```\nDelivery defines model for Delivery.\n\n```go\ntype EnqueueRequest struct {\n\t// Body A raw text body. Use this or `payload`.\n\tBody *string `json:\"body,omitempty\"`\n\n\t// ContentType Content type of `body`. Defaults to `text/plain; charset=utf-8`.\n\tContentType *string `json:\"content_type,omitempty\"`\n\n\t// DelaySeconds Deliver after this delay. Use this or `run_at`.\n\tDelaySeconds *float64 `json:\"delay_seconds,omitempty\"`\n\n\t// GroupId Adds the task to this group, which must be open (`group_closed`\n\t// otherwise). A task enqueued again with the same\n\t// `idempotency_key` isn't added twice.\n\tGroupId *string `json:\"group_id,omitempty\"`\n\n\t// Headers Headers sent with every delivery. `Workly-*` headers are reserved.\n\tHeaders *map[string]string `json:\"headers,omitempty\"`\n\n\t// IdempotencyKey Deduplicates enqueues within the queue.\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\n\t// MaxAttempts Overrides the queue's `max_attempts`.\n\tMaxAttempts *int        `json:\"max_attempts,omitempty\"`\n\tMethod      *HTTPMethod `json:\"method,omitempty\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n\n\t// Payload A JSON body, sent with `Content-Type: application/json`. Use this or `body`.\n\tPayload *json.RawMessage `json:\"payload,omitempty\"`\n\n\t// RunAt Deliver at this time. Use this or `delay_seconds`.\n\tRunAt *time.Time `json:\"run_at,omitempty\"`\n\n\t// TimeoutSeconds Overrides the queue's `timeout_seconds`.\n\tTimeoutSeconds *float64 `json:\"timeout_seconds,omitempty\"`\n\n\t// Url The http(s) URL to deliver the task to.\n\t//\n\t// Example: https://api.example.com/send-email\n\tUrl string `json:\"url\"`\n}\n```\nEnqueueRequest defines model for EnqueueRequest.\n\n```go\ntype Error struct {\n\tError ErrorBody `json:\"error\"`\n}\n```\nError defines model for Error.\n\n```go\ntype ErrorBody struct {\n\t// Code Stable, machine-readable error code.\n\t//\n\t// Example: queue_not_found\n\tCode string `json:\"code\"`\n\n\t// Message Human-readable description.\n\tMessage string `json:\"message\"`\n}\n```\nErrorBody defines model for ErrorBody.\n\n```go\ntype ErrorJSONResponse Error\n```\n\n```go\ntype FailureGroup struct {\n\tCount int `json:\"count\"`\n\n\t// Error The tasks' `last_error`. Pass it as `last_error` to list or retry them.\n\tError        string    `json:\"error\"`\n\tLastFailedAt time.Time `json:\"last_failed_at\"`\n\n\t// LatestTaskId The most recently failed task in the group.\n\tLatestTaskId string `json:\"latest_task_id\"`\n\n\t// Outcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tOutcome *Outcome `json:\"outcome,omitempty\"`\n\n\t// ResponseBody The start (500 bytes) of the latest task's last response body, if it had one.\n\tResponseBody *string `json:\"response_body,omitempty\"`\n\n\t// StatusCode Absent if there was no response.\n\tStatusCode *int `json:\"status_code,omitempty\"`\n}\n```\nFailureGroup Failed tasks whose latest attempt ended the same way.\n\n```go\ntype GetActivity200JSONResponse Activity\n```\n\n```go\nfunc (response GetActivity200JSONResponse) VisitGetActivityResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetActivityParams struct {\n\tRange *GetActivityParamsRange `form:\"range,omitempty\" json:\"range,omitempty\"`\n}\n```\nGetActivityParams defines parameters for GetActivity.\n\n```go\ntype GetActivityParamsRange string\n```\nGetActivityParamsRange defines parameters for GetActivity.\n\n```go\nconst (\n\tGetActivityParamsRangeN1h  GetActivityParamsRange = \"1h\"\n\tGetActivityParamsRangeN24h GetActivityParamsRange = \"24h\"\n\tGetActivityParamsRangeN7d  GetActivityParamsRange = \"7d\"\n)\n```\nDefines values for GetActivityParamsRange.\n\n```go\nfunc (e GetActivityParamsRange) Valid() bool\n```\nValid indicates whether the value is a known member of the GetActivityParamsRange enum.\n\n```go\ntype GetActivityRequestObject struct {\n\tParams GetActivityParams\n}\n```\n\n```go\ntype GetActivityResponseObject interface {\n\tVisitGetActivityResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetActivitydefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetActivitydefaultJSONResponse) VisitGetActivityResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetGroup200JSONResponse Group\n```\n\n```go\nfunc (response GetGroup200JSONResponse) VisitGetGroupResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetGroupRequestObject struct {\n\tId GroupID `json:\"id\"`\n}\n```\n\n```go\ntype GetGroupResponseObject interface {\n\tVisitGetGroupResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetGroupdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetGroupdefaultJSONResponse) VisitGetGroupResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetHealthz200JSONResponse Health\n```\n\n```go\nfunc (response GetHealthz200JSONResponse) VisitGetHealthzResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetHealthzRequestObject struct {\n}\n```\n\n```go\ntype GetHealthzResponseObject interface {\n\tVisitGetHealthzResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetQueue200JSONResponse Queue\n```\n\n```go\nfunc (response GetQueue200JSONResponse) VisitGetQueueResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetQueueActivity200JSONResponse QueueActivity\n```\n\n```go\nfunc (response GetQueueActivity200JSONResponse) VisitGetQueueActivityResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetQueueActivityParams struct {\n\t// Since Defaults to 7 days ago.\n\tSince *time.Time `form:\"since,omitempty\" json:\"since,omitempty\"`\n}\n```\nGetQueueActivityParams defines parameters for GetQueueActivity.\n\n```go\ntype GetQueueActivityRequestObject struct {\n\tQueue  QueueName `json:\"queue\"`\n\tParams GetQueueActivityParams\n}\n```\n\n```go\ntype GetQueueActivityResponseObject interface {\n\tVisitGetQueueActivityResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetQueueActivitydefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetQueueActivitydefaultJSONResponse) VisitGetQueueActivityResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetQueueFailures200JSONResponse QueueFailures\n```\n\n```go\nfunc (response GetQueueFailures200JSONResponse) VisitGetQueueFailuresResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetQueueFailuresParams struct {\n\t// Limit How many groups to return.\n\tLimit *int `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nGetQueueFailuresParams defines parameters for GetQueueFailures.\n\n```go\ntype GetQueueFailuresRequestObject struct {\n\tQueue  QueueName `json:\"queue\"`\n\tParams GetQueueFailuresParams\n}\n```\n\n```go\ntype GetQueueFailuresResponseObject interface {\n\tVisitGetQueueFailuresResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetQueueFailuresdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetQueueFailuresdefaultJSONResponse) VisitGetQueueFailuresResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetQueueRequestObject struct {\n\tQueue QueueName `json:\"queue\"`\n}\n```\n\n```go\ntype GetQueueResponseObject interface {\n\tVisitGetQueueResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetQueuedefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetQueuedefaultJSONResponse) VisitGetQueueResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetReadyz200JSONResponse Health\n```\n\n```go\nfunc (response GetReadyz200JSONResponse) VisitGetReadyzResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetReadyz503JSONResponse Error\n```\n\n```go\nfunc (response GetReadyz503JSONResponse) VisitGetReadyzResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetReadyzRequestObject struct {\n}\n```\n\n```go\ntype GetReadyzResponseObject interface {\n\tVisitGetReadyzResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetRun200JSONResponse Run\n```\n\n```go\nfunc (response GetRun200JSONResponse) VisitGetRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetRunDelivery200JSONResponse Delivery\n```\n\n```go\nfunc (response GetRunDelivery200JSONResponse) VisitGetRunDeliveryResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetRunDeliveryRequestObject struct {\n\tId RunID `json:\"id\"`\n}\n```\n\n```go\ntype GetRunDeliveryResponseObject interface {\n\tVisitGetRunDeliveryResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetRunDeliverydefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetRunDeliverydefaultJSONResponse) VisitGetRunDeliveryResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetRunRequestObject struct {\n\tId RunID `json:\"id\"`\n}\n```\n\n```go\ntype GetRunResponseObject interface {\n\tVisitGetRunResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetRundefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetRundefaultJSONResponse) VisitGetRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetSchedule200JSONResponse Schedule\n```\n\n```go\nfunc (response GetSchedule200JSONResponse) VisitGetScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetScheduleRequestObject struct {\n\tSchedule ScheduleName `json:\"schedule\"`\n}\n```\n\n```go\ntype GetScheduleResponseObject interface {\n\tVisitGetScheduleResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetScheduledefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetScheduledefaultJSONResponse) VisitGetScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetTask200JSONResponse Task\n```\n\n```go\nfunc (response GetTask200JSONResponse) VisitGetTaskResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetTaskDelivery200JSONResponse Delivery\n```\n\n```go\nfunc (response GetTaskDelivery200JSONResponse) VisitGetTaskDeliveryResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetTaskDeliveryRequestObject struct {\n\tId TaskID `json:\"id\"`\n}\n```\n\n```go\ntype GetTaskDeliveryResponseObject interface {\n\tVisitGetTaskDeliveryResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetTaskDeliverydefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetTaskDeliverydefaultJSONResponse) VisitGetTaskDeliveryResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetTaskRequestObject struct {\n\tId TaskID `json:\"id\"`\n}\n```\n\n```go\ntype GetTaskResponseObject interface {\n\tVisitGetTaskResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetTaskdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetTaskdefaultJSONResponse) VisitGetTaskResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetWorkflow200JSONResponse Workflow\n```\n\n```go\nfunc (response GetWorkflow200JSONResponse) VisitGetWorkflowResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetWorkflowRequestObject struct {\n\tWorkflow WorkflowName `json:\"workflow\"`\n}\n```\n\n```go\ntype GetWorkflowResponseObject interface {\n\tVisitGetWorkflowResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetWorkflowRun200JSONResponse WorkflowRun\n```\n\n```go\nfunc (response GetWorkflowRun200JSONResponse) VisitGetWorkflowRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetWorkflowRunRequestObject struct {\n\tId WorkflowRunID `json:\"id\"`\n}\n```\n\n```go\ntype GetWorkflowRunResponseObject interface {\n\tVisitGetWorkflowRunResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype GetWorkflowRundefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetWorkflowRundefaultJSONResponse) VisitGetWorkflowRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype GetWorkflowdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response GetWorkflowdefaultJSONResponse) VisitGetWorkflowResponse(w http.ResponseWriter) error\n```\n\n```go\ntype Group struct {\n\t// CallbackTaskId The callback task, once the group has completed.\n\tCallbackTaskId *string    `json:\"callback_task_id,omitempty\"`\n\tCancelled      int        `json:\"cancelled\"`\n\tClosedAt       *time.Time `json:\"closed_at,omitempty\"`\n\tCreatedAt      time.Time  `json:\"created_at\"`\n\tFailed         int        `json:\"failed\"`\n\n\t// FinishedAt When the group completed.\n\tFinishedAt *time.Time `json:\"finished_at,omitempty\"`\n\n\t// Id Example: grp_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId             string  `json:\"id\"`\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\tName           *string `json:\"name,omitempty\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n\n\t// Remaining Tasks still pending or running.\n\tRemaining int `json:\"remaining\"`\n\n\t// Status `open`: accepting tasks. `running`: closed, with tasks still to\n\t// finish. `succeeded`: every task succeeded. `failed`: every task\n\t// finished and at least one failed or was cancelled. Completed groups\n\t// (`succeeded` and `failed`) don't change again, even if a task in\n\t// them is retried.\n\tStatus    GroupStatus `json:\"status\"`\n\tSucceeded int         `json:\"succeeded\"`\n\n\t// Total Tasks enqueued into the group (less those whose queue was deleted).\n\tTotal int `json:\"total\"`\n}\n```\nGroup defines model for Group.\n\n```go\ntype GroupID = string\n```\nGroupID defines model for GroupID.\n\n```go\ntype GroupList struct {\n\tGroups []Group `json:\"groups\"`\n\n\t// NextCursor Pass as `cursor` to get the next page. Absent on the last page.\n\tNextCursor *string `json:\"next_cursor,omitempty\"`\n}\n```\nGroupList defines model for GroupList.\n\n```go\ntype GroupStatus string\n```\nGroupStatus \\`open\\`: accepting tasks. \\`running\\`: closed, with tasks still to finish. \\`succeeded\\`: every task succeeded. \\`failed\\`: every task finished and at least one failed or was cancelled. Completed groups (\\`succeeded\\` and \\`failed\\`) don't change again, even if a task in them is retried.\n\n```go\nconst (\n\tGroupStatusFailed    GroupStatus = \"failed\"\n\tGroupStatusOpen      GroupStatus = \"open\"\n\tGroupStatusRunning   GroupStatus = \"running\"\n\tGroupStatusSucceeded GroupStatus = \"succeeded\"\n)\n```\nDefines values for GroupStatus.\n\n```go\nfunc (e GroupStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the GroupStatus enum.\n\n```go\ntype HTTPMethod string\n```\nHTTPMethod defines model for HTTPMethod.\n\n```go\nconst (\n\tDELETE HTTPMethod = \"DELETE\"\n\tGET    HTTPMethod = \"GET\"\n\tPATCH  HTTPMethod = \"PATCH\"\n\tPOST   HTTPMethod = \"POST\"\n\tPUT    HTTPMethod = \"PUT\"\n)\n```\nDefines values for HTTPMethod.\n\n```go\nfunc (e HTTPMethod) Valid() bool\n```\nValid indicates whether the value is a known member of the HTTPMethod enum.\n\n```go\ntype Handlers struct {\n\tStore            store.Store\n\tAutoCreateQueues bool\n\tMaxPayloadBytes  int64\n\tMetrics          *metrics.Workly\n\tSigner           dispatch.Signer\n\tRetention        time.Duration\n\t// WorkspaceRetention, if set, gives some workspaces their own retention.\n\tWorkspaceRetention func(ctx context.Context) (map[workspace.ID]time.Duration, error)\n\t// Admission, if set, may refuse new tasks and schedules.\n\tAdmission Admission\n\t// Alerts sends test alerts and says whether email can be sent.\n\tAlerts *alert.Sender\n}\n```\nHandlers implements StrictServerInterface, generated from api/openapi.yaml.\n\n```go\nfunc (h Handlers) CancelPendingTasks(ctx context.Context, req CancelPendingTasksRequestObject) (CancelPendingTasksResponseObject, error)\n```\n\n```go\nfunc (h Handlers) CancelRun(ctx context.Context, req CancelRunRequestObject) (CancelRunResponseObject, error)\n```\n\n```go\nfunc (h Handlers) CancelTask(ctx context.Context, req CancelTaskRequestObject) (CancelTaskResponseObject, error)\n```\n\n```go\nfunc (h Handlers) CancelWorkflowRun(ctx context.Context, req CancelWorkflowRunRequestObject) (CancelWorkflowRunResponseObject, error)\n```\n\n```go\nfunc (h Handlers) CloseGroup(ctx context.Context, req CloseGroupRequestObject) (CloseGroupResponseObject, error)\n```\n\n```go\nfunc (h Handlers) CreateAlertChannel(ctx context.Context, req CreateAlertChannelRequestObject) (CreateAlertChannelResponseObject, error)\n```\n\n```go\nfunc (h Handlers) CreateGroup(ctx context.Context, req CreateGroupRequestObject) (CreateGroupResponseObject, error)\n```\n\n```go\nfunc (h Handlers) CreateTask(ctx context.Context, req CreateTaskRequestObject) (CreateTaskResponseObject, error)\n```\n\n```go\nfunc (h Handlers) CreateTasks(ctx context.Context, req CreateTasksRequestObject) (CreateTasksResponseObject, error)\n```\n\n```go\nfunc (h Handlers) DeleteAlertChannel(ctx context.Context, req DeleteAlertChannelRequestObject) (DeleteAlertChannelResponseObject, error)\n```\n\n```go\nfunc (h Handlers) DeleteQueue(ctx context.Context, req DeleteQueueRequestObject) (DeleteQueueResponseObject, error)\n```\n\n```go\nfunc (h Handlers) DeleteSchedule(ctx context.Context, req DeleteScheduleRequestObject) (DeleteScheduleResponseObject, error)\n```\n\n```go\nfunc (h Handlers) DeleteWorkflow(ctx context.Context, req DeleteWorkflowRequestObject) (DeleteWorkflowResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetActivity(ctx context.Context, req GetActivityRequestObject) (GetActivityResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetGroup(ctx context.Context, req GetGroupRequestObject) (GetGroupResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetHealthz(ctx context.Context, _ GetHealthzRequestObject) (GetHealthzResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetQueue(ctx context.Context, req GetQueueRequestObject) (GetQueueResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetQueueActivity(ctx context.Context, req GetQueueActivityRequestObject) (GetQueueActivityResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetQueueFailures(ctx context.Context, req GetQueueFailuresRequestObject) (GetQueueFailuresResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetReadyz(ctx context.Context, _ GetReadyzRequestObject) (GetReadyzResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetRun(ctx context.Context, req GetRunRequestObject) (GetRunResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetRunDelivery(ctx context.Context, req GetRunDeliveryRequestObject) (GetRunDeliveryResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetSchedule(ctx context.Context, req GetScheduleRequestObject) (GetScheduleResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetTask(ctx context.Context, req GetTaskRequestObject) (GetTaskResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetTaskDelivery(ctx context.Context, req GetTaskDeliveryRequestObject) (GetTaskDeliveryResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetWorkflow(ctx context.Context, req GetWorkflowRequestObject) (GetWorkflowResponseObject, error)\n```\n\n```go\nfunc (h Handlers) GetWorkflowRun(ctx context.Context, req GetWorkflowRunRequestObject) (GetWorkflowRunResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ListAlertChannels(ctx context.Context, _ ListAlertChannelsRequestObject) (ListAlertChannelsResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ListAttempts(ctx context.Context, req ListAttemptsRequestObject) (ListAttemptsResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ListGroups(ctx context.Context, req ListGroupsRequestObject) (ListGroupsResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ListQueues(ctx context.Context, _ ListQueuesRequestObject) (ListQueuesResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ListRunAttempts(ctx context.Context, req ListRunAttemptsRequestObject) (ListRunAttemptsResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ListRuns(ctx context.Context, req ListRunsRequestObject) (ListRunsResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ListSchedules(ctx context.Context, _ ListSchedulesRequestObject) (ListSchedulesResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ListTasks(ctx context.Context, req ListTasksRequestObject) (ListTasksResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ListWorkflowRuns(ctx context.Context, req ListWorkflowRunsRequestObject) (ListWorkflowRunsResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ListWorkflows(ctx context.Context, _ ListWorkflowsRequestObject) (ListWorkflowsResponseObject, error)\n```\n\n```go\nfunc (h Handlers) PauseQueue(ctx context.Context, req PauseQueueRequestObject) (PauseQueueResponseObject, error)\n```\n\n```go\nfunc (h Handlers) PauseSchedule(ctx context.Context, req PauseScheduleRequestObject) (PauseScheduleResponseObject, error)\n```\n\n```go\nfunc (h Handlers) PreviewCron(ctx context.Context, req PreviewCronRequestObject) (PreviewCronResponseObject, error)\n```\n\n```go\nfunc (h Handlers) PutQueue(ctx context.Context, req PutQueueRequestObject) (PutQueueResponseObject, error)\n```\n\n```go\nfunc (h Handlers) PutSchedule(ctx context.Context, req PutScheduleRequestObject) (PutScheduleResponseObject, error)\n```\n\n```go\nfunc (h Handlers) PutWorkflow(ctx context.Context, req PutWorkflowRequestObject) (PutWorkflowResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ResumeQueue(ctx context.Context, req ResumeQueueRequestObject) (ResumeQueueResponseObject, error)\n```\n\n```go\nfunc (h Handlers) ResumeSchedule(ctx context.Context, req ResumeScheduleRequestObject) (ResumeScheduleResponseObject, error)\n```\n\n```go\nfunc (h Handlers) RetryFailedTasks(ctx context.Context, req RetryFailedTasksRequestObject) (RetryFailedTasksResponseObject, error)\n```\n\n```go\nfunc (h Handlers) RetryRun(ctx context.Context, req RetryRunRequestObject) (RetryRunResponseObject, error)\n```\n\n```go\nfunc (h Handlers) RetryTask(ctx context.Context, req RetryTaskRequestObject) (RetryTaskResponseObject, error)\n```\n\n```go\nfunc (h Handlers) RetryWorkflowRun(ctx context.Context, req RetryWorkflowRunRequestObject) (RetryWorkflowRunResponseObject, error)\n```\nRetryWorkflowRun reopens a stopped run. It reuses the steps' tasks, as retrying a task does, so like that it isn't subject to admission.\n\n```go\nfunc (h Handlers) SearchTasks(ctx context.Context, req SearchTasksRequestObject) (SearchTasksResponseObject, error)\n```\n\n```go\nfunc (h Handlers) StartWorkflowRun(ctx context.Context, req StartWorkflowRunRequestObject) (StartWorkflowRunResponseObject, error)\n```\n\n```go\nfunc (h Handlers) TestAlertChannel(ctx context.Context, req TestAlertChannelRequestObject) (TestAlertChannelResponseObject, error)\n```\n\n```go\nfunc (h Handlers) TriggerSchedule(ctx context.Context, req TriggerScheduleRequestObject) (TriggerScheduleResponseObject, error)\n```\n\n```go\ntype Health struct {\n\t// Status Example: ok\n\tStatus string `json:\"status\"`\n}\n```\nHealth defines model for Health.\n\n```go\ntype InvalidParamFormatError struct {\n\tParamName string\n\tErr       error\n}\n```\n\n```go\nfunc (e *InvalidParamFormatError) Error() string\n```\n\n```go\nfunc (e *InvalidParamFormatError) Unwrap() error\n```\n\n```go\ntype LastError = string\n```\nLastError defines model for LastError.\n\n```go\ntype LastRun struct {\n\tFinishedAt   *time.Time `json:\"finished_at,omitempty\"`\n\tId           string     `json:\"id\"`\n\tLastError    *string    `json:\"last_error,omitempty\"`\n\tLastStatus   *int       `json:\"last_status,omitempty\"`\n\tScheduledFor time.Time  `json:\"scheduled_for\"`\n\n\t// State A `skipped` run was never delivered: see `skip_reason`. It can be\n\t// retried to deliver it now.\n\tState RunState `json:\"state\"`\n\n\t// Trigger `schedule` for a cron slot, `manual` for \"run now\".\n\tTrigger RunTrigger `json:\"trigger\"`\n\n\t// WorkflowRunId The workflow run it started, for a schedule that starts a workflow.\n\tWorkflowRunId     *string            `json:\"workflow_run_id,omitempty\"`\n\tWorkflowRunStatus *WorkflowRunStatus `json:\"workflow_run_status,omitempty\"`\n}\n```\nLastRun The schedule's most recent run. Absent before the first.\n\n```go\ntype Limit = int\n```\nLimit defines model for Limit.\n\n```go\ntype ListAlertChannels200JSONResponse AlertChannelList\n```\n\n```go\nfunc (response ListAlertChannels200JSONResponse) VisitListAlertChannelsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListAlertChannelsRequestObject struct {\n}\n```\n\n```go\ntype ListAlertChannelsResponseObject interface {\n\tVisitListAlertChannelsResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ListAlertChannelsdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ListAlertChannelsdefaultJSONResponse) VisitListAlertChannelsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListAttempts200JSONResponse AttemptList\n```\n\n```go\nfunc (response ListAttempts200JSONResponse) VisitListAttemptsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListAttemptsRequestObject struct {\n\tId TaskID `json:\"id\"`\n}\n```\n\n```go\ntype ListAttemptsResponseObject interface {\n\tVisitListAttemptsResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ListAttemptsdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ListAttemptsdefaultJSONResponse) VisitListAttemptsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListGroups200JSONResponse GroupList\n```\n\n```go\nfunc (response ListGroups200JSONResponse) VisitListGroupsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListGroupsParams struct {\n\tStatus *GroupStatus `form:\"status,omitempty\" json:\"status,omitempty\"`\n\tName   *string      `form:\"name,omitempty\" json:\"name,omitempty\"`\n\n\t// Cursor The `next_cursor` of the previous page, requested with the same\n\t// filters and order.\n\tCursor *Cursor `form:\"cursor,omitempty\" json:\"cursor,omitempty\"`\n\tLimit  *Limit  `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nListGroupsParams defines parameters for ListGroups.\n\n```go\ntype ListGroupsRequestObject struct {\n\tParams ListGroupsParams\n}\n```\n\n```go\ntype ListGroupsResponseObject interface {\n\tVisitListGroupsResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ListGroupsdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ListGroupsdefaultJSONResponse) VisitListGroupsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListQueues200JSONResponse QueueList\n```\n\n```go\nfunc (response ListQueues200JSONResponse) VisitListQueuesResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListQueuesRequestObject struct {\n}\n```\n\n```go\ntype ListQueuesResponseObject interface {\n\tVisitListQueuesResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ListQueuesdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ListQueuesdefaultJSONResponse) VisitListQueuesResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListRunAttempts200JSONResponse AttemptList\n```\n\n```go\nfunc (response ListRunAttempts200JSONResponse) VisitListRunAttemptsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListRunAttemptsRequestObject struct {\n\tId RunID `json:\"id\"`\n}\n```\n\n```go\ntype ListRunAttemptsResponseObject interface {\n\tVisitListRunAttemptsResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ListRunAttemptsdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ListRunAttemptsdefaultJSONResponse) VisitListRunAttemptsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListRuns200JSONResponse RunList\n```\n\n```go\nfunc (response ListRuns200JSONResponse) VisitListRunsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListRunsParams struct {\n\t// Schedule Only this schedule's runs.\n\tSchedule *string   `form:\"schedule,omitempty\" json:\"schedule,omitempty\"`\n\tState    *RunState `form:\"state,omitempty\" json:\"state,omitempty\"`\n\n\t// Cursor The `next_cursor` of the previous page, requested with the same\n\t// filters and order.\n\tCursor *Cursor `form:\"cursor,omitempty\" json:\"cursor,omitempty\"`\n\tLimit  *Limit  `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nListRunsParams defines parameters for ListRuns.\n\n```go\ntype ListRunsRequestObject struct {\n\tParams ListRunsParams\n}\n```\n\n```go\ntype ListRunsResponseObject interface {\n\tVisitListRunsResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ListRunsdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ListRunsdefaultJSONResponse) VisitListRunsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListSchedules200JSONResponse ScheduleList\n```\n\n```go\nfunc (response ListSchedules200JSONResponse) VisitListSchedulesResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListSchedulesRequestObject struct {\n}\n```\n\n```go\ntype ListSchedulesResponseObject interface {\n\tVisitListSchedulesResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ListSchedulesdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ListSchedulesdefaultJSONResponse) VisitListSchedulesResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListTasks200JSONResponse TaskList\n```\n\n```go\nfunc (response ListTasks200JSONResponse) VisitListTasksResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListTasksParams struct {\n\tState *TaskState `form:\"state,omitempty\" json:\"state,omitempty\"`\n\n\t// LastError Only tasks whose latest error is exactly this.\n\tLastError *LastError `form:\"last_error,omitempty\" json:\"last_error,omitempty\"`\n\n\t// Sort What to order tasks by:\n\t//\n\t// - `created_at` (the default): when the task was enqueued.\n\t// - `run_at`: when it runs next. Pending tasks are delivered in this\n\t//   order, so ascending lists them as they'll run.\n\t// - `last_attempt_at`: when its latest attempt finished. Tasks never\n\t//   attempted count as oldest.\n\t// - `attempt_count`: how many attempts it has had.\n\t//\n\t// Ties are broken by task ID.\n\tSort *ListTasksParamsSort `form:\"sort,omitempty\" json:\"sort,omitempty\"`\n\n\t// Order `asc` or `desc`. Defaults to `asc` (soonest first) for `run_at` and\n\t// to `desc` (newest or most first) for the rest.\n\tOrder *ListTasksParamsOrder `form:\"order,omitempty\" json:\"order,omitempty\"`\n\n\t// Cursor The `next_cursor` of the previous page, requested with the same\n\t// filters and order.\n\tCursor *Cursor `form:\"cursor,omitempty\" json:\"cursor,omitempty\"`\n\tLimit  *Limit  `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nListTasksParams defines parameters for ListTasks.\n\n```go\ntype ListTasksParamsOrder string\n```\nListTasksParamsOrder defines parameters for ListTasks.\n\n```go\nconst (\n\tListTasksParamsOrderAsc  ListTasksParamsOrder = \"asc\"\n\tListTasksParamsOrderDesc ListTasksParamsOrder = \"desc\"\n)\n```\nDefines values for ListTasksParamsOrder.\n\n```go\nfunc (e ListTasksParamsOrder) Valid() bool\n```\nValid indicates whether the value is a known member of the ListTasksParamsOrder enum.\n\n```go\ntype ListTasksParamsSort string\n```\nListTasksParamsSort defines parameters for ListTasks.\n\n```go\nconst (\n\tListTasksParamsSortAttemptCount  ListTasksParamsSort = \"attempt_count\"\n\tListTasksParamsSortCreatedAt     ListTasksParamsSort = \"created_at\"\n\tListTasksParamsSortLastAttemptAt ListTasksParamsSort = \"last_attempt_at\"\n\tListTasksParamsSortRunAt         ListTasksParamsSort = \"run_at\"\n)\n```\nDefines values for ListTasksParamsSort.\n\n```go\nfunc (e ListTasksParamsSort) Valid() bool\n```\nValid indicates whether the value is a known member of the ListTasksParamsSort enum.\n\n```go\ntype ListTasksRequestObject struct {\n\tQueue  QueueName `json:\"queue\"`\n\tParams ListTasksParams\n}\n```\n\n```go\ntype ListTasksResponseObject interface {\n\tVisitListTasksResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ListTasksdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ListTasksdefaultJSONResponse) VisitListTasksResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListWorkflowRuns200JSONResponse WorkflowRunList\n```\n\n```go\nfunc (response ListWorkflowRuns200JSONResponse) VisitListWorkflowRunsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListWorkflowRunsParams struct {\n\t// Workflow Only this workflow's runs.\n\tWorkflow *string            `form:\"workflow,omitempty\" json:\"workflow,omitempty\"`\n\tStatus   *WorkflowRunStatus `form:\"status,omitempty\" json:\"status,omitempty\"`\n\n\t// Cursor The `next_cursor` of the previous page, requested with the same\n\t// filters and order.\n\tCursor *Cursor `form:\"cursor,omitempty\" json:\"cursor,omitempty\"`\n\tLimit  *Limit  `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nListWorkflowRunsParams defines parameters for ListWorkflowRuns.\n\n```go\ntype ListWorkflowRunsRequestObject struct {\n\tParams ListWorkflowRunsParams\n}\n```\n\n```go\ntype ListWorkflowRunsResponseObject interface {\n\tVisitListWorkflowRunsResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ListWorkflowRunsdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ListWorkflowRunsdefaultJSONResponse) VisitListWorkflowRunsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListWorkflows200JSONResponse WorkflowList\n```\n\n```go\nfunc (response ListWorkflows200JSONResponse) VisitListWorkflowsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ListWorkflowsRequestObject struct {\n}\n```\n\n```go\ntype ListWorkflowsResponseObject interface {\n\tVisitListWorkflowsResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ListWorkflowsdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ListWorkflowsdefaultJSONResponse) VisitListWorkflowsResponse(w http.ResponseWriter) error\n```\n\n```go\ntype MiddlewareFunc func(http.Handler) http.Handler\n```\n\n```go\ntype MissedPolicy string\n```\nMissedPolicy What happens to slots missed while the server was down (a slot is missed if it can't fire within a minute). \\`skip\\` records the most recent missed slot as a \\`skipped\\` run; \\`catch\\_up\\` runs it. Either way, at most one run is created for the missed slots.\n\n```go\nconst (\n\tMissedPolicyCatchUp MissedPolicy = \"catch_up\"\n\tMissedPolicySkip    MissedPolicy = \"skip\"\n)\n```\nDefines values for MissedPolicy.\n\n```go\nfunc (e MissedPolicy) Valid() bool\n```\nValid indicates whether the value is a known member of the MissedPolicy enum.\n\n```go\ntype NewAlertChannel struct {\n\t// Target An email address, or a Slack incoming webhook URL.\n\t//\n\t// Example: oncall@example.com\n\tTarget string           `json:\"target\"`\n\tType   AlertChannelType `json:\"type\"`\n}\n```\nNewAlertChannel defines model for NewAlertChannel.\n\n```go\ntype NewGroup struct {\n\t// IdempotencyKey Deduplicates group creation within the workspace.\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\n\t// Name A label, e.g. the job the group is one run of. Names needn't be unique.\n\t//\n\t// Example: daily-stock-prices\n\tName *string `json:\"name,omitempty\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n}\n```\nNewGroup defines model for NewGroup.\n\n```go\ntype Options struct {\n\tStore            store.Store\n\tResolver         workspace.Resolver\n\tLogger           *slog.Logger\n\tDashboard        http.Handler\n\tAutoCreateQueues bool\n\t// MaxPayloadBytes limits task bodies.\n\tMaxPayloadBytes int64\n\t// DevEcho, if set, is served at /_dev/echo (`workly dev` only).\n\tDevEcho http.Handler\n\t// Metrics counts enqueues; it defaults to a private set.\n\tMetrics *metrics.Workly\n\t// ServeMetrics serves Metrics at /metrics, behind the same credentials\n\t// as /v1.\n\tServeMetrics bool\n\t// Retention is how long finished tasks are kept; 0 is forever.\n\tRetention time.Duration\n\t// WorkspaceRetention, if set, gives some workspaces their own retention.\n\tWorkspaceRetention func(ctx context.Context) (map[workspace.ID]time.Duration, error)\n\t// Signer builds the requests shown by GET /v1/tasks/{id}/delivery.\n\tSigner dispatch.Signer\n\t// MCP sets which tools /mcp serves; mcp.Off doesn't serve it.\n\tMCP mcp.Mode\n\t// MCPModeFor, if set, can make an /mcp request read-only (see mcp.Options).\n\tMCPModeFor func(*http.Request) mcp.Mode\n\t// MCPResourceMetadata, if set, is the URL of /mcp's OAuth protected\n\t// resource metadata (RFC 9728), named in the WWW-Authenticate header of\n\t// its 401s so MCP clients can find where to get a token.\n\tMCPResourceMetadata string\n\t// Version is reported to MCP clients.\n\tVersion string\n\t// Admission, if set, may refuse new tasks and schedules.\n\tAdmission Admission\n\t// Alerts sends test alerts; it defaults to one that can't send email.\n\tAlerts *alert.Sender\n\t// Live is told about changes and serves /v1/events; it defaults to a hub\n\t// that only sees this handler's own changes, and only while it runs.\n\tLive *live.Hub\n}\n```\n\n```go\ntype Outcome string\n```\nOutcome How a delivery attempt ended. \\`lost\\` means the result is unknown: the dispatcher crashed or shut down mid-delivery, and the endpoint may have processed the request.\n\n```go\nconst (\n\tHttpError    Outcome = \"http_error\"\n\tLost         Outcome = \"lost\"\n\tNetworkError Outcome = \"network_error\"\n\tSuccess      Outcome = \"success\"\n\tTimeout      Outcome = \"timeout\"\n)\n```\nDefines values for Outcome.\n\n```go\nfunc (e Outcome) Valid() bool\n```\nValid indicates whether the value is a known member of the Outcome enum.\n\n```go\ntype OverlapPolicy string\n```\nOverlapPolicy What happens when a slot comes up while the previous run is still pending or running, or, for a schedule with \\`workflow\\`, while the workflow run it started is still running. \\`skip\\` records the slot as a \\`skipped\\` run; \\`allow\\` runs it alongside.\n\n```go\nconst (\n\tOverlapPolicyAllow OverlapPolicy = \"allow\"\n\tOverlapPolicySkip  OverlapPolicy = \"skip\"\n)\n```\nDefines values for OverlapPolicy.\n\n```go\nfunc (e OverlapPolicy) Valid() bool\n```\nValid indicates whether the value is a known member of the OverlapPolicy enum.\n\n```go\ntype PauseQueue200JSONResponse Queue\n```\n\n```go\nfunc (response PauseQueue200JSONResponse) VisitPauseQueueResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PauseQueueRequestObject struct {\n\tQueue QueueName `json:\"queue\"`\n}\n```\n\n```go\ntype PauseQueueResponseObject interface {\n\tVisitPauseQueueResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype PauseQueuedefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response PauseQueuedefaultJSONResponse) VisitPauseQueueResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PauseSchedule200JSONResponse Schedule\n```\n\n```go\nfunc (response PauseSchedule200JSONResponse) VisitPauseScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PauseScheduleRequestObject struct {\n\tSchedule ScheduleName `json:\"schedule\"`\n}\n```\n\n```go\ntype PauseScheduleResponseObject interface {\n\tVisitPauseScheduleResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype PauseScheduledefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response PauseScheduledefaultJSONResponse) VisitPauseScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PreviewCron200JSONResponse CronPreview\n```\n\n```go\nfunc (response PreviewCron200JSONResponse) VisitPreviewCronResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PreviewCronParams struct {\n\tCron string `form:\"cron\" json:\"cron\"`\n\n\t// Timezone IANA name. Defaults to UTC.\n\tTimezone *string `form:\"timezone,omitempty\" json:\"timezone,omitempty\"`\n\n\t// From The start of the window to list runs in. Requires `until`.\n\tFrom *time.Time `form:\"from,omitempty\" json:\"from,omitempty\"`\n\n\t// Until The end of the window, exclusive. Requires `from`.\n\tUntil *time.Time `form:\"until,omitempty\" json:\"until,omitempty\"`\n}\n```\nPreviewCronParams defines parameters for PreviewCron.\n\n```go\ntype PreviewCronRequestObject struct {\n\tParams PreviewCronParams\n}\n```\n\n```go\ntype PreviewCronResponseObject interface {\n\tVisitPreviewCronResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype PreviewCrondefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response PreviewCrondefaultJSONResponse) VisitPreviewCronResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutQueue200JSONResponse Queue\n```\n\n```go\nfunc (response PutQueue200JSONResponse) VisitPutQueueResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutQueue201JSONResponse Queue\n```\n\n```go\nfunc (response PutQueue201JSONResponse) VisitPutQueueResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutQueueJSONRequestBody = QueueConfig\n```\nPutQueueJSONRequestBody defines body for PutQueue for application/json ContentType.\n\n```go\ntype PutQueueRequestObject struct {\n\tQueue QueueName `json:\"queue\"`\n\tBody  *PutQueueJSONRequestBody\n}\n```\n\n```go\ntype PutQueueResponseObject interface {\n\tVisitPutQueueResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype PutQueuedefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response PutQueuedefaultJSONResponse) VisitPutQueueResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutSchedule200JSONResponse Schedule\n```\n\n```go\nfunc (response PutSchedule200JSONResponse) VisitPutScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutSchedule201JSONResponse Schedule\n```\n\n```go\nfunc (response PutSchedule201JSONResponse) VisitPutScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutScheduleJSONRequestBody = ScheduleConfig\n```\nPutScheduleJSONRequestBody defines body for PutSchedule for application/json ContentType.\n\n```go\ntype PutScheduleRequestObject struct {\n\tSchedule ScheduleName `json:\"schedule\"`\n\tBody     *PutScheduleJSONRequestBody\n}\n```\n\n```go\ntype PutScheduleResponseObject interface {\n\tVisitPutScheduleResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype PutScheduledefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response PutScheduledefaultJSONResponse) VisitPutScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutWorkflow200JSONResponse Workflow\n```\n\n```go\nfunc (response PutWorkflow200JSONResponse) VisitPutWorkflowResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutWorkflow201JSONResponse Workflow\n```\n\n```go\nfunc (response PutWorkflow201JSONResponse) VisitPutWorkflowResponse(w http.ResponseWriter) error\n```\n\n```go\ntype PutWorkflowJSONRequestBody = WorkflowConfig\n```\nPutWorkflowJSONRequestBody defines body for PutWorkflow for application/json ContentType.\n\n```go\ntype PutWorkflowRequestObject struct {\n\tWorkflow WorkflowName `json:\"workflow\"`\n\tBody     *PutWorkflowJSONRequestBody\n}\n```\n\n```go\ntype PutWorkflowResponseObject interface {\n\tVisitPutWorkflowResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype PutWorkflowdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response PutWorkflowdefaultJSONResponse) VisitPutWorkflowResponse(w http.ResponseWriter) error\n```\n\n```go\ntype Queue struct {\n\t// AutoPause Pause the queue by itself when its endpoint looks down: after\n\t// `after_failures` attempts in a row end with a 5xx, a timeout or a\n\t// network error. Other 4xx responses, 429 and lost attempts don't\n\t// count, and only a success resets the count. While auto-paused, tasks\n\t// wait without using attempts, and one task at a time goes as a probe:\n\t// 30 seconds after the pause, then after twice as long each time it\n\t// fails, up to every 10 minutes. The first success resumes the queue.\n\t// Resuming it by hand does too. Omit for no auto-pause. Not for queues\n\t// whose tasks go to many endpoints, where one being down would hold up\n\t// the rest; Workly's own queues can't have it.\n\tAutoPause *AutoPauseConfig `json:\"auto_pause,omitempty\"`\n\n\t// AutoPaused The queue paused itself after failures in a row (see `auto_pause`).\n\t// Absent when it hasn't, or once it resumed.\n\tAutoPaused *AutoPaused `json:\"auto_paused,omitempty\"`\n\n\t// BackoffMultiplier Retry n waits a random time between `min_backoff_seconds` and\n\t// `min_backoff_seconds * backoff_multiplier^(n-1)`, capped at\n\t// `max_backoff_seconds`. `Retry-After` response headers are honoured.\n\tBackoffMultiplier float64   `json:\"backoff_multiplier\"`\n\tCreatedAt         time.Time `json:\"created_at\"`\n\n\t// MaxAttempts Total delivery attempts before a task fails. Tasks can override it.\n\tMaxAttempts       int     `json:\"max_attempts\"`\n\tMaxBackoffSeconds float64 `json:\"max_backoff_seconds\"`\n\n\t// MaxConcurrency Most deliveries in flight at once. There is always a limit; the\n\t// default is low so a new queue can't overwhelm its endpoint.\n\tMaxConcurrency    int     `json:\"max_concurrency\"`\n\tMinBackoffSeconds float64 `json:\"min_backoff_seconds\"`\n\tName              string  `json:\"name\"`\n\n\t// Paused Paused by hand. See `auto_paused` for a pause the queue made itself.\n\tPaused bool `json:\"paused\"`\n\n\t// RatePerSecond Most deliveries started per second. Omit for no limit. Retries\n\t// count; recovering a lost attempt does too. Deliveries are spread\n\t// out evenly: after an idle spell, at most a tenth of a second's\n\t// worth (at least 1) start at once.\n\tRatePerSecond *float64 `json:\"rate_per_second,omitempty\"`\n\n\t// RetryOn4xx Retry 4xx responses. By default only 408 and 429 are retried, as\n\t// other client errors usually fail again.\n\tRetryOn4xx bool `json:\"retry_on_4xx\"`\n\n\t// Stats The queue's current work. Returned when getting or listing queues.\n\t// Counts stop at 10,000, so 10000 means \"10,000 or more\".\n\tStats *QueueStats `json:\"stats,omitempty\"`\n\n\t// TimeoutSeconds How long to wait for a response. Tasks can override it.\n\tTimeoutSeconds float64   `json:\"timeout_seconds\"`\n\tUpdatedAt      time.Time `json:\"updated_at\"`\n}\n```\nQueue defines model for Queue.\n\n```go\ntype QueueActivity struct {\n\tCancelled int `json:\"cancelled\"`\n\n\t// DurationSamples How many latest attempts with a recorded duration the percentiles\n\t// are taken over (at most 2,000). 0 when there are no percentiles.\n\tDurationSamples int `json:\"duration_samples\"`\n\tFailed          int `json:\"failed\"`\n\n\t// P50DurationMs Median duration of the latest attempt of the succeeded and failed\n\t// tasks counted (at most the last 1,000 of each). Absent if none\n\t// has one.\n\tP50DurationMs *int `json:\"p50_duration_ms,omitempty\"`\n\n\t// P95DurationMs 95th percentile of the same durations.\n\tP95DurationMs *int `json:\"p95_duration_ms,omitempty\"`\n\n\t// RetentionSeconds How long the server keeps finished tasks (`WORKLY_RETENTION`).\n\t// Absent if it keeps them forever.\n\tRetentionSeconds *float64 `json:\"retention_seconds,omitempty\"`\n\n\t// Since The start of the period counted.\n\tSince     time.Time `json:\"since\"`\n\tSucceeded int       `json:\"succeeded\"`\n}\n```\nQueueActivity Counts stop at 10,000, so 10000 means \"10,000 or more\".\n\n```go\ntype QueueConfig struct {\n\t// AutoPause Pause the queue by itself when its endpoint looks down: after\n\t// `after_failures` attempts in a row end with a 5xx, a timeout or a\n\t// network error. Other 4xx responses, 429 and lost attempts don't\n\t// count, and only a success resets the count. While auto-paused, tasks\n\t// wait without using attempts, and one task at a time goes as a probe:\n\t// 30 seconds after the pause, then after twice as long each time it\n\t// fails, up to every 10 minutes. The first success resumes the queue.\n\t// Resuming it by hand does too. Omit for no auto-pause. Not for queues\n\t// whose tasks go to many endpoints, where one being down would hold up\n\t// the rest; Workly's own queues can't have it.\n\tAutoPause *AutoPauseConfig `json:\"auto_pause,omitempty\"`\n\n\t// BackoffMultiplier Retry n waits a random time between `min_backoff_seconds` and\n\t// `min_backoff_seconds * backoff_multiplier^(n-1)`, capped at\n\t// `max_backoff_seconds`. `Retry-After` response headers are honoured.\n\tBackoffMultiplier *float64 `json:\"backoff_multiplier,omitempty\"`\n\n\t// MaxAttempts Total delivery attempts before a task fails. Tasks can override it.\n\tMaxAttempts       *int     `json:\"max_attempts,omitempty\"`\n\tMaxBackoffSeconds *float64 `json:\"max_backoff_seconds,omitempty\"`\n\n\t// MaxConcurrency Most deliveries in flight at once. There is always a limit; the\n\t// default is low so a new queue can't overwhelm its endpoint.\n\tMaxConcurrency    *int     `json:\"max_concurrency,omitempty\"`\n\tMinBackoffSeconds *float64 `json:\"min_backoff_seconds,omitempty\"`\n\n\t// RatePerSecond Most deliveries started per second. Omit for no limit. Retries\n\t// count; recovering a lost attempt does too. Deliveries are spread\n\t// out evenly: after an idle spell, at most a tenth of a second's\n\t// worth (at least 1) start at once.\n\tRatePerSecond *float64 `json:\"rate_per_second,omitempty\"`\n\n\t// RetryOn4xx Retry 4xx responses. By default only 408 and 429 are retried, as\n\t// other client errors usually fail again.\n\tRetryOn4xx *bool `json:\"retry_on_4xx,omitempty\"`\n\n\t// TimeoutSeconds How long to wait for a response. Tasks can override it.\n\tTimeoutSeconds *float64 `json:\"timeout_seconds,omitempty\"`\n}\n```\nQueueConfig A queue's delivery policy. Omitted fields take the default.\n\n```go\ntype QueueFailures struct {\n\tGroups []FailureGroup `json:\"groups\"`\n}\n```\nQueueFailures defines model for QueueFailures.\n\n```go\ntype QueueList struct {\n\tQueues []Queue `json:\"queues\"`\n}\n```\nQueueList defines model for QueueList.\n\n```go\ntype QueueName = string\n```\nQueueName defines model for QueueName.\n\n```go\ntype QueueStats struct {\n\t// Due Pending tasks that are due now.\n\tDue int `json:\"due\"`\n\n\t// Failed Failed tasks still retained (see `WORKLY_RETENTION`). Retry them\n\t// with `POST /v1/queues/{queue}/retry-failed`.\n\tFailed int `json:\"failed\"`\n\n\t// OldestDueAt When the longest-waiting due task became due, i.e. how far behind\n\t// the queue is. Absent when nothing is due.\n\tOldestDueAt *time.Time `json:\"oldest_due_at,omitempty\"`\n\n\t// Running Tasks with a delivery in flight.\n\tRunning int `json:\"running\"`\n\n\t// Scheduled Pending tasks due later, including ones waiting to retry.\n\tScheduled int `json:\"scheduled\"`\n}\n```\nQueueStats The queue's current work. Returned when getting or listing queues. Counts stop at 10,000, so 10000 means \"10,000 or more\".\n\n```go\ntype RequiredHeaderError struct {\n\tParamName string\n\tErr       error\n}\n```\n\n```go\nfunc (e *RequiredHeaderError) Error() string\n```\n\n```go\nfunc (e *RequiredHeaderError) Unwrap() error\n```\n\n```go\ntype RequiredParamError struct {\n\tParamName string\n}\n```\n\n```go\nfunc (e *RequiredParamError) Error() string\n```\n\n```go\ntype ResumeQueue200JSONResponse Queue\n```\n\n```go\nfunc (response ResumeQueue200JSONResponse) VisitResumeQueueResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ResumeQueueRequestObject struct {\n\tQueue QueueName `json:\"queue\"`\n}\n```\n\n```go\ntype ResumeQueueResponseObject interface {\n\tVisitResumeQueueResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ResumeQueuedefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ResumeQueuedefaultJSONResponse) VisitResumeQueueResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ResumeSchedule200JSONResponse Schedule\n```\n\n```go\nfunc (response ResumeSchedule200JSONResponse) VisitResumeScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ResumeScheduleRequestObject struct {\n\tSchedule ScheduleName `json:\"schedule\"`\n}\n```\n\n```go\ntype ResumeScheduleResponseObject interface {\n\tVisitResumeScheduleResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype ResumeScheduledefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response ResumeScheduledefaultJSONResponse) VisitResumeScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype RetryFailedResult struct {\n\t// Retried How many failed tasks were made pending again.\n\tRetried int `json:\"retried\"`\n}\n```\nRetryFailedResult defines model for RetryFailedResult.\n\n```go\ntype RetryFailedTasks200JSONResponse RetryFailedResult\n```\n\n```go\nfunc (response RetryFailedTasks200JSONResponse) VisitRetryFailedTasksResponse(w http.ResponseWriter) error\n```\n\n```go\ntype RetryFailedTasksParams struct {\n\t// LastError Only tasks whose latest error is exactly this.\n\tLastError *LastError `form:\"last_error,omitempty\" json:\"last_error,omitempty\"`\n}\n```\nRetryFailedTasksParams defines parameters for RetryFailedTasks.\n\n```go\ntype RetryFailedTasksRequestObject struct {\n\tQueue  QueueName `json:\"queue\"`\n\tParams RetryFailedTasksParams\n}\n```\n\n```go\ntype RetryFailedTasksResponseObject interface {\n\tVisitRetryFailedTasksResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype RetryFailedTasksdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response RetryFailedTasksdefaultJSONResponse) VisitRetryFailedTasksResponse(w http.ResponseWriter) error\n```\n\n```go\ntype RetryRun200JSONResponse Run\n```\n\n```go\nfunc (response RetryRun200JSONResponse) VisitRetryRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype RetryRunRequestObject struct {\n\tId RunID `json:\"id\"`\n}\n```\n\n```go\ntype RetryRunResponseObject interface {\n\tVisitRetryRunResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype RetryRundefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response RetryRundefaultJSONResponse) VisitRetryRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype RetryTask200JSONResponse Task\n```\n\n```go\nfunc (response RetryTask200JSONResponse) VisitRetryTaskResponse(w http.ResponseWriter) error\n```\n\n```go\ntype RetryTaskRequestObject struct {\n\tId TaskID `json:\"id\"`\n}\n```\n\n```go\ntype RetryTaskResponseObject interface {\n\tVisitRetryTaskResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype RetryTaskdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response RetryTaskdefaultJSONResponse) VisitRetryTaskResponse(w http.ResponseWriter) error\n```\n\n```go\ntype RetryWorkflowRun200JSONResponse WorkflowRun\n```\n\n```go\nfunc (response RetryWorkflowRun200JSONResponse) VisitRetryWorkflowRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype RetryWorkflowRunRequestObject struct {\n\tId WorkflowRunID `json:\"id\"`\n}\n```\n\n```go\ntype RetryWorkflowRunResponseObject interface {\n\tVisitRetryWorkflowRunResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype RetryWorkflowRundefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response RetryWorkflowRundefaultJSONResponse) VisitRetryWorkflowRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype Run struct {\n\tAttemptCount int `json:\"attempt_count\"`\n\n\t// Body The body, when it is not JSON.\n\tBody *string `json:\"body,omitempty\"`\n\n\t// CallbackState A `pending` task with `run_at` in the future is scheduled. A `failed`\n\t// task has exhausted its attempts or got a non-retryable response.\n\tCallbackState *TaskState `json:\"callback_state,omitempty\"`\n\n\t// CallbackTaskId The callback task enqueued when the run last finished, if its schedule has `on_complete`.\n\tCallbackTaskId *string   `json:\"callback_task_id,omitempty\"`\n\tCreatedAt      time.Time `json:\"created_at\"`\n\n\t// FinishedAt When the run succeeded, failed, was cancelled or was skipped.\n\tFinishedAt *time.Time        `json:\"finished_at,omitempty\"`\n\tHeaders    map[string]string `json:\"headers\"`\n\n\t// Id Example: run_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId            string     `json:\"id\"`\n\tLastAttemptAt *time.Time `json:\"last_attempt_at,omitempty\"`\n\n\t// LastDurationMs How long the latest finished attempt took. Absent before the first attempt finishes.\n\tLastDurationMs *int    `json:\"last_duration_ms,omitempty\"`\n\tLastError      *string `json:\"last_error,omitempty\"`\n\n\t// LastOutcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tLastOutcome *Outcome `json:\"last_outcome,omitempty\"`\n\n\t// LastStatus HTTP status of the latest attempt, if it got a response.\n\tLastStatus *int       `json:\"last_status,omitempty\"`\n\tMethod     HTTPMethod `json:\"method\"`\n\n\t// Payload The body, when it is JSON.\n\tPayload *json.RawMessage `json:\"payload,omitempty\"`\n\n\t// RetriedAt When the run was last retried by hand. Absent if never.\n\tRetriedAt *time.Time `json:\"retried_at,omitempty\"`\n\n\t// RunAt When the run is next eligible for delivery.\n\tRunAt    time.Time `json:\"run_at\"`\n\tSchedule string    `json:\"schedule\"`\n\n\t// ScheduledFor The cron slot, or when a manual run was triggered. Sent as `Workly-Scheduled-For`.\n\tScheduledFor time.Time `json:\"scheduled_for\"`\n\n\t// SkipReason `overlap`: the previous run, or the workflow run it started, was\n\t// still going (overlap policy `skip`). `missed`: the server was down at the slot (missed\n\t// policy `skip`).\n\tSkipReason *SkipReason `json:\"skip_reason,omitempty\"`\n\n\t// StartedAt When the first delivery attempt started. Retries by hand don't change it. Absent before the first attempt.\n\tStartedAt *time.Time `json:\"started_at,omitempty\"`\n\n\t// State A `skipped` run was never delivered: see `skip_reason`. It can be\n\t// retried to deliver it now.\n\tState RunState `json:\"state\"`\n\n\t// Trigger `schedule` for a cron slot, `manual` for \"run now\".\n\tTrigger   RunTrigger `json:\"trigger\"`\n\tUpdatedAt time.Time  `json:\"updated_at\"`\n\tUrl       string     `json:\"url\"`\n\n\t// WorkflowRunId The workflow run this run started, for a schedule that starts a workflow.\n\tWorkflowRunId     *string            `json:\"workflow_run_id,omitempty\"`\n\tWorkflowRunStatus *WorkflowRunStatus `json:\"workflow_run_status,omitempty\"`\n}\n```\nRun defines model for Run.\n\n```go\ntype RunID = string\n```\nRunID defines model for RunID.\n\n```go\ntype RunList struct {\n\t// NextCursor Pass as `cursor` to get the next page. Absent on the last page.\n\tNextCursor *string `json:\"next_cursor,omitempty\"`\n\tRuns       []Run   `json:\"runs\"`\n}\n```\nRunList defines model for RunList.\n\n```go\ntype RunState string\n```\nRunState A \\`skipped\\` run was never delivered: see \\`skip\\_reason\\`. It can be retried to deliver it now.\n\n```go\nconst (\n\tRunStateCancelled RunState = \"cancelled\"\n\tRunStateFailed    RunState = \"failed\"\n\tRunStatePending   RunState = \"pending\"\n\tRunStateRunning   RunState = \"running\"\n\tRunStateSkipped   RunState = \"skipped\"\n\tRunStateSucceeded RunState = \"succeeded\"\n)\n```\nDefines values for RunState.\n\n```go\nfunc (e RunState) Valid() bool\n```\nValid indicates whether the value is a known member of the RunState enum.\n\n```go\ntype RunTrigger string\n```\nRunTrigger \\`schedule\\` for a cron slot, \\`manual\\` for \"run now\".\n\n```go\nconst (\n\tRunTriggerManual   RunTrigger = \"manual\"\n\tRunTriggerSchedule RunTrigger = \"schedule\"\n)\n```\nDefines values for RunTrigger.\n\n```go\nfunc (e RunTrigger) Valid() bool\n```\nValid indicates whether the value is a known member of the RunTrigger enum.\n\n```go\ntype Schedule struct {\n\tBackoffMultiplier float64 `json:\"backoff_multiplier\"`\n\n\t// Body The body, when it is not JSON.\n\tBody      *string           `json:\"body,omitempty\"`\n\tCreatedAt time.Time         `json:\"created_at\"`\n\tCron      string            `json:\"cron\"`\n\tHeaders   map[string]string `json:\"headers\"`\n\n\t// LastRun The schedule's most recent run. Absent before the first.\n\tLastRun           *LastRun   `json:\"last_run,omitempty\"`\n\tMaxAttempts       int        `json:\"max_attempts\"`\n\tMaxBackoffSeconds float64    `json:\"max_backoff_seconds\"`\n\tMethod            HTTPMethod `json:\"method\"`\n\tMinBackoffSeconds float64    `json:\"min_backoff_seconds\"`\n\n\t// Missed What happens to slots missed while the server was down (a slot is\n\t// missed if it can't fire within a minute). `skip` records the most\n\t// recent missed slot as a `skipped` run; `catch_up` runs it. Either\n\t// way, at most one run is created for the missed slots.\n\tMissed MissedPolicy `json:\"missed\"`\n\tName   string       `json:\"name\"`\n\n\t// NextRunAt When the schedule next fires. Absent while paused.\n\tNextRunAt *time.Time `json:\"next_run_at,omitempty\"`\n\n\t// NextRuns The next five slots. Empty while paused; see `next_runs_if_resumed`.\n\tNextRuns []time.Time `json:\"next_runs\"`\n\n\t// NextRunsIfResumed While paused, the five slots the schedule would run at if resumed\n\t// now, to check its cron expression. Absent while it runs.\n\tNextRunsIfResumed *[]time.Time `json:\"next_runs_if_resumed,omitempty\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n\n\t// Overlap What happens when a slot comes up while the previous run is still\n\t// pending or running, or, for a schedule with `workflow`, while the\n\t// workflow run it started is still running. `skip` records the slot as\n\t// a `skipped` run; `allow` runs it alongside.\n\tOverlap OverlapPolicy `json:\"overlap\"`\n\tPaused  bool          `json:\"paused\"`\n\n\t// PausedAt When a paused schedule was paused. Absent while it runs.\n\tPausedAt *time.Time `json:\"paused_at,omitempty\"`\n\n\t// Payload The body, when it is JSON.\n\tPayload        *json.RawMessage `json:\"payload,omitempty\"`\n\tRetryOn4xx     bool             `json:\"retry_on_4xx\"`\n\tTimeoutSeconds float64          `json:\"timeout_seconds\"`\n\tTimezone       string           `json:\"timezone\"`\n\tUpdatedAt      time.Time        `json:\"updated_at\"`\n\tUrl            string           `json:\"url\"`\n\n\t// Workflow The workflow each run starts, for a schedule that starts one. `url` is then empty.\n\tWorkflow *string `json:\"workflow,omitempty\"`\n}\n```\nSchedule defines model for Schedule.\n\n```go\ntype ScheduleAdmission struct {\n\tName string\n\t// Exists is true when the schedule is being replaced.\n\tExists bool\n\t// Interval is the shortest time between two of its runs.\n\tInterval time.Duration\n\t// PreviousInterval is the replaced schedule's Interval (zero for a new\n\t// one), so a limit can let a schedule keep the timetable it has.\n\tPreviousInterval time.Duration\n}\n```\n\n```go\ntype ScheduleConfig struct {\n\t// BackoffMultiplier Retries back off as for queues (see `QueueConfig`).\n\tBackoffMultiplier *float64 `json:\"backoff_multiplier,omitempty\"`\n\n\t// Body A raw text body. Use this or `payload`.\n\tBody *string `json:\"body,omitempty\"`\n\n\t// ContentType Content type of `body`. Defaults to `text/plain; charset=utf-8`.\n\tContentType *string `json:\"content_type,omitempty\"`\n\n\t// Cron When to run: five fields (minute, hour, day of month, month, day\n\t// of week) with `*`, lists, ranges, steps and names (`jan`, `mon`),\n\t// or `@yearly`, `@monthly`, `@weekly`, `@daily` or `@hourly`. When\n\t// both day fields are restricted, a day matches either.\n\t//\n\t//\n\t// Example: 0 3 * * *\n\tCron string `json:\"cron\"`\n\n\t// Headers Headers sent with every run. `Workly-*` headers are reserved.\n\tHeaders *map[string]string `json:\"headers,omitempty\"`\n\n\t// MaxAttempts Total delivery attempts before a run fails.\n\tMaxAttempts       *int        `json:\"max_attempts,omitempty\"`\n\tMaxBackoffSeconds *float64    `json:\"max_backoff_seconds,omitempty\"`\n\tMethod            *HTTPMethod `json:\"method,omitempty\"`\n\tMinBackoffSeconds *float64    `json:\"min_backoff_seconds,omitempty\"`\n\n\t// Missed What happens to slots missed while the server was down (a slot is\n\t// missed if it can't fire within a minute). `skip` records the most\n\t// recent missed slot as a `skipped` run; `catch_up` runs it. Either\n\t// way, at most one run is created for the missed slots.\n\tMissed *MissedPolicy `json:\"missed,omitempty\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n\n\t// Overlap What happens when a slot comes up while the previous run is still\n\t// pending or running, or, for a schedule with `workflow`, while the\n\t// workflow run it started is still running. `skip` records the slot as\n\t// a `skipped` run; `allow` runs it alongside.\n\tOverlap *OverlapPolicy `json:\"overlap,omitempty\"`\n\n\t// Payload A JSON body, sent with `Content-Type: application/json`. Use this or `body`.\n\tPayload *json.RawMessage `json:\"payload,omitempty\"`\n\n\t// RetryOn4xx Retry 4xx responses. By default only 408 and 429 are retried.\n\tRetryOn4xx *bool `json:\"retry_on_4xx,omitempty\"`\n\n\t// TimeoutSeconds How long to wait for a response.\n\tTimeoutSeconds *float64 `json:\"timeout_seconds,omitempty\"`\n\n\t// Timezone IANA timezone the cron expression is read in, e.g.\n\t// `Europe/Stockholm`. A slot in the hour skipped by a daylight\n\t// saving change runs right after it; a slot in a repeated hour runs\n\t// once.\n\tTimezone *string `json:\"timezone,omitempty\"`\n\n\t// Url The http(s) URL to call. Use this or `workflow`.\n\t//\n\t// Example: https://api.example.com/reports/nightly\n\tUrl *string `json:\"url,omitempty\"`\n\n\t// Workflow A workflow to start a run of instead of calling a URL. The\n\t// `payload`, if any, is the run's `input`; `method`, `headers` and\n\t// `body` don't apply. Each run's attempt starts the workflow run\n\t// (`workflow_run_id`), which then goes on independently: the run\n\t// succeeding means the workflow started, not that it succeeded.\n\t//\n\t//\n\t// Example: daily-refresh\n\tWorkflow *string `json:\"workflow,omitempty\"`\n}\n```\nScheduleConfig A schedule's settings. Omitted fields take the default. The request fields (\\`url\\` to \\`content\\_type\\`) work as in \\`EnqueueRequest\\`. Set \\`url\\` to call an endpoint, or \\`workflow\\` to start a run of that workflow instead.\n\n```go\ntype ScheduleList struct {\n\tSchedules []Schedule `json:\"schedules\"`\n}\n```\nScheduleList defines model for ScheduleList.\n\n```go\ntype ScheduleName = string\n```\nScheduleName defines model for ScheduleName.\n\n```go\ntype SearchTasks200JSONResponse TaskList\n```\n\n```go\nfunc (response SearchTasks200JSONResponse) VisitSearchTasksResponse(w http.ResponseWriter) error\n```\n\n```go\ntype SearchTasksParams struct {\n\tQueue          *string    `form:\"queue,omitempty\" json:\"queue,omitempty\"`\n\tState          *TaskState `form:\"state,omitempty\" json:\"state,omitempty\"`\n\tIdempotencyKey *string    `form:\"idempotency_key,omitempty\" json:\"idempotency_key,omitempty\"`\n\n\t// GroupId Only the tasks of this group.\n\tGroupId *string `form:\"group_id,omitempty\" json:\"group_id,omitempty\"`\n\n\t// LastError Only tasks whose latest error is exactly this.\n\tLastError *LastError `form:\"last_error,omitempty\" json:\"last_error,omitempty\"`\n\n\t// CreatedAfter Only tasks created at or after this time.\n\tCreatedAfter *time.Time `form:\"created_after,omitempty\" json:\"created_after,omitempty\"`\n\n\t// CreatedBefore Only tasks created before this time.\n\tCreatedBefore *time.Time `form:\"created_before,omitempty\" json:\"created_before,omitempty\"`\n\n\t// Sort What to order tasks by:\n\t//\n\t// - `created_at` (the default): when the task was enqueued.\n\t// - `run_at`: when it runs next. Pending tasks are delivered in this\n\t//   order, so ascending lists them as they'll run.\n\t// - `last_attempt_at`: when its latest attempt finished. Tasks never\n\t//   attempted count as oldest.\n\t// - `attempt_count`: how many attempts it has had.\n\t//\n\t// Ties are broken by task ID.\n\tSort *SearchTasksParamsSort `form:\"sort,omitempty\" json:\"sort,omitempty\"`\n\n\t// Order `asc` or `desc`. Defaults to `asc` (soonest first) for `run_at` and\n\t// to `desc` (newest or most first) for the rest.\n\tOrder *SearchTasksParamsOrder `form:\"order,omitempty\" json:\"order,omitempty\"`\n\n\t// Cursor The `next_cursor` of the previous page, requested with the same\n\t// filters and order.\n\tCursor *Cursor `form:\"cursor,omitempty\" json:\"cursor,omitempty\"`\n\tLimit  *Limit  `form:\"limit,omitempty\" json:\"limit,omitempty\"`\n}\n```\nSearchTasksParams defines parameters for SearchTasks.\n\n```go\ntype SearchTasksParamsOrder string\n```\nSearchTasksParamsOrder defines parameters for SearchTasks.\n\n```go\nconst (\n\tSearchTasksParamsOrderAsc  SearchTasksParamsOrder = \"asc\"\n\tSearchTasksParamsOrderDesc SearchTasksParamsOrder = \"desc\"\n)\n```\nDefines values for SearchTasksParamsOrder.\n\n```go\nfunc (e SearchTasksParamsOrder) Valid() bool\n```\nValid indicates whether the value is a known member of the SearchTasksParamsOrder enum.\n\n```go\ntype SearchTasksParamsSort string\n```\nSearchTasksParamsSort defines parameters for SearchTasks.\n\n```go\nconst (\n\tSearchTasksParamsSortAttemptCount  SearchTasksParamsSort = \"attempt_count\"\n\tSearchTasksParamsSortCreatedAt     SearchTasksParamsSort = \"created_at\"\n\tSearchTasksParamsSortLastAttemptAt SearchTasksParamsSort = \"last_attempt_at\"\n\tSearchTasksParamsSortRunAt         SearchTasksParamsSort = \"run_at\"\n)\n```\nDefines values for SearchTasksParamsSort.\n\n```go\nfunc (e SearchTasksParamsSort) Valid() bool\n```\nValid indicates whether the value is a known member of the SearchTasksParamsSort enum.\n\n```go\ntype SearchTasksRequestObject struct {\n\tParams SearchTasksParams\n}\n```\n\n```go\ntype SearchTasksResponseObject interface {\n\tVisitSearchTasksResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype SearchTasksdefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response SearchTasksdefaultJSONResponse) VisitSearchTasksResponse(w http.ResponseWriter) error\n```\n\n```go\ntype ServeMux interface {\n\tHandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))\n\thttp.Handler\n}\n```\nServeMux is an abstraction of [http.ServeMux](/net/http#ServeMux).\n\n```go\ntype ServerInterface interface {\n\t// GetHealthz Liveness probe\n\t// (GET /healthz)\n\tGetHealthz(w http.ResponseWriter, r *http.Request)\n\t// GetReadyz Readiness probe\n\t// (GET /readyz)\n\tGetReadyz(w http.ResponseWriter, r *http.Request)\n\t// GetActivity Count tasks created and finished over time\n\t// (GET /v1/activity)\n\tGetActivity(w http.ResponseWriter, r *http.Request, params GetActivityParams)\n\t// ListAlertChannels List alert channels\n\t// (GET /v1/alert-channels)\n\tListAlertChannels(w http.ResponseWriter, r *http.Request)\n\t// CreateAlertChannel Add an alert channel\n\t// (POST /v1/alert-channels)\n\tCreateAlertChannel(w http.ResponseWriter, r *http.Request)\n\t// DeleteAlertChannel Remove an alert channel\n\t// (DELETE /v1/alert-channels/{id})\n\tDeleteAlertChannel(w http.ResponseWriter, r *http.Request, id AlertChannelID)\n\t// TestAlertChannel Send a test alert\n\t// (POST /v1/alert-channels/{id}/test)\n\tTestAlertChannel(w http.ResponseWriter, r *http.Request, id AlertChannelID)\n\t// PreviewCron Preview a cron timetable\n\t// (GET /v1/cron/preview)\n\tPreviewCron(w http.ResponseWriter, r *http.Request, params PreviewCronParams)\n\t// ListGroups List task groups\n\t// (GET /v1/groups)\n\tListGroups(w http.ResponseWriter, r *http.Request, params ListGroupsParams)\n\t// CreateGroup Create a task group\n\t// (POST /v1/groups)\n\tCreateGroup(w http.ResponseWriter, r *http.Request)\n\t// GetGroup Get a task group\n\t// (GET /v1/groups/{id})\n\tGetGroup(w http.ResponseWriter, r *http.Request, id GroupID)\n\t// CloseGroup Close a task group\n\t// (POST /v1/groups/{id}/close)\n\tCloseGroup(w http.ResponseWriter, r *http.Request, id GroupID)\n\t// ListQueues List queues\n\t// (GET /v1/queues)\n\tListQueues(w http.ResponseWriter, r *http.Request)\n\t// DeleteQueue Delete a queue and all its tasks\n\t// (DELETE /v1/queues/{queue})\n\tDeleteQueue(w http.ResponseWriter, r *http.Request, queue QueueName)\n\t// GetQueue Get a queue\n\t// (GET /v1/queues/{queue})\n\tGetQueue(w http.ResponseWriter, r *http.Request, queue QueueName)\n\t// PutQueue Create or update a queue\n\t// (PUT /v1/queues/{queue})\n\tPutQueue(w http.ResponseWriter, r *http.Request, queue QueueName)\n\t// GetQueueActivity Count a queue's finished tasks\n\t// (GET /v1/queues/{queue}/activity)\n\tGetQueueActivity(w http.ResponseWriter, r *http.Request, queue QueueName, params GetQueueActivityParams)\n\t// CancelPendingTasks Cancel a queue's pending tasks\n\t// (POST /v1/queues/{queue}/cancel-pending)\n\tCancelPendingTasks(w http.ResponseWriter, r *http.Request, queue QueueName)\n\t// GetQueueFailures Group a queue's failed tasks by error\n\t// (GET /v1/queues/{queue}/failures)\n\tGetQueueFailures(w http.ResponseWriter, r *http.Request, queue QueueName, params GetQueueFailuresParams)\n\t// PauseQueue Pause a queue\n\t// (POST /v1/queues/{queue}/pause)\n\tPauseQueue(w http.ResponseWriter, r *http.Request, queue QueueName)\n\t// ResumeQueue Resume a paused queue\n\t// (POST /v1/queues/{queue}/resume)\n\tResumeQueue(w http.ResponseWriter, r *http.Request, queue QueueName)\n\t// RetryFailedTasks Retry every failed task in a queue\n\t// (POST /v1/queues/{queue}/retry-failed)\n\tRetryFailedTasks(w http.ResponseWriter, r *http.Request, queue QueueName, params RetryFailedTasksParams)\n\t// ListTasks List a queue's tasks\n\t// (GET /v1/queues/{queue}/tasks)\n\tListTasks(w http.ResponseWriter, r *http.Request, queue QueueName, params ListTasksParams)\n\t// CreateTask Enqueue a task\n\t// (POST /v1/queues/{queue}/tasks)\n\tCreateTask(w http.ResponseWriter, r *http.Request, queue QueueName, params CreateTaskParams)\n\t// CreateTasks Enqueue up to 100 tasks at once\n\t// (POST /v1/queues/{queue}/tasks:batch)\n\tCreateTasks(w http.ResponseWriter, r *http.Request, queue QueueName, params CreateTasksParams)\n\t// ListRuns List runs, newest first\n\t// (GET /v1/runs)\n\tListRuns(w http.ResponseWriter, r *http.Request, params ListRunsParams)\n\t// GetRun Get a run\n\t// (GET /v1/runs/{id})\n\tGetRun(w http.ResponseWriter, r *http.Request, id RunID)\n\t// ListRunAttempts List a run's delivery attempts, oldest first\n\t// (GET /v1/runs/{id}/attempts)\n\tListRunAttempts(w http.ResponseWriter, r *http.Request, id RunID)\n\t// CancelRun Cancel a run\n\t// (POST /v1/runs/{id}/cancel)\n\tCancelRun(w http.ResponseWriter, r *http.Request, id RunID)\n\t// GetRunDelivery Get the request that delivers a run\n\t// (GET /v1/runs/{id}/delivery)\n\tGetRunDelivery(w http.ResponseWriter, r *http.Request, id RunID)\n\t// RetryRun Retry a run now\n\t// (POST /v1/runs/{id}/retry)\n\tRetryRun(w http.ResponseWriter, r *http.Request, id RunID)\n\t// ListSchedules List schedules\n\t// (GET /v1/schedules)\n\tListSchedules(w http.ResponseWriter, r *http.Request)\n\t// DeleteSchedule Delete a schedule and all its runs\n\t// (DELETE /v1/schedules/{schedule})\n\tDeleteSchedule(w http.ResponseWriter, r *http.Request, schedule ScheduleName)\n\t// GetSchedule Get a schedule\n\t// (GET /v1/schedules/{schedule})\n\tGetSchedule(w http.ResponseWriter, r *http.Request, schedule ScheduleName)\n\t// PutSchedule Create or update a schedule\n\t// (PUT /v1/schedules/{schedule})\n\tPutSchedule(w http.ResponseWriter, r *http.Request, schedule ScheduleName)\n\t// PauseSchedule Pause a schedule\n\t// (POST /v1/schedules/{schedule}/pause)\n\tPauseSchedule(w http.ResponseWriter, r *http.Request, schedule ScheduleName)\n\t// ResumeSchedule Resume a paused schedule\n\t// (POST /v1/schedules/{schedule}/resume)\n\tResumeSchedule(w http.ResponseWriter, r *http.Request, schedule ScheduleName)\n\t// TriggerSchedule Run a schedule now\n\t// (POST /v1/schedules/{schedule}/trigger)\n\tTriggerSchedule(w http.ResponseWriter, r *http.Request, schedule ScheduleName)\n\t// SearchTasks Search tasks across queues\n\t// (GET /v1/tasks)\n\tSearchTasks(w http.ResponseWriter, r *http.Request, params SearchTasksParams)\n\t// GetTask Get a task\n\t// (GET /v1/tasks/{id})\n\tGetTask(w http.ResponseWriter, r *http.Request, id TaskID)\n\t// ListAttempts List a task's delivery attempts, oldest first\n\t// (GET /v1/tasks/{id}/attempts)\n\tListAttempts(w http.ResponseWriter, r *http.Request, id TaskID)\n\t// CancelTask Cancel a task\n\t// (POST /v1/tasks/{id}/cancel)\n\tCancelTask(w http.ResponseWriter, r *http.Request, id TaskID)\n\t// GetTaskDelivery Get the request that delivers a task\n\t// (GET /v1/tasks/{id}/delivery)\n\tGetTaskDelivery(w http.ResponseWriter, r *http.Request, id TaskID)\n\t// RetryTask Retry a task now\n\t// (POST /v1/tasks/{id}/retry)\n\tRetryTask(w http.ResponseWriter, r *http.Request, id TaskID)\n\t// ListWorkflowRuns List workflow runs, newest first\n\t// (GET /v1/workflow-runs)\n\tListWorkflowRuns(w http.ResponseWriter, r *http.Request, params ListWorkflowRunsParams)\n\t// GetWorkflowRun Get a workflow run with its steps\n\t// (GET /v1/workflow-runs/{id})\n\tGetWorkflowRun(w http.ResponseWriter, r *http.Request, id WorkflowRunID)\n\t// CancelWorkflowRun Cancel a workflow run\n\t// (POST /v1/workflow-runs/{id}/cancel)\n\tCancelWorkflowRun(w http.ResponseWriter, r *http.Request, id WorkflowRunID)\n\t// RetryWorkflowRun Retry a workflow run\n\t// (POST /v1/workflow-runs/{id}/retry)\n\tRetryWorkflowRun(w http.ResponseWriter, r *http.Request, id WorkflowRunID)\n\t// ListWorkflows List workflows\n\t// (GET /v1/workflows)\n\tListWorkflows(w http.ResponseWriter, r *http.Request)\n\t// DeleteWorkflow Delete a workflow\n\t// (DELETE /v1/workflows/{workflow})\n\tDeleteWorkflow(w http.ResponseWriter, r *http.Request, workflow WorkflowName)\n\t// GetWorkflow Get a workflow\n\t// (GET /v1/workflows/{workflow})\n\tGetWorkflow(w http.ResponseWriter, r *http.Request, workflow WorkflowName)\n\t// PutWorkflow Create or update a workflow\n\t// (PUT /v1/workflows/{workflow})\n\tPutWorkflow(w http.ResponseWriter, r *http.Request, workflow WorkflowName)\n\t// StartWorkflowRun Start a workflow run\n\t// (POST /v1/workflows/{workflow}/runs)\n\tStartWorkflowRun(w http.ResponseWriter, r *http.Request, workflow WorkflowName)\n}\n```\nServerInterface represents all server handlers.\n\n```go\nfunc NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface\n```\n\n```go\nfunc NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface\n```\n\n```go\ntype ServerInterfaceWrapper struct {\n\tHandler            ServerInterface\n\tHandlerMiddlewares []MiddlewareFunc\n\tErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)\n}\n```\nServerInterfaceWrapper converts contexts to parameters.\n\n```go\nfunc (siw *ServerInterfaceWrapper) CancelPendingTasks(w http.ResponseWriter, r *http.Request)\n```\nCancelPendingTasks operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) CancelRun(w http.ResponseWriter, r *http.Request)\n```\nCancelRun operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) CancelTask(w http.ResponseWriter, r *http.Request)\n```\nCancelTask operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) CancelWorkflowRun(w http.ResponseWriter, r *http.Request)\n```\nCancelWorkflowRun operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) CloseGroup(w http.ResponseWriter, r *http.Request)\n```\nCloseGroup operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) CreateAlertChannel(w http.ResponseWriter, r *http.Request)\n```\nCreateAlertChannel operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) CreateGroup(w http.ResponseWriter, r *http.Request)\n```\nCreateGroup operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) CreateTask(w http.ResponseWriter, r *http.Request)\n```\nCreateTask operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) CreateTasks(w http.ResponseWriter, r *http.Request)\n```\nCreateTasks operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) DeleteAlertChannel(w http.ResponseWriter, r *http.Request)\n```\nDeleteAlertChannel operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) DeleteQueue(w http.ResponseWriter, r *http.Request)\n```\nDeleteQueue operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) DeleteSchedule(w http.ResponseWriter, r *http.Request)\n```\nDeleteSchedule operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) DeleteWorkflow(w http.ResponseWriter, r *http.Request)\n```\nDeleteWorkflow operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetActivity(w http.ResponseWriter, r *http.Request)\n```\nGetActivity operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetGroup(w http.ResponseWriter, r *http.Request)\n```\nGetGroup operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetHealthz(w http.ResponseWriter, r *http.Request)\n```\nGetHealthz operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetQueue(w http.ResponseWriter, r *http.Request)\n```\nGetQueue operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetQueueActivity(w http.ResponseWriter, r *http.Request)\n```\nGetQueueActivity operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetQueueFailures(w http.ResponseWriter, r *http.Request)\n```\nGetQueueFailures operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetReadyz(w http.ResponseWriter, r *http.Request)\n```\nGetReadyz operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetRun(w http.ResponseWriter, r *http.Request)\n```\nGetRun operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetRunDelivery(w http.ResponseWriter, r *http.Request)\n```\nGetRunDelivery operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetSchedule(w http.ResponseWriter, r *http.Request)\n```\nGetSchedule operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetTask(w http.ResponseWriter, r *http.Request)\n```\nGetTask operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetTaskDelivery(w http.ResponseWriter, r *http.Request)\n```\nGetTaskDelivery operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetWorkflow(w http.ResponseWriter, r *http.Request)\n```\nGetWorkflow operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) GetWorkflowRun(w http.ResponseWriter, r *http.Request)\n```\nGetWorkflowRun operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ListAlertChannels(w http.ResponseWriter, r *http.Request)\n```\nListAlertChannels operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ListAttempts(w http.ResponseWriter, r *http.Request)\n```\nListAttempts operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ListGroups(w http.ResponseWriter, r *http.Request)\n```\nListGroups operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ListQueues(w http.ResponseWriter, r *http.Request)\n```\nListQueues operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ListRunAttempts(w http.ResponseWriter, r *http.Request)\n```\nListRunAttempts operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ListRuns(w http.ResponseWriter, r *http.Request)\n```\nListRuns operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ListSchedules(w http.ResponseWriter, r *http.Request)\n```\nListSchedules operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ListTasks(w http.ResponseWriter, r *http.Request)\n```\nListTasks operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ListWorkflowRuns(w http.ResponseWriter, r *http.Request)\n```\nListWorkflowRuns operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ListWorkflows(w http.ResponseWriter, r *http.Request)\n```\nListWorkflows operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) PauseQueue(w http.ResponseWriter, r *http.Request)\n```\nPauseQueue operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) PauseSchedule(w http.ResponseWriter, r *http.Request)\n```\nPauseSchedule operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) PreviewCron(w http.ResponseWriter, r *http.Request)\n```\nPreviewCron operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) PutQueue(w http.ResponseWriter, r *http.Request)\n```\nPutQueue operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) PutSchedule(w http.ResponseWriter, r *http.Request)\n```\nPutSchedule operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) PutWorkflow(w http.ResponseWriter, r *http.Request)\n```\nPutWorkflow operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ResumeQueue(w http.ResponseWriter, r *http.Request)\n```\nResumeQueue operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) ResumeSchedule(w http.ResponseWriter, r *http.Request)\n```\nResumeSchedule operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) RetryFailedTasks(w http.ResponseWriter, r *http.Request)\n```\nRetryFailedTasks operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) RetryRun(w http.ResponseWriter, r *http.Request)\n```\nRetryRun operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) RetryTask(w http.ResponseWriter, r *http.Request)\n```\nRetryTask operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) RetryWorkflowRun(w http.ResponseWriter, r *http.Request)\n```\nRetryWorkflowRun operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) SearchTasks(w http.ResponseWriter, r *http.Request)\n```\nSearchTasks operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) StartWorkflowRun(w http.ResponseWriter, r *http.Request)\n```\nStartWorkflowRun operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) TestAlertChannel(w http.ResponseWriter, r *http.Request)\n```\nTestAlertChannel operation middleware\n\n```go\nfunc (siw *ServerInterfaceWrapper) TriggerSchedule(w http.ResponseWriter, r *http.Request)\n```\nTriggerSchedule operation middleware\n\n```go\ntype SkipReason string\n```\nSkipReason \\`overlap\\`: the previous run, or the workflow run it started, was still going (overlap policy \\`skip\\`). \\`missed\\`: the server was down at the slot (missed policy \\`skip\\`).\n\n```go\nconst (\n\tMissed  SkipReason = \"missed\"\n\tOverlap SkipReason = \"overlap\"\n)\n```\nDefines values for SkipReason.\n\n```go\nfunc (e SkipReason) Valid() bool\n```\nValid indicates whether the value is a known member of the SkipReason enum.\n\n```go\ntype SortOrder string\n```\nSortOrder defines model for SortOrder.\n\n```go\nconst (\n\tSortOrderAsc  SortOrder = \"asc\"\n\tSortOrderDesc SortOrder = \"desc\"\n)\n```\nDefines values for SortOrder.\n\n```go\nfunc (e SortOrder) Valid() bool\n```\nValid indicates whether the value is a known member of the SortOrder enum.\n\n```go\ntype StartWorkflowRun struct {\n\t// IdempotencyKey Deduplicates runs of the workflow.\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\n\t// Input JSON passed to every step that has no body of its own.\n\tInput *json.RawMessage `json:\"input,omitempty\"`\n}\n```\nStartWorkflowRun defines model for StartWorkflowRun.\n\n```go\ntype StartWorkflowRun200JSONResponse WorkflowRun\n```\n\n```go\nfunc (response StartWorkflowRun200JSONResponse) VisitStartWorkflowRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype StartWorkflowRun201JSONResponse WorkflowRun\n```\n\n```go\nfunc (response StartWorkflowRun201JSONResponse) VisitStartWorkflowRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype StartWorkflowRunJSONRequestBody = StartWorkflowRun\n```\nStartWorkflowRunJSONRequestBody defines body for StartWorkflowRun for application/json ContentType.\n\n```go\ntype StartWorkflowRunRequestObject struct {\n\tWorkflow WorkflowName `json:\"workflow\"`\n\tBody     *StartWorkflowRunJSONRequestBody\n}\n```\n\n```go\ntype StartWorkflowRunResponseObject interface {\n\tVisitStartWorkflowRunResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype StartWorkflowRundefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response StartWorkflowRundefaultJSONResponse) VisitStartWorkflowRunResponse(w http.ResponseWriter) error\n```\n\n```go\ntype StdHTTPServerOptions struct {\n\tBaseURL          string\n\tBaseRouter       ServeMux\n\tMiddlewares      []MiddlewareFunc\n\tErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)\n}\n```\n\n```go\ntype StepStatus string\n```\nStepStatus \\`blocked\\` waits for its dependencies; \\`pending\\` has its task enqueued (or retrying); \\`running\\` is being delivered; \\`waiting\\` succeeded and waits for the resource its response named in \\`Workly-Wait-For\\`; \\`skipped\\` never ran, or stopped waiting, because the run stopped.\n\n```go\nconst (\n\tStepStatusBlocked   StepStatus = \"blocked\"\n\tStepStatusFailed    StepStatus = \"failed\"\n\tStepStatusPending   StepStatus = \"pending\"\n\tStepStatusRunning   StepStatus = \"running\"\n\tStepStatusSkipped   StepStatus = \"skipped\"\n\tStepStatusSucceeded StepStatus = \"succeeded\"\n\tStepStatusWaiting   StepStatus = \"waiting\"\n)\n```\nDefines values for StepStatus.\n\n```go\nfunc (e StepStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the StepStatus enum.\n\n```go\ntype StrictHTTPServerOptions struct {\n\tRequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)\n\tResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)\n}\n```\n\n```go\ntype StrictHandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, request any) (any, error)\n```\n\n```go\ntype StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc\n```\n\n```go\ntype StrictServerInterface interface {\n\t// GetHealthz Liveness probe\n\t// (GET /healthz)\n\tGetHealthz(ctx context.Context, request GetHealthzRequestObject) (GetHealthzResponseObject, error)\n\t// GetReadyz Readiness probe\n\t// (GET /readyz)\n\tGetReadyz(ctx context.Context, request GetReadyzRequestObject) (GetReadyzResponseObject, error)\n\t// GetActivity Count tasks created and finished over time\n\t// (GET /v1/activity)\n\tGetActivity(ctx context.Context, request GetActivityRequestObject) (GetActivityResponseObject, error)\n\t// ListAlertChannels List alert channels\n\t// (GET /v1/alert-channels)\n\tListAlertChannels(ctx context.Context, request ListAlertChannelsRequestObject) (ListAlertChannelsResponseObject, error)\n\t// CreateAlertChannel Add an alert channel\n\t// (POST /v1/alert-channels)\n\tCreateAlertChannel(ctx context.Context, request CreateAlertChannelRequestObject) (CreateAlertChannelResponseObject, error)\n\t// DeleteAlertChannel Remove an alert channel\n\t// (DELETE /v1/alert-channels/{id})\n\tDeleteAlertChannel(ctx context.Context, request DeleteAlertChannelRequestObject) (DeleteAlertChannelResponseObject, error)\n\t// TestAlertChannel Send a test alert\n\t// (POST /v1/alert-channels/{id}/test)\n\tTestAlertChannel(ctx context.Context, request TestAlertChannelRequestObject) (TestAlertChannelResponseObject, error)\n\t// PreviewCron Preview a cron timetable\n\t// (GET /v1/cron/preview)\n\tPreviewCron(ctx context.Context, request PreviewCronRequestObject) (PreviewCronResponseObject, error)\n\t// ListGroups List task groups\n\t// (GET /v1/groups)\n\tListGroups(ctx context.Context, request ListGroupsRequestObject) (ListGroupsResponseObject, error)\n\t// CreateGroup Create a task group\n\t// (POST /v1/groups)\n\tCreateGroup(ctx context.Context, request CreateGroupRequestObject) (CreateGroupResponseObject, error)\n\t// GetGroup Get a task group\n\t// (GET /v1/groups/{id})\n\tGetGroup(ctx context.Context, request GetGroupRequestObject) (GetGroupResponseObject, error)\n\t// CloseGroup Close a task group\n\t// (POST /v1/groups/{id}/close)\n\tCloseGroup(ctx context.Context, request CloseGroupRequestObject) (CloseGroupResponseObject, error)\n\t// ListQueues List queues\n\t// (GET /v1/queues)\n\tListQueues(ctx context.Context, request ListQueuesRequestObject) (ListQueuesResponseObject, error)\n\t// DeleteQueue Delete a queue and all its tasks\n\t// (DELETE /v1/queues/{queue})\n\tDeleteQueue(ctx context.Context, request DeleteQueueRequestObject) (DeleteQueueResponseObject, error)\n\t// GetQueue Get a queue\n\t// (GET /v1/queues/{queue})\n\tGetQueue(ctx context.Context, request GetQueueRequestObject) (GetQueueResponseObject, error)\n\t// PutQueue Create or update a queue\n\t// (PUT /v1/queues/{queue})\n\tPutQueue(ctx context.Context, request PutQueueRequestObject) (PutQueueResponseObject, error)\n\t// GetQueueActivity Count a queue's finished tasks\n\t// (GET /v1/queues/{queue}/activity)\n\tGetQueueActivity(ctx context.Context, request GetQueueActivityRequestObject) (GetQueueActivityResponseObject, error)\n\t// CancelPendingTasks Cancel a queue's pending tasks\n\t// (POST /v1/queues/{queue}/cancel-pending)\n\tCancelPendingTasks(ctx context.Context, request CancelPendingTasksRequestObject) (CancelPendingTasksResponseObject, error)\n\t// GetQueueFailures Group a queue's failed tasks by error\n\t// (GET /v1/queues/{queue}/failures)\n\tGetQueueFailures(ctx context.Context, request GetQueueFailuresRequestObject) (GetQueueFailuresResponseObject, error)\n\t// PauseQueue Pause a queue\n\t// (POST /v1/queues/{queue}/pause)\n\tPauseQueue(ctx context.Context, request PauseQueueRequestObject) (PauseQueueResponseObject, error)\n\t// ResumeQueue Resume a paused queue\n\t// (POST /v1/queues/{queue}/resume)\n\tResumeQueue(ctx context.Context, request ResumeQueueRequestObject) (ResumeQueueResponseObject, error)\n\t// RetryFailedTasks Retry every failed task in a queue\n\t// (POST /v1/queues/{queue}/retry-failed)\n\tRetryFailedTasks(ctx context.Context, request RetryFailedTasksRequestObject) (RetryFailedTasksResponseObject, error)\n\t// ListTasks List a queue's tasks\n\t// (GET /v1/queues/{queue}/tasks)\n\tListTasks(ctx context.Context, request ListTasksRequestObject) (ListTasksResponseObject, error)\n\t// CreateTask Enqueue a task\n\t// (POST /v1/queues/{queue}/tasks)\n\tCreateTask(ctx context.Context, request CreateTaskRequestObject) (CreateTaskResponseObject, error)\n\t// CreateTasks Enqueue up to 100 tasks at once\n\t// (POST /v1/queues/{queue}/tasks:batch)\n\tCreateTasks(ctx context.Context, request CreateTasksRequestObject) (CreateTasksResponseObject, error)\n\t// ListRuns List runs, newest first\n\t// (GET /v1/runs)\n\tListRuns(ctx context.Context, request ListRunsRequestObject) (ListRunsResponseObject, error)\n\t// GetRun Get a run\n\t// (GET /v1/runs/{id})\n\tGetRun(ctx context.Context, request GetRunRequestObject) (GetRunResponseObject, error)\n\t// ListRunAttempts List a run's delivery attempts, oldest first\n\t// (GET /v1/runs/{id}/attempts)\n\tListRunAttempts(ctx context.Context, request ListRunAttemptsRequestObject) (ListRunAttemptsResponseObject, error)\n\t// CancelRun Cancel a run\n\t// (POST /v1/runs/{id}/cancel)\n\tCancelRun(ctx context.Context, request CancelRunRequestObject) (CancelRunResponseObject, error)\n\t// GetRunDelivery Get the request that delivers a run\n\t// (GET /v1/runs/{id}/delivery)\n\tGetRunDelivery(ctx context.Context, request GetRunDeliveryRequestObject) (GetRunDeliveryResponseObject, error)\n\t// RetryRun Retry a run now\n\t// (POST /v1/runs/{id}/retry)\n\tRetryRun(ctx context.Context, request RetryRunRequestObject) (RetryRunResponseObject, error)\n\t// ListSchedules List schedules\n\t// (GET /v1/schedules)\n\tListSchedules(ctx context.Context, request ListSchedulesRequestObject) (ListSchedulesResponseObject, error)\n\t// DeleteSchedule Delete a schedule and all its runs\n\t// (DELETE /v1/schedules/{schedule})\n\tDeleteSchedule(ctx context.Context, request DeleteScheduleRequestObject) (DeleteScheduleResponseObject, error)\n\t// GetSchedule Get a schedule\n\t// (GET /v1/schedules/{schedule})\n\tGetSchedule(ctx context.Context, request GetScheduleRequestObject) (GetScheduleResponseObject, error)\n\t// PutSchedule Create or update a schedule\n\t// (PUT /v1/schedules/{schedule})\n\tPutSchedule(ctx context.Context, request PutScheduleRequestObject) (PutScheduleResponseObject, error)\n\t// PauseSchedule Pause a schedule\n\t// (POST /v1/schedules/{schedule}/pause)\n\tPauseSchedule(ctx context.Context, request PauseScheduleRequestObject) (PauseScheduleResponseObject, error)\n\t// ResumeSchedule Resume a paused schedule\n\t// (POST /v1/schedules/{schedule}/resume)\n\tResumeSchedule(ctx context.Context, request ResumeScheduleRequestObject) (ResumeScheduleResponseObject, error)\n\t// TriggerSchedule Run a schedule now\n\t// (POST /v1/schedules/{schedule}/trigger)\n\tTriggerSchedule(ctx context.Context, request TriggerScheduleRequestObject) (TriggerScheduleResponseObject, error)\n\t// SearchTasks Search tasks across queues\n\t// (GET /v1/tasks)\n\tSearchTasks(ctx context.Context, request SearchTasksRequestObject) (SearchTasksResponseObject, error)\n\t// GetTask Get a task\n\t// (GET /v1/tasks/{id})\n\tGetTask(ctx context.Context, request GetTaskRequestObject) (GetTaskResponseObject, error)\n\t// ListAttempts List a task's delivery attempts, oldest first\n\t// (GET /v1/tasks/{id}/attempts)\n\tListAttempts(ctx context.Context, request ListAttemptsRequestObject) (ListAttemptsResponseObject, error)\n\t// CancelTask Cancel a task\n\t// (POST /v1/tasks/{id}/cancel)\n\tCancelTask(ctx context.Context, request CancelTaskRequestObject) (CancelTaskResponseObject, error)\n\t// GetTaskDelivery Get the request that delivers a task\n\t// (GET /v1/tasks/{id}/delivery)\n\tGetTaskDelivery(ctx context.Context, request GetTaskDeliveryRequestObject) (GetTaskDeliveryResponseObject, error)\n\t// RetryTask Retry a task now\n\t// (POST /v1/tasks/{id}/retry)\n\tRetryTask(ctx context.Context, request RetryTaskRequestObject) (RetryTaskResponseObject, error)\n\t// ListWorkflowRuns List workflow runs, newest first\n\t// (GET /v1/workflow-runs)\n\tListWorkflowRuns(ctx context.Context, request ListWorkflowRunsRequestObject) (ListWorkflowRunsResponseObject, error)\n\t// GetWorkflowRun Get a workflow run with its steps\n\t// (GET /v1/workflow-runs/{id})\n\tGetWorkflowRun(ctx context.Context, request GetWorkflowRunRequestObject) (GetWorkflowRunResponseObject, error)\n\t// CancelWorkflowRun Cancel a workflow run\n\t// (POST /v1/workflow-runs/{id}/cancel)\n\tCancelWorkflowRun(ctx context.Context, request CancelWorkflowRunRequestObject) (CancelWorkflowRunResponseObject, error)\n\t// RetryWorkflowRun Retry a workflow run\n\t// (POST /v1/workflow-runs/{id}/retry)\n\tRetryWorkflowRun(ctx context.Context, request RetryWorkflowRunRequestObject) (RetryWorkflowRunResponseObject, error)\n\t// ListWorkflows List workflows\n\t// (GET /v1/workflows)\n\tListWorkflows(ctx context.Context, request ListWorkflowsRequestObject) (ListWorkflowsResponseObject, error)\n\t// DeleteWorkflow Delete a workflow\n\t// (DELETE /v1/workflows/{workflow})\n\tDeleteWorkflow(ctx context.Context, request DeleteWorkflowRequestObject) (DeleteWorkflowResponseObject, error)\n\t// GetWorkflow Get a workflow\n\t// (GET /v1/workflows/{workflow})\n\tGetWorkflow(ctx context.Context, request GetWorkflowRequestObject) (GetWorkflowResponseObject, error)\n\t// PutWorkflow Create or update a workflow\n\t// (PUT /v1/workflows/{workflow})\n\tPutWorkflow(ctx context.Context, request PutWorkflowRequestObject) (PutWorkflowResponseObject, error)\n\t// StartWorkflowRun Start a workflow run\n\t// (POST /v1/workflows/{workflow}/runs)\n\tStartWorkflowRun(ctx context.Context, request StartWorkflowRunRequestObject) (StartWorkflowRunResponseObject, error)\n}\n```\nStrictServerInterface represents all server handlers.\n\n```go\ntype Task struct {\n\tAttemptCount int `json:\"attempt_count\"`\n\n\t// Body The body, when it is not JSON.\n\tBody *string `json:\"body,omitempty\"`\n\n\t// CallbackTaskId The callback task enqueued when the task last finished, if it has `on_complete`.\n\tCallbackTaskId *string   `json:\"callback_task_id,omitempty\"`\n\tCreatedAt      time.Time `json:\"created_at\"`\n\n\t// FinishedAt When the task succeeded, failed or was cancelled.\n\tFinishedAt *time.Time `json:\"finished_at,omitempty\"`\n\n\t// GroupId The group the task belongs to, if any.\n\tGroupId *string           `json:\"group_id,omitempty\"`\n\tHeaders map[string]string `json:\"headers\"`\n\n\t// Id Example: task_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId             string  `json:\"id\"`\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\n\t// LastAttemptAt When the latest attempt finished. Absent before the first attempt.\n\tLastAttemptAt *time.Time `json:\"last_attempt_at,omitempty\"`\n\n\t// LastDurationMs How long the latest finished attempt took. Absent before the first attempt finishes.\n\tLastDurationMs *int    `json:\"last_duration_ms,omitempty\"`\n\tLastError      *string `json:\"last_error,omitempty\"`\n\n\t// LastOutcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tLastOutcome *Outcome `json:\"last_outcome,omitempty\"`\n\n\t// LastStatus HTTP status of the latest attempt, if it got a response.\n\tLastStatus *int `json:\"last_status,omitempty\"`\n\n\t// MaxAttempts Per-task override, if set.\n\tMaxAttempts *int       `json:\"max_attempts,omitempty\"`\n\tMethod      HTTPMethod `json:\"method\"`\n\n\t// OnComplete A task Workly enqueues when something completes: a `POST` to `url`\n\t// whose JSON body says what completed (`TaskSummary` for a task,\n\t// `RunSummary` for a schedule's run, `GroupSummary` for a group).\n\t// Callbacks go to `_callbacks`, a queue Workly creates for them,\n\t// and are delivered like any task in it, with its retries; its\n\t// settings can be changed like any queue's.\n\t//\n\t// A task's or a schedule's callback is called each time the task or\n\t// a run succeeds, fails or is cancelled, and again if it is retried\n\t// by hand and finishes again; skipped runs don't call it. A group's\n\t// is called once, when the group completes.\n\tOnComplete *Callback `json:\"on_complete,omitempty\"`\n\n\t// Payload The body, when it is JSON.\n\tPayload *json.RawMessage `json:\"payload,omitempty\"`\n\tQueue   string           `json:\"queue\"`\n\n\t// RetriedAt When the task was last retried by hand (`POST /v1/tasks/{id}/retry`\n\t// or `POST /v1/queues/{queue}/retry-failed`). Absent if never.\n\tRetriedAt *time.Time `json:\"retried_at,omitempty\"`\n\n\t// RunAt When the task is next eligible for delivery.\n\tRunAt time.Time `json:\"run_at\"`\n\n\t// StartedAt When the first delivery attempt started; `started_at` minus\n\t// `created_at` is how long the task waited in the queue. Retries by\n\t// hand don't change it. Absent before the first attempt.\n\tStartedAt *time.Time `json:\"started_at,omitempty\"`\n\n\t// State A `pending` task with `run_at` in the future is scheduled. A `failed`\n\t// task has exhausted its attempts or got a non-retryable response.\n\tState TaskState `json:\"state\"`\n\n\t// TimeoutSeconds Per-task override, if set.\n\tTimeoutSeconds *float64  `json:\"timeout_seconds,omitempty\"`\n\tUpdatedAt      time.Time `json:\"updated_at\"`\n\tUrl            string    `json:\"url\"`\n\n\t// WorkflowStep The workflow step a task delivers, if it is one. A step's task can't be\n\t// retried on its own: retry its workflow run instead.\n\tWorkflowStep *TaskWorkflowStep `json:\"workflow_step,omitempty\"`\n}\n```\nTask defines model for Task.\n\n```go\ntype TaskID = string\n```\nTaskID defines model for TaskID.\n\n```go\ntype TaskList struct {\n\t// NextCursor Pass as `cursor` to get the next page. Absent on the last page.\n\tNextCursor *string `json:\"next_cursor,omitempty\"`\n\tTasks      []Task  `json:\"tasks\"`\n}\n```\nTaskList defines model for TaskList.\n\n```go\ntype TaskSort string\n```\nTaskSort defines model for TaskSort.\n\n```go\nconst (\n\tTaskSortAttemptCount  TaskSort = \"attempt_count\"\n\tTaskSortCreatedAt     TaskSort = \"created_at\"\n\tTaskSortLastAttemptAt TaskSort = \"last_attempt_at\"\n\tTaskSortRunAt         TaskSort = \"run_at\"\n)\n```\nDefines values for TaskSort.\n\n```go\nfunc (e TaskSort) Valid() bool\n```\nValid indicates whether the value is a known member of the TaskSort enum.\n\n```go\ntype TaskState string\n```\nTaskState A \\`pending\\` task with \\`run\\_at\\` in the future is scheduled. A \\`failed\\` task has exhausted its attempts or got a non-retryable response.\n\n```go\nconst (\n\tTaskStateCancelled TaskState = \"cancelled\"\n\tTaskStateFailed    TaskState = \"failed\"\n\tTaskStatePending   TaskState = \"pending\"\n\tTaskStateRunning   TaskState = \"running\"\n\tTaskStateSucceeded TaskState = \"succeeded\"\n)\n```\nDefines values for TaskState.\n\n```go\nfunc (e TaskState) Valid() bool\n```\nValid indicates whether the value is a known member of the TaskState enum.\n\n```go\ntype TaskWorkflowStep struct {\n\t// Id The step, `wfs_…`.\n\t//\n\t// Example: wfs_01M7AH8EPATE4EPK37FWTA5TBQ\n\tId string `json:\"id\"`\n\n\t// Name The step's name in its workflow.\n\tName string `json:\"name\"`\n\n\t// RunId The workflow run, `wfr_…`.\n\t//\n\t// Example: wfr_01M7AH8EP90ZQ4E9228337GGVR\n\tRunId    string `json:\"run_id\"`\n\tWorkflow string `json:\"workflow\"`\n}\n```\nTaskWorkflowStep The workflow step a task delivers, if it is one. A step's task can't be retried on its own: retry its workflow run instead.\n\n```go\ntype TestAlertChannel204Response struct {\n}\n```\n\n```go\nfunc (response TestAlertChannel204Response) VisitTestAlertChannelResponse(w http.ResponseWriter) error\n```\n\n```go\ntype TestAlertChannelRequestObject struct {\n\tId AlertChannelID `json:\"id\"`\n}\n```\n\n```go\ntype TestAlertChannelResponseObject interface {\n\tVisitTestAlertChannelResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype TestAlertChanneldefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response TestAlertChanneldefaultJSONResponse) VisitTestAlertChannelResponse(w http.ResponseWriter) error\n```\n\n```go\ntype TooManyValuesForParamError struct {\n\tParamName string\n\tCount     int\n}\n```\n\n```go\nfunc (e *TooManyValuesForParamError) Error() string\n```\n\n```go\ntype TriggerSchedule201JSONResponse Run\n```\n\n```go\nfunc (response TriggerSchedule201JSONResponse) VisitTriggerScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype TriggerScheduleRequestObject struct {\n\tSchedule ScheduleName `json:\"schedule\"`\n}\n```\n\n```go\ntype TriggerScheduleResponseObject interface {\n\tVisitTriggerScheduleResponse(w http.ResponseWriter) error\n}\n```\n\n```go\ntype TriggerScheduledefaultJSONResponse struct {\n\tBody       Error\n\tStatusCode int\n}\n```\n\n```go\nfunc (response TriggerScheduledefaultJSONResponse) VisitTriggerScheduleResponse(w http.ResponseWriter) error\n```\n\n```go\ntype UnescapedCookieParamError struct {\n\tParamName string\n\tErr       error\n}\n```\n\n```go\nfunc (e *UnescapedCookieParamError) Error() string\n```\n\n```go\nfunc (e *UnescapedCookieParamError) Unwrap() error\n```\n\n```go\ntype UnmarshalingParamError struct {\n\tParamName string\n\tErr       error\n}\n```\n\n```go\nfunc (e *UnmarshalingParamError) Error() string\n```\n\n```go\nfunc (e *UnmarshalingParamError) Unwrap() error\n```\n\n```go\ntype WaitFor struct {\n\tId   string      `json:\"id\"`\n\tType WaitForType `json:\"type\"`\n}\n```\nWaitFor The resource a step handed its completion to.\n\n```go\ntype WaitForType string\n```\nWaitForType defines model for WaitFor.Type.\n\n```go\nconst (\n\tWaitForTypeGroup WaitForType = \"group\"\n)\n```\nDefines values for WaitForType.\n\n```go\nfunc (e WaitForType) Valid() bool\n```\nValid indicates whether the value is a known member of the WaitForType enum.\n\n```go\ntype Workflow struct {\n\tCreatedAt          time.Time            `json:\"created_at\"`\n\tLastRun            *WorkflowRunSummary  `json:\"last_run,omitempty\"`\n\tMaxDurationSeconds float64              `json:\"max_duration_seconds\"`\n\tName               string               `json:\"name\"`\n\tSteps              []WorkflowStepConfig `json:\"steps\"`\n\tUpdatedAt          time.Time            `json:\"updated_at\"`\n\n\t// Version Counts changes to the definition, from 1.\n\tVersion int `json:\"version\"`\n}\n```\nWorkflow defines model for Workflow.\n\n```go\ntype WorkflowConfig struct {\n\t// MaxDurationSeconds How long a run may take. A run still going after it fails, and a\n\t// step still waiting fails with it.\n\tMaxDurationSeconds *float64 `json:\"max_duration_seconds,omitempty\"`\n\n\t// Steps The steps, which must form a DAG.\n\tSteps []WorkflowStepConfig `json:\"steps\"`\n}\n```\nWorkflowConfig defines model for WorkflowConfig.\n\n```go\ntype WorkflowList struct {\n\tWorkflows []Workflow `json:\"workflows\"`\n}\n```\nWorkflowList defines model for WorkflowList.\n\n```go\ntype WorkflowName = string\n```\nWorkflowName defines model for WorkflowName.\n\n```go\ntype WorkflowRun struct {\n\t// Attempt 1, plus one for each time the run was retried. Steps are sent it\n\t// as `Workly-Workflow-Run-Attempt`.\n\tAttempt   int       `json:\"attempt\"`\n\tCreatedAt time.Time `json:\"created_at\"`\n\n\t// DeadlineAt When a run still going fails (`max_duration_seconds`).\n\tDeadlineAt *time.Time `json:\"deadline_at,omitempty\"`\n\n\t// DurationMs From start to finish, or to now while running.\n\tDurationMs *int `json:\"duration_ms,omitempty\"`\n\n\t// Error Why the run failed or was cancelled.\n\tError      *string    `json:\"error,omitempty\"`\n\tFinishedAt *time.Time `json:\"finished_at,omitempty\"`\n\n\t// Id Example: wfr_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId             string           `json:\"id\"`\n\tIdempotencyKey *string          `json:\"idempotency_key,omitempty\"`\n\tInput          *json.RawMessage `json:\"input,omitempty\"`\n\n\t// RetriedAt When the run was last retried. Absent if never.\n\tRetriedAt *time.Time `json:\"retried_at,omitempty\"`\n\n\t// ScheduleRunId The schedule run that started it, if any.\n\tScheduleRunId *string           `json:\"schedule_run_id,omitempty\"`\n\tStatus        WorkflowRunStatus `json:\"status\"`\n\n\t// Steps In definition order.\n\tSteps    []WorkflowStep `json:\"steps\"`\n\tVersion  int            `json:\"version\"`\n\tWorkflow string         `json:\"workflow\"`\n}\n```\nWorkflowRun defines model for WorkflowRun.\n\n```go\ntype WorkflowRunID = string\n```\nWorkflowRunID defines model for WorkflowRunID.\n\n```go\ntype WorkflowRunList struct {\n\t// NextCursor Pass as `cursor` to get the next page. Absent on the last page.\n\tNextCursor   *string              `json:\"next_cursor,omitempty\"`\n\tWorkflowRuns []WorkflowRunSummary `json:\"workflow_runs\"`\n}\n```\nWorkflowRunList defines model for WorkflowRunList.\n\n```go\ntype WorkflowRunStatus string\n```\nWorkflowRunStatus defines model for WorkflowRunStatus.\n\n```go\nconst (\n\tWorkflowRunStatusCancelled WorkflowRunStatus = \"cancelled\"\n\tWorkflowRunStatusFailed    WorkflowRunStatus = \"failed\"\n\tWorkflowRunStatusRunning   WorkflowRunStatus = \"running\"\n\tWorkflowRunStatusSucceeded WorkflowRunStatus = \"succeeded\"\n)\n```\nDefines values for WorkflowRunStatus.\n\n```go\nfunc (e WorkflowRunStatus) Valid() bool\n```\nValid indicates whether the value is a known member of the WorkflowRunStatus enum.\n\n```go\ntype WorkflowRunSummary struct {\n\t// Attempt 1, plus one for each time the run was retried. Steps are sent it\n\t// as `Workly-Workflow-Run-Attempt`.\n\tAttempt   int       `json:\"attempt\"`\n\tCreatedAt time.Time `json:\"created_at\"`\n\n\t// DeadlineAt When a run still going fails (`max_duration_seconds`).\n\tDeadlineAt *time.Time `json:\"deadline_at,omitempty\"`\n\n\t// DurationMs From start to finish, or to now while running.\n\tDurationMs *int `json:\"duration_ms,omitempty\"`\n\n\t// Error Why the run failed or was cancelled.\n\tError      *string    `json:\"error,omitempty\"`\n\tFinishedAt *time.Time `json:\"finished_at,omitempty\"`\n\n\t// Id Example: wfr_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId             string  `json:\"id\"`\n\tIdempotencyKey *string `json:\"idempotency_key,omitempty\"`\n\n\t// RetriedAt When the run was last retried. Absent if never.\n\tRetriedAt *time.Time `json:\"retried_at,omitempty\"`\n\n\t// ScheduleRunId The schedule run that started it, if any.\n\tScheduleRunId *string           `json:\"schedule_run_id,omitempty\"`\n\tStatus        WorkflowRunStatus `json:\"status\"`\n\tVersion       int               `json:\"version\"`\n\tWorkflow      string            `json:\"workflow\"`\n}\n```\nWorkflowRunSummary defines model for WorkflowRunSummary.\n\n```go\ntype WorkflowStep struct {\n\t// BlockedBy Dependencies that haven't succeeded yet.\n\tBlockedBy []string `json:\"blocked_by\"`\n\n\t// BlockedMs Time spent waiting for dependencies.\n\tBlockedMs *int       `json:\"blocked_ms,omitempty\"`\n\tCreatedAt *time.Time `json:\"created_at,omitempty\"`\n\tDependsOn []string   `json:\"depends_on\"`\n\n\t// DurationMs From its task being enqueued to the step finishing (or now).\n\tDurationMs *int       `json:\"duration_ms,omitempty\"`\n\tError      *string    `json:\"error,omitempty\"`\n\tFinishedAt *time.Time `json:\"finished_at,omitempty\"`\n\n\t// HttpDoneAt When its request succeeded.\n\tHttpDoneAt *time.Time `json:\"http_done_at,omitempty\"`\n\n\t// Id Example: wfs_01J9ZK3M5Q8R2T4V6W8X0Y2Z4A\n\tId   string `json:\"id\"`\n\tName string `json:\"name\"`\n\n\t// ReadyAt When its task was enqueued.\n\tReadyAt *time.Time `json:\"ready_at,omitempty\"`\n\n\t// Status `blocked` waits for its dependencies; `pending` has its task\n\t// enqueued (or retrying); `running` is being delivered; `waiting`\n\t// succeeded and waits for the resource its response named in\n\t// `Workly-Wait-For`; `skipped` never ran, or stopped waiting, because\n\t// the run stopped.\n\tStatus StepStatus `json:\"status\"`\n\n\t// Task The step's task, which records its attempts.\n\tTask   *WorkflowStepTask `json:\"task,omitempty\"`\n\tTaskId *string           `json:\"task_id,omitempty\"`\n\n\t// WaitFor The resource a step handed its completion to.\n\tWaitFor *WaitFor `json:\"wait_for,omitempty\"`\n\n\t// WaitingMs Time spent waiting for the `wait_for` resource.\n\tWaitingMs *int `json:\"waiting_ms,omitempty\"`\n}\n```\nWorkflowStep defines model for WorkflowStep.\n\n```go\ntype WorkflowStepConfig struct {\n\t// Body A raw text body. Use this or `payload`.\n\tBody *string `json:\"body,omitempty\"`\n\n\t// ContentType Content type of `body`. Defaults to `text/plain; charset=utf-8`.\n\tContentType *string `json:\"content_type,omitempty\"`\n\n\t// DependsOn Steps that must succeed before this one starts.\n\tDependsOn *[]string `json:\"depends_on,omitempty\"`\n\n\t// Headers `Workly-*` headers are reserved.\n\tHeaders *map[string]string `json:\"headers,omitempty\"`\n\n\t// MaxAttempts Overrides the queue's max attempts.\n\tMaxAttempts *int        `json:\"max_attempts,omitempty\"`\n\tMethod      *HTTPMethod `json:\"method,omitempty\"`\n\n\t// Name Unique within the workflow. Lowercase letters, digits, `-` and `_`; at most 64 characters.\n\t//\n\t// Example: prices\n\tName string `json:\"name\"`\n\n\t// Payload A JSON body, sent with `Content-Type: application/json`. Use this or `body`.\n\tPayload *json.RawMessage `json:\"payload,omitempty\"`\n\n\t// Queue The queue the step's task goes to, for its retry policy, timeout\n\t// and rate and concurrency limits. `_workflows` is created on\n\t// demand; another queue must exist when the step starts.\n\tQueue *string `json:\"queue,omitempty\"`\n\n\t// TimeoutSeconds Overrides the queue's timeout.\n\tTimeoutSeconds *float64 `json:\"timeout_seconds,omitempty\"`\n\n\t// Url Example: https://api.example.com/jobs/prices\n\tUrl string `json:\"url\"`\n}\n```\nWorkflowStepConfig A step: an HTTP request, sent as a task once every step in \\`depends\\_on\\` has succeeded. The request fields (\\`url\\` to \\`content\\_type\\`) work as in \\`EnqueueRequest\\`. A step without \\`payload\\` or \\`body\\` is sent the run's context as JSON (\\`workflow\\_run\\_id\\`, \\`workflow\\`, \\`step\\`, \\`step\\_id\\`, \\`run\\_attempt\\`, \\`input\\`); every step gets the \\`Workly-Workflow\\`, \\`Workly-Workflow-Run-Id\\`, \\`Workly-Workflow-Step\\`, \\`Workly-Workflow-Step-Id\\` and \\`Workly-Workflow-Run-Attempt\\` headers. The step ID is the same on every delivery of the step, so it can serve as an idempotency key; with the run attempt, it keys work that a retried run should redo.\n\n```go\ntype WorkflowStepTask struct {\n\tAttemptCount int     `json:\"attempt_count\"`\n\tId           string  `json:\"id\"`\n\tLastError    *string `json:\"last_error,omitempty\"`\n\n\t// LastOutcome How a delivery attempt ended. `lost` means the result is unknown: the\n\t// dispatcher crashed or shut down mid-delivery, and the endpoint may\n\t// have processed the request.\n\tLastOutcome *Outcome `json:\"last_outcome,omitempty\"`\n\tLastStatus  *int     `json:\"last_status,omitempty\"`\n\tQueue       string   `json:\"queue\"`\n\n\t// RunAt When a pending task is next delivered.\n\tRunAt *time.Time `json:\"run_at,omitempty\"`\n\n\t// State A `pending` task with `run_at` in the future is scheduled. A `failed`\n\t// task has exhausted its attempts or got a non-retryable response.\n\tState TaskState `json:\"state\"`\n}\n```\nWorkflowStepTask The step's task, which records its attempts.\n\n","path":"github.com/worklydev/workly/internal/api","name":"api","synopsis":"Package api provides primitives to interact with the openapi HTTP API.","isRedistributable":true}
