@acms-subir/client 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +2 -1
- package/dist/types.d.ts +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ the cache and transport configuration with the original client.
|
|
|
47
47
|
| `registerDevice({ token, platform, locale?, topics? })` | Register or refresh an Expo push token (call on every app start); `{ created, device }` |
|
|
48
48
|
| `updateDevice(token, { topics?, locale? })` | Change a device's topics or language |
|
|
49
49
|
| `unregisterDevice(token)` | Opt out (idempotent) |
|
|
50
|
-
| `pushTopics()` | Topics to offer as notification toggles |
|
|
50
|
+
| `pushTopics()` | Topics to offer as notification toggles, named in the client's language (built-in and the site's own, `kind: 'site'`) |
|
|
51
51
|
| `links()` | The links page: profile, socials and visible blocks (`link`, `email`, `phone`, `contact`, `heading`, `text`, `spacer`, `live`, `embed`) |
|
|
52
52
|
| `live()` | Live video: the current broadcast (`snapshot` or `null`), `serverNow` and the owner's `display` choices. Never cached; 404 while `site.features.live` is false |
|
|
53
53
|
| `form(id)`, `submitForm(id, { answers, version?, idempotencyKey? })` | A published form's questions; send answers (checkbox groups as arrays). Each call makes one key; retries reuse it |
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,8 @@ export const endpoints = {
|
|
|
25
25
|
requestGuestCode: { method: 'POST', path: '/guest/code' }, guestSignIn: { method: 'POST', path: '/guest/token' },
|
|
26
26
|
guestBookings: { method: 'GET', path: '/guest/bookings' }, guestSignOut: { method: 'POST', path: '/guest/revoke' },
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
// site: its legal links; pushTopics: topic names
|
|
29
|
+
const localized = new Set(['home', 'page', 'content', 'contentById', 'search', 'events', 'site', 'pushTopics']);
|
|
29
30
|
function uuid() {
|
|
30
31
|
if (globalThis.crypto?.randomUUID)
|
|
31
32
|
return globalThis.crypto.randomUUID();
|
package/dist/types.d.ts
CHANGED
|
@@ -806,10 +806,12 @@ export type DeviceRemoved = {
|
|
|
806
806
|
"deleted": true;
|
|
807
807
|
};
|
|
808
808
|
export type PushTopics = {
|
|
809
|
+
"locale": string | null;
|
|
809
810
|
"topics": Array<{
|
|
810
811
|
"id": string;
|
|
811
812
|
"label": string;
|
|
812
|
-
"kind": "general" | "collection" | "calendar";
|
|
813
|
+
"kind": "general" | "collection" | "calendar" | "site";
|
|
814
|
+
"description"?: string;
|
|
813
815
|
}>;
|
|
814
816
|
};
|
|
815
817
|
export type LiveSnapshot = {
|