diff --git a/data/specs/api/openapi.yml b/data/specs/api/openapi.yml index 59a72efb9..2fc2b6887 100644 --- a/data/specs/api/openapi.yml +++ b/data/specs/api/openapi.yml @@ -229,6 +229,46 @@ components: type: array x-struct: null x-validate: null + ListWorkflowRecipientRunsResponse: + description: A paginated list of workflow recipient runs. + example: + items: + - __typename: WorkflowRecipientRun + actor: user_456 + error_count: 0 + id: 550e8400-e29b-41d4-a716-446655440000 + inserted_at: "2025-01-01T00:00:00Z" + recipient: user_123 + status: completed + tenant: tenant_abc + trigger_source: + cancellation_key: comment-123-user-456 + type: api + updated_at: "2025-01-01T00:05:00Z" + workflow: comment-created + workflow_run_id: 660e8400-e29b-41d4-a716-446655440000 + page_info: + __typename: PageInfo + after: null + before: null + page_size: 25 + properties: + items: + description: A list of workflow recipient runs. + items: + $ref: '#/components/schemas/WorkflowRecipientRun' + type: array + x-struct: null + x-validate: null + page_info: + $ref: '#/components/schemas/PageInfo' + required: + - items + - page_info + title: ListWorkflowRecipientRunsResponse + type: object + x-struct: Elixir.SwitchboardWeb.V1.Specs.ListWorkflowRecipientRunsResponse + x-validate: null PreferenceSetWorkflowCategorySettingObject: description: The settings object for a workflow or category, where you can specify channel types or conditions. example: @@ -1204,6 +1244,49 @@ components: type: object x-struct: Elixir.SwitchboardWeb.V1.Specs.DiscordChannelData x-validate: null + WorkflowRecipientRunTriggerSource: + description: Describes how the workflow was triggered. + example: + cancellation_key: comment-123-user-456 + type: api + properties: + audience_key: + description: The key of the audience that triggered the workflow. + nullable: true + type: string + x-struct: null + x-validate: null + cancellation_key: + description: The cancellation key provided when the workflow was triggered via the API. + nullable: true + type: string + x-struct: null + x-validate: null + schedule_id: + description: The ID of the schedule that triggered the workflow. + nullable: true + type: string + x-struct: null + x-validate: null + type: + description: The type of trigger source. One of `api`, `audience`, `schedule`, `broadcast`, `workflow_step`, `integration`, or `rehearsal`. + enum: + - api + - audience + - schedule + - broadcast + - workflow_step + - integration + - rehearsal + type: string + x-struct: null + x-validate: null + required: + - type + title: WorkflowRecipientRunTriggerSource + type: object + x-struct: Elixir.SwitchboardWeb.V1.Specs.WorkflowRecipientRunTriggerSource + x-validate: null BulkDeleteUsersRequest: description: A request to delete users in bulk. example: @@ -1979,46 +2062,6 @@ components: type: object x-struct: Elixir.SwitchboardWeb.V1.Specs.PreferenceSet x-validate: null - ListWorkflowRunsResponse: - description: A paginated list of workflow runs. - example: - items: - - __typename: WorkflowRun - actor: user_456 - error_count: 0 - id: 550e8400-e29b-41d4-a716-446655440000 - inserted_at: "2025-01-01T00:00:00Z" - recipient: user_123 - status: completed - tenant: tenant_abc - trigger_source: - cancellation_key: comment-123-user-456 - type: api - updated_at: "2025-01-01T00:05:00Z" - workflow_key: comment-created - workflow_run_id: 660e8400-e29b-41d4-a716-446655440000 - page_info: - __typename: PageInfo - after: null - before: null - page_size: 25 - properties: - items: - description: A list of workflow runs. - items: - $ref: '#/components/schemas/WorkflowRun' - type: array - x-struct: null - x-validate: null - page_info: - $ref: '#/components/schemas/PageInfo' - required: - - items - - page_info - title: ListWorkflowRunsResponse - type: object - x-struct: Elixir.SwitchboardWeb.V1.Specs.ListWorkflowRunsResponse - x-validate: null ScheduleRepeatRule: description: The repeat rule for the schedule. example: @@ -2113,6 +2156,92 @@ components: type: object x-struct: Elixir.SwitchboardWeb.V1.Specs.ScheduleRepeatRule x-validate: null + WorkflowRecipientRunEvent: + description: An event that occurred during a workflow recipient run. + example: + __typename: WorkflowRecipientRunEvent + attempt: 1 + data: + channel_type: email + message_id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe + event: message_enqueued + id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe + inserted_at: "2025-01-01T00:00:00Z" + status: ok + step_ref: email_step_1 + step_type: channel + properties: + __typename: + description: The typename of the schema. + example: WorkflowRecipientRunEvent + type: string + x-struct: null + x-validate: null + attempt: + description: The attempt number of the workflow recipient run event. Increments for each retry. + example: 1 + type: integer + x-struct: null + x-validate: null + data: + additionalProperties: true + description: Event-specific data associated with the event. + nullable: true + type: object + x-struct: null + x-validate: null + event: + description: The type of event that occurred. + example: message_enqueued + type: string + x-struct: null + x-validate: null + id: + description: The unique identifier for the event. + example: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe + type: string + x-struct: null + x-validate: null + inserted_at: + description: Timestamp when the resource was created. + example: "2025-01-01T00:00:00Z" + format: date-time + type: string + x-struct: null + x-validate: null + status: + description: Whether the event represents a successful or error state. + enum: + - ok + - error + example: ok + type: string + x-struct: null + x-validate: null + step_ref: + description: The reference of the workflow step associated with this event. + example: email_step_1 + nullable: true + type: string + x-struct: null + x-validate: null + step_type: + description: The type of workflow step associated with this event. + example: channel + nullable: true + type: string + x-struct: null + x-validate: null + required: + - __typename + - id + - event + - status + - inserted_at + title: WorkflowRecipientRunEvent + type: object + x-struct: Elixir.SwitchboardWeb.V1.Specs.WorkflowRecipientRunEvent + x-validate: null CreateSchedulesRequest: description: A request to create a schedule. example: @@ -4401,53 +4530,6 @@ components: type: object x-struct: Elixir.SwitchboardWeb.V1.Specs.MessageSmsContent x-validate: null - WorkflowRunDetail: - allOf: - - $ref: '#/components/schemas/WorkflowRun' - - properties: - events: - description: A list of events that occurred during the workflow run. - items: - $ref: '#/components/schemas/WorkflowRunEvent' - type: array - x-struct: null - x-validate: null - required: - - events - type: object - x-struct: null - x-validate: null - description: A single workflow run with its events. - example: - __typename: WorkflowRun - actor: user_456 - error_count: 0 - events: - - __typename: WorkflowRunEvent - attempt: 1 - data: - channel_type: email - message_id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - event: message_enqueued - id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2025-01-01T00:00:00Z" - status: ok - step_ref: email_step_1 - step_type: channel - id: 550e8400-e29b-41d4-a716-446655440000 - inserted_at: "2025-01-01T00:00:00Z" - recipient: user_123 - status: completed - tenant: tenant_abc - trigger_source: - cancellation_key: comment-123-user-456 - type: api - updated_at: "2025-01-01T00:05:00Z" - workflow_key: comment-created - workflow_run_id: 660e8400-e29b-41d4-a716-446655440000 - title: WorkflowRunDetail - x-struct: Elixir.SwitchboardWeb.V1.Specs.WorkflowRunDetail - x-validate: null PreferenceSetCategories: additionalProperties: $ref: '#/components/schemas/PreferenceSetWorkflowCategorySetting' @@ -4704,44 +4786,152 @@ components: type: array x-struct: null x-validate: null - Activity: - description: An activity associated with a workflow trigger request. Messages produced after a [batch step](/designing-workflows/batch-function) can be associated with one or more activities. Non-batched messages will always be associated with a single activity. + WorkflowRecipientRun: + description: A workflow recipient run represents an individual execution of a workflow for a specific recipient. example: - __typename: Activity - actor: null - data: - foo: bar - id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2024-01-01T00:00:00Z" - recipient: - __typename: User - avatar: null - created_at: null - email: jane@ingen.net - id: jane - name: Jane Doe - phone_number: null - timezone: null - updated_at: "2024-05-22T12:00:00Z" - updated_at: "2024-01-01T00:00:00Z" + __typename: WorkflowRecipientRun + actor: user_456 + error_count: 0 + id: 550e8400-e29b-41d4-a716-446655440000 + inserted_at: "2025-01-01T00:00:00Z" + recipient: user_123 + status: completed + tenant: tenant_abc + trigger_source: + cancellation_key: comment-123-user-456 + type: api + updated_at: "2025-01-01T00:05:00Z" + workflow: comment-created + workflow_run_id: 660e8400-e29b-41d4-a716-446655440000 properties: __typename: description: The typename of the schema. - example: Activity + example: WorkflowRecipientRun type: string x-struct: null x-validate: null actor: - anyOf: + description: The actor who triggered the workflow recipient run. + oneOf: - $ref: '#/components/schemas/Recipient' - nullable: true x-struct: null x-validate: null - description: The actor who performed the activity. - type: object x-struct: null x-validate: null - data: + error_count: + description: The number of errors encountered during the workflow recipient run. + example: 0 + type: integer + x-struct: null + x-validate: null + id: + description: The unique identifier for the workflow recipient run (per-recipient). + format: uuid + type: string + x-struct: null + x-validate: null + inserted_at: + description: Timestamp when the resource was created. + example: "2025-01-01T00:00:00Z" + format: date-time + type: string + x-struct: null + x-validate: null + recipient: + $ref: '#/components/schemas/RecipientReference' + status: + description: The current status of the workflow recipient run. One of `queued`, `processing`, `paused`, `completed`, or `cancelled`. + enum: + - queued + - processing + - paused + - completed + - cancelled + example: completed + type: string + x-struct: null + x-validate: null + tenant: + description: The tenant associated with the workflow recipient run. + example: tenant_abc + nullable: true + type: string + x-struct: null + x-validate: null + trigger_source: + $ref: '#/components/schemas/WorkflowRecipientRunTriggerSource' + updated_at: + description: The timestamp when the resource was last updated. + example: "2025-01-01T00:05:00Z" + format: date-time + type: string + x-struct: null + x-validate: null + workflow: + description: The key of the workflow that was executed. + example: comment-created + type: string + x-struct: null + x-validate: null + workflow_run_id: + description: The identifier for the top-level workflow run shared across all recipients in a single trigger. + format: uuid + type: string + x-struct: null + x-validate: null + required: + - __typename + - id + - workflow_run_id + - workflow + - status + - recipient + - trigger_source + - inserted_at + - updated_at + title: WorkflowRecipientRun + type: object + x-struct: Elixir.SwitchboardWeb.V1.Specs.WorkflowRecipientRun + x-validate: null + Activity: + description: An activity associated with a workflow trigger request. Messages produced after a [batch step](/designing-workflows/batch-function) can be associated with one or more activities. Non-batched messages will always be associated with a single activity. + example: + __typename: Activity + actor: null + data: + foo: bar + id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe + inserted_at: "2024-01-01T00:00:00Z" + recipient: + __typename: User + avatar: null + created_at: null + email: jane@ingen.net + id: jane + name: Jane Doe + phone_number: null + timezone: null + updated_at: "2024-05-22T12:00:00Z" + updated_at: "2024-01-01T00:00:00Z" + properties: + __typename: + description: The typename of the schema. + example: Activity + type: string + x-struct: null + x-validate: null + actor: + anyOf: + - $ref: '#/components/schemas/Recipient' + - nullable: true + x-struct: null + x-validate: null + description: The actor who performed the activity. + type: object + x-struct: null + x-validate: null + data: additionalProperties: true description: The workflow trigger `data` payload associated with the activity. nullable: true @@ -5347,91 +5537,52 @@ components: type: object x-struct: Elixir.SwitchboardWeb.V1.Specs.MsTeamsChannelData.IncomingWebhookConnection x-validate: null - WorkflowRunEvent: - description: An event that occurred during a workflow run. - example: - __typename: WorkflowRunEvent - attempt: 1 - data: - channel_type: email - message_id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - event: message_enqueued - id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - inserted_at: "2025-01-01T00:00:00Z" - status: ok - step_ref: email_step_1 - step_type: channel - properties: - __typename: - description: The typename of the schema. - example: WorkflowRunEvent - type: string - x-struct: null - x-validate: null - attempt: - description: The attempt number of the workflow run event. Increments for each retry. - example: 1 - type: integer - x-struct: null - x-validate: null - data: - additionalProperties: true - description: Event-specific data associated with the event. - nullable: true + WorkflowRecipientRunDetail: + allOf: + - $ref: '#/components/schemas/WorkflowRecipientRun' + - properties: + events: + description: A list of events that occurred during the workflow recipient run. + items: + $ref: '#/components/schemas/WorkflowRecipientRunEvent' + type: array + x-struct: null + x-validate: null + required: + - events type: object x-struct: null x-validate: null - event: - description: The type of event that occurred. - example: message_enqueued - type: string - x-struct: null - x-validate: null - id: - description: The unique identifier for the event. - example: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe - type: string - x-struct: null - x-validate: null - inserted_at: - description: Timestamp when the resource was created. - example: "2025-01-01T00:00:00Z" - format: date-time - type: string - x-struct: null - x-validate: null - status: - description: Whether the event represents a successful or error state. - enum: - - ok - - error - example: ok - type: string - x-struct: null - x-validate: null - step_ref: - description: The reference of the workflow step associated with this event. - example: email_step_1 - nullable: true - type: string - x-struct: null - x-validate: null - step_type: - description: The type of workflow step associated with this event. - example: channel - nullable: true - type: string - x-struct: null - x-validate: null - required: - - __typename - - id - - event - - status - - inserted_at - title: WorkflowRunEvent - type: object - x-struct: Elixir.SwitchboardWeb.V1.Specs.WorkflowRunEvent + description: A single workflow recipient run with its events. + example: + __typename: WorkflowRecipientRun + actor: user_456 + error_count: 0 + events: + - __typename: WorkflowRecipientRunEvent + attempt: 1 + data: + channel_type: email + message_id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe + event: message_enqueued + id: 2FVHPWxRqNuXQ9krvNP5A6Z4qXe + inserted_at: "2025-01-01T00:00:00Z" + status: ok + step_ref: email_step_1 + step_type: channel + id: 550e8400-e29b-41d4-a716-446655440000 + inserted_at: "2025-01-01T00:00:00Z" + recipient: user_123 + status: completed + tenant: tenant_abc + trigger_source: + cancellation_key: comment-123-user-456 + type: api + updated_at: "2025-01-01T00:05:00Z" + workflow: comment-created + workflow_run_id: 660e8400-e29b-41d4-a716-446655440000 + title: WorkflowRecipientRunDetail + x-struct: Elixir.SwitchboardWeb.V1.Specs.WorkflowRecipientRunDetail x-validate: null PushChannelDataDevicesOnly: description: Push channel data. @@ -6114,49 +6265,6 @@ components: type: object x-struct: null x-validate: null - WorkflowRunTriggerSource: - description: Describes how the workflow run was triggered. - example: - cancellation_key: comment-123-user-456 - type: api - properties: - audience_key: - description: The key of the audience that triggered the workflow run. - nullable: true - type: string - x-struct: null - x-validate: null - cancellation_key: - description: The cancellation key provided when the workflow was triggered via the API. - nullable: true - type: string - x-struct: null - x-validate: null - schedule_id: - description: The ID of the schedule that triggered the workflow run. - nullable: true - type: string - x-struct: null - x-validate: null - type: - description: The type of trigger source. One of `api`, `audience`, `schedule`, `broadcast`, `workflow_step`, `integration`, or `rehearsal`. - enum: - - api - - audience - - schedule - - broadcast - - workflow_step - - integration - - rehearsal - type: string - x-struct: null - x-validate: null - required: - - type - title: WorkflowRunTriggerSource - type: object - x-struct: Elixir.SwitchboardWeb.V1.Specs.WorkflowRunTriggerSource - x-validate: null AWSSNSPushChannelDataTargetARNsOnly: description: AWS SNS push channel data. example: @@ -6771,149 +6879,41 @@ components: x-struct: null x-validate: null is_im: - description: Whether the Slack channel is an IM channel. - nullable: false - type: boolean - x-struct: null - x-validate: null - is_private: - description: Whether the Slack channel is private. - nullable: false - type: boolean - x-struct: null - x-validate: null - name: - description: Slack channel name. - nullable: false - type: string - x-struct: null - x-validate: null - required: - - id - - name - - is_private - - is_im - - context_team_id - type: object - x-struct: null - x-validate: null - type: array - x-struct: null - x-validate: null - required: - - slack_channels - - next_cursor - title: ChannelsForSlackProviderResponse - type: object - x-struct: Elixir.SwitchboardWeb.V1.Specs.ChannelsForSlackProviderResponse - x-validate: null - WorkflowRun: - description: A workflow run represents an individual execution of a workflow for a specific recipient. - example: - __typename: WorkflowRun - actor: user_456 - error_count: 0 - id: 550e8400-e29b-41d4-a716-446655440000 - inserted_at: "2025-01-01T00:00:00Z" - recipient: user_123 - status: completed - tenant: tenant_abc - trigger_source: - cancellation_key: comment-123-user-456 - type: api - updated_at: "2025-01-01T00:05:00Z" - workflow_key: comment-created - workflow_run_id: 660e8400-e29b-41d4-a716-446655440000 - properties: - __typename: - description: The typename of the schema. - example: WorkflowRun - type: string - x-struct: null - x-validate: null - actor: - description: The actor who triggered the workflow run. - oneOf: - - $ref: '#/components/schemas/Recipient' - - nullable: true - x-struct: null - x-validate: null - x-struct: null - x-validate: null - error_count: - description: The number of errors encountered during the workflow run. - example: 0 - type: integer - x-struct: null - x-validate: null - id: - description: The unique identifier for the workflow run (per-recipient). - format: uuid - type: string - x-struct: null - x-validate: null - inserted_at: - description: Timestamp when the resource was created. - example: "2025-01-01T00:00:00Z" - format: date-time - type: string - x-struct: null - x-validate: null - recipient: - $ref: '#/components/schemas/RecipientReference' - status: - description: The current status of the workflow run. One of `queued`, `processing`, `paused`, `completed`, or `cancelled`. - enum: - - queued - - processing - - paused - - completed - - cancelled - example: completed - type: string - x-struct: null - x-validate: null - tenant: - description: The tenant associated with the workflow run. - example: tenant_abc - nullable: true - type: string - x-struct: null - x-validate: null - trigger_source: - $ref: '#/components/schemas/WorkflowRunTriggerSource' - updated_at: - description: The timestamp when the resource was last updated. - example: "2025-01-01T00:05:00Z" - format: date-time - type: string - x-struct: null - x-validate: null - workflow_key: - description: The key of the workflow that was executed. - example: comment-created - type: string - x-struct: null - x-validate: null - workflow_run_id: - description: The identifier for the top-level workflow run shared across all recipients in a single trigger. - format: uuid - type: string + description: Whether the Slack channel is an IM channel. + nullable: false + type: boolean + x-struct: null + x-validate: null + is_private: + description: Whether the Slack channel is private. + nullable: false + type: boolean + x-struct: null + x-validate: null + name: + description: Slack channel name. + nullable: false + type: string + x-struct: null + x-validate: null + required: + - id + - name + - is_private + - is_im + - context_team_id + type: object + x-struct: null + x-validate: null + type: array x-struct: null x-validate: null required: - - __typename - - id - - workflow_run_id - - workflow_key - - status - - recipient - - trigger_source - - inserted_at - - updated_at - title: WorkflowRun + - slack_channels + - next_cursor + title: ChannelsForSlackProviderResponse type: object - x-struct: Elixir.SwitchboardWeb.V1.Specs.WorkflowRun + x-struct: Elixir.SwitchboardWeb.V1.Specs.ChannelsForSlackProviderResponse x-validate: null Condition: description: A condition to be evaluated. @@ -6952,6 +6952,7 @@ components: - is_timestamp_on_or_after_date - is_timestamp_before_date - is_timestamp_between + - is_between - is_audience_member - is_not_audience_member example: equal_to @@ -12140,102 +12141,6 @@ paths: bulk_operation = knock.users.bulk.set_preferences(preferences: {}, user_ids: ["user_1", "user_2"]) puts(bulk_operation) - /v1/workflow_runs: - get: - callbacks: {} - description: Returns a paginated list of workflow runs for the current environment. - operationId: listWorkflowRuns - parameters: - - description: The cursor to fetch entries after. - in: query - name: after - required: false - schema: - type: string - x-struct: null - x-validate: null - - description: The cursor to fetch entries before. - in: query - name: before - required: false - schema: - type: string - x-struct: null - x-validate: null - - description: The number of items per page (defaults to 50). - in: query - name: page_size - required: false - schema: - type: integer - x-struct: null - x-validate: null - - description: Limits the results to workflow runs for the given workflow key. - in: query - name: workflow_key - required: false - schema: - type: string - x-struct: null - x-validate: null - - description: Limits the results to workflow runs with the given status. - in: query - name: status[] - required: false - schema: - items: - enum: - - queued - - processing - - paused - - completed - - cancelled - type: string - x-struct: null - x-validate: null - type: array - x-struct: null - x-validate: null - - description: Limits the results to workflow runs for the given tenant. - in: query - name: tenant_id - required: false - schema: - type: string - x-struct: null - x-validate: null - - description: Limits the results to workflow runs started after the given date. - example: "2025-01-01T00:00:00Z" - in: query - name: starting_at - required: false - schema: - format: date-time - type: string - x-struct: null - x-validate: null - - description: Limits the results to workflow runs started before the given date. - example: "2025-01-01T00:00:00Z" - in: query - name: ending_at - required: false - schema: - format: date-time - type: string - x-struct: null - x-validate: null - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ListWorkflowRunsResponse' - description: OK - summary: List workflow runs - tags: - - Workflow runs - x-ratelimit-tier: 3 - x-retention-policy: true /v1/objects/{collection}/{object_id}/preferences/{id}/workflows/{key}: put: callbacks: {} @@ -13261,6 +13166,32 @@ paths: response = knock.messages.get_content("message_id") puts(response) + /v1/workflow_recipient_runs/{id}: + get: + callbacks: {} + description: Returns a single workflow recipient run with its associated events. + operationId: getWorkflowRecipientRun + parameters: + - description: The unique identifier for the workflow recipient run (per-recipient). + in: path + name: id + required: true + schema: + type: string + x-struct: null + x-validate: null + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WorkflowRecipientRunDetail' + description: OK + summary: Get a workflow recipient run + tags: + - Workflow recipient runs + x-ratelimit-tier: 2 + x-retention-policy: true /v1/users/{user_id}/preferences/{id}/workflows: put: callbacks: {} @@ -13741,6 +13672,116 @@ paths: bulk_operation = knock.tenants.bulk.delete(tenant_ids: ["string"]) puts(bulk_operation) + /v1/workflow_recipient_runs: + get: + callbacks: {} + description: Returns a paginated list of workflow recipient runs for the current environment. + operationId: listWorkflowRecipientRuns + parameters: + - description: The cursor to fetch entries after. + in: query + name: after + required: false + schema: + type: string + x-struct: null + x-validate: null + - description: The cursor to fetch entries before. + in: query + name: before + required: false + schema: + type: string + x-struct: null + x-validate: null + - description: The number of items per page (defaults to 50). + in: query + name: page_size + required: false + schema: + type: integer + x-struct: null + x-validate: null + - description: Limits the results to workflow recipient runs for the given workflow key. + in: query + name: workflow + required: false + schema: + type: string + x-struct: null + x-validate: null + - description: Limits the results to workflow recipient runs with the given status. + in: query + name: status[] + required: false + schema: + items: + enum: + - queued + - processing + - paused + - completed + - cancelled + type: string + x-struct: null + x-validate: null + type: array + x-struct: null + x-validate: null + - description: Limits the results to workflow recipient runs for the given tenant. + in: query + name: tenant + required: false + schema: + type: string + x-struct: null + x-validate: null + - description: Limits the results to workflow recipient runs that have errors. + in: query + name: has_errors + required: false + schema: + type: boolean + x-struct: null + x-validate: null + - description: Limits the results to workflow recipient runs for the given recipient. Accepts a user ID string or an object reference with `id` and `collection`. + in: query + name: recipient + required: false + schema: + $ref: '#/components/schemas/RecipientReference' + - description: Limits the results to workflow recipient runs started after the given date. + example: "2025-01-01T00:00:00Z" + in: query + name: starting_at + required: false + schema: + format: date-time + type: string + x-struct: null + x-validate: null + - description: Limits the results to workflow recipient runs started before the given date. + example: "2025-01-01T00:00:00Z" + in: query + name: ending_at + required: false + schema: + format: date-time + type: string + x-struct: null + x-validate: null + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListWorkflowRecipientRunsResponse' + description: OK + summary: List workflow recipient runs + tags: + - Workflow recipient runs + x-ratelimit-tier: 2 + x-retention-policy: true /v1/messages/{message_id}/activities: get: callbacks: {} @@ -17258,32 +17299,6 @@ paths: result = knock.workflows.cancel("key", cancellation_key: "cancel-workflow-123") puts(result) - /v1/workflow_runs/{id}: - get: - callbacks: {} - description: Returns a single workflow run with its associated events. - operationId: getWorkflowRun - parameters: - - description: The unique identifier for the workflow run (per-recipient). - in: path - name: id - required: true - schema: - type: string - x-struct: null - x-validate: null - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/WorkflowRunDetail' - description: OK - summary: Get a workflow run - tags: - - Workflow runs - x-ratelimit-tier: 3 - x-retention-policy: true /v1/users/{user_id}/preferences/{id}/workflows/{key}: put: callbacks: {} @@ -19256,7 +19271,7 @@ tags: - description: A user is an individual from your system, represented in Knock. They are most commonly a recipient of a notification. name: Users - description: A workflow run represents an individual execution of a workflow for a specific recipient. - name: Workflow runs + name: Workflow recipient runs - description: Operations for triggering and canceling workflow executions. name: Workflow Triggers - description: A workflow is a structured set of steps that is triggered to produce notifications sent over channels.