@spaciv/sdk 0.1.15 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +2 -2
  2. package/dist/apis/DashboardsApi.d.ts +12 -12
  3. package/dist/apis/DashboardsApi.js +6 -6
  4. package/dist/apis/ScenariosApi.d.ts +8 -8
  5. package/dist/apis/ScenariosApi.js +4 -4
  6. package/dist/apis/TopDownModelsApi.d.ts +4 -4
  7. package/dist/apis/TopDownModelsApi.js +2 -2
  8. package/dist/esm/apis/DashboardsApi.d.ts +12 -12
  9. package/dist/esm/apis/DashboardsApi.js +6 -6
  10. package/dist/esm/apis/ScenariosApi.d.ts +8 -8
  11. package/dist/esm/apis/ScenariosApi.js +4 -4
  12. package/dist/esm/apis/TopDownModelsApi.d.ts +4 -4
  13. package/dist/esm/apis/TopDownModelsApi.js +2 -2
  14. package/dist/esm/models/CalcListEntry.d.ts +6 -0
  15. package/dist/esm/models/CalcListEntry.js +2 -0
  16. package/dist/esm/models/CalcRes.d.ts +6 -0
  17. package/dist/esm/models/CalcRes.js +4 -0
  18. package/dist/esm/models/ScenarioChangelogBody.d.ts +6 -0
  19. package/dist/esm/models/ScenarioChangelogBody.js +2 -0
  20. package/dist/esm/models/ScenarioCreate.d.ts +6 -0
  21. package/dist/esm/models/ScenarioCreate.js +2 -0
  22. package/dist/esm/models/ScenarioPatch.d.ts +12 -0
  23. package/dist/esm/models/ScenarioPatch.js +4 -0
  24. package/dist/esm/models/TopDownModelEntryUpdate.d.ts +6 -0
  25. package/dist/esm/models/TopDownModelEntryUpdate.js +2 -0
  26. package/dist/models/CalcListEntry.d.ts +6 -0
  27. package/dist/models/CalcListEntry.js +2 -0
  28. package/dist/models/CalcRes.d.ts +6 -0
  29. package/dist/models/CalcRes.js +4 -0
  30. package/dist/models/ScenarioChangelogBody.d.ts +6 -0
  31. package/dist/models/ScenarioChangelogBody.js +2 -0
  32. package/dist/models/ScenarioCreate.d.ts +6 -0
  33. package/dist/models/ScenarioCreate.js +2 -0
  34. package/dist/models/ScenarioPatch.d.ts +12 -0
  35. package/dist/models/ScenarioPatch.js +4 -0
  36. package/dist/models/TopDownModelEntryUpdate.d.ts +6 -0
  37. package/dist/models/TopDownModelEntryUpdate.js +2 -0
  38. package/package.json +1 -1
  39. package/src/apis/DashboardsApi.ts +12 -12
  40. package/src/apis/ScenariosApi.ts +8 -8
  41. package/src/apis/TopDownModelsApi.ts +4 -4
  42. package/src/models/CalcListEntry.ts +8 -0
  43. package/src/models/CalcRes.ts +9 -0
  44. package/src/models/ScenarioChangelogBody.ts +8 -0
  45. package/src/models/ScenarioCreate.ts +8 -0
  46. package/src/models/ScenarioPatch.ts +16 -0
  47. package/src/models/TopDownModelEntryUpdate.ts +8 -0
@@ -91,7 +91,7 @@ export interface DashboardsApiUpdateCardsRequest {
91
91
  */
92
92
  export interface DashboardsApiInterface {
93
93
  /**
94
- * Creates a new dashboard for the current project and returns its UUID. If a dashboard with the supplied `id` already exists, the call is idempotent: it ensures the dashboard is indexed under the project and returns the existing ID without overwriting its content. The `account` ID is reserved for the account-level dashboard; project-scoped requests supplying it are rejected with 400. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Requires the *Edit org model* permission, and the *Variable controls* permission when any card has controls.
94
+ * Creates a new dashboard for the current project and returns its UUID. If a dashboard with the supplied `id` already exists, the call is idempotent: it ensures the dashboard is indexed under the project and returns the existing ID without overwriting its content. The `account` ID is reserved for the account-level dashboard; project-scoped requests supplying it are rejected with 400. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Requires the *Edit org model* permission, and the *Variable controls* permission when any card has controls.
95
95
  * @summary Create a dashboard
96
96
  * @param {DashboardPost} [dashboardPost]
97
97
  * @param {*} [options] Override http request option.
@@ -101,13 +101,13 @@ export interface DashboardsApiInterface {
101
101
  createRaw(requestParameters: DashboardsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
102
102
 
103
103
  /**
104
- * Creates a new dashboard for the current project and returns its UUID. If a dashboard with the supplied `id` already exists, the call is idempotent: it ensures the dashboard is indexed under the project and returns the existing ID without overwriting its content. The `account` ID is reserved for the account-level dashboard; project-scoped requests supplying it are rejected with 400. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Requires the *Edit org model* permission, and the *Variable controls* permission when any card has controls.
104
+ * Creates a new dashboard for the current project and returns its UUID. If a dashboard with the supplied `id` already exists, the call is idempotent: it ensures the dashboard is indexed under the project and returns the existing ID without overwriting its content. The `account` ID is reserved for the account-level dashboard; project-scoped requests supplying it are rejected with 400. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Requires the *Edit org model* permission, and the *Variable controls* permission when any card has controls.
105
105
  * Create a dashboard
106
106
  */
107
107
  create(requestParameters: DashboardsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
108
108
 
109
109
  /**
110
- * Inserts a new card at the given zero-based `index` position in the dashboard\'s card list. Cards already at that position and beyond are shifted down. If `index` is out of range it is clamped to the nearest valid position. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the card has controls.
110
+ * Inserts a new card at the given zero-based `index` position in the dashboard\'s card list. Cards already at that position and beyond are shifted down. If `index` is out of range it is clamped to the nearest valid position. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the card has controls.
111
111
  * @summary Add a card to a dashboard
112
112
  * @param {string} id
113
113
  * @param {DashboardCardCreate} [dashboardCardCreate]
@@ -118,7 +118,7 @@ export interface DashboardsApiInterface {
118
118
  createCardsRaw(requestParameters: DashboardsApiCreateCardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
119
119
 
120
120
  /**
121
- * Inserts a new card at the given zero-based `index` position in the dashboard\'s card list. Cards already at that position and beyond are shifted down. If `index` is out of range it is clamped to the nearest valid position. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the card has controls.
121
+ * Inserts a new card at the given zero-based `index` position in the dashboard\'s card list. Cards already at that position and beyond are shifted down. If `index` is out of range it is clamped to the nearest valid position. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the card has controls.
122
122
  * Add a card to a dashboard
123
123
  */
124
124
  createCards(requestParameters: DashboardsApiCreateCardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -222,7 +222,7 @@ export interface DashboardsApiInterface {
222
222
  update(requestParameters: DashboardsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
223
223
 
224
224
  /**
225
- * Applies a single action to a card on a dashboard. Use `moveCard` to swap two cards by their zero-based indices, `reorderCard` to move the card at `oldIndex` to `newIndex` (zero-based) while shifting the cards in between, or `updateCard` to replace the content of a card at a given index, including the order of its visualisation and control items. Out-of-range indices are silently ignored. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the update adds, removes, reorders or changes a card\'s controls.
225
+ * Applies a single action to a card on a dashboard. Use `moveCard` to swap two cards by their zero-based indices, `reorderCard` to move the card at `oldIndex` to `newIndex` (zero-based) while shifting the cards in between, or `updateCard` to replace the content of a card at a given index, including the order of its visualisation and control items. Out-of-range indices are silently ignored. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the update adds, removes, reorders or changes a card\'s controls.
226
226
  * @summary Update a dashboard card
227
227
  * @param {string} id
228
228
  * @param {DashboardCardPatch} [dashboardCardPatch]
@@ -233,7 +233,7 @@ export interface DashboardsApiInterface {
233
233
  updateCardsRaw(requestParameters: DashboardsApiUpdateCardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
234
234
 
235
235
  /**
236
- * Applies a single action to a card on a dashboard. Use `moveCard` to swap two cards by their zero-based indices, `reorderCard` to move the card at `oldIndex` to `newIndex` (zero-based) while shifting the cards in between, or `updateCard` to replace the content of a card at a given index, including the order of its visualisation and control items. Out-of-range indices are silently ignored. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the update adds, removes, reorders or changes a card\'s controls.
236
+ * Applies a single action to a card on a dashboard. Use `moveCard` to swap two cards by their zero-based indices, `reorderCard` to move the card at `oldIndex` to `newIndex` (zero-based) while shifting the cards in between, or `updateCard` to replace the content of a card at a given index, including the order of its visualisation and control items. Out-of-range indices are silently ignored. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the update adds, removes, reorders or changes a card\'s controls.
237
237
  * Update a dashboard card
238
238
  */
239
239
  updateCards(requestParameters: DashboardsApiUpdateCardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -246,7 +246,7 @@ export interface DashboardsApiInterface {
246
246
  export class DashboardsApi extends runtime.BaseAPI implements DashboardsApiInterface {
247
247
 
248
248
  /**
249
- * Creates a new dashboard for the current project and returns its UUID. If a dashboard with the supplied `id` already exists, the call is idempotent: it ensures the dashboard is indexed under the project and returns the existing ID without overwriting its content. The `account` ID is reserved for the account-level dashboard; project-scoped requests supplying it are rejected with 400. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Requires the *Edit org model* permission, and the *Variable controls* permission when any card has controls.
249
+ * Creates a new dashboard for the current project and returns its UUID. If a dashboard with the supplied `id` already exists, the call is idempotent: it ensures the dashboard is indexed under the project and returns the existing ID without overwriting its content. The `account` ID is reserved for the account-level dashboard; project-scoped requests supplying it are rejected with 400. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Requires the *Edit org model* permission, and the *Variable controls* permission when any card has controls.
250
250
  * Create a dashboard
251
251
  */
252
252
  async createRaw(requestParameters: DashboardsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
@@ -283,7 +283,7 @@ export class DashboardsApi extends runtime.BaseAPI implements DashboardsApiInter
283
283
  }
284
284
 
285
285
  /**
286
- * Creates a new dashboard for the current project and returns its UUID. If a dashboard with the supplied `id` already exists, the call is idempotent: it ensures the dashboard is indexed under the project and returns the existing ID without overwriting its content. The `account` ID is reserved for the account-level dashboard; project-scoped requests supplying it are rejected with 400. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Requires the *Edit org model* permission, and the *Variable controls* permission when any card has controls.
286
+ * Creates a new dashboard for the current project and returns its UUID. If a dashboard with the supplied `id` already exists, the call is idempotent: it ensures the dashboard is indexed under the project and returns the existing ID without overwriting its content. The `account` ID is reserved for the account-level dashboard; project-scoped requests supplying it are rejected with 400. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Requires the *Edit org model* permission, and the *Variable controls* permission when any card has controls.
287
287
  * Create a dashboard
288
288
  */
289
289
  async create(requestParameters: DashboardsApiCreateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
@@ -292,7 +292,7 @@ export class DashboardsApi extends runtime.BaseAPI implements DashboardsApiInter
292
292
  }
293
293
 
294
294
  /**
295
- * Inserts a new card at the given zero-based `index` position in the dashboard\'s card list. Cards already at that position and beyond are shifted down. If `index` is out of range it is clamped to the nearest valid position. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the card has controls.
295
+ * Inserts a new card at the given zero-based `index` position in the dashboard\'s card list. Cards already at that position and beyond are shifted down. If `index` is out of range it is clamped to the nearest valid position. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the card has controls.
296
296
  * Add a card to a dashboard
297
297
  */
298
298
  async createCardsRaw(requestParameters: DashboardsApiCreateCardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
@@ -333,7 +333,7 @@ export class DashboardsApi extends runtime.BaseAPI implements DashboardsApiInter
333
333
  }
334
334
 
335
335
  /**
336
- * Inserts a new card at the given zero-based `index` position in the dashboard\'s card list. Cards already at that position and beyond are shifted down. If `index` is out of range it is clamped to the nearest valid position. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the card has controls.
336
+ * Inserts a new card at the given zero-based `index` position in the dashboard\'s card list. Cards already at that position and beyond are shifted down. If `index` is out of range it is clamped to the nearest valid position. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the card has controls.
337
337
  * Add a card to a dashboard
338
338
  */
339
339
  async createCards(requestParameters: DashboardsApiCreateCardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
@@ -625,7 +625,7 @@ export class DashboardsApi extends runtime.BaseAPI implements DashboardsApiInter
625
625
  }
626
626
 
627
627
  /**
628
- * Applies a single action to a card on a dashboard. Use `moveCard` to swap two cards by their zero-based indices, `reorderCard` to move the card at `oldIndex` to `newIndex` (zero-based) while shifting the cards in between, or `updateCard` to replace the content of a card at a given index, including the order of its visualisation and control items. Out-of-range indices are silently ignored. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the update adds, removes, reorders or changes a card\'s controls.
628
+ * Applies a single action to a card on a dashboard. Use `moveCard` to swap two cards by their zero-based indices, `reorderCard` to move the card at `oldIndex` to `newIndex` (zero-based) while shifting the cards in between, or `updateCard` to replace the content of a card at a given index, including the order of its visualisation and control items. Out-of-range indices are silently ignored. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the update adds, removes, reorders or changes a card\'s controls.
629
629
  * Update a dashboard card
630
630
  */
631
631
  async updateCardsRaw(requestParameters: DashboardsApiUpdateCardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
@@ -666,7 +666,7 @@ export class DashboardsApi extends runtime.BaseAPI implements DashboardsApiInter
666
666
  }
667
667
 
668
668
  /**
669
- * Applies a single action to a card on a dashboard. Use `moveCard` to swap two cards by their zero-based indices, `reorderCard` to move the card at `oldIndex` to `newIndex` (zero-based) while shifting the cards in between, or `updateCard` to replace the content of a card at a given index, including the order of its visualisation and control items. Out-of-range indices are silently ignored. Returns `400` when a row-break card has items or a control is missing a variable or duplicates another control on the same card. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the update adds, removes, reorders or changes a card\'s controls.
669
+ * Applies a single action to a card on a dashboard. Use `moveCard` to swap two cards by their zero-based indices, `reorderCard` to move the card at `oldIndex` to `newIndex` (zero-based) while shifting the cards in between, or `updateCard` to replace the content of a card at a given index, including the order of its visualisation and control items. Out-of-range indices are silently ignored. Returns `400` when a row-break card has items, a control is missing a variable or duplicates another control on the same card, or a list entry\'s `hexCode` is not a colour such as `#1f77b4` or `#abc`. Returns `404` if the dashboard does not exist. Requires the *Edit org model* permission, and the *Variable controls* permission when the update adds, removes, reorders or changes a card\'s controls.
670
670
  * Update a dashboard card
671
671
  */
672
672
  async updateCards(requestParameters: DashboardsApiUpdateCardsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
@@ -71,7 +71,7 @@ export interface ScenariosApiUpdateRequest {
71
71
  */
72
72
  export interface ScenariosApiInterface {
73
73
  /**
74
- * Creates a new scenario for the account and returns its UUID. Returns `400` if a layer references an entity that does not exist. Requires the *Edit scenario planning* permission.
74
+ * Creates a new scenario for the account and returns its UUID. The optional `hexCode` is a colour such as `#1f77b4` or `#abc`. Returns `400` if the colour is not a valid hex code or a layer references an entity that does not exist. Requires the *Edit scenario planning* permission.
75
75
  * @summary Create a scenario
76
76
  * @param {ScenarioCreate} [scenarioCreate]
77
77
  * @param {*} [options] Override http request option.
@@ -81,7 +81,7 @@ export interface ScenariosApiInterface {
81
81
  createRaw(requestParameters: ScenariosApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
82
82
 
83
83
  /**
84
- * Creates a new scenario for the account and returns its UUID. Returns `400` if a layer references an entity that does not exist. Requires the *Edit scenario planning* permission.
84
+ * Creates a new scenario for the account and returns its UUID. The optional `hexCode` is a colour such as `#1f77b4` or `#abc`. Returns `400` if the colour is not a valid hex code or a layer references an entity that does not exist. Requires the *Edit scenario planning* permission.
85
85
  * Create a scenario
86
86
  */
87
87
  create(requestParameters: ScenariosApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
@@ -167,7 +167,7 @@ export interface ScenariosApiInterface {
167
167
  listLayerVariables(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LayerVariablesRes>;
168
168
 
169
169
  /**
170
- * Updates the name, description, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. Returns `400` if a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
170
+ * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
171
171
  * @summary Update a scenario
172
172
  * @param {string} id
173
173
  * @param {ScenarioPatch} [scenarioPatch]
@@ -178,7 +178,7 @@ export interface ScenariosApiInterface {
178
178
  updateRaw(requestParameters: ScenariosApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
179
179
 
180
180
  /**
181
- * Updates the name, description, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. Returns `400` if a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
181
+ * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
182
182
  * Update a scenario
183
183
  */
184
184
  update(requestParameters: ScenariosApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
@@ -191,7 +191,7 @@ export interface ScenariosApiInterface {
191
191
  export class ScenariosApi extends runtime.BaseAPI implements ScenariosApiInterface {
192
192
 
193
193
  /**
194
- * Creates a new scenario for the account and returns its UUID. Returns `400` if a layer references an entity that does not exist. Requires the *Edit scenario planning* permission.
194
+ * Creates a new scenario for the account and returns its UUID. The optional `hexCode` is a colour such as `#1f77b4` or `#abc`. Returns `400` if the colour is not a valid hex code or a layer references an entity that does not exist. Requires the *Edit scenario planning* permission.
195
195
  * Create a scenario
196
196
  */
197
197
  async createRaw(requestParameters: ScenariosApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
@@ -228,7 +228,7 @@ export class ScenariosApi extends runtime.BaseAPI implements ScenariosApiInterfa
228
228
  }
229
229
 
230
230
  /**
231
- * Creates a new scenario for the account and returns its UUID. Returns `400` if a layer references an entity that does not exist. Requires the *Edit scenario planning* permission.
231
+ * Creates a new scenario for the account and returns its UUID. The optional `hexCode` is a colour such as `#1f77b4` or `#abc`. Returns `400` if the colour is not a valid hex code or a layer references an entity that does not exist. Requires the *Edit scenario planning* permission.
232
232
  * Create a scenario
233
233
  */
234
234
  async create(requestParameters: ScenariosApiCreateRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
@@ -468,7 +468,7 @@ export class ScenariosApi extends runtime.BaseAPI implements ScenariosApiInterfa
468
468
  }
469
469
 
470
470
  /**
471
- * Updates the name, description, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. Returns `400` if a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
471
+ * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
472
472
  * Update a scenario
473
473
  */
474
474
  async updateRaw(requestParameters: ScenariosApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
@@ -509,7 +509,7 @@ export class ScenariosApi extends runtime.BaseAPI implements ScenariosApiInterfa
509
509
  }
510
510
 
511
511
  /**
512
- * Updates the name, description, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. Returns `400` if a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
512
+ * Updates the name, description, colour, and/or layers of the specified scenario. Only non-nil fields in the request body are applied. `hexCode` is a colour such as `#1f77b4` or `#abc`; an empty string clears it. A non-empty `layers` replaces the stored layers and `clearLayers` removes them all; sending both returns `400`. Returns `400` if the colour is not a valid hex code or a newly referenced layer points at an entity that does not exist. Requires the *Edit scenario planning* permission.
513
513
  * Update a scenario
514
514
  */
515
515
  async update(requestParameters: ScenariosApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
@@ -217,7 +217,7 @@ export interface TopDownModelsApiInterface {
217
217
  update(requestParameters: TopDownModelsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
218
218
 
219
219
  /**
220
- * Upserts an entry on the specified top-down model. If an entry with the given ID already exists it is updated; otherwise a new entry is created. Supply the entry\'s ID in the request body (`id` field). Each `properties.map[].formula` must be a per-object expression: numbers, static property references and the add, subtract, multiply and divide operators. With `variable_controls` enabled, formulas may also reference numeric account variables by `account:<id>`; other variable references are rejected. `sumOf`, `select`, unknown operators and references to unknown properties or nodes are rejected with `400` naming the offending field. Returns `404` if the model does not exist. Requires the *Edit modification* permission.
220
+ * Upserts an entry on the specified top-down model. If an entry with the given ID already exists it is updated; otherwise a new entry is created. Supply the entry\'s ID in the request body (`id` field). A non-empty `objects` replaces the entry\'s stored objects and `clearObjects` removes them all; sending both returns `400`. Each `properties.map[].formula` must be a per-object expression: numbers, static property references and the add, subtract, multiply and divide operators. With `variable_controls` enabled, formulas may also reference numeric account variables by `account:<id>`; other variable references are rejected. `sumOf`, `select`, unknown operators and references to unknown properties or nodes are rejected with `400` naming the offending field. Returns `404` if the model does not exist. Requires the *Edit modification* permission.
221
221
  * @summary Create or update a top-down model entry
222
222
  * @param {string} id
223
223
  * @param {TopDownModelEntryUpdate} [topDownModelEntryUpdate]
@@ -228,7 +228,7 @@ export interface TopDownModelsApiInterface {
228
228
  updateEntriesRaw(requestParameters: TopDownModelsApiUpdateEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
229
229
 
230
230
  /**
231
- * Upserts an entry on the specified top-down model. If an entry with the given ID already exists it is updated; otherwise a new entry is created. Supply the entry\'s ID in the request body (`id` field). Each `properties.map[].formula` must be a per-object expression: numbers, static property references and the add, subtract, multiply and divide operators. With `variable_controls` enabled, formulas may also reference numeric account variables by `account:<id>`; other variable references are rejected. `sumOf`, `select`, unknown operators and references to unknown properties or nodes are rejected with `400` naming the offending field. Returns `404` if the model does not exist. Requires the *Edit modification* permission.
231
+ * Upserts an entry on the specified top-down model. If an entry with the given ID already exists it is updated; otherwise a new entry is created. Supply the entry\'s ID in the request body (`id` field). A non-empty `objects` replaces the entry\'s stored objects and `clearObjects` removes them all; sending both returns `400`. Each `properties.map[].formula` must be a per-object expression: numbers, static property references and the add, subtract, multiply and divide operators. With `variable_controls` enabled, formulas may also reference numeric account variables by `account:<id>`; other variable references are rejected. `sumOf`, `select`, unknown operators and references to unknown properties or nodes are rejected with `400` naming the offending field. Returns `404` if the model does not exist. Requires the *Edit modification* permission.
232
232
  * Create or update a top-down model entry
233
233
  */
234
234
  updateEntries(requestParameters: TopDownModelsApiUpdateEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -638,7 +638,7 @@ export class TopDownModelsApi extends runtime.BaseAPI implements TopDownModelsAp
638
638
  }
639
639
 
640
640
  /**
641
- * Upserts an entry on the specified top-down model. If an entry with the given ID already exists it is updated; otherwise a new entry is created. Supply the entry\'s ID in the request body (`id` field). Each `properties.map[].formula` must be a per-object expression: numbers, static property references and the add, subtract, multiply and divide operators. With `variable_controls` enabled, formulas may also reference numeric account variables by `account:<id>`; other variable references are rejected. `sumOf`, `select`, unknown operators and references to unknown properties or nodes are rejected with `400` naming the offending field. Returns `404` if the model does not exist. Requires the *Edit modification* permission.
641
+ * Upserts an entry on the specified top-down model. If an entry with the given ID already exists it is updated; otherwise a new entry is created. Supply the entry\'s ID in the request body (`id` field). A non-empty `objects` replaces the entry\'s stored objects and `clearObjects` removes them all; sending both returns `400`. Each `properties.map[].formula` must be a per-object expression: numbers, static property references and the add, subtract, multiply and divide operators. With `variable_controls` enabled, formulas may also reference numeric account variables by `account:<id>`; other variable references are rejected. `sumOf`, `select`, unknown operators and references to unknown properties or nodes are rejected with `400` naming the offending field. Returns `404` if the model does not exist. Requires the *Edit modification* permission.
642
642
  * Create or update a top-down model entry
643
643
  */
644
644
  async updateEntriesRaw(requestParameters: TopDownModelsApiUpdateEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
@@ -679,7 +679,7 @@ export class TopDownModelsApi extends runtime.BaseAPI implements TopDownModelsAp
679
679
  }
680
680
 
681
681
  /**
682
- * Upserts an entry on the specified top-down model. If an entry with the given ID already exists it is updated; otherwise a new entry is created. Supply the entry\'s ID in the request body (`id` field). Each `properties.map[].formula` must be a per-object expression: numbers, static property references and the add, subtract, multiply and divide operators. With `variable_controls` enabled, formulas may also reference numeric account variables by `account:<id>`; other variable references are rejected. `sumOf`, `select`, unknown operators and references to unknown properties or nodes are rejected with `400` naming the offending field. Returns `404` if the model does not exist. Requires the *Edit modification* permission.
682
+ * Upserts an entry on the specified top-down model. If an entry with the given ID already exists it is updated; otherwise a new entry is created. Supply the entry\'s ID in the request body (`id` field). A non-empty `objects` replaces the entry\'s stored objects and `clearObjects` removes them all; sending both returns `400`. Each `properties.map[].formula` must be a per-object expression: numbers, static property references and the add, subtract, multiply and divide operators. With `variable_controls` enabled, formulas may also reference numeric account variables by `account:<id>`; other variable references are rejected. `sumOf`, `select`, unknown operators and references to unknown properties or nodes are rejected with `400` naming the offending field. Returns `404` if the model does not exist. Requires the *Edit modification* permission.
683
683
  * Create or update a top-down model entry
684
684
  */
685
685
  async updateEntries(requestParameters: TopDownModelsApiUpdateEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
@@ -47,6 +47,12 @@ export interface CalcListEntry {
47
47
  * @memberof CalcListEntry
48
48
  */
49
49
  _function: MaybeVarFunc;
50
+ /**
51
+ *
52
+ * @type {string}
53
+ * @memberof CalcListEntry
54
+ */
55
+ hexCode?: string;
50
56
  /**
51
57
  *
52
58
  * @type {string}
@@ -89,6 +95,7 @@ export function CalcListEntryFromJSONTyped(json: any, ignoreDiscriminator: boole
89
95
  return {
90
96
 
91
97
  '_function': MaybeVarFuncFromJSON(json['function']),
98
+ 'hexCode': json['hexCode'] == null ? undefined : json['hexCode'],
92
99
  'name': json['name'],
93
100
  'params': (mapValues(json['params'], ParameterTypeFromJSON)),
94
101
  'scenario': MaybeVarStrFromJSON(json['scenario']),
@@ -107,6 +114,7 @@ export function CalcListEntryToJSONTyped(value?: CalcListEntry | null, ignoreDis
107
114
  return {
108
115
 
109
116
  'function': MaybeVarFuncToJSON(value['_function']),
117
+ 'hexCode': value['hexCode'],
110
118
  'name': value['name'],
111
119
  'params': (mapValues(value['params'], ParameterTypeToJSON)),
112
120
  'scenario': MaybeVarStrToJSON(value['scenario']),
@@ -33,6 +33,12 @@ export interface CalcRes {
33
33
  * @memberof CalcRes
34
34
  */
35
35
  axes: Array<CalcAxis>;
36
+ /**
37
+ *
38
+ * @type {Array<string>}
39
+ * @memberof CalcRes
40
+ */
41
+ columnHexCodes: Array<string>;
36
42
  /**
37
43
  *
38
44
  * @type {Array<number>}
@@ -46,6 +52,7 @@ export interface CalcRes {
46
52
  */
47
53
  export function instanceOfCalcRes(value: object): value is CalcRes {
48
54
  if (!('axes' in value) || value['axes'] === undefined) return false;
55
+ if (!('columnHexCodes' in value) || value['columnHexCodes'] === undefined) return false;
49
56
  if (!('values' in value) || value['values'] === undefined) return false;
50
57
  return true;
51
58
  }
@@ -61,6 +68,7 @@ export function CalcResFromJSONTyped(json: any, ignoreDiscriminator: boolean): C
61
68
  return {
62
69
 
63
70
  'axes': ((json['axes'] as Array<any>).map(CalcAxisFromJSON)),
71
+ 'columnHexCodes': json['columnHexCodes'],
64
72
  'values': json['values'],
65
73
  };
66
74
  }
@@ -77,6 +85,7 @@ export function CalcResToJSONTyped(value?: CalcRes | null, ignoreDiscriminator:
77
85
  return {
78
86
 
79
87
  'axes': ((value['axes'] as Array<any>).map(CalcAxisToJSON)),
88
+ 'columnHexCodes': value['columnHexCodes'],
80
89
  'values': value['values'],
81
90
  };
82
91
  }
@@ -39,6 +39,12 @@ export interface ScenarioChangelogBody {
39
39
  * @memberof ScenarioChangelogBody
40
40
  */
41
41
  description: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof ScenarioChangelogBody
46
+ */
47
+ hexCode?: string;
42
48
  /**
43
49
  *
44
50
  * @type {Array<Layer>}
@@ -83,6 +89,7 @@ export function ScenarioChangelogBodyFromJSONTyped(json: any, ignoreDiscriminato
83
89
 
84
90
  'createdAt': json['createdAt'],
85
91
  'description': json['description'],
92
+ 'hexCode': json['hexCode'] == null ? undefined : json['hexCode'],
86
93
  'layers': ((json['layers'] as Array<any>).map(LayerFromJSON)),
87
94
  'modifiedAt': json['modifiedAt'],
88
95
  'name': json['name'],
@@ -102,6 +109,7 @@ export function ScenarioChangelogBodyToJSONTyped(value?: ScenarioChangelogBody |
102
109
 
103
110
  'createdAt': value['createdAt'],
104
111
  'description': value['description'],
112
+ 'hexCode': value['hexCode'],
105
113
  'layers': ((value['layers'] as Array<any>).map(LayerToJSON)),
106
114
  'modifiedAt': value['modifiedAt'],
107
115
  'name': value['name'],
@@ -33,6 +33,12 @@ export interface ScenarioCreate {
33
33
  * @memberof ScenarioCreate
34
34
  */
35
35
  description: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof ScenarioCreate
40
+ */
41
+ hexCode?: string;
36
42
  /**
37
43
  *
38
44
  * @type {Array<Layer>}
@@ -68,6 +74,7 @@ export function ScenarioCreateFromJSONTyped(json: any, ignoreDiscriminator: bool
68
74
  return {
69
75
 
70
76
  'description': json['description'],
77
+ 'hexCode': json['hexCode'] == null ? undefined : json['hexCode'],
71
78
  'layers': ((json['layers'] as Array<any>).map(LayerFromJSON)),
72
79
  'name': json['name'],
73
80
  };
@@ -85,6 +92,7 @@ export function ScenarioCreateToJSONTyped(value?: ScenarioCreate | null, ignoreD
85
92
  return {
86
93
 
87
94
  'description': value['description'],
95
+ 'hexCode': value['hexCode'],
88
96
  'layers': ((value['layers'] as Array<any>).map(LayerToJSON)),
89
97
  'name': value['name'],
90
98
  };
@@ -27,12 +27,24 @@ import {
27
27
  * @interface ScenarioPatch
28
28
  */
29
29
  export interface ScenarioPatch {
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof ScenarioPatch
34
+ */
35
+ clearLayers?: boolean;
30
36
  /**
31
37
  *
32
38
  * @type {string}
33
39
  * @memberof ScenarioPatch
34
40
  */
35
41
  description?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof ScenarioPatch
46
+ */
47
+ hexCode?: string;
36
48
  /**
37
49
  *
38
50
  * @type {Array<Layer>}
@@ -65,7 +77,9 @@ export function ScenarioPatchFromJSONTyped(json: any, ignoreDiscriminator: boole
65
77
  }
66
78
  return {
67
79
 
80
+ 'clearLayers': json['clearLayers'] == null ? undefined : json['clearLayers'],
68
81
  'description': json['description'] == null ? undefined : json['description'],
82
+ 'hexCode': json['hexCode'] == null ? undefined : json['hexCode'],
69
83
  'layers': ((json['layers'] as Array<any>).map(LayerFromJSON)),
70
84
  'name': json['name'] == null ? undefined : json['name'],
71
85
  };
@@ -82,7 +96,9 @@ export function ScenarioPatchToJSONTyped(value?: ScenarioPatch | null, ignoreDis
82
96
 
83
97
  return {
84
98
 
99
+ 'clearLayers': value['clearLayers'],
85
100
  'description': value['description'],
101
+ 'hexCode': value['hexCode'],
86
102
  'layers': ((value['layers'] as Array<any>).map(LayerToJSON)),
87
103
  'name': value['name'],
88
104
  };
@@ -34,6 +34,12 @@ import {
34
34
  * @interface TopDownModelEntryUpdate
35
35
  */
36
36
  export interface TopDownModelEntryUpdate {
37
+ /**
38
+ *
39
+ * @type {boolean}
40
+ * @memberof TopDownModelEntryUpdate
41
+ */
42
+ clearObjects?: boolean;
37
43
  /**
38
44
  *
39
45
  * @type {string}
@@ -73,6 +79,7 @@ export function TopDownModelEntryUpdateFromJSONTyped(json: any, ignoreDiscrimina
73
79
  }
74
80
  return {
75
81
 
82
+ 'clearObjects': json['clearObjects'] == null ? undefined : json['clearObjects'],
76
83
  'id': json['id'],
77
84
  'objects': ((json['objects'] as Array<any>).map(FilterGroupFromJSON)),
78
85
  'properties': json['properties'] == null ? undefined : TopDownModelPropertiesFromJSON(json['properties']),
@@ -90,6 +97,7 @@ export function TopDownModelEntryUpdateToJSONTyped(value?: TopDownModelEntryUpda
90
97
 
91
98
  return {
92
99
 
100
+ 'clearObjects': value['clearObjects'],
93
101
  'id': value['id'],
94
102
  'objects': ((value['objects'] as Array<any>).map(FilterGroupToJSON)),
95
103
  'properties': TopDownModelPropertiesToJSON(value['properties']),