@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/seo.js CHANGED
@@ -115,6 +115,10 @@ var generated_nav_default = {
115
115
  id: "ref-contract-check",
116
116
  label: "Contract Check"
117
117
  },
118
+ {
119
+ id: "ref-collections",
120
+ label: "Collections"
121
+ },
118
122
  {
119
123
  id: "ref-catalog",
120
124
  label: "Catalog"
@@ -127,6 +131,10 @@ var generated_nav_default = {
127
131
  id: "ref-team",
128
132
  label: "Team"
129
133
  },
134
+ {
135
+ id: "ref-thread",
136
+ label: "Thread"
137
+ },
130
138
  {
131
139
  id: "ref-access-and-sharing",
132
140
  label: "Access & sharing"
@@ -2105,6 +2113,18 @@ var openapi_default = {
2105
2113
  ],
2106
2114
  default: "extract",
2107
2115
  description: "`extract`: text only, for a following `POST /v1/extract`. `ingest`: full processing into workspace data."
2116
+ },
2117
+ parties: {
2118
+ type: "array",
2119
+ maxItems: 500,
2120
+ 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.",
2121
+ items: {
2122
+ $ref: "#/components/schemas/DocumentParty"
2123
+ }
2124
+ },
2125
+ parties_complete: {
2126
+ type: "boolean",
2127
+ description: "`parties` names every party of the document."
2108
2128
  }
2109
2129
  }
2110
2130
  }
@@ -66154,89 +66174,15 @@ var openapi_default = {
66154
66174
  }
66155
66175
  }
66156
66176
  },
66157
- "/v1/documents/batch-metadata/import": {
66158
- post: {
66159
- operationId: "importDocumentBatchMetadata",
66160
- "x-audience": "public",
66161
- tags: [
66162
- "Documents"
66163
- ],
66164
- summary: "Import source batch ids from a CSV",
66165
- 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`.",
66166
- security: [
66167
- {
66168
- BearerAuth: []
66169
- }
66170
- ],
66171
- "x-required-scopes": [
66172
- "documents:write"
66173
- ],
66174
- requestBody: {
66175
- required: true,
66176
- content: {
66177
- "multipart/form-data": {
66178
- schema: {
66179
- type: "object",
66180
- properties: {
66181
- file: {
66182
- type: "string",
66183
- format: "binary",
66184
- description: "CSV with a header row."
66185
- }
66186
- },
66187
- required: [
66188
- "file"
66189
- ]
66190
- }
66191
- }
66192
- }
66193
- },
66194
- responses: {
66195
- "201": {
66196
- description: "OK",
66197
- content: {
66198
- "application/json": {
66199
- schema: {
66200
- type: "object",
66201
- properties: {
66202
- updated: {
66203
- type: "integer"
66204
- },
66205
- not_found: {
66206
- type: "array",
66207
- items: {
66208
- type: "string"
66209
- }
66210
- }
66211
- }
66212
- }
66213
- }
66214
- }
66215
- },
66216
- "400": {
66217
- $ref: "#/components/responses/BadRequest"
66218
- },
66219
- "401": {
66220
- $ref: "#/components/responses/Unauthorized"
66221
- },
66222
- "403": {
66223
- $ref: "#/components/responses/Forbidden"
66224
- },
66225
- "429": {
66226
- $ref: "#/components/responses/RateLimitExceeded"
66227
- }
66228
- }
66229
- }
66230
- },
66231
- "/v1/documents/display-name-rule": {
66177
+ "/v1/documents/{id}/collections": {
66232
66178
  get: {
66233
- operationId: "getDisplayNameRule",
66179
+ operationId: "explainDocumentCollections",
66234
66180
  "x-audience": "public",
66235
66181
  tags: [
66236
- "Documents"
66182
+ "Collections"
66237
66183
  ],
66238
- summary: "Get the readable-name rule",
66239
- 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.",
66184
+ summary: "Explain a document's collections",
66185
+ 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.",
66240
66186
  security: [
66241
66187
  {
66242
66188
  BearerAuth: []
@@ -66245,72 +66191,17 @@ var openapi_default = {
66245
66191
  "x-required-scopes": [
66246
66192
  "read"
66247
66193
  ],
66248
- responses: {
66249
- "200": {
66250
- description: "OK",
66251
- content: {
66252
- "application/json": {
66253
- schema: {
66254
- type: "object",
66255
- additionalProperties: true
66256
- }
66257
- }
66258
- }
66259
- },
66260
- "401": {
66261
- $ref: "#/components/responses/Unauthorized"
66262
- },
66263
- "403": {
66264
- $ref: "#/components/responses/Forbidden"
66265
- },
66266
- "429": {
66267
- $ref: "#/components/responses/RateLimitExceeded"
66268
- }
66269
- }
66270
- },
66271
- patch: {
66272
- operationId: "setDisplayNameRule",
66273
- "x-audience": "public",
66274
- tags: [
66275
- "Documents"
66276
- ],
66277
- summary: "Set the readable-name rule",
66278
- 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.",
66279
- security: [
66194
+ parameters: [
66280
66195
  {
66281
- BearerAuth: []
66282
- }
66283
- ],
66284
- "x-required-scopes": [
66285
- "documents:write"
66286
- ],
66287
- requestBody: {
66288
- required: true,
66289
- content: {
66290
- "application/json": {
66291
- schema: {
66292
- type: "object",
66293
- properties: {
66294
- mode: {
66295
- type: "string",
66296
- enum: [
66297
- "off",
66298
- "default",
66299
- "lua"
66300
- ]
66301
- },
66302
- script: {
66303
- type: "string",
66304
- maxLength: 2e4
66305
- }
66306
- },
66307
- required: [
66308
- "mode"
66309
- ]
66310
- }
66196
+ name: "id",
66197
+ in: "path",
66198
+ required: true,
66199
+ schema: {
66200
+ type: "string",
66201
+ format: "uuid"
66311
66202
  }
66312
66203
  }
66313
- },
66204
+ ],
66314
66205
  responses: {
66315
66206
  "200": {
66316
66207
  description: "OK",
@@ -66332,21 +66223,24 @@ var openapi_default = {
66332
66223
  "403": {
66333
66224
  $ref: "#/components/responses/Forbidden"
66334
66225
  },
66226
+ "404": {
66227
+ $ref: "#/components/responses/NotFound"
66228
+ },
66335
66229
  "429": {
66336
66230
  $ref: "#/components/responses/RateLimitExceeded"
66337
66231
  }
66338
66232
  }
66339
66233
  }
66340
66234
  },
66341
- "/v1/documents/display-name-rule/preview": {
66342
- post: {
66343
- operationId: "previewDisplayNameRule",
66235
+ "/v1/documents/{id}/traits": {
66236
+ patch: {
66237
+ operationId: "setDocumentLabels",
66344
66238
  "x-audience": "public",
66345
66239
  tags: [
66346
- "Documents"
66240
+ "Collections"
66347
66241
  ],
66348
- summary: "Try a readable-name script",
66349
- 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.",
66242
+ summary: "Change a document's labels by hand",
66243
+ 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.",
66350
66244
  security: [
66351
66245
  {
66352
66246
  BearerAuth: []
@@ -66355,74 +66249,17 @@ var openapi_default = {
66355
66249
  "x-required-scopes": [
66356
66250
  "documents:write"
66357
66251
  ],
66358
- requestBody: {
66359
- required: true,
66360
- content: {
66361
- "application/json": {
66362
- schema: {
66363
- type: "object",
66364
- properties: {
66365
- lua_script: {
66366
- type: "string",
66367
- maxLength: 2e4
66368
- },
66369
- sample_size: {
66370
- type: "integer",
66371
- minimum: 1,
66372
- maximum: 200
66373
- }
66374
- },
66375
- required: [
66376
- "lua_script"
66377
- ]
66378
- }
66379
- }
66380
- }
66381
- },
66382
- responses: {
66383
- "200": {
66384
- description: "OK",
66385
- content: {
66386
- "application/json": {
66387
- schema: {
66388
- type: "object",
66389
- additionalProperties: true
66390
- }
66391
- }
66392
- }
66393
- },
66394
- "400": {
66395
- $ref: "#/components/responses/BadRequest"
66396
- },
66397
- "401": {
66398
- $ref: "#/components/responses/Unauthorized"
66399
- },
66400
- "403": {
66401
- $ref: "#/components/responses/Forbidden"
66402
- },
66403
- "429": {
66404
- $ref: "#/components/responses/RateLimitExceeded"
66405
- }
66406
- }
66407
- }
66408
- },
66409
- "/v1/documents/display-name-rule/generate-script": {
66410
- post: {
66411
- operationId: "generateDisplayNameScript",
66412
- "x-audience": "public",
66413
- tags: [
66414
- "Documents"
66415
- ],
66416
- summary: "Draft a readable-name script from an instruction",
66417
- 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.",
66418
- security: [
66252
+ parameters: [
66419
66253
  {
66420
- BearerAuth: []
66254
+ name: "id",
66255
+ in: "path",
66256
+ required: true,
66257
+ schema: {
66258
+ type: "string",
66259
+ format: "uuid"
66260
+ }
66421
66261
  }
66422
66262
  ],
66423
- "x-required-scopes": [
66424
- "documents:write"
66425
- ],
66426
66263
  requestBody: {
66427
66264
  required: true,
66428
66265
  content: {
@@ -66430,19 +66267,512 @@ var openapi_default = {
66430
66267
  schema: {
66431
66268
  type: "object",
66432
66269
  properties: {
66433
- instruction: {
66434
- type: "string",
66435
- maxLength: 2e3
66270
+ add: {
66271
+ type: "array",
66272
+ maxItems: 50,
66273
+ items: {
66274
+ type: "string",
66275
+ maxLength: 200
66276
+ }
66436
66277
  },
66437
- sample_size: {
66438
- type: "integer",
66439
- minimum: 1,
66440
- maximum: 200
66278
+ remove: {
66279
+ type: "array",
66280
+ maxItems: 50,
66281
+ items: {
66282
+ type: "string",
66283
+ maxLength: 200
66284
+ }
66441
66285
  }
66442
- },
66443
- required: [
66444
- "instruction"
66445
- ]
66286
+ }
66287
+ }
66288
+ }
66289
+ }
66290
+ },
66291
+ responses: {
66292
+ "200": {
66293
+ description: "OK",
66294
+ content: {
66295
+ "application/json": {
66296
+ schema: {
66297
+ type: "object",
66298
+ additionalProperties: true
66299
+ }
66300
+ }
66301
+ }
66302
+ },
66303
+ "400": {
66304
+ $ref: "#/components/responses/BadRequest"
66305
+ },
66306
+ "401": {
66307
+ $ref: "#/components/responses/Unauthorized"
66308
+ },
66309
+ "403": {
66310
+ $ref: "#/components/responses/Forbidden"
66311
+ },
66312
+ "404": {
66313
+ $ref: "#/components/responses/NotFound"
66314
+ },
66315
+ "429": {
66316
+ $ref: "#/components/responses/RateLimitExceeded"
66317
+ }
66318
+ }
66319
+ }
66320
+ },
66321
+ "/v1/documents/{id}/move": {
66322
+ post: {
66323
+ operationId: "moveDocumentBetweenCollections",
66324
+ "x-audience": "public",
66325
+ tags: [
66326
+ "Collections"
66327
+ ],
66328
+ summary: "Move a document between collections",
66329
+ 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.",
66330
+ security: [
66331
+ {
66332
+ BearerAuth: []
66333
+ }
66334
+ ],
66335
+ "x-required-scopes": [
66336
+ "documents:write"
66337
+ ],
66338
+ parameters: [
66339
+ {
66340
+ name: "id",
66341
+ in: "path",
66342
+ required: true,
66343
+ schema: {
66344
+ type: "string",
66345
+ format: "uuid"
66346
+ }
66347
+ }
66348
+ ],
66349
+ requestBody: {
66350
+ required: true,
66351
+ content: {
66352
+ "application/json": {
66353
+ schema: {
66354
+ type: "object",
66355
+ properties: {
66356
+ from: {
66357
+ type: "string",
66358
+ format: "uuid",
66359
+ nullable: true
66360
+ },
66361
+ to: {
66362
+ type: "string",
66363
+ format: "uuid",
66364
+ nullable: true
66365
+ }
66366
+ }
66367
+ }
66368
+ }
66369
+ }
66370
+ },
66371
+ responses: {
66372
+ "200": {
66373
+ description: "OK",
66374
+ content: {
66375
+ "application/json": {
66376
+ schema: {
66377
+ type: "object",
66378
+ additionalProperties: true
66379
+ }
66380
+ }
66381
+ }
66382
+ },
66383
+ "400": {
66384
+ $ref: "#/components/responses/BadRequest"
66385
+ },
66386
+ "401": {
66387
+ $ref: "#/components/responses/Unauthorized"
66388
+ },
66389
+ "403": {
66390
+ $ref: "#/components/responses/Forbidden"
66391
+ },
66392
+ "404": {
66393
+ $ref: "#/components/responses/NotFound"
66394
+ },
66395
+ "409": {
66396
+ $ref: "#/components/responses/Conflict"
66397
+ },
66398
+ "429": {
66399
+ $ref: "#/components/responses/RateLimitExceeded"
66400
+ }
66401
+ }
66402
+ }
66403
+ },
66404
+ "/v1/documents/{id}/parties": {
66405
+ put: {
66406
+ operationId: "setDocumentParties",
66407
+ "x-audience": "public",
66408
+ tags: [
66409
+ "Collections"
66410
+ ],
66411
+ summary: "Set a document's parties",
66412
+ 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.",
66413
+ security: [
66414
+ {
66415
+ BearerAuth: []
66416
+ }
66417
+ ],
66418
+ "x-required-scopes": [
66419
+ "documents:write"
66420
+ ],
66421
+ parameters: [
66422
+ {
66423
+ name: "id",
66424
+ in: "path",
66425
+ required: true,
66426
+ schema: {
66427
+ type: "string",
66428
+ format: "uuid"
66429
+ }
66430
+ }
66431
+ ],
66432
+ requestBody: {
66433
+ required: true,
66434
+ content: {
66435
+ "application/json": {
66436
+ schema: {
66437
+ type: "object",
66438
+ required: [
66439
+ "parties"
66440
+ ],
66441
+ properties: {
66442
+ parties: {
66443
+ type: "array",
66444
+ maxItems: 500,
66445
+ items: {
66446
+ $ref: "#/components/schemas/DocumentParty"
66447
+ }
66448
+ },
66449
+ complete: {
66450
+ type: "boolean"
66451
+ }
66452
+ }
66453
+ }
66454
+ }
66455
+ }
66456
+ },
66457
+ responses: {
66458
+ "200": {
66459
+ description: "OK",
66460
+ content: {
66461
+ "application/json": {
66462
+ schema: {
66463
+ type: "object",
66464
+ additionalProperties: true
66465
+ }
66466
+ }
66467
+ }
66468
+ },
66469
+ "400": {
66470
+ $ref: "#/components/responses/BadRequest"
66471
+ },
66472
+ "401": {
66473
+ $ref: "#/components/responses/Unauthorized"
66474
+ },
66475
+ "403": {
66476
+ $ref: "#/components/responses/Forbidden"
66477
+ },
66478
+ "404": {
66479
+ $ref: "#/components/responses/NotFound"
66480
+ },
66481
+ "429": {
66482
+ $ref: "#/components/responses/RateLimitExceeded"
66483
+ }
66484
+ }
66485
+ }
66486
+ },
66487
+ "/v1/documents/batch-metadata/import": {
66488
+ post: {
66489
+ operationId: "importDocumentBatchMetadata",
66490
+ "x-audience": "public",
66491
+ tags: [
66492
+ "Documents"
66493
+ ],
66494
+ summary: "Import source batch ids from a CSV",
66495
+ 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`.",
66496
+ security: [
66497
+ {
66498
+ BearerAuth: []
66499
+ }
66500
+ ],
66501
+ "x-required-scopes": [
66502
+ "documents:write"
66503
+ ],
66504
+ requestBody: {
66505
+ required: true,
66506
+ content: {
66507
+ "multipart/form-data": {
66508
+ schema: {
66509
+ type: "object",
66510
+ properties: {
66511
+ file: {
66512
+ type: "string",
66513
+ format: "binary",
66514
+ description: "CSV with a header row."
66515
+ }
66516
+ },
66517
+ required: [
66518
+ "file"
66519
+ ]
66520
+ }
66521
+ }
66522
+ }
66523
+ },
66524
+ responses: {
66525
+ "201": {
66526
+ description: "OK",
66527
+ content: {
66528
+ "application/json": {
66529
+ schema: {
66530
+ type: "object",
66531
+ properties: {
66532
+ updated: {
66533
+ type: "integer"
66534
+ },
66535
+ not_found: {
66536
+ type: "array",
66537
+ items: {
66538
+ type: "string"
66539
+ }
66540
+ }
66541
+ }
66542
+ }
66543
+ }
66544
+ }
66545
+ },
66546
+ "400": {
66547
+ $ref: "#/components/responses/BadRequest"
66548
+ },
66549
+ "401": {
66550
+ $ref: "#/components/responses/Unauthorized"
66551
+ },
66552
+ "403": {
66553
+ $ref: "#/components/responses/Forbidden"
66554
+ },
66555
+ "429": {
66556
+ $ref: "#/components/responses/RateLimitExceeded"
66557
+ }
66558
+ }
66559
+ }
66560
+ },
66561
+ "/v1/documents/display-name-rule": {
66562
+ get: {
66563
+ operationId: "getDisplayNameRule",
66564
+ "x-audience": "public",
66565
+ tags: [
66566
+ "Documents"
66567
+ ],
66568
+ summary: "Get the readable-name rule",
66569
+ 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.",
66570
+ security: [
66571
+ {
66572
+ BearerAuth: []
66573
+ }
66574
+ ],
66575
+ "x-required-scopes": [
66576
+ "read"
66577
+ ],
66578
+ responses: {
66579
+ "200": {
66580
+ description: "OK",
66581
+ content: {
66582
+ "application/json": {
66583
+ schema: {
66584
+ type: "object",
66585
+ additionalProperties: true
66586
+ }
66587
+ }
66588
+ }
66589
+ },
66590
+ "401": {
66591
+ $ref: "#/components/responses/Unauthorized"
66592
+ },
66593
+ "403": {
66594
+ $ref: "#/components/responses/Forbidden"
66595
+ },
66596
+ "429": {
66597
+ $ref: "#/components/responses/RateLimitExceeded"
66598
+ }
66599
+ }
66600
+ },
66601
+ patch: {
66602
+ operationId: "setDisplayNameRule",
66603
+ "x-audience": "public",
66604
+ tags: [
66605
+ "Documents"
66606
+ ],
66607
+ summary: "Set the readable-name rule",
66608
+ 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.",
66609
+ security: [
66610
+ {
66611
+ BearerAuth: []
66612
+ }
66613
+ ],
66614
+ "x-required-scopes": [
66615
+ "documents:write"
66616
+ ],
66617
+ requestBody: {
66618
+ required: true,
66619
+ content: {
66620
+ "application/json": {
66621
+ schema: {
66622
+ type: "object",
66623
+ properties: {
66624
+ mode: {
66625
+ type: "string",
66626
+ enum: [
66627
+ "off",
66628
+ "default",
66629
+ "lua"
66630
+ ]
66631
+ },
66632
+ script: {
66633
+ type: "string",
66634
+ maxLength: 2e4
66635
+ }
66636
+ },
66637
+ required: [
66638
+ "mode"
66639
+ ]
66640
+ }
66641
+ }
66642
+ }
66643
+ },
66644
+ responses: {
66645
+ "200": {
66646
+ description: "OK",
66647
+ content: {
66648
+ "application/json": {
66649
+ schema: {
66650
+ type: "object",
66651
+ additionalProperties: true
66652
+ }
66653
+ }
66654
+ }
66655
+ },
66656
+ "400": {
66657
+ $ref: "#/components/responses/BadRequest"
66658
+ },
66659
+ "401": {
66660
+ $ref: "#/components/responses/Unauthorized"
66661
+ },
66662
+ "403": {
66663
+ $ref: "#/components/responses/Forbidden"
66664
+ },
66665
+ "429": {
66666
+ $ref: "#/components/responses/RateLimitExceeded"
66667
+ }
66668
+ }
66669
+ }
66670
+ },
66671
+ "/v1/documents/display-name-rule/preview": {
66672
+ post: {
66673
+ operationId: "previewDisplayNameRule",
66674
+ "x-audience": "public",
66675
+ tags: [
66676
+ "Documents"
66677
+ ],
66678
+ summary: "Try a readable-name script",
66679
+ 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.",
66680
+ security: [
66681
+ {
66682
+ BearerAuth: []
66683
+ }
66684
+ ],
66685
+ "x-required-scopes": [
66686
+ "documents:write"
66687
+ ],
66688
+ requestBody: {
66689
+ required: true,
66690
+ content: {
66691
+ "application/json": {
66692
+ schema: {
66693
+ type: "object",
66694
+ properties: {
66695
+ lua_script: {
66696
+ type: "string",
66697
+ maxLength: 2e4
66698
+ },
66699
+ sample_size: {
66700
+ type: "integer",
66701
+ minimum: 1,
66702
+ maximum: 200
66703
+ }
66704
+ },
66705
+ required: [
66706
+ "lua_script"
66707
+ ]
66708
+ }
66709
+ }
66710
+ }
66711
+ },
66712
+ responses: {
66713
+ "200": {
66714
+ description: "OK",
66715
+ content: {
66716
+ "application/json": {
66717
+ schema: {
66718
+ type: "object",
66719
+ additionalProperties: true
66720
+ }
66721
+ }
66722
+ }
66723
+ },
66724
+ "400": {
66725
+ $ref: "#/components/responses/BadRequest"
66726
+ },
66727
+ "401": {
66728
+ $ref: "#/components/responses/Unauthorized"
66729
+ },
66730
+ "403": {
66731
+ $ref: "#/components/responses/Forbidden"
66732
+ },
66733
+ "429": {
66734
+ $ref: "#/components/responses/RateLimitExceeded"
66735
+ }
66736
+ }
66737
+ }
66738
+ },
66739
+ "/v1/documents/display-name-rule/generate-script": {
66740
+ post: {
66741
+ operationId: "generateDisplayNameScript",
66742
+ "x-audience": "public",
66743
+ tags: [
66744
+ "Documents"
66745
+ ],
66746
+ summary: "Draft a readable-name script from an instruction",
66747
+ 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.",
66748
+ security: [
66749
+ {
66750
+ BearerAuth: []
66751
+ }
66752
+ ],
66753
+ "x-required-scopes": [
66754
+ "documents:write"
66755
+ ],
66756
+ requestBody: {
66757
+ required: true,
66758
+ content: {
66759
+ "application/json": {
66760
+ schema: {
66761
+ type: "object",
66762
+ properties: {
66763
+ instruction: {
66764
+ type: "string",
66765
+ maxLength: 2e3
66766
+ },
66767
+ sample_size: {
66768
+ type: "integer",
66769
+ minimum: 1,
66770
+ maximum: 200
66771
+ }
66772
+ },
66773
+ required: [
66774
+ "instruction"
66775
+ ]
66446
66776
  }
66447
66777
  }
66448
66778
  }
@@ -66696,15 +67026,293 @@ var openapi_default = {
66696
67026
  }
66697
67027
  }
66698
67028
  },
66699
- "/v1/collections/mine": {
67029
+ "/v1/collections/mine": {
67030
+ get: {
67031
+ operationId: "listMyCollections",
67032
+ "x-audience": "public",
67033
+ tags: [
67034
+ "Collections"
67035
+ ],
67036
+ summary: "List the collections assigned to me",
67037
+ 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.",
67038
+ security: [
67039
+ {
67040
+ BearerAuth: []
67041
+ }
67042
+ ],
67043
+ "x-required-scopes": [
67044
+ "read"
67045
+ ],
67046
+ responses: {
67047
+ "200": {
67048
+ description: "OK",
67049
+ content: {
67050
+ "application/json": {
67051
+ schema: {
67052
+ type: "object",
67053
+ properties: {
67054
+ collections: {
67055
+ type: "array",
67056
+ items: {
67057
+ type: "object",
67058
+ additionalProperties: true
67059
+ }
67060
+ },
67061
+ restricted: {
67062
+ type: "boolean"
67063
+ }
67064
+ }
67065
+ }
67066
+ }
67067
+ }
67068
+ },
67069
+ "401": {
67070
+ $ref: "#/components/responses/Unauthorized"
67071
+ },
67072
+ "403": {
67073
+ $ref: "#/components/responses/Forbidden"
67074
+ },
67075
+ "429": {
67076
+ $ref: "#/components/responses/RateLimitExceeded"
67077
+ }
67078
+ }
67079
+ }
67080
+ },
67081
+ "/v1/collections/counts": {
67082
+ get: {
67083
+ operationId: "getCollectionCounts",
67084
+ "x-audience": "public",
67085
+ tags: [
67086
+ "Collections"
67087
+ ],
67088
+ summary: "Count documents per collection",
67089
+ description: "Visible-document counts per collection. Requires the `read` scope (or `documents:read`). Any member of the workspace may call it.",
67090
+ security: [
67091
+ {
67092
+ BearerAuth: []
67093
+ }
67094
+ ],
67095
+ "x-required-scopes": [
67096
+ "read"
67097
+ ],
67098
+ responses: {
67099
+ "200": {
67100
+ description: "OK",
67101
+ content: {
67102
+ "application/json": {
67103
+ schema: {
67104
+ type: "object",
67105
+ properties: {
67106
+ collections: {
67107
+ type: "array",
67108
+ items: {
67109
+ type: "object",
67110
+ additionalProperties: true
67111
+ }
67112
+ }
67113
+ }
67114
+ }
67115
+ }
67116
+ }
67117
+ },
67118
+ "401": {
67119
+ $ref: "#/components/responses/Unauthorized"
67120
+ },
67121
+ "403": {
67122
+ $ref: "#/components/responses/Forbidden"
67123
+ },
67124
+ "429": {
67125
+ $ref: "#/components/responses/RateLimitExceeded"
67126
+ }
67127
+ }
67128
+ }
67129
+ },
67130
+ "/v1/collections/config": {
67131
+ get: {
67132
+ operationId: "getCollectionsConfig",
67133
+ "x-audience": "public",
67134
+ tags: [
67135
+ "Collections"
67136
+ ],
67137
+ summary: "Get the collections configuration",
67138
+ 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.",
67139
+ security: [
67140
+ {
67141
+ BearerAuth: []
67142
+ }
67143
+ ],
67144
+ "x-required-scopes": [
67145
+ "read"
67146
+ ],
67147
+ responses: {
67148
+ "200": {
67149
+ description: "OK",
67150
+ content: {
67151
+ "application/json": {
67152
+ schema: {
67153
+ type: "object",
67154
+ additionalProperties: true
67155
+ }
67156
+ }
67157
+ }
67158
+ },
67159
+ "400": {
67160
+ $ref: "#/components/responses/BadRequest"
67161
+ },
67162
+ "401": {
67163
+ $ref: "#/components/responses/Unauthorized"
67164
+ },
67165
+ "403": {
67166
+ $ref: "#/components/responses/Forbidden"
67167
+ },
67168
+ "429": {
67169
+ $ref: "#/components/responses/RateLimitExceeded"
67170
+ }
67171
+ }
67172
+ },
67173
+ put: {
67174
+ operationId: "applyCollectionsConfig",
67175
+ "x-audience": "public",
67176
+ tags: [
67177
+ "Collections"
67178
+ ],
67179
+ summary: "Apply a collections configuration",
67180
+ 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.",
67181
+ security: [
67182
+ {
67183
+ BearerAuth: []
67184
+ }
67185
+ ],
67186
+ "x-required-scopes": [
67187
+ "documents:write"
67188
+ ],
67189
+ parameters: [
67190
+ {
67191
+ name: "dry_run",
67192
+ in: "query",
67193
+ required: false,
67194
+ schema: {
67195
+ type: "boolean",
67196
+ default: false
67197
+ },
67198
+ description: "Check and preview the change; nothing is saved."
67199
+ },
67200
+ {
67201
+ name: "prune",
67202
+ in: "query",
67203
+ required: false,
67204
+ schema: {
67205
+ type: "boolean",
67206
+ default: false
67207
+ },
67208
+ description: "Remove keyed collections the document does not name."
67209
+ }
67210
+ ],
67211
+ requestBody: {
67212
+ required: true,
67213
+ content: {
67214
+ "application/json": {
67215
+ schema: {
67216
+ type: "object",
67217
+ properties: {
67218
+ document: {
67219
+ type: "object",
67220
+ additionalProperties: true,
67221
+ description: "The configuration document."
67222
+ },
67223
+ yaml: {
67224
+ type: "string",
67225
+ maxLength: 1e6,
67226
+ description: "The configuration document as YAML or JSON text."
67227
+ }
67228
+ }
67229
+ }
67230
+ }
67231
+ }
67232
+ },
67233
+ responses: {
67234
+ "200": {
67235
+ description: "OK",
67236
+ content: {
67237
+ "application/json": {
67238
+ schema: {
67239
+ type: "object",
67240
+ additionalProperties: true
67241
+ }
67242
+ }
67243
+ }
67244
+ },
67245
+ "400": {
67246
+ $ref: "#/components/responses/BadRequest"
67247
+ },
67248
+ "401": {
67249
+ $ref: "#/components/responses/Unauthorized"
67250
+ },
67251
+ "403": {
67252
+ $ref: "#/components/responses/Forbidden"
67253
+ },
67254
+ "409": {
67255
+ $ref: "#/components/responses/Conflict"
67256
+ },
67257
+ "429": {
67258
+ $ref: "#/components/responses/RateLimitExceeded"
67259
+ }
67260
+ }
67261
+ }
67262
+ },
67263
+ "/v1/collections/proposal": {
67264
+ post: {
67265
+ operationId: "proposeCollectionsConfig",
67266
+ "x-audience": "public",
67267
+ tags: [
67268
+ "Collections"
67269
+ ],
67270
+ summary: "Propose a collections configuration",
67271
+ 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.",
67272
+ security: [
67273
+ {
67274
+ BearerAuth: []
67275
+ }
67276
+ ],
67277
+ "x-required-scopes": [
67278
+ "read"
67279
+ ],
67280
+ responses: {
67281
+ "200": {
67282
+ description: "OK",
67283
+ content: {
67284
+ "application/json": {
67285
+ schema: {
67286
+ type: "object",
67287
+ additionalProperties: true
67288
+ }
67289
+ }
67290
+ }
67291
+ },
67292
+ "400": {
67293
+ $ref: "#/components/responses/BadRequest"
67294
+ },
67295
+ "401": {
67296
+ $ref: "#/components/responses/Unauthorized"
67297
+ },
67298
+ "403": {
67299
+ $ref: "#/components/responses/Forbidden"
67300
+ },
67301
+ "429": {
67302
+ $ref: "#/components/responses/RateLimitExceeded"
67303
+ }
67304
+ }
67305
+ }
67306
+ },
67307
+ "/v1/collections/directory": {
66700
67308
  get: {
66701
- operationId: "listMyCollections",
67309
+ operationId: "listCollectionsDirectory",
66702
67310
  "x-audience": "public",
66703
67311
  tags: [
66704
67312
  "Collections"
66705
67313
  ],
66706
- summary: "List the collections assigned to me",
66707
- 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.",
67314
+ summary: "List the relationship directory",
67315
+ 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.",
66708
67316
  security: [
66709
67317
  {
66710
67318
  BearerAuth: []
@@ -66720,22 +67328,14 @@ var openapi_default = {
66720
67328
  "application/json": {
66721
67329
  schema: {
66722
67330
  type: "object",
66723
- properties: {
66724
- collections: {
66725
- type: "array",
66726
- items: {
66727
- type: "object",
66728
- additionalProperties: true
66729
- }
66730
- },
66731
- restricted: {
66732
- type: "boolean"
66733
- }
66734
- }
67331
+ additionalProperties: true
66735
67332
  }
66736
67333
  }
66737
67334
  }
66738
67335
  },
67336
+ "400": {
67337
+ $ref: "#/components/responses/BadRequest"
67338
+ },
66739
67339
  "401": {
66740
67340
  $ref: "#/components/responses/Unauthorized"
66741
67341
  },
@@ -66746,25 +67346,68 @@ var openapi_default = {
66746
67346
  $ref: "#/components/responses/RateLimitExceeded"
66747
67347
  }
66748
67348
  }
66749
- }
66750
- },
66751
- "/v1/collections/counts": {
66752
- get: {
66753
- operationId: "getCollectionCounts",
67349
+ },
67350
+ put: {
67351
+ operationId: "saveCollectionsDirectory",
66754
67352
  "x-audience": "public",
66755
67353
  tags: [
66756
67354
  "Collections"
66757
67355
  ],
66758
- summary: "Count documents per collection",
66759
- description: "Visible-document counts per collection. Requires the `read` scope (or `documents:read`). Any member of the workspace may call it.",
67356
+ summary: "Correct the relationship directory",
67357
+ 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.",
66760
67358
  security: [
66761
67359
  {
66762
67360
  BearerAuth: []
66763
67361
  }
66764
67362
  ],
66765
67363
  "x-required-scopes": [
66766
- "read"
67364
+ "documents:write"
66767
67365
  ],
67366
+ requestBody: {
67367
+ required: true,
67368
+ content: {
67369
+ "application/json": {
67370
+ schema: {
67371
+ type: "object",
67372
+ properties: {
67373
+ entries: {
67374
+ type: "array",
67375
+ maxItems: 200,
67376
+ items: {
67377
+ type: "object",
67378
+ required: [
67379
+ "match_value",
67380
+ "relationship"
67381
+ ],
67382
+ properties: {
67383
+ match_value: {
67384
+ type: "string",
67385
+ description: "A typed identifier: `domain:acme.com`, `email:jane@acme.com`, `phone:\u2026`, `handle:\u2026` or `entity:\u2026`."
67386
+ },
67387
+ relationship: {
67388
+ type: "string",
67389
+ description: "A relationship kind of the workspace (its slug), or `own` / `other`."
67390
+ }
67391
+ }
67392
+ }
67393
+ },
67394
+ remove: {
67395
+ type: "array",
67396
+ maxItems: 200,
67397
+ items: {
67398
+ type: "string",
67399
+ format: "uuid"
67400
+ }
67401
+ },
67402
+ wait: {
67403
+ type: "boolean",
67404
+ description: "Wait up to 60 seconds for the documents to be relabelled."
67405
+ }
67406
+ }
67407
+ }
67408
+ }
67409
+ }
67410
+ },
66768
67411
  responses: {
66769
67412
  "200": {
66770
67413
  description: "OK",
@@ -66772,25 +67415,23 @@ var openapi_default = {
66772
67415
  "application/json": {
66773
67416
  schema: {
66774
67417
  type: "object",
66775
- properties: {
66776
- collections: {
66777
- type: "array",
66778
- items: {
66779
- type: "object",
66780
- additionalProperties: true
66781
- }
66782
- }
66783
- }
67418
+ additionalProperties: true
66784
67419
  }
66785
67420
  }
66786
67421
  }
66787
67422
  },
67423
+ "400": {
67424
+ $ref: "#/components/responses/BadRequest"
67425
+ },
66788
67426
  "401": {
66789
67427
  $ref: "#/components/responses/Unauthorized"
66790
67428
  },
66791
67429
  "403": {
66792
67430
  $ref: "#/components/responses/Forbidden"
66793
67431
  },
67432
+ "404": {
67433
+ $ref: "#/components/responses/NotFound"
67434
+ },
66794
67435
  "429": {
66795
67436
  $ref: "#/components/responses/RateLimitExceeded"
66796
67437
  }
@@ -67331,6 +67972,11 @@ var openapi_default = {
67331
67972
  type: "string",
67332
67973
  format: "uuid"
67333
67974
  }
67975
+ },
67976
+ move: {
67977
+ type: "boolean",
67978
+ default: false,
67979
+ description: "On an account: move documents that belong to another account into this one instead of refusing them (409). Ignored on a plain collection."
67334
67980
  }
67335
67981
  },
67336
67982
  required: [
@@ -77282,30 +77928,216 @@ var openapi_default = {
77282
77928
  }
77283
77929
  }
77284
77930
  },
77285
- "/v1/records/compartments/{id}/bindings/{bindingId}": {
77286
- delete: {
77287
- operationId: "removeCompartmentBinding",
77931
+ "/v1/records/compartments/{id}/bindings/{bindingId}": {
77932
+ delete: {
77933
+ operationId: "removeCompartmentBinding",
77934
+ "x-required-scopes": [
77935
+ "team:write"
77936
+ ],
77937
+ "x-audience": "public",
77938
+ summary: "Remove a compartment binding",
77939
+ 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",
77940
+ tags: [
77941
+ "Records"
77942
+ ],
77943
+ parameters: [
77944
+ {
77945
+ name: "id",
77946
+ in: "path",
77947
+ required: true,
77948
+ schema: {
77949
+ type: "string",
77950
+ format: "uuid"
77951
+ }
77952
+ },
77953
+ {
77954
+ name: "bindingId",
77955
+ in: "path",
77956
+ required: true,
77957
+ schema: {
77958
+ type: "string",
77959
+ format: "uuid"
77960
+ }
77961
+ }
77962
+ ],
77963
+ responses: {
77964
+ "200": {
77965
+ description: "Remove a compartment binding: done.",
77966
+ content: {
77967
+ "application/json": {
77968
+ schema: {
77969
+ type: [
77970
+ "object",
77971
+ "array"
77972
+ ]
77973
+ }
77974
+ }
77975
+ }
77976
+ },
77977
+ "400": {
77978
+ $ref: "#/components/responses/BadRequest"
77979
+ },
77980
+ "401": {
77981
+ $ref: "#/components/responses/Unauthorized"
77982
+ },
77983
+ "403": {
77984
+ $ref: "#/components/responses/Forbidden"
77985
+ },
77986
+ "404": {
77987
+ $ref: "#/components/responses/NotFound"
77988
+ },
77989
+ "429": {
77990
+ $ref: "#/components/responses/RateLimitExceeded"
77991
+ }
77992
+ }
77993
+ }
77994
+ },
77995
+ "/v1/team/members": {
77996
+ get: {
77997
+ operationId: "listTeamMembers",
77998
+ "x-required-scopes": [
77999
+ "team:read"
78000
+ ],
78001
+ "x-audience": "public",
78002
+ summary: "List members",
78003
+ 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",
78004
+ tags: [
78005
+ "Team"
78006
+ ],
78007
+ responses: {
78008
+ "200": {
78009
+ description: "List members.",
78010
+ content: {
78011
+ "application/json": {
78012
+ schema: {
78013
+ type: [
78014
+ "object",
78015
+ "array"
78016
+ ]
78017
+ }
78018
+ }
78019
+ }
78020
+ },
78021
+ "401": {
78022
+ $ref: "#/components/responses/Unauthorized"
78023
+ },
78024
+ "403": {
78025
+ $ref: "#/components/responses/Forbidden"
78026
+ },
78027
+ "429": {
78028
+ $ref: "#/components/responses/RateLimitExceeded"
78029
+ }
78030
+ }
78031
+ }
78032
+ },
78033
+ "/v1/team/pending": {
78034
+ get: {
78035
+ operationId: "listPendingMembers",
78036
+ "x-required-scopes": [
78037
+ "team:read"
78038
+ ],
78039
+ "x-audience": "public",
78040
+ summary: "List pending members",
78041
+ 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",
78042
+ tags: [
78043
+ "Team"
78044
+ ],
78045
+ responses: {
78046
+ "200": {
78047
+ description: "List pending members.",
78048
+ content: {
78049
+ "application/json": {
78050
+ schema: {
78051
+ type: [
78052
+ "object",
78053
+ "array"
78054
+ ]
78055
+ }
78056
+ }
78057
+ }
78058
+ },
78059
+ "401": {
78060
+ $ref: "#/components/responses/Unauthorized"
78061
+ },
78062
+ "403": {
78063
+ $ref: "#/components/responses/Forbidden"
78064
+ },
78065
+ "429": {
78066
+ $ref: "#/components/responses/RateLimitExceeded"
78067
+ }
78068
+ }
78069
+ }
78070
+ },
78071
+ "/v1/team/members/{userId}/approve": {
78072
+ post: {
78073
+ operationId: "approveMember",
78074
+ "x-required-scopes": [
78075
+ "team:write"
78076
+ ],
78077
+ "x-audience": "public",
78078
+ summary: "Approve a pending member",
78079
+ 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",
78080
+ tags: [
78081
+ "Team"
78082
+ ],
78083
+ parameters: [
78084
+ {
78085
+ name: "userId",
78086
+ in: "path",
78087
+ required: true,
78088
+ schema: {
78089
+ type: "string",
78090
+ format: "uuid"
78091
+ }
78092
+ }
78093
+ ],
78094
+ responses: {
78095
+ "200": {
78096
+ description: "Approve a pending member: done.",
78097
+ content: {
78098
+ "application/json": {
78099
+ schema: {
78100
+ type: [
78101
+ "object",
78102
+ "array"
78103
+ ]
78104
+ }
78105
+ }
78106
+ }
78107
+ },
78108
+ "400": {
78109
+ $ref: "#/components/responses/BadRequest"
78110
+ },
78111
+ "401": {
78112
+ $ref: "#/components/responses/Unauthorized"
78113
+ },
78114
+ "403": {
78115
+ $ref: "#/components/responses/Forbidden"
78116
+ },
78117
+ "404": {
78118
+ $ref: "#/components/responses/NotFound"
78119
+ },
78120
+ "429": {
78121
+ $ref: "#/components/responses/RateLimitExceeded"
78122
+ }
78123
+ }
78124
+ }
78125
+ },
78126
+ "/v1/team/members/{userId}/reject": {
78127
+ post: {
78128
+ operationId: "rejectMember",
77288
78129
  "x-required-scopes": [
77289
78130
  "team:write"
77290
78131
  ],
77291
78132
  "x-audience": "public",
77292
- summary: "Remove a compartment binding",
77293
- 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",
78133
+ summary: "Reject a pending member",
78134
+ description: "Declines a request to join.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
77294
78135
  tags: [
77295
- "Records"
78136
+ "Team"
77296
78137
  ],
77297
78138
  parameters: [
77298
78139
  {
77299
- name: "id",
77300
- in: "path",
77301
- required: true,
77302
- schema: {
77303
- type: "string",
77304
- format: "uuid"
77305
- }
77306
- },
77307
- {
77308
- name: "bindingId",
78140
+ name: "userId",
77309
78141
  in: "path",
77310
78142
  required: true,
77311
78143
  schema: {
@@ -77316,7 +78148,7 @@ var openapi_default = {
77316
78148
  ],
77317
78149
  responses: {
77318
78150
  "200": {
77319
- description: "Remove a compartment binding: done.",
78151
+ description: "Reject a pending member: done.",
77320
78152
  content: {
77321
78153
  "application/json": {
77322
78154
  schema: {
@@ -77346,21 +78178,55 @@ var openapi_default = {
77346
78178
  }
77347
78179
  }
77348
78180
  },
77349
- "/v1/team/members": {
77350
- get: {
77351
- operationId: "listTeamMembers",
78181
+ "/v1/team/invite": {
78182
+ post: {
78183
+ operationId: "inviteMember",
77352
78184
  "x-required-scopes": [
77353
- "team:read"
78185
+ "team:write"
77354
78186
  ],
77355
78187
  "x-audience": "public",
77356
- summary: "List members",
77357
- 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",
78188
+ summary: "Invite a member",
78189
+ 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",
77358
78190
  tags: [
77359
78191
  "Team"
77360
78192
  ],
78193
+ requestBody: {
78194
+ required: true,
78195
+ content: {
78196
+ "application/json": {
78197
+ schema: {
78198
+ type: "object",
78199
+ properties: {
78200
+ email: {
78201
+ type: "string",
78202
+ format: "email"
78203
+ },
78204
+ role: {
78205
+ type: "string",
78206
+ enum: [
78207
+ "owner",
78208
+ "senior_member",
78209
+ "member",
78210
+ "viewer",
78211
+ "none"
78212
+ ]
78213
+ },
78214
+ password: {
78215
+ type: "string",
78216
+ description: "Only for workspaces that sign in with e-mail and password."
78217
+ }
78218
+ },
78219
+ required: [
78220
+ "email",
78221
+ "role"
78222
+ ]
78223
+ }
78224
+ }
78225
+ }
78226
+ },
77361
78227
  responses: {
77362
- "200": {
77363
- description: "List members.",
78228
+ "201": {
78229
+ description: "Invite a member: done.",
77364
78230
  content: {
77365
78231
  "application/json": {
77366
78232
  schema: {
@@ -77372,6 +78238,9 @@ var openapi_default = {
77372
78238
  }
77373
78239
  }
77374
78240
  },
78241
+ "400": {
78242
+ $ref: "#/components/responses/BadRequest"
78243
+ },
77375
78244
  "401": {
77376
78245
  $ref: "#/components/responses/Unauthorized"
77377
78246
  },
@@ -77384,21 +78253,32 @@ var openapi_default = {
77384
78253
  }
77385
78254
  }
77386
78255
  },
77387
- "/v1/team/pending": {
77388
- get: {
77389
- operationId: "listPendingMembers",
78256
+ "/v1/team/invites/{userId}/resend": {
78257
+ post: {
78258
+ operationId: "resendInvite",
77390
78259
  "x-required-scopes": [
77391
- "team:read"
78260
+ "team:write"
77392
78261
  ],
77393
78262
  "x-audience": "public",
77394
- summary: "List pending members",
77395
- 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",
78263
+ summary: "Resend an invitation",
78264
+ 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",
77396
78265
  tags: [
77397
78266
  "Team"
77398
78267
  ],
78268
+ parameters: [
78269
+ {
78270
+ name: "userId",
78271
+ in: "path",
78272
+ required: true,
78273
+ schema: {
78274
+ type: "string",
78275
+ format: "uuid"
78276
+ }
78277
+ }
78278
+ ],
77399
78279
  responses: {
77400
- "200": {
77401
- description: "List pending members.",
78280
+ "201": {
78281
+ description: "Resend an invitation: done.",
77402
78282
  content: {
77403
78283
  "application/json": {
77404
78284
  schema: {
@@ -77410,27 +78290,33 @@ var openapi_default = {
77410
78290
  }
77411
78291
  }
77412
78292
  },
78293
+ "400": {
78294
+ $ref: "#/components/responses/BadRequest"
78295
+ },
77413
78296
  "401": {
77414
78297
  $ref: "#/components/responses/Unauthorized"
77415
78298
  },
77416
78299
  "403": {
77417
78300
  $ref: "#/components/responses/Forbidden"
77418
78301
  },
78302
+ "404": {
78303
+ $ref: "#/components/responses/NotFound"
78304
+ },
77419
78305
  "429": {
77420
78306
  $ref: "#/components/responses/RateLimitExceeded"
77421
78307
  }
77422
78308
  }
77423
78309
  }
77424
78310
  },
77425
- "/v1/team/members/{userId}/approve": {
77426
- post: {
77427
- operationId: "approveMember",
78311
+ "/v1/team/invites/{userId}": {
78312
+ delete: {
78313
+ operationId: "revokeInvite",
77428
78314
  "x-required-scopes": [
77429
78315
  "team:write"
77430
78316
  ],
77431
78317
  "x-audience": "public",
77432
- summary: "Approve a pending member",
77433
- 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",
78318
+ summary: "Withdraw an invitation",
78319
+ 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",
77434
78320
  tags: [
77435
78321
  "Team"
77436
78322
  ],
@@ -77447,7 +78333,7 @@ var openapi_default = {
77447
78333
  ],
77448
78334
  responses: {
77449
78335
  "200": {
77450
- description: "Approve a pending member: done.",
78336
+ description: "Withdraw an invitation: done.",
77451
78337
  content: {
77452
78338
  "application/json": {
77453
78339
  schema: {
@@ -77477,70 +78363,63 @@ var openapi_default = {
77477
78363
  }
77478
78364
  }
77479
78365
  },
77480
- "/v1/team/members/{userId}/reject": {
77481
- post: {
77482
- operationId: "rejectMember",
78366
+ "/v1/team/invite-policy": {
78367
+ get: {
78368
+ operationId: "getInvitePolicy",
77483
78369
  "x-required-scopes": [
77484
- "team:write"
78370
+ "team:read"
77485
78371
  ],
77486
78372
  "x-audience": "public",
77487
- summary: "Reject a pending member",
77488
- description: "Declines a request to join.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
78373
+ summary: "Read the invitation policy",
78374
+ 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",
77489
78375
  tags: [
77490
78376
  "Team"
77491
78377
  ],
77492
- parameters: [
77493
- {
77494
- name: "userId",
77495
- in: "path",
77496
- required: true,
77497
- schema: {
77498
- type: "string",
77499
- format: "uuid"
77500
- }
77501
- }
77502
- ],
77503
78378
  responses: {
77504
78379
  "200": {
77505
- description: "Reject a pending member: done.",
78380
+ description: "The invitation policy.",
77506
78381
  content: {
77507
78382
  "application/json": {
77508
78383
  schema: {
77509
- type: [
77510
- "object",
77511
- "array"
77512
- ]
78384
+ type: "object",
78385
+ properties: {
78386
+ external_domains: {
78387
+ type: "string",
78388
+ enum: [
78389
+ "allow",
78390
+ "block"
78391
+ ]
78392
+ },
78393
+ email_domain: {
78394
+ type: [
78395
+ "string",
78396
+ "null"
78397
+ ]
78398
+ }
78399
+ }
77513
78400
  }
77514
78401
  }
77515
78402
  }
77516
78403
  },
77517
- "400": {
77518
- $ref: "#/components/responses/BadRequest"
77519
- },
77520
78404
  "401": {
77521
78405
  $ref: "#/components/responses/Unauthorized"
77522
78406
  },
77523
78407
  "403": {
77524
78408
  $ref: "#/components/responses/Forbidden"
77525
78409
  },
77526
- "404": {
77527
- $ref: "#/components/responses/NotFound"
77528
- },
77529
78410
  "429": {
77530
78411
  $ref: "#/components/responses/RateLimitExceeded"
77531
78412
  }
77532
78413
  }
77533
- }
77534
- },
77535
- "/v1/team/invite": {
77536
- post: {
77537
- operationId: "inviteMember",
78414
+ },
78415
+ put: {
78416
+ operationId: "setInvitePolicy",
77538
78417
  "x-required-scopes": [
77539
78418
  "team:write"
77540
78419
  ],
77541
78420
  "x-audience": "public",
77542
- summary: "Invite a member",
77543
- 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",
78421
+ summary: "Change the invitation policy",
78422
+ 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",
77544
78423
  tags: [
77545
78424
  "Team"
77546
78425
  ],
@@ -77551,43 +78430,43 @@ var openapi_default = {
77551
78430
  schema: {
77552
78431
  type: "object",
77553
78432
  properties: {
77554
- email: {
77555
- type: "string",
77556
- format: "email"
77557
- },
77558
- role: {
78433
+ external_domains: {
77559
78434
  type: "string",
77560
78435
  enum: [
77561
- "owner",
77562
- "senior_member",
77563
- "member",
77564
- "viewer",
77565
- "none"
78436
+ "allow",
78437
+ "block"
77566
78438
  ]
77567
- },
77568
- password: {
77569
- type: "string",
77570
- description: "Only for workspaces that sign in with e-mail and password."
77571
78439
  }
77572
78440
  },
77573
78441
  required: [
77574
- "email",
77575
- "role"
78442
+ "external_domains"
77576
78443
  ]
77577
78444
  }
77578
78445
  }
77579
78446
  }
77580
78447
  },
77581
78448
  responses: {
77582
- "201": {
77583
- description: "Invite a member: done.",
78449
+ "200": {
78450
+ description: "Change the invitation policy: done.",
77584
78451
  content: {
77585
78452
  "application/json": {
77586
78453
  schema: {
77587
- type: [
77588
- "object",
77589
- "array"
77590
- ]
78454
+ type: "object",
78455
+ properties: {
78456
+ external_domains: {
78457
+ type: "string",
78458
+ enum: [
78459
+ "allow",
78460
+ "block"
78461
+ ]
78462
+ },
78463
+ email_domain: {
78464
+ type: [
78465
+ "string",
78466
+ "null"
78467
+ ]
78468
+ }
78469
+ }
77591
78470
  }
77592
78471
  }
77593
78472
  }
@@ -79934,6 +80813,64 @@ var openapi_default = {
79934
80813
  }
79935
80814
  }
79936
80815
  },
80816
+ "/v1/thread/starters": {
80817
+ get: {
80818
+ operationId: "getThreadStarters",
80819
+ "x-audience": "public",
80820
+ "x-required-scopes": [
80821
+ "thread:read"
80822
+ ],
80823
+ summary: "Read conversation starters",
80824
+ 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",
80825
+ tags: [
80826
+ "Thread"
80827
+ ],
80828
+ responses: {
80829
+ "200": {
80830
+ description: "OK",
80831
+ content: {
80832
+ "application/json": {
80833
+ schema: {
80834
+ type: "object",
80835
+ properties: {
80836
+ fresh: {
80837
+ type: "boolean"
80838
+ },
80839
+ companies: {
80840
+ type: "array",
80841
+ items: {
80842
+ type: "string"
80843
+ }
80844
+ },
80845
+ kinds: {
80846
+ type: "array",
80847
+ items: {
80848
+ type: "string"
80849
+ }
80850
+ },
80851
+ reported_figures: {
80852
+ type: "boolean"
80853
+ }
80854
+ }
80855
+ }
80856
+ }
80857
+ }
80858
+ },
80859
+ "401": {
80860
+ $ref: "#/components/responses/Unauthorized"
80861
+ },
80862
+ "403": {
80863
+ $ref: "#/components/responses/Forbidden"
80864
+ },
80865
+ "404": {
80866
+ $ref: "#/components/responses/NotFound"
80867
+ },
80868
+ "429": {
80869
+ $ref: "#/components/responses/RateLimitExceeded"
80870
+ }
80871
+ }
80872
+ }
80873
+ },
79937
80874
  "/v1/thread/events": {
79938
80875
  get: {
79939
80876
  operationId: "listThreadEvents",
@@ -85022,6 +85959,31 @@ var openapi_default = {
85022
85959
  }
85023
85960
  },
85024
85961
  schemas: {
85962
+ DocumentParty: {
85963
+ type: "object",
85964
+ required: [
85965
+ "id"
85966
+ ],
85967
+ 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.",
85968
+ properties: {
85969
+ id: {
85970
+ type: "string",
85971
+ maxLength: 320,
85972
+ description: "`email:jane@acme.com`, `domain:acme.com`, `phone:+4930123456`, `handle:<scope>:<id>` or `entity:<id>` (a bare address reads as `email:`).",
85973
+ example: "email:jane@acme.com"
85974
+ },
85975
+ role: {
85976
+ type: "string",
85977
+ enum: [
85978
+ "from",
85979
+ "to",
85980
+ "cc",
85981
+ "attendee",
85982
+ "author"
85983
+ ]
85984
+ }
85985
+ }
85986
+ },
85025
85987
  Account: {
85026
85988
  type: "object",
85027
85989
  required: [