@wix/realtime 1.0.50 → 1.0.53

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.
@@ -2634,31 +2634,7 @@
2634
2634
  "summary": [
2635
2635
  {
2636
2636
  "kind": "text",
2637
- "text": "App ID of the channel owner.\n\nSet this to subscribe to a channel owned by a different app (cross-app subscription). When omitted, the channel is assumed to be owned by the caller's app.\n\nThe channel owner must implement the "
2638
- },
2639
- {
2640
- "kind": "code",
2641
- "text": "`REALTIME_PERMISSIONS_PROVIDER`"
2642
- },
2643
- {
2644
- "kind": "text",
2645
- "text": " SPI to authorize cross-app subscriptions; otherwise the subscription is denied.\n\nUse "
2646
- },
2647
- {
2648
- "kind": "code",
2649
- "text": "`WIX_APPS`"
2650
- },
2651
- {
2652
- "kind": "text",
2653
- "text": " from "
2654
- },
2655
- {
2656
- "kind": "code",
2657
- "text": "`@wix/essentials`"
2658
- },
2659
- {
2660
- "kind": "text",
2661
- "text": " to reference well-known Wix app IDs."
2637
+ "text": "ID of the app that manages the channel you want to subscribe to.\n\nTo subscribe to a channel managed by another Wix app installed on the site, specify that app's ID. When empty, you subscribe to channels managed by the current app or by the site's backend code.\n\nLearn more about [cross-app subscriptions](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/introduction#cross-app-subscriptions).\n\n> **Note**: The app that manages the channel must implement the [Realtime Permissions Provider](https://dev.wix.com/docs/sdk/core-modules/realtime/extensions/realtime-permissions-provider/introduction) service plugin to authorize cross-app subscriptions."
2662
2638
  }
2663
2639
  ]
2664
2640
  },
@@ -3873,7 +3849,7 @@
3873
3849
  {
3874
3850
  "type": "GUIDE",
3875
3851
  "title": "Introduction",
3876
- "src": "---\narticleType: intro\n---\n\n# About the Site API\n\nThe Site API lets you control subscriber permissions for the [Realtime APIs](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/introduction). It determines which [subscribers](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/subscriber/introduction) can receive messages on specific [channels and resources](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/introduction#channels-and-channel-resources).\n\nWith the Site API, you can:\n\n- Use the [permissions router](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/site/permissions-router/introduction) to organize permission logic per channel or resource.\n- Control subscriber access using the [`realtime_check_permission` hook](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/site/realtime-check-permission).\n\n## Before you begin\n\nIt's important to note the following points before starting to code:\n\n- In Wix Studio, you must create a `realtime-permissions.js` file in a site's backend, even if `realtime_check_permission` isn't defined. Without the file, subscriptions fail.\n- When the `realtime_check_permission` hook isn't defined, all subscribers receive the default permissions of `{\"read\": true}`.\n- When previewing a site, `read` permissions are always `true`.\n\n## Use cases\n\nRestrict a channel so only the Wix user can receive messages. Use the [permissions router](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/site/permissions-router/introduction) to add a handler that checks `subscriber.type`:\n\n```js\nimport { site } from \"@wix/realtime\";\nconst { permissionsRouter } = site;\n\npermissionsRouter.add({ name: \"owner-only\" }, (channel, subscriber) => {\n return { read: subscriber.type === \"USER\" };\n});\n\nexport function realtime_check_permission(channel, subscriber) {\n return permissionsRouter.check(channel, subscriber);\n}\n```\n\n## See also\n\n- [Realtime APIs](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/introduction)\n- [Permissions Router API](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/site/permissions-router/introduction)\n- [Subscriber API](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/subscriber/introduction)\n- [Publisher API](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/publisher/introduction)\n\n@sdk_package_setup\n"
3852
+ "src": "---\narticleType: intro\n---\n\n# About the Site API\n\nThe Site API lets you control subscriber permissions for the [Realtime APIs](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/introduction). It determines which [subscribers](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/subscriber/introduction) can receive messages on specific [channels and resources](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/introduction#channels-and-channel-resources).\n\nWith the Site API, you can:\n\n- Use the [permissions router](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/site/permissions-router/introduction) to organize permission logic per channel or resource.\n- Control subscriber access using the [`realtime_check_permission` hook](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/site/realtime-check-permission).\n\n<blockquote class=\"important\">\n\n__Important:__\nYou can only use the Site API when [developing websites](https://dev.wix.com/docs/develop-websites-sdk/get-started/overview/about-developing-websites). When [building apps](https://dev.wix.com/docs/build-apps/get-started/overview/about-wix-apps), subscribers receive the default `{ read: true }` permissions.\n\nTo provide custom permission checks for channels your app manages, implement the [Realtime Permissions service plugin](https://dev.wix.com/docs/sdk/core-modules/realtime/extensions/realtime-permissions-provider/introduction). \n\nLearn more about [cross-app subscriptions](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/introduction#cross-app-subscriptions).\n\n</blockquote>\n\n\n## Before you begin\n\nIt's important to note the following points before starting to code:\n- In Wix Studio, you must create a `realtime-permissions.js` file in a site's backend, even if `realtime_check_permission` isn't defined. Without the file, subscriptions fail.\n- When the `realtime_check_permission` hook isn't defined, all subscribers receive the default permissions of `{\"read\": true}`.\n- When previewing a site, `read` permissions are always `true`.\n\n## Use cases\n\nRestrict a channel so only the Wix user can receive messages. Use the [permissions router](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/site/permissions-router/introduction) to add a handler that checks `subscriber.type`:\n\n```js\nimport { site } from \"@wix/realtime\";\nconst { permissionsRouter } = site;\n\npermissionsRouter.add({ name: \"owner-only\" }, (channel, subscriber) => {\n return { read: subscriber.type === \"USER\" };\n});\n\nexport function realtime_check_permission(channel, subscriber) {\n return permissionsRouter.check(channel, subscriber);\n}\n```\n\n## See also\n\n- [Realtime APIs](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/introduction)\n- [Permissions Router API](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/site/permissions-router/introduction)\n- [Subscriber API](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/subscriber/introduction)\n- [Publisher API](https://dev.wix.com/docs/sdk/core-modules/realtime/realtime/publisher/introduction)\n\n@sdk_package_setup\n"
3877
3853
  },
3878
3854
  {
3879
3855
  "type": "GUIDE",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/realtime",
3
- "version": "1.0.50",
3
+ "version": "1.0.53",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -44,11 +44,11 @@
44
44
  "@wix/auto_sdk_duplexer_publisher": "^1.0.10",
45
45
  "@wix/auto_sdk_duplexer_realtime-permissions-provider": "^1.0.0",
46
46
  "@wix/duplexer-js": "^2.0.6",
47
- "@wix/realtime-common": "1.0.19",
47
+ "@wix/realtime-common": "1.0.20",
48
48
  "@wix/sdk": "^1.21.4",
49
49
  "@wix/sdk-runtime": "^1.0.9",
50
50
  "@wix/sdk-types": "^1.17.5",
51
- "@wix/sdk_realtime_site": "1.0.39",
51
+ "@wix/sdk_realtime_site": "1.0.41",
52
52
  "uuid": "^11.1.0"
53
53
  },
54
54
  "devDependencies": {
@@ -72,5 +72,5 @@
72
72
  "isRootPublicSdk": true
73
73
  }
74
74
  },
75
- "falconPackageHash": "7d087db037b66d3e5f0e53817c1d5c69812fee7c9c872b334e7b4162"
75
+ "falconPackageHash": "2e602b06414212277ec6e85a7af21aa58905f996e764b3311b2f5437"
76
76
  }