Skip to content

Merge main into integration/liveobjects #2542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 93 commits into
base: integration/liveobjects
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
000ba48
chore(deps): bump next from 15.1.7 to 15.2.3 in /examples
dependabot[bot] Mar 21, 2025
a2726d0
chore: Update Inkeep to cxkit 0.5.36
matt423 Mar 25, 2025
1c09fd9
Merge pull request #2493 from ably/web-4277-upgrade-inkeep
matt423 Mar 26, 2025
841649b
Merge branch 'main' into dependabot/npm_and_yarn/examples/next-15.2.3
GregHolmes Mar 28, 2025
2bd50ed
Merge pull request #2488 from ably/dependabot/npm_and_yarn/examples/n…
GregHolmes Mar 28, 2025
e79ecf8
fix: use character encodings for double quotes in subscribe textile t…
jamiehenson Mar 28, 2025
ad036de
Merge pull request #2501 from ably/update-capabilities-syntax
jamiehenson Mar 28, 2025
b5fdb2e
fix: cap redoc max width to viewport
jamiehenson Mar 28, 2025
ee739e9
fix: modify code block truncation to only match real api key structure
jamiehenson Mar 28, 2025
dc5d5ce
Merge pull request #2498 from ably/control-api-width-fix
jamiehenson Mar 28, 2025
7494c39
feat: expose current page product and language in layout context
jamiehenson Feb 25, 2025
217bf69
chore: remove PageLanguage context
jamiehenson Mar 28, 2025
daf72bd
fix: allow navigation to unrepresented language in languageselector
jamiehenson Mar 28, 2025
7279370
chore: update tests post PageLanguageProvider removal
jamiehenson Mar 28, 2025
0c5a8ad
Merge pull request #2500 from ably/persistent-lang
jamiehenson Mar 31, 2025
7497ace
Update Stats docs
mattheworiordan Mar 22, 2025
de7a126
Merge pull request #2489 from ably/stats-docs-fixes-2025-03
GregHolmes Mar 31, 2025
57148fd
fix: enforce remounting of inkeep search bar
jamiehenson Mar 31, 2025
1f70f8a
Merge pull request #2504 from ably/web-4296-remount-inkeep-bar
kennethkalmer Mar 31, 2025
eec24d7
chore: Upgrade ably-ui 16.0.2 with updated header and remove unused m…
aralovelace Mar 27, 2025
8840fb5
Merge pull request #2495 from ably/WEB-4266_ablyui-16.0.0
aralovelace Apr 2, 2025
fb0ed73
Add contributing guide for examples
GregHolmes Mar 26, 2025
1c9bc3a
Merge pull request #2494 from ably/EDU-1821-Create-a-guide-for-contri…
GregHolmes Apr 3, 2025
cbd8a8f
chore: rewrite all next projects to vite, deduplicate configs
jamiehenson Mar 19, 2025
4447aa8
Merge pull request #2491 from ably/web-4086-next-to-vite
jamiehenson Apr 3, 2025
16950d8
Fixed issue where users cursor was not rendering
GregHolmes Apr 2, 2025
3e042db
MongoDB LiveSync connector is not Beta
zknill Apr 2, 2025
d0bbd2c
Merge pull request #2508 from ably/mongodb-not-beta-status
GregHolmes Apr 4, 2025
9d1e8c9
Update React Live Cursors example to not render a custom cursor for t…
GregHolmes Apr 4, 2025
03757c0
Merge branch 'main' into EDU-1887-Fix-spaces-live-cursors-JS-example
GregHolmes Apr 4, 2025
d8878f5
Merge pull request #2507 from ably/EDU-1887-Fix-spaces-live-cursors-J…
GregHolmes Apr 4, 2025
0c9e27d
chore(deps-dev): bump vite from 4.5.6 to 4.5.11 in /how-tos/pub-sub
dependabot[bot] Apr 3, 2025
5cb25a2
Merge pull request #2506 from ably/dependabot/npm_and_yarn/how-tos/pu…
m-hulbert Apr 8, 2025
4707a75
chore(deps-dev): bump vite from 4.5.11 to 4.5.12 in /how-tos/pub-sub
dependabot[bot] Apr 8, 2025
c893bd6
Merge pull request #2514 from ably/dependabot/npm_and_yarn/how-tos/pu…
m-hulbert Apr 8, 2025
e6a3d04
add batch push publish docs
owenpearson Mar 13, 2025
e41e03d
Merge pull request #2480 from ably/batch-push
owenpearson Apr 8, 2025
4532625
fix: inline code blocks inside anchors should inherit colour
kennethkalmer Apr 9, 2025
587b908
Merge pull request #2516 from ably/WEB-4315-code-inside-anchors
kennethkalmer Apr 9, 2025
64fa8da
feat: Add Inkeep intent configuration
matt423 Apr 8, 2025
7114b58
chore: Update Inkeep avatar image
matt423 Apr 8, 2025
3abce23
Merge pull request #2515 from ably/web-4280-inkeep-intent
matt423 Apr 9, 2025
2f80435
content: add architecture overview
mschristensen Mar 27, 2025
df05d65
Merge pull request #2496 from ably/feature/PUB-1564-architecture-docs
m-hulbert Apr 9, 2025
744828f
Clarify upgrade and downgrading packages
m-hulbert Apr 9, 2025
42ae225
Merge pull request #2518 from ably/edu-1839-pricing-packages
m-hulbert Apr 10, 2025
61ccf93
Add link to Control API schema in rendered reference
m-hulbert Apr 9, 2025
0f028f4
Merge pull request #2519 from ably/edu-1884-control-api-schema
m-hulbert Apr 10, 2025
87280d8
Add deprecation policy
m-hulbert Apr 7, 2025
f275964
Add deprecation notice for protocol v1
m-hulbert Apr 7, 2025
cd6d80b
Create products and sdk section for deprecation policy and notice
m-hulbert Apr 7, 2025
52a8f2f
Merge pull request #2510 from ably/edu-1921-deprecation-section
m-hulbert Apr 10, 2025
b03766f
feat: remove batchingPolicy from the controlapi docs
denissellu Jan 30, 2025
2211525
feat: add new fields for conflation
denissellu Jan 30, 2025
63655cf
Merge pull request #2416 from ably/WEB-4194-conflation-control-api
m-hulbert Apr 10, 2025
00e5284
EDU-1883: Adds new ttl line of code
franrob-projects Apr 9, 2025
de4593a
Merge pull request #2517 from ably/EDU-1883-Callout-in-web-push
m-hulbert Apr 10, 2025
d8d9f71
fix: remove old homepage.yaml
m-hulbert Apr 11, 2025
512b43c
docs: Add REST API documentation for message history, sending, updati…
splindsay-92 Mar 12, 2025
6f63505
Grouping common request params to avoid repetition.
splindsay-92 Mar 12, 2025
8059a44
Updating common params for clarity.
splindsay-92 Mar 12, 2025
467b6f7
Updating the history rest guide for consistency
splindsay-92 Mar 12, 2025
f8f3e97
Adding a section to occupancy to detail the REST API
splindsay-92 Mar 12, 2025
c26c0f1
Correcting the version param text
splindsay-92 Mar 12, 2025
021685f
Add open spec for Chat REST API
m-hulbert Mar 14, 2025
f3b4ab7
Moved REST API documentation for chat messaging features
splindsay-92 Mar 14, 2025
196ba25
Added the full list of Chat endpoints to the YAML file
splindsay-92 Mar 17, 2025
e8676e7
Remove REST details from occupancy.textile, it's now in the dedicated…
splindsay-92 Mar 17, 2025
243e13f
Remove X-Ably-Version header from chat API specs.
splindsay-92 Mar 17, 2025
1a3d2a4
Reducing duplication of common components.
splindsay-92 Mar 18, 2025
e1fe61e
Correcting HTTP response
splindsay-92 Mar 18, 2025
c0e9aa4
Added a section on the PubSub SDK `request` function and why it shoul…
splindsay-92 Mar 18, 2025
68261fd
Improve Chat API spec with error examples and clearer details
splindsay-92 Mar 20, 2025
f1f0c69
Add optional clientId query parameter to chat.yaml
splindsay-92 Mar 20, 2025
564b8a2
Update Chat REST API URL
splindsay-92 Mar 24, 2025
88e9c8a
Refactor error schema to nest error details under "error".
splindsay-92 Mar 26, 2025
d227b2b
Simplify response descriptions in chat.yaml
splindsay-92 Mar 28, 2025
3e52f58
Merge pull request #2478 from ably/chat/adding-rest-api-documentation
GregHolmes Apr 11, 2025
a90d355
chat: add product to about page
AndyTWF Apr 14, 2025
e633a81
Merge pull request #2529 from ably/chat-about-page-title
m-hulbert Apr 14, 2025
833e1cb
chore: bump ably-ui to 16.1.0 and update button/menu class names
jamiehenson Apr 14, 2025
d929674
Merge branch 'main' into fix/remove-homepage-yaml
jamiehenson Apr 14, 2025
94e44d5
Merge pull request #2523 from ably/fix/remove-homepage-yaml
m-hulbert Apr 14, 2025
e879015
Remove incorrect `try` from some Swift chat calls
lawrence-forooghian Apr 14, 2025
8e97232
Update Swift chat docs for @MainActor changes
lawrence-forooghian Apr 14, 2025
01fb332
Merge pull request #2532 from ably/ECO-5283-update-documentation-for-…
lawrence-forooghian Apr 14, 2025
7fc3f61
Merge branch 'main' into bump-ably-ui-to-16.1.0
jamiehenson Apr 15, 2025
7487734
Merge pull request #2531 from ably/bump-ably-ui-to-16.1.0
jamiehenson Apr 15, 2025
f5a23ff
chore: bump ably-ui to 16.1.1, update outdated lh var usage
jamiehenson Apr 15, 2025
c349429
Merge pull request #2536 from ably/bump-ably-ui-to-16.1.1
jamiehenson Apr 15, 2025
d643236
feat: Open Hubspot chat when conversation Meta tag is present
matt423 Apr 14, 2025
eed28a1
Merge pull request #2528 from ably/web-4261-hubspot-meta-tag
matt423 Apr 16, 2025
347ce1d
Merge branch 'main' into liveobjects/merge-main-2025-04-17
VeskeR Apr 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ ASSET_PREFIX=

INKEEP_CHAT_ENABLED=
INKEEP_CHAT_API_KEY=
INKEEP_CHAT_INTEGRATION_ID=
INKEEP_CHAT_ORGANIZATION_ID=

INSIGHTS_ENABLED=false
INSIGHTS_DEBUG=true
Expand Down
150 changes: 150 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,153 @@ API references make use of [partials](content/partials/) where content is reused
The Control API is a REST API and the spec can be found in [`static/open-specs/control-v1.yaml](static/open-specs/control-v1.yaml).

This is then referenced in [`src/pages/api/control-api.tsx](src/pages/api/control-api.tsx) for rendering.

### Contributing to Examples

The `examples` directory contains feature-specific demonstrations of how to use Ably in different environments, organized by framework. Each example resides in a structured path like `/examples/<feature>/react` or `/examples/<feature>/javascript`, showcasing practical implementations for various use cases.

#### Example file structure

1. Create a new directory for your example under `/examples`, this should be named after the feature/example you're building, e.g. `chat-typing-indicator`.
2. Inside this directory, create a subdirectory named after the language or framework (e.g., `javascript`, `react`). You can have both `javascript` and `react` subdirectories within the same example directory.

Currently, we support Javascript (Typescript) and React, both using Vite.

#### Create the project

To create a new project using Vite, follow the instructions below for either JavaScript/TypeScript or React.

##### JavaScript/TypeScript

1. Open your terminal.
2. Navigate to the directory where you want to create your project.
3. Run the following command to create a new Vite project:

```sh
npm create vite@latest javascript -- --template vanilla
```

4. Navigate into your project directory:

```sh
cd javascript
```

##### React

1. Open your terminal.
2. Navigate to the directory where you want to create your project.
3. Run the following command to create a new Vite project with React template:

```sh
npm create vite@latest react -- --template react
```

4. Navigate into your project directory:

```sh
cd react
```

After following these steps, you will have a Vite project set up with JavaScript/TypeScript or React, ready for further development.

#### README.md

Each example must include a `README.md` file with instructions to get the developer running the example locally as quick as possible. These instructions should follow the structure below:

- **Introduction**: Describe the Ably features used, what problem is this solving for the intended audience?
- **Resources**: List components and functions from the Ably SDKs and their purposes.
- **Getting started**: Provide step-by-step instructions:
1. Clone the docs repository.
2. Navigate to the examples directory.
3. Rename environment variable files. (`.env.example` -> `.env.local`)
4. Update environment variables.
5. Install dependencies with `yarn install`.
6. Run the project.
- **Opening in CodeSandbox**: Instructions for opening the example in CodeSandbox. (At this moment, this heading contains the renaming of the environment variables)

#### NPM Workspaces

Add entries for each example to the `/examples/package.json` file under `workspaces` and `scripts`, an example of this is shown below:

```json
"workspaces": [
"chat-typing-indicator/react",
"chat-typing-indicator/javascript",
],
"scripts": {
"chat-typing-indicator-javascript": "yarn workspace chat-typing-indicator-javascript dev",
"chat-typing-indicator-react": "yarn workspace chat-typing-indicator-react dev",
},
```

The intention of the scripts entries is to make the command simpler for the developer to run locally.

#### Shared configurations

All examples use config from the examples root directory. Update these files inside your project directory:

- `vite.config.ts`:

```typescript
import { defineConfig } from 'vite';
import baseConfig from '../../vite.config';

export default defineConfig({
...baseConfig,
envDir: '../../',
});
```

- `tailwind.config.ts`:

```typescript
import baseConfig from '../../tailwind.config';
import type { Config } from 'tailwindcss';

const config: Config = {
...baseConfig,
content: ['./src/**/*.{js,ts,tsx}', './index.html'],
};

export default config;
```

- `tsconfig.json`:

```json
{
"extends": "../../tsconfig.json"
}
```

- `vite-env.d.ts` (Javascript only):

```typescript
interface ImportMetaEnv {
readonly VITE_ABLY_KEY: string;
}

interface ImportMeta {
readonly env: ImportMetaEnv;
}
```


#### Styling consistency

For styling consistency purposes, each example will need to use [Franken-ui](https://franken-ui.dev/) for components, and any other styling to use tailwindcss. Some examples for this are the button and input components below:

**Button:**

```html
<button class="uk-btn uk-btn-md uk-btn-primary py-2 rounded">
Submit
</button>
```

**Input:**

```html
<input type="text" class="uk-input uk-width-1-1 uk-border-rounded-left">
```
11 changes: 4 additions & 7 deletions content/account/control-api.textile
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,10 @@ The only operation available at the account-level is to retrieve account-wide st
To retrieve account-level statistics:

```[sh]
curl --location --request POST 'https://control.ably.net/v1/accounts/${ACCOUNT_ID}/stats' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ${ACCESS_TOKEN}' \
--data-raw '{
"unit": "minute",
"limit": 2
}'
curl --request GET \
--url 'https://control.ably.net/v1/accounts/${ACCOUNT_ID}/stats?unit=minute&limit=2' \
--header 'Authorization: Bearer ${ACCESS_TOKEN}' \
--header 'Content-Type: application/json'
```

See the "API reference":/docs/api/control-api#tag/accounts/paths/~1accounts~1{account_id}~1stats/get for information on the request body.
Expand Down
51 changes: 51 additions & 0 deletions content/api/rest-api.textile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jump_to:
- list channel subscriptions#list-channel-subscriptions
- list channels#list-channels
- publish directly to device#push-publish
- publish via batch push API#push-publish-batch
Authentication API:
- requestToken#request-token
- revokeTokens#revoke-tokens
Expand Down Expand Up @@ -1152,6 +1153,56 @@ A successful request returns an empty response.

An unsuccessful request returns an error.

h3(#push-publish-batch). Publish via batch push API

Convenience endpoint to deliver multiple push notification payloads to multiple devices or browsers in a single request by specifying a list of recipients and corresponding payloads.
Currently, the batch push endpoint allows a maximum of 10,000 notifications per request (note that each recipient for a given payload counts as a separate notification).

h6. POST rest.ably.io/push/batch/publish

The request body is an array of objects of the form:

bc[json]. {
recipient: <recipient object or array of recipient objects>
payload: <object>
}

Where the recipient and payload fields are the same as those used in the "Publish a push notification to a single device":#push-publish endpoint.

Example request:

bc[sh]. curl -X POST https://rest.ably.io/push/admin/batch/publish \
-u "{{API_KEY}}" \
-H "Content-Type: application/json" \
--data \
'
[
{
"recipient": {
"deviceId": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
},
"payload": {
"notification": {
"title": "Message 1",
"body": "Example push notification from Ably."
}
}
},
{
"recipient": {
"clientId": "myClientId"
},
"payload": {
"notification": {
"title": "Message 2",
"body": "Example push notification from Ably."
}
}
}
]
'


h2(#authentication). Authentication

h3(#request-token). Request an access token
Expand Down
2 changes: 1 addition & 1 deletion content/chat/connect.textile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const MyComponent = () => {
```

```[swift]
let status = await chatClient.connection.status
let status = chatClient.connection.status
```

```[kotlin]
Expand Down
1 change: 1 addition & 0 deletions content/chat/index.textile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: About Chat
meta_description: "Learn more about Ably Chat and the features that enable you to quickly build functionality into new and existing applications."
product: chat
redirect_from: /docs/products/chat
---

Expand Down
4 changes: 2 additions & 2 deletions content/chat/rooms/index.textile
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const MyComponent = () => {
```

```[swift]
let status = try await room.status
let status = room.status
```

```[kotlin]
Expand All @@ -288,7 +288,7 @@ blang[javascript,swift,kotlin].
```

```[swift]
let statusSubscription = try await room.onStatusChange()
let statusSubscription = room.onStatusChange()
for await status in statusSubscription {
print("Room status: \(status)")
}
Expand Down
2 changes: 1 addition & 1 deletion content/chat/rooms/occupancy.textile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const MyComponent = () => {
```

```[swift]
let occupancySubscription = try await room.occupancy.subscribe()
let occupancySubscription = room.occupancy.subscribe()
for await event in occupancySubscription {
occupancyInfo = "Connections: \(event.presenceMembers) (\(event.connections))"
}
Expand Down
6 changes: 3 additions & 3 deletions content/chat/rooms/presence.textile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const MyComponent = () => {
```

```[swift]
let presenceSubscription = try await room.presence.subscribe(events: [.enter, .leave, .update])
let presenceSubscription = room.presence.subscribe(events: [.enter, .leave, .update])
for await event in presenceSubscription {
print("Presence event `\(event.action)` from `\(event.clientId)` with data `\(event.data)`")
}
Expand Down Expand Up @@ -89,10 +89,10 @@ blang[javascript,swift].

```[swift]
// Subscribe to only 'enter' events:
let presenceSubscription = try await room.presence.subscribe(event: .enter)
let presenceSubscription = room.presence.subscribe(event: .enter)

// Subscribe to 'update' and 'leave' events:
let presenceSubscription = try await room.presence.subscribe(events: [.leave, .update])
let presenceSubscription = room.presence.subscribe(events: [.leave, .update])
```

blang[react,kotlin].
Expand Down
2 changes: 1 addition & 1 deletion content/chat/rooms/reactions.textile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const MyComponent = () => {
```

```[swift]
let reactionSubscription = try await room.reactions.subscribe()
let reactionSubscription = room.reactions.subscribe()
for await reaction in reactionSubscription {
print("Received a reaction of type \(reaction.type), and metadata \(reaction.metadata)")
}
Expand Down
2 changes: 1 addition & 1 deletion content/chat/rooms/typing.textile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const MyComponent = () => {
```

```[swift]
let typingSubscription = try await room.typing.subscribe()
let typingSubscription = room.typing.subscribe()
for await typing in typingSubscription {
typingInfo = typing.currentlyTyping.isEmpty ? "" :
"Typing: \(typing.currentlyTyping.joined(separator: ", "))..."
Expand Down
4 changes: 0 additions & 4 deletions content/livesync/mongodb/index.textile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ The integration rule exists as a "database connector" component that is entirely

When a change event is received over the Change Streams API it is published to an Ably channel. When you configure the integration rule, you can specify how change events are mapped to individual Ably channels. Clients can then subscribe to database changes by subscribing to Ably channels. Ably "Auth":/docs/auth and "Capabilities":/docs/auth/capabilities control which channels a client can interact with.

h2(#development-status). Development status

The MongoDB database connector is currently in beta status. Your "feedback":https://docs.google.com/forms/d/e/1FAIpQLSd00n1uxgXWPGvMjKwMVL1UDhFKMeh3bSrP52j9AfXifoU-Pg/viewform will help prioritize improvements and fixes for subsequent releases.

h2(#integration-rule). Integration rule

h3(#create). Create a rule
Expand Down
2 changes: 1 addition & 1 deletion content/metadata-stats/metadata/subscribe.textile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ It is never possible to publish or be present on a metachannel, however you can
The following is an example of a capability that provides access to subscribe to all metachannels:

```[json]
{"[meta]*":["subscribe"]}
{&#0034;[meta]*&#0034;:[&#0034;subscribe&#0034;]}
```

h2(#connection-lifecycle). Connection lifecycle events
Expand Down
Loading