@stablebaseline/sdk 0.8.0 → 0.9.1

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.
package/openapi.json CHANGED
@@ -122,6 +122,10 @@
122
122
  "name": "diagrams",
123
123
  "description": "40+ diagram types (Mermaid, BPMN, D2, PlantUML, GraphViz and more), plus infographics."
124
124
  },
125
+ {
126
+ "name": "whiteboards",
127
+ "description": "Whiteboards: freeform boards of shapes, sticky notes, stencils, icons, images, tables, charts and frames; AI design of boards, decks and illustrations; the meeting scribe; boards rendered as images."
128
+ },
125
129
  {
126
130
  "name": "images",
127
131
  "description": "Image upload sessions and inline document placement."
@@ -179,8 +183,8 @@
179
183
  "description": "Databases: tables of rows with typed fields and saved views. Ask structured questions (filters, sorting, summaries, paging), read and write rows, import CSV and Excel, and change structure."
180
184
  },
181
185
  {
182
- "name": "other",
183
- "description": "Uncategorised."
186
+ "name": "agents",
187
+ "description": "Organisation agents: list the agents you may use, ask one a question, hand one a piece of work, follow its job, and approve or decline the changes it proposes."
184
188
  }
185
189
  ],
186
190
  "paths": {
@@ -3248,7 +3252,7 @@
3248
3252
  "/tools/listDocuments": {
3249
3253
  "post": {
3250
3254
  "summary": "listDocuments",
3251
- "description": "List AND grep documents in a project, workspace, or folder. `query` does a full-content search across each document's body (not just the title) and returns the matching lines — like grep across your docs. Each returned document includes `contentMatches: [{line, text, context?}]` and `matchCount`; the `text` is anchor-ready (paste it straight into editDocument's oldText). Use isRegex:true for regular-expression search (e.g. \"TODO\\(.*\\)\", \"ACME-\\d+\"), caseSensitive for exact case, and contextLines for surrounding lines (grep -C). versionTimestamp is returned per document so you can edit straight from the results without a getDocument round-trip. Also supports date filtering. SCOPE HONESTY — read this before concluding something is absent: only documents that actually matched are returned (a document is never listed with matchCount 0 just because it was in scope), and the `grep` block reports `scannedDocuments` against `totalDocumentsInScope`. When `truncated` is true the search covered only part of the scope, so an absence is NOT proof; repeat with `scanOffset` set to the returned `nextScanOffset` until that field is gone, and union the results. A document too large to read is returned with `contentSearchSkipped: true` and NO matchCount, because its body was never searched.",
3255
+ "description": "List AND grep documents in a project, workspace, or folder. `query` does a full-content search across each document's body (not just the title) and returns the matching lines — like grep across your docs. Each returned document includes `contentMatches: [{line, text, context?}]` and `matchCount`; the `text` is anchor-ready (paste it straight into editDocument's oldText). Use isRegex:true for regular-expression search (e.g. \"TODO\\(.*\\)\", \"ACME-\\d+\"), caseSensitive for exact case, and contextLines for surrounding lines (grep -C). versionTimestamp is returned per document so you can edit straight from the results without a getDocument round-trip. Also supports date filtering. SCOPE HONESTY — read this before concluding something is absent: only documents that actually matched are returned (a document is never listed with matchCount 0 just because it was in scope), and the `grep` block reports `scannedDocuments` against `totalDocumentsInScope`. When `truncated` is true the search covered only part of the scope, so an absence is NOT proof; repeat with `scanOffset` set to the returned `nextScanOffset` until that field is gone, and union the results. A document too large to read is returned with `contentSearchSkipped: true` and NO matchCount, because its body was never searched. WHAT CHANGED: give changedSince (a period such as this_week, or a date) to list only the documents added or edited in that time, newest change first, each with change: added or edited, when (in words, in the person's time zone), by whom (a person's name, and the agent's key when one did it) and the versions saved meanwhile. With no projectId, workspaceId or folderId it covers your whole organisation. Only documents the caller may open are listed. For how one changed, call listDocumentVersions with the same changedSince and compare:true. Not with query.",
3252
3256
  "operationId": "listDocuments",
3253
3257
  "tags": [
3254
3258
  "documents"
@@ -3269,6 +3273,21 @@
3269
3273
  "folderId": {
3270
3274
  "type": "string"
3271
3275
  },
3276
+ "changedSince": {
3277
+ "type": "string",
3278
+ "maxLength": 40,
3279
+ "description": "What changed: only what was added or edited from this point, newest change first, each with who changed it and when. A period: today, yesterday, this_week, last_week, this_month, last_month, last_7_days or last_30_days (worked out in timeZone; weeks start on Monday), or a date (YYYY-MM-DD, from its start) or a date and time."
3280
+ },
3281
+ "changedBefore": {
3282
+ "type": "string",
3283
+ "maxLength": 40,
3284
+ "description": "With changedSince given as a date: only what changed before this date (YYYY-MM-DD) or date and time."
3285
+ },
3286
+ "timeZone": {
3287
+ "type": "string",
3288
+ "maxLength": 64,
3289
+ "description": "The IANA time zone the window and its times are in, such as Australia/Sydney. Default: the person's own (the zone their browser last saved), else UTC."
3290
+ },
3272
3291
  "query": {
3273
3292
  "type": "string",
3274
3293
  "description": "Search text. Matched against title, friendlyId AND full document content. Returns the matching lines per document (grep). Case-insensitive unless caseSensitive:true; treated as a regex if isRegex:true."
@@ -4904,7 +4923,94 @@
4904
4923
  "type": "array",
4905
4924
  "maxItems": 10,
4906
4925
  "items": {
4907
- "type": "object"
4926
+ "type": "object",
4927
+ "properties": {
4928
+ "fn": {
4929
+ "type": "string",
4930
+ "enum": [
4931
+ "count",
4932
+ "count_values",
4933
+ "count_distinct",
4934
+ "sum",
4935
+ "average",
4936
+ "min",
4937
+ "max",
4938
+ "median",
4939
+ "percentile"
4940
+ ]
4941
+ },
4942
+ "field": {
4943
+ "type": "string",
4944
+ "maxLength": 100,
4945
+ "description": "The field's name, for every fn but count."
4946
+ },
4947
+ "as": {
4948
+ "type": "string",
4949
+ "maxLength": 100,
4950
+ "description": "Optional label for this total: letters, digits and _ (anything else becomes _)."
4951
+ },
4952
+ "percentiles": {
4953
+ "type": "array",
4954
+ "maxItems": 5,
4955
+ "items": {
4956
+ "type": "number"
4957
+ },
4958
+ "description": "Such as [50, 90]."
4959
+ },
4960
+ "show": {
4961
+ "type": "string",
4962
+ "enum": [
4963
+ "running_total",
4964
+ "moving_average",
4965
+ "share",
4966
+ "share_of_parent",
4967
+ "previous",
4968
+ "change",
4969
+ "change_percent",
4970
+ "rank"
4971
+ ]
4972
+ },
4973
+ "window": {
4974
+ "type": "integer",
4975
+ "minimum": 2,
4976
+ "maximum": 60
4977
+ },
4978
+ "by": {
4979
+ "type": "string",
4980
+ "enum": [
4981
+ "period",
4982
+ "year",
4983
+ "line"
4984
+ ]
4985
+ },
4986
+ "keep": {
4987
+ "type": "object",
4988
+ "description": "Only groups matching, such as { \"at_least\": 10 }.",
4989
+ "properties": {
4990
+ "greater_than": {
4991
+ "type": "number"
4992
+ },
4993
+ "less_than": {
4994
+ "type": "number"
4995
+ },
4996
+ "at_least": {
4997
+ "type": "number"
4998
+ },
4999
+ "at_most": {
5000
+ "type": "number"
5001
+ }
5002
+ }
5003
+ },
5004
+ "compare": {
5005
+ "type": "string",
5006
+ "enum": [
5007
+ "previous_period",
5008
+ "year_before"
5009
+ ],
5010
+ "description": "No groupBy: also the period before."
5011
+ }
5012
+ },
5013
+ "additionalProperties": true
4908
5014
  },
4909
5015
  "description": "The same as queryDatabaseRows' summaries."
4910
5016
  },
@@ -4912,15 +5018,64 @@
4912
5018
  "type": "array",
4913
5019
  "maxItems": 2,
4914
5020
  "items": {
4915
- "type": [
4916
- "string",
4917
- "object"
5021
+ "anyOf": [
5022
+ {
5023
+ "type": "string",
5024
+ "maxLength": 100
5025
+ },
5026
+ {
5027
+ "type": "object",
5028
+ "properties": {
5029
+ "field": {
5030
+ "type": "string",
5031
+ "maxLength": 100
5032
+ },
5033
+ "bucket": {
5034
+ "type": "string",
5035
+ "enum": [
5036
+ "day",
5037
+ "week",
5038
+ "month",
5039
+ "quarter",
5040
+ "year",
5041
+ "day_of_week",
5042
+ "month_of_year",
5043
+ "hour_of_day"
5044
+ ]
5045
+ },
5046
+ "binSize": {
5047
+ "type": "number",
5048
+ "description": "Ranges of this size."
5049
+ },
5050
+ "bins": {
5051
+ "type": "integer",
5052
+ "minimum": 2,
5053
+ "maximum": 100,
5054
+ "description": "Or N equal ranges."
5055
+ },
5056
+ "fill": {
5057
+ "type": "boolean",
5058
+ "description": "Empty buckets too."
5059
+ },
5060
+ "top": {
5061
+ "type": "integer",
5062
+ "minimum": 1,
5063
+ "maximum": 100,
5064
+ "description": "The N largest by the first summary (second field: per first), the rest as Other."
5065
+ },
5066
+ "across": {
5067
+ "type": "boolean",
5068
+ "description": "Pivot columns."
5069
+ }
5070
+ }
5071
+ }
4918
5072
  ]
4919
5073
  },
4920
5074
  "description": "The same as queryDatabaseRows' groupBy."
4921
5075
  },
4922
5076
  "where": {
4923
5077
  "type": "object",
5078
+ "additionalProperties": true,
4924
5079
  "description": "A filter, the same shape as queryDatabaseRows' where."
4925
5080
  },
4926
5081
  "query": {
@@ -5203,7 +5358,94 @@
5203
5358
  "type": "array",
5204
5359
  "maxItems": 10,
5205
5360
  "items": {
5206
- "type": "object"
5361
+ "type": "object",
5362
+ "properties": {
5363
+ "fn": {
5364
+ "type": "string",
5365
+ "enum": [
5366
+ "count",
5367
+ "count_values",
5368
+ "count_distinct",
5369
+ "sum",
5370
+ "average",
5371
+ "min",
5372
+ "max",
5373
+ "median",
5374
+ "percentile"
5375
+ ]
5376
+ },
5377
+ "field": {
5378
+ "type": "string",
5379
+ "maxLength": 100,
5380
+ "description": "The field's name, for every fn but count."
5381
+ },
5382
+ "as": {
5383
+ "type": "string",
5384
+ "maxLength": 100,
5385
+ "description": "Optional label for this total: letters, digits and _ (anything else becomes _)."
5386
+ },
5387
+ "percentiles": {
5388
+ "type": "array",
5389
+ "maxItems": 5,
5390
+ "items": {
5391
+ "type": "number"
5392
+ },
5393
+ "description": "Such as [50, 90]."
5394
+ },
5395
+ "show": {
5396
+ "type": "string",
5397
+ "enum": [
5398
+ "running_total",
5399
+ "moving_average",
5400
+ "share",
5401
+ "share_of_parent",
5402
+ "previous",
5403
+ "change",
5404
+ "change_percent",
5405
+ "rank"
5406
+ ]
5407
+ },
5408
+ "window": {
5409
+ "type": "integer",
5410
+ "minimum": 2,
5411
+ "maximum": 60
5412
+ },
5413
+ "by": {
5414
+ "type": "string",
5415
+ "enum": [
5416
+ "period",
5417
+ "year",
5418
+ "line"
5419
+ ]
5420
+ },
5421
+ "keep": {
5422
+ "type": "object",
5423
+ "description": "Only groups matching, such as { \"at_least\": 10 }.",
5424
+ "properties": {
5425
+ "greater_than": {
5426
+ "type": "number"
5427
+ },
5428
+ "less_than": {
5429
+ "type": "number"
5430
+ },
5431
+ "at_least": {
5432
+ "type": "number"
5433
+ },
5434
+ "at_most": {
5435
+ "type": "number"
5436
+ }
5437
+ }
5438
+ },
5439
+ "compare": {
5440
+ "type": "string",
5441
+ "enum": [
5442
+ "previous_period",
5443
+ "year_before"
5444
+ ],
5445
+ "description": "No groupBy: also the period before."
5446
+ }
5447
+ },
5448
+ "additionalProperties": true
5207
5449
  },
5208
5450
  "description": "The same as queryDatabaseRows' summaries."
5209
5451
  },
@@ -5211,15 +5453,64 @@
5211
5453
  "type": "array",
5212
5454
  "maxItems": 2,
5213
5455
  "items": {
5214
- "type": [
5215
- "string",
5216
- "object"
5456
+ "anyOf": [
5457
+ {
5458
+ "type": "string",
5459
+ "maxLength": 100
5460
+ },
5461
+ {
5462
+ "type": "object",
5463
+ "properties": {
5464
+ "field": {
5465
+ "type": "string",
5466
+ "maxLength": 100
5467
+ },
5468
+ "bucket": {
5469
+ "type": "string",
5470
+ "enum": [
5471
+ "day",
5472
+ "week",
5473
+ "month",
5474
+ "quarter",
5475
+ "year",
5476
+ "day_of_week",
5477
+ "month_of_year",
5478
+ "hour_of_day"
5479
+ ]
5480
+ },
5481
+ "binSize": {
5482
+ "type": "number",
5483
+ "description": "Ranges of this size."
5484
+ },
5485
+ "bins": {
5486
+ "type": "integer",
5487
+ "minimum": 2,
5488
+ "maximum": 100,
5489
+ "description": "Or N equal ranges."
5490
+ },
5491
+ "fill": {
5492
+ "type": "boolean",
5493
+ "description": "Empty buckets too."
5494
+ },
5495
+ "top": {
5496
+ "type": "integer",
5497
+ "minimum": 1,
5498
+ "maximum": 100,
5499
+ "description": "The N largest by the first summary (second field: per first), the rest as Other."
5500
+ },
5501
+ "across": {
5502
+ "type": "boolean",
5503
+ "description": "Pivot columns."
5504
+ }
5505
+ }
5506
+ }
5217
5507
  ]
5218
5508
  },
5219
5509
  "description": "The same as queryDatabaseRows' groupBy."
5220
5510
  },
5221
5511
  "where": {
5222
5512
  "type": "object",
5513
+ "additionalProperties": true,
5223
5514
  "description": "A filter, the same shape as queryDatabaseRows' where."
5224
5515
  },
5225
5516
  "query": {
@@ -8001,7 +8292,7 @@
8001
8292
  "/tools/listWhiteboards": {
8002
8293
  "post": {
8003
8294
  "summary": "listWhiteboards",
8004
- "description": "List AND grep the whiteboards in a project (hidden whiteboard-kind documents). `query` searches the title and friendlyId (substring by default; set isRegex:true for a regular expression, caseSensitive:true for exact case). This is the tool to find a board by name — listDocuments deliberately excludes whiteboards. Returns documentId, diagramId, title and timestamps for each.",
8295
+ "description": "List AND grep the whiteboards in a project (hidden whiteboard-kind documents). `query` searches the title and friendlyId (substring by default; set isRegex:true for a regular expression, caseSensitive:true for exact case). This is the tool to find a board by name — listDocuments deliberately excludes whiteboards. Returns documentId, diagramId, title and timestamps for each. projectId is required unless changedSince is given. WHAT CHANGED: give changedSince (a period such as this_week, or a date) to list only the boards added or changed in that time, newest change first, each with change: what happened, when (in words, in the person's time zone), by whom (a person's name, and the agent's key when one did it). With no project named it covers a workspace (workspaceId) or your whole organisation. Only what the caller may open is listed.",
8005
8296
  "operationId": "listWhiteboards",
8006
8297
  "tags": [
8007
8298
  "whiteboards"
@@ -8016,6 +8307,10 @@
8016
8307
  "projectId": {
8017
8308
  "type": "string"
8018
8309
  },
8310
+ "workspaceId": {
8311
+ "type": "string",
8312
+ "description": "With changedSince and no projectId: only what changed in this workspace. Neither: your whole organisation."
8313
+ },
8019
8314
  "query": {
8020
8315
  "type": "string",
8021
8316
  "description": "Grep across title and friendlyId. Substring by default; a regular expression when isRegex is true."
@@ -8027,11 +8322,31 @@
8027
8322
  "caseSensitive": {
8028
8323
  "type": "boolean",
8029
8324
  "description": "Match case exactly. Default false."
8325
+ },
8326
+ "changedSince": {
8327
+ "type": "string",
8328
+ "maxLength": 40,
8329
+ "description": "What changed: only what was added or edited from this point, newest change first, each with who changed it and when. A period: today, yesterday, this_week, last_week, this_month, last_month, last_7_days or last_30_days (worked out in timeZone; weeks start on Monday), or a date (YYYY-MM-DD, from its start) or a date and time."
8330
+ },
8331
+ "changedBefore": {
8332
+ "type": "string",
8333
+ "maxLength": 40,
8334
+ "description": "With changedSince given as a date: only what changed before this date (YYYY-MM-DD) or date and time."
8335
+ },
8336
+ "timeZone": {
8337
+ "type": "string",
8338
+ "maxLength": 64,
8339
+ "description": "The IANA time zone the window and its times are in, such as Australia/Sydney. Default: the person's own (the zone their browser last saved), else UTC."
8340
+ },
8341
+ "limit": {
8342
+ "type": "number",
8343
+ "description": "With changedSince: boards per answer (default 30, at most 100)."
8344
+ },
8345
+ "offset": {
8346
+ "type": "number",
8347
+ "description": "With changedSince: how many to skip (nextOffset from the last answer)."
8030
8348
  }
8031
- },
8032
- "required": [
8033
- "projectId"
8034
- ]
8349
+ }
8035
8350
  }
8036
8351
  }
8037
8352
  }
@@ -8357,7 +8672,28 @@
8357
8672
  "type": "array",
8358
8673
  "description": "Elements to write. For mode 'patch', each may be a partial { id, ...changedFields } merged into the matching element by id; full Excalidraw elements for 'replace'/'append' (or new ids in 'patch').",
8359
8674
  "items": {
8360
- "type": "object"
8675
+ "type": "object",
8676
+ "properties": {
8677
+ "id": {
8678
+ "type": "string"
8679
+ },
8680
+ "type": {
8681
+ "type": "string"
8682
+ },
8683
+ "x": {
8684
+ "type": "number"
8685
+ },
8686
+ "y": {
8687
+ "type": "number"
8688
+ },
8689
+ "width": {
8690
+ "type": "number"
8691
+ },
8692
+ "height": {
8693
+ "type": "number"
8694
+ }
8695
+ },
8696
+ "additionalProperties": true
8361
8697
  }
8362
8698
  },
8363
8699
  "mode": {
@@ -8378,11 +8714,35 @@
8378
8714
  },
8379
8715
  "appState": {
8380
8716
  "type": "object",
8381
- "description": "Optional Excalidraw appState fields to merge (e.g. viewBackgroundColor)."
8717
+ "description": "Optional Excalidraw appState fields to merge (e.g. viewBackgroundColor).",
8718
+ "properties": {
8719
+ "viewBackgroundColor": {
8720
+ "type": "string"
8721
+ }
8722
+ },
8723
+ "additionalProperties": true
8382
8724
  },
8383
8725
  "files": {
8384
8726
  "type": "object",
8385
- "description": "Optional Excalidraw BinaryFiles map (for embedded images), merged in."
8727
+ "description": "Optional Excalidraw BinaryFiles map (for embedded images), merged in.",
8728
+ "additionalProperties": {
8729
+ "type": "object",
8730
+ "properties": {
8731
+ "id": {
8732
+ "type": "string"
8733
+ },
8734
+ "mimeType": {
8735
+ "type": "string"
8736
+ },
8737
+ "dataURL": {
8738
+ "type": "string"
8739
+ },
8740
+ "created": {
8741
+ "type": "number"
8742
+ }
8743
+ },
8744
+ "additionalProperties": true
8745
+ }
8386
8746
  },
8387
8747
  "versionTimestamp": {
8388
8748
  "type": "number",
@@ -8678,11 +9038,23 @@
8678
9038
  },
8679
9039
  "start": {
8680
9040
  "type": "object",
8681
- "description": "For arrows/lines: { id } of the source shape (auto-clips to the edge + auto-routes around shapes in between)."
9041
+ "description": "For arrows/lines: { id } of the source shape (auto-clips to the edge + auto-routes around shapes in between).",
9042
+ "properties": {
9043
+ "id": {
9044
+ "type": "string"
9045
+ }
9046
+ },
9047
+ "additionalProperties": true
8682
9048
  },
8683
9049
  "end": {
8684
9050
  "type": "object",
8685
- "description": "For arrows/lines: { id } of the target shape."
9051
+ "description": "For arrows/lines: { id } of the target shape.",
9052
+ "properties": {
9053
+ "id": {
9054
+ "type": "string"
9055
+ }
9056
+ },
9057
+ "additionalProperties": true
8686
9058
  },
8687
9059
  "title": {
8688
9060
  "type": "string",
@@ -8736,7 +9108,24 @@
8736
9108
  "type": "string"
8737
9109
  },
8738
9110
  {
8739
- "type": "object"
9111
+ "type": "object",
9112
+ "properties": {
9113
+ "header": {
9114
+ "type": "string"
9115
+ },
9116
+ "width": {
9117
+ "type": "number"
9118
+ },
9119
+ "align": {
9120
+ "type": "string",
9121
+ "enum": [
9122
+ "left",
9123
+ "center",
9124
+ "right"
9125
+ ]
9126
+ }
9127
+ },
9128
+ "additionalProperties": true
8740
9129
  }
8741
9130
  ]
8742
9131
  }
@@ -9760,7 +10149,8 @@
9760
10149
  "data": {
9761
10150
  "type": "array",
9762
10151
  "items": {
9763
- "type": "object"
10152
+ "type": "object",
10153
+ "additionalProperties": true
9764
10154
  },
9765
10155
  "description": "Alternative to rows: an array of objects; columns come from headers, or the first object's keys."
9766
10156
  },
@@ -10535,7 +10925,94 @@
10535
10925
  "type": "array",
10536
10926
  "maxItems": 10,
10537
10927
  "items": {
10538
- "type": "object"
10928
+ "type": "object",
10929
+ "properties": {
10930
+ "fn": {
10931
+ "type": "string",
10932
+ "enum": [
10933
+ "count",
10934
+ "count_values",
10935
+ "count_distinct",
10936
+ "sum",
10937
+ "average",
10938
+ "min",
10939
+ "max",
10940
+ "median",
10941
+ "percentile"
10942
+ ]
10943
+ },
10944
+ "field": {
10945
+ "type": "string",
10946
+ "maxLength": 100,
10947
+ "description": "The field's name, for every fn but count."
10948
+ },
10949
+ "as": {
10950
+ "type": "string",
10951
+ "maxLength": 100,
10952
+ "description": "Optional label for this total: letters, digits and _ (anything else becomes _)."
10953
+ },
10954
+ "percentiles": {
10955
+ "type": "array",
10956
+ "maxItems": 5,
10957
+ "items": {
10958
+ "type": "number"
10959
+ },
10960
+ "description": "Such as [50, 90]."
10961
+ },
10962
+ "show": {
10963
+ "type": "string",
10964
+ "enum": [
10965
+ "running_total",
10966
+ "moving_average",
10967
+ "share",
10968
+ "share_of_parent",
10969
+ "previous",
10970
+ "change",
10971
+ "change_percent",
10972
+ "rank"
10973
+ ]
10974
+ },
10975
+ "window": {
10976
+ "type": "integer",
10977
+ "minimum": 2,
10978
+ "maximum": 60
10979
+ },
10980
+ "by": {
10981
+ "type": "string",
10982
+ "enum": [
10983
+ "period",
10984
+ "year",
10985
+ "line"
10986
+ ]
10987
+ },
10988
+ "keep": {
10989
+ "type": "object",
10990
+ "description": "Only groups matching, such as { \"at_least\": 10 }.",
10991
+ "properties": {
10992
+ "greater_than": {
10993
+ "type": "number"
10994
+ },
10995
+ "less_than": {
10996
+ "type": "number"
10997
+ },
10998
+ "at_least": {
10999
+ "type": "number"
11000
+ },
11001
+ "at_most": {
11002
+ "type": "number"
11003
+ }
11004
+ }
11005
+ },
11006
+ "compare": {
11007
+ "type": "string",
11008
+ "enum": [
11009
+ "previous_period",
11010
+ "year_before"
11011
+ ],
11012
+ "description": "No groupBy: also the period before."
11013
+ }
11014
+ },
11015
+ "additionalProperties": true
10539
11016
  },
10540
11017
  "description": "The same as queryDatabaseRows' summaries."
10541
11018
  },
@@ -10543,15 +11020,64 @@
10543
11020
  "type": "array",
10544
11021
  "maxItems": 2,
10545
11022
  "items": {
10546
- "type": [
10547
- "string",
10548
- "object"
11023
+ "anyOf": [
11024
+ {
11025
+ "type": "string",
11026
+ "maxLength": 100
11027
+ },
11028
+ {
11029
+ "type": "object",
11030
+ "properties": {
11031
+ "field": {
11032
+ "type": "string",
11033
+ "maxLength": 100
11034
+ },
11035
+ "bucket": {
11036
+ "type": "string",
11037
+ "enum": [
11038
+ "day",
11039
+ "week",
11040
+ "month",
11041
+ "quarter",
11042
+ "year",
11043
+ "day_of_week",
11044
+ "month_of_year",
11045
+ "hour_of_day"
11046
+ ]
11047
+ },
11048
+ "binSize": {
11049
+ "type": "number",
11050
+ "description": "Ranges of this size."
11051
+ },
11052
+ "bins": {
11053
+ "type": "integer",
11054
+ "minimum": 2,
11055
+ "maximum": 100,
11056
+ "description": "Or N equal ranges."
11057
+ },
11058
+ "fill": {
11059
+ "type": "boolean",
11060
+ "description": "Empty buckets too."
11061
+ },
11062
+ "top": {
11063
+ "type": "integer",
11064
+ "minimum": 1,
11065
+ "maximum": 100,
11066
+ "description": "The N largest by the first summary (second field: per first), the rest as Other."
11067
+ },
11068
+ "across": {
11069
+ "type": "boolean",
11070
+ "description": "Pivot columns."
11071
+ }
11072
+ }
11073
+ }
10549
11074
  ]
10550
11075
  },
10551
11076
  "description": "The same as queryDatabaseRows' groupBy."
10552
11077
  },
10553
11078
  "where": {
10554
11079
  "type": "object",
11080
+ "additionalProperties": true,
10555
11081
  "description": "A filter, the same shape as queryDatabaseRows' where."
10556
11082
  },
10557
11083
  "query": {
@@ -11297,7 +11823,7 @@
11297
11823
  "/tools/listDocumentVersions": {
11298
11824
  "post": {
11299
11825
  "summary": "listDocumentVersions",
11300
- "description": "List version history for a document. Returns timestamps, creator, change summary, and content.",
11826
+ "description": "List version history for a document. Returns timestamps, creator, change summary, and content. HOW IT CHANGED: give changedSince (a period such as this_week, or a date) for the versions saved in that time, each with who saved it by name and when in words; add compare:true for the difference, worked out from the text: the lines added and removed between the document as it stood before that time and now, each with the heading it sits under. compare:true without changedSince sets a version (versionNumber, else the newest) against the one before it.",
11301
11827
  "operationId": "listDocumentVersions",
11302
11828
  "tags": [
11303
11829
  "documents"
@@ -11309,6 +11835,25 @@
11309
11835
  "schema": {
11310
11836
  "type": "object",
11311
11837
  "properties": {
11838
+ "changedSince": {
11839
+ "type": "string",
11840
+ "maxLength": 40,
11841
+ "description": "What changed: only what was added or edited from this point, newest change first, each with who changed it and when. A period: today, yesterday, this_week, last_week, this_month, last_month, last_7_days or last_30_days (worked out in timeZone; weeks start on Monday), or a date (YYYY-MM-DD, from its start) or a date and time."
11842
+ },
11843
+ "changedBefore": {
11844
+ "type": "string",
11845
+ "maxLength": 40,
11846
+ "description": "With changedSince given as a date: only what changed before this date (YYYY-MM-DD) or date and time."
11847
+ },
11848
+ "timeZone": {
11849
+ "type": "string",
11850
+ "maxLength": 64,
11851
+ "description": "The IANA time zone the window and its times are in, such as Australia/Sydney. Default: the person's own (the zone their browser last saved), else UTC."
11852
+ },
11853
+ "compare": {
11854
+ "type": "boolean",
11855
+ "description": "Also return the difference: the lines added and removed, each with the heading it sits under."
11856
+ },
11312
11857
  "projectId": {
11313
11858
  "type": "string",
11314
11859
  "description": "Optional. Narrows a friendly-id lookup to one project. Only needed when a friendly id is ambiguous — TAS-/IMP-/PLN- ids are numbered per PROJECT, so the same id can exist in several. Ignored when the id is a UUID."
@@ -13411,7 +13956,7 @@
13411
13956
  "/tools/listImprovements": {
13412
13957
  "post": {
13413
13958
  "summary": "listImprovements",
13414
- "description": "List AND grep improvements in a project. `query` searches the title, friendlyId and problem statement, not just the title (substring by default; set isRegex:true for a regular expression, caseSensitive:true for exact case). Supports filtering by status, type, priority, and by parentItemId for an item's children in the work hierarchy (an epic's stories, say). For ranked semantic + text search use searchImprovements. Every item carries its versionTimestamp, ready for updateImprovement, so one call here supplies the tokens for a whole batch of updates (fields [\"id\", \"friendlyId\", \"versionTimestamp\"] returns just those), and its parentItem: the item it belongs to in the work hierarchy ({ id, friendlyId, title, type, status, isTask }, or null). Each item also carries linkedRecords, the database rows it links (as getImprovement describes them); filter by them with hasLinkedRecords, linkedRecordIds and linkedTableIds.",
13959
+ "description": "List AND grep improvements in a project. `query` searches the title, friendlyId and problem statement, not just the title (substring by default; set isRegex:true for a regular expression, caseSensitive:true for exact case). Supports filtering by status, type, priority, and by parentItemId for an item's children in the work hierarchy (an epic's stories, say). For ranked semantic + text search use searchImprovements. Every item carries its versionTimestamp, ready for updateImprovement, so one call here supplies the tokens for a whole batch of updates (fields [\"id\", \"friendlyId\", \"versionTimestamp\"] returns just those), and its parentItem: the item it belongs to in the work hierarchy ({ id, friendlyId, title, type, status, isTask }, or null). Each item also carries linkedRecords, the database rows it links (as getImprovement describes them); filter by them with hasLinkedRecords, linkedRecordIds and linkedTableIds. projectId is required unless changedSince is given. WHAT CHANGED: give changedSince (a period such as this_week, or a date) to list only the improvements and tasks added or changed in that time, newest change first, each with change: what happened, when (in words, in the person's time zone), by whom (a person's name, and the agent's key when one did it), and what happened to each in that time in words (status and field changes, comments, evidence). With no project named it covers a workspace (workspaceId) or your whole organisation. Only what the caller may open is listed. With changedSince the filters are status, type, priority, source, categoryId and query.",
13415
13960
  "operationId": "listImprovements",
13416
13961
  "tags": [
13417
13962
  "improvements"
@@ -13426,6 +13971,25 @@
13426
13971
  "projectId": {
13427
13972
  "type": "string"
13428
13973
  },
13974
+ "workspaceId": {
13975
+ "type": "string",
13976
+ "description": "With changedSince and no projectId: only what changed in this workspace. Neither: your whole organisation."
13977
+ },
13978
+ "changedSince": {
13979
+ "type": "string",
13980
+ "maxLength": 40,
13981
+ "description": "What changed: only what was added or edited from this point, newest change first, each with who changed it and when. A period: today, yesterday, this_week, last_week, this_month, last_month, last_7_days or last_30_days (worked out in timeZone; weeks start on Monday), or a date (YYYY-MM-DD, from its start) or a date and time."
13982
+ },
13983
+ "changedBefore": {
13984
+ "type": "string",
13985
+ "maxLength": 40,
13986
+ "description": "With changedSince given as a date: only what changed before this date (YYYY-MM-DD) or date and time."
13987
+ },
13988
+ "timeZone": {
13989
+ "type": "string",
13990
+ "maxLength": 64,
13991
+ "description": "The IANA time zone the window and its times are in, such as Australia/Sydney. Default: the person's own (the zone their browser last saved), else UTC."
13992
+ },
13429
13993
  "parentItemId": {
13430
13994
  "type": "string",
13431
13995
  "maxLength": 64,
@@ -13522,12 +14086,9 @@
13522
14086
  "items": {
13523
14087
  "type": "string"
13524
14088
  },
13525
- "description": "Field projection. Valid fields: id, friendly_id, friendlyId, title, type, status, priority, source, category_id, categoryId, parent_item_id, parentItemId, parentItem, linkedRecords, created_at, createdAt, updated_at, updatedAt, versionTimestamp, href."
14089
+ "description": "Field projection. Valid fields: id, friendly_id, friendlyId, title, type, status, priority, source, category_id, categoryId, parent_item_id, parentItemId, parentItem, linkedRecords, created_at, createdAt, updated_at, updatedAt, versionTimestamp, href. With changedSince: id, friendlyId, title, type, status, priority, isTask, projectId, project, createdAt, updatedAt, versionTimestamp, href, change."
13526
14090
  }
13527
- },
13528
- "required": [
13529
- "projectId"
13530
- ]
14091
+ }
13531
14092
  }
13532
14093
  }
13533
14094
  }
@@ -14246,7 +14807,16 @@
14246
14807
  "impacted_documents": {
14247
14808
  "type": "array",
14248
14809
  "items": {
14249
- "type": "object"
14810
+ "type": "object",
14811
+ "properties": {
14812
+ "id": {
14813
+ "type": "string"
14814
+ },
14815
+ "title": {
14816
+ "type": "string"
14817
+ }
14818
+ },
14819
+ "additionalProperties": true
14250
14820
  },
14251
14821
  "description": "Array of {id, title}."
14252
14822
  },
@@ -14260,7 +14830,16 @@
14260
14830
  "impacted_diagrams": {
14261
14831
  "type": "array",
14262
14832
  "items": {
14263
- "type": "object"
14833
+ "type": "object",
14834
+ "properties": {
14835
+ "id": {
14836
+ "type": "string"
14837
+ },
14838
+ "name": {
14839
+ "type": "string"
14840
+ }
14841
+ },
14842
+ "additionalProperties": true
14264
14843
  },
14265
14844
  "description": "Array of {id, name}."
14266
14845
  },
@@ -14347,10 +14926,44 @@
14347
14926
  },
14348
14927
  "relationships": {
14349
14928
  "type": "object",
14350
- "description": "Free-form JSON for logical links: blocks, blocked_by, duplicates, supersedes, relates_to (arrays of item IDs)."
14929
+ "description": "Free-form JSON for logical links: blocks, blocked_by, duplicates, supersedes, relates_to (arrays of item IDs).",
14930
+ "properties": {
14931
+ "blocks": {
14932
+ "type": "array",
14933
+ "items": {
14934
+ "type": "string"
14935
+ }
14936
+ },
14937
+ "blocked_by": {
14938
+ "type": "array",
14939
+ "items": {
14940
+ "type": "string"
14941
+ }
14942
+ },
14943
+ "duplicates": {
14944
+ "type": "array",
14945
+ "items": {
14946
+ "type": "string"
14947
+ }
14948
+ },
14949
+ "supersedes": {
14950
+ "type": "array",
14951
+ "items": {
14952
+ "type": "string"
14953
+ }
14954
+ },
14955
+ "relates_to": {
14956
+ "type": "array",
14957
+ "items": {
14958
+ "type": "string"
14959
+ }
14960
+ }
14961
+ },
14962
+ "additionalProperties": true
14351
14963
  },
14352
14964
  "metadata": {
14353
14965
  "type": "object",
14966
+ "additionalProperties": true,
14354
14967
  "description": "Free-form JSON stored alongside the item. On updateImprovement this MERGES rather than replaces."
14355
14968
  },
14356
14969
  "fields": {
@@ -15030,7 +15643,16 @@
15030
15643
  "impacted_documents": {
15031
15644
  "type": "array",
15032
15645
  "items": {
15033
- "type": "object"
15646
+ "type": "object",
15647
+ "properties": {
15648
+ "id": {
15649
+ "type": "string"
15650
+ },
15651
+ "title": {
15652
+ "type": "string"
15653
+ }
15654
+ },
15655
+ "additionalProperties": true
15034
15656
  }
15035
15657
  },
15036
15658
  "linked_document_ids": {
@@ -15043,7 +15665,16 @@
15043
15665
  "impacted_diagrams": {
15044
15666
  "type": "array",
15045
15667
  "items": {
15046
- "type": "object"
15668
+ "type": "object",
15669
+ "properties": {
15670
+ "id": {
15671
+ "type": "string"
15672
+ },
15673
+ "name": {
15674
+ "type": "string"
15675
+ }
15676
+ },
15677
+ "additionalProperties": true
15047
15678
  }
15048
15679
  },
15049
15680
  "impacted_components": {
@@ -15109,10 +15740,44 @@
15109
15740
  },
15110
15741
  "relationships": {
15111
15742
  "type": "object",
15112
- "description": "Free-form JSON for logical links: blocks, blocked_by, duplicates, supersedes, relates_to (arrays of item IDs). REPLACES the stored object wholesale — read it first and send the complete set."
15743
+ "description": "Free-form JSON for logical links: blocks, blocked_by, duplicates, supersedes, relates_to (arrays of item IDs). REPLACES the stored object wholesale — read it first and send the complete set.",
15744
+ "properties": {
15745
+ "blocks": {
15746
+ "type": "array",
15747
+ "items": {
15748
+ "type": "string"
15749
+ }
15750
+ },
15751
+ "blocked_by": {
15752
+ "type": "array",
15753
+ "items": {
15754
+ "type": "string"
15755
+ }
15756
+ },
15757
+ "duplicates": {
15758
+ "type": "array",
15759
+ "items": {
15760
+ "type": "string"
15761
+ }
15762
+ },
15763
+ "supersedes": {
15764
+ "type": "array",
15765
+ "items": {
15766
+ "type": "string"
15767
+ }
15768
+ },
15769
+ "relates_to": {
15770
+ "type": "array",
15771
+ "items": {
15772
+ "type": "string"
15773
+ }
15774
+ }
15775
+ },
15776
+ "additionalProperties": true
15113
15777
  },
15114
15778
  "metadata": {
15115
15779
  "type": "object",
15780
+ "additionalProperties": true,
15116
15781
  "description": "Free-form JSON. MERGES into the stored object key by key: keys you don't send are left alone, and sending a key with value null deletes it. Send metadata_replace:true to overwrite the whole object instead. (Merging is the default so a partial write can never destroy a sibling key written by another actor.)"
15117
15782
  },
15118
15783
  "metadata_replace": {
@@ -15598,7 +16263,16 @@
15598
16263
  "impacted_documents": {
15599
16264
  "type": "array",
15600
16265
  "items": {
15601
- "type": "object"
16266
+ "type": "object",
16267
+ "properties": {
16268
+ "id": {
16269
+ "type": "string"
16270
+ },
16271
+ "title": {
16272
+ "type": "string"
16273
+ }
16274
+ },
16275
+ "additionalProperties": true
15602
16276
  }
15603
16277
  },
15604
16278
  "linked_document_ids": {
@@ -15610,7 +16284,16 @@
15610
16284
  "impacted_diagrams": {
15611
16285
  "type": "array",
15612
16286
  "items": {
15613
- "type": "object"
16287
+ "type": "object",
16288
+ "properties": {
16289
+ "id": {
16290
+ "type": "string"
16291
+ },
16292
+ "name": {
16293
+ "type": "string"
16294
+ }
16295
+ },
16296
+ "additionalProperties": true
15614
16297
  }
15615
16298
  },
15616
16299
  "impacted_components": {
@@ -15671,10 +16354,44 @@
15671
16354
  "type": "string"
15672
16355
  },
15673
16356
  "relationships": {
15674
- "type": "object"
16357
+ "type": "object",
16358
+ "properties": {
16359
+ "blocks": {
16360
+ "type": "array",
16361
+ "items": {
16362
+ "type": "string"
16363
+ }
16364
+ },
16365
+ "blocked_by": {
16366
+ "type": "array",
16367
+ "items": {
16368
+ "type": "string"
16369
+ }
16370
+ },
16371
+ "duplicates": {
16372
+ "type": "array",
16373
+ "items": {
16374
+ "type": "string"
16375
+ }
16376
+ },
16377
+ "supersedes": {
16378
+ "type": "array",
16379
+ "items": {
16380
+ "type": "string"
16381
+ }
16382
+ },
16383
+ "relates_to": {
16384
+ "type": "array",
16385
+ "items": {
16386
+ "type": "string"
16387
+ }
16388
+ }
16389
+ },
16390
+ "additionalProperties": true
15675
16391
  },
15676
16392
  "metadata": {
15677
- "type": "object"
16393
+ "type": "object",
16394
+ "additionalProperties": true
15678
16395
  },
15679
16396
  "metadata_replace": {
15680
16397
  "type": "boolean"
@@ -17069,6 +17786,7 @@
17069
17786
  },
17070
17787
  "metadata": {
17071
17788
  "type": "object",
17789
+ "additionalProperties": true,
17072
17790
  "description": "Additional context."
17073
17791
  }
17074
17792
  },
@@ -17716,7 +18434,7 @@
17716
18434
  "/tools/listPlans": {
17717
18435
  "post": {
17718
18436
  "summary": "listPlans",
17719
- "description": "List AND grep plans in a project. `query` searches the title, friendlyId and description, not just the title (substring by default; set isRegex:true for a regular expression, caseSensitive:true for exact case). Supports filtering by status and priority.",
18437
+ "description": "List AND grep plans in a project. `query` searches the title, friendlyId and description, not just the title (substring by default; set isRegex:true for a regular expression, caseSensitive:true for exact case). Supports filtering by status and priority. projectId is required unless changedSince is given. WHAT CHANGED: give changedSince (a period such as this_week, or a date) to list only the plans added or changed in that time, newest change first, each with change: what happened, when (in words, in the person's time zone), by whom (a person's name, and the agent's key when one did it), and what happened to each in that time in words (status and field changes, comments). With no project named it covers a workspace (workspaceId) or your whole organisation. Only what the caller may open is listed. A plan's tasks are work items: listImprovements with the same changedSince lists them.",
17720
18438
  "operationId": "listPlans",
17721
18439
  "tags": [
17722
18440
  "plans"
@@ -17731,6 +18449,25 @@
17731
18449
  "projectId": {
17732
18450
  "type": "string"
17733
18451
  },
18452
+ "workspaceId": {
18453
+ "type": "string",
18454
+ "description": "With changedSince and no projectId: only what changed in this workspace. Neither: your whole organisation."
18455
+ },
18456
+ "changedSince": {
18457
+ "type": "string",
18458
+ "maxLength": 40,
18459
+ "description": "What changed: only what was added or edited from this point, newest change first, each with who changed it and when. A period: today, yesterday, this_week, last_week, this_month, last_month, last_7_days or last_30_days (worked out in timeZone; weeks start on Monday), or a date (YYYY-MM-DD, from its start) or a date and time."
18460
+ },
18461
+ "changedBefore": {
18462
+ "type": "string",
18463
+ "maxLength": 40,
18464
+ "description": "With changedSince given as a date: only what changed before this date (YYYY-MM-DD) or date and time."
18465
+ },
18466
+ "timeZone": {
18467
+ "type": "string",
18468
+ "maxLength": 64,
18469
+ "description": "The IANA time zone the window and its times are in, such as Australia/Sydney. Default: the person's own (the zone their browser last saved), else UTC."
18470
+ },
17734
18471
  "status": {
17735
18472
  "type": "string",
17736
18473
  "description": "Filter: draft, planning, active, on_hold, completed, cancelled."
@@ -17772,12 +18509,9 @@
17772
18509
  "items": {
17773
18510
  "type": "string"
17774
18511
  },
17775
- "description": "Field projection. Valid fields: id, friendly_id, friendlyId, title, description, status, priority, icon, color, start_date, startDate, end_date, endDate, created_at, createdAt, updated_at, updatedAt, versionTimestamp, href."
18512
+ "description": "Field projection. Valid fields: id, friendly_id, friendlyId, title, description, status, priority, icon, color, start_date, startDate, end_date, endDate, created_at, createdAt, updated_at, updatedAt, versionTimestamp, href. With changedSince: id, friendlyId, title, status, priority, startDate, endDate, projectId, project, createdAt, updatedAt, versionTimestamp, href, change."
17776
18513
  }
17777
- },
17778
- "required": [
17779
- "projectId"
17780
- ]
18514
+ }
17781
18515
  }
17782
18516
  }
17783
18517
  }
@@ -18132,7 +18866,21 @@
18132
18866
  "linked_documents": {
18133
18867
  "type": "array",
18134
18868
  "items": {
18135
- "type": "object"
18869
+ "type": "object",
18870
+ "properties": {
18871
+ "id": {
18872
+ "type": "string",
18873
+ "description": "The document's id."
18874
+ },
18875
+ "title": {
18876
+ "type": "string",
18877
+ "description": "Not needed: the title is read from the document."
18878
+ }
18879
+ },
18880
+ "required": [
18881
+ "id"
18882
+ ],
18883
+ "additionalProperties": true
18136
18884
  },
18137
18885
  "description": "Array of {id, title}."
18138
18886
  },
@@ -18348,7 +19096,21 @@
18348
19096
  "linked_documents": {
18349
19097
  "type": "array",
18350
19098
  "items": {
18351
- "type": "object"
19099
+ "type": "object",
19100
+ "properties": {
19101
+ "id": {
19102
+ "type": "string",
19103
+ "description": "The document's id."
19104
+ },
19105
+ "title": {
19106
+ "type": "string",
19107
+ "description": "Not needed: the title is read from the document."
19108
+ }
19109
+ },
19110
+ "required": [
19111
+ "id"
19112
+ ],
19113
+ "additionalProperties": true
18352
19114
  }
18353
19115
  },
18354
19116
  "linked_document_ids": {
@@ -18359,7 +19121,8 @@
18359
19121
  "description": "Document IDs to link."
18360
19122
  },
18361
19123
  "metadata": {
18362
- "type": "object"
19124
+ "type": "object",
19125
+ "additionalProperties": true
18363
19126
  },
18364
19127
  "fields": {
18365
19128
  "type": "array",
@@ -19898,6 +20661,7 @@
19898
20661
  },
19899
20662
  "metadata": {
19900
20663
  "type": "object",
20664
+ "additionalProperties": true,
19901
20665
  "description": "Additional context."
19902
20666
  }
19903
20667
  },
@@ -20604,7 +21368,16 @@
20604
21368
  "impacted_documents": {
20605
21369
  "type": "array",
20606
21370
  "items": {
20607
- "type": "object"
21371
+ "type": "object",
21372
+ "properties": {
21373
+ "id": {
21374
+ "type": "string"
21375
+ },
21376
+ "title": {
21377
+ "type": "string"
21378
+ }
21379
+ },
21380
+ "additionalProperties": true
20608
21381
  },
20609
21382
  "description": "Array of {id, title}."
20610
21383
  },
@@ -20618,7 +21391,16 @@
20618
21391
  "impacted_diagrams": {
20619
21392
  "type": "array",
20620
21393
  "items": {
20621
- "type": "object"
21394
+ "type": "object",
21395
+ "properties": {
21396
+ "id": {
21397
+ "type": "string"
21398
+ },
21399
+ "name": {
21400
+ "type": "string"
21401
+ }
21402
+ },
21403
+ "additionalProperties": true
20622
21404
  },
20623
21405
  "description": "Array of {id, name}."
20624
21406
  },
@@ -20689,10 +21471,44 @@
20689
21471
  },
20690
21472
  "relationships": {
20691
21473
  "type": "object",
20692
- "description": "Free-form JSON for logical links: blocks, blocked_by, duplicates, supersedes, relates_to (arrays of item IDs)."
21474
+ "description": "Free-form JSON for logical links: blocks, blocked_by, duplicates, supersedes, relates_to (arrays of item IDs).",
21475
+ "properties": {
21476
+ "blocks": {
21477
+ "type": "array",
21478
+ "items": {
21479
+ "type": "string"
21480
+ }
21481
+ },
21482
+ "blocked_by": {
21483
+ "type": "array",
21484
+ "items": {
21485
+ "type": "string"
21486
+ }
21487
+ },
21488
+ "duplicates": {
21489
+ "type": "array",
21490
+ "items": {
21491
+ "type": "string"
21492
+ }
21493
+ },
21494
+ "supersedes": {
21495
+ "type": "array",
21496
+ "items": {
21497
+ "type": "string"
21498
+ }
21499
+ },
21500
+ "relates_to": {
21501
+ "type": "array",
21502
+ "items": {
21503
+ "type": "string"
21504
+ }
21505
+ }
21506
+ },
21507
+ "additionalProperties": true
20693
21508
  },
20694
21509
  "metadata": {
20695
21510
  "type": "object",
21511
+ "additionalProperties": true,
20696
21512
  "description": "Free-form JSON stored alongside the task. On updateTask this MERGES rather than replaces."
20697
21513
  },
20698
21514
  "fields": {
@@ -21572,7 +22388,16 @@
21572
22388
  "impacted_documents": {
21573
22389
  "type": "array",
21574
22390
  "items": {
21575
- "type": "object"
22391
+ "type": "object",
22392
+ "properties": {
22393
+ "id": {
22394
+ "type": "string"
22395
+ },
22396
+ "title": {
22397
+ "type": "string"
22398
+ }
22399
+ },
22400
+ "additionalProperties": true
21576
22401
  }
21577
22402
  },
21578
22403
  "linked_document_ids": {
@@ -21585,7 +22410,16 @@
21585
22410
  "impacted_diagrams": {
21586
22411
  "type": "array",
21587
22412
  "items": {
21588
- "type": "object"
22413
+ "type": "object",
22414
+ "properties": {
22415
+ "id": {
22416
+ "type": "string"
22417
+ },
22418
+ "name": {
22419
+ "type": "string"
22420
+ }
22421
+ },
22422
+ "additionalProperties": true
21589
22423
  }
21590
22424
  },
21591
22425
  "impacted_components": {
@@ -21651,10 +22485,44 @@
21651
22485
  },
21652
22486
  "relationships": {
21653
22487
  "type": "object",
21654
- "description": "Free-form JSON for logical links: blocks, blocked_by, duplicates, supersedes, relates_to (arrays of item IDs). REPLACES the stored object wholesale — read it first and send the complete set."
22488
+ "description": "Free-form JSON for logical links: blocks, blocked_by, duplicates, supersedes, relates_to (arrays of item IDs). REPLACES the stored object wholesale — read it first and send the complete set.",
22489
+ "properties": {
22490
+ "blocks": {
22491
+ "type": "array",
22492
+ "items": {
22493
+ "type": "string"
22494
+ }
22495
+ },
22496
+ "blocked_by": {
22497
+ "type": "array",
22498
+ "items": {
22499
+ "type": "string"
22500
+ }
22501
+ },
22502
+ "duplicates": {
22503
+ "type": "array",
22504
+ "items": {
22505
+ "type": "string"
22506
+ }
22507
+ },
22508
+ "supersedes": {
22509
+ "type": "array",
22510
+ "items": {
22511
+ "type": "string"
22512
+ }
22513
+ },
22514
+ "relates_to": {
22515
+ "type": "array",
22516
+ "items": {
22517
+ "type": "string"
22518
+ }
22519
+ }
22520
+ },
22521
+ "additionalProperties": true
21655
22522
  },
21656
22523
  "metadata": {
21657
22524
  "type": "object",
22525
+ "additionalProperties": true,
21658
22526
  "description": "Free-form JSON. MERGES into the stored object key by key: keys you don't send are left alone, and sending a key with value null deletes it. Send metadata_replace:true to overwrite the whole object instead. (Merging is the default so a partial write can never destroy a sibling key written by another actor.)"
21659
22527
  },
21660
22528
  "metadata_replace": {
@@ -21963,7 +22831,16 @@
21963
22831
  "impacted_documents": {
21964
22832
  "type": "array",
21965
22833
  "items": {
21966
- "type": "object"
22834
+ "type": "object",
22835
+ "properties": {
22836
+ "id": {
22837
+ "type": "string"
22838
+ },
22839
+ "title": {
22840
+ "type": "string"
22841
+ }
22842
+ },
22843
+ "additionalProperties": true
21967
22844
  }
21968
22845
  },
21969
22846
  "linked_document_ids": {
@@ -21975,7 +22852,16 @@
21975
22852
  "impacted_diagrams": {
21976
22853
  "type": "array",
21977
22854
  "items": {
21978
- "type": "object"
22855
+ "type": "object",
22856
+ "properties": {
22857
+ "id": {
22858
+ "type": "string"
22859
+ },
22860
+ "name": {
22861
+ "type": "string"
22862
+ }
22863
+ },
22864
+ "additionalProperties": true
21979
22865
  }
21980
22866
  },
21981
22867
  "impacted_components": {
@@ -22036,10 +22922,44 @@
22036
22922
  "type": "string"
22037
22923
  },
22038
22924
  "relationships": {
22039
- "type": "object"
22925
+ "type": "object",
22926
+ "properties": {
22927
+ "blocks": {
22928
+ "type": "array",
22929
+ "items": {
22930
+ "type": "string"
22931
+ }
22932
+ },
22933
+ "blocked_by": {
22934
+ "type": "array",
22935
+ "items": {
22936
+ "type": "string"
22937
+ }
22938
+ },
22939
+ "duplicates": {
22940
+ "type": "array",
22941
+ "items": {
22942
+ "type": "string"
22943
+ }
22944
+ },
22945
+ "supersedes": {
22946
+ "type": "array",
22947
+ "items": {
22948
+ "type": "string"
22949
+ }
22950
+ },
22951
+ "relates_to": {
22952
+ "type": "array",
22953
+ "items": {
22954
+ "type": "string"
22955
+ }
22956
+ }
22957
+ },
22958
+ "additionalProperties": true
22040
22959
  },
22041
22960
  "metadata": {
22042
- "type": "object"
22961
+ "type": "object",
22962
+ "additionalProperties": true
22043
22963
  },
22044
22964
  "metadata_replace": {
22045
22965
  "type": "boolean"
@@ -37510,6 +38430,7 @@
37510
38430
  "items": {
37511
38431
  "type": "string"
37512
38432
  },
38433
+ "additionalProperties": true,
37513
38434
  "description": "Visible column ids (string[]) when an array."
37514
38435
  },
37515
38436
  "column_widths": {
@@ -37521,6 +38442,9 @@
37521
38442
  "items": {
37522
38443
  "type": "number"
37523
38444
  },
38445
+ "additionalProperties": {
38446
+ "type": "number"
38447
+ },
37524
38448
  "description": "Column widths — a { colId: px } map, or a number[] when an array."
37525
38449
  },
37526
38450
  "column_order": {
@@ -37532,6 +38456,7 @@
37532
38456
  "items": {
37533
38457
  "type": "string"
37534
38458
  },
38459
+ "additionalProperties": true,
37535
38460
  "description": "Ordered column ids (string[]) when an array."
37536
38461
  },
37537
38462
  "sort_config": {
@@ -37541,8 +38466,18 @@
37541
38466
  "null"
37542
38467
  ],
37543
38468
  "items": {
37544
- "type": "object"
38469
+ "type": "object",
38470
+ "properties": {
38471
+ "id": {
38472
+ "type": "string"
38473
+ },
38474
+ "desc": {
38475
+ "type": "boolean"
38476
+ }
38477
+ },
38478
+ "additionalProperties": true
37545
38479
  },
38480
+ "additionalProperties": true,
37546
38481
  "description": "Sort rules — array of { id, desc } when an array."
37547
38482
  },
37548
38483
  "filter_config": {
@@ -37552,8 +38487,41 @@
37552
38487
  "null"
37553
38488
  ],
37554
38489
  "items": {
37555
- "type": "object"
38490
+ "type": "object",
38491
+ "properties": {
38492
+ "id": {
38493
+ "type": "string"
38494
+ },
38495
+ "value": {
38496
+ "type": "string"
38497
+ }
38498
+ },
38499
+ "additionalProperties": true
37556
38500
  },
38501
+ "properties": {
38502
+ "pageSize": {
38503
+ "type": "integer"
38504
+ },
38505
+ "tab": {
38506
+ "type": "string"
38507
+ },
38508
+ "filters": {
38509
+ "type": "array",
38510
+ "items": {
38511
+ "type": "object",
38512
+ "properties": {
38513
+ "id": {
38514
+ "type": "string"
38515
+ },
38516
+ "value": {
38517
+ "type": "string"
38518
+ }
38519
+ },
38520
+ "additionalProperties": true
38521
+ }
38522
+ }
38523
+ },
38524
+ "additionalProperties": true,
37557
38525
  "description": "Filter state — usually a { pageSize, tab, filters } object."
37558
38526
  }
37559
38527
  },
@@ -39624,6 +40592,7 @@
39624
40592
  "maxItems": 25,
39625
40593
  "items": {
39626
40594
  "type": "object",
40595
+ "additionalProperties": true,
39627
40596
  "description": "A condition or a group, the same shape as the filter itself."
39628
40597
  }
39629
40598
  },
@@ -39633,6 +40602,7 @@
39633
40602
  "maxItems": 25,
39634
40603
  "items": {
39635
40604
  "type": "object",
40605
+ "additionalProperties": true,
39636
40606
  "description": "A condition or a group, the same shape as the filter itself."
39637
40607
  }
39638
40608
  }
@@ -39786,10 +40756,7 @@
39786
40756
  ],
39787
40757
  "description": "No groupBy: also the period before."
39788
40758
  }
39789
- },
39790
- "required": [
39791
- "fn"
39792
- ]
40759
+ }
39793
40760
  }
39794
40761
  },
39795
40762
  "groupBy": {
@@ -40440,8 +41407,7 @@
40440
41407
  }
40441
41408
  },
40442
41409
  "required": [
40443
- "name",
40444
- "type"
41410
+ "name"
40445
41411
  ]
40446
41412
  },
40447
41413
  "description": "Leave out for a table with one text field called Name. Every table also ends with Created on, Created by, Updated on and Updated by, kept by Stable Baseline."
@@ -40463,10 +41429,7 @@
40463
41429
  "type": "string",
40464
41430
  "maxLength": 100
40465
41431
  }
40466
- },
40467
- "required": [
40468
- "rule"
40469
- ]
41432
+ }
40470
41433
  }
40471
41434
  },
40472
41435
  "required": [
@@ -40729,10 +41692,7 @@
40729
41692
  "type": "string",
40730
41693
  "maxLength": 100
40731
41694
  }
40732
- },
40733
- "required": [
40734
- "rule"
40735
- ]
41695
+ }
40736
41696
  },
40737
41697
  "autoNumberPrefix": {
40738
41698
  "type": [
@@ -40908,8 +41868,7 @@
40908
41868
  }
40909
41869
  },
40910
41870
  "required": [
40911
- "name",
40912
- "type"
41871
+ "name"
40913
41872
  ]
40914
41873
  }
40915
41874
  },
@@ -41139,7 +42098,8 @@
41139
42098
  "object",
41140
42099
  "null"
41141
42100
  ],
41142
- "description": "The view's saved filter, the same shape as queryDatabaseRows' where but never across a relation (no via). null clears it."
42101
+ "additionalProperties": true,
42102
+ "description": "The view's saved filter: queryDatabaseRows' where, never across a relation (no via). null clears it."
41143
42103
  },
41144
42104
  "sort": {
41145
42105
  "type": "array",
@@ -41249,7 +42209,8 @@
41249
42209
  "object",
41250
42210
  "null"
41251
42211
  ],
41252
- "description": "The view's saved filter, the same shape as queryDatabaseRows' where but never across a relation (no via). null clears it."
42212
+ "additionalProperties": true,
42213
+ "description": "The view's saved filter: queryDatabaseRows' where, never across a relation (no via). null clears it."
41253
42214
  },
41254
42215
  "sort": {
41255
42216
  "type": "array",
@@ -41985,6 +42946,7 @@
41985
42946
  },
41986
42947
  "where": {
41987
42948
  "type": "object",
42949
+ "additionalProperties": true,
41988
42950
  "description": "Every row that matches: queryDatabaseRows' where."
41989
42951
  },
41990
42952
  "view": {
@@ -42090,6 +43052,15 @@
42090
43052
  "sunday"
42091
43053
  ],
42092
43054
  "description": "The day a week starts on, for in_period's weeks. Default monday."
43055
+ },
43056
+ "form": {
43057
+ "type": "string",
43058
+ "maxLength": 200,
43059
+ "description": "Answer this form (id or name) instead, with answers by field name."
43060
+ },
43061
+ "answers": {
43062
+ "type": "object",
43063
+ "additionalProperties": true
42093
43064
  }
42094
43065
  },
42095
43066
  "required": [
@@ -42470,6 +43441,7 @@
42470
43441
  },
42471
43442
  "where": {
42472
43443
  "type": "object",
43444
+ "additionalProperties": true,
42473
43445
  "description": "Every row that matches: queryDatabaseRows' where."
42474
43446
  },
42475
43447
  "view": {
@@ -42481,7 +43453,25 @@
42481
43453
  "type": "array",
42482
43454
  "maxItems": 3,
42483
43455
  "items": {
42484
- "type": "object"
43456
+ "type": "object",
43457
+ "properties": {
43458
+ "field": {
43459
+ "type": "string",
43460
+ "maxLength": 100,
43461
+ "description": "The field's name."
43462
+ },
43463
+ "direction": {
43464
+ "type": "string",
43465
+ "enum": [
43466
+ "ascending",
43467
+ "descending"
43468
+ ]
43469
+ }
43470
+ },
43471
+ "required": [
43472
+ "field"
43473
+ ],
43474
+ "additionalProperties": true
42485
43475
  },
42486
43476
  "description": "queryDatabaseRows' sort."
42487
43477
  },
@@ -42676,6 +43666,7 @@
42676
43666
  },
42677
43667
  "where": {
42678
43668
  "type": "object",
43669
+ "additionalProperties": true,
42679
43670
  "description": "Every row that matches: queryDatabaseRows' where."
42680
43671
  },
42681
43672
  "view": {