{"result":{"depiction_url":null,"edges":{"refers":{"objects":[{"created":"2026-09-30T09:18:26Z","object_id":{"id":2747,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_zotonic_cotonic_model_wires","title":"model\/wires","uri":"https:\/\/zotonic.com\/id\/2747"},"seq":1000000},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2748,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_zotonic_cotonic_model_oauth","title":"model\/oauth","uri":"https:\/\/zotonic.com\/id\/2748"},"seq":1000000},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2749,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_zotonic_cotonic_model_loadmore","title":"model\/loadmore","uri":"https:\/\/zotonic.com\/id\/2749"},"seq":1000000},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2750,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_zotonic_cotonic_model_fileuploader","title":"model\/fileuploader","uri":"https:\/\/zotonic.com\/id\/2750"},"seq":1000000},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2751,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_zotonic_cotonic_model_console","title":"model\/console","uri":"https:\/\/zotonic.com\/id\/2751"},"seq":1000000},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2752,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_zotonic_cotonic_model_clipboard","title":"model\/clipboard","uri":"https:\/\/zotonic.com\/id\/2752"},"seq":1000000},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2753,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_zotonic_cotonic_model_auth_ui","title":"model\/auth-ui","uri":"https:\/\/zotonic.com\/id\/2753"},"seq":1000000},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2754,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_zotonic_cotonic_model_auth","title":"model\/auth","uri":"https:\/\/zotonic.com\/id\/2754"},"seq":1000000},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2755,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_zotonic_cotonic_model_alert","title":"model\/alert","uri":"https:\/\/zotonic.com\/id\/2755"},"seq":1000000},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2756,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_zotonic_cotonic_model_activity","title":"model\/activity","uri":"https:\/\/zotonic.com\/id\/2756"},"seq":1000000},{"created":"2026-09-30T09:32:49Z","object_id":{"id":2736,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_location","title":"model\/location","uri":"https:\/\/zotonic.com\/id\/2736"},"seq":1000000},{"created":"2026-09-30T09:32:49Z","object_id":{"id":2737,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_ui","title":"model\/ui","uri":"https:\/\/zotonic.com\/id\/2737"},"seq":1000000},{"created":"2026-09-30T09:32:50Z","object_id":{"id":2743,"is_a":["text","documentation","reference","cotonic_reference","cotonic_model"],"name":"doc_cotonic_model_sessionid","title":"model\/sessionId","uri":"https:\/\/zotonic.com\/id\/2743"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"subject":{"objects":[{"created":"2026-09-30T09:18:26Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2598,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_messaging_and_pubsub","title":"Messaging and publish-subscribe","uri":"https:\/\/zotonic.com\/id\/2598"},"seq":3},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2625,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_model","title":"Model","uri":"https:\/\/zotonic.com\/id\/2625"},"seq":4},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2673,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_javascript","title":"JavaScript","uri":"https:\/\/zotonic.com\/id\/2673"},"seq":5},{"created":"2026-09-30T09:18:26Z","object_id":{"id":2718,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_cotonic","title":"Cotonic","uri":"https:\/\/zotonic.com\/id\/2718"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":2757,"is_a":["text","documentation","reference","cotonic_reference"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2757"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_zotonic_cotonic_models","page_url":{"en":"https:\/\/zotonic.com\/cotonic\/zotonic-models","x-default":"https:\/\/zotonic.com\/cotonic\/zotonic-models"},"preview_url":null,"resource":{"version":28,"pivot_location_lat":null,"title":"Zotonic Cotonic models","is_authoritative":true,"body":"<h1>Zotonic Cotonic models<\/h1>\n<p>These browser-side models extend Cotonic with Zotonic functionality. Each model\nhas its own reference page:<\/p>\n<table class=\"table\"><thead><tr><th>Model<\/th><th>Purpose<\/th><\/tr><\/thead><tbody><tr><td><a href=\"\/id\/doc_zotonic_cotonic_model_auth\">model\/auth<\/a><\/td><td>Authentication state and operations.<\/td><\/tr><tr><td><a href=\"\/id\/doc_zotonic_cotonic_model_auth_ui\">model\/auth-ui<\/a><\/td><td>Login and account recovery interfaces.<\/td><\/tr><tr><td><a href=\"\/id\/doc_zotonic_cotonic_model_oauth\">model\/oauth<\/a><\/td><td>OAuth authorization and redirect flows.<\/td><\/tr><tr><td><a href=\"\/id\/doc_zotonic_cotonic_model_fileuploader\">model\/fileuploader<\/a><\/td><td>Chunked uploads and upload queues.<\/td><\/tr><tr><td><a href=\"\/id\/doc_zotonic_cotonic_model_loadmore\">model\/loadmore<\/a><\/td><td>Replace a loader with server-rendered content.<\/td><\/tr><tr><td><a href=\"\/id\/doc_zotonic_cotonic_model_alert\">model\/alert<\/a><\/td><td>Alert dialogs.<\/td><\/tr><tr><td><a href=\"\/id\/doc_zotonic_cotonic_model_clipboard\">model\/clipboard<\/a><\/td><td>Copy text to the clipboard.<\/td><\/tr><tr><td><a href=\"\/id\/doc_zotonic_cotonic_model_wires\">model\/wires<\/a><\/td><td>Trigger named Zotonic events.<\/td><\/tr><tr><td><a href=\"\/id\/doc_zotonic_cotonic_model_console\">model\/console<\/a><\/td><td>Browser console logging and ping replies.<\/td><\/tr><tr><td><a href=\"\/id\/doc_zotonic_cotonic_model_activity\">model\/activity<\/a><\/td><td>Browser activity events; no request topics.<\/td><\/tr><\/tbody><\/table>\n<h2>Calling conventions<\/h2>\n<p>Use <code>cotonic.broker.publish(topic, payload)<\/code> for commands and\n<code>cotonic.broker.subscribe(topic, callback)<\/code> for events. The callback receives a\nmessage whose <code>payload<\/code> contains the data. Within a worker, use <code>self.publish<\/code>\nand <code>self.subscribe<\/code>.<\/p>\n<p>Use <code>cotonic.broker.call<\/code> or <code>self.call<\/code> only where the operation documents a\nresponse. Many commands publish events or update the interface without replying\nto the request&#39;s response topic.<\/p>\n<p>Client topics start with <code>model\/<\/code>. A topic such as\n<code>bridge\/origin\/model\/fileuploader\/post\/new<\/code> addresses a server-side Zotonic model;\nit is a different API from <code>model\/fileuploader\/post\/new<\/code> in the browser.<\/p>\n<p>Availability depends on the scripts and workers loaded by the page. Cotonic&#39;s\nown models, including <a href=\"\/id\/doc_cotonic_model_sessionid\" class=\"doc-reference doc-reference-cotonic\"><code>cotonic#sessionId<\/code><\/a>, <a href=\"\/id\/doc_cotonic_model_ui\" class=\"doc-reference doc-reference-cotonic\"><code>cotonic#ui<\/code><\/a>, and <a href=\"\/id\/doc_cotonic_model_location\" class=\"doc-reference doc-reference-cotonic\"><code>cotonic#location<\/code><\/a>, are\ndocumented in the Cotonic reference maintained in its repository.<\/p>","slug":"zotonic-cotonic-models","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"402a68da6c13d4c7ed358c1e4f8c404a11693ea8751bcc26d30dab3858b4dc92","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":2722,"is_a":["meta","category"],"name":"cotonic_reference","title":"Cotonic","uri":"https:\/\/zotonic.com\/id\/cotonic_reference"},"doc_source_path":"doc\/cotonic-models\/README.md","publication_start":"2026-09-30T09:18:26Z","page_path":"\/cotonic\/zotonic-models","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/doc\/cotonic-models\/README.md","pivot_location_lng":null,"doc_source_kind":"cotonic_model","name":"doc_zotonic_cotonic_models","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2026-09-30T09:18:26Z","uri":null,"doc_status":"current","is_dependent":false,"publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"b8c4b2ccdc223257f311968fbd17b2d66f0c4156\n","creator_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"modified":"2026-09-30T09:40:08Z","title_slug":"zotonic-cotonic-models"},"uri":"https:\/\/zotonic.com\/id\/2757","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2757"}},"status":"ok"}