From 4f7ea99fb6cbe8da594dbc4bbfe9038ba14e8f67 Mon Sep 17 00:00:00 2001 From: Kenneth Kalmer Date: Wed, 1 Apr 2026 12:19:21 +0100 Subject: [PATCH] fix: sync Control API spec with upstream swagger Bring the public Control API spec up to date with the upstream API surface. This was surfaced by a customer needing APNs p8 token-based auth fields (DX-1015). Additions: - APNs token auth fields (apnsAuthType, apnsSigningKey, apnsSigningKeyId, apnsIssuerKey, apnsTopicHeader) across app_post, app_patch, app_response - APNs/FCM config status fields in app_response - created/modified timestamps in app_response - revocableTokens in key_post, key_patch, key_response - mutableMessages and populateChannelRegistry in namespace schemas - appId in namespace_response - expires_at and token.id type fix in me schema - 7 new rule types (21 schemas): before-publish Lambda/webhook, Hive text/dashboard, Bodyguard, Tisane, Azure text moderation Co-Authored-By: Claude Opus 4.6 (1M context) --- static/open-specs/control-v1.yaml | 2131 ++++++++++++++++++++++++++++- 1 file changed, 2129 insertions(+), 2 deletions(-) diff --git a/static/open-specs/control-v1.yaml b/static/open-specs/control-v1.yaml index 2cb36dacf7..6ddb146644 100644 --- a/static/open-specs/control-v1.yaml +++ b/static/open-specs/control-v1.yaml @@ -1371,12 +1371,19 @@ components: - "$ref": "#/components/schemas/aws_lambda_rule_post" - "$ref": "#/components/schemas/aws_kinesis_rule_post" - "$ref": "#/components/schemas/aws_sqs_rule_post" + - "$ref": "#/components/schemas/before_publish_aws_lambda_rule_post" + - "$ref": "#/components/schemas/before_publish_webhook_rule_post" - "$ref": "#/components/schemas/amqp_rule_post" - "$ref": "#/components/schemas/amqp_external_rule_post" - "$ref": "#/components/schemas/kafka_rule_post" - "$ref": "#/components/schemas/pulsar_rule_post" - "$ref": "#/components/schemas/ingress_postgres_outbox_rule_post" - "$ref": "#/components/schemas/ingress_mongodb_changestream_rule_post" + - "$ref": "#/components/schemas/hive_text_model_only_rule_post" + - "$ref": "#/components/schemas/hive_dashboard_rule_post" + - "$ref": "#/components/schemas/bodyguard_text_moderation_rule_post" + - "$ref": "#/components/schemas/tisane_text_moderation_rule_post" + - "$ref": "#/components/schemas/azure_text_moderation_rule_post" discriminator: propertyName: ruleType mapping: @@ -1389,12 +1396,19 @@ components: aws/lambda: "#/components/schemas/aws_lambda_rule_post" aws/kinesis: "#/components/schemas/aws_kinesis_rule_post" aws/sqs: "#/components/schemas/aws_sqs_rule_post" + aws/lambda/before-publish: "#/components/schemas/before_publish_aws_lambda_rule_post" + http/before-publish: "#/components/schemas/before_publish_webhook_rule_post" amqp: "#/components/schemas/amqp_rule_post" amqp/external: "#/components/schemas/amqp_external_rule_post" kafka: "#/components/schemas/kafka_rule_post" pulsar: "#/components/schemas/pulsar_rule_post" ingress-postgres-outbox: "#/components/schemas/ingress_postgres_outbox_rule_post" ingress/mongodb: "#/components/schemas/ingress_mongodb_changestream_rule_post" + hive/text-model-only: "#/components/schemas/hive_text_model_only_rule_post" + hive/dashboard: "#/components/schemas/hive_dashboard_rule_post" + bodyguard/text-moderation: "#/components/schemas/bodyguard_text_moderation_rule_post" + tisane/text-moderation: "#/components/schemas/tisane_text_moderation_rule_post" + azure/text-moderation: "#/components/schemas/azure_text_moderation_rule_post" rule_patch: oneOf: - "$ref": "#/components/schemas/http_rule_patch" @@ -1406,12 +1420,19 @@ components: - "$ref": "#/components/schemas/aws_lambda_rule_patch" - "$ref": "#/components/schemas/aws_kinesis_rule_patch" - "$ref": "#/components/schemas/aws_sqs_rule_patch" + - "$ref": "#/components/schemas/before_publish_aws_lambda_rule_patch" + - "$ref": "#/components/schemas/before_publish_webhook_rule_patch" - "$ref": "#/components/schemas/amqp_rule_patch" - "$ref": "#/components/schemas/amqp_external_rule_patch" - "$ref": "#/components/schemas/kafka_rule_patch" - "$ref": "#/components/schemas/pulsar_rule_patch" - "$ref": "#/components/schemas/ingress_postgres_outbox_rule_patch" - "$ref": "#/components/schemas/ingress_mongodb_changestream_rule_patch" + - "$ref": "#/components/schemas/hive_text_model_only_rule_patch" + - "$ref": "#/components/schemas/hive_dashboard_rule_patch" + - "$ref": "#/components/schemas/bodyguard_text_moderation_rule_patch" + - "$ref": "#/components/schemas/tisane_text_moderation_rule_patch" + - "$ref": "#/components/schemas/azure_text_moderation_rule_patch" discriminator: propertyName: ruleType mapping: @@ -1424,12 +1445,19 @@ components: aws/lambda: "#/components/schemas/aws_lambda_rule_patch" aws/kinesis: "#/components/schemas/aws_kinesis_rule_patch" aws/sqs: "#/components/schemas/aws_sqs_rule_patch" + aws/lambda/before-publish: "#/components/schemas/before_publish_aws_lambda_rule_patch" + http/before-publish: "#/components/schemas/before_publish_webhook_rule_patch" amqp: "#/components/schemas/amqp_rule_patch" amqp/external: "#/components/schemas/amqp_external_rule_patch" kafka: "#/components/schemas/kafka_rule_patch" pulsar: "#/components/schemas/pulsar_rule_patch" ingress-postgres-outbox: "#/components/schemas/ingress_postgres_outbox_rule_patch" ingress/mongodb: "#/components/schemas/ingress_mongodb_changestream_rule_patch" + hive/text-model-only: "#/components/schemas/hive_text_model_only_rule_patch" + hive/dashboard: "#/components/schemas/hive_dashboard_rule_patch" + bodyguard/text-moderation: "#/components/schemas/bodyguard_text_moderation_rule_patch" + tisane/text-moderation: "#/components/schemas/tisane_text_moderation_rule_patch" + azure/text-moderation: "#/components/schemas/azure_text_moderation_rule_patch" rule_response: oneOf: - "$ref": "#/components/schemas/http_rule_response" @@ -1441,12 +1469,19 @@ components: - "$ref": "#/components/schemas/aws_lambda_rule_response" - "$ref": "#/components/schemas/aws_kinesis_rule_response" - "$ref": "#/components/schemas/aws_sqs_rule_response" + - "$ref": "#/components/schemas/before_publish_aws_lambda_rule_response" + - "$ref": "#/components/schemas/before_publish_webhook_rule_response" - "$ref": "#/components/schemas/amqp_rule_response" - "$ref": "#/components/schemas/amqp_external_rule_response" - "$ref": "#/components/schemas/kafka_rule_response" - "$ref": "#/components/schemas/pulsar_rule_response" - "$ref": "#/components/schemas/ingress_postgres_outbox_rule_response" - "$ref": "#/components/schemas/ingress_mongodb_changestream_rule_response" + - "$ref": "#/components/schemas/hive_text_model_only_rule_response" + - "$ref": "#/components/schemas/hive_dashboard_rule_response" + - "$ref": "#/components/schemas/bodyguard_text_moderation_rule_response" + - "$ref": "#/components/schemas/tisane_text_moderation_rule_response" + - "$ref": "#/components/schemas/azure_text_moderation_rule_response" - "$ref": "#/components/schemas/unsupported_rule_response" discriminator: propertyName: ruleType @@ -1460,12 +1495,19 @@ components: aws/lambda: "#/components/schemas/aws_lambda_rule_response" aws/kinesis: "#/components/schemas/aws_kinesis_rule_response" aws/sqs: "#/components/schemas/aws_sqs_rule_response" + aws/lambda/before-publish: "#/components/schemas/before_publish_aws_lambda_rule_response" + http/before-publish: "#/components/schemas/before_publish_webhook_rule_response" amqp: "#/components/schemas/amqp_rule_response" amqp/external: "#/components/schemas/amqp_external_rule_response" kafka: "#/components/schemas/kafka_rule_response" pulsar: "#/components/schemas/pulsar_rule_response" ingress-postgres-outbox: "#/components/schemas/ingress_postgres_outbox_rule_response" ingress/mongodb: "#/components/schemas/ingress_mongodb_changestream_rule_response" + hive/text-model-only: "#/components/schemas/hive_text_model_only_rule_response" + hive/dashboard: "#/components/schemas/hive_dashboard_rule_response" + bodyguard/text-moderation: "#/components/schemas/bodyguard_text_moderation_rule_response" + tisane/text-moderation: "#/components/schemas/tisane_text_moderation_rule_response" + azure/text-moderation: "#/components/schemas/azure_text_moderation_rule_response" unsupported: "#/components/schemas/unsupported_rule_response" http_rule_post: type: object @@ -4654,6 +4696,1935 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz - us-east-1-A - us-east-2-A - us-west-1-A + before_publish_aws_lambda_rule_post: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - aws/lambda/before-publish + description: The type of rule. In this case a before-publish AWS Lambda rule that invokes a Lambda function before a message is published to a channel. + example: aws/lambda/before-publish + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + source: + "$ref": "#/components/schemas/rule_source" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the AWS Lambda function to invoke. + properties: + region: + type: string + description: The AWS region in which your Lambda function is hosted. See the AWS documentation for more detail. + example: us-west-1 + functionName: + type: string + description: The name of your AWS Lambda function. + example: myBeforePublishFunction + authentication: + oneOf: + - "$ref": "#/components/schemas/aws_access_keys" + - "$ref": "#/components/schemas/aws_assume_role" + discriminator: + propertyName: authenticationMode + mapping: + credentials: "#/components/schemas/aws_access_keys" + assumeRole: "#/components/schemas/aws_assume_role" + required: + - functionName + - region + - authentication + required: + - ruleType + - target + - invocationMode + - beforePublishConfig + before_publish_aws_lambda_rule_patch: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - aws/lambda/before-publish + description: The type of rule. In this case a before-publish AWS Lambda rule that invokes a Lambda function before a message is published to a channel. + example: aws/lambda/before-publish + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + source: + "$ref": "#/components/schemas/rule_source_patch" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the AWS Lambda function to invoke. + properties: + region: + type: string + description: The AWS region in which your Lambda function is hosted. See the AWS documentation for more detail. + example: us-west-1 + functionName: + type: string + description: The name of your AWS Lambda function. + example: myBeforePublishFunction + authentication: + oneOf: + - "$ref": "#/components/schemas/aws_access_keys" + - "$ref": "#/components/schemas/aws_assume_role" + discriminator: + propertyName: authenticationMode + mapping: + credentials: "#/components/schemas/aws_access_keys" + assumeRole: "#/components/schemas/aws_assume_role" + required: + - region + - functionName + - authentication + required: + - ruleType + before_publish_aws_lambda_rule_response: + type: object + additionalProperties: false + properties: + id: + type: string + description: The rule ID. + example: 83IzAB + appId: + type: string + description: The Ably application ID. + example: 28GY6a + version: + type: string + description: API version. Events and the format of their payloads are versioned. Please see the Ably webhooks docs. + example: '1.2' + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + created: + type: number + description: Unix timestamp representing the date and time of creation of the rule. + example: 1602844091815 + modified: + type: number + description: Unix timestamp representing the date and time of last modification of the rule. + example: 1614679682091 + _links: + type: object + nullable: true + ruleType: + type: string + enum: + - aws/lambda/before-publish + description: The type of rule. In this case a before-publish AWS Lambda rule that invokes a Lambda function before a message is published to a channel. + example: aws/lambda/before-publish + source: + "$ref": "#/components/schemas/rule_source" + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the AWS Lambda function to invoke. + properties: + region: + type: string + description: The AWS region in which your Lambda function is hosted. See the AWS documentation for more detail. + example: us-west-1 + functionName: + type: string + description: The name of your AWS Lambda function. + example: myBeforePublishFunction + authentication: + oneOf: + - "$ref": "#/components/schemas/aws_access_keys_response" + - "$ref": "#/components/schemas/aws_assume_role" + discriminator: + propertyName: authenticationMode + mapping: + credentials: "#/components/schemas/aws_access_keys_response" + assumeRole: "#/components/schemas/aws_assume_role" + required: + - region + - functionName + - authentication + required: + - ruleType + - target + - invocationMode + - beforePublishConfig + before_publish_webhook_rule_post: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - http/before-publish + description: The type of rule. In this case a before-publish webhook rule that sends an HTTP request before a message is published to a channel. + example: http/before-publish + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the webhook endpoint to call. + properties: + url: + type: string + description: The webhook URL that Ably will POST events to before publishing. + example: https://example.com/before-publish + headers: + type: array + description: If you have additional information to send, you'll need to include the relevant headers. + items: + type: object + properties: + name: + type: string + description: The name of the header. + example: Authorization + value: + type: string + description: The value of the header. + example: Bearer token123 + example: [{"name": "Authorization", "value": "Bearer token123"}] + required: + - url + required: + - ruleType + - target + - invocationMode + - beforePublishConfig + before_publish_webhook_rule_patch: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - http/before-publish + description: The type of rule. In this case a before-publish webhook rule that sends an HTTP request before a message is published to a channel. + example: http/before-publish + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the webhook endpoint to call. + properties: + url: + type: string + description: The webhook URL that Ably will POST events to before publishing. + example: https://example.com/before-publish + headers: + type: array + description: If you have additional information to send, you'll need to include the relevant headers. + items: + type: object + properties: + name: + type: string + description: The name of the header. + example: Authorization + value: + type: string + description: The value of the header. + example: Bearer token123 + example: [{"name": "Authorization", "value": "Bearer token123"}] + required: + - url + required: + - ruleType + before_publish_webhook_rule_response: + type: object + additionalProperties: false + properties: + id: + type: string + description: The rule ID. + example: 83IzAB + appId: + type: string + description: The Ably application ID. + example: 28GY6a + version: + type: string + description: API version. Events and the format of their payloads are versioned. Please see the Ably webhooks docs. + example: '1.2' + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + created: + type: number + description: Unix timestamp representing the date and time of creation of the rule. + example: 1602844091815 + modified: + type: number + description: Unix timestamp representing the date and time of last modification of the rule. + example: 1614679682091 + _links: + type: object + nullable: true + ruleType: + type: string + enum: + - http/before-publish + description: The type of rule. In this case a before-publish webhook rule that sends an HTTP request before a message is published to a channel. + example: http/before-publish + source: + "$ref": "#/components/schemas/rule_source" + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the webhook endpoint to call. + properties: + url: + type: string + description: The webhook URL that Ably will POST events to before publishing. + example: https://example.com/before-publish + headers: + type: array + description: If you have additional information to send, you'll need to include the relevant headers. + items: + type: object + properties: + name: + type: string + description: The name of the header. + example: Authorization + value: + type: string + description: The value of the header. + example: Bearer token123 + example: [{"name": "Authorization", "value": "Bearer token123"}] + format: + type: string + description: JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding. + example: json + required: + - url + required: + - ruleType + - target + - invocationMode + - beforePublishConfig + hive_text_model_only_rule_post: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - hive/text-model-only + description: The type of rule. In this case a Hive AI text moderation rule that evaluates message content using the Hive text classification model before publishing. + example: hive/text-model-only + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Hive AI moderation configuration. + properties: + apiKey: + type: string + description: The Hive API key for authenticating with the moderation service. + example: hive-api-key-123 + modelUrl: + type: string + description: The URL of the Hive text classification model to use. + example: https://api.thehive.ai/api/v2/task/text/text_moderation + thresholds: + type: object + additionalProperties: + type: integer + minimum: 1 + maximum: 3 + description: A map of moderation categories to threshold levels (1-3). Messages scoring above the threshold for any category will be rejected. + required: + - apiKey + required: + - ruleType + - target + - beforePublishConfig + - invocationMode + hive_text_model_only_rule_patch: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - hive/text-model-only + description: The type of rule. In this case a Hive AI text moderation rule that evaluates message content using the Hive text classification model before publishing. + example: hive/text-model-only + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Hive AI moderation configuration. + properties: + apiKey: + type: string + description: The Hive API key for authenticating with the moderation service. + example: hive-api-key-123 + modelUrl: + type: string + description: The URL of the Hive text classification model to use. + example: https://api.thehive.ai/api/v2/task/text/text_moderation + thresholds: + type: object + additionalProperties: + type: integer + minimum: 1 + maximum: 3 + description: A map of moderation categories to threshold levels (1-3). Messages scoring above the threshold for any category will be rejected. + required: + - apiKey + required: + - ruleType + - target + - beforePublishConfig + - invocationMode + hive_text_model_only_rule_response: + type: object + additionalProperties: false + properties: + id: + type: string + description: The rule ID. + example: 83IzAB + appId: + type: string + description: The Ably application ID. + example: 28GY6a + version: + type: string + description: API version. Events and the format of their payloads are versioned. Please see the Ably webhooks docs. + example: '1.2' + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + created: + type: number + description: Unix timestamp representing the date and time of creation of the rule. + example: 1602844091815 + modified: + type: number + description: Unix timestamp representing the date and time of last modification of the rule. + example: 1614679682091 + _links: + type: object + nullable: true + ruleType: + type: string + enum: + - hive/text-model-only + description: The type of rule. In this case a Hive AI text moderation rule that evaluates message content using the Hive text classification model before publishing. + example: hive/text-model-only + source: + "$ref": "#/components/schemas/rule_source" + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Hive AI moderation configuration. + properties: + apiKey: + type: string + description: The Hive API key for authenticating with the moderation service. + example: hive-api-key-123 + modelUrl: + type: string + description: The URL of the Hive text classification model to use. + example: https://api.thehive.ai/api/v2/task/text/text_moderation + thresholds: + type: object + additionalProperties: + type: integer + minimum: 1 + maximum: 3 + description: A map of moderation categories to threshold levels (1-3). Messages scoring above the threshold for any category will be rejected. + required: + - apiKey + required: + - ruleType + - source + - target + - beforePublishConfig + - invocationMode + - chatRoomFilter + hive_dashboard_rule_post: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - hive/dashboard + description: The type of rule. In this case a Hive dashboard rule that sends published messages to the Hive moderation dashboard for review after publishing. + example: hive/dashboard + invocationMode: + type: string + enum: + - AFTER_PUBLISH + description: The invocation mode for this rule. After-publish rules are invoked after a message is published. + example: AFTER_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Hive dashboard configuration. + properties: + apiKey: + type: string + description: The Hive API key for authenticating with the moderation dashboard. + example: hive-api-key-123 + checkWatchLists: + type: boolean + nullable: true + description: If `true`, messages will also be checked against Hive watch lists. + example: false + required: + - apiKey + required: + - ruleType + - target + - invocationMode + hive_dashboard_rule_patch: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - hive/dashboard + description: The type of rule. In this case a Hive dashboard rule that sends published messages to the Hive moderation dashboard for review after publishing. + example: hive/dashboard + invocationMode: + type: string + enum: + - AFTER_PUBLISH + description: The invocation mode for this rule. After-publish rules are invoked after a message is published. + example: AFTER_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Hive dashboard configuration. + properties: + apiKey: + type: string + description: The Hive API key for authenticating with the moderation dashboard. + example: hive-api-key-123 + checkWatchLists: + type: boolean + nullable: true + description: If `true`, messages will also be checked against Hive watch lists. + example: false + required: + - apiKey + required: + - ruleType + hive_dashboard_rule_response: + type: object + additionalProperties: false + properties: + id: + type: string + description: The rule ID. + example: 83IzAB + appId: + type: string + description: The Ably application ID. + example: 28GY6a + version: + type: string + description: API version. Events and the format of their payloads are versioned. Please see the Ably webhooks docs. + example: '1.2' + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + created: + type: number + description: Unix timestamp representing the date and time of creation of the rule. + example: 1602844091815 + modified: + type: number + description: Unix timestamp representing the date and time of last modification of the rule. + example: 1614679682091 + _links: + type: object + nullable: true + ruleType: + type: string + enum: + - hive/dashboard + description: The type of rule. In this case a Hive dashboard rule that sends published messages to the Hive moderation dashboard for review after publishing. + example: hive/dashboard + source: + "$ref": "#/components/schemas/rule_source" + invocationMode: + type: string + enum: + - AFTER_PUBLISH + description: The invocation mode for this rule. After-publish rules are invoked after a message is published. + example: AFTER_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Hive dashboard configuration. + properties: + apiKey: + type: string + description: The Hive API key for authenticating with the moderation dashboard. + example: hive-api-key-123 + checkWatchLists: + type: boolean + nullable: true + description: If `true`, messages will also be checked against Hive watch lists. + example: false + required: + - apiKey + required: + - ruleType + - target + - invocationMode + bodyguard_text_moderation_rule_post: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - bodyguard/text-moderation + description: The type of rule. In this case a Bodyguard text moderation rule that evaluates message content using the Bodyguard moderation service before publishing. + example: bodyguard/text-moderation + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Bodyguard moderation configuration. + properties: + apiKey: + type: string + description: The Bodyguard API key for authenticating with the moderation service. + example: bodyguard-api-key-123 + channelId: + type: string + description: The Bodyguard channel ID to associate with moderation requests. + example: my-channel + apiUrl: + type: string + description: The Bodyguard API URL for the moderation service. + example: https://api.bodyguard.ai/v1/moderate + defaultLanguage: + type: string + description: The default language for text moderation analysis. + example: en + required: + - apiKey + required: + - ruleType + - target + - beforePublishConfig + - invocationMode + bodyguard_text_moderation_rule_patch: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - bodyguard/text-moderation + description: The type of rule. In this case a Bodyguard text moderation rule that evaluates message content using the Bodyguard moderation service before publishing. + example: bodyguard/text-moderation + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Bodyguard moderation configuration. + properties: + apiKey: + type: string + description: The Bodyguard API key for authenticating with the moderation service. + example: bodyguard-api-key-123 + channelId: + type: string + description: The Bodyguard channel ID to associate with moderation requests. + example: my-channel + apiUrl: + type: string + description: The Bodyguard API URL for the moderation service. + example: https://api.bodyguard.ai/v1/moderate + defaultLanguage: + type: string + description: The default language for text moderation analysis. + example: en + required: + - apiKey + required: + - ruleType + - target + - beforePublishConfig + - invocationMode + bodyguard_text_moderation_rule_response: + type: object + additionalProperties: false + properties: + id: + type: string + description: The rule ID. + example: 83IzAB + appId: + type: string + description: The Ably application ID. + example: 28GY6a + version: + type: string + description: API version. Events and the format of their payloads are versioned. Please see the Ably webhooks docs. + example: '1.2' + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + created: + type: number + description: Unix timestamp representing the date and time of creation of the rule. + example: 1602844091815 + modified: + type: number + description: Unix timestamp representing the date and time of last modification of the rule. + example: 1614679682091 + _links: + type: object + nullable: true + ruleType: + type: string + enum: + - bodyguard/text-moderation + description: The type of rule. In this case a Bodyguard text moderation rule that evaluates message content using the Bodyguard moderation service before publishing. + example: bodyguard/text-moderation + source: + "$ref": "#/components/schemas/rule_source" + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Bodyguard moderation configuration. + properties: + apiKey: + type: string + description: The Bodyguard API key for authenticating with the moderation service. + example: bodyguard-api-key-123 + apiUrl: + type: string + description: The Bodyguard API URL for the moderation service. + example: https://api.bodyguard.ai/v1/moderate + channelId: + type: string + description: The Bodyguard channel ID to associate with moderation requests. + example: my-channel + defaultLanguage: + type: string + description: The default language for text moderation analysis. + example: en + required: + - apiKey + required: + - ruleType + - source + - target + - beforePublishConfig + - invocationMode + - chatRoomFilter + tisane_text_moderation_rule_post: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - tisane/text-moderation + description: The type of rule. In this case a Tisane text moderation rule that evaluates message content using the Tisane natural language processing service before publishing. + example: tisane/text-moderation + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Tisane moderation configuration. + properties: + apiKey: + type: string + description: The Tisane API key for authenticating with the moderation service. + example: tisane-api-key-123 + modelUrl: + type: string + description: The URL of the Tisane model to use for text analysis. + example: https://api.tisane.ai/parse + thresholds: + type: object + additionalProperties: + type: integer + minimum: 0 + maximum: 3 + description: A map of moderation categories to threshold levels (0-3). Messages scoring above the threshold for any category will be rejected. + defaultLanguage: + type: string + description: The default language for text moderation analysis. + example: en + required: + - apiKey + - defaultLanguage + required: + - ruleType + - target + - beforePublishConfig + - invocationMode + tisane_text_moderation_rule_patch: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - tisane/text-moderation + description: The type of rule. In this case a Tisane text moderation rule that evaluates message content using the Tisane natural language processing service before publishing. + example: tisane/text-moderation + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Tisane moderation configuration. + properties: + apiKey: + type: string + description: The Tisane API key for authenticating with the moderation service. + example: tisane-api-key-123 + modelUrl: + type: string + description: The URL of the Tisane model to use for text analysis. + example: https://api.tisane.ai/parse + thresholds: + type: object + additionalProperties: + type: integer + minimum: 0 + maximum: 3 + description: A map of moderation categories to threshold levels (0-3). Messages scoring above the threshold for any category will be rejected. + defaultLanguage: + type: string + description: The default language for text moderation analysis. + example: en + required: + - apiKey + - defaultLanguage + required: + - ruleType + - target + - beforePublishConfig + - invocationMode + tisane_text_moderation_rule_response: + type: object + additionalProperties: false + properties: + id: + type: string + description: The rule ID. + example: 83IzAB + appId: + type: string + description: The Ably application ID. + example: 28GY6a + version: + type: string + description: API version. Events and the format of their payloads are versioned. Please see the Ably webhooks docs. + example: '1.2' + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + created: + type: number + description: Unix timestamp representing the date and time of creation of the rule. + example: 1602844091815 + modified: + type: number + description: Unix timestamp representing the date and time of last modification of the rule. + example: 1614679682091 + _links: + type: object + nullable: true + ruleType: + type: string + enum: + - tisane/text-moderation + description: The type of rule. In this case a Tisane text moderation rule that evaluates message content using the Tisane natural language processing service before publishing. + example: tisane/text-moderation + source: + "$ref": "#/components/schemas/rule_source" + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Tisane moderation configuration. + properties: + apiKey: + type: string + description: The Tisane API key for authenticating with the moderation service. + example: tisane-api-key-123 + modelUrl: + type: string + description: The URL of the Tisane model to use for text analysis. + example: https://api.tisane.ai/parse + thresholds: + type: object + additionalProperties: + type: integer + minimum: 0 + maximum: 3 + description: A map of moderation categories to threshold levels (0-3). Messages scoring above the threshold for any category will be rejected. + defaultLanguage: + type: string + description: The default language for text moderation analysis. + example: en + required: + - apiKey + - defaultLanguage + required: + - ruleType + - source + - target + - beforePublishConfig + - invocationMode + - chatRoomFilter + azure_text_moderation_rule_post: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - azure/text-moderation + description: The type of rule. In this case an Azure text moderation rule that evaluates message content using Azure AI Content Safety before publishing. + example: azure/text-moderation + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Azure Content Safety configuration. + properties: + apiKey: + type: string + description: The Azure Content Safety API key for authenticating with the moderation service. + example: azure-content-safety-key-123 + endpoint: + type: string + description: The Azure Content Safety endpoint URL. + example: https://my-resource.cognitiveservices.azure.com + thresholds: + type: object + additionalProperties: + type: integer + minimum: 0 + maximum: 7 + description: A map of moderation categories to threshold levels (0-7). Messages scoring above the threshold for any category will be rejected. + required: + - apiKey + - endpoint + required: + - ruleType + - target + - beforePublishConfig + - invocationMode + azure_text_moderation_rule_patch: + type: object + additionalProperties: false + properties: + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + ruleType: + type: string + enum: + - azure/text-moderation + description: The type of rule. In this case an Azure text moderation rule that evaluates message content using Azure AI Content Safety before publishing. + example: azure/text-moderation + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Azure Content Safety configuration. + properties: + apiKey: + type: string + description: The Azure Content Safety API key for authenticating with the moderation service. + example: azure-content-safety-key-123 + endpoint: + type: string + description: The Azure Content Safety endpoint URL. + example: https://my-resource.cognitiveservices.azure.com + thresholds: + type: object + additionalProperties: + type: integer + minimum: 0 + maximum: 7 + description: A map of moderation categories to threshold levels (0-7). Messages scoring above the threshold for any category will be rejected. + required: + - apiKey + - endpoint + required: + - ruleType + - target + - beforePublishConfig + - invocationMode + azure_text_moderation_rule_response: + type: object + additionalProperties: false + properties: + id: + type: string + description: The rule ID. + example: 83IzAB + appId: + type: string + description: The Ably application ID. + example: 28GY6a + version: + type: string + description: API version. Events and the format of their payloads are versioned. Please see the Ably webhooks docs. + example: '1.2' + status: + type: string + description: The status of the rule. Rules can be enabled or disabled. + example: enabled + created: + type: number + description: Unix timestamp representing the date and time of creation of the rule. + example: 1602844091815 + modified: + type: number + description: Unix timestamp representing the date and time of last modification of the rule. + example: 1614679682091 + _links: + type: object + nullable: true + ruleType: + type: string + enum: + - azure/text-moderation + description: The type of rule. In this case an Azure text moderation rule that evaluates message content using Azure AI Content Safety before publishing. + example: azure/text-moderation + source: + "$ref": "#/components/schemas/rule_source" + beforePublishConfig: + type: object + description: Configuration for before-publish behavior, including retry logic and failure handling. + properties: + retryTimeout: + type: integer + minimum: 0 + maximum: 10000 + description: The timeout in milliseconds for retrying the rule invocation. + example: 5000 + maxRetries: + type: integer + minimum: 0 + maximum: 10 + description: The maximum number of retry attempts. + example: 3 + failedAction: + type: string + enum: + - REJECT + - PUBLISH + description: The action to take if the rule invocation fails. `REJECT` prevents the message from being published, `PUBLISH` allows it through. + example: REJECT + tooManyRequestsAction: + type: string + enum: + - RETRY + - FAIL + description: The action to take if the rule invocation returns a rate limit response. `RETRY` will attempt the request again, `FAIL` will invoke the `failedAction`. + example: RETRY + required: + - retryTimeout + - maxRetries + - failedAction + - tooManyRequestsAction + chatRoomFilter: + type: string + pattern: "^/.*/$" + description: A regular expression that filters messages based on the chat room ID. Only messages matching this pattern will trigger the rule. + example: "/^chat:.*$/" + invocationMode: + type: string + enum: + - BEFORE_PUBLISH + description: The invocation mode for this rule. Before-publish rules are invoked before a message is published. + example: BEFORE_PUBLISH + target: + type: object + additionalProperties: false + description: The target for the rule, specifying the Azure Content Safety configuration. + properties: + apiKey: + type: string + description: The Azure Content Safety API key for authenticating with the moderation service. + example: azure-content-safety-key-123 + endpoint: + type: string + description: The Azure Content Safety endpoint URL. + example: https://my-resource.cognitiveservices.azure.com + thresholds: + type: object + additionalProperties: + type: integer + minimum: 0 + maximum: 7 + description: A map of moderation categories to threshold levels (0-7). Messages scoring above the threshold for any category will be rejected. + required: + - apiKey + - endpoint + required: + - ruleType + - source + - target + - beforePublishConfig + - invocationMode + - chatRoomFilter unsupported_rule_response: type: object additionalProperties: false @@ -4900,6 +6871,16 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz type: boolean default: false description: If `true`, messages received on a channel will contain a unique `timeserial` that can be referenced by later messages for use with message interactions. + mutableMessages: + type: boolean + default: false + description: If `true`, messages published on channels within this namespace can be updated or deleted after publishing. See the message interactions documentation for more details. + example: false + populateChannelRegistry: + type: boolean + default: false + description: If `true`, channels within this namespace are included in the channel registry, enabling channel enumeration via the Channel Metadata API. + example: false required: - id namespace_patch: @@ -4955,10 +6936,22 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz exposeTimeserial: type: boolean description: If `true`, messages received on a channel will contain a unique `timeserial` that can be referenced by later messages for use with message interactions. + mutableMessages: + type: boolean + description: If `true`, messages published on channels within this namespace can be updated or deleted after publishing. See the message interactions documentation for more details. + example: false + populateChannelRegistry: + type: boolean + description: If `true`, channels within this namespace are included in the channel registry, enabling channel enumeration via the Channel Metadata API. + example: false namespace_response: type: object additionalProperties: false properties: + appId: + type: string + description: The ID of the application the namespace belongs to. + example: 28GY6a authenticated: type: boolean default: false @@ -5020,6 +7013,14 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz exposeTimeserial: type: boolean description: If `true`, messages received on a channel will contain a unique `timeserial` that can be referenced by later messages for use with message interactions. + mutableMessages: + type: boolean + description: If `true`, messages published on channels within this namespace can be updated or deleted after publishing. See the message interactions documentation for more details. + example: false + populateChannelRegistry: + type: boolean + description: If `true`, channels within this namespace are included in the channel registry, enabling channel enumeration via the Channel Metadata API. + example: false app_post: type: object additionalProperties: false @@ -5068,6 +7069,34 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz nullable: true description: Use the Apple Push Notification service sandbox endpoint. example: false + apnsAuthType: + type: string + enum: + - certificate + - token + nullable: true + description: The Apple Push Notification service authentication type. Use `certificate` for p12 certificate-based auth, or `token` for p8 key-based auth. + example: token + apnsSigningKey: + type: string + nullable: true + description: The contents of the `.p8` signing key file from the Apple Developer portal. Used for token-based APNs authentication. + example: '-----BEGIN PRIVATE KEY-----MIGTAgE...EXAMPLE...AB12-----END PRIVATE KEY-----' + apnsSigningKeyId: + type: string + nullable: true + description: The 10-character Key ID from the Apple Developer portal, associated with the `.p8` signing key. + example: ABC123DEFG + apnsIssuerKey: + type: string + nullable: true + description: The Team ID from the Apple Developer account. Used as the issuer when generating APNs authentication tokens. + example: TEAMID1234 + apnsTopicHeader: + type: string + nullable: true + description: The app's bundle ID (for example, `com.example.myapp`). Used as the `apns-topic` header when sending push notifications. + example: com.example.myapp required: - name app_patch: @@ -5117,6 +7146,34 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz nullable: true description: Use the Apple Push Notification service sandbox endpoint. example: false + apnsAuthType: + type: string + enum: + - certificate + - token + nullable: true + description: The Apple Push Notification service authentication type. Use `certificate` for p12 certificate-based auth, or `token` for p8 key-based auth. + example: token + apnsSigningKey: + type: string + nullable: true + description: The contents of the `.p8` signing key file from the Apple Developer portal. Used for token-based APNs authentication. + example: '-----BEGIN PRIVATE KEY-----MIGTAgE...EXAMPLE...AB12-----END PRIVATE KEY-----' + apnsSigningKeyId: + type: string + nullable: true + description: The 10-character Key ID from the Apple Developer portal, associated with the `.p8` signing key. + example: ABC123DEFG + apnsIssuerKey: + type: string + nullable: true + description: The Team ID from the Apple Developer account. Used as the issuer when generating APNs authentication tokens. + example: TEAMID1234 + apnsTopicHeader: + type: string + nullable: true + description: The app's bundle ID (for example, `com.example.myapp`). Used as the `apns-topic` header when sending push notifications. + example: com.example.myapp app_pkcs12: type: object additionalProperties: false @@ -5163,6 +7220,54 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz nullable: true description: Use the Apple Push Notification service sandbox endpoint. example: false + apnsAuthType: + type: string + enum: + - certificate + - token + nullable: true + description: The Apple Push Notification service authentication type. Use `certificate` for p12 certificate-based auth, or `token` for p8 key-based auth. + example: token + apnsCertificateConfigured: + type: boolean + description: Whether a certificate-based APNs configuration is currently active. + example: false + apnsSigningKeyConfigured: + type: boolean + description: Whether a token-based (p8) APNs signing key is currently configured. + example: true + apnsIssuerKey: + type: string + nullable: true + description: The Team ID from the Apple Developer account. Used as the issuer when generating APNs authentication tokens. + example: TEAMID1234 + apnsSigningKeyId: + type: string + nullable: true + description: The 10-character Key ID from the Apple Developer portal, associated with the `.p8` signing key. + example: ABC123DEFG + apnsTopicHeader: + type: string + nullable: true + description: The app's bundle ID (for example, `com.example.myapp`). Used as the `apns-topic` header when sending push notifications. + example: com.example.myapp + fcmProjectId: + type: string + nullable: true + description: The unique identifier for the Firebase Cloud Messaging (FCM) project. This ID is used to specify the Firebase project when configuring FCM or other Firebase services. + example: notional-armor-405018 + fcmServiceAccountConfigured: + type: boolean + description: Whether Firebase Cloud Messaging (FCM) service account credentials are currently configured. + example: false + created: + type: integer + description: Unix timestamp representing the date and time of creation of the application. + example: 1602844091815 + modified: + type: integer + description: Unix timestamp representing the date and time of last modification of the application. + example: 1614679682091 _links: type: object nullable: true @@ -5175,6 +7280,11 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz description: The name for your API key. This is a friendly name for your reference. type: string example: 'My key name' + revocableTokens: + type: boolean + nullable: true + description: If `true`, tokens issued by this key can be individually revoked. See the token revocation documentation for more details. + example: true capability: description: These are the capability operations described in the capabilities docs. type: object @@ -5202,6 +7312,11 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz description: The name for your API key. This is a friendly name for your reference. type: string example: 'My key name' + revocableTokens: + type: boolean + nullable: true + description: If `true`, tokens issued by this key can be individually revoked. See the token revocation documentation for more details. + example: true capability: description: These are the capability operations described in the Ably capabilities docs. type: object @@ -5234,6 +7349,11 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz description: The name for your API key. This is a friendly name for your reference. type: string example: 'My key name' + revocableTokens: + type: boolean + nullable: true + description: If `true`, tokens issued by this key can be individually revoked. See the token revocation documentation for more details. + example: true status: description: The status of the key. `0` is enabled, `1` is revoked. type: integer @@ -5271,9 +7391,9 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz additionalProperties: false properties: id: - type: integer + type: string description: The token ID. - example: 12345 + example: "12345" name: type: string description: The friendly name for the token. @@ -5284,10 +7404,17 @@ TOfReTlUQzgpXRW5h3n2LVXbXQhPGcVitb88Cm2R8cxQwgB1VncM8yvmKhREo2tz example: ["write:namespace", "read:namespace", "write:queue", "read:queue", "write:rule", "read:rule", "write:key", "read:key", "write:app", "read:app"] items: type: string + expires_at: + type: string + format: date-time + nullable: true + description: The date and time at which the access token expires, in ISO 8601 format. A value of `null` indicates the token does not expire. + example: "2026-04-25T00:00:00Z" required: - id - name - capabilities + - expires_at user: type: object additionalProperties: false