Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 30 additions & 7 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,11 @@ tags:
description: |
Impact Celebrations announce good news for a Workspace (Project) or Portfolio (Album, Bundle in
the code) automatically. Its editors switch them on and tick the metrics worth celebrating. Every
hour Makerble checks: when a ticked metric reaches its target, or when 80% of Contacts judged on
hour Makerble checks: when a ticked metric reaches its target, when a ticked Engagement Tracker
(a participation Change) reaches 10, 100, 1,000 and so on, or when 80% of Contacts judged on
a ticked Choice tracker (a Scale Indicator with a success direction) have improved, its
colleagues see a popup announcement for 7 days. Each target, and each Choice tracker, celebrates
once; anything already reached when first checked is recorded without a popup. Only whoever may
colleagues see a popup announcement for 7 days. Each target, each milestone, and each Choice tracker,
celebrates once; anything already reached when first checked is recorded without a popup. Only whoever may
edit the Workspace's or Portfolio's targets can read or change its Impact Celebrations.
- name: Snapshot
description: |
Expand Down Expand Up @@ -36956,6 +36957,13 @@ components:
enabled:
type: boolean
description: Whether Impact Celebrations are switched on. Off until someone switches them on.
improvement_animation:
type: string
enum: [random, people, ring, shift]
description: >-
The animation a popup plays when 80% of Contacts improve on a Choice tracker: people (People
rising), ring (Ring passes 80%), shift (Answers shift up), or random (a different one each time,
the default). A target reached always fills a progress bar.
changed_by_id:
type: integer
nullable: true
Expand All @@ -36973,6 +36981,7 @@ components:
resource_type: project
resource_id: 619
enabled: true
improvement_animation: random
changed_by_id: 42
updated_at: "2026-11-30T09:15:00Z"
metrics:
Expand Down Expand Up @@ -37002,8 +37011,11 @@ components:
example: Attendance
kind:
type: string
enum: [target, improvement]
description: target celebrates reaching a target; improvement (Choice trackers) celebrates 80% of Contacts improving
enum: [target, improvement, milestone]
description: >-
target celebrates reaching a target (and, for an Engagement Tracker, its milestones too); milestone
(an Engagement Tracker with no target) celebrates reaching 10, 100, 1,000 and so on; improvement
(Choice trackers) celebrates 80% of Contacts improving
celebrates_when:
type: string
example: 200 by 31 Dec 2026
Expand All @@ -37025,14 +37037,18 @@ components:
items:
type: string
description: The `key`s of the metrics to tick; any not sent are unticked
improvement_animation:
type: string
enum: [random, people, ring, shift]
description: Which animation plays when Contacts improve; leave it out to keep it as it is
Celebration:
type: object
properties:
id:
type: integer
kind:
type: string
enum: [target, improvement]
enum: [target, improvement, milestone]
metric_type:
type: string
enum: [Change, Indicator]
Expand All @@ -37043,7 +37059,7 @@ components:
nullable: true
target_number:
type: integer
description: The target reached, or for an improvement the percentage of Contacts (80)
description: The target or milestone reached, or for an improvement the percentage of Contacts (80)
target_date:
type: string
format: date
Expand All @@ -37059,6 +37075,13 @@ components:
type: integer
nullable: true
description: How many days before its date a dated target was reached
animation:
type: string
nullable: true
enum: [bar, people, ring, shift, null]
description: >-
The animation its popup plays: bar for a target reached, or the improvement animation picked when it
was announced. Null for an improvement recorded silently or announced before animations.
announcement:
type: object
nullable: true
Expand Down
19 changes: 11 additions & 8 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6657,35 +6657,37 @@ function buildDocsPage() {
<div class="section-eyebrow">Workspaces &amp; Portfolios</div>
<h2 class="section-title">Impact Celebrations</h2>
<div class="section-desc">
<p>Impact Celebrations announce good news for a Workspace (Project) or Portfolio (Album) automatically. Its editors switch them on and tick the metrics worth celebrating, on the <strong>Impact Celebrations</strong> tab of its Preferences. Every hour Makerble checks: when a ticked metric reaches its target (a dated target, or the one-off target when there are no dated ones), or when at least 80% of the Contacts judged on a ticked Choice tracker have improved between their first and latest answers, its colleagues see a popup announcement for 7 days.</p>
<p>Each target, and each Choice tracker, celebrates once. Anything already reached when first checked (just ticked, or a target just set or lowered) is recorded without a popup, with <code>recorded_silently: true</code>. GET lists every metric that can celebrate, each with a <code>key</code> such as <code>Change-12</code> that PATCH takes in <code>metric_keys</code>.</p>
<p>Impact Celebrations announce good news for a Workspace (Project) or Portfolio (Album) automatically. Its editors switch them on and tick the metrics worth celebrating, on the <strong>Impact Celebrations</strong> tab of its Preferences. Every hour Makerble checks: when a ticked metric reaches its target (a dated target, or the one-off target when there are no dated ones), when a ticked Engagement Tracker reaches 10, 100, 1,000 and every tenfold after (whether or not it also has a target), or when at least 80% of the Contacts judged on a ticked Choice tracker have improved between their first and latest answers, its colleagues see a popup announcement for 7 days, with an animation and confetti.</p>
<p>Each target, each milestone and each Choice tracker celebrates once. Anything already reached when first checked (just ticked, or a target just set or lowered) is recorded without a popup, with <code>recorded_silently: true</code>. GET lists every metric that can celebrate, each with a <code>key</code> such as <code>Change-12</code> that PATCH takes in <code>metric_keys</code>.</p>
<p>A target or milestone fills a progress bar. When Contacts improve, the popup plays the animation in <code>improvement_animation</code>: <code>people</code> (People rising), <code>ring</code> (Ring passes 80%), <code>shift</code> (Answers shift up), or <code>random</code>, a different one each time (the default). Each celebration says which one it played in <code>animation</code>.</p>
<p>Only whoever may edit the Workspace's or Portfolio's targets can read or change its Impact Celebrations; anyone else gets <code>403</code>. A Workspace or Portfolio that doesn't exist answers <code>404</code>.</p>
</div>
<div class="endpoint-list">
${endpointCard("GET", "/projects/{project_id}/celebration_settings", "Get a Workspace's Impact Celebrations settings", true, [
{ name: "project_id", in: "path", type: "integer", required: true, desc: "The Workspace's (Project's) ID" }
], [
{ code: "200", cls: "response-2xx", desc: "enabled, and metrics: every metric that can celebrate, with key, kind, celebrates_when, ticked and can_tick" },
{ code: "200", cls: "response-2xx", desc: "enabled, improvement_animation, and metrics: every metric that can celebrate, with key, kind (target, milestone or improvement), celebrates_when, ticked and can_tick" },
{ code: "403", cls: "response-4xx", desc: "Can't edit this Workspace's targets" },
{ code: "404", cls: "response-4xx", desc: "No such Workspace" }
])}
${endpointCard("PATCH", "/projects/{project_id}/celebration_settings", "Switch a Workspace's Impact Celebrations on or off, and choose the metrics", true, [
{ name: "project_id", in: "path", type: "integer", required: true, desc: "The Workspace's (Project's) ID" },
{ name: "enabled", in: "body", type: "boolean", required: false, desc: "Whether Impact Celebrations are on" },
{ name: "metric_keys", in: "body", type: "string[]", required: false, desc: "Keys of the metrics to tick; [] unticks every one" }
{ name: "metric_keys", in: "body", type: "string[]", required: false, desc: "Keys of the metrics to tick; [] unticks every one" },
{ name: "improvement_animation", in: "body", type: "string", required: false, desc: "random, people, ring or shift: the animation when Contacts improve" }
], [
{ code: "200", cls: "response-2xx", desc: "The settings after the change" },
{ code: "403", cls: "response-4xx", desc: "Can't edit this Workspace's targets" },
{ code: "404", cls: "response-4xx", desc: "No such Workspace" },
{ code: "422", cls: "response-4xx", desc: "A metric that can't celebrate there" }
{ code: "422", cls: "response-4xx", desc: "A metric that can't celebrate there, or an unknown animation" }
])}
${endpointCard("GET", "/projects/{project_id}/celebrations", "List a Workspace's Impact Celebrations so far", true, [
{ name: "project_id", in: "path", type: "integer", required: true, desc: "The Workspace's (Project's) ID" },
{ name: "page", type: "integer", required: false, desc: "Page number (default 1)" },
{ name: "per_page", type: "integer", required: false, desc: "Results per page (default 10, max 200)" },
{ name: "last_synced_datetime", type: "string", required: false, desc: "Only those changed after this datetime" }
], [
{ code: "200", cls: "response-2xx", desc: "Newest first: kind, metric, target, reached_on, days_early, recorded_silently and the announcement shown" },
{ code: "200", cls: "response-2xx", desc: "Newest first: kind, metric, target, reached_on, days_early, recorded_silently, animation and the announcement shown" },
{ code: "403", cls: "response-4xx", desc: "Can't edit this Workspace's targets" },
{ code: "404", cls: "response-4xx", desc: "No such Workspace" }
])}
Expand All @@ -6699,12 +6701,13 @@ function buildDocsPage() {
${endpointCard("PATCH", "/albums/{album_id}/celebration_settings", "Switch a Portfolio's Impact Celebrations on or off, and choose the metrics", true, [
{ name: "album_id", in: "path", type: "integer", required: true, desc: "The Portfolio's (Album's) ID" },
{ name: "enabled", in: "body", type: "boolean", required: false, desc: "Whether Impact Celebrations are on" },
{ name: "metric_keys", in: "body", type: "string[]", required: false, desc: "Keys of the metrics to tick; [] unticks every one" }
{ name: "metric_keys", in: "body", type: "string[]", required: false, desc: "Keys of the metrics to tick; [] unticks every one" },
{ name: "improvement_animation", in: "body", type: "string", required: false, desc: "random, people, ring or shift: the animation when Contacts improve" }
], [
{ code: "200", cls: "response-2xx", desc: "The settings after the change" },
{ code: "403", cls: "response-4xx", desc: "Can't edit this Portfolio's targets" },
{ code: "404", cls: "response-4xx", desc: "No such Portfolio" },
{ code: "422", cls: "response-4xx", desc: "A metric that can't celebrate there" }
{ code: "422", cls: "response-4xx", desc: "A metric that can't celebrate there, or an unknown animation" }
])}
${endpointCard("GET", "/albums/{album_id}/celebrations", "List a Portfolio's Impact Celebrations so far", true, [
{ name: "album_id", in: "path", type: "integer", required: true, desc: "The Portfolio's (Album's) ID" },
Expand Down
Loading