Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
209 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
c839dce
push/rest: replace device with recipient
mschristensen 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
53142ab
Merge branch 'main' into bugfix/PUB-1616-push-rest-api
jamiehenson Apr 17, 2025
21b7601
Merge pull request #2530 from ably/bugfix/PUB-1616-push-rest-api
jamiehenson Apr 17, 2025
b3b7032
fix: set default page language to first template-defined language, no…
jamiehenson Apr 17, 2025
4e67793
fix: remove duplicate language setter in base template
jamiehenson Apr 17, 2025
5d9334a
chore: remove unnecessary products from LayoutContext
jamiehenson Apr 17, 2025
af65222
Merge pull request #2545 from ably/web-4327-non-js-docs-fix
jamiehenson Apr 17, 2025
0d954f4
ably-chat-js react subpath changes (#2544)
owenpearson Apr 18, 2025
4a13c1e
Update language data for JavaScript SDK to 2.7
VeskeR Apr 17, 2025
d8126c3
Merge pull request #2549 from ably/update-js-language-2.7
VeskeR Apr 22, 2025
961fa19
Add pub-sub history rewind example
GregHolmes Feb 20, 2025
5db847f
fixup! Add pub-sub history rewind example
GregHolmes Apr 10, 2025
6316453
fixup! Add pub-sub history rewind example
GregHolmes Apr 22, 2025
f9383f1
fixup! Add pub-sub history rewind example
GregHolmes Apr 22, 2025
b5aa949
Merge pull request #2436 from ably/EDU-1691-Example-Pub-Sub-History-R…
GregHolmes Apr 23, 2025
c577aee
Add a new callout option for experimental features
m-hulbert Apr 14, 2025
f6d9d6b
Update contributing guide with new experimental aside
m-hulbert Apr 14, 2025
33ada62
Merge pull request #2533 from ably/edu-1925-experimental-callout
m-hulbert Apr 23, 2025
7acf5ef
Update product images for docs homepage
VeskeR Apr 17, 2025
8a3a601
Merge pull request #2546 from ably/update-docs-homepage-images
m-hulbert Apr 23, 2025
d9297d6
Creates error handling section
franrob-projects Jan 15, 2025
cb1147c
feat: generate llms.txt from document & apiReference articles
kennethkalmer Apr 22, 2025
28470c7
feat: script to roughly validate llms.txt link count
kennethkalmer Apr 22, 2025
df567e2
feat: check llms.txt link count in CI
kennethkalmer Apr 22, 2025
455d35b
Merge pull request #2554 from ably/WEB-4330-llms-txt
kennethkalmer Apr 24, 2025
1912565
feat: Use device ID for Inkeep user when not logged in
matt423 Apr 24, 2025
1bf2416
Merge pull request #2559 from ably/web-4277-inkeep-user-id
matt423 Apr 25, 2025
84bd91d
Merge branch 'main' into EDU-1615--Error-handling
franrob-projects Apr 25, 2025
2dc38a4
Merge pull request #2382 from ably/EDU-1615--Error-handling
franrob-projects Apr 25, 2025
775edeb
EDU-576: Datadog integration
franrob-projects Feb 12, 2025
b6c5c6e
Merge branch 'main' into EDU-576-Docs-for-datadog-integration
franrob-projects Apr 25, 2025
cb0e17b
Merge pull request #2422 from ably/EDU-576-Docs-for-datadog-integration
franrob-projects Apr 25, 2025
049a9f2
Updating buttons primary colour to a monotone colour, and styling the…
GregHolmes Apr 25, 2025
7d08bb9
Remove console log
GregHolmes Apr 28, 2025
809e932
Merge pull request #2560 from ably/EDU-1928-Update-styling-for-examples
GregHolmes Apr 28, 2025
8467863
platform/architecture: add arch overview diagram
mschristensen Apr 28, 2025
a745e4e
Merge pull request #2562 from ably/feature/PUB-1611-architecture-diagram
m-hulbert Apr 29, 2025
56a5e69
Add javascript getting started to pubsub
m-hulbert Apr 8, 2025
d6aeb8a
Reduce h2 and list element padding for readability
m-hulbert Apr 8, 2025
fe3cebd
Merge pull request #2511 from ably/edu-1845-pubsub-js-start
m-hulbert Apr 29, 2025
c868da8
EDU-1814-Adds-billing-alert-copy
franrob-projects Apr 22, 2025
cd23b63
feat: Send question data to conversation API URL on message sent
matt423 Apr 29, 2025
736b2ae
chore: Send Inkeep events to Ably Insights
matt423 Apr 29, 2025
9b61523
Merge pull request #2565 from ably/web-4277-inkeep-db
matt423 Apr 30, 2025
e414332
Add a Chat getting started guide for JavaScript
m-hulbert Apr 8, 2025
3658a9a
Merge pull request #2512 from ably/edu-1851-chat-start-js
m-hulbert Apr 30, 2025
2c2c289
Use message partial in rest-sdk/messages and realtime-sdk/messages
SimonWoolf Apr 17, 2025
950db7a
Add docs for ephemeral publishes
SimonWoolf Apr 17, 2025
075da24
Merge pull request #2543 from ably/ephemeral
SimonWoolf Apr 30, 2025
4dddc26
EDU-1931: Fixes broken img syntax
franrob-projects Apr 30, 2025
ee49071
Merge pull request #2566 from ably/EDU-1931-Delta-image-fix
m-hulbert Apr 30, 2025
df00440
message size faq fix
mclark-ably Apr 22, 2025
4af27fa
Update content/pricing/faqs.textile
mclark-ably Apr 22, 2025
ec3192e
Merge pull request #2551 from mclark-ably/message_size_faq_fix
m-hulbert Apr 30, 2025
bef76f2
chore: reorganise examples and usecases data and types
jamiehenson Mar 4, 2025
ef101b6
chore: cleanup tailwind config a bit to remove unused things
jamiehenson Mar 12, 2025
c4edc57
feat: add ExamplesRenderer for all examples and extend examples data
jamiehenson Mar 5, 2025
58c93ee
Add Pub/Sub Rewind examples into Sandpack
GregHolmes Apr 23, 2025
50db4cb
Update config to render pub sub messages and channel state in examples
GregHolmes Apr 17, 2025
7b1eaaf
Update examples to fit or suit relevant viewports in sandpack
GregHolmes Apr 17, 2025
0dcaf7f
Update pub-sub-history example
GregHolmes Apr 23, 2025
217747a
Change spaces-member-location rendering in examples to double-horizontal
GregHolmes Apr 23, 2025
6542798
fix: update erroneous tailwind text classes
jamiehenson Apr 23, 2025
cfe52a2
fix: retrofit array.entries usage in spaces-member-location-js
jamiehenson Apr 23, 2025
b703953
Removed use case filters and update examples products filter
GregHolmes Apr 29, 2025
d40002b
breaking: move examples to `/examples`
kennethkalmer Apr 30, 2025
3f1327d
Update pub-sub-message-encryption publish button widths
GregHolmes Apr 30, 2025
00b105a
Update label of 'Room messages' to 'Chat messages' on examples list
GregHolmes Apr 30, 2025
5acecb4
Add missing images for examples
GregHolmes Apr 30, 2025
827a3e1
Add images of examples yet to be ready for release
GregHolmes Apr 30, 2025
f34e693
Fix example readmes numbered lists
GregHolmes Apr 30, 2025
d707dba
Add specific files to be visible in Sandpack
GregHolmes May 1, 2025
f3cf930
feat: add ExamplesRenderer for all examples and extend examples data
jamiehenson Mar 5, 2025
87a6c4b
Update examples to fit or suit relevant viewports in sandpack
GregHolmes Apr 17, 2025
6ae3cad
fix: update erroneous tailwind text classes
jamiehenson Apr 23, 2025
464e52d
fix: restructure examples documentation inside sandpack provider
jamiehenson May 1, 2025
ea77df6
fixup! EDU-1814-Adds-billing-alert-copy
franrob-projects May 1, 2025
8500589
fix: address malformed markup in examples post-rebase
jamiehenson May 1, 2025
e04631c
fix: simplify complexity of reduce functions, lift out sandpack deps
jamiehenson May 1, 2025
39586ba
fix: make examples grid cells anchor based over div
jamiehenson May 2, 2025
43c0152
Merge pull request #2483 from ably/web-4086-render-sandpack
jamiehenson May 2, 2025
390e716
chore: bump to ably-ui 16.2.0
jamiehenson Apr 30, 2025
a222e69
feat: introduce support for MDX templating
jamiehenson Mar 19, 2025
4a1b3da
Merge pull request #2527 from ably/web-3888-mdx
jamiehenson May 2, 2025
f0ba809
fix: add missing title/meta tags to examples
kennethkalmer May 2, 2025
c27c3ff
Merge pull request #2573 from ably/WEB-4086-examples-meta-tags
kennethkalmer May 2, 2025
8ec26e7
chore: split the left and right side bar
denissellu Apr 23, 2025
189f52b
chore: add new homepage assets
denissellu Apr 23, 2025
d4cd571
chore: add new data content for the new homepage
denissellu Apr 23, 2025
ea121d2
feat: add the new hero section component
denissellu Apr 23, 2025
52d84d8
feat: add new platform and product component
denissellu Apr 23, 2025
6b967cf
feat: redesign the homepage with the new component and data
denissellu Apr 23, 2025
2b390ac
chore: add component to display the view all link
denissellu Apr 24, 2025
5892b12
feat: add Examples component
denissellu Apr 24, 2025
ce53546
chore: add gatsby-source-rss-feed
denissellu Apr 24, 2025
796e844
chore: config gastby rss feed for ably change log
denissellu Apr 24, 2025
686c33f
feat: add changelog component
denissellu Apr 24, 2025
5455a41
chore: remove the BodySection component
denissellu Apr 29, 2025
ce96f96
chore: add js-bits/dom-parser to cleanly parse the changelog entries
denissellu May 2, 2025
8eb09f3
Merge pull request #2557 from ably/WEB-4259-new-sexy-homepage 🥥
denissellu May 6, 2025
35abeab
chore: bump ably-ui to 16.2.1
jamiehenson May 6, 2025
f0575c9
fix: assert arbitrary values for custom nav widths, update header labels
jamiehenson May 6, 2025
cc9d677
fix: remove unneeded cn usage in nav helper
jamiehenson May 6, 2025
e9153f8
Merge pull request #2576 from ably/web-4367-fix-column-dimensions
jamiehenson May 7, 2025
627e3b7
update chat-js and chat react versions to 0.6 (latest released)
vladvelici May 7, 2025
4619705
Merge pull request #2578 from ably/update-chat-js-version
vladvelici May 7, 2025
132009e
Merge branch 'main' into EDU-1814-Billing-alerts
franrob-projects May 7, 2025
347d34b
Merge pull request #2553 from ably/EDU-1814-Billing-alerts
franrob-projects May 7, 2025
bf4d012
Add attach to JS typing indicator example
GregHolmes May 2, 2025
b343d7a
Add fixes to Chat-room-history where padding is incorrect
GregHolmes May 2, 2025
52479d0
Merge pull request #2577 from ably/fix-examples
GregHolmes May 7, 2025
9106ebf
Fixed issue where pub-sub-occupancy channel name is hard coded
GregHolmes May 2, 2025
cfb56b1
Merge pull request #2572 from ably/fix-pub-sub-occupancy-example
GregHolmes May 7, 2025
1088537
fix: the parser on the changelog for the descriptions
denissellu May 6, 2025
f16535d
chore: remove the js-bits/dom-parser useless
denissellu May 6, 2025
46263ed
Merge pull request #2575 from ably/WEB-4259-fix-changelog-homepage
GregHolmes May 8, 2025
4fd6550
Merge branch 'main' into liveobjects/merge-main-2025-05-08
VeskeR May 8, 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
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ jobs:
- config
- public

validate-llms-txt:
executor:
name: default
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Validate llms.txt
command: yarn validate-llms-txt

test-nginx:
docker:
- image: heroku/heroku:24-build
Expand Down Expand Up @@ -143,4 +154,7 @@ workflows:
- test-nginx:
requires:
- build
- validate-llms-txt:
requires:
- build

3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ ASSET_PREFIX=

INKEEP_CHAT_ENABLED=
INKEEP_CHAT_API_KEY=
INKEEP_CHAT_INTEGRATION_ID=
INKEEP_CHAT_ORGANIZATION_ID=
CONVERSATIONS_API_URL='http://localhost:3000/api/conversations'

INSIGHTS_ENABLED=false
INSIGHTS_DEBUG=true
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore all mdx files in src/pages - we need to be able to render components on one line for inlining
src/pages/**/*.mdx
src/pages/**/*.md
152 changes: 151 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ There are three types of admonition that can be used; `note`, `important` and `f

#### Feature changes

Two additional types of admonition are used to display features that have been added or updated in a version update; `new` and `updated`.
Three additional types of admonition are used to display features that have been added or updated in a version update; `new`, `updated` and `experimental`.

```html
<aside data-type='updated'>
Expand Down 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">
```
47 changes: 47 additions & 0 deletions bin/validate-llms.txt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import * as fs from 'fs';
import * as path from 'path';
import * as glob from 'glob';

const PUBLIC_DIR = path.join(process.cwd(), 'public');
const LLMS_FILE = path.join(PUBLIC_DIR, 'llms.txt');

function countHtmlFiles(): number {
const htmlFiles = glob.sync('**/*.html', { cwd: PUBLIC_DIR });
return htmlFiles.length;
}

function countLlmsLines(): number {
const content = fs.readFileSync(LLMS_FILE, 'utf-8');
return content.split('\n').filter((line) => line.trim().length > 0).length;
}

function validateCounts(htmlCount: number, llmsCount: number): boolean {
const difference = Math.abs(htmlCount - llmsCount);
const maxAllowedDifference = Math.ceil(htmlCount * 0.75); // 75% of html count
return difference <= maxAllowedDifference;
}

function main() {
try {
const htmlCount = countHtmlFiles();
const llmsCount = countLlmsLines();
const isValid = validateCounts(htmlCount, llmsCount);

console.log(`HTML files found: ${htmlCount}`);
console.log(`Lines in llms.txt: ${llmsCount}`);

if (!isValid) {
console.error(
`Error: The number of lines in llms.txt (${llmsCount}) is not within 75% of the number of HTML files (${htmlCount})`,
);
process.exit(1);
}

console.log('Validation successful!');
} catch (error) {
console.error('Error during validation:', error);
process.exit(1);
}
}

main();
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
91 changes: 1 addition & 90 deletions content/api/realtime-sdk/messages.textile
Original file line number Diff line number Diff line change
Expand Up @@ -57,93 +57,4 @@ h2(#properties).
ruby: Attributes
python: Attributes

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. <br>__Type: @String@__

h6(#data).
default: data
csharp: Data

The message payload, if provided.<br>__Type: <span lang="default">@String@, @StringBuffer@, @JSON Object@</span><span lang="java">@String@, @ByteArray@, @JSONObject@, @JSONArray@</span><span lang="csharp">@String@, @byte[]@, @plain C# object that can be serialized to JSON@</span><span lang="ruby">@String@, @Binary@ (ASCII-8BIT String), @Hash@, @Array@</span><span lang="python">@String@, @Bytearray@, @Dict@, @List@</span><span lang="php">@String@, @Binary String@, @Associative Array@, @Array@</span><span lang="objc">@NSString *@, @NSData *@, @NSDictionary *@, @NSArray *@</span><span lang="swift">@String@, @NSData@, @Dictionary@, @Array@</span><span lang="flutter">@String@, @Map@, @List@</span>__

h6(#extras).
default: extras
csharp: Extras

Metadata and/or ancillary payloads, if provided. The only currently valid payloads for extras are the "@push@":/docs/push/publish#payload, "@ref@":/docs/channels/messages#interactions and "@privileged@":/docs/integrations/webhooks#skipping objects.<br>__Type: <span lang="java">@JSONObject@, @JSONArray@</span><span lang="csharp">plain C# object that can be converted to JSON</span><span lang="jsall">@JSON Object@</span><span lang="ruby">@Hash@, @Array@</span><span lang="python">@Dict@, @List@</span><span lang="swift">@Dictionary@, @Array@</span><span lang="objc">@NSDictionary *@, @NSArray *@</span><span lang="php">@Associative Array@, @Array@</span>__

h6(#id).
default: id
csharp: Id

A Unique ID assigned by Ably to this message.<br>__Type: @String@__

h6(#client-id).
default: clientId
csharp: ClientId
ruby: client_id
python: client_id

The client ID of the publisher of this message.<br>__Type: @String@__

h6(#connection-id).
default: connectionId
csharp: ConnectionId
ruby: connection_id
python: connection_id

The connection ID of the publisher of this message.<br>__Type: @String@__

h6(#timestamp).
default: timestamp
csharp: Timestamp

Timestamp when the message was received by the Ably, as <span lang="default">milliseconds since the epoch</span><span lang="ruby">a @Time@ object</span><br>.__Type: <span lang="default">@Integer@</span><span lang="java">@Long Integer@</span><span lang="csharp">@DateTimeOffset@</span><span lang="ruby">@Time@</span><span lang="objc,swift">@NSDate@</span>__

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.<br>__Type: @String@__

h2(methods).
default: Message methods

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.<br>__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.<br>__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.<br>__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.<br>__Type: @Object@__

h4. Returns

An @Array@ of "@Message@":/docs/api/realtime-sdk/types#message objects
<%= partial partial_version('types/_message') %>
Loading