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
48 changes: 46 additions & 2 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5657,7 +5657,7 @@ paths:
description: |
Updates a Framework Set the user can edit. Send `frameworks` to replace the list of Impact
Frameworks (in order), and `financial_values` to replace the Financial Value defined for each
Outcome. `charity_id` is the organisation the user is acting for.
Outcome, and optionally for each of an Outcome's own Indicators (`indicator_id`, e.g. a TOMs Measure). `charity_id` is the organisation the user is acting for.
operationId: updateFrameworkSet
security: [{tokenAuth: []}]
parameters:
Expand All @@ -5678,6 +5678,9 @@ paths:
financial_values:
- outcome_id: 5521
financial_value_id: 88
- outcome_id: 5521
indicator_id: 2240
financial_value_id: 91
responses:
"200":
description: The updated Framework Set
Expand Down Expand Up @@ -5863,6 +5866,12 @@ paths:
type: integer
outcome_id:
type: integer
framework_indicator_id:
type: integer
description: |
Optional. Which of the Outcome's own Indicators this indicator counts as (e.g. a TOMs
Measure). In a Framework Set with its own Financial Values, Stories are then valued at
that Indicator's value. It can't be changed on an existing link; remove the link first.
project_ids:
type: array
items:
Expand Down Expand Up @@ -20011,6 +20020,13 @@ components:
level2_plural:
type: string
example: targets
level3_singular:
type: string
example: Indicator
description: The name of each Outcome's own indicators in this set, e.g. Measure for the TOM System
level3_plural:
type: string
example: indicators
value_source:
type: string
enum: [organisation_values, set_values]
Expand Down Expand Up @@ -20052,6 +20068,10 @@ components:
properties:
outcome_id:
type: integer
indicator_id:
type: integer
nullable: true
description: One of the Outcome's own Indicators whose value this is; empty for the Outcome's own value
financial_value_id:
type: integer

Expand Down Expand Up @@ -20087,6 +20107,10 @@ components:
type: string
level2_plural:
type: string
level3_singular:
type: string
level3_plural:
type: string
value_source:
type: string
enum: [organisation_values, set_values]
Expand Down Expand Up @@ -20121,12 +20145,18 @@ components:
type: string
financial_values:
type: array
description: The Financial Value for each Outcome, used when value_source is set_values. Replaces the current list.
description: |
The Financial Value for each Outcome, and optionally for each of an Outcome's own Indicators
(give indicator_id), used when value_source is set_values. An Indicator's value is used instead
of its Outcome's. Replaces the current list.
items:
type: object
properties:
outcome_id:
type: integer
indicator_id:
type: integer
description: One of the Outcome's own Indicators, e.g. a TOMs Measure
financial_value_id:
type: integer

Expand Down Expand Up @@ -20212,6 +20242,13 @@ components:
type: integer
financial_value:
type: number
framework_indicator_id:
type: integer
nullable: true
description: For a linked Indicator, which of the Outcome's own Indicators it counts as
counted_through_links:
type: boolean
description: For a core Indicator no Story records directly, whether linked Indicators count as it

FrameworkLinkMigration:
type: object
Expand Down Expand Up @@ -20254,6 +20291,13 @@ components:
outcome_title:
type: string
example: "4.4 Increase the number of youth and adults who have relevant skills"
framework_indicator_id:
type: integer
nullable: true
description: Which of the Outcome's own Indicators this indicator counts as, if any (e.g. a TOMs Measure)
framework_indicator_name:
type: string
nullable: true
project_ids:
type: array
items:
Expand Down
8 changes: 4 additions & 4 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2574,15 +2574,15 @@ function buildDocsPage() {
{ code: "403", cls: "response-4xx", desc: "The user may not create a set with this <code>availability</code>" },
{ code: "404", cls: "response-4xx", desc: "Unknown Organisation" },
{ code: "422", cls: "response-4xx", desc: "Validation failed, e.g. no name or no Impact Frameworks" }
], "Body: <code>charity_id</code>, <code>name</code>, <code>availability</code>, <code>network_id</code>, <code>level1_singular</code>, <code>level1_plural</code>, <code>level2_singular</code>, <code>level2_plural</code>, <code>value_source</code>, <code>version_label</code>, <code>supersedes_id</code>, <code>status</code>, <code>frameworks: [{template_id, short_code, colour, text_colour}]</code> in order, and <code>new_frameworks: [name]</code> to create new Impact Frameworks.")}
], "Body: <code>charity_id</code>, <code>name</code>, <code>availability</code>, <code>network_id</code>, <code>level1_singular</code>, <code>level1_plural</code>, <code>level2_singular</code>, <code>level2_plural</code>, <code>level3_singular</code>, <code>level3_plural</code> (the name of each Outcome's own Indicators, e.g. Measure), <code>value_source</code>, <code>version_label</code>, <code>supersedes_id</code>, <code>status</code>, <code>frameworks: [{template_id, short_code, colour, text_colour}]</code> in order, and <code>new_frameworks: [name]</code> to create new Impact Frameworks.")}
${endpointCard("PATCH", "/framework_sets/{id}", "Update a Framework Set", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Framework Set ID" }
], [
{ code: "200", cls: "response-2xx", desc: "Framework Set updated" },
{ code: "403", cls: "response-4xx", desc: "The user can't edit this set" },
{ code: "404", cls: "response-4xx", desc: "Not found, or not available to the user" },
{ code: "422", cls: "response-4xx", desc: "Validation failed" }
], "Same body as create; only the fields sent change. <code>frameworks</code> (when sent) replaces the ordered list; <code>financial_values: [{outcome_id, financial_value_id}]</code> replaces the Financial Value chosen for each Outcome.")}
], "Same body as create; only the fields sent change. <code>frameworks</code> (when sent) replaces the ordered list; <code>financial_values: [{outcome_id, indicator_id, financial_value_id}]</code> replaces the Financial Values chosen for the set: leave out <code>indicator_id</code> for an Outcome's own value, or give one of the Outcome's own Indicators (e.g. a TOMs Measure) to value it separately. An Indicator's value is used instead of its Outcome's.")}
${endpointCard("GET", "/framework_sets/{id}/contribution", "Get an organisation's contribution to a Framework Set", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Framework Set ID" },
{ name: "charity_id", type: "integer", required: true, desc: "The Organisation ID; the user must belong to it" },
Expand All @@ -2609,14 +2609,14 @@ function buildDocsPage() {
{ name: "per_page", type: "integer", required: false, desc: "Records per page" },
{ name: "last_synced_datetime", type: "string", required: false, desc: "ISO 8601 incremental sync" }
], [
{ code: "200", cls: "response-2xx", desc: "Paginated links with <code>indicator_name</code>, <code>outcome_title</code>, <code>project_ids</code> and <code>all_projects</code>" },
{ code: "200", cls: "response-2xx", desc: "Paginated links with <code>indicator_name</code>, <code>outcome_title</code>, <code>framework_indicator_id</code> and <code>framework_indicator_name</code> (which of the Outcome's own Indicators it counts as, if any), <code>project_ids</code> and <code>all_projects</code>" },
{ code: "403", cls: "response-4xx", desc: "The user doesn't belong to the Organisation" }
])}
${endpointCard("POST", "/framework_links", "Link an Indicator to an Outcome in a Framework Set", true, [], [
{ code: "201", cls: "response-2xx", desc: "The Linked indicator" },
{ code: "403", cls: "response-4xx", desc: "Not an organisation admin" },
{ code: "422", cls: "response-4xx", desc: "Not one of the organisation's Indicators or projects, an Outcome outside the sets it can use, or already linked" }
], "Body: <code>charity_id</code>, <code>indicator_id</code>, <code>outcome_id</code>, <code>project_ids</code> (empty: every project). Linking again with more projects adds them to the existing link.")}
], "Body: <code>charity_id</code>, <code>indicator_id</code>, <code>outcome_id</code>, <code>framework_indicator_id</code> (optional: which of the Outcome's own Indicators it counts as, e.g. a TOMs Measure; can't be changed on an existing link), <code>project_ids</code> (empty: every project). Linking again with more projects adds them to the existing link.")}
${endpointCard("DELETE", "/framework_links/{id}", "Remove a Linked indicator", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Linked indicator ID" },
{ name: "charity_id", type: "integer", required: true, desc: "The Organisation ID" }
Expand Down
Loading