diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 804bed99e3..f9c6078d4b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,6 @@
# Contribution guide
-This guide covers how to contribute to the Ably docs repository. From general pull request processes, to how to update and use each textile component.
+This guide covers how to contribute to the Ably docs repository, including general pull request processes and content formatting.
## Pull request process
@@ -35,12 +35,12 @@ There are two main locations that contributors need to work with to varying exte
| Folder | Contains |
| ------ | -------- |
-| content | All content pages written in textile. |
-| src | Images, navigation and language version and management. |
+| how-tos | Tutorial content in MDX format. |
+| src | Images, navigation, and language version management. |
-## Textile format
+## Content format
-The following sections discuss how to write and implement each component using textile.
+Documentation pages use MDX format for content. The following sections discuss common formatting patterns.
### Metadata
@@ -73,19 +73,17 @@ An example heading (with a custom anchor link) is: `h2(#subscribe). Subscribe to
### Links
-Links in textile are written in quotation marks. Link text can also be [code styled](#in-line-code).
+Use standard Markdown link syntax: `[link text](url)`.
#### Internal links
-To link to another heading on the same page use the anchor link: `"channel state changes":#listen-for-state`.
+To link to another docs page use: `[messages](/docs/channels/message)`.
-To link to another docs page use: `"messages":/docs/channels/message`.
-
-You may also use in-line code to style link text: `"@get()@":/docs/api/realtime-sdk/channels#get method`
+To link to a heading on the same page: `[channel state changes](#listen-for-state)`.
#### External links
-To link externally, or outside of the docs repository, use a fully qualified link: `"Ably dashboard":https://ably.com/dashboard`.
+Use fully qualified URLs: `[Ably dashboard](https://ably.com/dashboard)`.
> Note: for dashboard links you can use `/any/` as the account ID to link directly to a specific page. For example: `https://ably.com/accounts/any/edit` for the account settings page.
@@ -164,7 +162,7 @@ To make a cell span two columns:
### Admonitions
-There are three types of admonition that can be used; `note`, `important` and `further-reading`. Update the value of `data-type` to switch between them. Admonitions are written using the HTML `` tag. Content must be constructed in HTML, other than links and in-line code styling which accept textile format.
+There are three types of admonition that can be used; `note`, `important` and `further-reading`. Update the value of `data-type` to switch between them. Admonitions are written using the HTML `` tag with HTML or Markdown content.
```html
@@ -198,7 +196,7 @@ Textile accepts several formats for unordered lists, however `*` should be used
* Mint Choc Chip
```
-For ordered lists, textile will accept any number before a `.` and order it appropriately. Ascending numbers should be used for readability and consistency.
+For ordered lists, use standard Markdown syntax with ascending numbers for readability and consistency.
```plaintext
1. Cornetto
@@ -329,7 +327,7 @@ bq(definition).
### Partials
-API references make use of [partials](content/partials/) where content is reused between files. They are included in .textile files using the following syntax:
+API references previously used partials for reusable content. This functionality has been replaced with component-based content reuse.
```plaintext
<%= partial partial_version('realtime/_stats') %>
diff --git a/content/partials/core-features/_authentication_capabilities.textile b/content/partials/core-features/_authentication_capabilities.textile
deleted file mode 100644
index 10f21c78d3..0000000000
--- a/content/partials/core-features/_authentication_capabilities.textile
+++ /dev/null
@@ -1,21 +0,0 @@
-The following capability operations are available for API keys and issued tokens:
-
-- subscribe := can subscribe to messages, objects, and presence state change messages on channels, and get the presence set of a channel
-- publish := can publish messages to channels
-- presence := can register presence on a channel (enter, update and leave)
-- object-subscribe := can subscribe to updates to objects on a channel
-- object-publish := can update objects on a channel
-- annotation-subscribe := can subscribe to individual annotations on a channel
-- annotation-publish := can publish annotations to messages on a channel
-- history := can retrieve message and presence state history on channels
-- stats := can retrieve current and historical usage statistics for an app
-- push-subscribe := can subscribe devices for push notifications
-- push-admin := can manage device registrations and push subscriptions for all devices in an app
-- channel-metadata := can get metadata for a channel, and enumerate channels
-- privileged-headers := can set data in the privileged section of the "message extras":/docs/api/realtime-sdk/messages#extras
-
-Read the "capabilities docs":/docs/auth/capabilities to get a more thorough overview of how capabilities can be used to secure your application.
-
-While most of these capabilities need to be enabled for the resource you're using them with, as described in "resource names and wildcards":/docs/auth/capabilities#wildcards, there are exceptions. The @stats@ permission only does something when attached to the wildcard resource @'*'@, or a resource that contains that as a subset, such as @'[*]*'@, since stats are app-wide.
-
-The @channel-metadata@ permission works both ways. When associated with a specific channel or set of channels it allows you to "query the metadata of a channel":/docs/metadata-stats/metadata/rest to request its status. When associated with the wildcard resource @'*'@ it takes on an additional meaning: as well as allowing channel status requests for all channels, it also allows you to "enumerate all active channels":/docs/metadata-stats/metadata/rest#enumerate.
diff --git a/content/partials/core-features/_authentication_comparison.textile b/content/partials/core-features/_authentication_comparison.textile
deleted file mode 100644
index 8f3fb5ff5c..0000000000
--- a/content/partials/core-features/_authentication_comparison.textile
+++ /dev/null
@@ -1,13 +0,0 @@
-When deciding on which authentication method you will be using, it is recommended you bear in mind the "principle of least privilege":https://en.wikipedia.org/wiki/Principle_of_least_privilege.
-
-A client should ideally only possess the credentials and rights that it needs to accomplish what it wants. This way, if the credentials are compromised, the rights that can be abused by an attacker are minimized.
-
-The following table provides guidelines on what to consider when choosing your authentication method. Many applications will most naturally use a mixed strategy: one or more trusted application servers will use basic authentication to access the service and issue tokens over HTTPS, whereas remote browsers and devices will use individually issued tokens:
-
-|_. Scenario |_. "Basic":/docs/auth/basic |_. "Token":/docs/auth/token |_. Description |
-| Your scripts may be exposed | No | Yes | If the script, program or system holding the key is exposed, for example on a user's device, you should not embed an "API key":/docs/auth#api-key and instead use "Token Authentication":/docs/auth/token. If the script is on a secure environment such as your own server, an "API key":/docs/auth#api-key with "Basic Authentication":/docs/auth#basic is fine. |
-| Your connection may be insecure | No | Yes | If there is a risk of exposure of the client's credentials, either directly or over an insecure, or insecurely proxied, connection, "Token Authentication":/docs/auth/token should be used. If you are sure the connection is secure and unmediated, "Basic Authentication":/docs/auth/basic is acceptable. |
-| You have no server to control access | Yes | No | If you do not have your own server to perform authentication and provide "tokens":/docs/api/realtime-sdk/authentication#tokens to users, you'll need to use "Basic Authentication":/docs/auth/basic. |
-| You require fine-grained access control | No | Yes | If you need to provide "privileges":/docs/auth/capabilities on a user-by-user basis, you'd be better using "Token Authentication":/docs/auth/token. If you only need a few access control groups, "Basic Authentication":/docs/auth/basic is reasonable. |
-| Users need restricted periods of access | No | Yes | If you need users to only have access for a certain period of time, or the ability to revoke access, Token Authentication is needed. If users are able to always have access, Basic Authentication is acceptable. |
-| Users need to identify themselves | Partial | Yes | If the user can be trusted to "identify":/docs/auth/identified-clients itself, "Basic Authentication":/docs/auth/basic is fine. If the user cannot be trusted however, "Token Authentication":/docs/auth/token is better as it allows for a trusted token distributor to identify the user instead. |
diff --git a/content/partials/general/events/_batched_event_headers.textile b/content/partials/general/events/_batched_event_headers.textile
deleted file mode 100644
index 01be7b0d04..0000000000
--- a/content/partials/general/events/_batched_event_headers.textile
+++ /dev/null
@@ -1,4 +0,0 @@
-Batched events will have the following headers:
-
-- content-type := the type of the payload. This will be @application/json@ or @application/x-msgpack@
-- x-ably-version := the version of the Webhook. At present this should be @1.2@
diff --git a/content/partials/general/events/_batched_events.textile b/content/partials/general/events/_batched_events.textile
deleted file mode 100644
index 1339b58e81..0000000000
--- a/content/partials/general/events/_batched_events.textile
+++ /dev/null
@@ -1,154 +0,0 @@
-Each batched message will have the following fields:
-
-- name := the event type, for example @presence.message@, @channel.message@ or @channel.closed@
-- webhookId := an internal unique ID for the configured webhook
-- source := the source for the webhook, which will be one of @channel.message@, @channel.presence@, @channel.lifecycle@, or @channel.occupancy@
-- timestamp := a timestamp represented as milliseconds since the epoch for the presence event
-- data := an object containing the data of the event defined below in "JSONPath format":https://goessner.net/articles/JsonPath/
-
-h4(#batch-example-message). Batched message events
-
-For @message@ events, @data@ will contain:
-
-- data.channelId := name of the channel that the presence event belongs to
-- data.site := an internal site identifier indicating which primary datacenter the member is present in
-- data.messages := an @Array@ of raw messages
-
-The following is an example of a batched @message@ payload:
-
-```[json]
-{
- "items": [{
- "webhookId": "ABcDEf",
- "source": "channel.message",
- "serial": "a7bcdEFghIjklm123456789:4",
- "timestamp": 1562124922426,
- "name": "channel.message",
- "data": {
- "channelId": "chat-channel-4",
- "site": "eu-west-1-A",
- "messages": [{
- "id": "ABcDefgHIj:1:0",
- "clientId": "user-3",
- "connectionId": "ABcDefgHIj",
- "timestamp": 1123145678900,
- "data": "the message data",
- "name": "a message name"
- }]
- }
- }]
-}
-```
-
-h5(#batch-example-message-decoding). Decoding batched messages
-
-Messages sent "over the realtime service":/docs/channels are automatically decoded into "@Message@":/docs/api/realtime-sdk/types#message objects by the Ably client library. With webhooks you need to to do this explicitly, using "@Message.fromEncodedArray@":/docs/api/realtime-sdk/messages#message-from-encoded-array on the @data.messages@ array, or "@Message.fromEncoded@":/docs/api/realtime-sdk/messages#message-from-encoded on an individual member of that array. This will transform them into an array of "@Message@":/docs/api/realtime-sdk/types#message objects (or in the case of @fromEncoded@, an individual "@Message@":/docs/api/realtime-sdk/types#message). This has several advantages, e.g.:
-
-* It will fully decode any @data@ (using the @encoding@) back into the same datatype that it was sent in (or an equivalent in each client library's language)
-* If you are using "encryption":/docs/channels/options/encryption, you can pass your encryption key to the method and it will decrypt the @data@ for you
-
-We recommend you do this for all messages you receive over webhooks. For example (using ably-js):
-
-```[javascript]
-webhookMessage.items.forEach((item) => {
- const messages = Ably.Realtime.Message.fromEncodedArray(item.data.messages);
- messages.forEach((message) => {
- console.log(message.toString());
- })
-})
-```
-
-h4(#batch-example-presence). Batched presence events
-
-For @presence@ events, @data@ will contain:
-
-- data.channelId := name of the channel that the presence event belongs to
-- data.site := an internal site identifier indicating which primary datacenter the member is present in
-- data.presence := an @Array@ of raw presence messages
-
-The following is an example of a batched @presence@ payload:
-
-```[json]
-{
- "items": [{
- "webhookId": "ABcDEf",
- "source": "channel.presence",
- "serial": "a7bcdEFghIjklm123456789:4",
- "timestamp": 1562124922426,
- "name": "presence.message",
- "data": {
- "channelId": "education-channel",
- "site": "eu-west-1-A",
- "presence": [{
- "id": "ABcDefgHIj:1:0",
- "clientId": "bob",
- "connectionId": "ABcDefgHIj",
- "timestamp": 1123145678900,
- "data": "the message data",
- "action": 4
- }]
- }
- }]
-}
-```
-
-h5(#batch-example-presence-decoding). Decoding batched presence messages
-
-Presence messages sent "over the realtime service":/docs/channels are automatically decoded into "@PresenceMessage@":/docs/api/realtime-sdk/types#presence-message objects by the Ably client library. With webhooks you need to to do this explicitly, using "@PresenceMessage.fromEncodedArray@":/docs/api/realtime-sdk/presence#presence-from-encoded-array on the @data.presence@ array, or "@PresenceMessage.fromEncoded@":/docs/api/realtime-sdk/presence#presence-from-encoded on an individual member of that array. This will transform them into an array of "@PresenceMessage@":/docs/api/realtime-sdk/types#presence-message objects (or in the case of @fromEncoded@, an individual "@PresenceMessage@":/docs/api/realtime-sdk/types#presence-message). This has several advantages, e.g.:
-
-* It will decode the (numerical) action into a "@Presence action@":/docs/api/realtime-sdk/presence#presence-action string (such as "@enter@", "@update@", or "@leave@")
-* It will fully decode any @data@ (using the @encoding@) back into the same datatype that it was sent in (or an equivalent in each client library's language)
-* If you are using "encryption":/docs/channels/options/encryption, you can pass your encryption key to the method and it will decrypt the @data@ for you
-
-We recommend you do this for all presence messages you receive over webhooks. For example (using ably-js):
-
-```[javascript]
-webhookMessage.items.forEach((item) => {
- const messages = Ably.Realtime.PresenceMessage.fromEncodedArray(item.data.messages);
- messages.forEach((message) => {
- console.log(message.toString());
- })
-})
-```
-
-h4(#batch-example-lifecycle). Batched channel lifecycle events
-
-For @channel lifecycle@ events, @data@ will contain:
-
-- data.channelId := name of the channel that the presence event belongs to
-- data.status := a "@ChannelStatus@":/docs/api/realtime-sdk/channel-metadata#channel-details object
-
-The @name@ of a @channel.lifecycle@ event will be @channel.opened@ or @channel.closed@.
-
-The following is an example of a batched @channel lifecycle@ payload:
-
-```[json]
-{
- "items": [{
- "webhookId": "ABcDEf",
- "source": "channel.lifecycle",
- "timestamp": 1562124922426,
- "serial": "a7bcdEFghIjklm123456789:4",
- "name": "channel.opened",
- "data": {
- "channelId": "chat-channel-5",
- "name": "chat-channel-5",
- "status": {
- "isActive": true,
- "occupancy": {
- "metrics": {
- "connections": 1,
- "publishers": 1,
- "subscribers": 1,
- "presenceConnections": 1,
- "presenceMembers": 0,
- "presenceSubscribers": 1,
- "objectPublishers": 1,
- "objectSubscribers": 1
- }
- }
- }
- }
- }]
-}
-```
diff --git a/content/partials/general/events/_enveloped_event_headers.textile b/content/partials/general/events/_enveloped_event_headers.textile
deleted file mode 100644
index 4ace3185c9..0000000000
--- a/content/partials/general/events/_enveloped_event_headers.textile
+++ /dev/null
@@ -1,4 +0,0 @@
-Enveloped events will have the following headers:
-
-- x-ably-version := the version of the Webhook. At present this should be @1.2@
-- content-type := the type of the payload. This will be @application/json@ or @application/x-msgpack@ for "enveloped":#envelope messages
diff --git a/content/partials/general/events/_enveloped_events.textile b/content/partials/general/events/_enveloped_events.textile
deleted file mode 100644
index af557aba55..0000000000
--- a/content/partials/general/events/_enveloped_events.textile
+++ /dev/null
@@ -1,89 +0,0 @@
-Each enveloped message will have the following fields:
-
-- source := the source for the webhook, which will be one of @channel.message@, @channel.presence@, @channel.lifecycle@, or @channel.occupancy@
-- appId := the Ably app this message came from
-- channel := the Ably channel where the event occurred
-- site := the Ably datacenter which sent the message
-- timestamp := a timestamp represented as milliseconds since the epoch for the presence event
-
-In addition, it will contain another field which will contain the actual message, which is named according to the message type.
-
-h4(#envelope-example-message). Enveloped message events
-
-For @message@ events, the @messages@ array contains a raw message.
-
-The following is an example of an enveloped @message@ payload:
-
-```[json]
-{
- "source": "channel.message",
- "appId": "aBCdEf",
- "channel": "channel-name",
- "site": "eu-central-1-A",
- "ruleId": "1-a2Bc",
- "messages": [{
- "id": "ABcDefgHIj:1:0",
- "connectionId": "ABcDefgHIj",
- "timestamp": 1123145678900,
- "data": "some message data",
- "name": "my message name"
- }]
-}
-```
-
-h5(#envelope-example-message-decoding). Decoding enveloped messages
-
-Messages sent "over the realtime service":/docs/channels are automatically decoded into "@Message@":/docs/api/realtime-sdk/types#message objects by the Ably client library. With webhooks you need to to do this explicitly, using "@Message.fromEncodedArray@":/docs/api/realtime-sdk/messages#message-from-encoded-array on the @messages@ array, or "@Message.fromEncoded@":/docs/api/realtime-sdk/messages#message-from-encoded on an individual member of that array. This will transform them into an array of "@Message@":/docs/api/realtime-sdk/types#message objects (or in the case of @fromEncoded@, an individual "@Message@":/docs/api/realtime-sdk/types#message). This has several advantages, e.g.:
-
-* It will fully decode any @data@ (using the @encoding@) back into the same datatype that it was sent in (or an equivalent in each client library's language)
-* If you are using "encryption":/docs/channels/options/encryption, you can pass your encryption key to the method and it will decrypt the @data@ for you
-
-We recommend you do this for all messages you receive over webhooks. For example (using ably-js):
-
-```[javascript]
-const messages = Ably.Realtime.Message.fromEncodedArray(item.messages);
-messages.forEach((message) => {
- console.log(message.toString());
-})
-```
-
-h4(#envelope-example-presence). Enveloped presence events
-
-For @presence@ events, the @presence@ array contains a raw presence message.
-
-The following is an example of of an enveloped @message@ payload with a @presence@ array:
-
-```[json]
-{
- "source": "channel.message",
- "appId": "aBCdEf",
- "channel": "channel-name",
- "site": "eu-central-1-A",
- "ruleId": "1-a2Bc",
- "presence": [{
- "id": "abCdEFgHIJ:1:0",
- "clientId": "bob",
- "connectionId": "Ab1CDE2FGh",
- "timestamp": 1582270137276,
- "data": "some data in the presence object",
- "action": 4
- }]
-}
-```
-
-h5(#envelope-example-presence-decoding). Decoding enveloped presence messages
-
-Presence messages sent "over the realtime service":/docs/channels are automatically decoded into "@PresenceMessage@":/docs/api/realtime-sdk/types#presence-message objects by the Ably client library. With webhooks you need to to do this explicitly, using "@PresenceMessage.fromEncodedArray@":/docs/api/realtime-sdk/presence#presence-from-encoded-array on the @presence@ array, or "@PresenceMessage.fromEncoded@":/docs/api/realtime-sdk/presence#presence-from-encoded on an individual member of that array. This will transform them into an array of "@PresenceMessage@":/docs/api/realtime-sdk/types#presence-message objects (or in the case of @fromEncoded@, an individual "@PresenceMessage@":/docs/api/realtime-sdk/types#presence-message). This has several advantages, e.g.:
-
-* It will decode the (numerical) action into a "@Presence action@":/docs/api/realtime-sdk/presence#presence-action string (such as "@enter@", "@update@", or "@leave@")
-* It will fully decode any @data@ (using the @encoding@) back into the same datatype that it was sent in (or an equivalent in each client library's language)
-* If you are using "encryption":/docs/channels/options/encryption, you can pass your encryption key to the method and it will decrypt the @data@ for you
-
-We recommend you do this for all presence messages you receive over webhooks. For example (using ably-js):
-
-```[javascript]
-const messages = Ably.Realtime.PresenceMessage.fromEncodedArray(item.messages);
-messages.forEach((message) => {
- console.log(message.toString());
-})
-```
\ No newline at end of file
diff --git a/content/partials/general/events/_events_examples_intro.textile b/content/partials/general/events/_events_examples_intro.textile
deleted file mode 100644
index eac29ca928..0000000000
--- a/content/partials/general/events/_events_examples_intro.textile
+++ /dev/null
@@ -1 +0,0 @@
-Given the various potential combinations of @enveloped@, @batched@ and message sources, it can be good to know what to expect given certain combinations of rules.
diff --git a/content/partials/general/events/_non_enveloped_event_headers.textile b/content/partials/general/events/_non_enveloped_event_headers.textile
deleted file mode 100644
index 60799d64cb..0000000000
--- a/content/partials/general/events/_non_enveloped_event_headers.textile
+++ /dev/null
@@ -1,13 +0,0 @@
-Non-enveloped events have quite a few headers, in order to provide context to the data sent in the payload. These are:
-
-- content-type := the type of the payload. This can be either @application/json@, @text/plain@, or @application/octet-stream@, depending on if it's @JSON@, @text@, or @binary@ respectively
-- x-ably-version := the version of the Webhook. At present this should be @1.2@
-- x-ably-envelope-appid := the "app ID":/docs/ids-and-keys/ which the message came from
-- x-ably-envelope-channel := the Ably channel which the message came from
-- x-ably-envelope-rule-id := the Ably rule ID which was activated to send this message
-- x-ably-envelope-site := the Ably datacenter which sent the message
-- x-ably-envelope-source := the "source":#sources for the webhook, which will be one of @channel.message@, @channel.presence@, @channel.lifecycle@, or @channel.occupancy@
-- x-ably-message-client-id := the client ID of the connection which sent the event
-- x-ably-message-connection-id := the connection ID responsible for the initial event
-- x-ably-message-id := the message's unique ID
-- x-ably-message-timestamp := the time the message was originally sent
diff --git a/content/partials/general/events/_non_enveloped_events.textile b/content/partials/general/events/_non_enveloped_events.textile
deleted file mode 100644
index ba7e21569f..0000000000
--- a/content/partials/general/events/_non_enveloped_events.textile
+++ /dev/null
@@ -1,39 +0,0 @@
-h4(#no-envelope-example-message). Non-enveloped message events
-
-For @message@ events, there will be the additional headers:
-
-- x-ably-message-name := The "name":/docs/api/realtime-sdk/messages#name of the @Message@
-
-The payload will contain the "data":/docs/api/realtime-sdk/messages#data of the @Message@.
-
-For example, if you sent the following curl message, which sends a JSON message to the channel @my_channel@:
-
-```[curl]
-curl -X POST https://main.realtime.ably.net/channels/my_channel/messages \
- -u "{{API_KEY}}" \
- -H "Content-Type: application/json" \
- --data '{ "name": "publish", "data": "example" }'
-```
-
-The @x-ably-message-name@ header would be @publish@, and the payload would be @example@.
-
-h4(#no-envelope-example-presence). Non-enveloped presence events
-
-For @Presence@ events, there will be the additional headers:
-
-- x-ably-message-action := the action performed by the event (@update@, @enter@, @leave@)
-
-The payload will contain the "data":/docs/api/realtime-sdk/presence#presence-message of the @Presence@ message.
-
-For example, if a "client enters":/docs/api/realtime-sdk/presence#enter a channel's presence with the following code:
-
-```[jsall]
-realtime = new Ably.Realtime({
- key: '{{API_KEY}}',
- clientId: 'bob'
-});
-channel = realtime.channels.get('some_channel');
-await channel.presence.enter('some data');
-```
-
-Then the @x-ably-message-action@ would be @enter@, the @x-ably-message-client-id@ would be "bob", and the payload would be "some data".
diff --git a/content/partials/realtime/_stats.textile b/content/partials/realtime/_stats.textile
deleted file mode 100644
index 8315a8eead..0000000000
--- a/content/partials/realtime/_stats.textile
+++ /dev/null
@@ -1,53 +0,0 @@
-h4. Parameters
-
-- options query params := an optional object Hash @ARTStatsQuery@ @StatsRequestParams@ "@Param@[]":#param array containing the query parameters set of parameters used to specify which statistics are retrieved. If not specified the default parameters will be used
-
-- &block
:= yields a @PaginatedResult@ object
-- callback
:= called with a "ARTPaginatedResult":#paginated-result<"ARTStats":/docs/api/rest-sdk/types#stats> object or an error
-
-h4. @options@ parameters @ARTStatsQuery@ properties @StatsRequestParams@ properties @params@ properties
-
-The following options, as defined in the "REST @/stats@ API":/docs/api/rest-api#stats endpoint, are permitted:
-
-- start :start Start := _beginning of time_ earliest @DateTimeOffset@ or @Time@ or time in milliseconds since the epoch for any stats retrieved __Type: @Long@ @Int@ or @Time@ @DateTimeOffset@ @Number@ __
-- end :end End := _current time_ latest @DateTimeOffset@ or @Time@ or time in milliseconds since the epoch for any stats retrieved __Type: @Long@ @Int@ or @Time@ @DateTimeOffset@ @Number@ __
-- direction :direction Direction := _backwards_ @:forwards@ or @:backwards@ @forwards@ or @backwards@ __Type: @String@ @Symbol@ @Direction@ enum __
-- limit :limit Limit := _100_ maximum number of stats to retrieve up to 1,000 __Type: @Integer@ @Number@ __
-- unit :unit Unit := _minute_ @:minute@, @:hour@, @:day@ or @:month@. @minute@, @hour@, @day@ or @month@. Based on the unit selected, the given start or end times are rounded down to the start of the relevant interval depending on the unit granularity of the query __Type: @String@ "@StatsIntervalGranularity@":/docs/api/realtime-sdk/types#stats-granularity "@ARTStatsGranularity@":#stats-granularity @Symbol@ "@StatsIntervalGranularity@":/docs/api/realtime-sdk/types#stats-granularity enum __
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise is fulfilled with a "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result object containing an array of "@Stats@":/docs/api/realtime-sdk/types#stats objects. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object.
-
-blang[objc,swift].
- h4. Callback result
-
- On success, @result@ contains a "@PaginatedResult@":#paginated-result encapsulating an array of "@Stats@":/docs/api/realtime-sdk/types#stats objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods.
-
- On failure to retrieve stats, @err@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation.
-
-blang[java].
- h4. Returns
-
- On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "@Stats@":/docs/api/realtime-sdk/types#stats objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods.
-
- Failure to retrieve the stats will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception
-
-blang[csharp].
- h4. Returns
-
- Returns a @Task@ which needs to be awaited.
-
- On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "@Stats@":/docs/api/realtime-sdk/types#stats objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@NextAsync@":#paginated-result and "@FirstAsync@":#paginated-result methods.
-
- Failure to retrieve the stats will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception
-
-blang[ruby].
- h4. Returns
-
- A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the stats method.
-
- On success, the registered success callbacks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yields a "PaginatedResult":#paginated-result that encapsulates an array of "@Stats@":/docs/api/realtime-sdk/types#stats objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods.
-
- Failure to retrieve the stats will trigger the errback callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation.
diff --git a/content/partials/rest/_request.textile b/content/partials/rest/_request.textile
deleted file mode 100644
index ae7a9faa98..0000000000
--- a/content/partials/rest/_request.textile
+++ /dev/null
@@ -1,71 +0,0 @@
-h6(#request).
- default: request
- go,csharp: Request
-
-bq(definition).
- default: request(String method, String path, Object params, Object body, Object headers, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "HttpPaginatedResponse":/docs/api/rest-sdk/types#http-paginated-response results))
- jsall: request(method, path, version, params?, body?, headers?): Promise<"HttpPaginatedResponse":/docs/api/rest-sdk/types#http-paginated-response>
- ruby,php: "HttpPaginatedResponse":/docs/api/rest-sdk/types#http-paginated-response request(String method, String path, Object params, Object body, Object headers)
- python: publish(method=String, path=String, params=Object, body=Object, headers=Object)
- java: "HttpPaginatedResponse":/docs/api/rest-sdk/types#http-paginated-response request(String method, String path, Object params, Object body, Object headers)
- csharp: Task<"HttpPaginatedResponse":/docs/api/rest-sdk/types#http-paginated-response> Request(string method, string path, Dictionary requestParams, JToken body, Dictionary headers)
- objc,swift: request(method: String, path: String, params: Object?, body: Object?, headers: Object?, callback: ("ARTHttpPaginatedResponse":/docs/api/rest-sdk/types#http-paginated-response, ARTErrorInfo?) -> Void)
- go: "HTTPPaginatedResponse":/docs/api/rest-sdk/types#http-paginated-response Request(method string, path string, params PaginateParams, body interface, headers http.Header)
-
-Makes a REST request to a provided path. This is provided as a convenience for developers who wish to use REST API functionality that is either not documented or is not yet included in the public API, without having to handle authentication, paging, fallback hosts, MsgPack and JSON support, etc. themselves.
-
-h4. Parameters
-
-- method := either @get@, @post@, @put@, @patch@ or @delete@. __Type: String string __
-- path := the path to query. __Type: String string __
-
-- version
:= version of the REST API to use. __Type: Number__
-
-- params := (optional) any querystring parameters needed. __Type: Object PaginateParams Dictionary __
-- body := (optional; for @post@, @put@ and @patch@ methods) the body of the request, as anything that can be serialized into JSON, such as an @Object@ or @Array@. a JToken. __Type: Serializable interface JToken __
-- headers := (optional) any headers needed. If provided, these will be mixed in with the default library headers. __Type: Object http.Header Dictionary __
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise is fulfilled with the "@HttpPaginatedResponse@":/docs/api/realtime-sdk/types#http-paginated-response object returned by the HTTP request. The response object will contain an empty or JSON-encodable object. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object.
-
-blang[objc,swift].
- h4. Callback result
-
- On successfully receiving a response from Ably, @results@ contains an "@HttpPaginatedResponse@ @ARTHttpPaginatedResponse@ ":/docs/api/rest-sdk/types#http-paginated-response containing the @statusCode@ of the response, a @success@ boolean (equivalent to whether the status code is between 200 and 299), @headers@, and an @items@ array containing the current page of results. It supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods, identically to "@PaginatedResult@":/docs/api/rest-sdk/types#paginated-result.
-
- On failure to obtain a response, @err@ contains an "@ErrorInfo@":/docs/api/rest-sdk/types#error-info object with an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an HTTP Paginated Response, not an @err@).
-
-blang[java,ruby,php,python].
- h4. Returns
-
- On successfully receiving a response from Ably, the returned "@HttpPaginatedResponse@":/docs/api/rest-sdk/types#http-paginated-response contains a @status_code@ @statusCode@ and a @success@ boolean, @headers@, and an @items@ array containing the current page of results. It supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods, identically to "@PaginatedResult@":/docs/api/rest-sdk/types#paginated-result.
-
- Failure to obtain a response will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception. (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an HTTP Paginated Response, not an exception).
-
-blang[csharp].
- h4. Returns
-
- The method is asynchronous and return a Task that has to be awaited to get the result.
-
- On successfully receiving a response from Ably, the returned "@HttpPaginatedResponse@":/docs/api/rest-sdk/types#http-paginated-response containing the @StatusCode@ and a @Success@ boolean, @Headers@, and an @Items@ array containing the current page of results. "@HttpPaginatedResponse@":/docs/api/rest-sdk/types#http-paginated-response supports pagination using "@NextAsync@":#paginated-result and "@FirstAsync@":#paginated-result methods.
-
- Failure to obtain a response will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception. (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an HTTP Paginated Response, not an exception).
-
-h4. Example
-
-```[jsall]
- const response = await rest.request(
- 'get',
- '/channels/someChannel/messages',
- 3,
- { limit: 1, direction: 'forwards' },
- );
- console.log('Success! status code was ' + response.statusCode);
- console.log(response.items.length + ' items returned');
- if (response.hasNext()) {
- const nextPage = await response.next();
- console.log(nextPage.items.length + ' more items returned');
- }
-```
diff --git a/content/partials/rest/_stats.textile b/content/partials/rest/_stats.textile
deleted file mode 100644
index 015a9fd82b..0000000000
--- a/content/partials/rest/_stats.textile
+++ /dev/null
@@ -1,44 +0,0 @@
-h4. Parameters
-
-- options query params := an optional object Hash @ARTStatsQuery@ @StatsRequestParams@ "@Param@[]":#param array containing the query parameters set of parameters used to specify which statistics are retrieved. If not specified the default parameters will be used
-
-- &block
:= yields a @PaginatedResult@ object
-- callback
:= called with a "ARTPaginatedResult":#paginated-result<"ARTStats":/docs/api/rest-sdk/types#stats> object or an error
-
-h4. @options@ parameters @ARTStatsQuery@ properties @StatsRequestParams@ properties @params@ properties
-
-The following options, as defined in the "REST @/stats@ API":/docs/api/rest-api#stats endpoint, are permitted:
-
-- start :start Start := _beginning of time_ earliest @DateTimeOffset@ or @Time@ or time in milliseconds since the epoch for any stats retrieved __Type: @Long@ @Int@ or @Time@ @DateTimeOffset@ @Number@ __
-- end :end End := _current time_ latest @DateTimeOffset@ or @Time@ or time in milliseconds since the epoch for any stats retrieved __Type: @Long@ @Int@ or @Time@ @DateTimeOffset@ @Number@ __
-- direction :direction Direction := _backwards_ @:forwards@ or @:backwards@ @forwards@ or @backwards@ __Type: @String@ @Symbol@ @Direction@ enum __
-- limit :limit Limit := _100_ maximum number of stats to retrieve up to 1,000 __Type: @Integer@ @Number@ __
-- unit :unit Unit := _minute_ @:minute@, @:hour@, @:day@ or @:month@. @minute@, @hour@, @day@ or @month@. Based on the unit selected, the given start or end times are rounded down to the start of the relevant interval depending on the unit granularity of the query __Type: @String@ "@StatsIntervalGranularity@":/docs/api/rest-sdk/types#stats-granularity "@ARTStatsGranularity@":#stats-granularity @Symbol@ "@StatsIntervalGranularity@":/docs/api/rest-sdk/types#stats-granularity enum __
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise is fulfilled with a "@PaginatedResult@":/docs/api/rest-sdk/types#paginated-result object containing an array of "@Stats@":/docs/api/rest-sdk/types#stats objects. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/rest-sdk/types#error-info object.
-
-blang[objc,swift].
- h4. Callback result
-
- On success, @result@ contains a "@PaginatedResult@":#paginated-result encapsulating an array of "@Stats@":/docs/api/rest-sdk/types#stats objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods.
-
- On failure to retrieve stats, @err@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation.
-
-blang[java,ruby,php].
- h4. Returns
-
- On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "@Stats@":/docs/api/rest-sdk/types#stats objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods.
-
- Failure to retrieve the stats will raise an "@AblyException@":/docs/api/rest-sdk/types#ably-exception
-
-blang[csharp].
- h4. Returns
-
- The method is asynchronous and return Task which needs to be awaited.
-
- On success, the returned "@PaginatedResult@":#paginated-result encapsulates a list of "@Stats@":/docs/api/rest-sdk/types#stats objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@NextAsync@":#paginated-result and "@FirstAsync@":#paginated-result methods.
-
- Failure to retrieve the stats will raise an "@AblyException@":/docs/api/rest-sdk/types#ably-exception
diff --git a/content/partials/shared/_channel_enumeration.textile b/content/partials/shared/_channel_enumeration.textile
deleted file mode 100644
index 0396f821f1..0000000000
--- a/content/partials/shared/_channel_enumeration.textile
+++ /dev/null
@@ -1,28 +0,0 @@
-This enumerates all active channels in the application. This is a paginated API following the same API conventions as other paginated APIs in the "REST interface":/docs/api/rest-sdk.
-
-This API is intended for occasional use by your servers only; for example, to get an initial set of active channels to be kept up to date using the "channel lifecycle metachannel":/docs/metadata-stats/metadata/subscribe. It is heavily rate-limited: only a single in-flight channel enumeration call is permitted to execute at any one time. Further concurrent calls will be refused with an error with code @42912@.
-
-Example request:
-
-bc[sh]. curl https://main.realtime.ably.net/channels \
- -u "{{API_KEY}}"
-
-This will return either a list of channel names, or a "ChannelDetails":/docs/api/realtime-sdk/channel-metadata#channel-details object depending on what options you've specified.
-
-The following parameters are supported:
-
-- limit := _100_ optionally specifies the maximum number of results to return. A limit greater than 1000 is unsupported __Type: @integer@__
-- prefix := optionally limits the query to only those channels whose name starts with the given prefix __Type: @string@__
-- by := _id (≥ v3) or value (≤ v2)_ optionally specifies what to return. Use @by=id@ to return only channel names or @by=value@ to return "@ChannelDetails@":/docs/api/realtime-sdk/channel-metadata#channel-details. Using @by=id@ will be much faster, and making very regular @by=value@ enumeration queries can prevent channels from closing down from inactivity.
-
-The credentials presented with the request must include the @channel-metadata@ permission for the wildcard resource @'*'@.
-
-Client libraries do not provide a dedicated API to enumerate channels, but make this available using the "request":/docs/api/rest-sdk#request method. When using this, you can simply iterate through the "PaginatedResults":/docs/api/rest-sdk/types#paginated-result to enumerate through the results.
-
-@Enumeration@ is possible of all channels in an app, by repeated calls to the API, following the @next@ relative link on each successive call, until there is no @next@ relative link. However, this is subject to several limitations:
-
-* Channels that become active, or become inactive, between the first and last request in the sequence, might or might not appear in the result. The API guarantees that if a channel is continuously active from the time that the first request is made until the time that the last request completes, then it is guaranteed to be present in the result. Similarly, if a channel is continuously inactive between those times then it is guaranteed not to be present in the result;
-* Since the state of the cluster may change between successive calls, a pagination sequence may become invalid, in which case the request will respond with an error with code @40011@. In this case, to get a complete result, it is necessary to start the enumeration again from the beginning. Other API options to deal with this possibility maybe provided in later versions of this API. Enumerations that are satisfiable in the first response page do not have this issue.
-* The API does not guarantee that the limit will be achieved even if that would be possible. For example, if you specify a limit of 100, the API may return only 37 results together with a @next@ link to get the next page, even if you have more than 37 channels. In the extreme case, the API may return 0 results with a next link. In particular this may be the case if you have a large number of active channels but are specifying a @prefix@ that excludes a significant proportion of them.
-* The API does not guarantee that there will be no duplicated results between different pages, especially if a channel is alive in multiple regions. (It does not _currently_ do so, but it may begin to do so with no warning or deprecation period, so your implementation should be able to cope with duplication)
-* If you use @by=value@ (which until protocol v3 was the default), just enumerating channels can briefly keep them alive, meaning if you do very regular enumeration you can get a situation where channels never close.
diff --git a/content/partials/shared/_channel_metadata.textile b/content/partials/shared/_channel_metadata.textile
deleted file mode 100644
index 9f39bca6e4..0000000000
--- a/content/partials/shared/_channel_metadata.textile
+++ /dev/null
@@ -1,10 +0,0 @@
-This returns a "ChannelDetails":/docs/api/realtime-sdk/channel-metadata#channel-details for the given channel, indicating global "occupancy":/docs/api/rest-sdk/channel-status#occupancy. A side-effect of this request, in the current version of this API, is that it will cause the channel in question to become activated; therefore it is primarily intended to be used in conjunction with the "enumeration API":#enumeration-rest or in situations where the application has another means to know whether or not a given channel is active.
-
-Example request:
-
-bc[sh]. curl https://main.realtime.ably.net/channels/ \
- -u "{{API_KEY}}"
-
-The credentials presented with the request must include the @channel-metadata@ permission for the channel in question.
-
-Client libraries currently do not support this API, but it is usable via the generic "request API":/docs/api/rest-sdk#request.
diff --git a/content/partials/shared/_channel_namespaces.textile b/content/partials/shared/_channel_namespaces.textile
deleted file mode 100644
index 857a9a2bf5..0000000000
--- a/content/partials/shared/_channel_namespaces.textile
+++ /dev/null
@@ -1,20 +0,0 @@
-One or more channel rules may be configured for an app in your "dashboard":https://ably.com/dashboard. These are rules which apply to a channel based on its 'namespace'. The namespace is the first colon-delimited segment of its name (from the start, up to and including, the last character before the @:@). If the channel name contains no colon, the namespace is the entire channel name.
-
-For example, the following channels are all part of the "public" namespace:
-
-* @public@
-* @public:events@
-* @public:news:americas@
-
-*Note* that wildcards are not supported in channel namespaces.
-
-The namespace attributes that can be configured are:
-
-- Persist last message := if enabled, the very last message published on a channel will be stored for an entire year, retrievable using the "channel rewind mechanism":/docs/channels/options/rewind by attaching to the channel with @rewind=1@. If you send multiple messages atomically in a single protocol message, for example with @publish([{...}, {...}, {...}])@, you would receive all of them as one message. Only messages are stored, not presence messages. This last message storage is not accessible using the normal history API, only through rewind. **Please note that for the message stored, an additional message is deducted from your monthly allocation.**
-- Persist all messages := if enabled, all messages within this namespace will be stored according to the storage rules for your account (24 hours for free accounts). You can access stored messages via the "history API":/docs/storage-history/history. **Please note that for each message stored, an additional message is deducted from your monthly allocation.**
-- Identified := if enabled, clients will not be permitted to use (including to attach, publish, or subscribe) matching channels unless they are "identified":/docs/auth/identified-clients (they have an assigned client ID). Anonymous clients are not permitted to join these channels. Find out more about "authenticated and identified clients":/docs/auth/identified-clients.
-- TLS only := if enabled, only clients who have connected to Ably over TLS will be allowed to use matching channels. By default all of Ably's client libraries use TLS when communicating with Ably over REST or when using our Realtime transports such as Websockets.
-- Push notifications enabled := If checked, publishing messages with a push payload in the extras field is permitted and can trigger the delivery of a push notification to registered devices for the channel. Find out more about "push notifications":/docs/push.
-- Message interactions enabled := If enabled, messages received on a channel will contain a unique @timeserial@ that can be referenced by later messages for use with message interactions. Find out more about "message interactions":/docs/channels/messages#message-interactions.
-
-Key or token capabilities can also specify access rights based on channel namespace. Find out more about "authentication":/docs/auth.
diff --git a/content/partials/shared/_presence_states.textile b/content/partials/shared/_presence_states.textile
deleted file mode 100644
index 43794c0a1d..0000000000
--- a/content/partials/shared/_presence_states.textile
+++ /dev/null
@@ -1,11 +0,0 @@
-Whenever a member enters or leaves a channel, or updates "their member data":#member-data, a presence event is emitted to all presence subscribers on that channel. Subscribing to presence events makes it incredibly easy to build an app that shows, in real time, any changes to clients connected to Ably and present on a channel.
-
-The following presence events are emitted:
-
-- :enter PresenceAction.ENTER Action.ENTER Enter enter := A new member has entered the channel
-
-- :leave PresenceAction.LEAVE Action.LEAVE Leave leave := A member who was present has now left the channel. This may be a result of an explicit request to leave or implicitly when detaching from the channel. Alternatively, if a member's connection is abruptly disconnected and they do not resume their connection within a minute, Ably treats this as a leave event as the client is no longer present
-
-- :update PresenceAction.UPDATE Action.UPDATE Update update := An already present member has updated their "member data":#member-data. Being notified of member data updates can be very useful, for example, it can be used to update the status of a user when they are typing a message
-
-- :present PresenceAction.PRESENT Action.PRESENT Present present := When subscribing to presence events on a channel that already has members present, this event is emitted for every member already present on the channel before the subscribe listener was registered
diff --git a/content/partials/shared/_token_auth_methods.textile b/content/partials/shared/_token_auth_methods.textile
deleted file mode 100644
index d6d23b4a60..0000000000
--- a/content/partials/shared/_token_auth_methods.textile
+++ /dev/null
@@ -1,11 +0,0 @@
-- authCallback AuthCallback auth_callback :auth_callback := A function function with the form @function(tokenParams, callback(err, tokenOrTokenRequest))@ @TokenCallback@ instance callable (eg a lambda) proc / lambda (called synchronously in REST and Realtime but does not block EventMachine in the latter) which is called when a new token is required. The role of the callback is to obtain a fresh token, one of: an Ably Token string (in plain text format); a signed "@TokenRequest@":/docs/api/realtime-sdk/types#token-request ; a "@TokenDetails@":/docs/api/realtime-sdk/types#token-details (in JSON format); an "Ably JWT":/docs/api/realtime-sdk/authentication#ably-jwt. See "our authentication documentation":/docs/auth for details of the Ably TokenRequest format and associated API calls. __Type: @Callable@ @TokenCallback@ @Proc@ @Func>@ __
-
-- authUrl AuthUrl :auth_url auth_url := A URL that the library may use to obtain a fresh token, one of: an Ably Token string (in plain text format); a signed "@TokenRequest@":/docs/api/realtime-sdk/types#token-request ; a "@TokenDetails@":/docs/api/realtime-sdk/types#token-details (in JSON format); an "Ably JWT":/docs/api/realtime-sdk/authentication#ably-jwt. For example, this can be used by a client to obtain signed Ably TokenRequests from an application server. __Type: @String@ @Uri@ @NSURL@ __
-
-- authMethod AuthMethod auth_method :auth_method := _@GET@ @:get@ _ The HTTP verb to use for the request, either @GET@ @:get@ or @POST@ @:post@ __Type: @String@ @Symbol@ @HttpMethod@ __
-
-- authHeaders AuthHeaders auth_headers :auth_headers := A set of key value pair headers to be added to any request made to the @authUrl@ @AuthUrl@ . Useful when an application requires these to be added to validate the request or implement the response. If the @authHeaders@ object contains an @authorization@ key, then @withCredentials@ will be set on the xhr request. __Type: @Object@ @Dict@ @Hash@ @Associative Array@ @Param []@ @Dictionary@ @Map@ __
-
-- authParams AuthParams :auth_params auth_params := A set of key value pair params to be added to any request made to the @authUrl@ @AuthUrl@ . When the @authMethod@ @AuthMethod@ is @GET@, query params are added to the URL, whereas when @authMethod@ @AuthMethod@ is @POST@, the params are sent as URL encoded form data. Useful when an application require these to be added to validate the request or implement the response. __Type: @Object@ @Hash@ @Associative Array@ @Param[]@ @Dictionary@ @NSArray@ @[NSURLQueryItem]/Array@ @Map@ __
-
-- tokenDetails TokenDetails token_details :token_details := An authenticated "@TokenDetails@":/docs/api/realtime-sdk/types#token-details object (most commonly obtained from an Ably Token Request response). This option is mostly useful for testing: since tokens are short-lived, in production you almost always want to use an authentication method that allows the client library to renew the token automatically when the previous one expires, such as @authUrl@ @AuthUrl@ @:auth_url@ @auth_url@ or @authCallback@ AuthCallback @auth_callback@ @:auth_callback@ . Use this option if you wish to use Token authentication. Read more about "Token authentication":/docs/auth/token __Type: @TokenDetails@__
diff --git a/content/partials/types/_ably_exception.textile b/content/partials/types/_ably_exception.textile
deleted file mode 100644
index d46fdcb9f9..0000000000
--- a/content/partials/types/_ably_exception.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-An @AblyException@ is an exception encapsulating error information containing an Ably-specific error code and generic status code, where applicable.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-- errorInfo ErrorInfo := "@ErrorInfo":/docs/api/realtime-sdk/types#error-info corresponding to this exception, where applicable __Type: @ErrorInfo@__
diff --git a/content/partials/types/_auth_options.textile b/content/partials/types/_auth_options.textile
deleted file mode 100644
index a5ac1891c3..0000000000
--- a/content/partials/types/_auth_options.textile
+++ /dev/null
@@ -1,28 +0,0 @@
-blang[jsall].
- @AuthOptions@ is a plain JavaScript object and is used when making "authentication":/docs/auth requests. If passed in, an @authOptions@ object will be used instead of (as opposed to supplementing or being merged with) the default values given when the library was instantiated. The following attributes are supported:
-
-blang[ruby].
- @AuthOptions@ is a Hash object and is used when making "authentication":/docs/auth requests. These options will supplement or override the corresponding options given when the library was instantiated. The following key symbol values can be added to the Hash:
-
-blang[python].
- @AuthOptions@ is a Dict and is used when making "authentication":/docs/auth requests. These options will supplement or override the corresponding options given when the library was instantiated. The following key symbol values can be added to the Dict:
-
-blang[php].
- @AuthOptions@ is an Associative Array and is used when making "authentication":/docs/auth requests. These options will supplement or override the corresponding options given when the library was instantiated. The following named keys and values can be added to the Associative Array:
-
-blang[java,swift,objc,go].
- @ART@ @AuthOptions@ is used when making "authentication":/docs/auth requests. These options will supplement or override the corresponding options given when the library was instantiated.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
- Python: Attributes
-
-<%= partial partial_version('shared/_token_auth_methods') %>
-
-- key Key :key key := Optionally the "API key":/docs/auth#api-key to use can be specified as a full key string; if not, the API key passed into "@ClientOptions@":#client-options when instancing the Realtime or REST library is used __Type: @String@__
-
-- queryTime QueryTime :query_time query_time := _false_ If true, the library will query the Ably servers for the current time when "issuing TokenRequests":/docs/auth/token instead of relying on a locally-available time of day. Knowing the time accurately is needed to create valid signed Ably "TokenRequests":/docs/auth/token, so this option is useful for library instances on auth servers where for some reason the server clock cannot be kept synchronized through normal means, such as an "NTP daemon":https://en.wikipedia.org/wiki/Ntpd . The server is queried for the current time once per client library instance (which stores the offset from the local clock), so if using this option you should avoid instancing a new version of the library for each request. __Type: @Boolean@__
-
-- token Token :token := An authenticated token. This can either be a "@TokenDetails@":/docs/api/realtime-sdk/types#token-details object, a "@TokenRequest@":/docs/api/realtime-sdk/types#token-request object, or token string (obtained from the @token@ @Token@ property of a "@TokenDetails@":/docs/api/realtime-sdk/types#token-details component of an Ably TokenRequest response, or a "JSON Web Token":https://tools.ietf.org/html/rfc7519 satisfying "the Ably requirements for JWTs":/docs/auth/token#jwt). This option is mostly useful for testing: since tokens are short-lived, in production you almost always want to use an authentication method that allows the client library to renew the token automatically when the previous one expires, such as @authUrl@ AuthUrl :auth_url auth_url or authCallback AuthCallback auth_callback :auth_callback . Read more about "Token authentication":/docs/auth/token __Type: @String@, @TokenDetails@ or @TokenRequest@__
diff --git a/content/partials/types/_base_ably_exception.textile b/content/partials/types/_base_ably_exception.textile
deleted file mode 100644
index 346b9f0130..0000000000
--- a/content/partials/types/_base_ably_exception.textile
+++ /dev/null
@@ -1,13 +0,0 @@
-A @BaseAblyException@ an @AblyException@ is an exception encapsulating error information containing an Ably-specific error code and generic status code, where applicable.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
- python: Attributes
-
-- code Code := Ably error code (see "ably-common/protocol/errors.json":https://github.com/ably/ably-common/blob/main/protocol/errors.json) __Type: @Integer@__
-
-- statusCode status_code StatusCode := HTTP Status Code corresponding to this error, where applicable __Type: @Integer@__
-
-- message Message := Additional message information, where available __Type: @String@__
diff --git a/content/partials/types/_batch_presence_failure_result.textile b/content/partials/types/_batch_presence_failure_result.textile
deleted file mode 100644
index cf3995a7cf..0000000000
--- a/content/partials/types/_batch_presence_failure_result.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @BatchPresenceFailureResult@ contains information about the result of an unsuccessful batch presence request for a single channel.
-
-h4.
- default: Properties
-
-- channel := The channel name the presence state failed to be retrieved for __Type: @String@__
-
-- error := Describes the reason for which presence state could not be retrieved for the channel as an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object __Type: "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info__
diff --git a/content/partials/types/_batch_presence_success_result.textile b/content/partials/types/_batch_presence_success_result.textile
deleted file mode 100644
index 4be5e5e2bf..0000000000
--- a/content/partials/types/_batch_presence_success_result.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @BatchPresenceSuccessResult@ contains information about the result of a successful batch presence request for a single channel.
-
-h4.
- default: Properties
-
-- channel := The channel name the presence state was retrieved for __Type: @String@__
-
-- presence := An array of "@PresenceMessage@":/docs/api/realtime-sdk/types#presence-message describing members present on the channel __Type: "@PresenceMessage[]@":/docs/api/realtime-sdk/types#presence-message
diff --git a/content/partials/types/_batch_publish_failure_result.textile b/content/partials/types/_batch_publish_failure_result.textile
deleted file mode 100644
index 2f7972cc1c..0000000000
--- a/content/partials/types/_batch_publish_failure_result.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @BatchPublishFailureResult@ contains information about the result of unsuccessful publishes to a channel requested by a single "@BatchPublishSpec@":/docs/api/realtime-sdk/types#batch-publish-spec.
-
-h4.
- default: Properties
-
-- channel := The name of the channel the message(s) failed to be published to __Type: @String@__
-
-- error := Describes the reason for which the message(s) failed to publish to the channel as an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object __Type: "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info__
diff --git a/content/partials/types/_batch_publish_spec.textile b/content/partials/types/_batch_publish_spec.textile
deleted file mode 100644
index 44b3016b1a..0000000000
--- a/content/partials/types/_batch_publish_spec.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @BatchPublishSpec@ describes the messages that should be published by a batch publish operation, and the channels to which they should be published.
-
-h4.
- default: Properties
-
-- channels := The names of the channels to publish the @messages@ to __Type: @String[]@__
-
-- messages := An array of "@Message@":/docs/api/realtime-sdk/types#message objects __Type: "@Message[]@":/docs/api/realtime-sdk/types#message__
diff --git a/content/partials/types/_batch_publish_success_result.textile b/content/partials/types/_batch_publish_success_result.textile
deleted file mode 100644
index ebde876657..0000000000
--- a/content/partials/types/_batch_publish_success_result.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @BatchPublishSuccessResult@ contains information about the result of successful publishes to a channel requested by a single "@BatchPublishSpec@":/docs/api/realtime-sdk/types#batch-publish-spec.
-
-h4.
- default: Properties
-
-- channel := The name of the channel the message(s) was published to __Type: @String@__
-
-- messageId := A unique ID prefixed to the @Message.id@ of each published message __Type: @String@__
diff --git a/content/partials/types/_batch_result.textile b/content/partials/types/_batch_result.textile
deleted file mode 100644
index 0f38217513..0000000000
--- a/content/partials/types/_batch_result.textile
+++ /dev/null
@@ -1,10 +0,0 @@
-A @BatchResult@ contains information about the results of a batch operation.
-
-h4.
- default: Properties
-
-- successCount := The number of successful operations in the request __Type: @Number@__
-
-- failureCount := The number of unsuccessful operations in the request __Type: @Number@__
-
-- messages := An array of results for the batch operation (for example, an array of "@BatchPublishSuccessResult@":/docs/api/realtime-sdk/types#batch-publish-success-result or "@BatchPublishFailureResult@":/docs/api/realtime-sdk/types#batch-publish-failure-result for a channel batch publish request) __Type: Object[]__
diff --git a/content/partials/types/_channel_details.textile b/content/partials/types/_channel_details.textile
deleted file mode 100644
index 1dd8925635..0000000000
--- a/content/partials/types/_channel_details.textile
+++ /dev/null
@@ -1,53 +0,0 @@
-h3(#channel-details). ChannelDetails
-
-@ChannelDetails@ is an object returned when requesting or receiving "channel metadata":/docs/metadata-stats/metadata. It contains information on the channel itself, along with the current state of the channel in the "ChannelStatus":#channel-status object.
-
-- channelId := the required name of the channel including any qualifier, if any __Type: @string@__
-- region := in events relating to the activity of a channel in a specific region, this optionally identifies the region __Type: @string@__
-- isGlobalMaster := in events relating to the activity of a channel in a specific region, this optionally identifies whether or not that region is responsible for global coordination of the channel __Type: @boolean@__
-- status := an optional "@ChannelStatus@":#channel-status instance __Type: "ChannelStatus":#channel-status__
-
-The following is an example of a @ChannelDetails@ JSON object:
-
-```[json]
- {
- "channelId": "foo",
- "status": {
- "isActive": true,
- "occupancy": {
- "metrics": {
- "connections": 1,
- "publishers": 1,
- "subscribers": 1,
- "presenceConnections": 1,
- "presenceMembers": 0,
- "presenceSubscribers": 1,
- "objectPublishers": 1,
- "objectSubscribers": 1
- }
- }
- }
- }
-```
-
-h3(#channel-status). ChannelDetails.ChannelStatus
-
-@ChannelStatus@ is contained within the "@ChannelDetails@":#channel-details object, and optionally contains an "Occupancy":#occupancy object.
-
-- isActive := a required boolean value indicating whether the channel that is the subject of the event is active. For events indicating regional activity of a channel this indicates activity in that region, not global activity __Type: @boolean@__
-- occupancy := an optional "@Occupancy@":#occupancy instance indicating the occupancy of the channel. For events indicating regional activity of a channel this indicates activity in that region, not global activity. __Type: "Occupancy":#occupancy__
-
-h3(#occupancy). ChannelDetails.ChannelStatus.Occupancy
-
-Occupancy is optionally contained within the "@ChannelStatus@":#channel-status object, and contains metadata relating to the occupants of the channel. This is usually contained within the @occupancy@ attribute of the "@ChannelStatus@":#channel-status object.
-
-The @occupancy@ attribute contains the @metrics@ attribute, which contains the following members:
-
-- connections := the number of connections __Type: @integer@__
-- publishers := the number of connections attached to the channel that are authorised to publish __Type: @integer@__
-- subscribers := the number of connections attached that are authorised to subscribe to messages __Type: @integer@__
-- presenceSubscribers := the number of connections that are authorised to subscribe to presence messages __Type: @integer@__
-- presenceConnections := the number of connections that are authorised to enter members into the presence channel __Type: @integer@__
-- presenceMembers := the number of members currently entered into the presence channel __Type: @integer@__
-- objectPublishers := the number of connections that are authorised to publish updates to objects on the channel __Type: @integer@__
-- objectSubscribers := the number of connections that are authorised to subscribe to objects on the channel __Type: @integer@__
diff --git a/content/partials/types/_channel_event.textile b/content/partials/types/_channel_event.textile
deleted file mode 100644
index 296c0409e2..0000000000
--- a/content/partials/types/_channel_event.textile
+++ /dev/null
@@ -1,132 +0,0 @@
-blang[jsall].
- @ChannelEvent@ is a String that can be emitted as an event on the @Channel@ object; either a "@ChannelState@":/docs/channels/states or an @update@ event.
-
- ```[javascript]
- var ChannelEvents = [
- 'initialized',
- 'attaching',
- 'attached',
- 'detaching',
- 'detached',
- 'failed',
- 'suspended',
- 'update'
- ]
- ```
-
-blang[java].
- @io.ably.lib.realtime.ChannelEvent@ is an enum representing all the events that can be emitted be the @Channel@; either a "@ChannelState@":/docs/channels/states or an @update@ event.
-
- ```[java]
- public enum ChannelEvent {
- initialized, // 0
- attaching, // 1
- attached, // 2
- detaching, // 3
- detached, // 4
- failed // 5
- update // 6
- }
- ```
-
-blang[csharp].
- @IO.Ably.Realtime.ChannelEvent@ is an enum representing all the events that can be emitted be the @Channel@; either a "@ChannelState@":/docs/channels/states or an @Update@ event.
-
- ```[csharp]
- public enum ChannelEvent
- {
- Initialized = 0,
- Attaching = 1,
- Attached = 2,
- Detaching= 3,
- Detached = 4,
- Failed = 5,
- Update = 6
- };
- ```
-
-blang[ruby].
- @Ably::Realtime::Channel::EVENT@ is an enum-like value representing all the events that can be emitted be the @Channel@; either a "@ChannelState@":/docs/channels/states or an @:update@ event. @EVENT@ can be represented interchangeably as either symbols or constants.
-
- h4. Symbol states
-
- ```[ruby]
- :initialized # => 0
- :attaching # => 1
- :attached # => 2
- :detaching # => 3
- :detached # => 4
- :failed # => 5
- :update # => 6
- ```
-
- h4. Constant states
-
- ```[ruby]
- Channel::EVENT.Initialized # => 0
- Channel::EVENT.Attaching # => 1
- Channel::EVENT.Attached # => 2
- Channel::EVENT.Detaching # => 3
- Channel::EVENT.Detached # => 4
- Channel::EVENT.Failed # => 5
- Channel::EVENT.Update # => 6
- ```
-
-blang[objc,swift].
- @ARTChannelEvent@ is the enum emitted as the event in @ARTRealtimeChannel.on@; either a "@ChannelState@":/docs/api/realtime-sdk/channels#channel-state or an @Update@ event.
-
- ```[objc]
- typedef NS_ENUM(NSUInteger, ARTChannelEvent) {
- ARTChannelEventInitialized,
- ARTChannelEventAttaching,
- ARTChannelEventAttached,
- ARTChannelEventDetaching,
- ARTChannelEventDetached,
- ARTChannelEventFailed,
- ARTChannelEventUpdate
- };
- ```
-
- ```[swift]
- enum ARTChannelEvent : UInt {
- case Initialized
- case Attaching
- case Attached
- case Detaching
- case Detached
- case Failed
- case Update
- }
- ```
-
-blang[go].
- @ChannelEvent@ is a String that can be emitted as an event on the @Channel@ object; either a "@ChannelState@":/docs/channels/states or an @update@ event.
-
- ```[go]
- const (
- StateChanInitialized = 256
- StateChanConnecting = 512
- StateChanConnected = 1024
- StateChanDisconnected = 2048
- StateChanSuspended = 4096
- StateChanClosing = 8192
- StateChanClosed = 16384
- StateChanFailed = 32768
- )
- ```
-
-blang[flutter].
- @ably.ChannelEvent@ is an enum representing all the events that can be emitted be the @Channel@; either a "@ChannelState@":/docs/channels/states or an @update@ event.
-
- ```[flutter]
- enum ChannelEvent {
- initialized,
- attaching,
- attached,
- detaching,
- detached,
- suspended,
- failed,
- update
- }
- ```
diff --git a/content/partials/types/_channel_options.textile b/content/partials/types/_channel_options.textile
deleted file mode 100644
index 89b3653d72..0000000000
--- a/content/partials/types/_channel_options.textile
+++ /dev/null
@@ -1,47 +0,0 @@
-Channel options are used for setting "channel parameters":/docs/channels/options and "configuring encryption":/docs/channels/options/encryption.
-
-blang[jsall].
- @ChannelOptions@, a plain JavaScript object, may optionally be specified when instancing a "@Channel@":/docs/channels, and this may be used to specify channel-specific options. The following attributes can be defined on the object:
-
-blang[ruby].
- @ChannelOptions@, a Hash object, may optionally be specified when instancing a "@Channel@":/docs/channels, and this may be used to specify channel-specific options. The following key symbol values can be added to the Hash:
-
-blang[php].
- @ChannelOptions@, an Associative Array, may optionally be specified when instancing a "@Channel@":/docs/channels, and this may be used to specify channel-specific options. The following named keys and values can be added to the Associated Array:
-
-blang[java,swift,objc,go].
- @ART@ @io.ably.lib.types.@ @ChannelOptions@ may optionally be specified when instancing a "@Channel@":/docs/channels, and this may be used to specify channel-specific options.
-
-blang[csharp].
- @IO.Ably.ChannelOptions@ may optionally be specified when instancing a "@Channel@":/docs/channels, and this may be used to specify channel-specific options.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-blang[default].
- - :cipher CipherParams cipher := Requests encryption for this channel when not null, and specifies encryption-related parameters (such as algorithm, chaining mode, key length and key). See "an example":/docs/channels/options/encryption __Type: "@CipherParams@":/docs/api/realtime-sdk/encryption#cipher-params or an options object containing at a minimum a @key@ or a @Param[]@ list containing at a minimum a @key@ or an options hash containing at a minimum a @key@ or an Associative Array containing at a minimum a @key@ __
-
-
-blang[jsall,java,swift,objc,csharp].
- - params Params := Optional "parameters":/docs/channels/options which specify behaviour of the channel. __Type: @Map@ @JSON Object@ __
- - cipher CipherParams := Requests encryption for this channel when not null, and specifies encryption-related parameters (such as algorithm, chaining mode, key length and key). See "an example":/docs/api/realtime-sdk/encryption#getting-started __Type: "@CipherParams@":/docs/api/realtime-sdk/encryption#cipher-params or an options object containing at a minimum a @key@ or a @Param[]@ list containing at a minimum a @key@ or an options hash containing at a minimum a @key@ or an Associative Array containing at a minimum a @key@ __
-
-blang[java].
- h4. Static methods
-
- h6(#with-cipher-key). withCipherKey
-
- bq(definition). static ChannelOptions.withCipherKey(Byte[] or String key)
-
- A helper method to generate a @ChannelOptions@ for the simple case where you only specify a key.
-
- h4. Parameters
-
- - key := A binary @Byte[]@ array or a base64-encoded @String@.
-
- h4. Returns
-
- On success, the method returns a complete @ChannelOptions@ object. Failure will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception.
-
diff --git a/content/partials/types/_channel_state.textile b/content/partials/types/_channel_state.textile
deleted file mode 100644
index 9840d06c92..0000000000
--- a/content/partials/types/_channel_state.textile
+++ /dev/null
@@ -1,137 +0,0 @@
-blang[jsall].
- @ChannelState@ is a String with a value matching any of the "@Realtime Channel@ states":/docs/channels/states.
-
- ```[javascript]
- var ChannelStates = [
- 'initialized',
- 'attaching',
- 'attached',
- 'detaching',
- 'detached',
- 'failed',
- 'suspended'
- ]
- ```
-
-blang[java].
- @io.ably.lib.realtime.ChannelState@ is an enum representing all the "@Realtime Channel@ states":/docs/channels/states.
-
- ```[java]
- public enum ChannelState {
- initialized, // 0
- attaching, // 1
- attached, // 2
- detaching, // 3
- detached, // 4
- failed // 5
- }
- ```
-
-blang[csharp].
- @IO.Ably.Realtime.ChannelState@ is an enum representing all the "@Realtime Channel@ states":/docs/channels/states.
-
- ```[csharp]
- public enum ChannelState
- {
- Initialized = 0,
- Attaching = 1,
- Attached = 2,
- Detaching= 3,
- Detached = 4,
- Failed = 5
- };
- ```
-
-blang[ruby].
- @Ably::Realtime::Channel::STATE@ is an enum-like value representing all the "@Realtime Channel@ states":/docs/channels/states. @STATE@ can be represented interchangeably as either symbols or constants.
-
- h4. Symbol states
-
- ```[ruby]
- :initialized # => 0
- :attaching # => 1
- :attached # => 2
- :detaching # => 3
- :detached # => 4
- :failed # => 5
- ```
-
- h4. Constant states
-
- ```[ruby]
- Channel::STATE.Initialized # => 0
- Channel::STATE.Attaching # => 1
- Channel::STATE.Attached # => 2
- Channel::STATE.Detaching # => 3
- Channel::STATE.Detached # => 4
- Channel::STATE.Failed # => 5
- ```
-
- h4. Example usage
-
- ```[ruby]
- # Example with symbols
- channel.on(:attached) { ... }
-
- # Example with constants
- channel.on(Ably::Realtime::Channel::STATE.Attached) { ... }
-
- # Interchangeable
- Ably::Realtime::Channel::STATE.Attached == :attached # => true
- ```
-
-blang[objc,swift].
- @ARTRealtimeChannelState@ is an enum representing all the "@Realtime Channel@ states":/docs/channels/states.
-
- ```[objc]
- typedef NS_ENUM(NSUInteger, ARTRealtimeChannelState) {
- ARTRealtimeChannelInitialized,
- ARTRealtimeChannelAttaching,
- ARTRealtimeChannelAttached,
- ARTRealtimeChannelDetaching,
- ARTRealtimeChannelDetached,
- ARTRealtimeChannelFailed
- };
- ```
-
- ```[swift]
- public enum ARTRealtimeChannelState : UInt {
- case Initialized
- case Attaching
- case Attached
- case Detaching
- case Detached
- case Failed
- }
- ```
-
-blang[go].
- @ChannelState@ is a string representing all the "channel states":/docs/channels/states
-
- ```[go]
- const (
- StateChanInitialized = 256
- StateChanConnecting = 512
- StateChanConnected = 1024
- StateChanDisconnected = 2048
- StateChanSuspended = 4096
- StateChanClosing = 8192
- StateChanClosed = 16384
- StateChanFailed = 32768
- )
- ```
-
-blang[flutter].
- @ably.ChannelState@ is an enum representing all the "@Realtime Channel@ states":/docs/channels/states.
-
- ```[flutter]
- enum ChannelState {
- initialized,
- attaching,
- attached,
- detaching,
- detached,
- suspended,
- failed
- }
- ```
diff --git a/content/partials/types/_channel_state_change.textile b/content/partials/types/_channel_state_change.textile
deleted file mode 100644
index 53eb50f901..0000000000
--- a/content/partials/types/_channel_state_change.textile
+++ /dev/null
@@ -1,9 +0,0 @@
-A @Ably::Models::ChannelStateChange@ ChannelStateChange ARTRealtimeChannelStateChange is a type encapsulating state change information emitted by the "@Channel@":/docs/channels object. See "@Channel#on@":/docs/api/realtime-sdk/channels#on to register a listener for one or more events.
-
-h4. Attributes
-
-- current Current := the new current state __Type: "@ChannelState@ Channel::STATE@ ":/docs/api/realtime-sdk/types#channel-state__
-- previous Previous := the previous state. (for the @update@ event, this will be equal to the @current@ state) __Type: "@ChannelState@ Channel::STATE@ ":/docs/api/realtime-sdk/types#channel-state__
-- event Event := the event that triggered this state change __Type: "@ChannelEvent@ Channel::EVENT@ ":/docs/api/realtime-sdk/types#channel-event__
-- reason Reason := an "@ErrorInfo@":#error-info containing any information relating to the transition __Type: "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info__
-- resumed Resumed := a boolean indicated whether message continuity on this channel is preserved, see "Nonfatal channel errors":/docs/channels#non-fatal-errors for more info. __Type: Boolean__
diff --git a/content/partials/types/_channel_state_listener.textile b/content/partials/types/_channel_state_listener.textile
deleted file mode 100644
index 751ca88b45..0000000000
--- a/content/partials/types/_channel_state_listener.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @io.ably.lib.realtime.ChannelStateListener@ is an interface allowing a client to be notified of "channel state changes":/docs/api/realtime-sdk/types#channel-state-change for a "@Channel@":/docs/channels
-
-```[java]
- public interface ChannelStateListener {
- // Called when the channel state changes
- public void onChannelStateChanged(ChannelStateChange stateChange, ErrorInfo reason);
- }
-```
diff --git a/content/partials/types/_cipher_params.textile b/content/partials/types/_cipher_params.textile
deleted file mode 100644
index b27c210ec6..0000000000
--- a/content/partials/types/_cipher_params.textile
+++ /dev/null
@@ -1,16 +0,0 @@
-A @CipherParams@ contains configuration options for a channel cipher, including algorithm, mode, key length and key. Ably client libraries currently support AES with CBC, PKCS#7 with a default key length of 256 bits. All implementations also support AES128.
-
-Individual client libraries may support either instancing a @CipherParams@ directly, using "@Crypto.getDefaultParams()@":/docs/api/realtime-sdk/encryption#get-default-params "@Crypto.GetDefaultParams()@":/docs/api/realtime-sdk/encryption#get-default-params "@Crypto.get_default_params()@":/docs/api/realtime-sdk/encryption#get-default-params , or generating one automatically when initializing a channel, as in "this example":/docs/channels/options/encryption.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-- key Key :key
:= A binary (@byte[]@ @ArrayBuffer@ or @Uint8Array@ @Buffer@ byte array @NSData@ ) or base64-encoded @NS@ @String@ containing the secret key used for encryption and decryption
-
-- algorithm :algorithm Algorithm := _AES_ The name of the algorithm in the default system provider, or the lower-cased version of it; eg "aes" or "AES" __Type: @String@__
-- key_length :key_length keyLength KeyLength := _256_ The key length in bits of the cipher, either 128 or 256 __Type: @Integer@__
-- mode :mode Mode := _CBC_ The cipher mode __Type: @String@ @CipherMode@ __
-
-- keySpec
:= A @KeySpec@ for the cipher key __Type: @SecretKeySpec@__
diff --git a/content/partials/types/_client_options.textile b/content/partials/types/_client_options.textile
deleted file mode 100644
index d3f0e15ee7..0000000000
--- a/content/partials/types/_client_options.textile
+++ /dev/null
@@ -1,68 +0,0 @@
-h4.
- default: Properties
- java: Members
- ruby: Attributes
- python: Keyword arguments
-
-- key Key :key := The full key string, as obtained from the "application dashboard":https://ably.com/dashboard. Use this option if you wish to use Basic authentication, or wish to be able to issue Ably Tokens without needing to defer to a separate entity to sign Ably TokenRequests. Read more about "Basic authentication":/docs/auth/basic __Type: @String@__
-
-- token Token :token := An authenticated token. This can either be a "@TokenDetails@":/docs/api/realtime-sdk/types#token-details object, a "@TokenRequest@":/docs/api/realtime-sdk/types#token-request object, or token string (obtained from the @token@ @Token@ property of a "@TokenDetails@":/docs/api/realtime-sdk/types#token-details component of an Ably TokenRequest response, or a "JSON Web Token":https://tools.ietf.org/html/rfc7519 satisfying "the Ably requirements for JWTs":/docs/auth/token#jwt). This option is mostly useful for testing: since tokens are short-lived, in production you almost always want to use an authentication method that allows the client library to renew the token automatically when the previous one expires, such as @authUrl@ @AuthUrl@ :auth_url auth_url or @authCallback@ @AuthCallback@ @auth_callback@ @:auth_callback@ . Read more about "Token authentication":/docs/auth/token __Type: @String@, @TokenDetails@ or @TokenRequest@__
-
-<%= partial partial_version('shared/_token_auth_methods') %>
-
-- tls Tls :tls := _true_ A boolean value, indicating whether or not a TLS ("SSL") secure connection should be used. An insecure connection cannot be used with Basic authentication as it would lead to a possible compromise of the private API key while in transit. The JavaScript library uses the TLS version supported by the browser environment. In Node.js, the TLS version is determined by the Node.js runtime version. "Find out more about TLS":/docs/channels/options/encryption#tls __Type: @Boolean@__
-
-- clientId ClientId client_id :client_id := A client ID, used for identifying this client when publishing messages or for presence purposes. The @clientId@ @client_id@ @ClientId@ can be any non-empty string. This option is primarily intended to be used in situations where the library is instantiated with a key; note that a @clientId@ @client_id@ @ClientId@ may also be implicit in a token used to instantiate the library; an error will be raised if a @clientId@ @client_id@ specified here conflicts with the @clientId@ @client_id@ @ClientId@ implicit in the token. "Find out more about client identities":/docs/auth/identified-clients __Type: @String@__
-
-- useTokenAuth UseTokenAuth use_token_auth :use_token_auth := _false_ When true, forces "Token authentication":/docs/auth/token to be used by the library. Please note that if a @client_id@ @clientId@ is not specified in the "@ClientOptions@":/docs/api/realtime-sdk/types#client-options or "@TokenParams@":/docs/api/realtime-sdk/types#token-params, then the Ably Token issued will be "anonymous":https://faqs.ably.com/authenticated-and-identified-clients. __Type: @Boolean@__
-
-- endpoint Endpoint :endpoint := _null Null None nil _ Enables "enterprise customers":https://ably.com/pricing to use their own custom endpoints, which support dedicated, isolated clusters and regional message routing and storage constraints. See our "platform customization guide":/docs/platform/account/enterprise-customization for more details. __Type: @String@__
-
-- environment Environment :environment := _null Null None nil _ Deprecated, use @endpoint@. Enables "enterprise customers":https://ably.com/pricing to use their own custom environments, which support dedicated, isolated clusters and regional message routing and storage constraints. See our "platform customization guide":/docs/platform/account/enterprise-customization for more details. __Type: @String@__
-
-- idempotentRestPublishing IdempotentRestPublishing :idempotent_rest_publishing := _false_ When true, enables idempotent publishing by assigning a unique message ID client-side, allowing the Ably servers to discard automatic publish retries following a failure such as a network fault. We recommend you enable this by default. In version 1.2 onwards, idempotent publishing for retries will be enabled by default. __Type: @Boolean@__
-
-- fallbackHosts FallbackHosts fallback_hosts :fallback_hosts := _@[a.ably-realtime.com, b.ably-realtime.com, c.ably-realtime.com, d.ably-realtime.com, e.ably-realtime.com]@_ An array of fallback hosts to be used in the case of an error necessitating the use of an alternative host. When a custom environment is specified, the "fallback host functionality":https://faqs.ably.com/routing-around-network-and-dns-issues is disabled. If your customer success manager has provided you with a set of custom fallback hosts, please specify them here. __Type: @String []@__
-
-- transportParams TransportParams transport_params :transport_params := Optional. Can be used to pass in arbitrary connection parameters, such as "@heartbeatInterval@":/docs/connect#heartbeats and "@remainPresentFor@":/docs/presence-occupancy/presence#unstable-connections __Type: @Object@ @Dict@ @Hash@ @Associative Array@ @Param []@ @Dictionary@ @Map@ __
-
-blang[jsall].
- - logLevel := A number controlling the verbosity of the log output of the library. Valid values are: 0 (no logs), 1 (errors only), 2 (errors plus connection and channel state changes), 3 (high-level debug output), and 4 (full debug output). __Type: @Integer@__
-
- - logHandler := A function to handle each line of the library's log output. If @logHandler@ is not specified, @console.log@ is used. __Type: @Callable@__
-
- - transports := An optional array of transports to use, in descending order of preference. In the browser environment the available transports are: @web_socket@, @xhr_polling@. The transports available in the Node.js client library are: @web_socket@, @xhr_polling@, @comet@. __Type: @String []@__
-
-blang[java].
- - logLevel := _5_ A number controlling the verbosity of the output from 2 (maximum, verbose) to 6 (errors only). A special value of 99 will silence all logging. Note that the @logLevel@ is a static variable in the library and will thus not act independently between library instances when multiple library instances exist concurrently. See "the logging section of the java library README":https://github.com/ably/ably-java/#logging for more details. __Type: @Integer@__
-
- - logHandler := _@System.out PrintStream@_ A @LogHandler@ interface can be specified to handle each line of log output. If @logHandler@ is not specified, @System.out@ is used. Note that the @logHandler@ is a static variable in the library and will thus not act independently between library instances when multiple library instances exist concurrently. See "the logging section of the java library README":https://github.com/ably/ably-java/#logging for more details. __Type: PrintStream__
-
-blang[csharp].
- To set the log level and custom logger sink when using the .NET library, configure the static @IO.Ably.Logger@ class or specify the @ClientOptions@:
-
- - LogLevel := _@Error@_ This is an enum controlling the verbosity of the output from @Debug@ (maximum) to @Error@ (errors only). A special value of @None@ will silence all logging. Note that the @LogLevel@ is a static variable in the library and will thus not act independently between library instances. __Type: @Enum@__
-
- - LoggerSink := _@IO.Ably.DefaultLoggerSink@_ The default ILoggerSink outputs messages to the debug console. This property allows the user to pipe the log messages to their own logging infrastructure.
-
-blang[go].
- - LogLevel := _@LogError@_ This is an enum controlling the verbosity of the output from @LogDebug@ (maximum) to @LogError@ (errors only). A special value of @LogNone@ will silence all logging. Note that the @LogLevel@ is a static variable in the library and will thus not act independently between library instances. __Type: @Enum@__
-
-blang[objc,swift].
- - logLevel := _ARTLogLevelWarn_ An enum controlling the verbosity of the output from @ARTLogLevelVerbose@ to @ARTLogLevelNone@. A special value of 99 will silence all logging. __Type: @ARTLogLevel@__
-
- - logHandler := A @ARTLog@ object can be specified to handle each line of log output. If @logHandler@ is not specified, a default @ARTLog@ instance is used. __Type: @ARTLog *@__
-
-blang[ruby].
- - :log_level :=_@:error@_ Log level for the standard Logger that outputs to @STDOUT@. Can be set to @:fatal@, @:error@, @:warn@, @:info@, @:debug@ or @:none@. Alternatively a "@Logger@ severity constant":http://ruby-doc.org/stdlib-2.2.0/libdoc/logger/rdoc/Logger.html#class-Logger-label-Description can be specified. __Type: @Symbol@, "@Logger::SEVERITY@":http://ruby-doc.org/stdlib-2.2.0/libdoc/logger/rdoc/Logger.html#class-Logger-label-Description__
-
- - :logger := _@STDOUT Logger@_ A "Ruby @Logger@":http://ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html compatible object to handle each line of log output. If @logger@ is not specified, @STDOUT@ is used. __Type: "Ruby @Logger":http://ruby-doc.org/stdlib-1.9.3/libdoc/logger/rdoc/Logger.html__
-
-blang[php].
- - logLevel :=_@Log::WARNING@_ A number controlling the verbosity of the output from 1 (minimum, errors only) to 4 (most verbose); __Type: @Integer@__
-
- - logHandler := _@console.log@_ A function to handle each line of log output. If handler is not specified, @console.log@ is used. Note that the log level and log handler have global scope in the library and will therefore not act independently between library instances when multiple library instances exist concurrently. __Type: @Function@__
-
-- useBinaryProtocol UseBinaryProtocol use_binary_protocol :use_binary_protocol := _false_ If set to true, will enable the binary protocol (MessagePack) if it is supported. It's disabled by default on browsers for performance considerations (browsers are optimized for decoding JSON) _true_ If set to false, will forcibly disable the binary protocol (MessagePack). The binary protocol is used by default unless it is not supported Note: The binary protocol is currently not supported in Swift in Objective-C in PHP . Find out more about the "benefits of binary encoding":https://faqs.ably.com/do-you-binary-encode-your-messages-for-greater-efficiency __Type: @Boolean@__
-
-- logExceptionReportingUrl
:= Defaults to a string value for an Ably error reporting Data Source Name. __Type: @String@__
diff --git a/content/partials/types/_completion_listener.textile b/content/partials/types/_completion_listener.textile
deleted file mode 100644
index 5a49a6ef42..0000000000
--- a/content/partials/types/_completion_listener.textile
+++ /dev/null
@@ -1,11 +0,0 @@
-A @io.ably.lib.realtime.CompletionListener@ is an interface allowing a client to be notified of the outcome of an asynchronous operation.
-
-```[java]
- public interface CompletionListener {
- // Called when the associated operation completes successfully,
- public void onSuccess();
-
- // Called when the associated operation completes with an error.
- public void onError(ErrorInfo reason);
- }
-```
diff --git a/content/partials/types/_connection_event.textile b/content/partials/types/_connection_event.textile
deleted file mode 100644
index 3b60d41dad..0000000000
--- a/content/partials/types/_connection_event.textile
+++ /dev/null
@@ -1,160 +0,0 @@
-blang[jsall].
- @ConnectionEvent@ is a String that can be emitted as an event on the @Connection@ object; either a "@Realtime Connection@ state":/docs/connect/states or an @update@ event.
-
-
- ```[javascript]
- var ConnectionEvents = [
- 'initialized',
- 'connecting',
- 'connected',
- 'disconnected',
- 'suspended',
- 'closing',
- 'closed',
- 'failed',
- 'update'
- ]
- ```
-
-blang[java].
- @io.ably.lib.realtime.ConnectionEvent@ is an enum representing all the events that can be emitted be the @Connection@; either a "@Realtime Connection@ state":/docs/connect/states or an @update@ event.
-
- ```[java]
- public enum ConnectionEvent {
- initialized, // 0
- connecting, // 1
- connected, // 2
- disconnected, // 3
- suspended, // 4
- closing, // 5
- closed, // 6
- failed, // 7
- update // 8
- }
- ```
-
-blang[csharp].
- @IO.Ably.Realtime.ConnectionEvent@ is an enum representing all the events that can be emitted be the @Connection@; either a "@Realtime Connection@ state":/docs/connect/states or an @Update@ event.
-
- ```[csharp]
- public enum ConnectionState
- {
- Initialized, //0
- Connecting, //1
- Connected, //2
- Disconnected, //3
- Suspended, //4
- Closing, //5
- Closed, //6
- Failed, //7
- update //8
- };
- ```
-
-blang[ruby].
- @Ably::Realtime::Connection::EVENT@ is an enum-like value representing all the events that can be emitted be the @Connection@; either a "@Realtime Connection@ state":/docs/connect/states or an @:update@ event. @EVENT@ can be represented interchangeably as either symbols or constants.
-
- h4. Symbol states
-
- ```[ruby]
- :initialized # => 0
- :connecting # => 1
- :connected # => 2
- :disconnected # => 3
- :suspended # => 4
- :closing # => 5
- :closed # => 6
- :failed # => 7
- :update # => 8
- ```
-
- h4. Constant states
-
- ```[ruby]
- Connection::EVENT.Initialized # => 0
- Connection::EVENT.Connecting # => 1
- Connection::EVENT.Connected # => 2
- Connection::EVENT.Disconnected # => 3
- Connection::EVENT.Suspended # => 4
- Connection::EVENT.Closing # => 5
- Connection::EVENT.Closed # => 6
- Connection::EVENT.Failed # => 7
- Connection::EVENT.Update # => 8
- ```
-
- h4. Example usage
-
- ```[ruby]
- # Example with symbols
- client.connection.on(:connected) { ... }
-
- # Example with constants
- client.connection.on(Ably::Realtime::Connection::STATE.Connected) { ... }
-
- # Interchangeable
- Ably::Realtime::Connection::STATE.Connected == :connected # => true
- ```
-
-blang[objc,swift].
- @ARTRealtimeConnectionEvent@ is an enum representing all the events that can be emitted be the @Connection@; either a "@Realtime Connection@ state":/docs/connect/states or an @Update@ event.
-
- ```[objc]
- typedef NS_ENUM(NSUInteger, ARTRealtimeConnectionEvent) {
- ARTRealtimeConnectionEventInitialized,
- ARTRealtimeConnectionEventConnecting,
- ARTRealtimeConnectionEventConnected,
- ARTRealtimeConnectionEventDisconnected,
- ARTRealtimeConnectionEventSuspended,
- ARTRealtimeConnectionEventClosing,
- ARTRealtimeConnectionEventClosed,
- ARTRealtimeConnectionEventFailed,
- ARTRealtimeConnectionEventUpdate
- };
- ```
-
- ```[swift]
- public enum ARTRealtimeConnectionEvent : UInt {
- case Initialized
- case Connecting
- case Connected
- case Disconnected
- case Suspended
- case Closing
- case Closed
- case Failed
- case Update
- }
- ```
-
-blang[go].
- @ConnectionEvent@ is a String that can be emitted as an event on the @Connection@ object; either a "@Realtime Connection@ state":/docs/connect/states or an @update@ event.
-
- ```[go]
- const (
- StateConnInitialized = 1
- StateConnConnecting = 2
- StateConnConnected = 4
- StateConnDisconnected = 8
- StateConnSuspended = 16
- StateConnClosing = 32
- StateConnClosed = 64
- StateConnFailed = 128
- )
- ```
-
-blang[flutter].
- @ably.ConnectionEvent@ is an enum representing all the events that can be emitted be the @Connection@; either a "@Realtime Connection@ state":/docs/connect/states or an @update@ event.
-
- ```[flutter]
- enum ConnectionEvent {
- initialized,
- connecting,
- connected,
- disconnected,
- suspended,
- closing,
- closed,
- failed,
- update
- }
- ```
diff --git a/content/partials/types/_connection_state.textile b/content/partials/types/_connection_state.textile
deleted file mode 100644
index 94c127412f..0000000000
--- a/content/partials/types/_connection_state.textile
+++ /dev/null
@@ -1,151 +0,0 @@
-blang[jsall].
- @ConnectionState@ is a String with a value matching any of the "@Realtime Connection@ states":/docs/connect/states.
-
- ```[javascript]
- var ConnectionStates = [
- 'initialized',
- 'connecting',
- 'connected',
- 'disconnected',
- 'suspended',
- 'closing',
- 'closed',
- 'failed'
- ]
- ```
-
-blang[java].
- @io.ably.lib.realtime.ConnectionState@ is an enum representing all the "@Realtime Connection@ states":/docs/connect/states.
-
- ```[java]
- public enum ConnectionState {
- initialized, // 0
- connecting, // 1
- connected, // 2
- disconnected, // 3
- suspended, // 4
- closing, // 5
- closed, // 6
- failed // 7
- }
- ```
-
-blang[csharp].
- @IO.Ably.Realtime.ConnectionState@ is an enum representing all the "@Realtime Connection@ states":/docs/connect/states.
-
- ```[csharp]
- public enum ConnectionState
- {
- Initialized, //0
- Connecting, //1
- Connected, //2
- Disconnected, //3
- Suspended, //4
- Closing, //5
- Closed, //6
- Failed //7
- };
- ```
-
-blang[ruby].
- @Ably::Realtime::Connection::STATE@ is an enum-like value representing all the "@Realtime Connection@ states":/docs/connect/states. @STATE@ can be represented interchangeably as either symbols or constants.
-
- h4. Symbol states
-
- ```[ruby]
- :initialized # => 0
- :connecting # => 1
- :connected # => 2
- :disconnected # => 3
- :suspended # => 4
- :closing # => 5
- :closed # => 6
- :failed # => 7
- ```
-
- h4. Constant states
-
- ```[ruby]
- Connection::STATE.Initialized # => 0
- Connection::STATE.Connecting # => 1
- Connection::STATE.Connected # => 2
- Connection::STATE.Disconnected # => 3
- Connection::STATE.Suspended # => 4
- Connection::STATE.Closing # => 5
- Connection::STATE.Closed # => 6
- Connection::STATE.Failed # => 7
- ```
-
- h4. Example usage
-
- ```[ruby]
- # Example with symbols
- client.connection.on(:connected) { ... }
-
- # Example with constants
- client.connection.on(Ably::Realtime::Connection::STATE.Connected) { ... }
-
- # Interchangeable
- Ably::Realtime::Connection::STATE.Connected == :connected # => true
- ```
-
-blang[objc,swift].
- @ARTRealtimeConnectionState@ is an enum representing all the "@Realtime Connection@ states":/docs/connect/states.
-
- ```[objc]
- typedef NS_ENUM(NSUInteger, ARTRealtimeConnectionState) {
- ARTRealtimeInitialized,
- ARTRealtimeConnecting,
- ARTRealtimeConnected,
- ARTRealtimeDisconnected,
- ARTRealtimeSuspended,
- ARTRealtimeClosing,
- ARTRealtimeClosed,
- ARTRealtimeFailed
- };
- ```
-
- ```[swift]
- public enum ARTRealtimeConnectionState : UInt {
- case Initialized
- case Connecting
- case Connected
- case Disconnected
- case Suspended
- case Closing
- case Closed
- case Failed
- }
- ```
-
-blang[go].
- @ConnectionState@ is an enum representing all the "@Realtime Connection@ states":/docs/connect/states.
-
- ```[go]
- const (
- StateConnInitialized = 1
- StateConnConnecting = 2
- StateConnConnected = 4
- StateConnDisconnected = 8
- StateConnSuspended = 16
- StateConnClosing = 32
- StateConnClosed = 64
- StateConnFailed = 128
- )
- ```
-
-blang[flutter].
- @ably.ConnectionState@ is an enum representing all the "@Realtime Connection@ states":/docs/connect/states.
-
- ```[flutter]
- enum ConnectionState {
- initialized,
- connecting,
- connected,
- disconnected,
- suspended,
- closing,
- closed,
- failed
- }
- ```
diff --git a/content/partials/types/_connection_state_change.textile b/content/partials/types/_connection_state_change.textile
deleted file mode 100644
index 4beabdb2a0..0000000000
--- a/content/partials/types/_connection_state_change.textile
+++ /dev/null
@@ -1,12 +0,0 @@
-A @io.ably.lib.realtime.ConnectionStateListener.ConnectionStateChange@ @Ably::Models::ConnectionStateChange@ @ARTConnectionStateChange@ @IO.Ably.Realtime.ConnectionStateChange@ @ConnectionStateChange@ is a type encapsulating state change information emitted by the "@Connection@":/docs/api/realtime-sdk/connection object. See "@Connection#on@":/docs/api/realtime-sdk/connection#on to register a listener for one or more events.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-- current Current := the new state __Type: "State @String@":/docs/api/realtime-sdk/types#connection-state "@Connection::STATE@":/docs/api/realtime-sdk/types#connection-state "@ConnectionState@":/docs/api/realtime-sdk/types#connection-state __
-- previous Previous := the previous state. (for the @update@ event, this will be equal to the @current@ state) __Type: "State @String@":/docs/api/realtime-sdk/types#connection-state "@Connection::STATE@":/docs/api/realtime-sdk/types#connection-state "@ConnectionState@":/docs/api/realtime-sdk/types#connection-state __
-- event Event := the event that triggered this state change __Type: "@ConnectionEvent@ Connection::EVENT@ ":/docs/api/realtime-sdk/types#connection-event__
-- reason Reason := an "@ErrorInfo@":#error-info containing any information relating to the transition __Type: "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info__
-- retryIn retry_in RetryIn := Duration upon which the library will retry a connection where applicable, as milliseconds seconds a @Timespan@ __Type: @Integer@ @Timespan@ @Long Integer@ __
diff --git a/content/partials/types/_connection_state_listener.textile b/content/partials/types/_connection_state_listener.textile
deleted file mode 100644
index df480e26e3..0000000000
--- a/content/partials/types/_connection_state_listener.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @io.ably.lib.realtime.ConnectionStateListener@ is an interface allowing a client to be notified of connection state change. See "@Connection#on@":/docs/api/realtime-sdk/connection#on to register a listener for one or more events.
-
-```[java]
- public interface ConnectionStateListener {
- // Called when the connection state changes
- public void onConnectionStateChanged(ConnectionStateListener.ConnectionStateChange state);
- }
-```
diff --git a/content/partials/types/_deferrable.textile b/content/partials/types/_deferrable.textile
deleted file mode 100644
index 5c7fcf15bf..0000000000
--- a/content/partials/types/_deferrable.textile
+++ /dev/null
@@ -1,30 +0,0 @@
-The @SafeDeferrable@ class provides an "EventMachine":https://github.com/eventmachine/eventmachine compatible "@Deferrable@":https://www.rubydoc.info/gems/eventmachine/EventMachine/Deferrable.
-
-A @SafeDeferrable@ ensures that any exceptions in callbacks provided by developers will not break the client library and stop further execution of code.
-
-h4. Methods
-
-h6(#callback). callback
-
-bq(definition). callback(&block)
-
-Specify a block to be executed if and when the @Deferrable@ object receives a status of @:succeeded@. See the "EventMachine callback documentation":https://www.rubydoc.info/gems/eventmachine/EventMachine/Deferrable#callback-instance_method
-
-h6(#errback). errback
-
-bq(definition). errback(&block)
-
-Specify a block to be executed if and when the @Deferrable@ object receives a status of @:failed@. See the "EventMachine errback documentation":https://www.rubydoc.info/gems/eventmachine/EventMachine/Deferrable#errback-instance_method
-
-h6(#fail). fail
-
-bq(definition). fail(*args)
-
-Mark the @Deferrable@ as failed and trigger all callbacks. See the "EventMachine fail documentation":https://www.rubydoc.info/gems/eventmachine/EventMachine/Deferrable#fail-instance_method
-
-h6(#succeed). succeed
-
-bq(definition). succeed(*args)
-
-Mark the @Deferrable@ as succeeded and trigger all callbacks. See the "EventMachine succeed documentation":https://www.rubydoc.info/gems/eventmachine/EventMachine/Deferrable#succeed-instance_method
-
diff --git a/content/partials/types/_device_details.textile b/content/partials/types/_device_details.textile
deleted file mode 100644
index 203ca82761..0000000000
--- a/content/partials/types/_device_details.textile
+++ /dev/null
@@ -1,24 +0,0 @@
-A @DeviceDetails@ is a type encapsulating attributes of a device registered for push notifications.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-- id := unique identifier for the device generated by the device itself __Type: @String@__
-
-- clientId client_id := optional trusted "client identifier":/docs/auth/identified-clients for the device __Type: @String@__
-
-- formFactor form_factor := form factor of the push device. Must be one of @phone@, @tablet@, @desktop@, @tv@, @watch@, @car@ or @embedded@ @embedded@ or @other@ __Type: @String@__
-
-- metadata := optional metadata object for this device. The metadata for a device may only be set by clients with @push-admin@ privileges __Type: @Object@ @Array@ @Hash@ __
-
-- platform := platform of the push device. Must be one of @ios@ or @android@ @android@ or @browser@ __Type: @String@__
-
-- deviceSecret := Secret value for the device. __Type: @String@__
-
-- push.recipient := push recipient details for this device. See the "REST API push publish documentation":/docs/api/rest-api#message-extras-push for more details __Type: @Object@ @Array@ @Hash@ __
-
-- push.state := the current state of the push device being either @Active@, @Failing@ or @Failed@ @ACTIVE@, @FAILING@ or @FAILED@ __Type: @String@__
-
-- push.errorReason push.error push.error_reason := when the device's state is failing or failed, this attribute contains the reason for the most recent failure __Type: "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info__
diff --git a/content/partials/types/_error_info.textile b/content/partials/types/_error_info.textile
deleted file mode 100644
index a59cf94ea0..0000000000
--- a/content/partials/types/_error_info.textile
+++ /dev/null
@@ -1,198 +0,0 @@
-An @ErrorInfo@ is a type encapsulating error information containing an Ably-specific error code and generic status code.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-- code Code := Ably error code (see "ably-common/protocol/errors.json":https://github.com/ably/ably-common/blob/main/protocol/errors.json) __Type: @Integer@__
-
-- statusCode status_code StatusCode := HTTP Status Code corresponding to this error, where applicable __Type: @Integer@__
-
-- message Message := Additional message information, where available __Type: @String@__
-
-- cause Cause := Information pertaining to what caused the error where available __Type: @ErrorInfo@__
-
-- href Href := Ably may additionally include a URL to get more help on this error __Type: @String@__
-
-blang[flutter].
- - requestId := Request ID with which the error can be identified __Type: @String@__
-
-h4. Error nesting
-
-ErrorInfo objects can contain nested errors through the @cause@ property, allowing you to trace the root cause of failures. When an operation fails due to underlying system errors, the main @ErrorInfo@ provides the high-level failure reason while the nested @cause@ contains more specific details about what went wrong.
-
-One example of ErrorInfo nesting is "80019: Auth server rejecting request":/docs/platform/errors/codes#80019 where the main error indicates token renewal failed, while the nested @cause@ contains the specific HTTP error from the auth server.
-
-blang[javascript,nodejs,ruby,java,swift,objc,csharp,flutter,python,go].
- The following example demonstrates how to handle nested errors:
-
-blang[javascript].
- ```[javascript]
- function handleError(error) {
- console.log(`Main error: ${error.code} - ${error.message}`);
-
- // Check for nested error
- if (error.cause) {
- console.log(`Root cause: ${error.cause.code} - ${error.cause.message}`);
-
- // Handle further nesting if needed
- if (error.cause.cause) {
- console.log(`Deeper cause: ${error.cause.cause.code} - ${error.cause.cause.message}`);
- }
- }
- }
- ```
-
-blang[nodejs].
- ```[javascript]
- function handleError(error) {
- console.log(`Main error: ${error.code} - ${error.message}`);
-
- // Check for nested error
- if (error.cause) {
- console.log(`Root cause: ${error.cause.code} - ${error.cause.message}`);
-
- // Handle further nesting if needed
- if (error.cause.cause) {
- console.log(`Deeper cause: ${error.cause.cause.code} - ${error.cause.cause.message}`);
- }
- }
- }
- ```
-
-blang[swift].
- ```[swift]
- func handleError(_ error: ARTErrorInfo) {
- print("Main error: \(error.code) - \(error.message)")
-
- if let cause = error.cause {
- print("Root cause: \(cause.code) - \(cause.message)")
-
- if let deeperCause = cause.cause {
- print("Deeper cause: \(deeperCause.code) - \(deeperCause.message)")
- }
- }
- }
- ```
-
-blang[objc].
- ```[objc]
- - (void)handleError:(ARTErrorInfo *)error {
- NSLog(@"Main error: %ld - %@", (long)error.code, error.message);
-
- if (error.cause) {
- NSLog(@"Root cause: %ld - %@", (long)error.cause.code, error.cause.message);
-
- if (error.cause.cause) {
- NSLog(@"Deeper cause: %ld - %@", (long)error.cause.cause.code, error.cause.cause.message);
- }
- }
- }
- ```
-
-blang[flutter].
- ```[flutter]
- void handleError(ably.ErrorInfo error) {
- print('Main error: ${error.code} - ${error.message}');
-
- if (error.cause != null) {
- print('Root cause: ${error.cause!.code} - ${error.cause!.message}');
-
- if (error.cause!.cause != null) {
- print('Deeper cause: ${error.cause!.cause!.code} - ${error.cause!.cause!.message}');
- }
- }
- }
- ```
-
-blang[java].
- ```[java]
- public void handleError(ErrorInfo error) {
- System.out.println("Main error: " + error.code + " - " + error.message);
-
- if (error.cause != null) {
- System.out.println("Root cause: " + error.cause.code + " - " + error.cause.message);
-
- if (error.cause.cause != null) {
- System.out.println("Deeper cause: " + error.cause.cause.code + " - " + error.cause.cause.message);
- }
- }
- }
- ```
-
-blang[csharp].
- ```[csharp]
- void HandleError(ErrorInfo error)
- {
- Console.WriteLine($"Main error: {error.Code} - {error.Message}");
-
- if (error.Cause != null)
- {
- Console.WriteLine($"Root cause: {error.Cause.Code} - {error.Cause.Message}");
-
- if (error.Cause.Cause != null)
- {
- Console.WriteLine($"Deeper cause: {error.Cause.Cause.Code} - {error.Cause.Cause.Message}");
- }
- }
- }
- ```
-
-blang[ruby].
- ```[ruby]
- def handle_error(error)
- puts "Main error: #{error.code} - #{error.message}"
-
- if error.cause
- puts "Root cause: #{error.cause.code} - #{error.cause.message}"
-
- if error.cause.cause
- puts "Deeper cause: #{error.cause.cause.code} - #{error.cause.cause.message}"
- end
- end
- end
- ```
-
-
-blang[python].
- ```[python]
- def handle_error(error):
- print(f"Main error: {error.code} - {error.message}")
-
- if error.cause:
- print(f"Root cause: {error.cause.code} - {error.cause.message}")
-
- if error.cause.cause:
- print(f"Deeper cause: {error.cause.cause.code} - {error.cause.cause.message}")
- ```
-
-blang[php].
- ```[php]
- function handleError($error) {
- echo "Main error: " . $error->code . " - " . $error->message . "\n";
-
- if ($error->cause) {
- echo "Root cause: " . $error->cause->code . " - " . $error->cause->message . "\n";
-
- if ($error->cause->cause) {
- echo "Deeper cause: " . $error->cause->cause->code . " - " . $error->cause->cause->message . "\n";
- }
- }
- }
- ```
-
-blang[go].
- ```[go]
- func handleError(err *ErrorInfo) {
- fmt.Printf("Main error: %d - %s\n", err.Code, err.Message)
-
- if err.Cause != nil {
- fmt.Printf("Root cause: %d - %s\n", err.Cause.Code, err.Cause.Message)
-
- if err.Cause.Cause != nil {
- fmt.Printf("Deeper cause: %d - %s\n", err.Cause.Cause.Code, err.Cause.Cause.Message)
- }
- }
- }
- ```
diff --git a/content/partials/types/_history_request_params.textile b/content/partials/types/_history_request_params.textile
deleted file mode 100644
index 735dbab715..0000000000
--- a/content/partials/types/_history_request_params.textile
+++ /dev/null
@@ -1,9 +0,0 @@
-@HistoryRequestParams@ is a type that encapsulates the parameters for a history queries. For example usage see "@Channel#history@ @Channel#History@ ":/docs/api/realtime-sdk/history#channel-history.
-
-h4. Members
-
-- Start := _null_ The start of the queried interval __Type: @DateTimeOffset@__
-- End := _null_ The end of the queried interval __Type: @DateTimeOffset@__
-- Limit := _null_ By default it is null. Limits the number of items returned by history or stats __Type: @Integer@__
-- Direction := _Backwards_ Enum which is either @Forwards@ or @Backwards@ __Type: @Direction@ enum__
-- ExtraParameters := Optionally any extra query parameters that may be passed to the query. This is mainly used internally by the library to manage paging. __Type: @Dictionary@__
diff --git a/content/partials/types/_http_paginated_response.textile b/content/partials/types/_http_paginated_response.textile
deleted file mode 100644
index 44179667ad..0000000000
--- a/content/partials/types/_http_paginated_response.textile
+++ /dev/null
@@ -1,110 +0,0 @@
-An @HttpPaginatedResponse@ is a superset of "@PaginatedResult@":/docs/api/rest-sdk/types#paginated-result, which is a type that represents a page of results plus metadata indicating the relative queries available to it. @HttpPaginatedResponse@ additionally carries information about the response to an HTTP request. It is used when "making custom HTTP requests":/docs/api/rest-sdk#request.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
- python: Attributes
-
-- items
:= contains a page of results; for example, an array of "@Message@":#message or "@PresenceMessage@":#presence-message objects for a channel history request __Type: @Array<>@__
-- Items
:= contains a page of results; for example, an array of "@Message@":#message or "@PresenceMessage@":#presence-message objects for a channel history request __Type: @Array<>@__
-- items
:= contains a page of results; for example, an array of "@Message@":#message or "@PresenceMessage@":#presence-message objects for a channel history request __Type: @List<>@__
-- statusCode status_code StatusCode := the HTTP status code of the response __Type: @Number@__
-- success Success := whether the HTTP status code indicates success. This is equivalent to @200 <= statusCode < 300@ @200 <= status_code < 300@ @200 <= StatusCode < 300@ __Type: @Boolean@__
-- headers Headers := the headers of the response __Type: @Object@__
-- errorCode error_code ErrorCode := the error code if the @X-Ably-Errorcode@ HTTP header is sent in the response __Type: @Int@ @Number@ __
-- errorMessage error_message ErrorMessage := the error message if the @X-Ably-Errormessage@ HTTP header is sent in the response __Type: @String@__
-
-
-h4. Methods
-
-h6.
- default: first
- csharp: First
-
-bq(definition).
- default: first(callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response resultPage))
- jsall: first(): Promise<"HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response>
- ruby: "HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response first
- php: "HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response first()
- python: "HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response first()
- csharp: Task> FirstAsync()
- java: "HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response first()
- swift,objc: first(callback: (ARTHttpPaginatedResponse?, ARTErrorInfo?) -> Void)
- go: First() ("HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response, error)
-
-blang[default].
- Returns a new @HttpPaginatedResponse@ for the first page of results. When using the Realtime library, the @first@ method returns a "Deferrable":/docs/api/realtime-sdk/types#deferrable and yields an "@HttpPaginatedResponse@":/docs/api/realtime-sdk/types#http-paginated-response. The method is asynchronous and returns a Task which needs to be awaited to get the @HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response.
-
-blang[jsall].
- Returns a promise. On success, the promise is fulfilled with a new @HttpPaginatedResponse@ for the first page of results. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-h6.
- default: hasNext
- csharp,go: HasNext
- ruby: has_next?
- python: has_next
-
-bq(definition).
- default: Boolean hasNext()
- ruby: Boolean has_next?
- php: Boolean hasNext()
- python: Boolean has_next()
- csharp: Boolean HasNext()
- java: Boolean hasNext()
- swift,objc: Boolean hasNext()
- go: HasNext() (bool)
-
-Returns @true@ if there are more pages available by calling @next@ @Next@ and returns @false@ if this page is the last page available.
-
-h6.
- default: isLast
- csharp,go: IsLast
- ruby: last?
- python: is_last
-
-bq(definition).
- default: Boolean isLast()
- ruby: Boolean last?
- php: Boolean isLast()
- python: Boolean is_last()
- csharp: Boolean IsLast()
- java: Boolean isLast()
- swift,objc: Boolean isLast()
- go: IsLast() (bool)
-
-Returns @true@ if this page is the last page and returns @false@ if there are more pages available by calling @next@ @Next@ available.
-
-h6.
- default: next
- csharp,go: Next
-
-bq(definition).
- default: next(callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response resultPage))
- jsall: next(): Promise<"HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response>
- ruby: "HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response next
- php: "HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response next()
- python: "HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response next()
- csharp: Task<"HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response > NextAsync()
- java: "HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response next()
- swift,objc: next(callback: (ARTHttpPaginatedResponse?, ARTErrorInfo?) -> Void)
- go: Next() ("HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response, error)
-
-blang[default].
- Returns a new @HttpPaginatedResponse@ loaded with the next page of results. If there are no further pages, then @null@ a blank HttpPaginatedResponse will be returned @Null@ @None@ @nil@ is returned. The method is asynchronous and return a Task which needs to be awaited to get the @HttpPaginatedResponse@ When using the Realtime library, the @first@ method returns a "Deferrable":/docs/api/realtime-sdk/types#deferrable and yields an "HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response.
-
-blang[jsall].
- Returns a promise. On success, the promise is fulfilled with a new @HttpPaginatedResponse@ loaded with the next page of results. If there are no further pages, then @null@ is returned. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[jsall].
- h6(#current).
- default: current
-
- bq(definition).
- default: current(): Promise<"HttpPaginatedResponse":/docs/api/realtime-sdk/types#http-paginated-response>
-
- Returns a promise. On success, the promise is fulfilled with a new @HttpPaginatedResponse@ loaded with the current page of results. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-h4. Example
-
-The @HttpPaginatedResponse@ interface is a superset of @PaginatedResult@, see the "@PaginatedResult@ example":/docs/api/rest-sdk/types/#paginated-result-example
diff --git a/content/partials/types/_last_connection_details.textile b/content/partials/types/_last_connection_details.textile
deleted file mode 100644
index 780553f722..0000000000
--- a/content/partials/types/_last_connection_details.textile
+++ /dev/null
@@ -1,14 +0,0 @@
-A @LastConnectionDetails@ object provides details on the last connection in a browser environment persisted when the @window beforeunload@ fired. This object is provided to the callback specified in the @recover@ attribute of "@ClientOptions@":/docs/api/realtime-sdk/types#client-options. The callback in turn instructs the client library whether the connection should be recovered or not. See "connection state recovery":/docs/connect/states for more information.
-
-Please note that as "@sessionStorage@":https://www.w3.org/TR/webstorage/ is used to persist the @LastConnectionDetails@ between page reloads, it is only available for pages in the same origin and top-level browsing context.
-
-h4.
- default: Properties
-
-- recoveryKey := An opaque string obtained from the "recoveryKey":/docs/api/realtime-sdk/connection#recovery-key attribute of the "Connection object":/docs/api/realtime-sdk/connection before the page was unloaded. This property is used by the library to recover the connection __Type: @String@__
-
-- disconnectedAt := the time at which the previous library was abruptly disconnected before the page was unloaded. This is represented as milliseconds since epoch __Type: @Integer@__
-
-- location := a clone of "@location@":https://www.w3.org/TR/html5/browsers.html#the-location-interface object of the previous page's @document@ object before the page was unloaded. A common use case for this attribute is to ensure that the previous page URL is the same as the current URL before allowing the connection to be recovered. For example, you may want the connection to be recovered only for page reloads, but not when a user navigates to a different page __Type: @String@__
-
-- clientId := the "@clientId@":/docs/api/realtime-sdk/authentication/#client-id of the "client's Auth object":/docs/api/realtime-sdk/authentication before the page was unloaded. A common use case for this attribute is to ensure that the current logged in user's @clientId@ matches the previous connection's @clientId@ before allowing the connection to be recovered. Ably prohibits changing a @clientId@ for an existing connection, so any mismatch in @clientId@ during a recover will result in the connection moving to the failed state __Type: @String@__
diff --git a/content/partials/types/_local_device.textile b/content/partials/types/_local_device.textile
deleted file mode 100644
index 19b8663953..0000000000
--- a/content/partials/types/_local_device.textile
+++ /dev/null
@@ -1,30 +0,0 @@
-
-An extension of "@DeviceDetails@":#device-details. In addition to the properties members attributes of "@DeviceDetails@":#device-details, it includes the following:
-
-Contains the device identity token and secret of a device.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-- id
:= a unique ID generated by the device __Type: @String@__
-- deviceSecret
:= a unique device secret generated by the Ably SDK __Type: @String@__
-
-- deviceIdentityToken := a unique identity token for the device __Type: @String@__
-
-
-h4. Methods
-
-h6.
- jsall: listSubscriptions
-
-bq(definition).
- jsall: listSubscriptions(): Promise<"PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"PushChannelSubscription":/docs/api/realtime-sdk/types#push-channel-subscription>>
-
-Retrieves push subscriptions active for the local device.
-
-h4. Returns
-
-Returns a promise. On success, the promise is fulfilled with a "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result object containing an array of "PushChannelSubscription":/docs/api/realtime-sdk/types#push-channel-subscription objects for each push channel subscription active for the local device. On failure, the promise is rejected with an "@ErrorInfo@":#error-info object that details the reason why it was rejected.
-
diff --git a/content/partials/types/_location_pushes.textile b/content/partials/types/_location_pushes.textile
deleted file mode 100644
index 4739d0a717..0000000000
--- a/content/partials/types/_location_pushes.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-Starting with iOS 15, Apple supports a power-efficient way to request location through the location push service extension.
-
-The following table explains how to receive location push notifications:
-
-|_. Action |_. Details |
-| Request location token | Call @CLLocationManager.startMonitoringLocationPushes(completion:)@ within the @ARTPushRegistererDelegate.didActivateAblyPush(:)@ delegate method. This delegate method is the callback for @ARTRealtime.push.activate()@. |
-| Register with Ably | Call @ARTPush.didRegisterForLocationNotifications(withDeviceToken:realtime:)@ when you receive the location push token. Note the "Location" in the method name to distinguish it from regular push tokens. |
-| Handle result | Use the @ARTPushRegistererDelegate.didUpdateAblyPush:@ callback, which indicates whether the token was successfully saved. |
diff --git a/content/partials/types/_message.textile b/content/partials/types/_message.textile
deleted file mode 100644
index 00f65e50bb..0000000000
--- a/content/partials/types/_message.textile
+++ /dev/null
@@ -1,131 +0,0 @@
-A @Message@ represents an individual message that is sent to or received from Ably.
-
-h6(#name).
- default: name
- csharp: Name
-
-The event name, if provided. __Type: @String@__
-
-h6(#data).
- default: data
- csharp: Data
-
-The message payload, if provided. __Type: @String@, @StringBuffer@, @JSON Object@ @String@, @ByteArray@, @JSONObject@, @JSONArray@ @String@, @byte[]@, @plain C# object that can be serialized to JSON@ @String@, @Binary@ (ASCII-8BIT String), @Hash@, @Array@ @String@, @Bytearray@, @Dict@, @List@ @String@, @Binary String@, @Associative Array@, @Array@ @NSString *@, @NSData *@, @NSDictionary *@, @NSArray *@ @String@, @NSData@, @Dictionary@, @Array@ @String@, @Map@, @List@ __
-
-h6(#extras).
- default: extras
- csharp: Extras
-
-Metadata and/or ancillary payloads, if provided. Valid payloads include "@push@":/docs/push/publish#payload, "@headers@" (a map of strings to strings for arbitrary customer-supplied metadata), "@ephemeral@":/docs/pub-sub/advanced#ephemeral, and "@privileged@":/docs/platform/integrations/webhooks#skipping objects. __Type: @JSONObject@, @JSONArray@ plain C# object that can be converted to JSON @JSON Object@ @Hash@, @Array@ @Dict@, @List@ @Dictionary@, @Array@ @NSDictionary *@, @NSArray *@ @Associative Array@, @Array@ __
-
-h6(#id).
- default: id
- csharp: Id
-
-A Unique ID assigned by Ably to this message. __Type: @String@__
-
-h6(#client-id).
- default: clientId
- csharp: ClientId
- ruby: client_id
- python: client_id
-
-The client ID of the publisher of this message. __Type: @String@__
-
-h6(#connection-id).
- default: connectionId
- csharp: ConnectionId
- ruby: connection_id
- python: connection_id
-
-The connection ID of the publisher of this message. __Type: @String@__
-
-h6(#connection-key).
- default: connectionKey
- csharp,go: ConnectionKey
- ruby,python: connection_key
-
-A connection key, which can optionally be included for a REST publish as part of the "publishing on behalf of a realtime client functionality":/docs/pub-sub/advanced#publish-on-behalf. __Type: @String@__
-
-h6(#timestamp).
- default: timestamp
- csharp: Timestamp
-
-Timestamp when the message was first received by the Ably, as milliseconds since the epoch a @Time@ object .__Type: @Integer@ @Long Integer@ @DateTimeOffset@ @Time@ @NSDate@ __
-
-h6(#encoding).
- default: encoding
- csharp: Encoding
-
-This will typically be empty as all messages received from Ably are automatically decoded client-side using this value. However, if the message encoding cannot be processed, this attribute will contain the remaining transformations not applied to the @data@ payload. __Type: @String@__
-
-blang[jsall].
-
- h6(#action).
- default: action
-
- The action type of the message, one of the "@MessageAction@":#message-action enum values. __Type: @int enum { MESSAGE_CREATE, MESSAGE_UPDATE, MESSAGE_DELETE, META, MESSAGE_SUMMARY }@__
-
- h6(#serial).
- default: serial
-
- A server-assigned identifier that will be the same in all future updates of this message. It can be used to add "annotations":/docs/messages/annotations to a message or to "update or delete":/docs/messages/updates-deletes it. Serial will only be set if you enable annotations, updates, and deletes in "channel rules":/docs/channels#rules . __Type: @String@__
-
- h6(#annotations).
- default: annotations
-
- An object containing information about annotations that have been made to the object. __Type: "@MessageAnnotations@":/docs/api/realtime-sdk/types#message-annotations__
-
- h6(#version).
- default: version
-
- An object containing version metadata for messages that have been updated or deleted. See "updating and deleting messages":/docs/messages/updates-deletes for more information. __Type: "@MessageVersion@":#message-version__
-
-h3(constructors).
- default: Message constructors
-
-h6(#message-from-encoded).
- default: Message.fromEncoded
-
-bq(definition).
- default: Message.fromEncoded(Object encodedMsg, ChannelOptions channelOptions?) -> Message
-
-A static factory method to create a "@Message@":/docs/api/realtime-sdk/types#message from a deserialized @Message@-like object encoded using Ably's wire protocol.
-
-h4. Parameters
-
-- encodedMsg := a @Message@-like deserialized object. __Type: @Object@__
-- channelOptions := an optional "@ChannelOptions@":/docs/api/realtime-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data. __Type: @Object@__
-
-h4. Returns
-
-A "@Message@":/docs/api/realtime-sdk/types#message object
-
-h6(#message-from-encoded-array).
- default: Message.fromEncodedArray
-
-bq(definition).
- default: Message.fromEncodedArray(Object[] encodedMsgs, ChannelOptions channelOptions?) -> Message[]
-
-A static factory method to create an array of "@Messages@":/docs/api/realtime-sdk/types#message from an array of deserialized @Message@-like object encoded using Ably's wire protocol.
-
-h4. Parameters
-
-- encodedMsgs := an array of @Message@-like deserialized objects. __Type: @Array@__
-- channelOptions := an optional "@ChannelOptions@":/docs/api/realtime-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data. __Type: @Object@__
-
-h4. Returns
-
-An @Array@ of "@Message@":/docs/api/realtime-sdk/types#message objects
-
-h3(#message-version).
- default: MessageVersion
-
-h4. Properties
-
-|_. Property |_. Description |_. Type |
-| serial | An Ably-generated ID that uniquely identifies this version of the message. Can be compared lexicographically to determine version ordering. For an original message with an action of @message.create@, this will be equal to the top-level @serial@. | @String@ |
-| timestamp | The time this version was created (when the update or delete operation was performed). For an original message, this will be equal to the top-level @timestamp@. | @Integer@ @Long Integer@ @DateTimeOffset@ @Time@ @NSDate@ |
-| clientId | The client identifier of the user who performed the update or delete operation. Only present for @message.update@ and @message.delete@ actions. | @String@ (optional) |
-| description | Optional description provided when the update or delete was performed. Only present for @message.update@ and @message.delete@ actions. | @String@ (optional) |
-| metadata | Optional metadata provided when the update or delete was performed. Only present for @message.update@ and @message.delete@ actions. | @Object@ (optional) |
diff --git a/content/partials/types/_message_action.textile b/content/partials/types/_message_action.textile
deleted file mode 100644
index ef6d69b2ae..0000000000
--- a/content/partials/types/_message_action.textile
+++ /dev/null
@@ -1,61 +0,0 @@
-blang[default].
- @MessageAction@ is an enum representing the action type of the message.
-
- ```
- enum MessageAction {
- MESSAGE_CREATE, // 0
- MESSAGE_UPDATE, // 1
- MESSAGE_DELETE, // 2
- META, // 3
- MESSAGE_SUMMARY // 4
- }
- ```
-
-blang[jsall].
- @Message@ @action@ is a String representing the action type of the message.
-
- ```[javascript]
- var MessageActions = [
- 'message.create',
- 'message.update',
- 'message.delete',
- 'meta',
- 'message.summary'
- ]
- ```
-
-blang[java].
- @io.ably.lib.types.Message.Action@ is an enum representing the action type of the message.
-
- ```[java]
- public enum Action {
- MESSAGE_CREATE, // 0
- MESSAGE_UPDATE, // 1
- MESSAGE_DELETE, // 2
- META, // 3
- MESSAGE_SUMMARY // 4
- }
- ```
-
-blang[objc,swift].
- @ARTMessageAction@ is an enum representing the action type of the message.
-
- ```[objc]
- typedef NS_ENUM(NSUInteger, ARTMessageAction) {
- ARTMessageActionCreate,
- ARTMessageActionUpdate,
- ARTMessageActionDelete,
- ARTMessageActionMeta,
- ARTMessageActionMessageSummary
- };
- ```
-
- ```[swift]
- enum ARTMessageAction : UInt {
- case Create
- case Update
- case Delete
- case Meta
- case Summary
- }
- ```
diff --git a/content/partials/types/_message_annotations.textile b/content/partials/types/_message_annotations.textile
deleted file mode 100644
index 69fad98670..0000000000
--- a/content/partials/types/_message_annotations.textile
+++ /dev/null
@@ -1,7 +0,0 @@
-h4.
- default: Properties
- java: Members
- ruby: Attributes
- python: Attributes
-
-- summary := An object whose keys are annotation types, and the values are aggregated summaries for that annotation type __Type: @Record@__
diff --git a/content/partials/types/_message_listener.textile b/content/partials/types/_message_listener.textile
deleted file mode 100644
index f328f11a42..0000000000
--- a/content/partials/types/_message_listener.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @io.ably.lib.realtime.Channel.MessageListener@ is an interface allowing a client to be notified when messages are received on a channel using a "channel subscription":/docs/pub-sub#subscribe.
-
-```[java]
- public interface MessageListener {
- // Called when one or more messages are received
- public void onMessage(Message message);
- }
-```
diff --git a/content/partials/types/_paginated_result.textile b/content/partials/types/_paginated_result.textile
deleted file mode 100644
index 0d496424af..0000000000
--- a/content/partials/types/_paginated_result.textile
+++ /dev/null
@@ -1,212 +0,0 @@
-A @PaginatedResult@ is a type that represents a page of results for all message and presence history, stats and REST presence requests. The response from a "Ably REST API paginated query":/docs/api/rest-api/#pagination is accompanied by metadata that indicates the relative queries available to the @PaginatedResult@ object.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-- items
:= contains the current page of results (for example an Array of "@Message@":#message or "@PresenceMessage@":#presence-message objects for a channel history request) __Type: @Array @__
-- Items
:= contains the current page of results (for example an Array of "@Message@":#message or "@PresenceMessage@":#presence-message objects for a channel history request) __Type: @List @__
-- Items
:= contains the current page of results (for example an Array of "@Message@":#message or "@PresenceMessage@":#presence-message objects for a channel history request) __Type: @Array @__
-- items
:= contains the current page of results (for example an Array of "@Message@":#message or "@PresenceMessage@":#presence-message objects for a channel history request) __Type: @List @__
-
-h4. Methods
-
-h6.
- default: first
- csharp: First
-
-bq(definition).
- default: first(callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result resultPage))
- jsall: first(): Promise<"PaginatedResult":#paginated-result>
- ruby: "PaginatedResult":#paginated-result first
- php: "PaginatedResult":#paginated-result first()
- python: "PaginatedResult":#paginated-result first()
- csharp: Task> FirstAsync()
- java: "PaginatedResult":#paginated-result first()
- swift,objc: first(callback: (ARTPaginatedResult?, ARTErrorInfo?) -> Void)
- go: First() ("PaginatedResult":#paginated-result, error)
-
-
-blang[default].
- Returns a new @PaginatedResult@ for the first page of results. When using the Realtime library, the @first@ method returns a "Deferrable":/docs/api/realtime-sdk/types#deferrable and yields a "PaginatedResult":#paginated-result. The method is asynchronous and returns a Task which needs to be awaited to get the "PaginatedResult":#paginated-result.
-
-blang[jsall].
- Returns a promise. On success, the promise is fulfilled with a new @PaginatedResult@ for the first page of results. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-h6.
- default: hasNext
- csharp: HasNext
- ruby: has_next?
- python: has_next
-
-bq(definition).
- default: Boolean hasNext()
- ruby: Boolean has_next?
- php: Boolean hasNext()
- python: Boolean has_next()
- csharp: Boolean HasNext()
- java: Boolean hasNext()
- swift,objc: Boolean hasNext()
- go: HasNext() (bool)
-
-Returns @true@ if there are more pages available by calling @next@ @Next@ and returns @false@ if this page is the last page available.
-
-h6.
- default: isLast
- csharp: IsLast
- ruby: last?
- python: is_last
-
-bq(definition).
- default: Boolean isLast()
- ruby: Boolean last?
- php: Boolean isLast()
- python: Boolean is_last()
- csharp: Boolean IsLast()
- java: Boolean isLast()
- swift,objc: Boolean isLast()
- go: IsLast() (bool)
-
-Returns @true@ if this page is the last page and returns @false@ if there are more pages available by calling @next@ @Next@ available.
-
-h6.
- default: next
- csharp: Next
-
-bq(definition).
- default: next(callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result resultPage))
- jsall: next(): Promise<"PaginatedResult":#paginated-result | null>
- ruby: "PaginatedResult":#paginated-result next
- php: "PaginatedResult":#paginated-result next()
- python: "PaginatedResult":#paginated-result next()
- csharp: Task<"PaginatedResult":#paginated-result> NextAsync()
- java: "PaginatedResult":#paginated-result next()
- swift,objc: next(callback: (ARTPaginatedResult?, ARTErrorInfo?) -> Void)
- go: Next() ("PaginatedResult":#paginated-result, error)
-
-blang[default].
- Returns a new @PaginatedResult@ loaded with the next page of results. If there are no further pages, then @null@ a blank PaginatedResult will be returned @Null@ @None@ @nil@ is returned. The method is asynchronous and return a Task which needs to be awaited to get the @PaginatedResult@ When using the Realtime library, the @first@ method returns a "Deferrable":/docs/api/realtime-sdk/types#deferrable and yields a "PaginatedResult":#paginated-result.
-
-blang[jsall].
- Returns a promise. On success, the promise is fulfilled with a new @PaginatedResult@ loaded with the next page of results. If there are no further pages, then @null@ is returned. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[jsall].
- h6(#current).
- default: current
-
- bq(definition).
- default: current(): Promise<"PaginatedResult":#paginated-result>
-
- Returns a promise. On success, the promise is fulfilled with a new @PaginatedResult@ loaded with the current page of results. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-h4(#paginated-result-example). Example
-
-```[jsall]
-const paginatedResult = await channel.history();
-console.log('Page 0 item 0:' + paginatedResult.items[0].data);
-const nextPage = await paginatedResult.next();
-console.log('Page 1 item 1: ' + nextPage.items[1].data);
-console.log('Last page?: ' + nextPage.isLast());
-```
-
-```[java]
-PaginatedResult firstPage = channel.history();
-System.out.println("Page 0 item 0:" + firstPage.items[0].data);
-if (firstPage.hasNext) {
- PaginatedResult nextPage = firstPage.next();
- System.out.println("Page 1 item 1:" + nextPage.items[1].data);
- System.out.println("More pages?:" + Strong.valueOf(nextPage.hasNext()));
-};
-```
-
-```[csharp]
-PaginatedResult firstPage = await channel.HistoryAsync(null);
-Message firstMessage = firstPage.Items[0];
-Console.WriteLine("Page 0 item 0: " + firstMessage.data);
-if (firstPage.HasNext)
-{
- var nextPage = await firstPage.NextAsync();
- Console.WriteLine("Page 1 item 1:" + nextPage.Items[1].data);
- Console.WriteLine("More pages?: " + nextPage.HasNext());
-}
-```
-
-```[ruby]
-# When using the REST sync library
-first_page = channel.history
-puts "Page 0 item 0: #{first_page.items[0].data}"
-if first_page.has_next?
- next_page = first_page.next
- puts "Page 1 item 1: #{next_page.items[1].data}"
- puts "Last page?: #{next_page.is_last?}"
-end
-
-# When using the Realtime EventMachine library
-channel.history do |first_page|
- puts "Page 0 item 0: #{first_page.items[0].data}"
- if first_page.has_next?
- first_page.next do |next_page|
- puts "Page 1 item 1: #{next_page.items[1].data}"
- puts "Last page?: #{next_page.is_last?}"
- end
- end
-end
-```
-
-```[python]
-result_page = channel.history()
-print 'Page 0 item 0: ' + str(result_page.items[0].data)
-if result_page.has_next():
- next_page = result_page.next()
- print 'Page 1 item 1: ' + str(next_page.items[1].data)
- print 'Last page?: ' + str(next_page.is_last())
-```
-
-```[php]
-$firstPage = $channel.history();
-echo("Page 0 item 0: " . $firstPage->items[0]->data);
-if ($firstPage->hasNext()) {
- $nextPage = $firstPage->next();
- echo("Page 1 item 1: " . $nextPage->items[1]->data);
- echo("Last page?: " . $nextPage->isLast());
-}
-```
-
-```[objc]
-[channel history:^(ARTPaginatedResult *paginatedResult, ARTErrorInfo *error) {
- NSLog(@"Page 0 item 0: %@", paginatedResult.items[0].data);
- [paginatedResult next:^(ARTPaginatedResult *nextPage, ARTErrorInfo *error) {
- NSLog(@"Page 1 item 1: %@", nextPage.items[1].data);
- NSLog(@"Last page?: %d", nextPage.isLast());
- }];
-}];
-```
-
-```[swift]
-channel.history { paginatedResult, error in
- guard let paginatedResult = paginatedResult else {
- print("No results available")
- return
- }
- print("Page 0 item 0: \((paginatedResult.items[0] as! ARTMessage).data)")
- paginatedResult.next { nextPage, error in
- guard let nextPage = nextPage else {
- print("No next page available")
- return
- }
- print("Page 1 item 1: \((nextPage.items[1] as! ARTMessage).data)")
- print("Last page? \(nextPage.isLast())")
- }
-}
-```
-
-```[go]
- page0, err := channel.History(nil)
- fmt.Println("Page. 0 item 0: %s\n", page0.Messages[0].Data)
- page1, err := page0.Next()
- fmt.Println("Page. 1 item 1: %s\n", page1.Messages[1].Data)
- fmt.Println("Last page? %s\n", page1.IsLast())
-```
-
-
diff --git a/content/partials/types/_param.textile b/content/partials/types/_param.textile
deleted file mode 100644
index dc93597542..0000000000
--- a/content/partials/types/_param.textile
+++ /dev/null
@@ -1,10 +0,0 @@
-@Param@ is a type encapsulating a key/value pair. This type is used frequently in method parameters allowing key/value pairs to be used more flexible, see "@Channel#history@":/docs/api/realtime-sdk/history#channel-history for an example.
-
-Please note that @key@ and @value@ attributes are always strings. If an @Integer@ or other value type is expected, then you must coerce that type into a @String@.
-
-h4.
- java: Members
-
-- key := The key value __Type: @String@__
-- value := The value associated with the @key@ __Type: @String@__
-
diff --git a/content/partials/types/_presence_action.textile b/content/partials/types/_presence_action.textile
deleted file mode 100644
index d9e095bd0f..0000000000
--- a/content/partials/types/_presence_action.textile
+++ /dev/null
@@ -1,146 +0,0 @@
-blang[jsall].
- @Presence@ @action@ is a String with a value matching any of the "@Realtime Presence@ states & events":/docs/presence-occupancy/presence#trigger-events.
-
- ```[javascript]
- var PresenceActions = [
- 'absent', // (reserved for internal use)
- 'present',
- 'enter',
- 'leave',
- 'update'
- ]
- ```
-
-blang[java].
- @io.ably.lib.types.PresenceMessage.Action@ is an enum representing all the "@Realtime Presence@ states & events":/docs/presence-occupancy/presence#trigger-events.
-
- ```[java]
- public enum Action {
- ABSENT, // 0 (reserved for internal use)
- PRESENT, // 1
- ENTER, // 2
- LEAVE, // 3
- UPDATE // 4
- }
- ```
-
-blang[csharp].
- @IO.Ably.PresenceAction@ is an enum representing all the "@Realtime Presence@ states & events":/docs/presence-occupancy/presence#trigger-events.
-
- ```[csharp]
- public enum Action {
- Absent, // 0 (reserved for internal use)
- Present, // 1
- Enter, // 2
- Leave, // 3
- Update // 4
- }
- ```
-
-blang[python].
- @PresenceAction@ is an enum-like class representing all the "@Realtime Presence@ states & events":/docs/presence-occupancy/presence#trigger-events.
-
- ```[python]
- class PresenceAction(object):
- ABSENT = 0 # (reserved for internal use)
- PRESENT = 1
- ENTER = 2
- LEAVE = 3
- UPDATE = 4
- ```
-
-blang[php].
- @PresenceMessage Action@ is one of the class constants representing all the "@Realtime Presence@ states & events":/docs/presence-occupancy/presence#trigger-events.
-
- ```[php]
- namespace Ably\Models;
- class PresenceMessages {
- const ABSENT = 0; /* (reserved for internal use) */
- const PRESENT = 1;
- const ENTER = 2;
- const LEAVE = 3;
- const UPDATE = 4;
- }
- ```
-
- h4. Example usage
-
- ```[php]
- if ($presenceMessage->action == Ably\Models\PresenceMesage::ENTER) {
- /* do something */
- }
- ```
-
-blang[ruby].
- @Ably::Models::PresenceMessage::ACTION@ is an enum-like value representing all the "@Realtime Presence@ states & events":/docs/presence-occupancy/presence#trigger-events. @ACTION@ can be represented interchangeably as either symbols or constants.
-
- h4. Symbol states
-
- ```[ruby]
- :absent # => 0 (reserved for internal use)
- :present # => 1
- :enter # => 2
- :leave # => 3
- :update # => 4
- ```
-
- h4. Constant states
-
- ```[ruby]
- PresenceMessage::ACTION.Absent # => 0 (internal use)
- PresenceMessage::ACTION.Present # => 1
- PresenceMessage::ACTION.Enter # => 2
- PresenceMessage::ACTION.Leave # => 3
- PresenceMessage::ACTION.Update # => 4
- ```
-
- h4. Example usage
-
- ```[ruby]
- # Example with symbols
- presence.on(:attached) { ... }
-
- # Example with constants
- presence.on(Ably::Models::PresenceMessage::ACTION.Enter) { ... }
-
- # Interchangeable
- Ably::Models::PresenceMessage::ACTION.Enter == :enter # => true
- ```
-
-blang[objc,swift].
- @ARTPresenceAction@ is an enum representing all the "@Realtime Presence@ states & events":/docs/presence-occupancy/presence#trigger-events.
-
- ```[objc]
- typedef NS_ENUM(NSUInteger, ARTPresenceAction) {
- ARTPresenceAbsent, // reserved for internal use
- ARTPresencePresent,
- ARTPresenceEnter,
- ARTPresenceLeave,
- ARTPresenceUpdate
- };
- ```
-
- ```[swift]
- enum ARTPresenceAction : UInt {
- case Absent // reserved for internal use
- case Present
- case Enter
- case Leave
- case Update
- }
- ```
-
-blang[go].
- @Presence@ @action@ is a String with a value matching any of the "@Realtime Presence@ states & events":/docs/presence-occupancy/presence#trigger-events.
-
- ```[go]
- const (
- PresenceAbsent = 0
- PresencePresent = 1
- PresenceEnter = 2
- PresenceLeave = 3
- PresenceUpdate = 4
- )
- ```
-
-
\ No newline at end of file
diff --git a/content/partials/types/_presence_listener.textile b/content/partials/types/_presence_listener.textile
deleted file mode 100644
index c4bb846fed..0000000000
--- a/content/partials/types/_presence_listener.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @io.ably.lib.realtime.Presence.PresenceListener@ is an interface allowing a client to be notified when presence message events are received on a presence channel using a "presence subscription":/docs/presence-occupancy/presence.
-
-```[java]
- public interface PresenceListener {
- // Called when one or more presence messages are received
- public void onPresenceMessage(PresenceMessage message);
- }
-```
diff --git a/content/partials/types/_presence_message.textile b/content/partials/types/_presence_message.textile
deleted file mode 100644
index 8139a7882d..0000000000
--- a/content/partials/types/_presence_message.textile
+++ /dev/null
@@ -1,66 +0,0 @@
-A @PresenceMessage@ represents an individual presence update that is sent to or received from Ably.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-- action
:= the event signified by a PresenceMessage. See "@PresenceMessage.action@":/docs/api/realtime-sdk/types#presence-action __Type: @enum { ABSENT, PRESENT, ENTER, LEAVE, UPDATE }@__
-- Action
:= the event signified by a PresenceMessage. See "@PresenceMessage.action@":/docs/api/realtime-sdk/types#presence-action __Type: @enum { Absent, Present, Enter, Leave, Update }@__
-- action
:= the event signified by a PresenceMessage. See "@Presence action@":/docs/api/realtime-sdk/types#presence-action __Type: @int enum { ABSENT, PRESENT, ENTER, LEAVE, UPDATE }@__
-- action
:= the event signified by a PresenceMessage. See "@PresenceAction@":/docs/api/realtime-sdk/types#presence-action __Type: @int enum { ABSENT, PRESENT, ENTER, LEAVE, UPDATE }@__
-- action
:= the event signified by a PresenceMessage. See "@PresenceMessage::ACTION@":/docs/api/realtime-sdk/types#presence-action __Type: @enum { :absent, :present, :enter, :leave, :update }@__
-- action
:= the event signified by a PresenceMessage. See "@PresenceMessage::ACTION@":/docs/api/realtime-sdk/types#presence-action __Type: @const PresenceMessage::ABSENT,PRESENT,ENTER,LEAVE,UPDATE@__
-- action
:= the event signified by a PresenceMessage. See "@PresenceMessage.action@":/docs/api/realtime-sdk/types#presence-action __Type: @ARTPresenceAction@__
-- Action
:= the event signified by a PresenceMessage. See "@PresenceMessage::action@":/docs/api/realtime-sdk/types#presence-action __Type: @const PresenceMessage::PresenceAbsent,PresencePresent,PresenceEnter,PresenceLeave,PresenceUpdate@__
-
-- data Data := The presence update payload, if provided __@String@, @ByteArray@, @JSONObject@, @JSONArray@ @String@, @byte[]@, plain C# object that can be converted to Json @String@, @StringBuffer@, @JSON Object@ @String@, @[]byte@ @String@, @Binary@ (ASCII-8BIT String), @Hash@, @Array@ @String@, @Bytearray@, @Dict@, @List@ @String@, @NSData@, @Dictionary@, @Array@ @NSString *@, @NSData *@, @NSDictionary *@, @NSArray *@ @String@, @Binary String@, @Associative Array@, @Array@ __
-
-- extras Extras := Metadata and/or ancillary payloads, if provided. The only currently valid payloads for extras are the "@push@":/docs/push/publish#sub-channels, "@ref@":/docs/channels/messages#interactions and "@privileged@":/docs/platform/integrations/webhooks#skipping objects. __Type: @JSONObject@, @JSONArray@ plain C# object that can be converted to Json @String@, @[]byte@ @JSON Object@ @Hash@, @Array@ @Dict@, @List@ @Dictionary@, @Array@ @NSDictionary *@, @NSArray *@ @Associative Array@, @Array@ @Map@, @List@ __
-
-- id Id := Unique ID assigned by Ably to this presence update __Type: @String@__
-
-- clientId client_id ClientId := The client ID of the publisher of this presence update __Type: @String@__
-
-- connectionId connection_id ConnectionId := The connection ID of the publisher of this presence update __Type: @String@__
-
-- timestamp Timestamp := Timestamp when the presence update was received by Ably, as milliseconds since the epoch . __Type: @Integer@ @Long Integer@ @DateTimeOffset@ @Time@ @NSDate@ __
-
-- encoding Encoding := This will typically be empty as all presence updates received from Ably are automatically decoded client-side using this value. However, if the message encoding cannot be processed, this attribute will contain the remaining transformations not applied to the @data@ payload __Type: @String@__
-
-h3.
- default: PresenceMessage constructors
-
-h4(#presence-from-encoded).
- default: PresenceMessage.fromEncoded
-
-bq(definition).
- default: PresenceMessage.fromEncoded(Object encodedPresMsg, ChannelOptions channelOptions?) -> PresenceMessage
-
-A static factory method to create a "@PresenceMessage@":/docs/api/realtime-sdk/types#presence-message from a deserialized @PresenceMessage@-like object encoded using Ably's wire protocol.
-
-h4. Parameters
-
-- encodedPresMsg := a @PresenceMessage@-like deserialized object. __Type: @Object@__
-- channelOptions := an optional "@ChannelOptions@":/docs/api/realtime-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data. __Type: @Object@__
-
-h4. Returns
-
-A "@PresenceMessage@":/docs/api/realtime-sdk/types#presence-message object
-
-h4(#presence-from-encoded-array).
- default: PresenceMessage.fromEncodedArray
-
-bq(definition).
- default: PresenceMessage.fromEncodedArray(Object[] encodedPresMsgs, ChannelOptions channelOptions?) -> PresenceMessage[]
-
-A static factory method to create an array of "@PresenceMessages@":/docs/api/realtime-sdk/types#presence-message from an array of deserialized @PresenceMessage@-like object encoded using Ably's wire protocol.
-
-h4. Parameters
-
-- encodedPresMsgs := an array of @PresenceMessage@-like deserialized objects. __Type: @Array@__
-- channelOptions := an optional "@ChannelOptions@":/docs/api/realtime-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data. __Type: @Object@__
-
-h4. Returns
-
-An @Array@ of "@PresenceMessage@":/docs/api/realtime-sdk/types#presence-message objects
diff --git a/content/partials/types/_push_admin.textile b/content/partials/types/_push_admin.textile
deleted file mode 100644
index 7e63c50abb..0000000000
--- a/content/partials/types/_push_admin.textile
+++ /dev/null
@@ -1,527 +0,0 @@
-h2(#push-admin). Push Admin object
-
-This object is accessible through @client.push.admin@ and provides:
-
-h3(#properties).
- default: Push Admin Properties
- ruby: Push::Admin Properties
-
-The push admin object exposes the following public properties attributes members :
-
-h6(#device-registrations).
- default: deviceRegistrations
- ruby,python: device_registrations
-
-The returned "@DeviceRegistrations@":#device-registrations-object object provides functionality for registering, updating, listing and de-registering push devices.
-
-h6(#channel-subscriptions).
- default: channelSubscriptions
- ruby,python: channel_subscriptions
-
-The returned "@PushChannelSubscriptions@":#push-channel-subscriptions object provides functionality for subscribing, listing and unsubscribing individual devices or groups of "identified devices":/docs/auth/identified-clients to push notifications published on channels.
-
-h3(#methods). Methods
-
-h6(#publish).
- default: publish
-
-bq(definition).
- default: publish(Object recipient, Object data, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err))
- jsall: publish(Object recipient, Object payload): Promise
- ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable publish(Hash recipient, Hash data) -> yield
- python: publish(recipient=Object, data=Object)
- php: publish(Array recipient, Array data)
- swift,objc: publish(recipient: ARTPushRecipient, data: AnyObject?, callback: (("ARTErrorInfo":/docs/api/realtime-sdk/types#error-info?) -> Void)?)
- java,android: void publish(String recipient, Object data, "CompletionListener":#completion-listener listener)
-
-Publishes a push notification directly to a device or group of devices sharing a "client identifier":/docs/auth/identified-clients. See the "push notification direct publishing documentation":/docs/push/publish#direct-publishing for more information.
-
-h4. Parameters
-
-- recipient := an object an array a Hash containing the push recipient details. See the "push notification publish REST API documentation":/docs/api/rest-api#push-publish for details on the supported recipient fields
-- data payload := an object an array a Hash containing the push notification data. See the "push admin payload structure":/docs/push/publish#payload for details on the supported push payload fields
-
-- &block
:= yielded upon success
-- listener
:= Listener to be notified on completion __Type: "@CompletionListener@":#completion-listener__
-- callback
:= called upon publishing the message, or with an error
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success to publish the push notification, the promise resolves. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[swift,objc].
- h4. Callback result
-
- The callback is called upon success or failure to publish the push notification. When this operation fails, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-blang[ruby].
- h4. Returns
-
- A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method.
-
- On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method are yielded to.
-
- Failure to publish the push notification will trigger the @errback@ callback of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-blang[java].
- h4. Listener result
-
- On successful publish of the message, the @onSuccess@ method of the "CompletionListener":#completion-listener is called. On failure to publish the message, the @onError@ method is called with an "@ErrorInfo@":#error-info argument describing the failure reason.
-
-h2(#device-registrations-object).
- default: DeviceRegistrations object
- jsall: PushDeviceRegistrations object
-
-This object is accessible through @client.push.admin.deviceRegistrations@ @client.push.admin.device_registrations@ and provides an API to register new push notification devices, update existing devices, deregister old devices, and retrieve or list devices registered to an app.
-
-h3(#device-registrations-methods). Methods
-
-h6(#device-get).
- default: get
-
-bq(definition#device-get-id).
- default: get(String deviceId, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "DeviceDetails":#device-details device))
- jsall: get(String deviceId): Promise<"DeviceDetails":#device-details>
- ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable get(String deviceId) -> yields "DeviceDetails":#device-details
- python: "DeviceDetails":#device-details get(device_id=String)
- php: "DeviceDetails":#device-details get(String deviceId)
- swift,objc: get(deviceId: ArtDeviceId, callback: ((ARTDeviceDetails?, ARTErrorInfo?) -> Void))
- java,android: "DeviceDetails":#device-details get(String deviceId)
-
-blang[java,android].
-
- bq(definition#device-get-id-async).
- java,android: getAsync(String deviceId, Callback<"DeviceDetails":/docs/api/rest-sdk/push-admin#device-details> callback)
-
-bq(definition#device-get-device).
- default: get("DeviceDetails":#device-details device, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "DeviceDetails":#device-details device))
- jsall: get("DeviceDetails":#device-details deviceDetails): Promise<"DeviceDetails":#device-details>
- ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable get("DeviceDetails":#device-details device) -> yields "DeviceDetails":#device-details
-
-Obtain the @DeviceDetails@ for a device registered for receiving push registrations matching the @deviceId@ argument, or the @id@ attribute of the provided @DeviceDetails@ object. Requires @push-admin@ permission or @push-subscribe@ permission together with device authentication matching the requested @deviceId@.
-
-h4. Parameters
-
-- deviceId := the unique device ID String for the requested device
-- device deviceDetails := a "@DeviceDetails@":#device-details object containing at a minimum the @deviceId@ of the requested device
-
-- &block
:= yields a @DeviceDetails@ object upon success
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise is fulfilled with a "@DeviceDetails@":#device-details object representing the device registered for push notifications. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[swift,objc].
- h4. Callback result
-
- On success, @device@ contains the device registered for push notifications as a "@DeviceDetails@":#device-details object.
-
- On failure to retrieve the device, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-blang[ruby].
- h4. Returns
-
- A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method.
-
- On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yield the device registered for push notifications as a "@DeviceDetails@":#device-details object.
-
- Failure to retrieve the device will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-blang[java].
- h4. Listener result
-
- On successful publish of the message, the @onSuccess@ method of the "CompletionListener":#completion-listener is called. On failure to get the device, the @onError@ method is called with an "@ErrorInfo@":#error-info argument describing the failure reason.
-
-h6(#device-list).
- default: list
-
-bq(definition).
- default: list(Object params, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"DeviceDetails":#device-details device> resultPage))
- jsall: list(Object params): Promise<"PaginatedResult":#paginated-result<"DeviceDetails":#device-details>>
- ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable list(Hash params) -> yields "PaginatedResult":#paginated-result<"DeviceDetails":#device-details>
- python: "PaginatedResult":#paginated-result list(params=Object)
- php: "PaginatedResult":#paginated-result list_(Array params)
- swift,objc: list(params: NSDictionary *, callback: (("ARTPaginatedResult":#paginated-result?, ARTErrorInfo?) -> Void))
- java,android: "PaginatedResult":#paginated-result list(Param[] params)
-
-Retrieve all devices matching the params filter as a paginated list of "@DeviceDetails@":#device-details objects. Requires @push-admin@ permission.
-
-h4. Parameters
-
-- params "Param":#param[] params := an object containing the query parameters as key value pairs as specified below.
-
-- &block
:= yields a @PaginatedResult@ object
-
-h4. @params@ properties
-
-- clientId :client_id := optional filter to restrict to devices associated with that client identifier. Cannot be used with a @deviceId@ @:device_id@ param __Type: @String@__
-- deviceId :device_id := optional filter to restrict to devices associated with that device identifier. Cannot be used with a @clientId@ @:client_id@ param __Type: @String@__
-- limit :limit := _100_ maximum number of devices per page to retrieve, up to 1,000 __Type: @Integer@__
-
-blang[jsall].
- - state := optional filter by the state of the device. Must be one of @ACTIVE@, @FAILING@ or @FAILED@ __Type: @String@__
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise is fulfilled with a "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result encapsulating an array of "@DeviceDetails@":#device-details objects corresponding to the current page of results. "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result supports pagination using "@next()@":/docs/api/realtime-sdk/types#paginated-result and "@first()@":/docs/api/realtime-sdk/types#paginated-result methods.
-
- On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[objc,swift].
- h4. Callback result
-
- On success, @resultPage@ contains a "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result encapsulating an array of "@DeviceDetails@":#device-details objects corresponding to the current page of results. "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result supports pagination using "@next()@":/docs/api/realtime-sdk/types#paginated-result and "@first()@":/docs/api/realtime-sdk/types#paginated-result methods.
-
- On failure to retrieve the devices, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-blang[ruby].
- h4. Returns
-
- A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method.
-
- On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yield a "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result that encapsulates an array of "@DeviceDetails@":#device-details corresponding to the current page of results. "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result supports pagination using "@next()@":/docs/api/realtime-sdk/types#paginated-result and "@first()@":/docs/api/realtime-sdk/types#paginated-result methods.
-
- Failure to retrieve the devices will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-h6(#device-save).
- default: save
-
-bq(definition).
- default: save("DeviceDetails":#device-details device, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "DeviceDetails":#device-details device))
- jsall: save("DeviceDetails":#device-details deviceDetails): Promise<"DeviceDetails":#device-details>
- ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable save("DeviceDetails":#device-details device) -> yields "DeviceDetails":#device-details
- python: "DeviceDetails":#device-details save("DeviceDetails":#device-details device_details)
- php: "DeviceDetails":#device-details save("DeviceDetails":#device-details deviceDetails)
- swift,objc: save(deviceDetails: "DeviceDetails":#device-details, callback: (("DeviceDetails":#device-details?, ARTErrorInfo?) -> Void))
- java,android: "DeviceDetails":#device-details save("DeviceDetails":#device-details deviceDetails)
-
-Register a new @DeviceDetails@ object, or update an existing @DeviceDetails@ object with the Ably service. Requires @push-admin@ permission or @push-subscribe@ permission together with device authentication matching the requested @deviceId@.
-
-h4. Parameters
-
-- device deviceDetails := a "@DeviceDetails@":#device-details object
-
-- &block
:= yields the new @DeviceDetails@ object upon success
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise is fulfilled with a "@DeviceDetails@":#device-details object representing the newly registered or updated device. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[swift,objc].
- h4. Callback result
-
- On success, @device@ contains the newly registered or updated device as a "@DeviceDetails@":#device-details object.
-
- On failure to create or update the device, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-blang[ruby].
- h4. Returns
-
- A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method.
-
- On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yield the newly registered or updated device as a "@DeviceDetails@":#device-details object.
-
- Failure to create or update the device will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-h6(#device-remove).
- default: remove
-
-bq(definition#device-remove-id).
- default: remove(String deviceId, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err))
- jsall: remove(String deviceId): Promise
- ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable remove(String deviceId)
- python: remove(String device_id)
- php: remove(String deviceId)
- swift,objc: remove(deviceDetails: "DeviceDetails":#device-details, callback: (("DeviceDetails":#device-details?, ARTErrorInfo?) -> Void))
- java,android: "DeviceDetails":#device-details save("DeviceDetails":#device-details deviceDetails)
-
-bq(definition#device-remove-device).
- default: remove("DeviceDetails":#device-details device, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err))
- jsall: remove("DeviceDetails":#device-details deviceDetails): Promise
- ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable remove("DeviceDetails":#device-details device) -> yield
- python: remove("DeviceDetails":#device-details device_details)
- php: remove("DeviceDetails":#device-details deviceDetails)
- swift,objc: remove(deviceDetails: "DeviceDetails":#device-details, callback: ((ARTErrorInfo?) -> Void))
- java,android: "DeviceDetails":#device-details save("DeviceDetails":#device-details deviceDetails)
-
-Remove a device registered for receiving push registrations that matches the @deviceId@ argument, or the @id@ attribute of the provided "@DeviceDetails@":#device-details object. Requires @push-admin@ permission or @push-subscribe@ permission together with device authentication matching the requested @deviceId@.
-
-h4. Parameters
-
-- deviceId := the unique device ID String for the device
-- device deviceDetails := a "@DeviceDetails@":#device-details object containing at a minimum the @deviceId@ of the device
-
-- &block
:= yields upon success
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success to delete the device, the promise resolves. Note that a request to delete a device that does not exist will result in a successful operation. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[swift,objc].
- h4. Callback result
-
- The callback is called upon success or failure to delete the device. Note that a request to delete a device that does not exist will result in a successful operation.
-
- When this operation fails, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-blang[ruby].
- h4. Returns
-
- A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method.
-
- On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method are yielded to. Note that a request to delete a device that does not exist will result in a successful operation.
-
- Failure to delete the device will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-h6(#device-remove-where).
- default: removeWhere
- ruby,python: remove_where
-
-bq(definition).
- default: removeWhere(Object params, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err))
- jsall: removeWhere(Object params): Promise
- ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable remove_where(Hash params) -> yield
- python: remove_where(params=Object)
- php: removeWhere(Array params)
- swift,objc: removeWhere(params: NSDictionary *, callback: (ARTErrorInfo?) -> Void)
- java,android: removeWhere(Param[] params)
-
-Delete all devices matching the params filter. Requires @push-admin@ permission.
-
-h4. Parameters
-
-- params "Param":#param[] params := an object containing the filter parameters as key value pairs as specified below.
-
-- &block
:= yields upon success
-
-h4. @params@ properties
-
-- clientId :client_id := optional filter to restrict to devices associated with that client identifier. Cannot be used with a @deviceId@ @:device_id@ param __Type: @String@__
-- deviceId :device_id := optional filter to restrict to devices associated with that device identifier. Cannot be used with a @clientId@ @:client_id@ param __Type: @String@__
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success to delete the device, the promise resolves. Note that a request that does match any existing devices will result in a successful operation. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[swift,objc].
- h4. Callback result
-
- The callback is called upon success or failure to delete the device. Note that a request that does match any existing devices will result in a successful operation.
-
- When this operation fails, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-blang[ruby].
- h4. Returns
-
- A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method.
-
- On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method are yielded to. Note that a request that does match any existing devices will result in a successful operation.
-
- Failure to delete the device will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-h2(#push-channel-subscriptions). PushChannelSubscriptions object
-
-This object is accessible through @client.push.admin.channelSubscriptions@ @client.push.admin.channel_subscriptions@ and provides an API to subscribe a push notification device to a channel ensuring it receives any push notifications published in the future on that channel. Additionally, this object allows these subscriptions to be retrieved, listed, updated or removed.
-
-h3(#push-channel-subscriptions-methods). Methods
-
-h6(#push-channel-sub-list).
- default: list
-
-bq(definition).
- default: list(Object params, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"PushChannelSubscription":#push-channel-subscription> resultPage))
- jsall: list(Object params): Promise<"PaginatedResult":#paginated-result<"PushChannelSubscription":#push-channel-subscription>>
- ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable list(Hash params) -> yields "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"PushChannelSubscription":#push-channel-subscription>
- python: "PaginatedResult":#paginated-result list(params=Object)
- php: "PaginatedResult":#paginated-result list_(Array params)
- swift,objc: list(params: NSDictionary *, callback: (("ARTPaginatedResult":#paginated-result?, ARTErrorInfo?) -> Void))
- java,android: "PaginatedResult":#paginated-result list(Param[] params)
-
-Retrieve all push channel subscriptions that match the provided params filter as a paginated list of "@PushChannelSubscription@":#push-channel-subscription objects. Each "@PushChannelSubscription@":#push-channel-subscription represents a device or set of devices sharing the same "client identifier":/docs/auth/identified-clients registered to a channel to receive push notifications.
-
-h4. Parameters
-
-- params "Param":#param[] params := an object containing the query parameters as key value pairs as specified below.
-
-- &block
:= yields a @PaginatedResult@ object
-
-h4. @params@ properties
-
-- channel :channel := filter to restrict to subscriptions associated with that @channel@
-- clientId :client_id := optional filter to restrict to devices associated with that client identifier. Cannot be used with a @deviceId@ @:device_id@ param __Type: @String@__
-- deviceId :device_id := optional filter to restrict to devices associated with that device identifier. Cannot be used with a @clientId@ @:client_id@ param __Type: @String@__
-- limit :limit := _100_ maximum number of channel subscriptions per page to retrieve, up to 1,000 __Type: @Integer@__
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise is fulfilled with a "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result encapsulating an array of "@PushChannelSubscription@":#push-channel-subscription objects corresponding to the current page of results. "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result supports pagination using "@next()@":/docs/api/realtime-sdk/types#paginated-result and "@first()@":/docs/api/realtime-sdk/types#paginated-result methods.
-
- On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[swift,objc].
- h4. Callback result
-
- On success, @resultPage@ contains a "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result encapsulating an array of "@PushChannelSubscription@":#push-channel-subscription objects corresponding to the current page of results. "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result supports pagination using "@next()@":/docs/api/realtime-sdk/types#paginated-result and "@first()@":/docs/api/realtime-sdk/types#paginated-result methods.
-
- On failure to retrieve the channel subscriptions, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object which contains the failure reason.
-
-blang[ruby].
- h4. Returns
-
- A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method.
-
- On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yield a "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result that encapsulates an array of "@PushChannelSubscription@":#push-channel-subscription corresponding to the current page of results. "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result supports pagination using "@next()@":/docs/api/realtime-sdk/types#paginated-result and "@first()@":/docs/api/realtime-sdk/types#paginated-result methods.
-
- Failure to retrieve the channel subscriptions will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-h6(#push-channel-sub-list-channels).
- default: listChannels
- ruby,python: list_channels
-
-bq(definition).
- default: listChannels(Object params, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result resultPage))
- jsall: listChannels(Object params): Promise<"PaginatedResult":#paginated-result>
- ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable list_channels(Hash params) -> yields "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result
- python: "PaginatedResult":#paginated-result list_channels(params=Object)
- php: "PaginatedResult":#paginated-result listChannels(Array params)
- swift,objc: listChannels(params: NSDictionary *, callback: (("ARTPaginatedResult":#paginated-result?, ARTErrorInfo?) -> Void))
- java,android: "PaginatedResult":#paginated-result listChannels(Param[] params)
-
-Retrieve a list of channels that have at least one device "subscribed to push notifications":/docs/push/publish#sub-channels as a paginated list of channel name @String@ objects. Requires @push-admin@ permission.
-
-h4. Parameters
-
-- params "Param":#param[] params := an object containing the query parameters as key value pairs as specified below.
-
-- &block
:= yields a @PaginatedResult@ object
-
-h4. @params@ properties
-
-- limit :limit := _100_ maximum number of channels per page to retrieve, up to 1,000 __Type: @Integer@__
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise is fulfilled with a "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result encapsulating an array of channel name @String@ values corresponding to the current page of results. "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result supports pagination using "@next()@":/docs/api/realtime-sdk/types#paginated-result and "@first()@":/docs/api/realtime-sdk/types#paginated-result methods.
-
- On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[swift,objc].
- h4. Callback result
-
- On success, @resultPage@ contains a "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result encapsulating an array of channel name @String@ values corresponding to the current page of results. "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result supports pagination using "@next()@":/docs/api/realtime-sdk/types#paginated-result and "@first()@":/docs/api/realtime-sdk/types#paginated-result methods.
-
- On failure to retrieve the channels, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-blang[ruby].
- h4. Returns
-
- A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method.
-
- On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yield a "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result that encapsulates an array of channel name @String@ values corresponding to the current page of results. "@PaginatedResult@":/docs/api/realtime-sdk/types#paginated-result supports pagination using "@next()@":/docs/api/realtime-sdk/types#paginated-result and "@first()@":/docs/api/realtime-sdk/types#paginated-result methods.
-
- Failure to retrieve the channels will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-h6(#push-channel-sub-save).
- default: save
-
-bq(definition).
- default: save("PushChannelSubscription":#push-channel-subscription channelSubscription, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PushChannelSubscription":#push-channel-subscription channelSubscription))
- jsall: save("PushChannelSubscription":#push-channel-subscription subscription): Promise<"PushChannelSubscription":#push-channel-subscription>
- ruby: save("PushChannelSubscription":#push-channel-subscription channel_subscription)
- python: "PushChannelSubscription":#push-channel-subscription save("PushChannelSubscription":#push-channel-subscription channel_subscription)
- php: "PushChannelSubscription":#push-channel-subscription save("PushChannelSubscription":#push-channel-subscription channelSubscription)
- swift,objc: save(channelSubscription: "PushChannelSubscription":#push-channel-subscription, callback: (("PushChannelSubscription":#push-channel-subscription?, ARTErrorInfo?) -> Void))
- java,android: "PushChannelSubscription":#push-channel-subscription save("PushChannelSubscription":#push-channel-subscription channelSubscription)
-
-Subscribe a device or group of devices sharing a "client identifier":/docs/auth/identified-clients for push notifications published on a channel.
-
-h4. Parameters
-
-- channelSubscription subscription channel_subscription := a "@PushChannelSubscription@":#push-channel-subscription object
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise is fulfilled with a "@PushChannelSubscription@":#push-channel-subscription object representing the newly subscribed or updated push channel subscription. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[swift,objc].
- h4. Callback result
-
- On success, @channelSubscription@ contains the newly subscribed or updated push channel subscription as a "@PushChannelSubscription@":#push-channel-subscription object.
-
- On failure to create or update the channel subscription, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-h6(#push-channel-sub-remove).
- default: remove
-
-bq(definition).
- default: remove("PushChannelSubscription":#push-channel-subscription channelSubscription, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err))
- jsall: remove("PushChannelSubscription":#push-channel-subscription subscription): Promise
- ruby: remove("PushChannelSubscription":#push-channel-subscription channel_subscription)
- python: remove("PushChannelSubscription":#push-channel-subscription channel_subscription)
- php: remove("PushChannelSubscription":#push-channel-subscription subscription)
- swift,objc: remove(channelSubscription: "PushChannelSubscription":#push-channel-subscription, callback: ((ARTErrorInfo?) -> Void))
- java,android: void save("PushChannelSubscription":#push-channel-subscription channelSubscription)
-
-Unsubscribe a device or group of devices sharing a "client identifier":/docs/auth/identified-clients from push notifications on a channel. Requires @push-admin@ permission or, in the case of a subscription associated with a given @deviceId@, @push-subscribe@ permission together with device authentication matching that @deviceId@.
-
-h4. Parameters
-
-- channelSubscription subscription channel_subscription := a "@PushChannelSubscription@":#push-channel-subscription object
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success to unsubscribe, the promise resolves. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[swift,objc].
- h4. Callback result
-
- The callback is called upon success or failure to unsubscribe. Note that a request to unsubscribe or remove a subscription that does not exist will result in a successful operation.
-
- When this operation fails, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-h6(#push-channel-sub-remove-where).
- default: removeWhere
- ruby,python: remove_where
-
-bq(definition).
- default: removeWhere(Object params, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err))
- jsall: removeWhere(Object params): Promise
- ruby: remove_where(Hash params)
- python: remove_where(params=Object)
- php: removeWhere(Array params)
- swift,objc: removeWhere(params: NSDictionary *, callback: (ARTErrorInfo?) -> Void)
- java,android: removeWhere(Param[] params)
-
-Delete all push channel subscriptions matching the @params@ filter. Requires @push-admin@ permission.
-
-h4. Parameters
-
-- params "Param":#param[] params := an object containing the filter parameters as key value pairs as specified below.
-
-h4. @params@ properties
-
-- channel :channel := filter to restrict to subscriptions associated with that @channel@
-- clientId :client_id := optional filter to restrict to devices associated with that client identifier. Cannot be used with @deviceId@ @:device_id@ param __Type: @String@__
-- deviceId :device_id := optional filter to restrict to devices associated with that device identifier. Cannot be used with @clientId@ @:client_id@ param __Type: @String@__
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success to unsubscribe, the promise resolves. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[swift,objc].
- h4. Callback result
-
- The callback is called upon success or failure to unsubscribe. Note that a request to unsubscribe or remove a subscription that does not exist will result in a successful operation.
-
- When this operation fails, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
diff --git a/content/partials/types/_push_channel.textile b/content/partials/types/_push_channel.textile
deleted file mode 100644
index d5d2653ab8..0000000000
--- a/content/partials/types/_push_channel.textile
+++ /dev/null
@@ -1,100 +0,0 @@
-A @PushChannel@ is a property of a "@RealtimeChannel@":/docs/api/realtime-sdk/channels#properties or "@RestChannel@":/docs/api/rest-sdk/channels#properties. It provides "push devices":/docs/push the ability to subscribe and unsubscribe to push notifications on channels.
-
-h4. Methods
-
-h6(#subscribe-device).
- default: subscribeDevice
-
-bq(definition).
- default: subscribeDevice()
- jsall: subscribeDevice(): Promise
-
-Subscribe your device to the channel's push notifications.
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise resolves. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-h6(#subscribe-client).
- default: subscribeClient
-
-bq(definition).
- default: subscribeClient()
- jsall: subscribeClient(): Promise
-
-"Subscribe all devices associated with your device's clientId":/docs/push/publish#sub-channels to the channel's push notifications.
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise resolves. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-h6(#unsubscribe-device).
- default: unsubscribeDevice
-
-bq(definition).
- default: unsubscribeDevice()
- jsall: unsubscribeDevice(): Promise
-
-Unsubscribe your device from the channel's push notifications.
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise resolves. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-h6(#unsubscribe-client).
- default: unsubscribeClient
-
-bq(definition).
- default: unsubscribeClient()
- jsall: unsubscribeClient(): Promise
-
-"Unsubscribe all devices associated with your device's clientId":/docs/push/publish#sub-channels from the channel's push notifications.
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise resolves. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-h6(#list-subscriptions).
- default: listSubscriptions
-
-bq(definition).
- jsall: listSubscriptions(Record params?): Promise<"PaginatedResult":#paginated-result<"PushChannelSubscription":#push-channel-subscription>>;
- java,android: "PaginatedResult":#paginated-result<"PushChannelSubscription":#push-channel-subscription> listSubscriptions(String deviceId, String clientId, String deviceClientId, String channel)
- objc,swift: listSubscriptions(deviceId: String?, clientId: String?, deviceClientId: String?, `channel: String?, callback: ("ARTPaginatedResult":#paginated-result<"PushChannelSubscription":#push-channel-subscription>?, ARTErrorInfo?) -> Void)
-
-Lists push subscriptions on a channel specified by its channel name (@channel@). These subscriptions can be either be a list of client (@clientId@) subscriptions, device (@deviceId@) subscriptions, or if @concatFilters@ is set to @true@, a list of both. This method requires clients to have the "Push Admin capability":push#push-admin. For more information, see @GET main.realtime.ably.net/push/channelSubscriptions@ "Rest API":/docs/api/rest-api.
-
-h4. Parameters
-
-- deviceId := a deviceId to filter by __Type: @String@__
-
-- clientId := a clientId to filter by __Type: @String@__
-
-- deviceClientId := a client ID associated with a device to filter by __Type: @String@__
-
-- callback
:= called with a "ARTPaginatedResult":#paginated-result<"PushChannelSubscription":/docs/api/realtime-sdk/push-admin#push-channel-subscription> object or an error
-
-- params
:= An optional object containing key-value pairs to filter subscriptions by. Can contain @clientId@, @deviceId@ or a combination of both, and a @limit@ on the number of subscriptions returned, up to 1,000 __Type: @Record@__
-
-blang[jsall].
- h4. Returns
-
- Returns a promise. On success, the promise is fulfilled with "@PaginatedResult@":#paginated-result which encapsulates an array of "PushChannelSubscription":#push-channel-subscription objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods. On failure, the promise is rejected with an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object that details the reason why it was rejected.
-
-blang[objc,swift].
- h4. Callback result
-
- On success, @resultPage@ contains a "@PaginatedResult@":#paginated-result encapsulating an array of "PushChannelSubscription":/docs/api/realtime-sdk/push-admin#push-channel-subscription objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next()@":#paginated-result and "@first()@":#paginated-result methods.
-
- On failure to retrieve message history, @err@ contains an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the failure reason.
-
-blang[java,android].
- h4. Returns
-
- On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "PushChannelSubscription":#push-channel-subscription objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods.
-
- Failure to retrieve the message history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception
diff --git a/content/partials/types/_push_channel_subscription.textile b/content/partials/types/_push_channel_subscription.textile
deleted file mode 100644
index 7679031cff..0000000000
--- a/content/partials/types/_push_channel_subscription.textile
+++ /dev/null
@@ -1,56 +0,0 @@
-An @PushChannelSubscription@ is a type encapsulating the subscription of a device or group of devices sharing a "client identifier":/docs/auth/identified-clients to a channel in order to receive push notifications.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-- channel := the channel that this push notification subscription is associated with __Type: @String@__
-
-- deviceId device_id := the device with this identifier is linked to this channel subscription. When present, @clientId@ @client_id@ is never present __Type: @String@__
-
-- clientId client_id := devices with this "client identifier":/docs/auth/identified-clients are included in this channel subscription. When present, @deviceId@ @device_id@ is never present __Type: @String@__
-
-blang[jsall].
-
-blang[default].
- h3.
- default: PushChannelSubscription constructors
-
- h6(#push-channel-subscription-for-device).
- default: PushChannelSubscription.forDevice
- ruby: PushChannelSubscription.for_device
-
- bq(definition).
- default: PushChannelSubscription.forDevice(String channel, String deviceId) -> PushChannelSubscription
- ruby: PushChannelSubscription.for_device(String channel, String device_id) -> PushChannelSubscription
-
- A static factory method to create a @PushChannelSubscription@ object for a channel and single device.
-
- h4. Parameters
-
- - channel := channel name linked to this push channel subscription __Type: @String@__
- - deviceId device_id := the device with this identifier will be linked with this push channel subscription __Type: @String@__
-
- h4. Returns
-
- A "@PushChannelSubscription@":/docs/api/realtime-sdk/types#push-channel-subscription object
-
- h6(#push-channel-subscription-for-client-id).
- default: PushChannelSubscription.forClient
- ruby: PushChannelSubscription.for_client
-
- bq(definition).
- default: PushChannelSubscription.forClient(String channel, String clientId) -> PushChannelSubscription
- ruby: PushChannelSubscription.for_client(String channel, String client_id) -> PushChannelSubscription
-
- A static factory method to create a @PushChannelSubscription@ object for a channel and group of devices sharing a "client identifier":/docs/auth/identified-clients.
-
- h4. Parameters
-
- - channel := channel name linked to this push channel subscription __Type: @String@__
- - clientId client_id := devices with this "client identifier":/docs/auth/identified-clients are included in the new push channel subscription __Type: @String@__
-
- h4. Returns
-
- A @PushChannelSubscription@ object
diff --git a/content/partials/types/_push_device.textile b/content/partials/types/_push_device.textile
deleted file mode 100644
index 28f761170a..0000000000
--- a/content/partials/types/_push_device.textile
+++ /dev/null
@@ -1,51 +0,0 @@
-h2(#push-object). Push Device object
-
-This object is accessible through @client.push@ and provides to "push-compatible devices":/docs/push :
-
-h3. Methods
-
-h6(#activate).
- default: activate
-
-bq(definition).
- android: void activate()
- objc,swift: activate(callback: ("ARTErrorInfo":/docs/api/realtime-sdk/types#error-info?, DeviceDetails?) -> Void)
- jsall: activate(registerCallback?("DeviceDetails":/docs/api/realtime-sdk/types#device-details device, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info | null err, "DeviceDetails":/docs/api/realtime-sdk/types#device-details result)), updateFailedCallback?("ErrorInfo":/docs/api/realtime-sdk/types#error-info | null err)): Promise
-
-blang[default].
- Register the device for push. When the "activation process":/docs/push/configure/device#activate-devices is completed, Ably will send a broadcast through the application's "@LocalBroadcastManager@":https://developer.android.com/reference/android/support/v4/content/LocalBroadcastManager. Success or failure will be broadcast through @io.ably.broadcast.PUSH_ACTIVATE@ call the @(void)didActivateAblyPush:(nullable ARTErrorInfo *)error@ @didActivateAblyPush(error: ARTErrorInfo?)@ method from the @ARTPushRegistererDelegate@ .
-
-blang[jsall].
- "Activates the device":/docs/push/configure/web#activate-browsers for push notifications. Subsequently registers the device with Ably and stores the @deviceIdentityToken@ in local storage.
-
- h4. Parameters
-
- - registerCallback := An optional function passed to override the default implementation to register the local device for push activation__Type: @Callable@__
-
- - updateFailedCallback := An optional callback to be invoked when the device registration failed to update __Type: @Callable@__
-
- h4. Returns
-
- Returns a promise. On successful device activation, the promise resolves. On failure, the promise is rejected with an "@ErrorInfo@":#error-info object that details the reason why it was rejected.
-
-h6(#deactivate).
- default: deactivate
-
-bq(definition).
- android: void deactivate()
- objc,swift: deactivate(deregisterCallback: ("ARTErrorInfo":/docs/api/realtime-sdk/types#error-info?, deviceId: String?) -> Void)
- jsall: deactivate(deregisterCallback?("DeviceDetails":/docs/api/realtime-sdk/types#device-details device, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info | null err, String result))): Promise
-
-blang[default].
- Deregister the device for push. When the deactivation process is completed, Ably will send a broadcast through the application's "@LocalBroadcastManager@":https://developer.android.com/reference/android/support/v4/content/LocalBroadcastManager. Success or failure will be broadcast through @io.ably.broadcast.PUSH_DEACTIVATE@ call the @(void)didDeactivateAblyPush:(nullable ARTErrorInfo *)error@ @didDeactivateAblyPush(error: ARTErrorInfo?)@ method from the@ARTPushRegistererDelegate@ .
-
-blang[jsall].
- Deactivates the device from receiving push notifications.
-
- h4. Parameters
-
- - deregisterCallback := An optional function passed to override the default implementation to deregister the local device for push activation__Type: @Callable@__
-
- h4. Returns
-
- Returns a promise. On successful device deactivation, the promise resolves. On failure, the promise is rejected with an "@ErrorInfo@":#error-info object that details the reason why it was rejected.
diff --git a/content/partials/types/_realtime_client_options.textile b/content/partials/types/_realtime_client_options.textile
deleted file mode 100644
index 0258dd4e79..0000000000
--- a/content/partials/types/_realtime_client_options.textile
+++ /dev/null
@@ -1,22 +0,0 @@
-- queueMessages QueueMessages :queue_messages := _true_ If false, this disables the default behavior whereby the library queues messages on a connection in the disconnected or connecting states. The default behavior allows applications to submit messages immediately upon instancing the library without having to wait for the connection to be established. Applications may use this option to disable queueing if they wish to have application-level control over the queueing under those conditions __Type: @Boolean@__
-
-- echoMessages EchoMessages :echo_messages := _true_ If false, prevents messages originating from this connection being echoed back on the same connection __Type: @Boolean@__
-
-- autoConnect AutoConnect :auto_connect := _true_ By default as soon as the client library is instantiated it will connect to Ably. You can optionally set this to false and explicitly connect to Ably when require using the "@connect@":/docs/api/realtime-sdk/connection#connect method __Type: @Boolean@__
-
-- recover
:= This option allows a connection to inherit the state of a previous connection that may have existed under a different instance of the Realtime library. This might typically be used by clients of the browser library to ensure connection state can be preserved when the user refreshes the page. A recovery key string can be explicitly provided, or alternatively if a callback function is provided, the client library will automatically persist the recovery key between page reloads and call the callback when the connection is recoverable. The callback is then responsible for confirming whether the connection should be recovered or not. See "connection state recovery":/docs/connect/states for further information __Type: @String@, @Callable@__
-
-- closeOnUnload
:= _true_ When true, the client library will automatically send a close request to Ably whenever the @window beforeunload@ event fires. By enabling this option, the close request sent to Ably ensures the connection state will not be retained and all channels associated with the connection will be detached. This is commonly used by developers who want presence leave events to fire immediately i.e. if a user navigates to another page or closes their browser, then enabling this option will result in the presence member leaving immediately. Without this option or an explicit call to the "@close@":/docs/api/realtime-sdk/connection#close method of the "@Connection object@":/docs/api/realtime-sdk/connection, Ably expects that the abruptly disconnected connection could later be recovered and therefore does not immediately remove the user from presence. Instead, to avoid "twitchy" presence behavior an abruptly disconnected client is removed from channels in which they are present after 15 seconds, and the connection state is retained for two minutes __Type: @Boolean@__
-
-- recover Recover :recover
:= This option allows a connection to inherit the state of a previous connection that may have existed under a different instance of the library by providing that connection's "@recoveryKey@":/docs/api/realtime-sdk/connection#recovery-key "@recovery_key@":/docs/api/realtime-sdk/connection#recovery-key . This might typically be used by clients of an app to ensure connection state can be preserved following a reload. See "connection state recovery":/docs/connect/states for further information and example code __Type: @String@__
-
-- queryTime QueryTime :query_time := _false_ If true, the library will query the Ably servers for the current time when "issuing TokenRequests":/docs/auth/token instead of relying on a locally-available time of day. Knowing the time accurately is needed to create valid signed Ably "TokenRequests":/docs/api/realtime-sdk/authentication#request-token, so this option is useful for library instances on auth servers where for some reason the server clock cannot be kept synchronized through normal means, such as an "NTP daemon":https://en.wikipedia.org/wiki/Ntpd . The server is queried for the current time once per client library instance (which stores the offset from the local clock), so if using this option you should avoid instancing a new version of the library for each request. __Type: @Boolean@__
-
-- defaultTokenParams DefaultTokenParams :default_token_params := When a "TokenParams":/docs/api/realtime-sdk/types#token-params object is provided, it will override the client library defaults when issuing new Ably Tokens or Ably TokenRequests __Type: "@TokenParams@":/docs/api/realtime-sdk/types#token-params__
-
-- disconnectedRetryTimeout DisconnectedRetryTimeout :disconnected_retry_timeout := _15,000ms 15s _ When the connection enters the @DISCONNECTED@ state, after this delay in milliseconds in seconds as a @NSTimeInterval@ , if the state is still @DISCONNECTED@, the client library will attempt to reconnect automatically __Type: @Integer@ @NSTimeInterval@ __
-
-- suspendedRetryTimeout SuspendedRetryTimeout :suspended_retry_timeout := _30,000ms 30s _ When the connection enters the @SUSPENDED@ state, after this delay in milliseconds in seconds as a @NSTimeInterval@ , if the state is still @SUSPENDED@, the client library will attempt to reconnect automatically __Type: @Integer@ @NSTimeInterval@ __
-
-blang[jsall].
- - pushServiceWorkerUrl := A URL pointing to a service worker script which is used as the target for web push notifications __Type: @String@__
diff --git a/content/partials/types/_realtime_client_options_intro.textile b/content/partials/types/_realtime_client_options_intro.textile
deleted file mode 100644
index 818462e4c0..0000000000
--- a/content/partials/types/_realtime_client_options_intro.textile
+++ /dev/null
@@ -1,12 +0,0 @@
-blang[jsall].
- @ClientOptions@ is a plain JavaScript object and is used in the @Ably.Realtime@ constructor's @options@ argument. The following attributes can be defined on the object:
-
-blang[ruby].
- @ClientOptions@ is a Hash object and is used in the @Ably::Realtime@ constructor's @options@ argument. The following key symbol values can be added to the Hash:
-
-blang[php].
- @ClientOptions@ is a associative array and is used in the @Ably\AblyRealtime@ constructor's @options@ argument. The following named keys and values can be added to the associative array:
-
-blang[java,objc,swift,csharp,go,flutter].
- @ART@ @ClientOptions@ is used in the @AblyRealtime@ constructor's @options@ argument.
-
diff --git a/content/partials/types/_rest_client_options.textile b/content/partials/types/_rest_client_options.textile
deleted file mode 100644
index 38609231e7..0000000000
--- a/content/partials/types/_rest_client_options.textile
+++ /dev/null
@@ -1,3 +0,0 @@
-- queryTime QueryTime :query_time query_time := _false_ If true, the library will query the Ably servers for the current time when "issuing TokenRequests":/docs/auth/token instead of relying on a locally-available time of day. Knowing the time accurately is needed to create valid signed Ably "TokenRequests":/docs/api/rest-sdk/authentication#token-request, so this option is useful for library instances on auth servers where for some reason the server clock cannot be kept synchronized through normal means, such as an "NTP daemon":https://en.wikipedia.org/wiki/Ntpd . The server is queried for the current time once per client library instance (which stores the offset from the local clock), so if using this option you should avoid instancing a new version of the library for each request. __Type: @Boolean@__
-
-- defaultTokenParams default_token_params :default_token_params DefaultTokenParams := When a "TokenParams":/docs/api/rest-sdk/types#token-params object is provided, it will override the client library defaults when issuing new "Ably Tokens":/docs/api/realtime-sdk/authentication#token-details or "Ably @TokenRequests@":/docs/api/rest-sdk/authentication#token-request __Type: "@TokenParams@":/docs/api/rest-sdk/types#token-params__
diff --git a/content/partials/types/_rest_client_options_intro.textile b/content/partials/types/_rest_client_options_intro.textile
deleted file mode 100644
index 810b3d2d22..0000000000
--- a/content/partials/types/_rest_client_options_intro.textile
+++ /dev/null
@@ -1,14 +0,0 @@
-blang[jsall].
- @ClientOptions@ is a plain JavaScript object and is used in the @Ably.Rest@ constructor's @options@ argument. The following attributes can be defined on the object:
-
-blang[ruby].
- @ClientOptions@ is a Hash object and is used in the @Ably::Rest@ constructor's @options@ argument. The following key symbol values can be added to the Hash:
-
-blang[php].
- @ClientOptions@ is a associative array and is used in the @Ably\AblyRest@ constructor's @options@ argument. The following named keys and values can be added to the associative array:
-
-blang[java,objc,swift,csharp,go].
- @ART@ @ClientOptions@ is used in the @AblyRest@ constructor's @options@ argument.
-
-blang[flutter].
- @ably.ClientOptions@ is used in the @ably.Rest@ constructor's @options@ named argument
diff --git a/content/partials/types/_stats.textile b/content/partials/types/_stats.textile
deleted file mode 100644
index 62ea980410..0000000000
--- a/content/partials/types/_stats.textile
+++ /dev/null
@@ -1,37 +0,0 @@
-A @Stats@ object represents an application's statistics for the specified interval and time period. Ably aggregates statistics globally for all accounts and applications, and makes these available both through our "statistics API":/docs/metadata-stats/stats as well as your "application dashboard":https://ably.com/dashboard.
-
-
-
-Please note that most attributes of the @Stats@ type below contain references to further stats types. This documentation is not exhaustive for all stats types, and as such, links to the stats types below will take you to the "Ruby library stats documentation":https://www.rubydoc.info/gems/ably/Ably/Models/Stats which contains exhaustive stats documentation. Ruby and Python however uses @under_score@ case instead of the default @camelCase@ in most languages, so please bear that in mind.
-
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
- python: Keyword arguments
-
-blang[default].
- - unit := the length of the interval that this statistic covers, such as @:minute@, @:hour@, @:day@, @:month@ @Minute@, @Hour@, @Day@, @Month@ @StatGranularityDay@, @StatGranularityMonth@ @'minute'@, @'hour'@, @'day'@, @'month'@ . __Type: "@Stats::GRANULARITY@":https://www.rubydoc.info/gems/ably/Ably/Models/Stats#GRANULARITY-constant "@StatsIntervalGranularity@":/docs/api/realtime-sdk/types#stats-granularity enum @ARTStatsGranularity@ @String@ __
- - interval_granularity intervalGranularity
:= Deprecated alias for @unit@; scheduled to be removed in version 2.x client library versions. __Type: "@Stats::GRANULARITY@":https://www.rubydoc.info/gems/ably/Ably/Models/Stats#GRANULARITY-constant "@StatsIntervalGranularity@":/docs/api/realtime-sdk/types#stats-granularity enum @ARTStatsGranularity@ @String@ __
- - intervalId interval_id IntervalId := the UTC time at which the time period covered by this @Stats@ object starts. For example, an interval ID value of "2018-03-01:10" in a @Stats@ object whose @unit@ is @day@ would indicate that the period covered is "2018-03-01:10 .. 2018-03-01:11". All @Stats@ objects, except those whose @unit@ is @minute@, have an interval ID with resolution of one hour and the time period covered will always begin and end at a UTC hour boundary. For this reason it is not possible to infer the @unit@ by looking at the resolution of the @intervalId@. @Stats@ objects covering an individual minute will have an interval ID indicating that time; for example "2018-03-01:10:02". __Type: @String@__
- - interval_time IntervalTime
:= A @Time@ @DateTime@ @DateTimeOffset@ object representing the parsed @intervalId@ @interval_id@ @IntervalId@ (the UTC time at which the time period covered by this @Stats@ object starts) __Type: @Time@ @DateTime@ @DateTimeOffset@ __
- - all All := aggregate count of both @inbound@ and @outbound@ message stats __Type: "@MessageTypes@":https://www.rubydoc.info/gems/ably/Ably/Models/Stats/MessageTypes__
- - apiRequests api_requests ApiRequests := breakdown of API requests received via the Ably REST API __Type: "@RequestCount@":https://www.rubydoc.info/gems/ably/Ably/Models/Stats/RequestCount__
- - channels Channels := breakdown of channel related stats such as min, mean and peak channels __Type: "@ResourceCount@":https://www.rubydoc.info/gems/ably/Ably/Models/Stats/ResourceCount__
- - connections Connections := breakdown of connection related stats such as min, mean and peak connections for TLS and non-TLS connections __Type: "@ConnectionTypes@":https://www.rubydoc.info/gems/ably/Ably/Models/Stats/ConnectionTypes__
- - inbound Inbound := statistics such as count and data for all inbound messages received over REST and Realtime connections, organized into normal channel messages or presence messages __Type: "@MessageTraffic@":https://www.rubydoc.info/gems/ably/Ably/Models/Stats/MessageTraffic__
- - outbound Outbound := statistics such as count and data for all outbound messages retrieved via REST history requests, received over Realtime connections, or pushed with Webhooks, organized into normal channel messages or presence messages __Type: "@MessageTraffic@":https://www.rubydoc.info/gems/ably/Ably/Models/Stats/MessageTraffic__
- - persisted Persisted := messages persisted and later retrieved via the "history API":/docs/storage-history/history __Type: "@MessageTypes@":https://www.rubydoc.info/gems/ably/Ably/Models/Stats/MessageTypes__
- - tokenRequests token_requests TokenRequests := breakdown of Ably Token requests received via the Ably REST API. __Type: "@RequestCount@":https://www.rubydoc.info/gems/ably/Ably/Models/Stats/RequestCount__
- - push Push := Detailed stats on push notifications, see "our Push documentation":/push for more details __Type: @PushStats@__
-
-blang[jsall].
- - appId := the ID of the Ably application the statistics relate to. __Type: @String@__
- - entries := The statistics for the requested time interval and time period. The @schema@ property provides further information __Type: @Partial>@__
- - inProgress := Optional. For entires that are still in progress, such as the current month, the last sub-interval included in the stats entry. In the format @yyyy-mm-dd:hh:mm:ss@ __Type: @String@__
- - intervalId := The UTC time period that the stats coverage begins at. If @unit@ was requested as @minute@ this will be in the format @YYYY-mm-dd:HH:MM@, if @hour@ it will be @YYYY-mm-dd:HH@, if @day@ it will be @YYYY-mm-dd:00@ and if @month@ it will be @YYYY-mm-01:00@ __Type: @String@__
- - schema := The URL of a JSON schema describing the structure of the @Stats@ object __Type: @String@__
-
-
-
diff --git a/content/partials/types/_stats_granularity.textile b/content/partials/types/_stats_granularity.textile
deleted file mode 100644
index d61f1bbe35..0000000000
--- a/content/partials/types/_stats_granularity.textile
+++ /dev/null
@@ -1,45 +0,0 @@
-blang[jsall].
- @StatsIntervalGranularity@ is an enum specifying the granularity of a "@Stats interval@":/docs/api/rest-sdk/statistics#stats-type.
-
- ```[javascript]
- const StatsIntervalGranularity = [
- 'minute',
- 'hour',
- 'day',
- 'month'
- ]
- ```
-
-blang[swift,objc].
- @ARTStatsGranularity@ is an enum specifying the granularity of a "@ARTStats interval@":/docs/api/rest-sdk/statistics#stats-type.
-
- ```[objc]
- typedef NS_ENUM(NSUInteger, ARTStatsGranularity) {
- ARTStatsGranularityMinute,
- ARTStatsGranularityHour,
- ARTStatsGranularityDay,
- ARTStatsGranularityMonth
- };
- ```
-
- ```[swift]
- enum ARTStatsGranularity : UInt {
- case Minute
- case Hour
- case Day
- case Month
- }
- ```
-
-blang[csharp].
- @StatsIntervalGranularity@ is an enum specifying the granularity of a "@Stats interval@":/docs/api/rest-sdk/statistics#stats-type.
-
- ```[csharp]
- public enum StatsIntervalGranularity
- {
- Minute,
- Hour,
- Day,
- Month
- }
- ```
diff --git a/content/partials/types/_stats_request_params.textile b/content/partials/types/_stats_request_params.textile
deleted file mode 100644
index bbbd613b12..0000000000
--- a/content/partials/types/_stats_request_params.textile
+++ /dev/null
@@ -1,10 +0,0 @@
-@StatsRequestParams@ is a type that encapsulates the parameters for a stats query. For example usage see "@Realtime#stats@ @Realtime#Stats@ ":/docs/metadata-stats/stats.
-
-h4. Members
-
-- Start := _null_ The start of the queried interval __Type: @DateTimeOffset@__
-- End := _null_ The end of the queried interval __Type: @DateTimeOffset@__
-- Limit := _null_ By default it is null. Limits the number of items returned by history or stats __Type: @Integer@__
-- Direction := _Backwards_ Enum which is either @Forwards@ or @Backwards@ __Type: @Direction@ enum__
-- Unit := _Minute_ @Minute@, @Hour@, @Day@ @Month@. Based on the unit selected, the given start or end times are rounded down to the start of the relevant interval depending on the unit granularity of the query __Type: "@StatsIntervalGranularity@":/docs/api/realtime-sdk/types#stats-granularity enum__
-- ExtraParameters := Optionally any extra query parameters that may be passed to the query. This is mainly used internally by the library to manage paging. __Type: @Dictionary@__
diff --git a/content/partials/types/_token_details.textile b/content/partials/types/_token_details.textile
deleted file mode 100644
index 4b2703b9e1..0000000000
--- a/content/partials/types/_token_details.textile
+++ /dev/null
@@ -1,55 +0,0 @@
-@TokenDetails@ is a type providing details of Ably Token string and its associated metadata.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-- token Token := The "Ably Token":/docs/api/realtime-sdk/authentication#token-details itself. A typical "Ably Token":/docs/api/realtime-sdk/authentication#token-details string may appear like @{{TOKEN}}@ __Type: @String@__
-- expires Expires := The time (in milliseconds since the epoch) The time at which this token expires __Type: @Integer@ @Long Integer@ @DateTimeOffset@ @Time@ @NSDate@ __
-- issued Issued := The time (in milliseconds since the epoch) The time at which this token was issued __Type: @Integer@ @Long Integer@ @DateTimeOffset@ @Time@ @NSDate@ __
-- capability Capability := The capability associated with this "Ably Token":/docs/api/realtime-sdk/authentication#token-details. The capability is a a JSON stringified canonicalized representation of the resource paths and associated operations. "Read more about authentication and capabilities":/docs/auth/capabilities __Type: @String@ @Capability@ __
-- clientId client_id ClientId := The client ID, if any, bound to this "Ably Token":/docs/api/realtime-sdk/authentication#token-details. If a client ID is included, then the "Ably Token":/docs/api/realtime-sdk/authentication#token-details authenticates its bearer as that client ID, and the "Ably Token":/docs/api/realtime-sdk/authentication#token-details may only be used to perform operations on behalf of that client ID. The client is then considered to be an "identified client":/docs/auth/identified-clients __Type: @String@__
-
-blang[ruby].
- h3. Methods
-
- - expired? := True when the token has expired __Type: @Boolean@__
-
-blang[python].
- h3. Methods
-
- - is_expired() := True when the token has expired __Type: @Boolean@__
-
-blang[csharp].
- h3. Methods
-
- - IsValidToken() := True if the token has not expired __Type: @Boolean@__
-
-h3.
- default: TokenDetails constructors
-
-h4(#token-details-from-json).
- default: TokenDetails.fromJson
- ruby: TokenDetails.from_json
- flutter: TokenDetails.fromMap
-
-bq(definition).
- default: TokenDetails.fromJson(String json) -> TokenDetails
- ruby: TokenDetails.from_json(String json) -> TokenDetails
- flutter: TokenDetails.fromMap(Map map)
-
-A static factory method named constructor to create a "@TokenDetails@":/docs/api/realtime-sdk/types#token-details from a deserialized @TokenDetails@-like object or a JSON stringified @TokenDetails@ map . This method is provided to minimize bugs as a result of differing types by platform for fields such as @timestamp@ or @ttl@. For example, in Ruby @ttl@ in the @TokenDetails@ object is exposed in seconds as that is idiomatic for the language, yet when serialized to JSON using @to_json@ it is automatically converted to the Ably standard which is milliseconds. By using the @fromJson@ @fromMap@ method when constructing a @TokenDetails@, Ably ensures that all fields are consistently serialized and deserialized across platforms.
-
-h4. Parameters
-
-blang[default].
- - json := a @TokenDetails@-like deserialized object or JSON stringified @TokenDetails@. __Type: @Object, String@__
-
-blang[flutter].
- - map := a @TokenDetails@-like deserialized map. __Type: @Map@__
-
-
-h4. Returns
-
-A "@TokenDetails@":/docs/api/realtime-sdk/types#token-details object
diff --git a/content/partials/types/_token_params.textile b/content/partials/types/_token_params.textile
deleted file mode 100644
index 4ae27b1499..0000000000
--- a/content/partials/types/_token_params.textile
+++ /dev/null
@@ -1,33 +0,0 @@
-blang[jsall].
- @TokenParams@ is a plain JavaScript object and is used in the parameters of "token authentication":/docs/auth/token requests, corresponding to the desired attributes of the "Ably Token":/docs/api/realtime-sdk/authentication#token-details. The following attributes can be defined on the object:
-
-blang[ruby].
- @TokenParams@ is a Hash object and is used in the parameters of "token authentication":/docs/auth/token requests, corresponding to the desired attributes of the "Ably Token":/docs/api/realtime-sdk/authentication#token-details. The following key symbol values can be added to the Hash:
-
-blang[python].
- @TokenParams@ is a Dict and is used in the parameters of "token authentication":/docs/auth/token requests, corresponding to the desired attributes of the "Ably Token":/docs/api/realtime-sdk/authentication#token-details. The following keys-value pairs can be added to the Dict:
-
-blang[php].
- @TokenParams@ is an Associative Array and is used in the parameters of "token authentication":/docs/auth/token requests, corresponding to the desired attributes of the "Ably Token":/docs/api/realtime-sdk/authentication#token-details. The following named keys and values can be added to the Associative Array:
-
-blang[java,csharp].
- @TokenParams@ is used in the parameters of "token authentication":/docs/auth/token requests, corresponding to the desired attributes of the "Ably Token":/docs/api/realtime-sdk/authentication#token-details.
-
-blang[objc,swift].
- @ARTTokenParams@ is used in the parameters of "token authentication":/docs/auth/token requests, corresponding to the desired attributes of the "Ably Token":/docs/api/realtime-sdk/authentication#token-details.
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
- python: Attributes
-
-- capability Capability :capability := JSON stringified capability of the "Ably Token":/docs/api/realtime-sdk/authentication#token-details. If the "Ably Token":/docs/api/realtime-sdk/authentication#token-details request is successful, the capability of the returned "Ably Token":/docs/api/realtime-sdk/authentication#token-details will be the intersection of this capability with the capability of the issuing key. "Find our more about how to use capabilities to manage access privileges for clients":/docs/auth/capabilities. __Type: @String@ @Capability@ __
-
-- clientId ClientId client_id :client_id := A client ID, used for identifying this client when publishing messages or for presence purposes. The @clientId@ @client_id@ @ClientId@ can be any non-empty string. This option is primarily intended to be used in situations where the library is instantiated with a key; note that a @clientId@ @client_id@ @ClientId@ may also be implicit in a token used to instantiate the library; an error will be raised if a @clientId@ @client_id@ @ClientId@ specified here conflicts with the @clientId@ @client_id@ @ClientId@ implicit in the token. "Find out more about client identities":/docs/auth/identified-clients __Type: @String@__
-
-- nonce Nonce :nonce := An optional opaque nonce string of at least 16 characters to ensure uniqueness of this request. Any subsequent request using the same nonce will be rejected. __Type: @String@__
-
-- timestamp Timestamp :timestamp := The timestamp (in milliseconds since the epoch) The timestamp of this request. @timestamp@, in conjunction with the @nonce@, is used to prevent requests for "Ably Token":/docs/api/realtime-sdk/authentication#token-details from being replayed. __Type: @Integer@ @Long Integer@ @Time@ @NSDate@ @DateTimeOffset@ @DateTime@ __
-
-- ttl Ttl :ttl := _1 hour_ Requested time to live for the "Ably Token":/docs/api/realtime-sdk/authentication#token-details being created in milliseconds in seconds as a @NSTimeInterval@ as a @TimeSpan@. When omitted, the Ably REST API default of 60 minutes is applied by Ably __Type: @Integer@ (milliseconds) @Integer@ (seconds) @NSTimeInterval@ @Long Integer@ @TimeSpan@ __
diff --git a/content/partials/types/_token_request.textile b/content/partials/types/_token_request.textile
deleted file mode 100644
index b0f9706aec..0000000000
--- a/content/partials/types/_token_request.textile
+++ /dev/null
@@ -1,41 +0,0 @@
-@TokenRequest@ is a type containing parameters for an Ably @TokenRequest@. "Ably Tokens":/docs/api/realtime-sdk/authentication#token-details are requested using "Auth#requestToken":/docs/api/rest-sdk/authentication#request-token "Auth#request_token":/docs/api/rest-sdk/authentication#request-token
-
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-- keyName key_name KeyName := The key name of the key against which this request is made. The key name is public, whereas the key secret is private __Type: @String@__
-- ttl Ttl := Requested time to live for the "Ably Token":/docs/api/realtime-sdk/authentication#token-details in milliseconds in seconds as a @TimeSpan@ . If the Ably @TokenRequest@ is successful, the TTL of the returned "Ably Token":/docs/api/realtime-sdk/authentication#token-details will be less than or equal to this value depending on application settings and the attributes of the issuing key. __Type: @Integer@ @TimeSpan@ @NSTimeInterval@ __
-- timestamp Timestamp := The timestamp of this request in milliseconds __Type: @Integer@ @Long Integer@ @Time@ @DateTimeOffset@ @NSDate@ __
-- capability Capability := Capability of the requested "Ably Token":/docs/api/realtime-sdk/authentication#token-details. If the Ably @TokenRequest@ is successful, the capability of the returned "Ably Token":/docs/api/realtime-sdk/authentication#token-details will be the intersection of this capability with the capability of the issuing key. The capability is a JSON stringified canonicalized representation of the resource paths and associated operations. "Read more about authentication and capabilities":/docs/auth __Type: @String@__
-- clientId client_id ClientId := The client ID to associate with the requested "Ably Token":/docs/api/realtime-sdk/authentication#token-details. When provided, the "Ably Token":/docs/api/realtime-sdk/authentication#token-details may only be used to perform operations on behalf of that client ID __Type: @String@__
-- nonce Nonce := An opaque nonce string of at least 16 characters __Type: @String@__
-- mac Mac := The Message Authentication Code for this request __Type: @String@__
-
-h3.
- default: TokenRequest constructors
-
-h4(#token-request-from-json).
- default: TokenRequest.fromJson
- ruby: TokenRequest.from_json
- flutter: TokenRequest.fromMap
-
-bq(definition).
- default: TokenRequest.fromJson(String json) -> TokenRequest
- ruby: TokenRequest.from_json(String json) -> TokenRequest
- flutter: TokenRequest.fromMap(Map map)
-
-A static factory method named constructor to create a "@TokenRequest@":/docs/api/realtime-sdk/types#token-request from a deserialized @TokenRequest@-like object or a JSON stringified @TokenRequest@/span>map . This method is provided to minimize bugs as a result of differing types by platform for fields such as @timestamp@ or @ttl@. For example, in Ruby @ttl@ in the @TokenRequest@ object is exposed in seconds as that is idiomatic for the language, yet when serialized to JSON using @to_json@ it is automatically converted to the Ably standard which is milliseconds. By using the @fromJson@ @fromMap@ method when constructing a @TokenRequest@, Ably ensures that all fields are consistently serialized and deserialized across platforms.
-
-h4. Parameters
-
-blang[default].
- - json := a @TokenRequest@-like deserialized object or JSON stringified @TokenRequest@. __Type: @Object, String@__
-
-blang[flutter].
- - map := a @TokenRequest@-like deserialized map. __Type: @Map@__
-
-h4. Returns
-
-A "@TokenRequest@":/docs/api/realtime-sdk/types#token-request object
diff --git a/content/partials/types/_token_revocation_failure_result.textile b/content/partials/types/_token_revocation_failure_result.textile
deleted file mode 100644
index 369e6e3b84..0000000000
--- a/content/partials/types/_token_revocation_failure_result.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @TokenRevocationFailureResult@ contains information about the result of an unsuccessful token revocation request for a single target specifier.
-
-h4.
- default: Properties
-
-- target := The target specifier __Type: @String@__
-
-- error := Describes the reason for which token revocation failed for the given `target` as an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object __Type: "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info__
diff --git a/content/partials/types/_token_revocation_options.textile b/content/partials/types/_token_revocation_options.textile
deleted file mode 100644
index fe57c33c97..0000000000
--- a/content/partials/types/_token_revocation_options.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @TokenRevocationOptions@ describes the additional options accepted by revoke tokens request.
-
-h4.
- default: Properties
-
-- issuedBefore := An optional Unix timestamp in milliseconds where only tokens issued before this time are revoked. The default is the current time. Requests with an @issuedBefore@ in the future, or more than an hour in the past, will be rejected __Type: @Number@__
-
-- allowReauthMargin := _false_ If true, permits a token renewal cycle to take place without needing established connections to be dropped, by postponing enforcement to 30 seconds in the future, and sending any existing connections a hint to obtain (and upgrade the connection to use) a new token. The default is @false@, meaning that the effect is near-immediate. __Type: @Boolean@__
diff --git a/content/partials/types/_token_revocation_success_result.textile b/content/partials/types/_token_revocation_success_result.textile
deleted file mode 100644
index 2cee5a8577..0000000000
--- a/content/partials/types/_token_revocation_success_result.textile
+++ /dev/null
@@ -1,10 +0,0 @@
-A @TokenRevocationSuccessResult@ contains information about the result of a successful token revocation request for a single target specifier.
-
-h4.
- default: Properties
-
-- target := The target specifier __Type: @String@__
-
-- appliesAt := The time at which the token revocation will take effect, as a Unix timestamp in milliseconds __Type: @Number@__
-
-- issuedBefore := A Unix timestamp in milliseconds. Only tokens issued earlier than this time will be revoked __Type: @Number@__
diff --git a/content/partials/types/_token_revocation_target_specifier.textile b/content/partials/types/_token_revocation_target_specifier.textile
deleted file mode 100644
index fbbf9e986d..0000000000
--- a/content/partials/types/_token_revocation_target_specifier.textile
+++ /dev/null
@@ -1,8 +0,0 @@
-A @TokenRevocationTargetSpecifier@ describes which tokens should be affected by a token revocation request.
-
-h4.
- default: Properties
-
-- type := The type of token revocation target specifier. Valid values include @clientId@, @revocationKey@ and @channel@ __Type: @String@__
-
-- value := The value of the token revocation target specifier __Type: @String@__
diff --git a/data/cli-functionality/parser-steps/pre-parser.ts b/data/cli-functionality/parser-steps/pre-parser.ts
index 9ce7b5f28c..abe6266b4d 100644
--- a/data/cli-functionality/parser-steps/pre-parser.ts
+++ b/data/cli-functionality/parser-steps/pre-parser.ts
@@ -1,7 +1,6 @@
import { removeExternalClassFromLinks } from '../../transform/pre-parser/remove-external-class-from-links';
-import { replaceERB } from '../../transform/pre-parser/erbjs';
import { addMinimizedIndent, addMinimizeForHeadings, stripComments } from '../../transform/pre-parser/semantic';
-import { removeNewlinesBeforeClosingTags, recursivelyProcessDivs } from '../../transform/pre-parser';
+import { removeNewlinesBeforeClosingTags } from '../../transform/pre-parser';
import {
addLanguageSupportForBlockQuotes,
addLanguageSupportForGithubStyleCode,
@@ -17,10 +16,6 @@ export const preParserSteps: Step[] = [
{
fn: removeExternalClassFromLinks,
},
- {
- fn: replaceERB,
- description: `Replaces Ruby templating code`,
- },
{
fn: stripComments,
},
@@ -56,8 +51,4 @@ export const preParserSteps: Step[] = [
{
fn: addLanguageSupportForHeadings,
},
- {
- fn: recursivelyProcessDivs,
- description: `Divs across multiple lines pose an issue for textile-js.\nWe detect these divs and process the internal textile separately, marking it as 'notextile' in the process.`,
- },
];
diff --git a/data/cli-functionality/parser-steps/textile-workarounds.ts b/data/cli-functionality/parser-steps/textile-workarounds.ts
deleted file mode 100644
index abec7aa2d7..0000000000
--- a/data/cli-functionality/parser-steps/textile-workarounds.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-import { fixImgTagsWithNewlines } from '../../../data/transform/pre-parser/textile-js-workarounds/fix-html-tags-with-newlines';
-import { fixInlineCode } from '../../../data/transform/pre-parser/textile-js-workarounds/fix-inline-code';
-import { fixLeadingHtmlTags } from '../../../data/transform/pre-parser/textile-js-workarounds/fix-leading-html-tags';
-import {
- fixDuplicateQuoteLinks,
- fixHtmlElementsInLinks,
- fixPunctuationInLinks,
-} from '../../../data/transform/pre-parser/textile-js-workarounds/fix-links';
-import { fixTextileDefinitionLists } from '../../../data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists';
-import { makeImplicitOrderedListExplicit } from '../../../data/transform/pre-parser/textile-js-workarounds/make-implicit-ordered-list-explicit';
-import {
- compressMultipleNewlinesInLists,
- manuallyReplaceHTags,
-} from '../../../data/transform/pre-parser/textile-js-workarounds';
-import { addBoldText } from '../../../data/transform/pre-parser/textile-js-workarounds/add-bold-text';
-import { addItalicisedText } from '../../../data/transform/pre-parser/textile-js-workarounds/add-italicised-text';
-import { Step } from './pre-parser';
-
-export const textileWorkaroundSteps: Step[] = [
- {
- fn: addBoldText,
- },
- {
- fn: addItalicisedText,
- },
- {
- fn: fixHtmlElementsInLinks,
- },
- {
- fn: fixPunctuationInLinks,
- },
- {
- fn: fixDuplicateQuoteLinks,
- },
- {
- fn: fixImgTagsWithNewlines,
- },
- {
- fn: manuallyReplaceHTags,
- },
- {
- fn: makeImplicitOrderedListExplicit,
- },
- {
- fn: compressMultipleNewlinesInLists,
- },
- {
- fn: fixInlineCode,
- },
- {
- fn: fixTextileDefinitionLists,
- },
- {
- fn: fixLeadingHtmlTags,
- },
-];
diff --git a/data/createPages/index.ts b/data/createPages/index.ts
index 08bac2ccba..2e0a694361 100644
--- a/data/createPages/index.ts
+++ b/data/createPages/index.ts
@@ -1,10 +1,6 @@
import path from 'path';
-import textile from 'textile-js';
import { identity } from 'lodash';
import { safeFileExists } from './safeFileExists';
-import { flattenContentOrderedList, maybeRetrievePartial } from '../transform';
-import { postParser } from '../transform/post-parser';
-import { htmlParser } from '../html-parser';
import { createLanguagePageVariants } from './createPageVariants';
import { LATEST_ABLY_API_VERSION_STRING } from '../transform/constants';
import { createContentMenuDataFromPage } from './createContentMenuDataFromPage';
@@ -20,59 +16,6 @@ const documentTemplate = path.resolve(`src/templates/document.tsx`);
const apiReferenceTemplate = path.resolve(`src/templates/apiReference.tsx`);
const examplesTemplate = path.resolve(`src/templates/examples.tsx`);
-interface Edge {
- node: {
- slug: string;
- version?: string;
- contentOrderedList: Array<{
- data: string;
- type: string;
- }>;
- meta?: {
- redirect_from?: string[];
- };
- };
-}
-
-interface DocumentQueryResult {
- allError: {
- nodes: {
- message: string;
- }[];
- };
- allFileHtml: {
- edges: {
- node: {
- slug: string;
- contentOrderedList: {
- data: string;
- type: string;
- }[];
- meta: {
- redirect_from?: string[];
- };
- };
- }[];
- };
-}
-
-interface ApiReferenceQueryResult {
- allFileHtml: {
- edges: {
- node: {
- slug: string;
- contentOrderedList: {
- data: string;
- type: string;
- }[];
- meta: {
- redirect_from?: string[];
- };
- };
- }[];
- };
-}
-
interface ExampleQueryResult {
allExampleFile: {
nodes: {
@@ -102,82 +45,6 @@ interface MdxRedirectsQueryResult {
}
export const createPages: GatsbyNode['createPages'] = async ({ graphql, actions: { createPage, createRedirect } }) => {
- /**
- * It's not ideal to have:
- * * the reusable function `documentCreator` defined inline like this
- * * so much of `documentCreator` being imperative processing of data
- * - but Gatsby throws horrible unrelated errors (from onCreateNode) if
- * you try to extract any of this functionality into an independent composable
- * and testable function.
- */
-
- // DOCUMENT TEMPLATE
- const documentResult = await graphql(`
- query {
- allError {
- nodes {
- message
- }
- }
- allFileHtml(filter: { articleType: { eq: "document" } }) {
- edges {
- node {
- slug
- contentOrderedList {
- data
- type
- }
- meta {
- redirect_from
- }
- }
- }
- }
- }
- `);
-
- /**
- * We could log here, the reason we don't right now is that the error should already have been caught and logged.
- * Because Gatsby spawns a bunch of async processes during the onCreateNode step, though, and errors don't prevent
- * the onCreateNode processes from continuing, the workaround is to create Error nodes and then quit when we get
- * to the next synchronous stage in the Gatsby pipeline if any Error nodes exist.
- * It's an awkward solution and an alternative would be welcome, I'm not sure what we would do instead though.
- * We could log only during createPages and never during onCreateNode, but then if there's an error that does manage
- * to crash Gatsby somehow or the Error Node is broken, we wouldn't see the output.
- *
- * For context:
- * The original ticket here was EDX-21. When I originally detected missing meta descriptions, I wanted to
- * console.warn and continue just so editors could see the error. However it was decided that it should be a
- * requirement to always have a meta description, so the app had to avoid building while still throwing & logging
- * an error when a page didn't have a meta description.
- */
- if (documentResult.data?.allError.nodes && documentResult.data.allError.nodes.length > 0) {
- process.exit(1);
- }
-
- // API REFERENCES TEMPLATE
- const apiReferenceResult = await graphql(`
- query {
- allFileHtml(filter: { articleType: { eq: "apiReference" } }) {
- edges {
- node {
- slug
- contentOrderedList {
- data
- type
- }
- meta {
- redirect_from
- }
- }
- }
- }
- }
- `);
-
- // Query partials used in textile files
- const retrievePartialFromGraphQL = maybeRetrievePartial(graphql);
-
// Query our examples
const examplesResult = await graphql(`
query {
@@ -212,68 +79,6 @@ export const createPages: GatsbyNode['createPages'] = async ({ graphql, actions:
}
`);
- const documentCreator =
- (documentTemplate: string) =>
- async (edge: Edge): Promise => {
- const content = flattenContentOrderedList(
- await Promise.all(edge.node.contentOrderedList.map(retrievePartialFromGraphQL)),
- )
- .map((content: { data: unknown }) => (content.data ? content.data : ''))
- .join('\n');
-
- const postParsedContent = postParser(textile(content));
- const contentOrderedList = htmlParser(postParsedContent);
- const contentMenu = contentOrderedList.map((item) => createContentMenuDataFromPage(item));
- const [languages, contentMenuObject] = createLanguagePageVariants(identity, documentTemplate)(
- contentOrderedList,
- edge.node.slug,
- );
-
- contentMenuObject[DEFAULT_LANGUAGE] = contentMenu;
-
- const slug = edge.node.slug;
- const script = safeFileExists(`static/scripts/${slug}.js`);
- const pagePath = `/docs/${slug}`;
-
- const redirectFromList = edge.node.meta?.redirect_from;
-
- if (redirectFromList) {
- redirectFromList.forEach((redirectFrom) => {
- const redirectFromUrl = new URL(redirectFrom, siteMetadata.siteUrl);
-
- if (!redirectFromUrl.hash) {
- // We need to be prefix aware just like Gatsby's internals so it works
- // with nginx redirects
- writeRedirect(redirectFrom, pagePath);
- }
-
- createRedirect({
- fromPath: redirectFrom,
- toPath: pagePath,
- isPermanent: true,
- force: true,
- redirectInBrowser: true,
- });
- });
- }
-
- createPage({
- path: pagePath,
- component: documentTemplate,
- context: {
- slug,
- version: edge.node.version ?? LATEST_ABLY_API_VERSION_STRING,
- language: DEFAULT_LANGUAGE,
- languages,
- contentOrderedList,
- contentMenu: contentMenuObject,
- script,
- layout: { leftSidebar: true, rightSidebar: true, searchBar: true, template: 'base' },
- },
- });
- return slug;
- };
-
createRedirect({
fromPath: '/',
toPath: '/docs',
@@ -281,14 +86,6 @@ export const createPages: GatsbyNode['createPages'] = async ({ graphql, actions:
redirectInBrowser: true,
});
- if (!documentResult.data) {
- throw new Error('Document result is undefined');
- }
-
- if (!apiReferenceResult.data) {
- throw new Error('API reference result is undefined');
- }
-
if (!mdxRedirectsResult.data) {
throw new Error('MDX redirects result is undefined');
}
@@ -355,8 +152,6 @@ export const createPages: GatsbyNode['createPages'] = async ({ graphql, actions:
};
await Promise.all([
- ...documentResult.data.allFileHtml.edges.map(documentCreator(documentTemplate)),
- ...apiReferenceResult.data.allFileHtml.edges.map(documentCreator(apiReferenceTemplate)),
...examples.map(exampleCreator),
...mdxRedirectsResult.data.allMdx.nodes.map(mdxRedirectCreator),
]);
diff --git a/data/html-parser/remove-children-from-pre-wrapped-code-elements.test.ts b/data/html-parser/remove-children-from-pre-wrapped-code-elements.test.ts
deleted file mode 100644
index ec672de621..0000000000
--- a/data/html-parser/remove-children-from-pre-wrapped-code-elements.test.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import cheerio from 'cheerio';
-import { postParser } from '../transform/post-parser';
-import { preParser } from '../transform/pre-parser';
-import textile from 'textile-js';
-import { removeChildrenFromPreWrappedCodeElements } from './remove-children-from-pre-wrapped-code-elements';
-
-type CheerioMutator = (cheerioNodes: cheerio.Selector) => void;
-
-const loadAndMutateDom = (f: CheerioMutator) => (content: string) => {
- const loadedDom = cheerio.load(content);
- f(loadedDom);
- return loadedDom;
-};
-
-const getDomWithoutChildrenFromPreWrappedCodeElements = loadAndMutateDom(removeChildrenFromPreWrappedCodeElements);
-
-const htmlEnclosedContent = `
- Term
- Definition
- `;
-
-const githubEnclosedContent = postParser(
- textile(
- preParser(`\`\`\`[ruby]
-EventMachine.run do
- ably = Ably::Realtime.new(key: api_key)
-end
-\`\`\``),
- ),
-);
-
-describe('Safely remove children from pre-wrapped code elements', () => {
- it('Removes unwanted HTML elements from code', () => {
- const loadedDom = getDomWithoutChildrenFromPreWrappedCodeElements(htmlEnclosedContent);
- const html = loadedDom('body').html() ?? '';
- expect(html).toBe(`
- Term
- Definition
- `);
- });
- it('Ensures Github code blocks are parsed correctly', () => {
- const loadedDom = getDomWithoutChildrenFromPreWrappedCodeElements(githubEnclosedContent);
- const html = loadedDom('body').html() ?? '';
- expect(html).toBe(`
-EventMachine.run do
- ably = Ably::Realtime.new(key: api_key)
-end
-
- `);
- });
-});
diff --git a/data/onCreateNode/index.ts b/data/onCreateNode/index.ts
index ad1d87fed6..ba36408c91 100644
--- a/data/onCreateNode/index.ts
+++ b/data/onCreateNode/index.ts
@@ -1,5 +1,4 @@
import { GatsbyNode, Node } from 'gatsby';
-import { transformNanocTextiles, makeTypeFromParentType, createNodesFromPath } from '../transform';
export const onCreateNode: GatsbyNode['onCreateNode'] = async ({
node,
@@ -8,34 +7,6 @@ export const onCreateNode: GatsbyNode['onCreateNode'] = async ({
createNodeId,
createContentDigest,
}) => {
- const createChildNode = ({ parent, child }: { parent: Node; child: Node }) => {
- createNode(child);
- createParentChildLink({ parent, child });
- };
-
- if (node.extension === 'textile') {
- const content = await loadNodeContent(node);
- try {
- transformNanocTextiles(node, content, createNodeId(`${node.id} >>> HTML`), makeTypeFromParentType('Html')(node), {
- createContentDigest,
- createNodesFromPath: createNodesFromPath('DocumentPath', { createNode, createNodeId, createContentDigest }),
- createNodeId,
- })(createChildNode);
- } catch (error: unknown) {
- const errorMessage = error instanceof Error ? error.message : String(error);
- const ErrorNode = {
- id: createNodeId(`${errorMessage} >>> Error`),
- message: errorMessage,
- internal: {
- contentDigest: createContentDigest(errorMessage),
- type: 'Error',
- },
- };
- createNode(ErrorNode);
- console.error('Error at relative path:\n', node.relativePath ? `${node.relativePath}\n` : '\n', errorMessage);
- }
- }
-
if (node.sourceInstanceName === 'how-tos') {
// We derive the name of the how-to from the path
const [tutorialName, src, ...paths] = (node.relativePath as string).split('/');
diff --git a/data/test-utilities/process-textile.ts b/data/test-utilities/process-textile.ts
deleted file mode 100644
index 08255a004f..0000000000
--- a/data/test-utilities/process-textile.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { cheerioParser, loadAndAlterHtml } from '../html-parser';
-import { postParser } from '../transform/post-parser';
-import { compose } from 'lodash/fp';
-import textile from 'textile-js';
-import { preParser } from '../transform/pre-parser';
-
-export const textileToHtml = compose(postParser, textile, preParser);
-
-export const textileToCheerio = compose(loadAndAlterHtml, textileToHtml);
-
-export const processTextile = compose((cheerio: cheerio.Cheerio) => cheerio.toArray(), textileToCheerio);
-
-export const fullyParseTextile = compose(cheerioParser, textileToCheerio);
diff --git a/data/textile.d.ts b/data/textile.d.ts
deleted file mode 100644
index 2b5e08511c..0000000000
--- a/data/textile.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-declare module 'textile-js' {
- type TextileFunction = (input: string) => string;
- const textile: TextileFunction;
- export default textile;
-}
diff --git a/data/transform/channel-options.test.ts b/data/transform/channel-options.test.ts
deleted file mode 100644
index 719c37efcd..0000000000
--- a/data/transform/channel-options.test.ts
+++ /dev/null
@@ -1,107 +0,0 @@
-import { textileToHtml } from '../../data/test-utilities/process-textile';
-import { preParser } from './pre-parser';
-
-const dubiousBlangFixture = `
-h4.
- default: Properties
- java: Members
- ruby: Attributes
-
-blang[default].
- - :cipher CipherParams cipher := Requests encryption for this channel when not null, and specifies encryption-related parameters (such as algorithm, chaining mode, key length and key). See "an example":/realtime/encryption#getting-started __Type: "@CipherParams@":/api/realtime-sdk/encryption#cipher-params or an options object containing at a minimum a @key@ or a @Param[]@ list containing at a minimum a @key@ or an options hash containing at a minimum a @key@ or an Associative Array containing at a minimum a @key@ __
-
-blang[jsall,java,swift,objc,csharp].
-- params Params := Optional "parameters":/realtime/channels/channel-parameters/overview which specify behaviour of the channel. __Type: @Map@ @JSON Object@ __
-- cipher CipherParams := Requests encryption for this channel when not null, and specifies encryption-related parameters (such as algorithm, chaining mode, key length and key). See "an example":/api/realtime-sdk/encryption#getting-started __Type: "@CipherParams@":/api/realtime-sdk/encryption#cipher-params or an options object containing at a minimum a @key@ or a @Param[]@ list containing at a minimum a @key@ or an options hash containing at a minimum a @key@ or an Associative Array containing at a minimum a @key@ __
-
-blang[java].
-h4. Static methods
-
-h6(#with-cipher-key). withCipherKey
-
-bq(definition). static ChannelOptions.withCipherKey(Byte[] or String key)
-
-A helper method to generate a @ChannelOptions@ for the simple case where you only specify a key.
-
-h4. Parameters
-
-- key := A binary @Byte[]@ array or a base64-encoded @String@.
-
-h4. Returns
-
-On success, the method returns a complete @ChannelOptions@ object. Failure will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception.`;
-
-describe('Test channel options rendering', () => {
- it('Ensures channel options renders correctly', () => {
- expect(preParser(dubiousBlangFixture)).toMatchInlineSnapshot(`
- "
- Properties Members Attributes
-
-
- {{LANG_BLOCK[default]}}
-
- - :cipher CipherParams cipher := Requests encryption for this channel when not null, and specifies encryption-related parameters (such as algorithm, chaining mode, key length and key). See an example Type: CipherParams or an options object containing at a minimum a key or a Param[] list containing at a minimum a key or an options hash containing at a minimum a key or an Associative Array containing at a minimum a key
-
- {{/LANG_BLOCK}}
-
-
- {{LANG_BLOCK[javascript,nodejs,java,swift,objc,csharp]}}
-
- {{/LANG_BLOCK}}
-
- - params Params := Optional parameters which specify behaviour of the channel.Type: MapJSON Object
- - cipher CipherParams := Requests encryption for this channel when not null, and specifies encryption-related parameters (such as algorithm, chaining mode, key length and key). See an example Type: CipherParams or an options object containing at a minimum a key or a Param[] list containing at a minimum a key or an options hash containing at a minimum a key or an Associative Array containing at a minimum a key
-
-
- {{LANG_BLOCK[java]}}
-
- {{/LANG_BLOCK}}
-
- Static methods
-
- withCipherKey
-
- bq(definition). static ChannelOptions.withCipherKey(Byte[] or String key)
-
- A helper method to generate a ChannelOptions for the simple case where you only specify a key.
-
- Parameters
-
- - key := A binary Byte[] array or a base64-encoded String.
-
- Returns
-
- On success, the method returns a complete ChannelOptions object. Failure will raise an "AblyException":/api/realtime-sdk/types#ably-exception."
- `);
- expect(textileToHtml(dubiousBlangFixture)).toMatchInlineSnapshot(`
- "
Properties Members Attributes
-
-
-
- :cipher CipherParams cipher
- Requests encryption for this channel when not null, and specifies encryption-related parameters (such as algorithm, chaining mode, key length and key). See an example Type: CipherParams or an options object containing at a minimum a key or a Param[] list containing at a minimum a key or an options hash containing at a minimum a key or an Associative Array containing at a minimum a key
-
-
- params Params
- Optional parameters which specify behaviour of the channel.Type: Map<String, String>JSON Object
- cipher CipherParams
- Requests encryption for this channel when not null, and specifies encryption-related parameters (such as algorithm, chaining mode, key length and key). See an example Type: CipherParams or an options object containing at a minimum a key or a Param[] list containing at a minimum a key or an options hash containing at a minimum a key or an Associative Array containing at a minimum a key
-
-
-
-
Static methods
-
withCipherKey
-
- static ChannelOptions.withCipherKey(Byte[] or String key)
-
- A helper method to generate a ChannelOptions for the simple case where you only specify a key.
-
Parameters
-
- key
- A binary Byte[] array or a base64-encoded String.
-
- Returns
- On success, the method returns a complete ChannelOptions object. Failure will raise an AblyException .
"
- `);
- });
-});
diff --git a/data/transform/index.js b/data/transform/index.js
index 3a128c3816..f83b232daf 100644
--- a/data/transform/index.js
+++ b/data/transform/index.js
@@ -93,9 +93,6 @@ const transformNanocTextiles =
return;
}
- if (node.sourceInstanceName === 'textile-partials') {
- content = `${content}\n`;
- }
const preTextileTransform = preParser(content);
const { data, frontmatterMeta } = splitDataAndMetaData(preTextileTransform);
@@ -139,14 +136,8 @@ const transformNanocTextiles =
type,
mediaType: 'text/html',
};
- if (node.sourceInstanceName === 'textile-partials') {
- newNodeInternals.type = `${type}Partial`;
- newNodeData.relativePath = node.relativePath;
- } else {
- createNodesFromPath(node.relativePath.replace(/\.[^/.]+$/, ''));
- // Partials should never have a slug, every other page type needs one.
- newNodeData.slug = slug;
- }
+ createNodesFromPath(node.relativePath.replace(/\.[^/.]+$/, ''));
+ newNodeData.slug = slug;
const htmlNode = {
...newNodeData,
diff --git a/data/transform/parser-enhancements/index.js b/data/transform/parser-enhancements/index.js
index bf5dad7a06..c6d3b44d31 100644
--- a/data/transform/parser-enhancements/index.js
+++ b/data/transform/parser-enhancements/index.js
@@ -1,4 +1,4 @@
-const { addHyphenListSupport } = require('../pre-parser/textile-js-workarounds/add-hyphen-list-support');
+// textile workarounds removed
const { addDates } = require('./add-dates');
const { addSpecAnchorLinks } = require('./spec-anchor-links');
diff --git a/data/transform/pre-parser/__snapshots__/div-format.test.ts.snap b/data/transform/pre-parser/__snapshots__/div-format.test.ts.snap
deleted file mode 100644
index b98fa5bbf1..0000000000
--- a/data/transform/pre-parser/__snapshots__/div-format.test.ts.snap
+++ /dev/null
@@ -1,830 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Ensure that divs show up correctly in all cases Ensures that divs show up correctly 6`] = `
-[
-
-
-
-
-
- subscribe(String name, listener(
-
- Message
-
- ))
-
-
- void subscribe(String name,
-
- MessageListener
-
- listener)
-
-
- void Subscribe(string name, Action<
-
- Message
-
- > handler)
-
-
- subscribe(String name) → yields
-
- Message
-
-
-
- subscribe(name: String, callback: (
-
- ARTMessage
-
- ) → Void) -> ARTEventListener?
-
-
- subscribe(name: String, callback: (
-
- ARTMessage
-
- ) → Void) -> ARTEventListener?
-
-
- StreamSubscription<
-
- ably.Message
-
- > subscribe(name: String).listen((
-
- ably.Message
-
- ) → void)
-
-
-
-
- ,
-
- Subscribe to messages with a given event
-
- name
-
- on this channel. The caller supplies
-
- a listener function
-
-
- a lambda expression
-
-
- an implementation of the
-
- MessageListener
-
- interface
-
-
- a block
-
- , which is called each time one or more matching messages arrives on the channel.
-
,
-
,
-
,
-
,
-
-
-
-
- subscribe(String[] names, listener(
-
- Message
-
- ))
-
-
- void subscribe(String[] names,
-
- MessageListener
-
- listener)
-
-
- subscribe(String *names) → yields
-
- Message
-
-
-
- StreamSubscription<
-
- ably.Message
-
- > subscribe(names: List<String>).listen((
-
- ably.Message
-
- ) → void)
-
-
-
-
- Subscribe a single listener to messages on this channel for multiple event
-
- name
-
- values.
-
-
,
-]
-`;
-
-exports[`Ensure that divs show up correctly in all cases Ensures that divs show up correctly 7`] = `
-[
- {
- "attribs": {
- "class": "definition",
- "id": "subscribe-event",
- },
- "data": [
- {
- "data": "
-",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "class": "definition",
- },
- "data": [
- {
- "attribs": {
- "lang": "default",
- },
- "data": [
- {
- "data": "subscribe(String name, listener(",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message",
- },
- "data": [
- {
- "data": "Message",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": "))",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "java",
- },
- "data": [
- {
- "data": "void subscribe(String name, ",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message-listener",
- },
- "data": [
- {
- "data": "MessageListener",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": " listener)",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "csharp",
- },
- "data": [
- {
- "data": "void Subscribe(string name, Action<",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message",
- },
- "data": [
- {
- "data": "Message",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": "> handler)",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "ruby",
- },
- "data": [
- {
- "data": "subscribe(String name) → yields ",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message",
- },
- "data": [
- {
- "data": "Message",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "swift",
- },
- "data": [
- {
- "data": "subscribe(name: String, callback: (",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message",
- },
- "data": [
- {
- "data": "ARTMessage",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": ") → Void) -> ARTEventListener?",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "objc",
- },
- "data": [
- {
- "data": "subscribe(name: String, callback: (",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message",
- },
- "data": [
- {
- "data": "ARTMessage",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": ") → Void) -> ARTEventListener?",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "flutter",
- },
- "data": [
- {
- "data": "StreamSubscription<",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message",
- },
- "data": [
- {
- "data": "ably.Message",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": "> subscribe(name: String).listen((",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message",
- },
- "data": [
- {
- "data": "ably.Message",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": ") → void)",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- ],
- "name": "p",
- "type": "tag",
- },
- {
- "data": "
-",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "blockquote",
- "type": "tag",
- },
- {
- "attribs": {},
- "data": [
- {
- "data": "Subscribe to messages with a given event ",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {},
- "data": [
- {
- "data": "name",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "code",
- "type": "tag",
- },
- {
- "data": " on this channel. The caller supplies ",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "lang": "default",
- },
- "data": [
- {
- "data": "a listener function",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "csharp",
- },
- "data": [
- {
- "data": "a lambda expression",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "java",
- },
- "data": [
- {
- "data": "an implementation of the ",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message-listener",
- },
- "data": [
- {
- "data": "MessageListener",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": " interface",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "ruby",
- },
- "data": [
- {
- "data": "a block",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "data": ", which is called each time one or more matching messages arrives on the channel.",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "p",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "csharp",
- },
- "data": [],
- "name": "div",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "swift",
- },
- "data": [],
- "name": "div",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "objc",
- },
- "data": [],
- "name": "div",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "default",
- },
- "data": [
- {
- "attribs": {
- "class": "definition",
- "id": "subscribe-event-array",
- },
- "data": [
- {
- "attribs": {
- "class": "definition",
- },
- "data": [
- {
- "attribs": {
- "lang": "default",
- },
- "data": [
- {
- "data": "subscribe(String[] names, listener(",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message",
- },
- "data": [
- {
- "data": "Message",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": "))",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "java",
- },
- "data": [
- {
- "data": "void subscribe(String[] names, ",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message-listener",
- },
- "data": [
- {
- "data": "MessageListener",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": " listener)",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "ruby",
- },
- "data": [
- {
- "data": "subscribe(String *names) → yields ",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message",
- },
- "data": [
- {
- "data": "Message",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- {
- "attribs": {
- "lang": "flutter",
- },
- "data": [
- {
- "data": "StreamSubscription<",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message",
- },
- "data": [
- {
- "data": "ably.Message",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": "> subscribe(names: List).listen((",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {
- "href": "#message",
- },
- "data": [
- {
- "data": "ably.Message",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "a",
- "type": "tag",
- },
- {
- "data": ") → void)",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "span",
- "type": "tag",
- },
- ],
- "name": "p",
- "type": "tag",
- },
- ],
- "name": "blockquote",
- "type": "tag",
- },
- {
- "attribs": {},
- "data": [
- {
- "data": "Subscribe a single listener to messages on this channel for multiple event ",
- "name": "text",
- "type": "text",
- },
- {
- "attribs": {},
- "data": [
- {
- "data": "name",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "code",
- "type": "tag",
- },
- {
- "data": " values.",
- "name": "text",
- "type": "text",
- },
- ],
- "name": "p",
- "type": "tag",
- },
- ],
- "name": "div",
- "type": "tag",
- },
-]
-`;
diff --git a/data/transform/pre-parser/div-format.test.ts b/data/transform/pre-parser/div-format.test.ts
deleted file mode 100644
index 9f5cb0788c..0000000000
--- a/data/transform/pre-parser/div-format.test.ts
+++ /dev/null
@@ -1,132 +0,0 @@
-import { compose } from 'lodash/fp';
-import textile from 'textile-js';
-import { preParser, recursivelyProcessDivs, removeNewlinesBeforeClosingTags } from '.';
-import { fullyParseTextile, processTextile, textileToHtml } from '../../../data/test-utilities/process-textile';
-import { replaceERB } from './erbjs';
-import {
- addLanguageSupportForBlockQuotes,
- addLanguageSupportForGithubStyleCode,
- addLanguageSupportForHeadings,
- convertBlangBlocksToTokens,
- convertJSAllToNodeAndJavaScript,
- duplicateLanguageBlocks,
- enforceWhiteSpaceLevelsBetweenLanguageElements,
-} from './language';
-import { addMinimizedIndent, addMinimizeForHeadings, stripComments } from './semantic';
-import { textileJSCompatibility } from './textile-js-workarounds';
-
-const misbehavingDivFixture = `
-
-bq(definition#subscribe-event).
- default: subscribe(String name, listener("Message":#message))
- java: void subscribe(String name, "MessageListener":#message-listener listener)
- csharp: void Subscribe(string name, Action<"Message":#message> handler)
- ruby: subscribe(String name) → yields "Message":#message
- objc,swift: subscribe(name: String, callback: ("ARTMessage":#message) -> Void) -> ARTEventListener?
- flutter: StreamSubscription<"ably.Message":#message> subscribe(name: String).listen(("ably.Message":#message) -> void)
-
-Subscribe to messages with a given event @name@ on this channel. The caller supplies a listener function a lambda expression an implementation of the "MessageListener":#message-listener interface a block , which is called each time one or more matching messages arrives on the channel.
-
-
-
-
-bq(definition#subscribe-event-array).
- default: subscribe(String[] names, listener("Message":#message))
- java: void subscribe(String[] names, "MessageListener":#message-listener listener)
- ruby: subscribe(String *names) → yields "Message":#message
- flutter: StreamSubscription<"ably.Message":#message> subscribe(names: List).listen(("ably.Message":#message) -> void)
-
-Subscribe a single listener to messages on this channel for multiple event @name@ values.
-
-
-`;
-
-const processedHtml = processTextile(misbehavingDivFixture);
-const cheerioFinal = fullyParseTextile(misbehavingDivFixture);
-describe('Ensure that divs show up correctly in all cases', () => {
- it('Ensures that divs show up correctly', () => {
- expect(recursivelyProcessDivs(misbehavingDivFixture)).toMatchInlineSnapshot(`
- "
-
- bq(definition#subscribe-event).
- default: subscribe(String name, listener("Message":#message))
- java: void subscribe(String name, "MessageListener":#message-listener listener)
- csharp: void Subscribe(string name, Action<"Message":#message> handler)
- ruby: subscribe(String name) → yields "Message":#message
- objc,swift: subscribe(name: String, callback: ("ARTMessage":#message) -> Void) -> ARTEventListener?
- flutter: StreamSubscription<"ably.Message":#message> subscribe(name: String).listen(("ably.Message":#message) -> void)
-
- Subscribe to messages with a given event @name@ on this channel. The caller supplies a listener function a lambda expression an implementation of the "MessageListener":#message-listener interface a block , which is called each time one or more matching messages arrives on the channel.
-
-
- subscribe(String[] names, listener(Message )) void subscribe(String[] names, MessageListener listener) subscribe(String *names) → yields Message StreamSubscription<ably.Message > subscribe(names: List<String>).listen((ably.Message ) → void)
Subscribe a single listener to messages on this channel for multiple event name values.
-
- "
- `);
- const partialPreParser = compose(
- // Textile compatibility must follow all other changes
- textileJSCompatibility,
- recursivelyProcessDivs,
- // Language operations
- addLanguageSupportForHeadings,
- addLanguageSupportForBlockQuotes,
- enforceWhiteSpaceLevelsBetweenLanguageElements,
- duplicateLanguageBlocks,
- addLanguageSupportForGithubStyleCode,
- convertBlangBlocksToTokens,
- convertJSAllToNodeAndJavaScript,
- // Readability/Semantic operations
- addMinimizedIndent,
- addMinimizeForHeadings,
- stripComments,
- removeNewlinesBeforeClosingTags,
- // ERB to JS
- replaceERB,
- );
-
- expect(partialPreParser(misbehavingDivFixture)).toMatchInlineSnapshot(`
- "
-
- bq(definition#subscribe-event). subscribe(String name, listener(Message )) void subscribe(String name, MessageListener listener) void Subscribe(string name, Action<Message > handler) subscribe(String name) → yields Message subscribe(name: String, callback: (ARTMessage ) -> Void) -> ARTEventListener? StreamSubscription<ably.Message > subscribe(name: String).listen((ably.Message ) -> void)
-
-
- Subscribe to messages with a given event name on this channel. The caller supplies a listener function a lambda expression an implementation of the MessageListener interface a block , which is called each time one or more matching messages arrives on the channel.
-
-
- subscribe(String[] names, listener(Message )) void subscribe(String[] names, MessageListener listener) subscribe(String *names) → yields Message StreamSubscription<ably.Message > subscribe(names: List<String>).listen((ably.Message ) → void)
Subscribe a single listener to messages on this channel for multiple event name values.
-
- "
- `);
- expect(preParser(misbehavingDivFixture)).toMatchInlineSnapshot(`
- "
-
- bq(definition#subscribe-event). subscribe(String name, listener(Message )) void subscribe(String name, MessageListener listener) void Subscribe(string name, Action<Message > handler) subscribe(String name) → yields Message subscribe(name: String, callback: (ARTMessage ) -> Void) -> ARTEventListener? StreamSubscription<ably.Message > subscribe(name: String).listen((ably.Message ) -> void)
-
-
- Subscribe to messages with a given event name on this channel. The caller supplies a listener function a lambda expression an implementation of the MessageListener interface a block , which is called each time one or more matching messages arrives on the channel.
-
-
- subscribe(String[] names, listener(Message )) void subscribe(String[] names, MessageListener listener) subscribe(String *names) → yields Message StreamSubscription<ably.Message > subscribe(names: List<String>).listen((ably.Message ) → void)
Subscribe a single listener to messages on this channel for multiple event name values.
-
- "
- `);
- expect(textile(preParser(misbehavingDivFixture))).toMatchInlineSnapshot(`
- "
- subscribe(String name, listener(Message )) void subscribe(String name, MessageListener listener) void Subscribe(string name, Action<Message > handler) subscribe(String name) → yields Message subscribe(name: String, callback: (ARTMessage ) → Void) -> ARTEventListener? StreamSubscription<ably.Message > subscribe(name: String).listen((ably.Message ) → void)
-
- Subscribe to messages with a given event name on this channel. The caller supplies a listener function a lambda expression an implementation of the MessageListener interface a block , which is called each time one or more matching messages arrives on the channel.
-
- subscribe(String[] names, listener(Message )) void subscribe(String[] names, MessageListener listener) subscribe(String *names) → yields Message StreamSubscription<ably.Message > subscribe(names: List<String>).listen((ably.Message ) → void)
Subscribe a single listener to messages on this channel for multiple event name values.
"
- `);
- expect(textileToHtml(misbehavingDivFixture)).toMatchInlineSnapshot(`
- "
- subscribe(String name, listener(Message )) void subscribe(String name, MessageListener listener) void Subscribe(string name, Action<Message > handler) subscribe(String name) → yields Message subscribe(name: String, callback: (ARTMessage ) → Void) -> ARTEventListener? StreamSubscription<ably.Message > subscribe(name: String).listen((ably.Message ) → void)
-
- Subscribe to messages with a given event name on this channel. The caller supplies a listener function a lambda expression an implementation of the MessageListener interface a block , which is called each time one or more matching messages arrives on the channel.
-
- subscribe(String[] names, listener(Message )) void subscribe(String[] names, MessageListener listener) subscribe(String *names) → yields Message StreamSubscription<ably.Message > subscribe(names: List<String>).listen((ably.Message ) → void)
Subscribe a single listener to messages on this channel for multiple event name values.
"
- `);
- expect(processedHtml).toMatchSnapshot();
- expect(cheerioFinal).toMatchSnapshot();
- });
-});
diff --git a/data/transform/pre-parser/erbjs/README.md b/data/transform/pre-parser/erbjs/README.md
deleted file mode 100644
index f29a167731..0000000000
--- a/data/transform/pre-parser/erbjs/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# ERB in JS
-
-This is a section of the app that manages a very limited subset of ERB functionality.
-
-The ERB-JS folder will not transpile Ruby code or render arbitrary code.
-
-It recognises & works with only very specific strings:
-
-1. ```<%= JsBins.url_for('${quote}') %>```
-2. ```<%= Ably::DOCUMENTATION_LANGUAGES.map { |lang_id, lang| "@#{lang_id}@" }.join(', ') %>```
-3. ```<% @items.select { |d| d[:section] == '${design-patterns|tutorials}' }.sort_by { |d| d[:title] }.each do |item| %>\n"<%= html_escape(item[:title]) %>":<%= html_escape(item.path) %><% end %>```
-4. ```<% ['👦', ${...emojis}].each do |emoji| %><%= emoji %> <% end %>```
-
-## Alternatives
-
-If a need comes up for proper ERB support in the future, here are some options that were considered but caused too many delays in the initial implementation:
-
-1. Parsing out tokens and registering JavaScript functionality to them manually
-1. Transpiling the Ruby snippets using Opal's opal-parser.js library
-
-The reason these are complicated are because:
-
-1. Parsing out tokens:
- 1. Parsing out tokens requires keeping track of scope
- 2. Requires a small DSL to manage the tokens in between JS and Ruby
-2. Transpiling snippets directly:
- 1. ERB can still be nested, so some level of recursive interpretation is necessary
- 2. Many of the dependent variables are implicitly available because of Rails' magic, so they are not easy to access without transpiling all the Ruby & Rails code.
diff --git a/data/transform/pre-parser/erbjs/emoji.test.js b/data/transform/pre-parser/erbjs/emoji.test.js
deleted file mode 100644
index ce00b08b33..0000000000
--- a/data/transform/pre-parser/erbjs/emoji.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const { emojiReplacer } = require('./emojis');
-
-describe('Makes sure that the emoji type of ERB is correctly replaced', () => {
- it('replaces an ERB attempting to render emoji with specific HTML', () => {
- const sampleText = `
- Avatar:
- <% ['👦', '👧', '👨', '👩', '😺'].each do |emoji| %>
- <%= emoji %>
- <% end %>
-
- Tip: select a new avatar at any time to change it. This will update your presence data.
-`;
- const expectedResult = `
- Avatar:
- 👦
-👧
-👨
-👩
-😺
-
- Tip: select a new avatar at any time to change it. This will update your presence data.
-`;
- expect(emojiReplacer(sampleText)).toBe(expectedResult);
- });
-});
diff --git a/data/transform/pre-parser/erbjs/emojis.js b/data/transform/pre-parser/erbjs/emojis.js
deleted file mode 100644
index 6fa81460c6..0000000000
--- a/data/transform/pre-parser/erbjs/emojis.js
+++ /dev/null
@@ -1,19 +0,0 @@
-const emojiRegex =
- /<% \[(.*?)\]\.each do \|emoji\| %>\s*<%= emoji %><\/span><\/label>\s*<% end %>/g;
-
-const emojiReplacer = (content) =>
- content.replace(emojiRegex, (_match, emojis) =>
- emojis
- .split(', ')
- .map(
- (emojiWithQuotes) => {
- const cleanedEmoji = emojiWithQuotes.replace(/^'(.*)'$/, '$1');
- return `${cleanedEmoji} `;
- }
- )
- .join('\n'),
- );
-
-module.exports = {
- emojiReplacer,
-};
\ No newline at end of file
diff --git a/data/transform/pre-parser/erbjs/index.js b/data/transform/pre-parser/erbjs/index.js
deleted file mode 100644
index eaf7093231..0000000000
--- a/data/transform/pre-parser/erbjs/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const { compose } = require('lodash/fp');
-const { emojiReplacer } = require('./emojis');
-const { itemReplacer } = require('./item-select');
-const { languageReplacer } = require('./language-map');
-
-const replaceERB = compose(emojiReplacer, languageReplacer, itemReplacer);
-
-module.exports = {
- replaceERB,
-};
diff --git a/data/transform/pre-parser/erbjs/item-select.js b/data/transform/pre-parser/erbjs/item-select.js
deleted file mode 100644
index a9272fee4c..0000000000
--- a/data/transform/pre-parser/erbjs/item-select.js
+++ /dev/null
@@ -1,8 +0,0 @@
-const itemRegex =
- /<% @items\.select \{ \|d\| d\[:section\] == '(.*?)' \}\.sort_by \{ \|d\| d\[:title\] \}\.each do \|item\| %>.* "<%= html_escape\(item\[:title\]\) %>":<%= html_escape\(item\.path\) %><% end %>/gs;
-
-const itemReplacer = (content) => content.replace(itemRegex, 'Section ');
-
-module.exports = {
- itemReplacer,
-};
diff --git a/data/transform/pre-parser/erbjs/item-select.test.js b/data/transform/pre-parser/erbjs/item-select.test.js
deleted file mode 100644
index e1e3ae9593..0000000000
--- a/data/transform/pre-parser/erbjs/item-select.test.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const { itemReplacer } = require('./item-select');
-
-describe('Ensure section content menu pages are replaced with an a element to act as a placeholder, hydrated later', () => {
- it('Successfully replaces menu page "item" ERB content with a placeholder', () => {
- const sampleText = `<% @items.select { |d| d[:section] == 'design-patterns' }.sort_by { |d| d[:title] }.each do |item| %>
- * "<%= html_escape(item[:title]) %>":<%= html_escape(item.path) %><% end %>`;
- const expectedResult = `Section `;
- expect(itemReplacer(sampleText)).toBe(expectedResult);
- });
-});
diff --git a/data/transform/pre-parser/erbjs/language-map.js b/data/transform/pre-parser/erbjs/language-map.js
deleted file mode 100644
index 0587f370bf..0000000000
--- a/data/transform/pre-parser/erbjs/language-map.js
+++ /dev/null
@@ -1,37 +0,0 @@
-const DOCUMENTATION_LANGUAGES = [
- 'javascript',
- 'react',
- 'java',
- 'android',
- 'kotlin',
- 'python',
- 'php',
- 'ruby',
- 'nodejs',
- 'typescript',
- 'objc',
- 'swift',
- 'go',
- 'csharp',
- 'cplusplus',
- 'flutter',
- 'c',
- 'css',
- 'appcelerator',
- 'phonegap',
- 'curl',
- 'html',
- 'json',
- 'xml',
- 'sh',
- 'yaml',
-];
-
-const languageRegex = /<%= Ably::DOCUMENTATION_LANGUAGES.map { \|lang_id, lang\| "@#{lang_id}@" }\.join\(', '\) %>/g;
-
-const languageReplacer = (content) =>
- content.replace(languageRegex, DOCUMENTATION_LANGUAGES.map((lang) => `@${lang}@`).join(', '));
-
-module.exports = {
- languageReplacer,
-};
diff --git a/data/transform/pre-parser/erbjs/language-map.test.js b/data/transform/pre-parser/erbjs/language-map.test.js
deleted file mode 100644
index 70ecf3e5fe..0000000000
--- a/data/transform/pre-parser/erbjs/language-map.test.js
+++ /dev/null
@@ -1,9 +0,0 @@
-const { languageReplacer } = require('./language-map');
-
-describe('Converts language list ERB to a list of languages', () => {
- it('Converts a real example of a language list ERB to a list of languages', () => {
- const sampleText = `For all code blocks, a language in lowercase must be specified. Languages currently supported are <%= Ably::DOCUMENTATION_LANGUAGES.map { |lang_id, lang| "@#{lang_id}@" }.join(', ') %>. A code block must be prefixed and suffixed with a line break, and must use the following syntax:`;
- const expectedResult = `For all code blocks, a language in lowercase must be specified. Languages currently supported are @javascript@, @react@, @java@, @android@, @kotlin@, @python@, @php@, @ruby@, @nodejs@, @typescript@, @objc@, @swift@, @go@, @csharp@, @cplusplus@, @flutter@, @c@, @css@, @appcelerator@, @phonegap@, @curl@, @html@, @json@, @xml@, @sh@, @yaml@. A code block must be prefixed and suffixed with a line break, and must use the following syntax:`;
- expect(languageReplacer(sampleText)).toBe(expectedResult);
- });
-});
diff --git a/data/transform/pre-parser/index.ts b/data/transform/pre-parser/index.ts
index 0b4efbd74b..f65f112483 100644
--- a/data/transform/pre-parser/index.ts
+++ b/data/transform/pre-parser/index.ts
@@ -1,6 +1,4 @@
import { compose } from 'lodash/fp';
-import textile from 'textile-js';
-import { replaceERB } from './erbjs';
import {
convertJSAllToNodeAndJavaScript,
convertBlangBlocksToTokens,
@@ -11,23 +9,12 @@ import {
addLanguageSupportForHeadings,
} from './language';
import { stripComments, addMinimizeForHeadings, addMinimizedIndent } from './semantic';
-import { textileJSCompatibility } from './textile-js-workarounds';
-// Newlines before closing tags inhibit textile-js' ability to correctly parse HTML
+// Newlines before closing tags can affect HTML parsing
export const removeNewlinesBeforeClosingTags: StringTransformation = (content) =>
content.replace(/\n+(<\/\w+>)/g, '$1');
-// Jest has difficulty with resolving recursively-composed functions from different files
-// so we define this textile-js-workaround here.
-export const recursivelyProcessDivs: StringTransformation = (content) =>
- content.replace(/\n]*?)>\n(.*?)<\/div>/gms, (_match, p1, p2) => {
- return `\n
${textile(preParser(p2)).replace(/\n/g, '')}
`;
- });
-
export const preParser = compose(
- // Textile compatibility must follow all other changes
- textileJSCompatibility,
- recursivelyProcessDivs,
// Language operations
addLanguageSupportForHeadings,
addLanguageSupportForBlockQuotes,
@@ -41,6 +28,4 @@ export const preParser = compose(
addMinimizeForHeadings,
removeNewlinesBeforeClosingTags,
stripComments,
- // ERB to JS
- replaceERB,
);
diff --git a/data/transform/pre-parser/language/blang-conversions.test.ts b/data/transform/pre-parser/language/blang-conversions.test.ts
index 357d1e5e8f..20f206af45 100644
--- a/data/transform/pre-parser/language/blang-conversions.test.ts
+++ b/data/transform/pre-parser/language/blang-conversions.test.ts
@@ -1,4 +1,4 @@
-import textile from 'textile-js';
+// textile-js removed
import { convertBlangBlocksToTokens, convertJSAllToNodeAndJavaScript } from '.';
import { preParser } from '..';
import {
@@ -76,19 +76,7 @@ describe('Converts specific example blang blocks to HTML', () => {
"
`);
- expect(textile(preParser(brokenCodeInsideBlangExample)))
- .toBe(`
{{LANG_BLOCK [javascript,nodejs]}}
-
-realtime.connection.on('connected', function(stateChange) {
- console.log('Ably is connected');
-});
-{{{github_br}}}
-
-realtime.connection.on('connected', function(stateChange) {
- console.log('Ably is connected');
-});
-{{{github_br}}}
-
{{/LANG_BLOCK }}
`);
+ // textile() call removed - textile-js no longer used
});
});
diff --git a/data/transform/pre-parser/textile-js-workarounds/README.md b/data/transform/pre-parser/textile-js-workarounds/README.md
deleted file mode 100644
index 9d3368ffff..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Textile Workarounds
-
-This folder is for functions that _only_ exist to workaround limitations of textile-js, or differences between textile-js and the Ruby implementation(s) of textile parsers.
-
-Some other workarounds exist elsewhere in the codebase, for example in [white-space.js](../language/white-space.js). These will be commented separately.
-
-All tests relating to ensuring the quirks of textile-js are accounted for are included here, please feel free to move them if you feel they would be more appropriate elsewhere.
-
-`workarounds.raw.examples.js` contains useful examples that might throw up problematic HTML when parsed by textile.
\ No newline at end of file
diff --git a/data/transform/pre-parser/textile-js-workarounds/add-bold-text.test.ts b/data/transform/pre-parser/textile-js-workarounds/add-bold-text.test.ts
deleted file mode 100644
index 2902e567d2..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/add-bold-text.test.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { default as fc } from 'fast-check';
-import { addBoldText } from './add-bold-text';
-
-const stringWithoutAsterisks = fc.string().map((s) => s.replaceAll('*', ''));
-
-describe('Textile bold text is replaced correctly with a
element', () => {
- it('Wraps textile bold text in a element', () => {
- expect(addBoldText(`**Type: String**`)).toBe(`Type: String `);
- });
- it('Wraps any text that has no asterisks in a element', () => {
- fc.assert(
- fc.property(stringWithoutAsterisks, (a) => expect(addBoldText(`**${a}**`)).toBe(`${a} `)),
- );
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/add-bold-text.ts b/data/transform/pre-parser/textile-js-workarounds/add-bold-text.ts
deleted file mode 100644
index 923d910950..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/add-bold-text.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// textile-js has difficulty adding bolded text in certain circumstances, particularly near (but not wrapped in!) elements.
-// NB: this is not just a textile workaround.
-export const addBoldText = (content: string): string => content.replace(/\*\*(.*?)\*\*/gm, '$1 ');
diff --git a/data/transform/pre-parser/textile-js-workarounds/add-hyphen-list-support.test.ts b/data/transform/pre-parser/textile-js-workarounds/add-hyphen-list-support.test.ts
deleted file mode 100644
index 92a0f6f31b..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/add-hyphen-list-support.test.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { addHyphenListSupport } from './add-hyphen-list-support';
-
-describe('Add support for hyphen-led lists in textile-js', () => {
- it('Replaces hyphens followed by at least one space with asterisks followed by at least one space', () => {
- expect(
- addHyphenListSupport(
- `- Item one
-- Item two
-- Item three`,
- ),
- ).toBe(`* Item one
-* Item two
-* Item three`);
- });
- it('Replaces hyphens in a real world example', () => {
- expect(
- addHyphenListSupport(
- `- *Active traffic management*: Let Ably actively monitor not only the global cluster health but also your own endpoints and proactively take steps to isolate or move traffic to ensure business continuity.
-- *Dedicated, isolated clusters*: Rely upon guaranteed capacity and isolation from noisy neighbors.
-- *Regional routing of traffic*: Require that all traffic is routed and serviced within specific regions.
-- *Regional message storage*: Require that all messages are stored within a specific region.`,
- ),
- )
- .toBe(`* *Active traffic management*: Let Ably actively monitor not only the global cluster health but also your own endpoints and proactively take steps to isolate or move traffic to ensure business continuity.
-* *Dedicated, isolated clusters*: Rely upon guaranteed capacity and isolation from noisy neighbors.
-* *Regional routing of traffic*: Require that all traffic is routed and serviced within specific regions.
-* *Regional message storage*: Require that all messages are stored within a specific region.`);
- });
- it('Does not affect definition lists', () => {
- expect(
- addHyphenListSupport(`- *Active traffic management*:= Let Ably actively monitor not only the global cluster health but also your own endpoints and proactively take steps to isolate or move traffic to ensure business continuity.
-- *Dedicated, isolated clusters*:= Rely upon guaranteed capacity and isolation from noisy neighbors.
-- *Regional routing of traffic*:= Require that all traffic is routed and serviced within specific regions.
-- *Regional message storage*:= Require that all messages are stored within a specific region.`),
- )
- .toBe(`- *Active traffic management*:= Let Ably actively monitor not only the global cluster health but also your own endpoints and proactively take steps to isolate or move traffic to ensure business continuity.
-- *Dedicated, isolated clusters*:= Rely upon guaranteed capacity and isolation from noisy neighbors.
-- *Regional routing of traffic*:= Require that all traffic is routed and serviced within specific regions.
-- *Regional message storage*:= Require that all messages are stored within a specific region.`);
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/add-hyphen-list-support.ts b/data/transform/pre-parser/textile-js-workarounds/add-hyphen-list-support.ts
deleted file mode 100644
index 998efa75c9..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/add-hyphen-list-support.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/**
- * Textile JS does not support hyphen-led unordered lists
- */
-export const addHyphenListSupport: StringTransformation = (content) => content.replace(/^- (?!.*:=)(.*)$/gm, '* $1');
diff --git a/data/transform/pre-parser/textile-js-workarounds/add-italicised-text.test.ts b/data/transform/pre-parser/textile-js-workarounds/add-italicised-text.test.ts
deleted file mode 100644
index bea2842365..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/add-italicised-text.test.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { addItalicisedText } from './add-italicised-text';
-
-describe('Textile italicised text is replaced correctly with an block', () => {
- it('Wraps textile italicised text in an block', () => {
- expect(addItalicisedText(`__Type: String__`)).toBe(`Type: String `);
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/add-italicised-text.ts b/data/transform/pre-parser/textile-js-workarounds/add-italicised-text.ts
deleted file mode 100644
index 8106f4e300..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/add-italicised-text.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// textile-js has difficulty adding italicised text in certain circumstances, particularly near (but not wrapped in!) elements.
-// NB: this is not just a textile workaround.
-export const addItalicisedText: StringTransformation = (content) =>
- content.replace(/__(.*?)__/gm, '$1 ');
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-html-tags-with-newlines.ts b/data/transform/pre-parser/textile-js-workarounds/fix-html-tags-with-newlines.ts
deleted file mode 100644
index 0e826cf3d3..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-html-tags-with-newlines.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Restrict this for img tags for now; we do not know what the implications of a larger-scale replacement would be.
-export const fixImgTagsWithNewlines: StringTransformation = (content) =>
- content.replace(/ ]*\n+[^>]*>/g, (match) => match.replace(/\s{2,}/gm, ' '));
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-inline-code.test.ts b/data/transform/pre-parser/textile-js-workarounds/fix-inline-code.test.ts
deleted file mode 100644
index fba9b54216..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-inline-code.test.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { fixInlineCode } from './fix-inline-code';
-
-describe('Fixes inline code for textile-js', () => {
- it('Correctly fixes inline code', () => {
- expect(
- fixInlineCode(
- `* If the connection state becomes @SUSPENDED@, all previously-@ATTACHED@ or @ATTACHING@ channels will become @SUSPENDED@`,
- ),
- ).toBe(
- `* If the connection state becomes SUSPENDED, all previously-ATTACHED or ATTACHING channels will become SUSPENDED`,
- );
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-inline-code.ts b/data/transform/pre-parser/textile-js-workarounds/fix-inline-code.ts
deleted file mode 100644
index f279a9716d..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-inline-code.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// textile-js, unlike RedCloth, does not interpret @...@ sections as elements
-// if they are preceded by a non-space character
-export const fixInlineCode: StringTransformation = (content) => content.replace(/@(.+?)@/gm, '$1');
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-leading-html-tags.test.ts b/data/transform/pre-parser/textile-js-workarounds/fix-leading-html-tags.test.ts
deleted file mode 100644
index 55cee0e4bd..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-leading-html-tags.test.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { fixLeadingHtmlTags } from './fix-leading-html-tags';
-
-describe('Fixes leading inline HTML tags by replacing them with paragraph wrappers ahead of time.', () => {
- it('Ensures bold HTML tags are supplmented by being wrapped in paragraph tags', () => {
- expect(fixLeadingHtmlTags('*Note*: Lorem ipsum API content API')).toBe(
- '*Note*: Lorem ipsum API content API
',
- );
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-leading-html-tags.ts b/data/transform/pre-parser/textile-js-workarounds/fix-leading-html-tags.ts
deleted file mode 100644
index aaf7df357a..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-leading-html-tags.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * This function fixes issues where textile would see an inline text tag as the first
- * thing that it sees in a paragraph, and avoid wrapping that paragraph tag correctly in
- *
tags
- * We achieve this by doing the wrapping ahead of time.
- */
-export const fixLeadingHtmlTags: StringTransformation = (content) => content.replace(/^(\*[^\s]+\*.*)$/gm, '$1
');
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-links.test.ts b/data/transform/pre-parser/textile-js-workarounds/fix-links.test.ts
deleted file mode 100644
index 61a91a696c..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-links.test.ts
+++ /dev/null
@@ -1,155 +0,0 @@
-import textile from 'textile-js';
-import { fixDuplicateQuoteLinks, fixHtmlElementsInLinks, fixPunctuationInLinks } from './fix-links';
-
-describe('Fixes duplicate quoted links for textile-js', () => {
- it('Correctly renders links with long gaps between quotes', () => {
- expect(
- textile(
- fixDuplicateQuoteLinks(
- `The @Channel@ object can also emit one event that is not a state change: an @update@ event. This happens when there's a change to channel conditions for which the channel state doesn't change. For example, a partial loss of message continuity on a channel (typically after a resume) for which the channel state remains @attached@ would lead to an @update@ event being emitted, with both @current@ and @previous@ set to "@attached@". and the @resumed@ flag set to @false@. So if you get such an event, you'll know there may be messages you've missed on the channel, and if necessary you can use the "History":#history api to retrieve them.`,
- ),
- ),
- ).toBe(
- `The Channel object can also emit one event that is not a state change: an update event. This happens when there’s a change to channel conditions for which the channel state doesn’t change. For example, a partial loss of message continuity on a channel (typically after a resume) for which the channel state remains attached would lead to an update event being emitted, with both current and previous set to attached and the resumed flag set to false. So if you get such an event, you’ll know there may be messages you’ve missed on the channel, and if necessary you can use the History api to retrieve them.
`,
- );
- });
-});
-
-describe('Does not render bits of code as links', () => {
- it('ignores bits of code when it comes to parsing links', () => {
- /**
- * The broken example would look like this:
- * "x-ably-capability": "{\*\ "*\"]}"
- * Ticket: https://ably.atlassian.net/browse/EDU-1319
- **/
- expect(
- fixHtmlElementsInLinks(`
- var claims = {
- "iat": currentTime, /* current time in seconds */
- "exp": currentTime + 3600, /* time of expiration in seconds */
- "x-ably-capability": "{\\"*\\":[\\"*\\"]}"
- }
- `),
- ).toBe(`
- var claims = {
- "iat": currentTime, /* current time in seconds */
- "exp": currentTime + 3600, /* time of expiration in seconds */
- "x-ably-capability": "{\\"*\\":[\\"*\\"]}"
- }
- `);
- expect(
- fixPunctuationInLinks(`
- var claims = {
- "iat": currentTime, /* current time in seconds */
- "exp": currentTime + 3600, /* time of expiration in seconds */
- "x-ably-capability": "{\\"*\\":[\\"*\\"]}"
- }
- `),
- ).toBe(`
- var claims = {
- "iat": currentTime, /* current time in seconds */
- "exp": currentTime + 3600, /* time of expiration in seconds */
- "x-ably-capability": "{\\"*\\":[\\"*\\"]}"
- }
- `);
- });
-});
-
-describe('Fixes punctuation in links for textile-js', () => {
- it('Deliberately renders links followed by punctuation so as to remove punctuation from the link', () => {
- expect(
- fixPunctuationInLinks(`yes ("basic":/rest-api/#basic-authentication or "token":/rest-api#token-authentication)`),
- ).toBe(
- `yes (basic or token )`,
- );
- expect(
- fixPunctuationInLinks(
- `Ably Token issued will be "anonymous":https://faqs.ably.com/authenticated-and-identified-clients. __Type: @Boolean@__`,
- ),
- ).toBe(
- `Ably Token issued will be anonymous . __Type: @Boolean@__`,
- );
- expect(
- fixPunctuationInLinks(
- `h5. Code example
-
- \`\`\`[curl]
- curl "https://rest.ably.io/event-stream?channel=example&v=1.2" \
- --user "{{API_KEY}}"
-
- {
- "id":"cbfKayrzgAXDWM:1556804156735-0",
- "event":"message",
- "data":{
- "id":"oZs6XaGYx8:0:0",
- "name":"message-name",
- "timestamp":1556804156730,
- "encoding":"json",
- "channel":"example",
- "data":"{"foo":1}"
- }
- }
- ⏎
- {
- "event":"error",
- "data":{
- "message":"Token expired. (See https://help.ably.io/error/40142 for help.)",
- "code":40142,
- "statusCode":401,
- "href":"https://help.ably.io/error/40142"
- }
- }
- \`\`\``,
- ),
- ).toMatchInlineSnapshot(`
- "h5. Code example
-
- \`\`\`[curl]
- curl "https://rest.ably.io/event-stream?channel=example&v=1.2" --user "{{API_KEY}}"
-
- {
- "id":"cbfKayrzgAXDWM:1556804156735-0",
- "event":"message",
- "data":{
- "id":"oZs6XaGYx8:0:0",
- "name":"message-name",
- "timestamp":1556804156730,
- "encoding":"json",
- "channel":"example",
- "data":"{"foo":1}"
- }
- }
- ⏎
- {
- "event":"error",
- "data":{
- "message":"Token expired. (See https://help.ably.io/error/40142 for help.)",
- "code":40142,
- "statusCode":401,
- "href":"https://help.ably.io/error/40142"
- }
- }
- \`\`\`"
- `);
- });
-
- it('Renders links with multiple punctuation marks correctly', () => {
- expect(fixPunctuationInLinks(`subscribe(String name, listener("Message":#message))`)).toBe(
- `subscribe(String name, listener(Message ))`,
- );
- });
-});
-
-describe('Fixes HTML elements in links for textile-js', () => {
- it('Correctly renders links with HTML elements in the URL portion', () => {
- expect(
- textile(
- fixHtmlElementsInLinks(
- `"Lorem ipsum":lorem-ipsum-ad-loquitur"Alternative Lorem Ipsum":per-ardua-ad-astra `,
- ),
- ),
- ).toBe(
- `Lorem ipsum Alternative Lorem Ipsum
`,
- );
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-links.ts b/data/transform/pre-parser/textile-js-workarounds/fix-links.ts
deleted file mode 100644
index 9a86c4e7c7..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-links.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-// Duplicate quote links are gathered GREEDILY, not LAZILY by textile-js when a code section is nested inside quotes.
-// The issue here is that the quotes are essentially duplicating the work of the 'code' element, marking out the
-// contents as a discrete & specific entity, but textile-js scans all the way until it can find a colon and
-// force the element to be an
-export const fixDuplicateQuoteLinks: StringTransformation = (content) => content.replace(/"(@[^"]*@)"[^:]/g, '$1');
-
-/**
- * The regex in this comment block is used throughout to identify valid link content.
- * To avoid errors when parsing code, the heuristic that the link text must contain at
- * least one printable character, not including underscore, has been relied upon.
- * [^">] => identifies non-quote and non-angle-bracket characters
- * [a-zA-Z0-9] => identifies alphanumeric characters
- * "([^">]*[a-zA-Z0-9]+[^">]*)" => identifies valid link text
- *
- * \w has been deliberately avoided because '_', which \w includes, could be part of code.
- */
-
-// HTML elements immediately after links cause difficulties for the parser, appearing in links.
-export const fixHtmlElementsInLinks: StringTransformation = (content) =>
- content.replace(/"([^">]*[a-zA-Z0-9]+[^">]*)":([^)\]@,\s<>"]+)$1 <');
-
-// Punctuation immediately after links is interpreted correctly by textile-js; but was not by Nanoc.
-// We need to remove it to retain parity.
-export const fixPunctuationInLinks: StringTransformation = (content) =>
- content.replace(
- /"([^">]*[a-zA-Z0-9]+[^">]*)":([^)\]@,\s<>\d{}}"]+?)(\.?)([)\]@,\s<>{}"])/gm,
- '$1 $3$4',
- );
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-divs-in-definition-lists.ts b/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-divs-in-definition-lists.ts
deleted file mode 100644
index b58a86bd29..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-divs-in-definition-lists.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { isEmpty } from 'lodash';
-
-/**
- * Breakdown;
- * 1st capturing group; ensure we are part of a textile definition list
- * - preceded by a line of - dt := dd followed by any number of spaces
- * - OR part of an ongoing chain indicated by a closing tag followed by a newline.
- * non-capturing group: a with a lang attribute, closed by a
pair, if it exists
- * non-capturing group: :=\s
- * 4th capturing group: the second section of a textile pair, if it exists
- * Next div, that matches the exact same pattern as above
- */
-const DIV_DL_REGEX =
- /(-.*?:=.*?\n\n)(?:(?:]*lang="([^"]+?)")[^>]*>(?:[\n\r]+- ([^:=]*? ))?(?::=\s+)?(.*?)<\/div>\s*(?:(?:
]*lang="([^"]+?)")[^>]*>(?:[\n\r]+- ([^:=]*? ))?(?::=\s+)?(.*?)<\/div>/gs;
-
-/**
- * Identify sequence of one or more divs within dl sequence
- * To be altered, the div must have a lang attribute.
- * If a div with a lang attribute is empty, it is an alternative div in a definition list. It must be replaced with actual textile markup.
- * If a div with a lang attribute has no second portion, it is the end of the definition list; it must be left unchanged.
- * If a div has both a first & second portion, it can be adjusted to.
- */
-export const fixDivsInDefinitionLists: StringTransformation = (content) =>
- content.replace(
- DIV_DL_REGEX,
- (match, textilePreamble, lang, maybeFirstDt, maybeFirstDd, secondLang, maybeSecondDt, maybeSecondDd) => {
- if (isEmpty(lang) || isEmpty(secondLang)) {
- return match;
- }
- const firstEntry = isEmpty(maybeFirstDt)
- ? `-
:= `
- : `-
${maybeFirstDt.replace(/^-/g, '').trim()}
:= ${maybeFirstDd}`;
- const secondEntry = isEmpty(maybeSecondDt)
- ? `-
:= `
- : `-
${maybeSecondDt.replace(/^-/g, '').trim()}
:= ${maybeSecondDd}`;
- return `${textilePreamble}${firstEntry}
-${secondEntry}`;
- },
- );
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-h1-6-after-definition-lists.ts b/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-h1-6-after-definition-lists.ts
deleted file mode 100644
index 24ea0b8b51..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-h1-6-after-definition-lists.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export const fixH1To6AFterDefinitionLists: StringTransformation = (content) =>
- content.replace(/(\n-(.*?):=(.*?)\n)(h[1-6])/g, '$1\n$2');
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-indented-definition-lists.ts b/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-indented-definition-lists.ts
deleted file mode 100644
index 92ae111123..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-indented-definition-lists.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export const fixIndentedDefinitionLists: StringTransformation = (content) =>
- content.replace(/^[^\S\n]+(-.*?:=.*)$/gm, '$1');
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-newlines-in-definition-lists.ts b/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-newlines-in-definition-lists.ts
deleted file mode 100644
index 0826b34412..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-newlines-in-definition-lists.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-const NEWLINE_DL_REGEX = /(-.*?:=.*?)[\n\r]{2,}(-.*?:=.*?)/g;
-
-export const fixNewlinesInDefinitionLists = (content: string) => content.replace(NEWLINE_DL_REGEX, '$1\n$2');
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-textile-definition-lists.test.ts b/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-textile-definition-lists.test.ts
deleted file mode 100644
index 4c887a82d3..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/fix-textile-definition-lists.test.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { fixDivsInDefinitionLists } from './fix-divs-in-definition-lists';
-import { failingDefinitionList } from './test-data';
-
-describe('Definition lists are interpreted as intended', () => {
- it('transforms
s in
s into pairs', () => {
- /**
- * Potential issues uncovered by test:
- * Problem:
- * divs are included separately from lists, i.e. term := definition
- * Solution:
- * ensure divs are processed when part of a
- */
- expect(fixDivsInDefinitionLists(failingDefinitionList)).toBe(`h4. Parameters
-
-- name := The event name to subscribe to __Type: @String@__
-
--
:=
-- names
:= An argument array of event names to subscribe to __Type: @String[]@ @*argument@ __
-
-
-- listener
:= is a function of the form @function(message)@ to be called for each message
-- "MessageListener":#message-listener listener
:= Message listener to be notified for matching messages
-- &block
:= yields each matching message when received on the channel
-- callback
:= called with each matching "@message@":#message when received on the channel
-- handler
:= called with each matching "@message@":#message when received on the channel`);
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/index.ts b/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/index.ts
deleted file mode 100644
index 84148bd2fe..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { compose } from 'lodash/fp';
-import { fixH1To6AFterDefinitionLists } from './fix-h1-6-after-definition-lists';
-import { fixIndentedDefinitionLists } from './fix-indented-definition-lists';
-import { fixNewlinesInDefinitionLists } from './fix-newlines-in-definition-lists';
-
-export const fixTextileDefinitionLists = compose(
- fixH1To6AFterDefinitionLists,
- fixNewlinesInDefinitionLists,
- fixIndentedDefinitionLists,
-);
diff --git a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/test-data.ts b/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/test-data.ts
deleted file mode 100644
index 19ededc819..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/fix-textile-definition-lists/test-data.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-export const failingDefinitionList = `h4. Parameters
-
-- name := The event name to subscribe to __Type: @String@__
-
-
-
-- names := An argument array of event names to subscribe to __Type: @String[]@ @*argument@ __
-
-
-- listener
:= is a function of the form @function(message)@ to be called for each message
-- "MessageListener":#message-listener listener
:= Message listener to be notified for matching messages
-- &block
:= yields each matching message when received on the channel
-- callback
:= called with each matching "@message@":#message when received on the channel
-- handler
:= called with each matching "@message@":#message when received on the channel`;
diff --git a/data/transform/pre-parser/textile-js-workarounds/heading.test.ts b/data/transform/pre-parser/textile-js-workarounds/heading.test.ts
deleted file mode 100644
index 01dd77b00d..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/heading.test.ts
+++ /dev/null
@@ -1,458 +0,0 @@
-import { processTextile } from '../../../../data/test-utilities/process-textile';
-import textile from 'textile-js';
-import { preParser } from '..';
-
-describe('Manual override of headings works as expected', () => {
- it('Manually overrides headings when there are classes and IDs and definition lists involved', () => {
- expect(
- textile(
- preParser(`h5. Request parameters
-
-- channels := **mandatory**. One or more channel names, separated by commas (or the @separator@ if specified). Non-url-safe characters should be URL-encoded (for example, @?channels=foo%3Fbar@ will subscribe to the channel @foo?bar@). Alias: @channel@.
-- v := **mandatory**. The version of the api you are requesting. The current version of the API is 1.2, so @v=1.2@ is recommended.
-- separator := **optional**. A separator, to enable easy subscriptions to channels with commas in their name. For example, @?separator=|&channel=fo,o|ba,r@ will subscribe to the two channels @fo,o@ and @ba,r@.
-- key := **optional**. An Ably API key to use, if using basic auth.
-- accessToken := **optional** An Ably auth token to use, if using token auth.
-- lastEvent := **optional**. An @id@ to resume from. Only required when starting a new SSE connection which resumes from a previous connection.
-- rewind := **optional**. An integer which, if specified, will send a backlog of the number of messages specified once the connection opens. For example, @rewind=1@ will give you the most recent message sent on the channel. This is best-effort — only messages from within the last two minutes will be available, and only if the channel has been continuously active since the message was sent; it is not a replacement for the "history API":/rest/history. It only has an effect for new connections; when resuming a previous connection using @lastEvent@, it is ignored in favour of sending you the messages you missed since you were last connected.
-- enveloped := **optional**. Default is @true@. If @true@, the @data@ from each event envelope for a @message@ event will be a "Message":/api/realtime-sdk/types#message object. If @false@, it will be the payload from the message directly. See "Envelope format":#envelope-format below.
-- heartbeats := **optional**. Default is @false@. if @true@ will use an explicit heartbeat event rather than a newline as a keepalive packet.
-
-h5(#envelope-format). Envelope format
-
-See an example of a "plain event stream":#event-stream below, except instead of a JSON object with @id@, @event@, @data@ members, you get an SSE event.
-
-Keepalive packets are sent as SSE comments (@:keepalive@).`),
- ),
- ).toBe(`
Request parameters
-
-\tchannels
-\tmandatory . One or more channel names, separated by commas (or the separator if specified). Non-url-safe characters should be URL -encoded (for example, ?channels=foo%3Fbar will subscribe to the channel foo?bar). Alias: channel.
-\tv
-\tmandatory . The version of the api you are requesting. The current version of the API is 1.2, so v=1.2 is recommended.
-\tseparator
-\toptional . A separator, to enable easy subscriptions to channels with commas in their name. For example, ?separator=|&channel=fo,o|ba,r will subscribe to the two channels fo,o and ba,r.
-\tkey
-\toptional . An Ably API key to use, if using basic auth.
-\taccessToken
-\toptional An Ably auth token to use, if using token auth.
-\tlastEvent
-\toptional . An id to resume from. Only required when starting a new SSE connection which resumes from a previous connection.
-\trewind
-\toptional . An integer which, if specified, will send a backlog of the number of messages specified once the connection opens. For example, rewind=1 will give you the most recent message sent on the channel. This is best-effort — only messages from within the last two minutes will be available, and only if the channel has been continuously active since the message was sent; it is not a replacement for the history API . It only has an effect for new connections; when resuming a previous connection using lastEvent, it is ignored in favour of sending you the messages you missed since you were last connected.
-\tenveloped
-\toptional . Default is true. If true, the data from each event envelope for a message event will be a Message object. If false, it will be the payload from the message directly. See Envelope format below.
-\theartbeats
-\toptional . Default is false. if true will use an explicit heartbeat event rather than a newline as a keepalive packet.
-
-
-See an example of a plain event stream below, except instead of a JSON object with id, event, data members, you get an SSE event.
-Keepalive packets are sent as SSE comments (:keepalive).
`);
- });
- it('Works for duplicated h[1-6] blocks as well', () => {
- expect(
- processTextile(`h4. Parameters
-
-- event(s)
:= the connection event(s) to subscribe to __Type: @String@ or @String[]@__
-- event
:= the connection event to subscribe to __Type: "@ConnectionEvent@":#connection-event__
-- event
:= the connection event to subscribe to __Type: "@ConnectionEvent@":#connection-event__
-- event
:= the connection event as a Symbol such as @:connected@ or @ConnectionEvent@ object to subscribe to __Type: "@ConnectionEvent@":#connection-event__
-- event
:= the connection event to subscribe to __Type: "@ARTRealtimeConnectionEvent@":#connection-event__
-
-- listener
:= is a function of the form @function(stateChange)@ to be notified for a single occurrence of a matching event
-- listener
:= listener to be notified for a single occurrence of a matching state change __Type: "@ConnectionStateListener@":#connection-state-listener__
-- action
:= action to be executed for matching state changes __Type: "@ConnectionStateChange@":#connection-state-listener__
-- &block
:= listener block that is yielded to for a single occurrence of a matching event
-- call
:= called with matching events
-h6(#off).
- default: off
- csharp: Off
-
-There are six two overloaded versions of this method:`),
- ).toMatchInlineSnapshot(`
- [
-
- Parameters
- ,
-
-
-
-
-
-
- event(s)
-
-
-
- the connection event(s) to subscribe to
-
-
- Type:
-
- String
-
- or
-
- String[]
-
-
-
-
-
-
-
- event(s)
-
-
-
- the connection event(s) to subscribe to
-
-
- Type:
-
- String
-
- or
-
- String[]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- event
-
-
-
- the connection event as a Symbol such as
-
- :connected
-
- or
-
- ConnectionEvent
-
- object to subscribe to
-
-
- Type:
-
-
- ConnectionEvent
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- listener
-
-
-
- is a function of the form
-
- function(stateChange)
-
- to be notified for a single occurrence of a matching event
-
-
-
-
-
- listener
-
-
-
- is a function of the form
-
- function(stateChange)
-
- to be notified for a single occurrence of a matching event
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- &block
-
-
-
- listener block that is yielded to for a single occurrence of a matching event
-
-
-
-
-
-
-
-
-
- call
-
-
-
- called with matching events
-
-
-
-
-
- call
-
-
-
- called with matching events
-
-
-
-
-
-
- ,
-
-
- off
-
-
- Off
-
- ,
-
- There are
-
- six
-
-
- six
-
-
- two
-
- overloaded versions of this method:
-
,
- ]
- `);
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/index.test.ts b/data/transform/pre-parser/textile-js-workarounds/index.test.ts
deleted file mode 100644
index 9bdf2cf7d4..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/index.test.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import textile from 'textile-js';
-import { compressMultipleNewlinesInLists, manuallyReplaceHTags } from './';
-import {
- definitionList,
- expectedDefinitionList,
- nestedH1_6String,
- nestedH1_6Html,
- nestedDiv,
- spanWithHashExample,
- spanWithHashResult,
- listDivExample,
- listDivParsedExample,
-} from './workarounds.raw.examples';
-import { preParser } from '../';
-
-describe('Reads a definition string correctly', () => {
- it('A definition string is rendered into a valid HTML definition list from textile', () => {
- expect(textile(compressMultipleNewlinesInLists(definitionList)).replace(/\s/g, '')).toEqual(
- expectedDefinitionList.replace(/\s/g, ''),
- );
- });
-});
-
-describe('Reads an h[1-6]. string correctly', () => {
- it('An h[1-6]. line nested inside an outer HTML tag gets read correctly in textile', () => {
- expect(textile(manuallyReplaceHTags(nestedH1_6String))).toEqual(nestedH1_6Html);
- });
-});
-
-describe('Reads spans with hashes correctly', () => {
- it('A span with a hash/pound/octothorpe value gets read correctly', () => {
- const processedSpan = textile(preParser(spanWithHashExample));
- expect(processedSpan).toEqual(spanWithHashResult);
- });
-});
-
-describe('Reads divs closing over a definition list correctly', () => {
- it('A series of one or more divs followed by another div gets parsed correctly', () => {
- const preParsedDivs = preParser(listDivExample);
- const processedDivs = textile(preParsedDivs);
- expect(processedDivs.replace(/\s/g, '')).toEqual(listDivParsedExample.replace(/\s/g, ''));
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/index.ts b/data/transform/pre-parser/textile-js-workarounds/index.ts
deleted file mode 100644
index df3a2412a5..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/index.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { compose } from 'lodash/fp';
-import { fixDuplicateQuoteLinks, fixHtmlElementsInLinks, fixPunctuationInLinks } from './fix-links';
-import { fixInlineCode } from './fix-inline-code';
-import { fixTextileDefinitionLists } from './fix-textile-definition-lists';
-import { addItalicisedText } from './add-italicised-text';
-import { fixLeadingHtmlTags } from './fix-leading-html-tags';
-import { addBoldText } from './add-bold-text';
-import { makeImplicitOrderedListExplicit } from './make-implicit-ordered-list-explicit';
-import { fixImgTagsWithNewlines } from './fix-html-tags-with-newlines';
-
-// textile-js, unlike RedCloth, cannot parse multiple new lines between list items
-// each list item will instead be wrapped in its own list collection
-export const compressMultipleNewlinesInLists: StringTransformation = (content) =>
- content.replace(/^(-.*)\n{2,}(?![^-])/gm, '$1\n');
-
-// textile-js cannot parse h[1-6]. lines that are located inside another HTML tag, with leading spaces
-export const manuallyReplaceHTags: StringTransformation = (content) =>
- content.replace(
- /^\s*h([1-6])(\(#[^)]+\))?(\([^()|#)]+\))?\.\s+(.*)$/gm,
- (_match, p1, p2, p3, p4) =>
- `\n${p4} `,
- );
-
-export const textileJSCompatibility = compose(
- fixLeadingHtmlTags,
- fixTextileDefinitionLists,
- fixInlineCode,
- compressMultipleNewlinesInLists,
- makeImplicitOrderedListExplicit,
- manuallyReplaceHTags,
- fixImgTagsWithNewlines,
- fixDuplicateQuoteLinks,
- fixPunctuationInLinks,
- fixHtmlElementsInLinks,
- addItalicisedText,
- addBoldText,
-);
diff --git a/data/transform/pre-parser/textile-js-workarounds/make-implicit-ordered-list-explicit.test.ts b/data/transform/pre-parser/textile-js-workarounds/make-implicit-ordered-list-explicit.test.ts
deleted file mode 100644
index 06bcb3b88d..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/make-implicit-ordered-list-explicit.test.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import textile from 'textile-js';
-import { preParser } from '..';
-import { postParser } from '../../post-parser';
-import { makeImplicitOrderedListExplicit } from './make-implicit-ordered-list-explicit';
-
-describe('Ensure that implicit ordered lists (decimal-led lines) are converted to explicit Textile ordered lists', () => {
- it('Interprets ordered lists correctly', () => {
- expect(
- makeImplicitOrderedListExplicit(`
-
-Ably supports two methods of authentication:
-
-1. "Basic authentication":/core-features/authentication#basic-authentication
-2. "Token authentication":/core-features/authentication#token-authentication`),
- ).toBe(`
-
-Ably supports two methods of authentication:
-
-# "Basic authentication":/core-features/authentication#basic-authentication
-# "Token authentication":/core-features/authentication#token-authentication`);
- });
- it('Preserves ordered lists throughout the parsing process', () => {
- expect(
- postParser(
- textile(
- preParser(`
-
-Ably supports two methods of authentication:
-
-1. "Basic authentication":/core-features/authentication#basic-authentication
-2. "Token authentication":/core-features/authentication#token-authentication`),
- ),
- ),
- ).toBe(`Ably supports two methods of authentication:
-
- Basic authentication
- Token authentication
- `);
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/make-implicit-ordered-list-explicit.ts b/data/transform/pre-parser/textile-js-workarounds/make-implicit-ordered-list-explicit.ts
deleted file mode 100644
index def5a319f9..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/make-implicit-ordered-list-explicit.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// Not supporting implicit OLs at different indentation levels because the
-// chance of causing unexpected behaviour is too high.
-export const makeImplicitOrderedListExplicit: StringTransformation = (content) =>
- content.replace(/^\d+\.(.+)$/gm, '# $1');
diff --git a/data/transform/pre-parser/textile-js-workarounds/missing-spans.test.ts b/data/transform/pre-parser/textile-js-workarounds/missing-spans.test.ts
deleted file mode 100644
index f9f565a214..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/missing-spans.test.ts
+++ /dev/null
@@ -1,1292 +0,0 @@
-import { processTextile } from '../../../test-utilities/process-textile';
-
-// Source: _request.textile
-const missingSpansFixture = `h4. Parameters
-
-- method := either @get@, @post@, @put@, @patch@ or @delete@. __Type: String string __
-- path := the path to query. __Type: String string __
-- params := (optional) any querystring parameters needed. __Type: Object PaginateParams Dictionary __
-- body := (optional; for @post@, @put@ and @patch@ methods) the body of the request, as anything that can be serialized into JSON, such as an @Object@ or @Array@. a JToken. __Type: Serializable interface JToken __
-- headers := (optional) any headers needed. If provided, these will be mixed in with the default library headers. __Type: Object http.Header Dictionary __
-
-blang[jsall,objc,swift].
- h4. Callback result
-
- On successfully receiving a response from Ably, @results@ contains an "@HttpPaginatedResponse@ @ARTHttpPaginatedResponse@ ":/api/rest-sdk/types#http-paginated-response containing the @statusCode@ of the response, a @success@ boolean (equivalent to whether the status code is between 200 and 299), @headers@, and an @items@ array containing the current page of results. It supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods, identically to "@PaginatedResult@":/api/rest-sdk/types#paginated-result.
-
- On failure to obtain a response, @err@ contains an "@ErrorInfo@":/api/rest-sdk/types#error-info object with an error response as defined in the "Ably REST API":/rest-api#common documentation. (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an HTTP Paginated Response, not an @err@).
-
-blang[java,ruby,php,python].
- h4. Returns
-
- On successfully receiving a response from Ably, the returned "@HttpPaginatedResponse@":/api/rest-sdk/types#http-paginated-response contains a @status_code@ @statusCode@ and a @success@ boolean, @headers@, and an @items@ array containing the current page of results. It supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods, identically to "@PaginatedResult@":/api/rest-sdk/types#paginated-result.
-
- Failure to obtain a response will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception. (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an HTTP Paginated Response, not an exception).
-
-blang[csharp].
- h4. Returns
-
- The method is asynchronous and return a Task that has to be awaited to get the result.
-
- On successfully receiving a response from Ably, the returned "@HttpPaginatedResponse@":/api/rest-sdk/types#http-paginated-response containing the @StatusCode@ and a @Success@ boolean, @Headers@, and an @Items@ array containing the current page of results. "@HttpPaginatedResponse@":/api/rest-sdk/types#http-paginated-response supports pagination using "@NextAsync@":#paginated-result and "@FirstAsync@":#paginated-result methods.
-
- Failure to obtain a response will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception. (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an HTTP Paginated Response, not an exception).
-`;
-
-describe('Ensure that there are no missing spans', () => {
- it('Ensures that there are no missing spans for any language', () => {
- expect(processTextile(missingSpansFixture)).toMatchInlineSnapshot(`
- [
-
- Parameters
- ,
-
-
-
-
- method
-
-
-
-
- either
-
- get
-
- ,
-
- post
-
- ,
-
- put
-
- ,
-
- patch
-
- or
-
- delete
-
- .
-
-
- Type:
-
- String
-
-
- string
-
-
- string
-
-
-
-
-
-
- path
-
-
-
-
- the path to query.
-
-
- Type:
-
- String
-
-
- string
-
-
- string
-
-
-
-
-
-
- params
-
-
-
-
- (optional) any querystring parameters needed.
-
-
- Type:
-
- Object
-
-
- PaginateParams
-
-
- Dictionary<string, string>
-
-
-
-
-
-
- body
-
-
-
-
- (optional; for
-
- post
-
- ,
-
- put
-
- and
-
- patch
-
- methods) the body of the request, as
-
- anything that can be serialized into
-
- JSON
-
- , such as an
-
- Object
-
- or
-
- Array
-
- .
-
-
- a JToken.
-
-
-
- Type:
-
- Serializable
-
-
- interface
-
-
- JToken
-
-
-
-
-
-
- headers
-
-
-
-
- (optional) any headers needed. If provided, these will be mixed in with the default library headers.
-
-
- Type:
-
- Object
-
-
- http.Header
-
-
- Dictionary<string, string>
-
-
-
-
-
- ,
-
-
-
-
-
-
-
- Callback result
-
-
-
-
-
- On successfully receiving a response from Ably,
-
- results
-
- contains an
-
-
-
- HttpPaginatedResponse
-
-
-
-
- ARTHttpPaginatedResponse
-
-
-
-
- ARTHttpPaginatedResponse
-
-
-
- containing the
-
- statusCode
-
- of the response, a
-
- success
-
- boolean (equivalent to whether the status code is between 200 and 299),
-
- headers
-
- , and an
-
- items
-
- array containing the current page of results. It supports pagination using
-
-
- next
-
-
- and
-
-
- first
-
-
- methods, identically to
-
-
- PaginatedResult
-
-
- .
-
-
-
-
- On failure to obtain a response,
-
- err
-
- contains an
-
-
- ErrorInfo
-
-
- object with an error response as defined in the
-
- Ably
-
- REST
-
-
-
- API
-
-
- documentation. (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an
-
- HTTP
-
- Paginated Response, not an
-
- err
-
- ).
-
-
,
-
-
-
-
-
-
-
- Callback result
-
-
-
-
-
- On successfully receiving a response from Ably,
-
- results
-
- contains an
-
-
-
- HttpPaginatedResponse
-
-
-
-
- ARTHttpPaginatedResponse
-
-
-
-
- ARTHttpPaginatedResponse
-
-
-
- containing the
-
- statusCode
-
- of the response, a
-
- success
-
- boolean (equivalent to whether the status code is between 200 and 299),
-
- headers
-
- , and an
-
- items
-
- array containing the current page of results. It supports pagination using
-
-
- next
-
-
- and
-
-
- first
-
-
- methods, identically to
-
-
- PaginatedResult
-
-
- .
-
-
-
-
- On failure to obtain a response,
-
- err
-
- contains an
-
-
- ErrorInfo
-
-
- object with an error response as defined in the
-
- Ably
-
- REST
-
-
-
- API
-
-
- documentation. (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an
-
- HTTP
-
- Paginated Response, not an
-
- err
-
- ).
-
-
,
-
-
-
-
-
-
-
- Callback result
-
-
-
-
-
- On successfully receiving a response from Ably,
-
- results
-
- contains an
-
-
-
- HttpPaginatedResponse
-
-
-
-
- ARTHttpPaginatedResponse
-
-
-
-
- ARTHttpPaginatedResponse
-
-
-
- containing the
-
- statusCode
-
- of the response, a
-
- success
-
- boolean (equivalent to whether the status code is between 200 and 299),
-
- headers
-
- , and an
-
- items
-
- array containing the current page of results. It supports pagination using
-
-
- next
-
-
- and
-
-
- first
-
-
- methods, identically to
-
-
- PaginatedResult
-
-
- .
-
-
-
-
- On failure to obtain a response,
-
- err
-
- contains an
-
-
- ErrorInfo
-
-
- object with an error response as defined in the
-
- Ably
-
- REST
-
-
-
- API
-
-
- documentation. (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an
-
- HTTP
-
- Paginated Response, not an
-
- err
-
- ).
-
-
,
-
-
-
-
-
-
-
- Callback result
-
-
-
-
-
- On successfully receiving a response from Ably,
-
- results
-
- contains an
-
-
-
- HttpPaginatedResponse
-
-
-
-
- ARTHttpPaginatedResponse
-
-
-
-
- ARTHttpPaginatedResponse
-
-
-
- containing the
-
- statusCode
-
- of the response, a
-
- success
-
- boolean (equivalent to whether the status code is between 200 and 299),
-
- headers
-
- , and an
-
- items
-
- array containing the current page of results. It supports pagination using
-
-
- next
-
-
- and
-
-
- first
-
-
- methods, identically to
-
-
- PaginatedResult
-
-
- .
-
-
-
-
- On failure to obtain a response,
-
- err
-
- contains an
-
-
- ErrorInfo
-
-
- object with an error response as defined in the
-
- Ably
-
- REST
-
-
-
- API
-
-
- documentation. (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an
-
- HTTP
-
- Paginated Response, not an
-
- err
-
- ).
-
-
,
-
-
-
-
-
-
-
- Returns
-
-
-
-
-
- On successfully receiving a response from Ably, the returned
-
-
- HttpPaginatedResponse
-
-
- contains a
-
-
- status_code
-
-
-
-
- status_code
-
-
-
-
- statusCode
-
-
- and a
-
- success
-
- boolean,
-
- headers
-
- , and an
-
- items
-
- array containing the current page of results. It supports pagination using
-
-
- next
-
-
- and
-
-
- first
-
-
- methods, identically to
-
-
- PaginatedResult
-
-
- .
-
-
-
-
- Failure to obtain a response will raise an
-
-
- AblyException
-
-
- . (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an
-
- HTTP
-
- Paginated Response, not an exception).
-
-
,
-
-
-
-
-
-
-
- Returns
-
-
-
-
-
- On successfully receiving a response from Ably, the returned
-
-
- HttpPaginatedResponse
-
-
- contains a
-
-
- status_code
-
-
-
-
- status_code
-
-
-
-
- statusCode
-
-
- and a
-
- success
-
- boolean,
-
- headers
-
- , and an
-
- items
-
- array containing the current page of results. It supports pagination using
-
-
- next
-
-
- and
-
-
- first
-
-
- methods, identically to
-
-
- PaginatedResult
-
-
- .
-
-
-
-
- Failure to obtain a response will raise an
-
-
- AblyException
-
-
- . (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an
-
- HTTP
-
- Paginated Response, not an exception).
-
-
,
-
-
-
-
-
-
-
- Returns
-
-
-
-
-
- On successfully receiving a response from Ably, the returned
-
-
- HttpPaginatedResponse
-
-
- contains a
-
-
- status_code
-
-
-
-
- status_code
-
-
-
-
- statusCode
-
-
- and a
-
- success
-
- boolean,
-
- headers
-
- , and an
-
- items
-
- array containing the current page of results. It supports pagination using
-
-
- next
-
-
- and
-
-
- first
-
-
- methods, identically to
-
-
- PaginatedResult
-
-
- .
-
-
-
-
- Failure to obtain a response will raise an
-
-
- AblyException
-
-
- . (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an
-
- HTTP
-
- Paginated Response, not an exception).
-
-
,
-
-
-
-
-
-
-
- Returns
-
-
-
-
-
- On successfully receiving a response from Ably, the returned
-
-
- HttpPaginatedResponse
-
-
- contains a
-
-
- status_code
-
-
-
-
- status_code
-
-
-
-
- statusCode
-
-
- and a
-
- success
-
- boolean,
-
- headers
-
- , and an
-
- items
-
- array containing the current page of results. It supports pagination using
-
-
- next
-
-
- and
-
-
- first
-
-
- methods, identically to
-
-
- PaginatedResult
-
-
- .
-
-
-
-
- Failure to obtain a response will raise an
-
-
- AblyException
-
-
- . (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an
-
- HTTP
-
- Paginated Response, not an exception).
-
-
,
-
-
-
-
-
-
-
- Returns
-
-
-
-
-
- The method is asynchronous and return a Task that has to be awaited to get the result.
-
-
-
-
- On successfully receiving a response from Ably, the returned
-
-
- HttpPaginatedResponse
-
-
- containing the
-
- StatusCode
-
- and a
-
- Success
-
- boolean,
-
- Headers
-
- , and an
-
- Items
-
- array containing the current page of results.
-
-
- HttpPaginatedResponse
-
-
- supports pagination using
-
-
- NextAsync
-
-
- and
-
-
- FirstAsync
-
-
- methods.
-
-
-
-
- Failure to obtain a response will raise an
-
-
- AblyException
-
-
- . (Note that if a response is obtained, any response, even with a non-2xx status code, will result in an
-
- HTTP
-
- Paginated Response, not an exception).
-
-
-
,
- ]
- `);
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/recursively-process-divs.test.ts b/data/transform/pre-parser/textile-js-workarounds/recursively-process-divs.test.ts
deleted file mode 100644
index 3a81b2b376..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/recursively-process-divs.test.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { recursivelyProcessDivs } from '..';
-
-describe('Divs that contain examples of textile to be processed correctly', () => {
- it('Renders a known example from api/realtime-sdk/channels.textile correctly', () => {
- expect(
- recursivelyProcessDivs(`
-
-bq(definition#on-state-array-listener).
- jsall: on(String[] events, listener("ChannelStateChange":#channel-state-change stateChange))
-
-Same as above, but registers multiple listeners, one for each event in the array.
-
`),
- ).toMatchInlineSnapshot(`
- "
- on(String[] events, listener(ChannelStateChange stateChange))
Same as above, but registers multiple listeners, one for each event in the array.
"
- `);
- });
-});
diff --git a/data/transform/pre-parser/textile-js-workarounds/workarounds.raw.examples.ts b/data/transform/pre-parser/textile-js-workarounds/workarounds.raw.examples.ts
deleted file mode 100644
index 4f8abe4df9..0000000000
--- a/data/transform/pre-parser/textile-js-workarounds/workarounds.raw.examples.ts
+++ /dev/null
@@ -1,150 +0,0 @@
-export const definitionList = `h3(#connection-states). Available connection states
-
-A series of connection states is defined as follows:
-
-- initialized := A @Connection@ object having this state has been initialized but no connection has yet been attempted.
-
-- connecting := A connection attempt has been initiated. The connecting state is entered as soon as the library has completed initialization, and is reentered each time connection is re-attempted following disconnection.
-
-- connected := A connection exists and is active.
-
-- disconnected := A temporary failure condition. No current connection exists because there is no network connectivity or no host is available. The disconnected state is entered if an established connection is dropped, or if a connection attempt was unsuccessful. In the disconnected state the library will periodically attempt to open a new connection (approximately every 15 seconds), anticipating that the connection will be re-established soon and thus connection and channel continuity will be possible. In this state, developers can continue to publish messages as they are automatically placed in a local queue, to be sent as soon as a connection is reestablished. Messages published by other clients whilst this client is disconnected will be delivered to it upon reconnection, so long as the connection was resumed within 2 minutes. After 2 minutes have elapsed, recovery is no longer possible and the connection will move to the @suspended@ state.
-
-- suspended := A long term failure condition. No current connection exists because there is no network connectivity or no host is available. The suspended state is entered after a failed connection attempt if there has then been no connection for a period of two minutes. In the suspended state, the library will periodically attempt to open a new connection every 30 seconds. Developers are unable to publish messages in this state. A new connection attempt can also be triggered by an explicit call to "@connect()@ @connect@ @Connect()@:#connect ":#connect on the @Connection@ object. Once the connection has been re-established, channels will be automatically re-attached. The client has been disconnected for too long for them to resume from where they left off, so if it wants to catch up on messages published by other clients while it was disconnected, it needs to use the "history API":/realtime/history.
-
-- closing := An explicit request by the developer to close the connection has been sent to the Ably service. If a reply is not received from Ably within a short period of time, the connection will be forcibly terminated and the connection state will become @closed@.
-
-- closed := The connection has been explicitly closed by the client. In the closed state, no reconnection attempts are made automatically by the library, and clients may not publish messages. No connection state is preserved by the service or by the library. A new connection attempt can be triggered by an explicit call to "@connect()@ @connect@ @Connect()@:#connect ":#connect on the @Connection@ object, which will result in a new connection.
-
-- failed := This state is entered if the client library encounters a failure condition that it cannot recover from. This may be a fatal connection error received from the Ably service (e.g. an attempt to connect with an incorrect API key), or some local terminal error (e.g. the token in use has expired and the library does not have any way to renew it). In the failed state, no reconnection attempts are made automatically by the library, and clients may not publish messages. A new connection attempt can be triggered by an explicit call to "@connect()@ @connect@ @Connect()@:#connect ":#connect on the @Connection@ object.
-`;
-
-export const expectedDefinitionList = `Available connection states
-A series of connection states is defined as follows:
-
-initialized
-A Connection object having this state has been initialized but no connection has yet been attempted.
-connecting
-A connection attempt has been initiated. The connecting state is entered as soon as the library has completed initialization, and is reentered each time connection is re-attempted following disconnection.
-connected
-A connection exists and is active.
-disconnected
-A temporary failure condition. No current connection exists because there is no network connectivity or no host is available. The disconnected state is entered if an established connection is dropped, or if a connection attempt was unsuccessful. In the disconnected state the library will periodically attempt to open a new connection (approximately every 15 seconds), anticipating that the connection will be re-established soon and thus connection and channel continuity will be possible. In this state, developers can continue to publish messages as they are automatically placed in a local queue, to be sent as soon as a connection is reestablished. Messages published by other clients whilst this client is disconnected will be delivered to it upon reconnection, so long as the connection was resumed within 2 minutes. After 2 minutes have elapsed, recovery is no longer possible and the connection will move to the suspended state.
-suspended
-A long term failure condition. No current connection exists because there is no network connectivity or no host is available. The suspended state is entered after a failed connection attempt if there has then been no connection for a period of two minutes. In the suspended state, the library will periodically attempt to open a new connection every 30 seconds. Developers are unable to publish messages in this state. A new connection attempt can also be triggered by an explicit call to connect()connectConnect():#connect on the Connection object. Once the connection has been re-established, channels will be automatically re-attached. The client has been disconnected for too long for them to resume from where they left off, so if it wants to catch up on messages published by other clients while it was disconnected, it needs to use the history API .
-closing
-An explicit request by the developer to close the connection has been sent to the Ably service. If a reply is not received from Ably within a short period of time, the connection will be forcibly terminated and the connection state will become closed.
-closed
-The connection has been explicitly closed by the client. In the closed state, no reconnection attempts are made automatically by the library, and clients may not publish messages. No connection state is preserved by the service or by the library. A new connection attempt can be triggered by an explicit call to connect()connectConnect():#connect on the Connection object, which will result in a new connection.
-failed
-This state is entered if the client library encounters a failure condition that it cannot recover from. This may be a fatal connection error received from the Ably service (e.g. an attempt to connect with an incorrect API key), or some local terminal error (e.g. the token in use has expired and the library does not have any way to renew it). In the failed state, no reconnection attempts are made automatically by the library, and clients may not publish messages. A new connection attempt can be triggered by an explicit call to connect()connectConnect():#connect on the Connection object.
- `;
-
-export const nestedH1_6String = `
- h1. Lorem ipsum
-vos populi vos dei
-calamitus calamitabandum
-
`;
-
-export const nestedH1_6Html = `
Lorem ipsum
-vos populi vos dei
-calamitus calamitabandum
-`;
-
-export const nestedDiv = `h6(#unsubscribe).
- default: unsubscribe
- csharp: Unsubscribe
-
-
-There are six three overloaded versions of this method:
-
-
-bq(definition#unsubscribe-event).
-default: unsubscribe(String name, listener)
-java: void unsubscribe(String name, "MessageListener":#message-listener listener)
-csharp: bool Unsubscribe(string eventName, Action<"Message":#message> handler)
-ruby: unsubscribe(String name, &listener_proc)
-objc,swift: unsubscribe(name: String, listener: ARTEventListener)
-
-Unsubscribe the given listener for the specified event name. This removes an earlier event-specific subscription.
-
-bq(definition#unsubscribe-listener).
-default: unsubscribe(listener)
-java: void unsubscribe("MessageListener":#message-listener listener)
-csharp: bool Unsubscribe(Action<"Message":#message> handler)
-ruby: unsubscribe(&listener_proc)
-objc,swift: unsubscribe(listener: ARTEventListener)
-
-Unsubscribe the given listener (for any/all event names). This removes an earlier subscription.
-
-
-bq(definition). unsubscribe(String[] names, listener)
-
-Unsubscribe the given listener from all event names in the array.
-
-bq(definition). unsubscribe(String name)
-
-Unsubscribe all listeners for a given event name.
-
-bq(definition). unsubscribe(String[] names)
-
-Unsubscribe all listeners for all event names in the array.
-
-
-bq(definition#unsubscribe-all).
-default: unsubscribe()
-java: void unsubscribe()
-csharp: void Unsubscribe()
-objc,swift: unsubscribe()
-
-Unsubscribes all listeners to messages on this channel. This removes all earlier subscriptions.
-
-h4. Parameters
-
-- name := The event name to unsubscribe from __Type: @String@__
-- names
:= An array of event names to unsubscribe from __Type: @String[]@__
-- listener
:= is the callback listener function that was previously subscribed
-- listener
:= previously registered listener __Type: "@MessageListener@":#message-listener__
-- &listener_block
:= previously registered listener block
-- listener
:= previous return value from a @subscribe@ call
-- handler
:= is the lambda expression that was previously subscribed
-
-@streamSubscription@ obtained from a subscription can be used to cancel a listener by calling @streamSubscription.cancel@.
-
-
-h6(#history).
-default: history
-csharp: History`;
-
-export const spanWithHashExample = `h6(#state).
-default: state
-csharp: State
-
-The current "@io.ably.lib.realtime.ChannelState@":#channel-state @state@ "@IO.Ably.Realtime.ChannelState@":#channel-state @state@ "@Ably::Realtime::Channel::STATE@":#channel-state @state@ "@ARTRealtimeChannelState@":#channel-state "@ChannelState@":#channel-state of this @Channel@. See the supported "channel states":#channel-states for more information.`;
-
-export const spanWithHashResult = `
state State
-The current io.ably.lib.realtime.ChannelState stateIO.Ably.Realtime.ChannelState stateAbly::Realtime::Channel::STATE stateARTRealtimeChannelStateChannelState of this Channel. See the supported channel states for more information.
`;
-
-export const listDivExample = `
-h4. Parameters
-
--
callback
:= is a function of the form @function(err)@ and is called once the channel attach succeeds or fails
--
&block
:= yields once the channel becomes attached
--
callback
:= is a lambda expression of the form @Action
@ and is called once the channel attach succeeds or fails
-- callback
:= called once the channel becomes attached or if an error occurs
-
`;
-
-export const listDivParsedExample = `
-
Parameters
-
- callback
- is a function of the form function(err) and is called once the channel attach succeeds or fails
- &block
- yields once the channel becomes attached
- callback
- is a lambda expression of the form Action<TimeSpan, ErrorInfo> and is called once the channel attach succeeds or fails
- callback
- called once the channel becomes attached or if an error occurs
-
-
-
`;
diff --git a/gatsby-config.ts b/gatsby-config.ts
index f1e20ddd77..cc8fca2659 100644
--- a/gatsby-config.ts
+++ b/gatsby-config.ts
@@ -121,22 +121,6 @@ export const plugins = [
__key: 'images',
},
// Data
- {
- resolve: 'gatsby-source-filesystem',
- options: {
- name: 'textile-partials',
- path: './content/partials',
- },
- __key: 'textile-partials',
- },
- {
- resolve: 'gatsby-source-filesystem',
- options: {
- name: 'textile-nanoc-compatible',
- path: './content',
- },
- __key: 'textile-nanoc-compatible',
- },
{
resolve: 'gatsby-source-filesystem',
options: {
diff --git a/index.textile b/index.textile
deleted file mode 100644
index eed05448d5..0000000000
--- a/index.textile
+++ /dev/null
@@ -1,30 +0,0 @@
----
-title: Ably API Documentation
-meta_description: "An introduction to the Ably documentation site."
-section: none
-hide_from_website: true
----
-
-h1. Ably Github Documentation (Preview)
-
-p. The definitive stable version of the "Ably realtime messaging documentation":https://ably.com/docs can be found at "https://ably.com/docs":https://ably.com/docs.
-
-This documentation is a static site generated from the Github repository at "https://github.com/ably/docs":https://github.com/ably/docs. Anyone can fork this documentation and contributions can be made via pull requests. All changes in this repository will be merged into the definitive "Ably documentation":https://ably.com/docs periodically.
-
-* "Fork this documentation now »":https://github.com/ably/docs
-* "Notify of us of an issue with this documentation »":https://github.com/ably/docs/issues
-
-h2. What's covered
-
-The Ably documentation is organized as follows:
-
-* "Getting started":/docs/getting-started
-* "Realtime client library API documentation":/docs/realtime/
-* "REST client library API documentation":/docs/rest/
-* "REST API documentation":/docs/rest-api/. Note, we recommend you use one of our REST client libraries instead of accessing the Ably REST API directly as the client libraries abstract away underlying complexity and provide a rich convenient feature set to developers.
-* More detail behind some of Ably's key features: "Authentication":/docs/auth, "Channel rules and namespaces":/docs/general/channel-rules-namespaces/, "Receiving Webhooks":/docs/general/webhooks, and "Application statistics":/docs/general/statistics/
-* Documentation targeted at client library developers including "Protocol documentation":/docs/client-lib-development-guide/protocol/, details on "Encryption":/docs/client-lib-development-guide/encryption/, and "our fallback mechanisms to ensure we can deliver on our uptime guarantee":/docs/client-lib-development-guide/connection-fallback/. Unless you are developing or extending an existing Ably client library, this documentation is most likely more low level than is needed for you to use the Ably realtime message service.
-
----
-
-"Contact us":https://ably.com/contact if you have any questions or suggestions.
diff --git a/package.json b/package.json
index d49fe77cec..d5a9feeddd 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,6 @@
"build": "yarn clean && gatsby build --prefix-paths",
"build:cli": "tsc -p .",
"build:compress": "tsc data/onPostBuild/compressAssets.ts --outDir data/onPostBuild --target es2020 --module commonjs --esModuleInterop --allowSyntheticDefaultImports",
- "debug:textile": "yarn build:cli && node ./dist/read-textile.js",
"serve": "gatsby serve --prefix-paths",
"clean": "gatsby clean",
"rebuild": "gatsby clean && gatsby build --prefix-paths && gatsby serve --prefix-paths",
@@ -91,7 +90,6 @@
"react-medium-image-zoom": "^5.1.2",
"react-select": "^5.7.0",
"remark-gfm": "^1.0.0",
- "textile-js": "^2.1.1",
"turndown": "^7.1.1",
"typescript": "^4.6.3",
"use-keyboard-shortcut": "^1.1.6",
diff --git a/read-textile.ts b/read-textile.ts
deleted file mode 100755
index a0e2d58ad9..0000000000
--- a/read-textile.ts
+++ /dev/null
@@ -1,235 +0,0 @@
-import readline from 'readline';
-import util from 'util';
-import fs from 'fs';
-import Turndown from 'turndown';
-import * as Diff from 'diff';
-
-import {
- textileToHtml,
- textileToCheerio,
- processTextile,
- fullyParseTextile,
-} from './data/test-utilities/process-textile';
-import { preParserSteps, Step } from './data/cli-functionality/parser-steps/pre-parser';
-import { textileWorkaroundSteps } from './data/cli-functionality/parser-steps/textile-workarounds';
-import { postParserSteps } from './data/cli-functionality/parser-steps/post-parser';
-import { htmlParserSteps } from './data/cli-functionality/parser-steps/html-parser';
-/**
- * Flags:
- * --diff - output each step with the difference to the last step highlighted
- * --diffOnly - output only the difference between each step
- */
-
-process.on('exit', () => fs.rmSync('./dist', { recursive: true, force: true }));
-
-const argsToRead = process.argv
- .slice(2)
- .filter((arg) => !arg.startsWith('--'))
- .map((arg) => {
- try {
- const content = fs.readFileSync(arg);
- return content.toString();
- } catch (e) {
- //Fine to ignore.
- }
- return arg;
- })
- .map((arg) => arg.replace(/\\n/g, '\n'));
-
-const flags: Record = process.argv
- .slice(2)
- .filter((arg) => arg.startsWith('--'))
- .reduce((acc, arg) => {
- const [key, value] = arg.replace(/^--/, '').split('=');
- return {
- ...acc,
- [key]: value ?? true,
- };
- }, {});
-
-const rl = readline.createInterface({
- input: process.stdin,
- output: process.stdout,
-});
-
-const question = util.promisify(rl.question).bind(rl);
-
-const turndownService = new Turndown();
-turndownService.keep(['div', 'span']);
-
-const queryUser = async (query: string, outputHandler: (answer: string) => void) => {
- rl.question(query, outputHandler);
-};
-
-const logFunctionWithDescription = (step: Step) => {
- console.log(step.fn);
- if (step.description) {
- console.log(`\n\x1b[33m${step.description}\x1b[0m\n`);
- }
-};
-
-const executeSequentially = (queries: string[], outputHandlers: ((answer: string) => void)[]) => {
- queries.forEach(async (query, i) => await queryUser(query, outputHandlers[i]));
-};
-
-const steps = [...preParserSteps, ...textileWorkaroundSteps, ...postParserSteps, ...htmlParserSteps];
-
-const logArgProcessingError = (name: string, arg: string, i: number) =>
- console.error(`\n\nError processing ${name} ${i + 1}:\n${arg}\n`);
-
-const diffText = (oldText: string, newText: string) => {
- const diffResult = Diff.diffLines(oldText, newText);
- diffResult.forEach((diffPart) => {
- const color = diffPart.added ? '\x1b[32m' : diffPart.removed ? '\x1b[31m' : '\x1b[1;30m';
- console.log(`${color}${diffPart.value}\x1b[0m`);
- });
-};
-
-const diffOnlyText = (oldText: string, newText: string) => {
- const diffResult = Diff.diffLines(oldText, newText);
- diffResult.forEach((diffPart) => {
- if (diffPart.added) {
- console.log(`${'\x1b[32m'}${diffPart.value}\x1b[0m`);
- } else if (diffPart.removed) {
- console.log(`${'\x1b[31m'}${diffPart.value}\x1b[0m`);
- }
- });
-};
-
-const initialQuery = ['How would you like to debug the textile? (h)tml, (m)arkdown, (s)tep by step or (a)dvanced?'];
-const initialOutputHandler = [
- async (answer: string) => {
- switch (answer) {
- case 'h':
- argsToRead.forEach((arg, i) => {
- console.log('\nHTML mode\n');
- try {
- if (flags.diff) {
- diffText(arg, textileToHtml(arg));
- } else if (flags.diffOnly) {
- diffOnlyText(arg, textileToHtml(arg));
- } else {
- console.log(`\n${textileToHtml(arg)}\n`);
- }
- } catch (e) {
- logArgProcessingError('argument', arg, i);
- console.error(e);
- }
- });
- process.exit();
- break;
- case 'm':
- argsToRead.forEach((arg, i) => {
- console.log('\nMarkdown mode\n');
- try {
- const markdown = turndownService.turndown(textileToHtml(arg));
- if (flags.diff) {
- diffText(arg, markdown);
- } else if (flags.diffOnly) {
- diffOnlyText(arg, markdown);
- } else {
- console.log(`\n${markdown}\n`);
- }
- } catch (e) {
- logArgProcessingError('argument', arg, i);
- console.error(e);
- }
- });
- process.exit();
- break;
- case 's':
- console.log('\nStep by step mode - \n\x1b[33mwill only operate on first argument provided\x1b[0m\n\n');
- // eslint-disable-next-line no-case-declarations
- let result = argsToRead[0];
- // eslint-disable-next-line no-case-declarations
- const recursivelyReadSteps = async (i: number) => {
- if (i >= steps.length) {
- return;
- }
- const step = steps[i];
- try {
- console.log(`\nOutput on step ${i + 1}\n`);
- logFunctionWithDescription(step);
- if (flags.diff) {
- const nextResult = step.fn(result);
- diffText(result, nextResult);
- result = nextResult;
- logFunctionWithDescription(step);
- } else if (flags.diffOnly) {
- const nextResult = step.fn(result);
- diffOnlyText(result, nextResult);
- result = nextResult;
- } else {
- result = step.fn(result);
- console.log(`\x1b[32m${result}\x1b[0m\n`);
- }
- const possiblyQuit = await question('Press enter to proceed, q to quit: ');
- // @ts-ignore
- if (possiblyQuit === 'q') {
- process.exit();
- }
- await recursivelyReadSteps(i + 1);
- } catch (e) {
- logArgProcessingError('argument', result, 0);
- logArgProcessingError('step', step.description ?? step.fn.prototype?.name ?? '', i);
- console.error(e);
- return;
- }
- return result;
- };
- await recursivelyReadSteps(0);
- process.exit();
- break;
- case 'a':
- // eslint-disable-next-line no-case-declarations
- const selected = await question(
- '\nSelecting from advanced modes, (c)heerio rendered into html, (a)rray of cheerio values, (f)inal objects:',
- );
- switch (selected) {
- // @ts-ignore
- case 'c':
- argsToRead.forEach((arg, i) => {
- try {
- console.log(`\n${textileToCheerio(arg)}\n`);
- } catch (e) {
- logArgProcessingError('argument', arg, i);
- console.error(e);
- }
- });
- break;
- // @ts-ignore
- case 'a':
- argsToRead.forEach((arg, i) => {
- try {
- console.log('\n');
- console.log(processTextile(arg));
- console.log('\n');
- } catch {
- logArgProcessingError('argument', arg, i);
- }
- });
- break;
- // @ts-ignore
- case 'f':
- argsToRead.forEach((arg, i) => {
- try {
- console.log(`\n${JSON.stringify(fullyParseTextile(arg), null, ' ')}\n`);
- } catch {
- logArgProcessingError('argument', arg, i);
- }
- });
- break;
- default:
- process.exit();
- break;
- }
- process.exit();
- break;
- default:
- process.exit();
- break;
- }
- },
-];
-
-executeSequentially(initialQuery, initialOutputHandler);
diff --git a/src/components/blocks/external-references/AElementHelpers/check-link-is-internal.test.ts b/src/components/blocks/external-references/AElementHelpers/check-link-is-internal.test.ts
index b04e2b85d4..86d1833b5a 100644
--- a/src/components/blocks/external-references/AElementHelpers/check-link-is-internal.test.ts
+++ b/src/components/blocks/external-references/AElementHelpers/check-link-is-internal.test.ts
@@ -1,4 +1,4 @@
-import { assert, constantFrom, property, tuple, webPath, webUrl } from 'fast-check';
+import { assert, property, webPath, webUrl } from 'fast-check';
import { checkLinkIsInternal } from './check-link-is-internal';
describe('Check link is internal: unit tests', () => {
diff --git a/src/components/blocks/wrappers/ConditionalChildrenLanguageDisplay.test.js b/src/components/blocks/wrappers/ConditionalChildrenLanguageDisplay.test.js
deleted file mode 100644
index 556f026c0a..0000000000
--- a/src/components/blocks/wrappers/ConditionalChildrenLanguageDisplay.test.js
+++ /dev/null
@@ -1,128 +0,0 @@
-import React from 'react';
-import TestRenderer from 'react-test-renderer';
-import cheerio from 'cheerio';
-import { DEFAULT_LANGUAGE } from '../../../../data/createPages/constants';
-import textile from 'textile-js';
-import { htmlParser } from '../../../../data/html-parser';
-import { liftLangAttributes } from '../../../../data/html-parser/lift-lang-attributes';
-import { postParser } from '../../../../data/transform/post-parser';
-import { preParser } from '../../../../data/transform/pre-parser';
-import ConditionalChildrenLanguageDisplay from './ConditionalChildrenLanguageDisplay';
-import { defaultBlocksFromData } from '../create-blocks/default-blocks-from-data';
-
-const rawData = `
-- callback
:= is a function of the form @function(err)@ which is called upon completion
-- listener
:= Listener to be notified on completion __Type: "@CompletionListener@":#completion-listener__
-- callback
:= is an action of the form @Action@ which is called upon completion
-- &block
:= yields upon successfully publishing the message
-- callback
:= called upon publishing the message, or with an error
-`;
-
-const twoChildrenInstance = TestRenderer.create(
-
- {defaultBlocksFromData([
- {
- name: 'span',
- data: 'content',
- attribs: { lang: DEFAULT_LANGUAGE },
- },
- {
- name: 'span',
- data: 'alternative',
- attribs: { lang: 'javascript' },
- },
- ])}
- ,
-).root;
-
-const sameLanguageTwoChildrenInstance = TestRenderer.create(
-
- {defaultBlocksFromData([
- {
- name: 'span',
- data: 'content',
- attribs: { lang: 'javascript' },
- },
- {
- name: 'span',
- data: 'alternative',
- attribs: { lang: 'javascript' },
- },
- ])}
- ,
-).root;
-
-describe('ConditionalChildrenLanguageDisplay only displays one child of alternatives', () => {
- it('A basic instance of two children with different lang attributes only shows the default language option', () => {
- expect(twoChildrenInstance.findAllByType('span')).toHaveLength(1);
- });
-
- it('Two different instances in a row shows both language options', () => {
- expect(sameLanguageTwoChildrenInstance.findAllByType('span')).toHaveLength(2);
- });
-});
-
-describe('Integration: ConditionalChildrenLanguageDisplay only displays one pair of children from alternatives for parsed definition lists', () => {
- const parsedData = postParser(textile(preParser(rawData)));
- it('Text parser stage returns expected results', () => {
- expect(parsedData.replace(/\s/g, '')).toEqual(
- `
- callback
- is a function of the form function(err) which is called upon completion
- listener
- Listener to be notified on completionType: CompletionListener
- callback
- is an action of the form Action<bool, ErrorInfo> which is called upon completion
- &block
- yields upon successfully publishing the message
- callback
- called upon publishing the message, or with an error
- `.replace(/\s/g, ''),
- );
- });
-
- // cf. lift-language-attributes.test.js
- // Included here to allow for easy debugging of which particular stage of the process is broken
- it('Lift language attributes stage returns expected results', () => {
- const loadedDom = cheerio.load(parsedData, null);
- liftLangAttributes(loadedDom);
- expect(loadedDom('body *').html().replace(/\s/g, '')).toEqual(
- `callback
is a function of the form function(err) which is called upon completion
-
- callback
is an action of the form Action<bool, ErrorInfo> which is called upon completion
- &block
yields upon successfully publishing the message
- callback
called upon publishing the message, or with an error
-`.replace(/\s/g, ''),
- );
- });
-
- const htmlParsed = htmlParser(parsedData);
- it('HTML parser stage returns expected results', () => {
- expect(htmlParsed[0].data[0].data).toEqual(
- expect.arrayContaining([
- expect.objectContaining({
- attribs: { lang: 'nodejs' },
- name: 'div',
- data: expect.arrayContaining([
- expect.objectContaining({
- name: 'dt',
- }),
- expect.objectContaining({
- name: 'dd',
- }),
- ]),
- }),
- ]),
- );
- });
-
- it('ConditionalChildrenLanguageDisplay displays the expected results from HTML data', () => {
- const renderedData = TestRenderer.create(
- {defaultBlocksFromData(htmlParsed)} ,
- );
- const tree = renderedData.toJSON();
- expect(tree).toMatchSnapshot();
- expect(renderedData.root.findAllByType('dt')).toHaveLength(1);
- expect(renderedData.root.findAllByType('dd')).toHaveLength(1);
- });
-});
diff --git a/src/components/blocks/wrappers/__snapshots__/ConditionalChildrenLanguageDisplay.test.js.snap b/src/components/blocks/wrappers/__snapshots__/ConditionalChildrenLanguageDisplay.test.js.snap
deleted file mode 100644
index 159ca3d19c..0000000000
--- a/src/components/blocks/wrappers/__snapshots__/ConditionalChildrenLanguageDisplay.test.js.snap
+++ /dev/null
@@ -1,52 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Integration: ConditionalChildrenLanguageDisplay only displays one pair of children from alternatives for parsed definition lists ConditionalChildrenLanguageDisplay displays the expected results from HTML data 1`] = `
-
-
-
-
-
-
- callback
-
-
-
- is a function of the form
-
- function(err)
-
- which is called upon completion
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
diff --git a/src/pages/docs/404.js b/src/pages/docs/404.js
index 446290397a..fcd07fa7ad 100644
--- a/src/pages/docs/404.js
+++ b/src/pages/docs/404.js
@@ -11,19 +11,8 @@ const NotFoundPage = () => {
{process.env.NODE_ENV === 'development' ? (
<>
- Try creating a new page in:
-
-
- src/pages/: for specific pages
-
-
- data/textile/nanoc-compatible: for complete textile pages
-
-
- data/textile/partials: for reusable textile sections &endash; ask if there's a
- preferred alternative first.
-
-
+ Try creating a new page in src/pages/ for specific pages, or using MDX in how-tos/
+ .
>
) : null}
diff --git a/writing-style-guide.md b/writing-style-guide.md
index 6c57f59d8e..adf326c3b3 100644
--- a/writing-style-guide.md
+++ b/writing-style-guide.md
@@ -2,7 +2,7 @@
These are technical writing guidelines that should be used for Ably's developer documentation.
-This guide does not cover the details of marking up content source. See the [documentation formatting guide](https://github.com/ably/docs/blob/main/content/client-lib-development-guide/documentation-formatting-guide.textile) for the latest details on how to markup source content.
+This guide does not cover the details of marking up content source. See the [CONTRIBUTING.md](CONTRIBUTING.md) guide for details on content formatting.
Some of the benefits of using this style guide are:
diff --git a/yarn.lock b/yarn.lock
index d08139af4f..5257b837ea 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -15678,11 +15678,6 @@ text-table@^0.2.0:
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==
-textile-js@^2.1.1:
- version "2.1.1"
- resolved "https://registry.npmjs.org/textile-js/-/textile-js-2.1.1.tgz"
- integrity sha512-6yP8bPtL364lb/Pu9IQh/pu9aFXQN2VSUQrzVtOrjQs0pSc+jX0iczNPcMn5+MNvmoP3piCPxFb0hPBS7DmfFg==
-
thenify-all@^1.0.0:
version "1.6.0"
resolved "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz"