diff --git a/openapi.yaml b/openapi.yaml index c3c8fcd..a8a529b 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -22611,6 +22611,23 @@ components: `checklists`. The button then opens that page in the person's own organisation and closes the popup; give it a label that says where it goes ("Explore Checklists"). For someone who can't open the page, it only closes the popup. A live `feature_tour_id` takes priority. Send null to clear it. + placement: + type: string + enum: [popup, during_build] + description: | + Makerble's own only. Where it shows: `popup` (the default), the "What's new in Makerble" popup and What's new; + or `during_build`, the screen a new organisation sees while Makerble builds its first workspaces after the + onboarding journey. "During build" announcements never pop up and aren't listed in What's new: while live, + they take turns on that screen in `priority` order, each for `display_seconds`. + priority: + type: integer + minimum: 1 + description: The order "During build" announcements show in, 1 first. Defaults to 1. + display_seconds: + type: integer + minimum: 3 + maximum: 120 + description: How many seconds a "During build" announcement shows before the next. Defaults to 10. audience: type: string enum: [everyone, colleagues, administrators] @@ -22881,6 +22898,16 @@ components: type: string nullable: true description: The deep link the button opens, or null when it only closes the popup. + placement: + type: string + enum: [popup, during_build] + description: Where it shows, the popup or the onboarding journey's building screen ("During build"). + priority: + type: integer + description: The order "During build" announcements show in, 1 first. + display_seconds: + type: integer + description: How many seconds a "During build" announcement shows before the next. button_click_count: type: integer description: People who clicked the button through to its page. diff --git a/server.js b/server.js index d5fc88e..ee082bc 100644 --- a/server.js +++ b/server.js @@ -5312,6 +5312,7 @@ function buildDocsPage() {
System Access users can see and change every announcement. Anyone else can see and change only those for places where they hold the role now: an Organisation Admin, for their Organisation and its Workspaces and Teams; a Workspace editor (Project Editor), for that Workspace; a Team leader, for that Team. Someone who can make announcements nowhere gets 403.
visual_type is name_change (an animation of 1 to 3 name_changes, old name → new name), vimeo (a Vimeo video at vimeo_url), image (an uploaded picture, such as a screenshot, shown whole with its image_alt for screen readers; returned as image_url), intro_animation (the animation of a feature's Intro, by its intro_key; the popup plays the Intro's storyboard as it is when shown, and nothing if the Intro loses it), storyboard (an animation of its own, with the same rules as an Intro's storyboard, for when the Intro's doesn't fit) or none. The two animations are for Makerble's own only. audience is everyone, colleagues (everyone except Contacts with a login) or administrators (Organisation Admins); a place's announcement is always for its colleagues (an Organisation's colleagues, a Workspace's editors, reporters and observers, or a Team's members and leaders), can't use name_change, and its learn_more_url can be any https page. status stores draft or scheduled; current_status also says whether a scheduled one is live or has ended.
Makerble's own can be narrowed further. roles shows it only to people holding at least one of the listed roles, in place of audience: organisation_admin, editor (Workspace editor), reporter, observer, team_leader, active_participant (Contact with a login) and survey_portal_user; Contacts with a login and Survey Portal users are left out unless their own role is listed. audience_rules targets people by behaviour, as JSON over named facts, for example {"all": [{"fact": "distance_travelled_not_set_up"}]} for people whose organisation hasn't set up Distance Travelled. Each rule is exactly one of {fact, params}, {all: [rules]}, {any: [rules]} or {not: rule}, at most 5 deep and 10 facts. List Announcement Facts gives the facts and their params; an unknown fact or param returns 422 naming the rule. Both are for System Access users only.
Makerble's own can show on the screen a new organisation sees while Makerble builds its first workspaces after the onboarding journey, instead of in the popup: set placement to during_build (the default is popup). "During build" announcements never pop up and aren't listed in What's new. While live, they take turns on that screen in priority order (1 first), each for display_seconds (3 to 120, default 10), until the build finishes.
Makerble's own can also be limited to some pages with page_keys, so a feature is announced where it lives: ["contacts"] shows it only when someone opens Manage Contacts, including when they move there from another page without reloading. A page key is the key of the page's Intro (its Show/Hide Guidance panel), such as contacts, events, checklists, surveys or tasks; pages without an Intro can't be chosen. An empty list (the default) means any page. An unknown key returns 422 listing the keys available. System Access users only.
intro_key whose Intro has no animation, a storyboard that breaks the rules, a file that isn't a PNG, JPG, GIF or WebP image or is over 5 MB, or the name change animation for a place" }
- ], "Body: scope_type and scope_id (whose announcement; leave out for one of Makerble's own), title (headline, up to 90), body (message, up to 280), visual_type, name_changes: [{old_name, new_name}] (1 to 3), vimeo_url, image and image_alt (for image: a PNG, JPG, GIF or WebP file of up to 5 MB, sent as a file in a multipart/form-data request or in JSON as {filename, data} with the data in base64, and its alt text, up to 250 characters, both required), intro_key (for intro_animation), storyboard (for storyboard), learn_more_url (a Makerble User Guide page for Makerble's own; any https page for a place's), training_material_id (a place's announcement only: one of its Organisation's Training materials, linked for the colleagues it is shared with), button_label (default \"Got it\"), button_deep_link (Makerble's own only: a deep link name from List Deep Links; the button then opens that page in the person's own organisation and closes the popup), feature_tour_id (Makerble's own only: a feature tour; while it is live the button says \"Take the tour\" and starts it), feature_launch_id (Makerble's own only: the feature launch it announces; wherever body, learn_more_url, button_deep_link or feature_tour_id is empty the launch's own is used, so body may be left empty while the launch has a short description), audience, roles, audience_rules and page_keys (Makerble's own only; see above), starts_on, ends_on, status.")}
+ ], "Body: scope_type and scope_id (whose announcement; leave out for one of Makerble's own), title (headline, up to 90), body (message, up to 280), visual_type, name_changes: [{old_name, new_name}] (1 to 3), vimeo_url, image and image_alt (for image: a PNG, JPG, GIF or WebP file of up to 5 MB, sent as a file in a multipart/form-data request or in JSON as {filename, data} with the data in base64, and its alt text, up to 250 characters, both required), intro_key (for intro_animation), storyboard (for storyboard), learn_more_url (a Makerble User Guide page for Makerble's own; any https page for a place's), training_material_id (a place's announcement only: one of its Organisation's Training materials, linked for the colleagues it is shared with), button_label (default \"Got it\"), button_deep_link (Makerble's own only: a deep link name from List Deep Links; the button then opens that page in the person's own organisation and closes the popup), feature_tour_id (Makerble's own only: a feature tour; while it is live the button says \"Take the tour\" and starts it), feature_launch_id (Makerble's own only: the feature launch it announces; wherever body, learn_more_url, button_deep_link or feature_tour_id is empty the launch's own is used, so body may be left empty while the launch has a short description), audience, roles, audience_rules and page_keys (Makerble's own only; see above), placement, priority and display_seconds (Makerble's own only; see above), starts_on, ends_on, status.")}
${endpointCard("PATCH", "/announcements/{id}", "Update an Announcement", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Announcement ID" }
], [