Для AI-агентов: markdown этой страницы — /docs/mcp-tool-site-gate-set.mdиндекс документации — /llms.txt
site_gate_set
Обновлено
Open a page, or one block of it, only to part of the audience. Effective at once; a republish keeps it. One rule per TARGET: `path`, a mask of the served path (`/pricing.html`, `/lessons/`, `/lessons/*`; `*` only last; `/pricing` does not match `pricing.html`), plus optional `block` (lowercase letters, digits, -). Setting a target again updates it. A block is the bundle file `__telegafirst/blocks/{block}.html`; the page holds `<div data-tgf-block="{block}">teaser</div>` and `<script src="/widget/blocks.v1.js" async></script>`; a script inside a block does not run. Without `block` the whole page is closed and a visitor who fails goes to sign-in (`mode` ignored). `any_of` (1-10) = who gets in; ONE of the conditions opens it: `{"kind":"product","catalog_id":5}` (bought it; a 0-price product counts); `{"kind":"subscription"}` (any live paid subscription; with `catalog_id`: to that item, trial and 0-price too); `{"kind":"channel"}` (in the public channel); `{"kind":"signed_in"}` (any signed-in customer of this business); `{"kind":"segment","saved_segment_id":12}` or `{"kind":"segment","filter":{...}}` (filter of `describe_segment_axes`: include groups minus `exclude`; axes partner/referrals_of, inviter/invited_by, manual = user list); `{"kind":"password","password":"acme"}` (made with `site_password_set`). Where masks overlap, the most specific one decides and overrides the general (`/kp/acme/*` over `/kp/*`); a block follows the most specific mask of its page. The platform keeps passwords; never put one in HTML or JS. The sign-in page is ready; your own = `login_path` (open, outside every closed mask) + `/widget/gate.v1.js` (`tgf.gate.unlock(password)`). Recipes: several clients = nested masks, `/kp/*` [shared], `/kp/acme/*` [acme, shared]; data for the admitted = a JSON file under the closed mask; a third-party API key = `secret_put`. `mode`: `hide` (default) or `lock` (stub with Sign in / Get access). `is_active:false` pauses. `unprojected_hosts`>0: some edges catch up soon. `rule.id` goes to `site_gate_remove`.
Права и условия
required_scopes: ALL.
| Поле | Значение |
|---|---|
| description | "Open a page, or one block of it, only to part of the audience. Effective at once; a republish keeps it. One rule per TARGET: `path`, a mask of the served path (`/pricing.html`, `/lessons/`, `/lessons/*`; `*` only last; `/pricing` does not match `pricing.html`), plus optional `block` (lowercase letters, digits, -). Setting a target again updates it. A block is the bundle file `__telegafirst/blocks/{block}.html`; the page holds `<div data-tgf-block=\"{block}\">teaser</div>` and `<script src=\"/widget/blocks.v1.js\" async></script>`; a script inside a block does not run. Without `block` the whole page is closed and a visitor who fails goes to sign-in (`mode` ignored). `any_of` (1-10) = who gets in; ONE of the conditions opens it: `{\"kind\":\"product\",\"catalog_id\":5}` (bought it; a 0-price product counts); `{\"kind\":\"subscription\"}` (any live paid subscription; with `catalog_id`: to that item, trial and 0-price too); `{\"kind\":\"channel\"}` (in the public channel); `{\"kind\":\"signed_in\"}` (any signed-in customer of this business); `{\"kind\":\"segment\",\"saved_segment_id\":12}` or `{\"kind\":\"segment\",\"filter\":{...}}` (filter of `describe_segment_axes`: include groups minus `exclude`; axes partner/referrals_of, inviter/invited_by, manual = user list); `{\"kind\":\"password\",\"password\":\"acme\"}` (made with `site_password_set`). Where masks overlap, the most specific one decides and overrides the general (`/kp/acme/*` over `/kp/*`); a block follows the most specific mask of its page. The platform keeps passwords; never put one in HTML or JS. The sign-in page is ready; your own = `login_path` (open, outside every closed mask) + `/widget/gate.v1.js` (`tgf.gate.unlock(password)`). Recipes: several clients = nested masks, `/kp/*` [shared], `/kp/acme/*` [acme, shared]; data for the admitted = a JSON file under the closed mask; a third-party API key = `secret_put`. `mode`: `hide` (default) or `lock` (stub with Sign in / Get access). `is_active:false` pauses. `unprojected_hosts`>0: some edges catch up soon. `rule.id` goes to `site_gate_remove`." |
| domain | "site" |
| name | "site_gate_set" |
| platform_version | "42248466c94e00eec0d71429ed34a30fd211e9b0" |
| required_scopes | ["site:write"] |
| risk | "write" |
| scope | "site:write" |
| title | "Site Gate Set" |