Skip to content

Commit d4b0349

Browse files
authored
Merge pull request #1228 from appwrite/feat-realtime-web
2 parents 0d87a2b + f5884d2 commit d4b0349

File tree

5 files changed

+408
-3
lines changed

5 files changed

+408
-3
lines changed

src/SDK/Language/Web.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ public function getFiles(): array
4040
'destination' => 'src/services/{{service.name | caseKebab}}.ts',
4141
'template' => 'web/src/services/template.ts.twig',
4242
],
43+
[
44+
'scope' => 'default',
45+
'destination' => 'src/services/realtime.ts',
46+
'template' => 'web/src/services/realtime.ts.twig',
47+
],
4348
[
4449
'scope' => 'default',
4550
'destination' => 'src/models.ts',

templates/web/src/client.ts.twig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,9 @@ class Client {
532532
/**
533533
* Subscribes to {{spec.title | caseUcfirst}} events and passes you the payload in realtime.
534534
*
535+
* @deprecated Use the Realtime service instead.
536+
* @see Realtime
537+
*
535538
* @param {string|string[]} channels
536539
* Channel to subscribe - pass a single channel as a string or multiple with an array of strings.
537540
*

templates/web/src/index.ts.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export { Client, Query, {{spec.title | caseUcfirst}}Exception } from './client';
99
{% for service in spec.services %}
1010
export { {{service.name | caseUcfirst}} } from './services/{{service.name | caseKebab}}';
1111
{% endfor %}
12+
export { Realtime } from './services/realtime';
1213
export type { Models, Payload, RealtimeResponseEvent, UploadProgress } from './client';
1314
export type { QueryTypes, QueryTypesList } from './query';
1415
export { Permission } from './permission';

0 commit comments

Comments
 (0)