@talonic/docs 0.21.97 → 0.21.99

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/dist/content.js CHANGED
@@ -151,6 +151,10 @@ var generated_nav_default = {
151
151
  id: "ref-contract-check",
152
152
  label: "Contract Check"
153
153
  },
154
+ {
155
+ id: "ref-collections",
156
+ label: "Collections"
157
+ },
154
158
  {
155
159
  id: "ref-catalog",
156
160
  label: "Catalog"
@@ -163,6 +167,10 @@ var generated_nav_default = {
163
167
  id: "ref-team",
164
168
  label: "Team"
165
169
  },
170
+ {
171
+ id: "ref-thread",
172
+ label: "Thread"
173
+ },
166
174
  {
167
175
  id: "ref-access-and-sharing",
168
176
  label: "Access & sharing"
@@ -2141,6 +2149,18 @@ var openapi_default = {
2141
2149
  ],
2142
2150
  default: "extract",
2143
2151
  description: "`extract`: text only, for a following `POST /v1/extract`. `ingest`: full processing into workspace data."
2152
+ },
2153
+ parties: {
2154
+ type: "array",
2155
+ maxItems: 500,
2156
+ description: "The document's parties as your system has them, the same as `PUT /v1/documents/{id}/parties`. They decide the document's labels and so its place in the Collections tree.",
2157
+ items: {
2158
+ $ref: "#/components/schemas/DocumentParty"
2159
+ }
2160
+ },
2161
+ parties_complete: {
2162
+ type: "boolean",
2163
+ description: "`parties` names every party of the document."
2144
2164
  }
2145
2165
  }
2146
2166
  }
@@ -66190,89 +66210,15 @@ var openapi_default = {
66190
66210
  }
66191
66211
  }
66192
66212
  },
66193
- "/v1/documents/batch-metadata/import": {
66194
- post: {
66195
- operationId: "importDocumentBatchMetadata",
66196
- "x-audience": "public",
66197
- tags: [
66198
- "Documents"
66199
- ],
66200
- summary: "Import source batch ids from a CSV",
66201
- description: "Sets the source batch id on existing documents from a CSV upload (`file`, up to 20 MB). Answers how many documents were updated and which named ones were not found. 403 for a person whose document visibility a rule narrows, because the import matches against every document of the workspace. Requires the `documents:write` scope. The key's person must be an Admin of the workspace, as in the web app; in a workspace whose model configuration Talonic manages this answers 403 `insufficient_role`.",
66202
- security: [
66203
- {
66204
- BearerAuth: []
66205
- }
66206
- ],
66207
- "x-required-scopes": [
66208
- "documents:write"
66209
- ],
66210
- requestBody: {
66211
- required: true,
66212
- content: {
66213
- "multipart/form-data": {
66214
- schema: {
66215
- type: "object",
66216
- properties: {
66217
- file: {
66218
- type: "string",
66219
- format: "binary",
66220
- description: "CSV with a header row."
66221
- }
66222
- },
66223
- required: [
66224
- "file"
66225
- ]
66226
- }
66227
- }
66228
- }
66229
- },
66230
- responses: {
66231
- "201": {
66232
- description: "OK",
66233
- content: {
66234
- "application/json": {
66235
- schema: {
66236
- type: "object",
66237
- properties: {
66238
- updated: {
66239
- type: "integer"
66240
- },
66241
- not_found: {
66242
- type: "array",
66243
- items: {
66244
- type: "string"
66245
- }
66246
- }
66247
- }
66248
- }
66249
- }
66250
- }
66251
- },
66252
- "400": {
66253
- $ref: "#/components/responses/BadRequest"
66254
- },
66255
- "401": {
66256
- $ref: "#/components/responses/Unauthorized"
66257
- },
66258
- "403": {
66259
- $ref: "#/components/responses/Forbidden"
66260
- },
66261
- "429": {
66262
- $ref: "#/components/responses/RateLimitExceeded"
66263
- }
66264
- }
66265
- }
66266
- },
66267
- "/v1/documents/display-name-rule": {
66213
+ "/v1/documents/{id}/collections": {
66268
66214
  get: {
66269
- operationId: "getDisplayNameRule",
66215
+ operationId: "explainDocumentCollections",
66270
66216
  "x-audience": "public",
66271
66217
  tags: [
66272
- "Documents"
66218
+ "Collections"
66273
66219
  ],
66274
- summary: "Get the readable-name rule",
66275
- description: "The workspace's rule for deriving a readable name from each filename, its check state, and a sample of current filename \u2192 name pairs. Requires the `read` scope (or `documents:read`). Any member of the workspace may call it. The sample lists only documents the key's person can see.",
66220
+ summary: "Explain a document's collections",
66221
+ description: "Why the document sits where it does: each of its labels, whether it was derived or set by a person, with the evidence you may see behind it, and each collection it is in, with why (`rule`, `hand` or `held` by a limit). `pending` and `unresolved` say whether its labels are still settling. 404 when the key's person may not read the document. Requires the `read` scope (or `documents:read`). Any member of the workspace may call it.",
66276
66222
  security: [
66277
66223
  {
66278
66224
  BearerAuth: []
@@ -66281,72 +66227,17 @@ var openapi_default = {
66281
66227
  "x-required-scopes": [
66282
66228
  "read"
66283
66229
  ],
66284
- responses: {
66285
- "200": {
66286
- description: "OK",
66287
- content: {
66288
- "application/json": {
66289
- schema: {
66290
- type: "object",
66291
- additionalProperties: true
66292
- }
66293
- }
66294
- }
66295
- },
66296
- "401": {
66297
- $ref: "#/components/responses/Unauthorized"
66298
- },
66299
- "403": {
66300
- $ref: "#/components/responses/Forbidden"
66301
- },
66302
- "429": {
66303
- $ref: "#/components/responses/RateLimitExceeded"
66304
- }
66305
- }
66306
- },
66307
- patch: {
66308
- operationId: "setDisplayNameRule",
66309
- "x-audience": "public",
66310
- tags: [
66311
- "Documents"
66312
- ],
66313
- summary: "Set the readable-name rule",
66314
- description: "`off` derives nothing and clears stored names, `default` tidies each filename, `lua` runs your `script` (reads `record.filename`, calls `record:set('display_name', value)`). Takes effect for new documents; apply it to existing ones with the backfill. Requires the `documents:write` scope. The key's person must be an Admin of the workspace (the `workspace` permission), as in the web app.",
66315
- security: [
66230
+ parameters: [
66316
66231
  {
66317
- BearerAuth: []
66318
- }
66319
- ],
66320
- "x-required-scopes": [
66321
- "documents:write"
66322
- ],
66323
- requestBody: {
66324
- required: true,
66325
- content: {
66326
- "application/json": {
66327
- schema: {
66328
- type: "object",
66329
- properties: {
66330
- mode: {
66331
- type: "string",
66332
- enum: [
66333
- "off",
66334
- "default",
66335
- "lua"
66336
- ]
66337
- },
66338
- script: {
66339
- type: "string",
66340
- maxLength: 2e4
66341
- }
66342
- },
66343
- required: [
66344
- "mode"
66345
- ]
66346
- }
66232
+ name: "id",
66233
+ in: "path",
66234
+ required: true,
66235
+ schema: {
66236
+ type: "string",
66237
+ format: "uuid"
66347
66238
  }
66348
66239
  }
66349
- },
66240
+ ],
66350
66241
  responses: {
66351
66242
  "200": {
66352
66243
  description: "OK",
@@ -66368,21 +66259,24 @@ var openapi_default = {
66368
66259
  "403": {
66369
66260
  $ref: "#/components/responses/Forbidden"
66370
66261
  },
66262
+ "404": {
66263
+ $ref: "#/components/responses/NotFound"
66264
+ },
66371
66265
  "429": {
66372
66266
  $ref: "#/components/responses/RateLimitExceeded"
66373
66267
  }
66374
66268
  }
66375
66269
  }
66376
66270
  },
66377
- "/v1/documents/display-name-rule/preview": {
66378
- post: {
66379
- operationId: "previewDisplayNameRule",
66271
+ "/v1/documents/{id}/traits": {
66272
+ patch: {
66273
+ operationId: "setDocumentLabels",
66380
66274
  "x-audience": "public",
66381
66275
  tags: [
66382
- "Documents"
66276
+ "Collections"
66383
66277
  ],
66384
- summary: "Try a readable-name script",
66385
- description: "Runs a candidate `lua_script` over a sample of real filenames (default 50, at most 200) without saving it. Requires the `documents:write` scope. The key's person must be an Admin of the workspace (the `workspace` permission), as in the web app. The sample is drawn only from documents the key's person can see.",
66278
+ summary: "Change a document's labels by hand",
66279
+ description: "Adds and removes labels on one document (`add`, `remove`, each at most 50 labels such as `relationship:client`). A person's labels are kept whenever the document's labels are derived again. Refused (403) when the change would move the document into or out of a limited collection the key's person may not manage. Requires the `documents:write` scope. The key's person must be allowed to edit in the workspace, as in the web app.",
66386
66280
  security: [
66387
66281
  {
66388
66282
  BearerAuth: []
@@ -66391,74 +66285,17 @@ var openapi_default = {
66391
66285
  "x-required-scopes": [
66392
66286
  "documents:write"
66393
66287
  ],
66394
- requestBody: {
66395
- required: true,
66396
- content: {
66397
- "application/json": {
66398
- schema: {
66399
- type: "object",
66400
- properties: {
66401
- lua_script: {
66402
- type: "string",
66403
- maxLength: 2e4
66404
- },
66405
- sample_size: {
66406
- type: "integer",
66407
- minimum: 1,
66408
- maximum: 200
66409
- }
66410
- },
66411
- required: [
66412
- "lua_script"
66413
- ]
66414
- }
66415
- }
66416
- }
66417
- },
66418
- responses: {
66419
- "200": {
66420
- description: "OK",
66421
- content: {
66422
- "application/json": {
66423
- schema: {
66424
- type: "object",
66425
- additionalProperties: true
66426
- }
66427
- }
66428
- }
66429
- },
66430
- "400": {
66431
- $ref: "#/components/responses/BadRequest"
66432
- },
66433
- "401": {
66434
- $ref: "#/components/responses/Unauthorized"
66435
- },
66436
- "403": {
66437
- $ref: "#/components/responses/Forbidden"
66438
- },
66439
- "429": {
66440
- $ref: "#/components/responses/RateLimitExceeded"
66441
- }
66442
- }
66443
- }
66444
- },
66445
- "/v1/documents/display-name-rule/generate-script": {
66446
- post: {
66447
- operationId: "generateDisplayNameScript",
66448
- "x-audience": "public",
66449
- tags: [
66450
- "Documents"
66451
- ],
66452
- summary: "Draft a readable-name script from an instruction",
66453
- description: "Drafts a rule script from a plain-language `instruction` (\"drop the number in front of the name\"), grounded in the workspace's own filenames. Saves nothing. Requires the `documents:write` scope. The key's person must be an Admin of the workspace (the `workspace` permission), as in the web app. Only filenames of documents the key's person can see are used and returned.",
66454
- security: [
66288
+ parameters: [
66455
66289
  {
66456
- BearerAuth: []
66290
+ name: "id",
66291
+ in: "path",
66292
+ required: true,
66293
+ schema: {
66294
+ type: "string",
66295
+ format: "uuid"
66296
+ }
66457
66297
  }
66458
66298
  ],
66459
- "x-required-scopes": [
66460
- "documents:write"
66461
- ],
66462
66299
  requestBody: {
66463
66300
  required: true,
66464
66301
  content: {
@@ -66466,19 +66303,512 @@ var openapi_default = {
66466
66303
  schema: {
66467
66304
  type: "object",
66468
66305
  properties: {
66469
- instruction: {
66470
- type: "string",
66471
- maxLength: 2e3
66306
+ add: {
66307
+ type: "array",
66308
+ maxItems: 50,
66309
+ items: {
66310
+ type: "string",
66311
+ maxLength: 200
66312
+ }
66472
66313
  },
66473
- sample_size: {
66474
- type: "integer",
66475
- minimum: 1,
66476
- maximum: 200
66314
+ remove: {
66315
+ type: "array",
66316
+ maxItems: 50,
66317
+ items: {
66318
+ type: "string",
66319
+ maxLength: 200
66320
+ }
66477
66321
  }
66478
- },
66479
- required: [
66480
- "instruction"
66481
- ]
66322
+ }
66323
+ }
66324
+ }
66325
+ }
66326
+ },
66327
+ responses: {
66328
+ "200": {
66329
+ description: "OK",
66330
+ content: {
66331
+ "application/json": {
66332
+ schema: {
66333
+ type: "object",
66334
+ additionalProperties: true
66335
+ }
66336
+ }
66337
+ }
66338
+ },
66339
+ "400": {
66340
+ $ref: "#/components/responses/BadRequest"
66341
+ },
66342
+ "401": {
66343
+ $ref: "#/components/responses/Unauthorized"
66344
+ },
66345
+ "403": {
66346
+ $ref: "#/components/responses/Forbidden"
66347
+ },
66348
+ "404": {
66349
+ $ref: "#/components/responses/NotFound"
66350
+ },
66351
+ "429": {
66352
+ $ref: "#/components/responses/RateLimitExceeded"
66353
+ }
66354
+ }
66355
+ }
66356
+ },
66357
+ "/v1/documents/{id}/move": {
66358
+ post: {
66359
+ operationId: "moveDocumentBetweenCollections",
66360
+ "x-audience": "public",
66361
+ tags: [
66362
+ "Collections"
66363
+ ],
66364
+ summary: "Move a document between collections",
66365
+ description: "Takes the document out of `from`, puts it into `to`, or both. A collection that sorts by labels keeps the document out once it is moved out. Any member moves between plain collections; a limited collection needs a person its limit admits or an owner; an enforced collection or an account needs an owner (403 otherwise). 404 when the key's person may not read the document. Requires the `documents:write` scope. The key's person must be allowed to edit in the workspace, as in the web app.",
66366
+ security: [
66367
+ {
66368
+ BearerAuth: []
66369
+ }
66370
+ ],
66371
+ "x-required-scopes": [
66372
+ "documents:write"
66373
+ ],
66374
+ parameters: [
66375
+ {
66376
+ name: "id",
66377
+ in: "path",
66378
+ required: true,
66379
+ schema: {
66380
+ type: "string",
66381
+ format: "uuid"
66382
+ }
66383
+ }
66384
+ ],
66385
+ requestBody: {
66386
+ required: true,
66387
+ content: {
66388
+ "application/json": {
66389
+ schema: {
66390
+ type: "object",
66391
+ properties: {
66392
+ from: {
66393
+ type: "string",
66394
+ format: "uuid",
66395
+ nullable: true
66396
+ },
66397
+ to: {
66398
+ type: "string",
66399
+ format: "uuid",
66400
+ nullable: true
66401
+ }
66402
+ }
66403
+ }
66404
+ }
66405
+ }
66406
+ },
66407
+ responses: {
66408
+ "200": {
66409
+ description: "OK",
66410
+ content: {
66411
+ "application/json": {
66412
+ schema: {
66413
+ type: "object",
66414
+ additionalProperties: true
66415
+ }
66416
+ }
66417
+ }
66418
+ },
66419
+ "400": {
66420
+ $ref: "#/components/responses/BadRequest"
66421
+ },
66422
+ "401": {
66423
+ $ref: "#/components/responses/Unauthorized"
66424
+ },
66425
+ "403": {
66426
+ $ref: "#/components/responses/Forbidden"
66427
+ },
66428
+ "404": {
66429
+ $ref: "#/components/responses/NotFound"
66430
+ },
66431
+ "409": {
66432
+ $ref: "#/components/responses/Conflict"
66433
+ },
66434
+ "429": {
66435
+ $ref: "#/components/responses/RateLimitExceeded"
66436
+ }
66437
+ }
66438
+ }
66439
+ },
66440
+ "/v1/documents/{id}/parties": {
66441
+ put: {
66442
+ operationId: "setDocumentParties",
66443
+ "x-audience": "public",
66444
+ tags: [
66445
+ "Collections"
66446
+ ],
66447
+ summary: "Set a document's parties",
66448
+ description: "Hands over the document's parties as your system has them, the way a connected mailbox does at import: typed identifiers with an optional role, and whether the list is `complete` (only a complete list whose every party is your own makes a document internal). The document's labels are derived again at once; a party nobody in the directory knows yet may leave the document `pending` for a short while, during which it stays under every limit. Requires the `documents:write` scope. The key's person must be allowed to edit in the workspace, as in the web app.",
66449
+ security: [
66450
+ {
66451
+ BearerAuth: []
66452
+ }
66453
+ ],
66454
+ "x-required-scopes": [
66455
+ "documents:write"
66456
+ ],
66457
+ parameters: [
66458
+ {
66459
+ name: "id",
66460
+ in: "path",
66461
+ required: true,
66462
+ schema: {
66463
+ type: "string",
66464
+ format: "uuid"
66465
+ }
66466
+ }
66467
+ ],
66468
+ requestBody: {
66469
+ required: true,
66470
+ content: {
66471
+ "application/json": {
66472
+ schema: {
66473
+ type: "object",
66474
+ required: [
66475
+ "parties"
66476
+ ],
66477
+ properties: {
66478
+ parties: {
66479
+ type: "array",
66480
+ maxItems: 500,
66481
+ items: {
66482
+ $ref: "#/components/schemas/DocumentParty"
66483
+ }
66484
+ },
66485
+ complete: {
66486
+ type: "boolean"
66487
+ }
66488
+ }
66489
+ }
66490
+ }
66491
+ }
66492
+ },
66493
+ responses: {
66494
+ "200": {
66495
+ description: "OK",
66496
+ content: {
66497
+ "application/json": {
66498
+ schema: {
66499
+ type: "object",
66500
+ additionalProperties: true
66501
+ }
66502
+ }
66503
+ }
66504
+ },
66505
+ "400": {
66506
+ $ref: "#/components/responses/BadRequest"
66507
+ },
66508
+ "401": {
66509
+ $ref: "#/components/responses/Unauthorized"
66510
+ },
66511
+ "403": {
66512
+ $ref: "#/components/responses/Forbidden"
66513
+ },
66514
+ "404": {
66515
+ $ref: "#/components/responses/NotFound"
66516
+ },
66517
+ "429": {
66518
+ $ref: "#/components/responses/RateLimitExceeded"
66519
+ }
66520
+ }
66521
+ }
66522
+ },
66523
+ "/v1/documents/batch-metadata/import": {
66524
+ post: {
66525
+ operationId: "importDocumentBatchMetadata",
66526
+ "x-audience": "public",
66527
+ tags: [
66528
+ "Documents"
66529
+ ],
66530
+ summary: "Import source batch ids from a CSV",
66531
+ description: "Sets the source batch id on existing documents from a CSV upload (`file`, up to 20 MB). Answers how many documents were updated and which named ones were not found. 403 for a person whose document visibility a rule narrows, because the import matches against every document of the workspace. Requires the `documents:write` scope. The key's person must be an Admin of the workspace, as in the web app; in a workspace whose model configuration Talonic manages this answers 403 `insufficient_role`.",
66532
+ security: [
66533
+ {
66534
+ BearerAuth: []
66535
+ }
66536
+ ],
66537
+ "x-required-scopes": [
66538
+ "documents:write"
66539
+ ],
66540
+ requestBody: {
66541
+ required: true,
66542
+ content: {
66543
+ "multipart/form-data": {
66544
+ schema: {
66545
+ type: "object",
66546
+ properties: {
66547
+ file: {
66548
+ type: "string",
66549
+ format: "binary",
66550
+ description: "CSV with a header row."
66551
+ }
66552
+ },
66553
+ required: [
66554
+ "file"
66555
+ ]
66556
+ }
66557
+ }
66558
+ }
66559
+ },
66560
+ responses: {
66561
+ "201": {
66562
+ description: "OK",
66563
+ content: {
66564
+ "application/json": {
66565
+ schema: {
66566
+ type: "object",
66567
+ properties: {
66568
+ updated: {
66569
+ type: "integer"
66570
+ },
66571
+ not_found: {
66572
+ type: "array",
66573
+ items: {
66574
+ type: "string"
66575
+ }
66576
+ }
66577
+ }
66578
+ }
66579
+ }
66580
+ }
66581
+ },
66582
+ "400": {
66583
+ $ref: "#/components/responses/BadRequest"
66584
+ },
66585
+ "401": {
66586
+ $ref: "#/components/responses/Unauthorized"
66587
+ },
66588
+ "403": {
66589
+ $ref: "#/components/responses/Forbidden"
66590
+ },
66591
+ "429": {
66592
+ $ref: "#/components/responses/RateLimitExceeded"
66593
+ }
66594
+ }
66595
+ }
66596
+ },
66597
+ "/v1/documents/display-name-rule": {
66598
+ get: {
66599
+ operationId: "getDisplayNameRule",
66600
+ "x-audience": "public",
66601
+ tags: [
66602
+ "Documents"
66603
+ ],
66604
+ summary: "Get the readable-name rule",
66605
+ description: "The workspace's rule for deriving a readable name from each filename, its check state, and a sample of current filename \u2192 name pairs. Requires the `read` scope (or `documents:read`). Any member of the workspace may call it. The sample lists only documents the key's person can see.",
66606
+ security: [
66607
+ {
66608
+ BearerAuth: []
66609
+ }
66610
+ ],
66611
+ "x-required-scopes": [
66612
+ "read"
66613
+ ],
66614
+ responses: {
66615
+ "200": {
66616
+ description: "OK",
66617
+ content: {
66618
+ "application/json": {
66619
+ schema: {
66620
+ type: "object",
66621
+ additionalProperties: true
66622
+ }
66623
+ }
66624
+ }
66625
+ },
66626
+ "401": {
66627
+ $ref: "#/components/responses/Unauthorized"
66628
+ },
66629
+ "403": {
66630
+ $ref: "#/components/responses/Forbidden"
66631
+ },
66632
+ "429": {
66633
+ $ref: "#/components/responses/RateLimitExceeded"
66634
+ }
66635
+ }
66636
+ },
66637
+ patch: {
66638
+ operationId: "setDisplayNameRule",
66639
+ "x-audience": "public",
66640
+ tags: [
66641
+ "Documents"
66642
+ ],
66643
+ summary: "Set the readable-name rule",
66644
+ description: "`off` derives nothing and clears stored names, `default` tidies each filename, `lua` runs your `script` (reads `record.filename`, calls `record:set('display_name', value)`). Takes effect for new documents; apply it to existing ones with the backfill. Requires the `documents:write` scope. The key's person must be an Admin of the workspace (the `workspace` permission), as in the web app.",
66645
+ security: [
66646
+ {
66647
+ BearerAuth: []
66648
+ }
66649
+ ],
66650
+ "x-required-scopes": [
66651
+ "documents:write"
66652
+ ],
66653
+ requestBody: {
66654
+ required: true,
66655
+ content: {
66656
+ "application/json": {
66657
+ schema: {
66658
+ type: "object",
66659
+ properties: {
66660
+ mode: {
66661
+ type: "string",
66662
+ enum: [
66663
+ "off",
66664
+ "default",
66665
+ "lua"
66666
+ ]
66667
+ },
66668
+ script: {
66669
+ type: "string",
66670
+ maxLength: 2e4
66671
+ }
66672
+ },
66673
+ required: [
66674
+ "mode"
66675
+ ]
66676
+ }
66677
+ }
66678
+ }
66679
+ },
66680
+ responses: {
66681
+ "200": {
66682
+ description: "OK",
66683
+ content: {
66684
+ "application/json": {
66685
+ schema: {
66686
+ type: "object",
66687
+ additionalProperties: true
66688
+ }
66689
+ }
66690
+ }
66691
+ },
66692
+ "400": {
66693
+ $ref: "#/components/responses/BadRequest"
66694
+ },
66695
+ "401": {
66696
+ $ref: "#/components/responses/Unauthorized"
66697
+ },
66698
+ "403": {
66699
+ $ref: "#/components/responses/Forbidden"
66700
+ },
66701
+ "429": {
66702
+ $ref: "#/components/responses/RateLimitExceeded"
66703
+ }
66704
+ }
66705
+ }
66706
+ },
66707
+ "/v1/documents/display-name-rule/preview": {
66708
+ post: {
66709
+ operationId: "previewDisplayNameRule",
66710
+ "x-audience": "public",
66711
+ tags: [
66712
+ "Documents"
66713
+ ],
66714
+ summary: "Try a readable-name script",
66715
+ description: "Runs a candidate `lua_script` over a sample of real filenames (default 50, at most 200) without saving it. Requires the `documents:write` scope. The key's person must be an Admin of the workspace (the `workspace` permission), as in the web app. The sample is drawn only from documents the key's person can see.",
66716
+ security: [
66717
+ {
66718
+ BearerAuth: []
66719
+ }
66720
+ ],
66721
+ "x-required-scopes": [
66722
+ "documents:write"
66723
+ ],
66724
+ requestBody: {
66725
+ required: true,
66726
+ content: {
66727
+ "application/json": {
66728
+ schema: {
66729
+ type: "object",
66730
+ properties: {
66731
+ lua_script: {
66732
+ type: "string",
66733
+ maxLength: 2e4
66734
+ },
66735
+ sample_size: {
66736
+ type: "integer",
66737
+ minimum: 1,
66738
+ maximum: 200
66739
+ }
66740
+ },
66741
+ required: [
66742
+ "lua_script"
66743
+ ]
66744
+ }
66745
+ }
66746
+ }
66747
+ },
66748
+ responses: {
66749
+ "200": {
66750
+ description: "OK",
66751
+ content: {
66752
+ "application/json": {
66753
+ schema: {
66754
+ type: "object",
66755
+ additionalProperties: true
66756
+ }
66757
+ }
66758
+ }
66759
+ },
66760
+ "400": {
66761
+ $ref: "#/components/responses/BadRequest"
66762
+ },
66763
+ "401": {
66764
+ $ref: "#/components/responses/Unauthorized"
66765
+ },
66766
+ "403": {
66767
+ $ref: "#/components/responses/Forbidden"
66768
+ },
66769
+ "429": {
66770
+ $ref: "#/components/responses/RateLimitExceeded"
66771
+ }
66772
+ }
66773
+ }
66774
+ },
66775
+ "/v1/documents/display-name-rule/generate-script": {
66776
+ post: {
66777
+ operationId: "generateDisplayNameScript",
66778
+ "x-audience": "public",
66779
+ tags: [
66780
+ "Documents"
66781
+ ],
66782
+ summary: "Draft a readable-name script from an instruction",
66783
+ description: "Drafts a rule script from a plain-language `instruction` (\"drop the number in front of the name\"), grounded in the workspace's own filenames. Saves nothing. Requires the `documents:write` scope. The key's person must be an Admin of the workspace (the `workspace` permission), as in the web app. Only filenames of documents the key's person can see are used and returned.",
66784
+ security: [
66785
+ {
66786
+ BearerAuth: []
66787
+ }
66788
+ ],
66789
+ "x-required-scopes": [
66790
+ "documents:write"
66791
+ ],
66792
+ requestBody: {
66793
+ required: true,
66794
+ content: {
66795
+ "application/json": {
66796
+ schema: {
66797
+ type: "object",
66798
+ properties: {
66799
+ instruction: {
66800
+ type: "string",
66801
+ maxLength: 2e3
66802
+ },
66803
+ sample_size: {
66804
+ type: "integer",
66805
+ minimum: 1,
66806
+ maximum: 200
66807
+ }
66808
+ },
66809
+ required: [
66810
+ "instruction"
66811
+ ]
66482
66812
  }
66483
66813
  }
66484
66814
  }
@@ -66732,15 +67062,293 @@ var openapi_default = {
66732
67062
  }
66733
67063
  }
66734
67064
  },
66735
- "/v1/collections/mine": {
67065
+ "/v1/collections/mine": {
67066
+ get: {
67067
+ operationId: "listMyCollections",
67068
+ "x-audience": "public",
67069
+ tags: [
67070
+ "Collections"
67071
+ ],
67072
+ summary: "List the collections assigned to me",
67073
+ description: "The collections assigned to the key's person, and whether that limits what they see. Requires the `read` scope (or `documents:read`). Any member of the workspace may call it.",
67074
+ security: [
67075
+ {
67076
+ BearerAuth: []
67077
+ }
67078
+ ],
67079
+ "x-required-scopes": [
67080
+ "read"
67081
+ ],
67082
+ responses: {
67083
+ "200": {
67084
+ description: "OK",
67085
+ content: {
67086
+ "application/json": {
67087
+ schema: {
67088
+ type: "object",
67089
+ properties: {
67090
+ collections: {
67091
+ type: "array",
67092
+ items: {
67093
+ type: "object",
67094
+ additionalProperties: true
67095
+ }
67096
+ },
67097
+ restricted: {
67098
+ type: "boolean"
67099
+ }
67100
+ }
67101
+ }
67102
+ }
67103
+ }
67104
+ },
67105
+ "401": {
67106
+ $ref: "#/components/responses/Unauthorized"
67107
+ },
67108
+ "403": {
67109
+ $ref: "#/components/responses/Forbidden"
67110
+ },
67111
+ "429": {
67112
+ $ref: "#/components/responses/RateLimitExceeded"
67113
+ }
67114
+ }
67115
+ }
67116
+ },
67117
+ "/v1/collections/counts": {
67118
+ get: {
67119
+ operationId: "getCollectionCounts",
67120
+ "x-audience": "public",
67121
+ tags: [
67122
+ "Collections"
67123
+ ],
67124
+ summary: "Count documents per collection",
67125
+ description: "Visible-document counts per collection. Requires the `read` scope (or `documents:read`). Any member of the workspace may call it.",
67126
+ security: [
67127
+ {
67128
+ BearerAuth: []
67129
+ }
67130
+ ],
67131
+ "x-required-scopes": [
67132
+ "read"
67133
+ ],
67134
+ responses: {
67135
+ "200": {
67136
+ description: "OK",
67137
+ content: {
67138
+ "application/json": {
67139
+ schema: {
67140
+ type: "object",
67141
+ properties: {
67142
+ collections: {
67143
+ type: "array",
67144
+ items: {
67145
+ type: "object",
67146
+ additionalProperties: true
67147
+ }
67148
+ }
67149
+ }
67150
+ }
67151
+ }
67152
+ }
67153
+ },
67154
+ "401": {
67155
+ $ref: "#/components/responses/Unauthorized"
67156
+ },
67157
+ "403": {
67158
+ $ref: "#/components/responses/Forbidden"
67159
+ },
67160
+ "429": {
67161
+ $ref: "#/components/responses/RateLimitExceeded"
67162
+ }
67163
+ }
67164
+ }
67165
+ },
67166
+ "/v1/collections/config": {
67167
+ get: {
67168
+ operationId: "getCollectionsConfig",
67169
+ "x-audience": "public",
67170
+ tags: [
67171
+ "Collections"
67172
+ ],
67173
+ summary: "Get the collections configuration",
67174
+ description: "The workspace's collections as one configuration document: each collection that has a `key` with its name, the labels it sorts by (`match`, or `any` for several label sets) and its children, plus the workspace's relationship kinds, own domains and whether relationships may be inferred. Who may read a limited collection (`only`), the directory's configured entries and the default views appear for a workspace owner only. Requires the `read` scope (or `documents:read`). Any member of the workspace may call it.",
67175
+ security: [
67176
+ {
67177
+ BearerAuth: []
67178
+ }
67179
+ ],
67180
+ "x-required-scopes": [
67181
+ "read"
67182
+ ],
67183
+ responses: {
67184
+ "200": {
67185
+ description: "OK",
67186
+ content: {
67187
+ "application/json": {
67188
+ schema: {
67189
+ type: "object",
67190
+ additionalProperties: true
67191
+ }
67192
+ }
67193
+ }
67194
+ },
67195
+ "400": {
67196
+ $ref: "#/components/responses/BadRequest"
67197
+ },
67198
+ "401": {
67199
+ $ref: "#/components/responses/Unauthorized"
67200
+ },
67201
+ "403": {
67202
+ $ref: "#/components/responses/Forbidden"
67203
+ },
67204
+ "429": {
67205
+ $ref: "#/components/responses/RateLimitExceeded"
67206
+ }
67207
+ }
67208
+ },
67209
+ put: {
67210
+ operationId: "applyCollectionsConfig",
67211
+ "x-audience": "public",
67212
+ tags: [
67213
+ "Collections"
67214
+ ],
67215
+ summary: "Apply a collections configuration",
67216
+ description: "Applies a configuration document: every problem is reported at once (400 with `details.problems`) before anything changes, then everything is saved together. Collections are matched by their path of keys, so applying the same document twice changes nothing. With `dry_run=true` nothing is saved and the answer lists what would be created, changed and removed, how many documents each collection would hold for you, and for each limit how many documents it hides from how many people. `prune=true` removes keyed collections the document does not name, and refuses (409) one that still has a limit or documents placed by hand. A key with no person cannot change `only` (403). Requires the `documents:write` scope. The key's person must be an Admin of the workspace (the `workspace` permission), as in the web app.",
67217
+ security: [
67218
+ {
67219
+ BearerAuth: []
67220
+ }
67221
+ ],
67222
+ "x-required-scopes": [
67223
+ "documents:write"
67224
+ ],
67225
+ parameters: [
67226
+ {
67227
+ name: "dry_run",
67228
+ in: "query",
67229
+ required: false,
67230
+ schema: {
67231
+ type: "boolean",
67232
+ default: false
67233
+ },
67234
+ description: "Check and preview the change; nothing is saved."
67235
+ },
67236
+ {
67237
+ name: "prune",
67238
+ in: "query",
67239
+ required: false,
67240
+ schema: {
67241
+ type: "boolean",
67242
+ default: false
67243
+ },
67244
+ description: "Remove keyed collections the document does not name."
67245
+ }
67246
+ ],
67247
+ requestBody: {
67248
+ required: true,
67249
+ content: {
67250
+ "application/json": {
67251
+ schema: {
67252
+ type: "object",
67253
+ properties: {
67254
+ document: {
67255
+ type: "object",
67256
+ additionalProperties: true,
67257
+ description: "The configuration document."
67258
+ },
67259
+ yaml: {
67260
+ type: "string",
67261
+ maxLength: 1e6,
67262
+ description: "The configuration document as YAML or JSON text."
67263
+ }
67264
+ }
67265
+ }
67266
+ }
67267
+ }
67268
+ },
67269
+ responses: {
67270
+ "200": {
67271
+ description: "OK",
67272
+ content: {
67273
+ "application/json": {
67274
+ schema: {
67275
+ type: "object",
67276
+ additionalProperties: true
67277
+ }
67278
+ }
67279
+ }
67280
+ },
67281
+ "400": {
67282
+ $ref: "#/components/responses/BadRequest"
67283
+ },
67284
+ "401": {
67285
+ $ref: "#/components/responses/Unauthorized"
67286
+ },
67287
+ "403": {
67288
+ $ref: "#/components/responses/Forbidden"
67289
+ },
67290
+ "409": {
67291
+ $ref: "#/components/responses/Conflict"
67292
+ },
67293
+ "429": {
67294
+ $ref: "#/components/responses/RateLimitExceeded"
67295
+ }
67296
+ }
67297
+ }
67298
+ },
67299
+ "/v1/collections/proposal": {
67300
+ post: {
67301
+ operationId: "proposeCollectionsConfig",
67302
+ "x-audience": "public",
67303
+ tags: [
67304
+ "Collections"
67305
+ ],
67306
+ summary: "Propose a collections configuration",
67307
+ description: "A configuration document built from the workspace's own documents, as far as the key's person may read them: one top-level collection per channel with documents, children for the labels common enough to be worth one, and, when the workspace has conversations and fewer than two relationship kinds, kinds suggested from its most frequent outside organisations (only when relationships may be inferred). Nothing is saved, and no limit is ever proposed: edit it and apply it with `PUT /v1/collections/config`. Requires the `read` scope (or `documents:read`). The key's person must be an Admin of the workspace (the `workspace` permission), as in the web app.",
67308
+ security: [
67309
+ {
67310
+ BearerAuth: []
67311
+ }
67312
+ ],
67313
+ "x-required-scopes": [
67314
+ "read"
67315
+ ],
67316
+ responses: {
67317
+ "200": {
67318
+ description: "OK",
67319
+ content: {
67320
+ "application/json": {
67321
+ schema: {
67322
+ type: "object",
67323
+ additionalProperties: true
67324
+ }
67325
+ }
67326
+ }
67327
+ },
67328
+ "400": {
67329
+ $ref: "#/components/responses/BadRequest"
67330
+ },
67331
+ "401": {
67332
+ $ref: "#/components/responses/Unauthorized"
67333
+ },
67334
+ "403": {
67335
+ $ref: "#/components/responses/Forbidden"
67336
+ },
67337
+ "429": {
67338
+ $ref: "#/components/responses/RateLimitExceeded"
67339
+ }
67340
+ }
67341
+ }
67342
+ },
67343
+ "/v1/collections/directory": {
66736
67344
  get: {
66737
- operationId: "listMyCollections",
67345
+ operationId: "listCollectionsDirectory",
66738
67346
  "x-audience": "public",
66739
67347
  tags: [
66740
67348
  "Collections"
66741
67349
  ],
66742
- summary: "List the collections assigned to me",
66743
- description: "The collections assigned to the key's person, and whether that limits what they see. Requires the `read` scope (or `documents:read`). Any member of the workspace may call it.",
67350
+ summary: "List the relationship directory",
67351
+ description: "Who is who: each identifier (an address, a domain, a phone number, a handle) with what that party is to the workspace and where that came from (`person`, `config`, `record` or `read`). Each entry is shown only where the key's person may see its evidence: configured and corrected entries for an owner, an entry from a record when the person may read that record, an entry from a conversation when the person may read that conversation. Requires the `read` scope (or `documents:read`). Any member of the workspace may call it.",
66744
67352
  security: [
66745
67353
  {
66746
67354
  BearerAuth: []
@@ -66756,22 +67364,14 @@ var openapi_default = {
66756
67364
  "application/json": {
66757
67365
  schema: {
66758
67366
  type: "object",
66759
- properties: {
66760
- collections: {
66761
- type: "array",
66762
- items: {
66763
- type: "object",
66764
- additionalProperties: true
66765
- }
66766
- },
66767
- restricted: {
66768
- type: "boolean"
66769
- }
66770
- }
67367
+ additionalProperties: true
66771
67368
  }
66772
67369
  }
66773
67370
  }
66774
67371
  },
67372
+ "400": {
67373
+ $ref: "#/components/responses/BadRequest"
67374
+ },
66775
67375
  "401": {
66776
67376
  $ref: "#/components/responses/Unauthorized"
66777
67377
  },
@@ -66782,25 +67382,68 @@ var openapi_default = {
66782
67382
  $ref: "#/components/responses/RateLimitExceeded"
66783
67383
  }
66784
67384
  }
66785
- }
66786
- },
66787
- "/v1/collections/counts": {
66788
- get: {
66789
- operationId: "getCollectionCounts",
67385
+ },
67386
+ put: {
67387
+ operationId: "saveCollectionsDirectory",
66790
67388
  "x-audience": "public",
66791
67389
  tags: [
66792
67390
  "Collections"
66793
67391
  ],
66794
- summary: "Count documents per collection",
66795
- description: "Visible-document counts per collection. Requires the `read` scope (or `documents:read`). Any member of the workspace may call it.",
67392
+ summary: "Correct the relationship directory",
67393
+ description: "Sets entries as a person's correction (they outrank configuration, records and conversations for their identifier) and removes entries by id. The documents of every identifier touched are relabelled; `wait` waits up to 60 seconds and `pending` counts what is still to follow. Requires the `documents:write` scope. The key's person must be an Admin of the workspace (the `workspace` permission), as in the web app.",
66796
67394
  security: [
66797
67395
  {
66798
67396
  BearerAuth: []
66799
67397
  }
66800
67398
  ],
66801
67399
  "x-required-scopes": [
66802
- "read"
67400
+ "documents:write"
66803
67401
  ],
67402
+ requestBody: {
67403
+ required: true,
67404
+ content: {
67405
+ "application/json": {
67406
+ schema: {
67407
+ type: "object",
67408
+ properties: {
67409
+ entries: {
67410
+ type: "array",
67411
+ maxItems: 200,
67412
+ items: {
67413
+ type: "object",
67414
+ required: [
67415
+ "match_value",
67416
+ "relationship"
67417
+ ],
67418
+ properties: {
67419
+ match_value: {
67420
+ type: "string",
67421
+ description: "A typed identifier: `domain:acme.com`, `email:jane@acme.com`, `phone:\u2026`, `handle:\u2026` or `entity:\u2026`."
67422
+ },
67423
+ relationship: {
67424
+ type: "string",
67425
+ description: "A relationship kind of the workspace (its slug), or `own` / `other`."
67426
+ }
67427
+ }
67428
+ }
67429
+ },
67430
+ remove: {
67431
+ type: "array",
67432
+ maxItems: 200,
67433
+ items: {
67434
+ type: "string",
67435
+ format: "uuid"
67436
+ }
67437
+ },
67438
+ wait: {
67439
+ type: "boolean",
67440
+ description: "Wait up to 60 seconds for the documents to be relabelled."
67441
+ }
67442
+ }
67443
+ }
67444
+ }
67445
+ }
67446
+ },
66804
67447
  responses: {
66805
67448
  "200": {
66806
67449
  description: "OK",
@@ -66808,25 +67451,23 @@ var openapi_default = {
66808
67451
  "application/json": {
66809
67452
  schema: {
66810
67453
  type: "object",
66811
- properties: {
66812
- collections: {
66813
- type: "array",
66814
- items: {
66815
- type: "object",
66816
- additionalProperties: true
66817
- }
66818
- }
66819
- }
67454
+ additionalProperties: true
66820
67455
  }
66821
67456
  }
66822
67457
  }
66823
67458
  },
67459
+ "400": {
67460
+ $ref: "#/components/responses/BadRequest"
67461
+ },
66824
67462
  "401": {
66825
67463
  $ref: "#/components/responses/Unauthorized"
66826
67464
  },
66827
67465
  "403": {
66828
67466
  $ref: "#/components/responses/Forbidden"
66829
67467
  },
67468
+ "404": {
67469
+ $ref: "#/components/responses/NotFound"
67470
+ },
66830
67471
  "429": {
66831
67472
  $ref: "#/components/responses/RateLimitExceeded"
66832
67473
  }
@@ -67367,6 +68008,11 @@ var openapi_default = {
67367
68008
  type: "string",
67368
68009
  format: "uuid"
67369
68010
  }
68011
+ },
68012
+ move: {
68013
+ type: "boolean",
68014
+ default: false,
68015
+ description: "On an account: move documents that belong to another account into this one instead of refusing them (409). Ignored on a plain collection."
67370
68016
  }
67371
68017
  },
67372
68018
  required: [
@@ -77318,30 +77964,216 @@ var openapi_default = {
77318
77964
  }
77319
77965
  }
77320
77966
  },
77321
- "/v1/records/compartments/{id}/bindings/{bindingId}": {
77322
- delete: {
77323
- operationId: "removeCompartmentBinding",
77967
+ "/v1/records/compartments/{id}/bindings/{bindingId}": {
77968
+ delete: {
77969
+ operationId: "removeCompartmentBinding",
77970
+ "x-required-scopes": [
77971
+ "team:write"
77972
+ ],
77973
+ "x-audience": "public",
77974
+ summary: "Remove a compartment binding",
77975
+ description: "Takes a source, document type or document out of a compartment.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
77976
+ tags: [
77977
+ "Records"
77978
+ ],
77979
+ parameters: [
77980
+ {
77981
+ name: "id",
77982
+ in: "path",
77983
+ required: true,
77984
+ schema: {
77985
+ type: "string",
77986
+ format: "uuid"
77987
+ }
77988
+ },
77989
+ {
77990
+ name: "bindingId",
77991
+ in: "path",
77992
+ required: true,
77993
+ schema: {
77994
+ type: "string",
77995
+ format: "uuid"
77996
+ }
77997
+ }
77998
+ ],
77999
+ responses: {
78000
+ "200": {
78001
+ description: "Remove a compartment binding: done.",
78002
+ content: {
78003
+ "application/json": {
78004
+ schema: {
78005
+ type: [
78006
+ "object",
78007
+ "array"
78008
+ ]
78009
+ }
78010
+ }
78011
+ }
78012
+ },
78013
+ "400": {
78014
+ $ref: "#/components/responses/BadRequest"
78015
+ },
78016
+ "401": {
78017
+ $ref: "#/components/responses/Unauthorized"
78018
+ },
78019
+ "403": {
78020
+ $ref: "#/components/responses/Forbidden"
78021
+ },
78022
+ "404": {
78023
+ $ref: "#/components/responses/NotFound"
78024
+ },
78025
+ "429": {
78026
+ $ref: "#/components/responses/RateLimitExceeded"
78027
+ }
78028
+ }
78029
+ }
78030
+ },
78031
+ "/v1/team/members": {
78032
+ get: {
78033
+ operationId: "listTeamMembers",
78034
+ "x-required-scopes": [
78035
+ "team:read"
78036
+ ],
78037
+ "x-audience": "public",
78038
+ summary: "List members",
78039
+ description: "Every member with role and status. Permissions are included when the person holds\n`team`.\n\nScope: `team:read`. Any active member of the workspace.\n",
78040
+ tags: [
78041
+ "Team"
78042
+ ],
78043
+ responses: {
78044
+ "200": {
78045
+ description: "List members.",
78046
+ content: {
78047
+ "application/json": {
78048
+ schema: {
78049
+ type: [
78050
+ "object",
78051
+ "array"
78052
+ ]
78053
+ }
78054
+ }
78055
+ }
78056
+ },
78057
+ "401": {
78058
+ $ref: "#/components/responses/Unauthorized"
78059
+ },
78060
+ "403": {
78061
+ $ref: "#/components/responses/Forbidden"
78062
+ },
78063
+ "429": {
78064
+ $ref: "#/components/responses/RateLimitExceeded"
78065
+ }
78066
+ }
78067
+ }
78068
+ },
78069
+ "/v1/team/pending": {
78070
+ get: {
78071
+ operationId: "listPendingMembers",
78072
+ "x-required-scopes": [
78073
+ "team:read"
78074
+ ],
78075
+ "x-audience": "public",
78076
+ summary: "List pending members",
78077
+ description: "People who asked to join and wait for approval.\n\nScope: `team:read`. The person behind the credential needs the `team` permission (Admins\nby default).\n",
78078
+ tags: [
78079
+ "Team"
78080
+ ],
78081
+ responses: {
78082
+ "200": {
78083
+ description: "List pending members.",
78084
+ content: {
78085
+ "application/json": {
78086
+ schema: {
78087
+ type: [
78088
+ "object",
78089
+ "array"
78090
+ ]
78091
+ }
78092
+ }
78093
+ }
78094
+ },
78095
+ "401": {
78096
+ $ref: "#/components/responses/Unauthorized"
78097
+ },
78098
+ "403": {
78099
+ $ref: "#/components/responses/Forbidden"
78100
+ },
78101
+ "429": {
78102
+ $ref: "#/components/responses/RateLimitExceeded"
78103
+ }
78104
+ }
78105
+ }
78106
+ },
78107
+ "/v1/team/members/{userId}/approve": {
78108
+ post: {
78109
+ operationId: "approveMember",
78110
+ "x-required-scopes": [
78111
+ "team:write"
78112
+ ],
78113
+ "x-audience": "public",
78114
+ summary: "Approve a pending member",
78115
+ description: "Admits a person who asked to join. Nobody changes their own role or permissions, so a\ncredential can never promote the person it acts for; a change may grant only permissions\nthat person holds, and the workspace always keeps a member who holds `team`.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
78116
+ tags: [
78117
+ "Team"
78118
+ ],
78119
+ parameters: [
78120
+ {
78121
+ name: "userId",
78122
+ in: "path",
78123
+ required: true,
78124
+ schema: {
78125
+ type: "string",
78126
+ format: "uuid"
78127
+ }
78128
+ }
78129
+ ],
78130
+ responses: {
78131
+ "200": {
78132
+ description: "Approve a pending member: done.",
78133
+ content: {
78134
+ "application/json": {
78135
+ schema: {
78136
+ type: [
78137
+ "object",
78138
+ "array"
78139
+ ]
78140
+ }
78141
+ }
78142
+ }
78143
+ },
78144
+ "400": {
78145
+ $ref: "#/components/responses/BadRequest"
78146
+ },
78147
+ "401": {
78148
+ $ref: "#/components/responses/Unauthorized"
78149
+ },
78150
+ "403": {
78151
+ $ref: "#/components/responses/Forbidden"
78152
+ },
78153
+ "404": {
78154
+ $ref: "#/components/responses/NotFound"
78155
+ },
78156
+ "429": {
78157
+ $ref: "#/components/responses/RateLimitExceeded"
78158
+ }
78159
+ }
78160
+ }
78161
+ },
78162
+ "/v1/team/members/{userId}/reject": {
78163
+ post: {
78164
+ operationId: "rejectMember",
77324
78165
  "x-required-scopes": [
77325
78166
  "team:write"
77326
78167
  ],
77327
78168
  "x-audience": "public",
77328
- summary: "Remove a compartment binding",
77329
- description: "Takes a source, document type or document out of a compartment.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
78169
+ summary: "Reject a pending member",
78170
+ description: "Declines a request to join.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
77330
78171
  tags: [
77331
- "Records"
78172
+ "Team"
77332
78173
  ],
77333
78174
  parameters: [
77334
78175
  {
77335
- name: "id",
77336
- in: "path",
77337
- required: true,
77338
- schema: {
77339
- type: "string",
77340
- format: "uuid"
77341
- }
77342
- },
77343
- {
77344
- name: "bindingId",
78176
+ name: "userId",
77345
78177
  in: "path",
77346
78178
  required: true,
77347
78179
  schema: {
@@ -77352,7 +78184,7 @@ var openapi_default = {
77352
78184
  ],
77353
78185
  responses: {
77354
78186
  "200": {
77355
- description: "Remove a compartment binding: done.",
78187
+ description: "Reject a pending member: done.",
77356
78188
  content: {
77357
78189
  "application/json": {
77358
78190
  schema: {
@@ -77382,21 +78214,55 @@ var openapi_default = {
77382
78214
  }
77383
78215
  }
77384
78216
  },
77385
- "/v1/team/members": {
77386
- get: {
77387
- operationId: "listTeamMembers",
78217
+ "/v1/team/invite": {
78218
+ post: {
78219
+ operationId: "inviteMember",
77388
78220
  "x-required-scopes": [
77389
- "team:read"
78221
+ "team:write"
77390
78222
  ],
77391
78223
  "x-audience": "public",
77392
- summary: "List members",
77393
- description: "Every member with role and status. Permissions are included when the person holds\n`team`.\n\nScope: `team:read`. Any active member of the workspace.\n",
78224
+ summary: "Invite a member",
78225
+ description: "Invites a person by e-mail with a role. Nobody changes their own role or permissions, so\na credential can never promote the person it acts for; a change may grant only\npermissions that person holds, and the workspace always keeps a member who holds `team`.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
77394
78226
  tags: [
77395
78227
  "Team"
77396
78228
  ],
78229
+ requestBody: {
78230
+ required: true,
78231
+ content: {
78232
+ "application/json": {
78233
+ schema: {
78234
+ type: "object",
78235
+ properties: {
78236
+ email: {
78237
+ type: "string",
78238
+ format: "email"
78239
+ },
78240
+ role: {
78241
+ type: "string",
78242
+ enum: [
78243
+ "owner",
78244
+ "senior_member",
78245
+ "member",
78246
+ "viewer",
78247
+ "none"
78248
+ ]
78249
+ },
78250
+ password: {
78251
+ type: "string",
78252
+ description: "Only for workspaces that sign in with e-mail and password."
78253
+ }
78254
+ },
78255
+ required: [
78256
+ "email",
78257
+ "role"
78258
+ ]
78259
+ }
78260
+ }
78261
+ }
78262
+ },
77397
78263
  responses: {
77398
- "200": {
77399
- description: "List members.",
78264
+ "201": {
78265
+ description: "Invite a member: done.",
77400
78266
  content: {
77401
78267
  "application/json": {
77402
78268
  schema: {
@@ -77408,6 +78274,9 @@ var openapi_default = {
77408
78274
  }
77409
78275
  }
77410
78276
  },
78277
+ "400": {
78278
+ $ref: "#/components/responses/BadRequest"
78279
+ },
77411
78280
  "401": {
77412
78281
  $ref: "#/components/responses/Unauthorized"
77413
78282
  },
@@ -77420,21 +78289,32 @@ var openapi_default = {
77420
78289
  }
77421
78290
  }
77422
78291
  },
77423
- "/v1/team/pending": {
77424
- get: {
77425
- operationId: "listPendingMembers",
78292
+ "/v1/team/invites/{userId}/resend": {
78293
+ post: {
78294
+ operationId: "resendInvite",
77426
78295
  "x-required-scopes": [
77427
- "team:read"
78296
+ "team:write"
77428
78297
  ],
77429
78298
  "x-audience": "public",
77430
- summary: "List pending members",
77431
- description: "People who asked to join and wait for approval.\n\nScope: `team:read`. The person behind the credential needs the `team` permission (Admins\nby default).\n",
78299
+ summary: "Resend an invitation",
78300
+ description: "Sends an invited person a new single-use sign-in link; the earlier link stops working.\nOnly an open invitation can be resent (404 otherwise), and only by someone who holds\nevery permission the invitation grants.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
77432
78301
  tags: [
77433
78302
  "Team"
77434
78303
  ],
78304
+ parameters: [
78305
+ {
78306
+ name: "userId",
78307
+ in: "path",
78308
+ required: true,
78309
+ schema: {
78310
+ type: "string",
78311
+ format: "uuid"
78312
+ }
78313
+ }
78314
+ ],
77435
78315
  responses: {
77436
- "200": {
77437
- description: "List pending members.",
78316
+ "201": {
78317
+ description: "Resend an invitation: done.",
77438
78318
  content: {
77439
78319
  "application/json": {
77440
78320
  schema: {
@@ -77446,27 +78326,33 @@ var openapi_default = {
77446
78326
  }
77447
78327
  }
77448
78328
  },
78329
+ "400": {
78330
+ $ref: "#/components/responses/BadRequest"
78331
+ },
77449
78332
  "401": {
77450
78333
  $ref: "#/components/responses/Unauthorized"
77451
78334
  },
77452
78335
  "403": {
77453
78336
  $ref: "#/components/responses/Forbidden"
77454
78337
  },
78338
+ "404": {
78339
+ $ref: "#/components/responses/NotFound"
78340
+ },
77455
78341
  "429": {
77456
78342
  $ref: "#/components/responses/RateLimitExceeded"
77457
78343
  }
77458
78344
  }
77459
78345
  }
77460
78346
  },
77461
- "/v1/team/members/{userId}/approve": {
77462
- post: {
77463
- operationId: "approveMember",
78347
+ "/v1/team/invites/{userId}": {
78348
+ delete: {
78349
+ operationId: "revokeInvite",
77464
78350
  "x-required-scopes": [
77465
78351
  "team:write"
77466
78352
  ],
77467
78353
  "x-audience": "public",
77468
- summary: "Approve a pending member",
77469
- description: "Admits a person who asked to join. Nobody changes their own role or permissions, so a\ncredential can never promote the person it acts for; a change may grant only permissions\nthat person holds, and the workspace always keeps a member who holds `team`.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
78354
+ summary: "Withdraw an invitation",
78355
+ description: "Withdraws an open invitation: the pending membership ends and the link stops working.\n404 when the person has no open invitation in this workspace.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
77470
78356
  tags: [
77471
78357
  "Team"
77472
78358
  ],
@@ -77483,7 +78369,7 @@ var openapi_default = {
77483
78369
  ],
77484
78370
  responses: {
77485
78371
  "200": {
77486
- description: "Approve a pending member: done.",
78372
+ description: "Withdraw an invitation: done.",
77487
78373
  content: {
77488
78374
  "application/json": {
77489
78375
  schema: {
@@ -77513,70 +78399,63 @@ var openapi_default = {
77513
78399
  }
77514
78400
  }
77515
78401
  },
77516
- "/v1/team/members/{userId}/reject": {
77517
- post: {
77518
- operationId: "rejectMember",
78402
+ "/v1/team/invite-policy": {
78403
+ get: {
78404
+ operationId: "getInvitePolicy",
77519
78405
  "x-required-scopes": [
77520
- "team:write"
78406
+ "team:read"
77521
78407
  ],
77522
78408
  "x-audience": "public",
77523
- summary: "Reject a pending member",
77524
- description: "Declines a request to join.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
78409
+ summary: "Read the invitation policy",
78410
+ description: "Whether team managers may invite addresses outside the workspace's own e-mail domain\n(`external_domains`: `allow` or `block`), and that domain (`email_domain`).\n\nScope: `team:read`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
77525
78411
  tags: [
77526
78412
  "Team"
77527
78413
  ],
77528
- parameters: [
77529
- {
77530
- name: "userId",
77531
- in: "path",
77532
- required: true,
77533
- schema: {
77534
- type: "string",
77535
- format: "uuid"
77536
- }
77537
- }
77538
- ],
77539
78414
  responses: {
77540
78415
  "200": {
77541
- description: "Reject a pending member: done.",
78416
+ description: "The invitation policy.",
77542
78417
  content: {
77543
78418
  "application/json": {
77544
78419
  schema: {
77545
- type: [
77546
- "object",
77547
- "array"
77548
- ]
78420
+ type: "object",
78421
+ properties: {
78422
+ external_domains: {
78423
+ type: "string",
78424
+ enum: [
78425
+ "allow",
78426
+ "block"
78427
+ ]
78428
+ },
78429
+ email_domain: {
78430
+ type: [
78431
+ "string",
78432
+ "null"
78433
+ ]
78434
+ }
78435
+ }
77549
78436
  }
77550
78437
  }
77551
78438
  }
77552
78439
  },
77553
- "400": {
77554
- $ref: "#/components/responses/BadRequest"
77555
- },
77556
78440
  "401": {
77557
78441
  $ref: "#/components/responses/Unauthorized"
77558
78442
  },
77559
78443
  "403": {
77560
78444
  $ref: "#/components/responses/Forbidden"
77561
78445
  },
77562
- "404": {
77563
- $ref: "#/components/responses/NotFound"
77564
- },
77565
78446
  "429": {
77566
78447
  $ref: "#/components/responses/RateLimitExceeded"
77567
78448
  }
77568
78449
  }
77569
- }
77570
- },
77571
- "/v1/team/invite": {
77572
- post: {
77573
- operationId: "inviteMember",
78450
+ },
78451
+ put: {
78452
+ operationId: "setInvitePolicy",
77574
78453
  "x-required-scopes": [
77575
78454
  "team:write"
77576
78455
  ],
77577
78456
  "x-audience": "public",
77578
- summary: "Invite a member",
77579
- description: "Invites a person by e-mail with a role. Nobody changes their own role or permissions, so\na credential can never promote the person it acts for; a change may grant only\npermissions that person holds, and the workspace always keeps a member who holds `team`.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
78457
+ summary: "Change the invitation policy",
78458
+ description: "Sets whether addresses outside the workspace's own e-mail domain may be invited. `block`\nneeds the workspace to have an e-mail domain of its own (400 otherwise).\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
77580
78459
  tags: [
77581
78460
  "Team"
77582
78461
  ],
@@ -77587,43 +78466,43 @@ var openapi_default = {
77587
78466
  schema: {
77588
78467
  type: "object",
77589
78468
  properties: {
77590
- email: {
77591
- type: "string",
77592
- format: "email"
77593
- },
77594
- role: {
78469
+ external_domains: {
77595
78470
  type: "string",
77596
78471
  enum: [
77597
- "owner",
77598
- "senior_member",
77599
- "member",
77600
- "viewer",
77601
- "none"
78472
+ "allow",
78473
+ "block"
77602
78474
  ]
77603
- },
77604
- password: {
77605
- type: "string",
77606
- description: "Only for workspaces that sign in with e-mail and password."
77607
78475
  }
77608
78476
  },
77609
78477
  required: [
77610
- "email",
77611
- "role"
78478
+ "external_domains"
77612
78479
  ]
77613
78480
  }
77614
78481
  }
77615
78482
  }
77616
78483
  },
77617
78484
  responses: {
77618
- "201": {
77619
- description: "Invite a member: done.",
78485
+ "200": {
78486
+ description: "Change the invitation policy: done.",
77620
78487
  content: {
77621
78488
  "application/json": {
77622
78489
  schema: {
77623
- type: [
77624
- "object",
77625
- "array"
77626
- ]
78490
+ type: "object",
78491
+ properties: {
78492
+ external_domains: {
78493
+ type: "string",
78494
+ enum: [
78495
+ "allow",
78496
+ "block"
78497
+ ]
78498
+ },
78499
+ email_domain: {
78500
+ type: [
78501
+ "string",
78502
+ "null"
78503
+ ]
78504
+ }
78505
+ }
77627
78506
  }
77628
78507
  }
77629
78508
  }
@@ -79970,6 +80849,64 @@ var openapi_default = {
79970
80849
  }
79971
80850
  }
79972
80851
  },
80852
+ "/v1/thread/starters": {
80853
+ get: {
80854
+ operationId: "getThreadStarters",
80855
+ "x-audience": "public",
80856
+ "x-required-scopes": [
80857
+ "thread:read"
80858
+ ],
80859
+ summary: "Read conversation starters",
80860
+ description: "What an empty conversation offers to start from, as data: whether you have written yet (`fresh`), up to three company names and three kinds of documents you can see, and whether the workspace keeps reported figures. 404 when the thread is not available to you.\n",
80861
+ tags: [
80862
+ "Thread"
80863
+ ],
80864
+ responses: {
80865
+ "200": {
80866
+ description: "OK",
80867
+ content: {
80868
+ "application/json": {
80869
+ schema: {
80870
+ type: "object",
80871
+ properties: {
80872
+ fresh: {
80873
+ type: "boolean"
80874
+ },
80875
+ companies: {
80876
+ type: "array",
80877
+ items: {
80878
+ type: "string"
80879
+ }
80880
+ },
80881
+ kinds: {
80882
+ type: "array",
80883
+ items: {
80884
+ type: "string"
80885
+ }
80886
+ },
80887
+ reported_figures: {
80888
+ type: "boolean"
80889
+ }
80890
+ }
80891
+ }
80892
+ }
80893
+ }
80894
+ },
80895
+ "401": {
80896
+ $ref: "#/components/responses/Unauthorized"
80897
+ },
80898
+ "403": {
80899
+ $ref: "#/components/responses/Forbidden"
80900
+ },
80901
+ "404": {
80902
+ $ref: "#/components/responses/NotFound"
80903
+ },
80904
+ "429": {
80905
+ $ref: "#/components/responses/RateLimitExceeded"
80906
+ }
80907
+ }
80908
+ }
80909
+ },
79973
80910
  "/v1/thread/events": {
79974
80911
  get: {
79975
80912
  operationId: "listThreadEvents",
@@ -85058,6 +85995,31 @@ var openapi_default = {
85058
85995
  }
85059
85996
  },
85060
85997
  schemas: {
85998
+ DocumentParty: {
85999
+ type: "object",
86000
+ required: [
86001
+ "id"
86002
+ ],
86003
+ description: "One party of a document: a typed identifier and, optionally, its role. An address also stands for its domain unless it is a public mail provider's.",
86004
+ properties: {
86005
+ id: {
86006
+ type: "string",
86007
+ maxLength: 320,
86008
+ description: "`email:jane@acme.com`, `domain:acme.com`, `phone:+4930123456`, `handle:<scope>:<id>` or `entity:<id>` (a bare address reads as `email:`).",
86009
+ example: "email:jane@acme.com"
86010
+ },
86011
+ role: {
86012
+ type: "string",
86013
+ enum: [
86014
+ "from",
86015
+ "to",
86016
+ "cc",
86017
+ "attendee",
86018
+ "author"
86019
+ ]
86020
+ }
86021
+ }
86022
+ },
85061
86023
  Account: {
85062
86024
  type: "object",
85063
86025
  required: [