Skip to content

Commit 385e10f

Browse files
committed
fix: update all links in Chat API refs
1 parent 8067557 commit 385e10f

File tree

13 files changed

+160
-160
lines changed

13 files changed

+160
-160
lines changed

src/pages/docs/chat/api/javascript/auth.mdx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Authentication
33
meta_description: ""
44
---
55

6-
The [ChatClient](/docs/chat/api/javascript/chat-client) requires a realtime client generated by the core [Pub/Sub SDK](LINK) to establish a connection with Ably. This realtime client is used to handle authentication with Ably.
6+
The [ChatClient](/docs/chat/api/javascript/chat-client) requires a realtime client generated by the core [Pub/Sub SDK](/docs/basics) to establish a connection with Ably. This realtime client is used to handle authentication with Ably.
77

88
There are broadly three mechanisms of authentication with Ably:
99

@@ -27,7 +27,7 @@ Use the following parameters:
2727

2828
| Parameter | Description | Type |
2929
| --------- | ----------- | ---- |
30-
| `clientOptions` | The options to pass to customize the client connection. | [`ClientOptions`](#clientoptions) |
30+
| `clientOptions` | The options to pass to customize the client connection. | [`ClientOptions`](#ClientOptions) |
3131

3232
### ClientOptions
3333

@@ -66,7 +66,7 @@ Instructs the SDK to fetch a new Ably Token or JWT.
6666

6767
It upgrades the current realtime connection to use the new token if the client is already connected. If they haven't yet connected then it initiates a connection to Ably.
6868

69-
Any [`TokenParams`](#tokenparams) and [`AuthOptions`](#authoptions) will be used as the new defaults for subsequent implicit and explicit token requests. They also entirely replace, as opposed to merging with, the current stored values.
69+
Any [`TokenParams`](#TokenParams) and [`AuthOptions`](#AuthOptions) will be used as the new defaults for subsequent implicit and explicit token requests. They also entirely replace, as opposed to merging with, the current stored values.
7070

7171
`authorize(TokenParams tokenParams?, AuthOptions authOptions?): Promise<TokenDetails>`
7272

@@ -76,8 +76,8 @@ Use the following parameters:
7676

7777
| Parameter | Description | Type |
7878
| --------- | ----------- | ---- |
79-
| `tokenParams` | *Optional* The parameters of the token for the request. | [`TokenParams`](#tokenparams) |
80-
| `authOptions` | *Optional* The authentication options for the request. | [`AuthOptions`](#authoptions) |
79+
| `tokenParams` | *Optional* The parameters of the token for the request. | [`TokenParams`](#TokenParams) |
80+
| `authOptions` | *Optional* The authentication options for the request. | [`AuthOptions`](#AuthOptions) |
8181

8282
#### TokenParams
8383

@@ -106,7 +106,7 @@ It has the following properties:
106106
| `authMethod` | *Optional* The HTTP method to use for `authUrl` requests. Either `GET` or `POST`. The default is `GET`. | String |
107107
| `authHeaders` | *Optional* A set of key-value pair headers to add to `authUrl` requests. | Object |
108108
| `authParams` | *Optional* A set of key-value pairs to add to `authUrl` requests. When the `authMethod` is `GET` params are added to the URL. When the `authMethod` is `POST` they are sent as URL-encoded form data. | Object |
109-
| `tokenDetails` | *Optional* An authenticated `TokenDetails` object. This is commonly used in testing. In production it is preferable to use a method that renews the token automatically since they are short-lived. | [`TokenDetails`](#tokendetails) |
109+
| `tokenDetails` | *Optional* An authenticated `TokenDetails` object. This is commonly used in testing. In production it is preferable to use a method that renews the token automatically since they are short-lived. | [`TokenDetails`](#TokenDetails) |
110110
| `key` | *Optional* A full API key string. Used for basic authentication requests. | String |
111111
| `token` | *Optional* An authenticated token. Either a `TokenDetails` object, a token string from the `token` property of a `TokenDetails` component of a `TokenRequest` response, or a JWT. This is commonly used in testing. In production it is preferable to use a method that renews the token automatically since they are short-lived. | String \| Object |
112112
| `queryTime` | *Optional* If `true`, queries Ably for the current time when issuing `TokenRequests`. The default is `false`. | Boolean |
@@ -128,7 +128,7 @@ It has the following properties:
128128

129129
#### TokenRequest
130130

131-
Contains the properties of a request for a token to Ably. Tokens are generated using [`requestToken()`](#requesttoken).
131+
Contains the properties of a request for a token to Ably. Tokens are generated using [`requestToken()`](#RequestToken).
132132

133133
It has the following properties:
134134

@@ -144,15 +144,15 @@ It has the following properties:
144144

145145
### Returns
146146

147-
Returns a promise. On success, the promise is fulfilled with the new [`TokenDetails`](#tokendetails) once the connection has been upgraded or initiated. On failure, the connection will move to the `SUSPENDED` or `FAILED` state, and the promise will be rejected with an [`ErrorInfo`](/docs/chat/api/javascript/error-info) object which explains the error.
147+
Returns a promise. On success, the promise is fulfilled with the new [`TokenDetails`](#TokenDetails) once the connection has been upgraded or initiated. On failure, the connection will move to the `SUSPENDED` or `FAILED` state, and the promise will be rejected with an [`ErrorInfo`](/docs/chat/api/javascript/error-info) object which explains the error.
148148

149149
---
150150

151151
## Create a tokenRequest <a id="createTokenRequest"/>
152152

153153
`auth.createTokenRequest()`
154154

155-
Creates and signs an Ably [`TokenRequest`](#tokenrequest) based on the specified [`TokenParams`](#tokenparams) and [`AuthOptions`](#authoptions). If no `TokenParams` or `AuthOptions` are specified it will use those already stored by the SDK, set in the [`ClientOptions`](#clientoptions) when the SDK was instantiated or updated via an [`authorize()`](#authorize) request. New values replace the existing ones rather than merging with them.
155+
Creates and signs an Ably [`TokenRequest`](#TokenRequest) based on the specified [`TokenParams`](#TokenParams) and [`AuthOptions`](#AuthOptions). If no `TokenParams` or `AuthOptions` are specified it will use those already stored by the SDK, set in the [`ClientOptions`](#ClientOptions) when the SDK was instantiated or updated via an [`authorize()`](#Authorize) request. New values replace the existing ones rather than merging with them.
156156

157157
`createTokenRequest(TokenParams tokenParams?, AuthOptions authOptions?): Promise<TokenRequest>`
158158

@@ -162,20 +162,20 @@ Use the following parameters:
162162

163163
| Parameter | Description | Type |
164164
| --------- | ----------- | ---- |
165-
| `tokenParams` | *Optional* The parameters of the token for the request. | [`TokenParams`](#tokenparams) |
166-
| `authOptions` | *Optional* The authentication options for the request. | [`AuthOptions`](#authoptions) |
165+
| `tokenParams` | *Optional* The parameters of the token for the request. | [`TokenParams`](#TokenParams) |
166+
| `authOptions` | *Optional* The authentication options for the request. | [`AuthOptions`](#AuthOptions) |
167167

168168
### Returns
169169

170-
Returns a promise. On success it will be fulfilled with a [`TokenRequest`](#tokenrequest) object. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/chat/api/javascript/error-info) object which explains the error.
170+
Returns a promise. On success it will be fulfilled with a [`TokenRequest`](#TokenRequest) object. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/chat/api/javascript/error-info) object which explains the error.
171171

172172
---
173173

174174
## Request a token <a id="requesttoken"/>
175175

176176
`auth.requestToken()`
177177

178-
Calls the `requestToken` endpoint to obtain an Ably Token according to the specified [`TokenParams`](#tokenparams) and [`AuthOptions`](#authoptions). If no `TokenParams` or `AuthOptions` are specified it will use those already stored by the SDK, set in the [`ClientOptions`](#clientoptions) when the SDK was instantiated or updated via an [`authorize()`](#authorize) request. New values replace the existing ones rather than merging with them.
178+
Calls the `requestToken` endpoint to obtain an Ably Token according to the specified [`TokenParams`](#TokenParams) and [`AuthOptions`](#AuthOptions). If no `TokenParams` or `AuthOptions` are specified it will use those already stored by the SDK, set in the [`ClientOptions`](#ClientOptions) when the SDK was instantiated or updated via an [`authorize()`](#Authorize) request. New values replace the existing ones rather than merging with them.
179179

180180
`requestToken(TokenParams tokenParams?, AuthOptions authOptions?): Promise<TokenDetails>`
181181

@@ -185,9 +185,9 @@ Use the following parameters:
185185

186186
| Parameter | Description | Type |
187187
| --------- | ----------- | ---- |
188-
| `tokenParams` | *Optional* The parameters of the token for the request. | [`TokenParams`](#tokenparams) |
189-
| `authOptions` | *Optional* The authentication options for the request. | [`AuthOptions`](#authoptions) |
188+
| `tokenParams` | *Optional* The parameters of the token for the request. | [`TokenParams`](#TokenParams) |
189+
| `authOptions` | *Optional* The authentication options for the request. | [`AuthOptions`](#AuthOptions) |
190190

191191
### Returns
192192

193-
Returns a promise. On success it will be fulfilled with a [`TokenDetails`](#tokendetails) object. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/chat/api/javascript/error-info) object which explains the error.
193+
Returns a promise. On success it will be fulfilled with a [`TokenDetails`](#TokenDetails) object. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/chat/api/javascript/error-info) object which explains the error.

src/pages/docs/chat/api/javascript/chat-client.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ The `ChatClient` class is the core client for Ably Chat.
1212
| Property | Description | Type |
1313
| -------- | ----------- | ---- |
1414
| `clientId` | The clientId of the current client. | String |
15-
| `clientOptions` | The resolved client options for the client, including any defaults that have been set. | [`ChatClientOptions`](#chatclientoptions) |
15+
| `clientOptions` | The resolved client options for the client, including any defaults that have been set. | [`ChatClientOptions`](#ChatClientOptions) |
1616
| `connection` | The underlying connection to Ably, which can be used to monitor the client's connection to Ably servers. | [`Connection`](/docs/chat/api/javascript/connection) |
17-
| `realtime` | The underlying Ably Realtime client. | [`Realtime`](#realtime) |
17+
| `realtime` | The underlying Ably Realtime client. | [`Realtime`](#Realtime) |
1818
| `rooms` | The rooms object, which provides access to chat rooms. | [`Rooms`](/docs/chat/api/javascript/rooms) |
1919

2020
---
@@ -33,17 +33,17 @@ Use the following parameters:
3333

3434
| Parameter | Description | Type |
3535
| --------- | ----------- | ---- |
36-
| `realtime` | The Ably Realtime client. | [`Realtime`](https://sdk.ably.com/builds/ably/ably-js/main/typedoc/) |
37-
| `clientOptions` | *Optional* The client options. | [`ChatClientOptions`](#chatclientoptions) |
36+
| `realtime` | The Ably Realtime client. | [`Realtime`](#Realtime) |
37+
| `clientOptions` | *Optional* The client options. | [`ChatClientOptions`](#ChatClientOptions) |
3838

3939
#### ChatClientOptions
4040

4141
The following `ChatClientOptions` can be set:
4242

4343
| Properties | Description | Type |
4444
| ---------- | ----------- | ---- |
45-
| `logLevel` | *Optional* The logging level to use. The default is `LogLevel.Error`. | [`LogLevel`](#loglevel) |
46-
| `logHandler` | *Optional* A custom log handler. The default behavior will log messages to the console. | [`LogHandler`](#loghandler) |
45+
| `logLevel` | *Optional* The logging level to use. The default is `LogLevel.Error`. | [`LogLevel`](#LogLevel) |
46+
| `logHandler` | *Optional* A custom log handler. The default behavior will log messages to the console. | [`LogHandler`](#LogHandler) |
4747

4848
#### LogLevel
4949

@@ -73,8 +73,8 @@ Use the following parameters:
7373
| Parameter | Description | Type |
7474
| --------- | ----------- | ---- |
7575
| `message` | The message being logged. | String |
76-
| `logLevel` | The log level of the message. | [`LogLevel`](#loglevel) |
77-
| `context` | *Optional* The context of the log message as key-value pairs. | [`LogContext`](#logcontext) |
76+
| `logLevel` | The log level of the message. | [`LogLevel`](#LogLevel) |
77+
| `context` | *Optional* The context of the log message as key-value pairs. | [`LogContext`](#LogContext) |
7878

7979
#### LogContext
8080

@@ -102,7 +102,7 @@ const chatClient = new ChatClient(realtimeClient, {
102102

103103
## Realtime
104104

105-
The Chat constructor requires a realtime client generated using the core [Pub/Sub SDK]() to establish a connection with Ably. The realtime client handles [authentication](/docs/chat/api/javascript/auth) with Ably.
105+
The Chat constructor requires a realtime client generated using the core [Pub/Sub SDK](/docs/basics) to establish a connection with Ably. The realtime client handles [authentication](/docs/chat/api/javascript/auth) with Ably.
106106

107107
`new Ably.Realtime(ClientOptions clientOptions)`
108108

@@ -112,7 +112,7 @@ Use the following parameters:
112112

113113
| Parameter | Description | Type |
114114
| --------- | ----------- | ---- |
115-
| `clientOptions` | The options to pass to customize the client connection. | [`ClientOptions`](#clientoptions) |
115+
| `clientOptions` | The options to pass to customize the client connection. | [`ClientOptions`](#ClientOptions) |
116116

117117
### ClientOptions
118118

src/pages/docs/chat/api/javascript/connection.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Access it via `chatClient.connection`.
1414
| Property | Description | Type |
1515
| -------- | ----------- | ---- |
1616
| `error` | The current error, if any, that caused the connection to enter the current status. | [`ErrorInfo`](/docs/chat/api/javascript/error-info) \| `undefined` |
17-
| `status` | The current status of the connection. | [`ConnectionStatus`](#connectionstatus) |
17+
| `status` | The current status of the connection. | [`ConnectionStatus`](#ConnectionStatus) |
1818

1919
---
2020

@@ -47,7 +47,7 @@ Use the following parameters:
4747

4848
| Parameter | Description | Type |
4949
| --------- | ----------- | ---- |
50-
| `listener` | The function to call when the status changes. | [`ConnectionStatusListener`](#connectionstatuslistener) |
50+
| `listener` | The function to call when the status changes. | [`ConnectionStatusListener`](#ConnectionStatusListener) |
5151

5252
#### ConnectionStatusListener
5353

@@ -59,7 +59,7 @@ It uses the following parameters:
5959

6060
| Parameter | Description | Type |
6161
| --------- | ----------- | ---- |
62-
| `change` | The change in connection status. | [`ConnectionStatusChange`](#connectionstatuschange) |
62+
| `change` | The change in connection status. | [`ConnectionStatusChange`](#ConnectionStatusChange) |
6363

6464
#### ConnectionStatusChange
6565

@@ -69,14 +69,14 @@ It has the following properties:
6969

7070
| Property | Description | Type |
7171
| -------- | ----------- | ---- |
72-
| `previous` | The previous connection status. | [`ConnectionStatus`](#connectionstatus) |
73-
| `current` | The current connection status. | [`ConnectionStatus`](#connectionstatus) |
72+
| `previous` | The previous connection status. | [`ConnectionStatus`](#ConnectionStatus) |
73+
| `current` | The current connection status. | [`ConnectionStatus`](#ConnectionStatus) |
7474
| `reason` | *Optional* The error that caused the change, if any. | [`ErrorInfo`](/docs/chat/api/javascript/error-info) |
7575
| `timestamp` | The time at which the status change occurred. | Date |
7676

7777
### Returns
7878

79-
Returns a [`StatusSubscription`](/docs/chat/api/javascript/subscriptions#statussubscription) object that can be used to unregister the listener.
79+
Returns a [`StatusSubscription`](/docs/chat/api/javascript/subscriptions#StatusSubscription) object that can be used to unregister the listener.
8080

8181
<Code>
8282
```javascript

0 commit comments

Comments
 (0)