@talonic/docs 0.21.78 → 0.21.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/openapi.json CHANGED
@@ -33292,91 +33292,878 @@
33292
33292
  "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33293
33293
  }
33294
33294
  }
33295
+ },
33296
+ "post": {
33297
+ "operationId": "createProcess",
33298
+ "summary": "A new process draft",
33299
+ "description": "Send exactly one of `description` (plain words: what comes in, what is read or checked, who decides, what goes out), `workflow` (an exported n8n workflow) or `draft` with `name` (a process document). The result is a draft: nothing runs and nothing is sent until it is published. `stillOpen` lists what a person still has to choose. Needs process_build and the write scope. `description` costs a model call.",
33300
+ "tags": [
33301
+ "Processes"
33302
+ ],
33303
+ "requestBody": {
33304
+ "required": true,
33305
+ "content": {
33306
+ "application/json": {
33307
+ "schema": {
33308
+ "type": "object",
33309
+ "properties": {
33310
+ "description": {
33311
+ "type": "string",
33312
+ "minLength": 10,
33313
+ "maxLength": 2000
33314
+ },
33315
+ "workflow": {
33316
+ "type": "object",
33317
+ "additionalProperties": true
33318
+ },
33319
+ "name": {
33320
+ "type": "string"
33321
+ },
33322
+ "draft": {
33323
+ "type": "object",
33324
+ "additionalProperties": true
33325
+ }
33326
+ }
33327
+ }
33328
+ }
33329
+ }
33330
+ },
33331
+ "responses": {
33332
+ "201": {
33333
+ "description": "`{ id, name, steps, explanation, questions, stillOpen, notes }`."
33334
+ },
33335
+ "400": {
33336
+ "$ref": "#/components/responses/BadRequest"
33337
+ },
33338
+ "403": {
33339
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33340
+ }
33341
+ }
33342
+ }
33343
+ },
33344
+ "/v1/processes/people": {
33345
+ "get": {
33346
+ "operationId": "listProcessPeople",
33347
+ "summary": "Who a step can wait for",
33348
+ "description": "The workspace's roles and groups, as a sign-off or form step names them. Needs process_view.",
33349
+ "tags": [
33350
+ "Processes"
33351
+ ],
33352
+ "responses": {
33353
+ "200": {
33354
+ "description": "`{ roles, groups }`."
33355
+ },
33356
+ "403": {
33357
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33358
+ }
33359
+ }
33360
+ }
33361
+ },
33362
+ "/v1/processes/mailboxes": {
33363
+ "get": {
33364
+ "operationId": "listProcessMailboxes",
33365
+ "summary": "Mailboxes a process can send from",
33366
+ "description": "Connected mailboxes with `canSend`, `ownership` (`individual` or `company`), `mine` and `usable` (whether the key's person may put it on a process). Needs process_view.",
33367
+ "tags": [
33368
+ "Processes"
33369
+ ],
33370
+ "responses": {
33371
+ "200": {
33372
+ "description": "`{ data: [{ id, name, type, canSend, ownership, mine, usable }] }`."
33373
+ },
33374
+ "403": {
33375
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33376
+ }
33377
+ }
33378
+ }
33379
+ },
33380
+ "/v1/processes/mailboxes/{mailboxId}/ownership": {
33381
+ "put": {
33382
+ "operationId": "setProcessMailboxOwnership",
33383
+ "summary": "Say whose a mailbox is",
33384
+ "description": "A company mailbox can be used by everyone who builds processes; one person's own only by that person. Needs process_govern and the write scope.",
33385
+ "tags": [
33386
+ "Processes"
33387
+ ],
33388
+ "parameters": [
33389
+ {
33390
+ "name": "mailboxId",
33391
+ "in": "path",
33392
+ "required": true,
33393
+ "schema": {
33394
+ "type": "string",
33395
+ "format": "uuid"
33396
+ }
33397
+ }
33398
+ ],
33399
+ "requestBody": {
33400
+ "required": true,
33401
+ "content": {
33402
+ "application/json": {
33403
+ "schema": {
33404
+ "type": "object",
33405
+ "required": [
33406
+ "ownership"
33407
+ ],
33408
+ "properties": {
33409
+ "ownership": {
33410
+ "type": "string",
33411
+ "enum": [
33412
+ "individual",
33413
+ "company"
33414
+ ]
33415
+ }
33416
+ }
33417
+ }
33418
+ }
33419
+ }
33420
+ },
33421
+ "responses": {
33422
+ "200": {
33423
+ "description": "`{ id, ownership }`."
33424
+ },
33425
+ "403": {
33426
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33427
+ },
33428
+ "404": {
33429
+ "$ref": "#/components/responses/NotFound"
33430
+ }
33431
+ }
33432
+ }
33433
+ },
33434
+ "/v1/processes/secrets": {
33435
+ "get": {
33436
+ "operationId": "listProcessSecrets",
33437
+ "summary": "Names of the workspace's secrets",
33438
+ "description": "Names only; a value is never returned. Needs process_view.",
33439
+ "tags": [
33440
+ "Processes"
33441
+ ],
33442
+ "responses": {
33443
+ "200": {
33444
+ "description": "`{ data: [name] }`."
33445
+ },
33446
+ "403": {
33447
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33448
+ }
33449
+ }
33450
+ }
33451
+ },
33452
+ "/v1/processes/secrets/{name}": {
33453
+ "put": {
33454
+ "operationId": "setProcessSecret",
33455
+ "summary": "Store a secret",
33456
+ "description": "A value a step sends to another system (a header, a signature). Needs process_govern and the write scope.",
33457
+ "tags": [
33458
+ "Processes"
33459
+ ],
33460
+ "parameters": [
33461
+ {
33462
+ "name": "name",
33463
+ "in": "path",
33464
+ "required": true,
33465
+ "schema": {
33466
+ "type": "string",
33467
+ "pattern": "^[A-Za-z0-9_-]{1,60}$"
33468
+ }
33469
+ }
33470
+ ],
33471
+ "requestBody": {
33472
+ "required": true,
33473
+ "content": {
33474
+ "application/json": {
33475
+ "schema": {
33476
+ "type": "object",
33477
+ "required": [
33478
+ "value"
33479
+ ],
33480
+ "properties": {
33481
+ "value": {
33482
+ "type": "string",
33483
+ "maxLength": 4000
33484
+ }
33485
+ }
33486
+ }
33487
+ }
33488
+ }
33489
+ },
33490
+ "responses": {
33491
+ "200": {
33492
+ "description": "Stored."
33493
+ },
33494
+ "403": {
33495
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33496
+ }
33497
+ }
33498
+ },
33499
+ "delete": {
33500
+ "operationId": "deleteProcessSecret",
33501
+ "summary": "Remove a secret",
33502
+ "description": "Needs process_govern and the write scope.",
33503
+ "tags": [
33504
+ "Processes"
33505
+ ],
33506
+ "parameters": [
33507
+ {
33508
+ "name": "name",
33509
+ "in": "path",
33510
+ "required": true,
33511
+ "schema": {
33512
+ "type": "string",
33513
+ "pattern": "^[A-Za-z0-9_-]{1,60}$"
33514
+ }
33515
+ }
33516
+ ],
33517
+ "responses": {
33518
+ "200": {
33519
+ "description": "Removed."
33520
+ },
33521
+ "403": {
33522
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33523
+ }
33524
+ }
33525
+ }
33526
+ },
33527
+ "/v1/processes/lookup-data": {
33528
+ "get": {
33529
+ "operationId": "listProcessLookupData",
33530
+ "summary": "Data a look-up step can read",
33531
+ "description": "The shared data of the workspace with its fields, row count and whether it is ready. Needs process_view.",
33532
+ "tags": [
33533
+ "Processes"
33534
+ ],
33535
+ "responses": {
33536
+ "200": {
33537
+ "description": "`{ state, indexes: [{ name, fields, rows, ready }] }`."
33538
+ },
33539
+ "403": {
33540
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33541
+ }
33542
+ }
33543
+ }
33544
+ },
33545
+ "/v1/processes/runs/{runId}/retry": {
33546
+ "post": {
33547
+ "operationId": "retryProcessRun",
33548
+ "summary": "Try the failed steps of a run again",
33549
+ "description": "Needs process_run and the write scope.",
33550
+ "tags": [
33551
+ "Processes"
33552
+ ],
33553
+ "parameters": [
33554
+ {
33555
+ "name": "runId",
33556
+ "in": "path",
33557
+ "required": true,
33558
+ "schema": {
33559
+ "type": "string",
33560
+ "format": "uuid"
33561
+ }
33562
+ }
33563
+ ],
33564
+ "responses": {
33565
+ "201": {
33566
+ "description": "`{ retried }`."
33567
+ },
33568
+ "403": {
33569
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33570
+ },
33571
+ "404": {
33572
+ "$ref": "#/components/responses/NotFound"
33573
+ }
33574
+ }
33575
+ }
33576
+ },
33577
+ "/v1/processes/runs": {
33578
+ "get": {
33579
+ "operationId": "listProcessRuns",
33580
+ "summary": "Runs across processes",
33581
+ "description": "Newest first, 50 a page, with item counts by state. `stuck` is an open run with a failed item. Needs process_view.",
33582
+ "tags": [
33583
+ "Processes"
33584
+ ],
33585
+ "parameters": [
33586
+ {
33587
+ "name": "state",
33588
+ "in": "query",
33589
+ "schema": {
33590
+ "type": "string",
33591
+ "enum": [
33592
+ "running",
33593
+ "completed",
33594
+ "failed",
33595
+ "stuck"
33596
+ ]
33597
+ }
33598
+ },
33599
+ {
33600
+ "name": "process",
33601
+ "in": "query",
33602
+ "schema": {
33603
+ "type": "string",
33604
+ "format": "uuid"
33605
+ }
33606
+ },
33607
+ {
33608
+ "name": "waitingForMe",
33609
+ "in": "query",
33610
+ "schema": {
33611
+ "type": "string",
33612
+ "enum": [
33613
+ "0",
33614
+ "1"
33615
+ ]
33616
+ },
33617
+ "description": "Only runs with a sign-off or form waiting for the key's person."
33618
+ },
33619
+ {
33620
+ "name": "page",
33621
+ "in": "query",
33622
+ "schema": {
33623
+ "type": "integer",
33624
+ "minimum": 0
33625
+ }
33626
+ }
33627
+ ],
33628
+ "responses": {
33629
+ "200": {
33630
+ "description": "`{ runs, page, more }`."
33631
+ },
33632
+ "403": {
33633
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33634
+ }
33635
+ }
33636
+ }
33637
+ },
33638
+ "/v1/processes/waiting": {
33639
+ "get": {
33640
+ "operationId": "listProcessWaiting",
33641
+ "summary": "Sign-offs and forms waiting for the key's person",
33642
+ "description": "Per process and step, how many items wait for the person behind the key. Needs process_sign.",
33643
+ "tags": [
33644
+ "Processes"
33645
+ ],
33646
+ "responses": {
33647
+ "200": {
33648
+ "description": "`{ data: [{ processId, process, stepId, step, waiting }] }`."
33649
+ },
33650
+ "403": {
33651
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33652
+ }
33653
+ }
33654
+ }
33655
+ },
33656
+ "/v1/processes/{id}": {
33657
+ "get": {
33658
+ "operationId": "getProcess",
33659
+ "summary": "One process with its draft",
33660
+ "tags": [
33661
+ "Processes"
33662
+ ],
33663
+ "parameters": [
33664
+ {
33665
+ "name": "id",
33666
+ "in": "path",
33667
+ "required": true,
33668
+ "schema": {
33669
+ "type": "string",
33670
+ "format": "uuid"
33671
+ }
33672
+ }
33673
+ ],
33674
+ "responses": {
33675
+ "200": {
33676
+ "description": "The process."
33677
+ },
33678
+ "403": {
33679
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33680
+ },
33681
+ "404": {
33682
+ "$ref": "#/components/responses/NotFound"
33683
+ }
33684
+ }
33685
+ },
33686
+ "delete": {
33687
+ "operationId": "deleteProcess",
33688
+ "summary": "Delete a process",
33689
+ "description": "Not while a run is open. Needs process_publish and the write scope.",
33690
+ "tags": [
33691
+ "Processes"
33692
+ ],
33693
+ "parameters": [
33694
+ {
33695
+ "name": "id",
33696
+ "in": "path",
33697
+ "required": true,
33698
+ "schema": {
33699
+ "type": "string",
33700
+ "format": "uuid"
33701
+ }
33702
+ }
33703
+ ],
33704
+ "responses": {
33705
+ "200": {
33706
+ "description": "Deleted."
33707
+ },
33708
+ "403": {
33709
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33710
+ },
33711
+ "404": {
33712
+ "$ref": "#/components/responses/NotFound"
33713
+ }
33714
+ }
33715
+ }
33716
+ },
33717
+ "/v1/processes/{id}/check": {
33718
+ "get": {
33719
+ "operationId": "checkProcessDraft",
33720
+ "summary": "What the draft still needs",
33721
+ "description": "`canPublish`, `stillNeeded` (settings a person has to choose, with step and message) and every problem the check finds. Needs process_view.",
33722
+ "tags": [
33723
+ "Processes"
33724
+ ],
33725
+ "parameters": [
33726
+ {
33727
+ "name": "id",
33728
+ "in": "path",
33729
+ "required": true,
33730
+ "schema": {
33731
+ "type": "string",
33732
+ "format": "uuid"
33733
+ }
33734
+ }
33735
+ ],
33736
+ "responses": {
33737
+ "200": {
33738
+ "description": "`{ canPublish, stillNeeded: [{ stepId, key, message }], problems }`."
33739
+ },
33740
+ "403": {
33741
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33742
+ },
33743
+ "404": {
33744
+ "$ref": "#/components/responses/NotFound"
33745
+ }
33746
+ }
33747
+ }
33748
+ },
33749
+ "/v1/processes/{id}/changes": {
33750
+ "get": {
33751
+ "operationId": "listProcessDraftChanges",
33752
+ "summary": "What publishing would change",
33753
+ "description": "The draft against the live version, one line per change. Needs process_view.",
33754
+ "tags": [
33755
+ "Processes"
33756
+ ],
33757
+ "parameters": [
33758
+ {
33759
+ "name": "id",
33760
+ "in": "path",
33761
+ "required": true,
33762
+ "schema": {
33763
+ "type": "string",
33764
+ "format": "uuid"
33765
+ }
33766
+ }
33767
+ ],
33768
+ "responses": {
33769
+ "200": {
33770
+ "description": "`{ changes: [{ type, stepId, text }] }`."
33771
+ },
33772
+ "403": {
33773
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33774
+ },
33775
+ "404": {
33776
+ "$ref": "#/components/responses/NotFound"
33777
+ }
33778
+ }
33779
+ }
33780
+ },
33781
+ "/v1/processes/{id}/versions": {
33782
+ "get": {
33783
+ "operationId": "listProcessVersions",
33784
+ "summary": "Published versions",
33785
+ "description": "Needs process_view.",
33786
+ "tags": [
33787
+ "Processes"
33788
+ ],
33789
+ "parameters": [
33790
+ {
33791
+ "name": "id",
33792
+ "in": "path",
33793
+ "required": true,
33794
+ "schema": {
33795
+ "type": "string",
33796
+ "format": "uuid"
33797
+ }
33798
+ }
33799
+ ],
33800
+ "responses": {
33801
+ "200": {
33802
+ "description": "The versions",
33803
+ "newest first.": null
33804
+ },
33805
+ "403": {
33806
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33807
+ },
33808
+ "404": {
33809
+ "$ref": "#/components/responses/NotFound"
33810
+ }
33811
+ }
33812
+ }
33813
+ },
33814
+ "/v1/processes/{id}/versions/{n}/rollback": {
33815
+ "post": {
33816
+ "operationId": "rollbackProcess",
33817
+ "summary": "Make an earlier version live again",
33818
+ "description": "Needs process_publish and the write scope.",
33819
+ "tags": [
33820
+ "Processes"
33821
+ ],
33822
+ "parameters": [
33823
+ {
33824
+ "name": "id",
33825
+ "in": "path",
33826
+ "required": true,
33827
+ "schema": {
33828
+ "type": "string",
33829
+ "format": "uuid"
33830
+ }
33831
+ },
33832
+ {
33833
+ "name": "n",
33834
+ "in": "path",
33835
+ "required": true,
33836
+ "schema": {
33837
+ "type": "integer",
33838
+ "minimum": 1
33839
+ }
33840
+ }
33841
+ ],
33842
+ "responses": {
33843
+ "201": {
33844
+ "description": "The version now live."
33845
+ },
33846
+ "403": {
33847
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33848
+ },
33849
+ "404": {
33850
+ "$ref": "#/components/responses/NotFound"
33851
+ }
33852
+ }
33853
+ }
33854
+ },
33855
+ "/v1/processes/{id}/change": {
33856
+ "post": {
33857
+ "operationId": "changeProcessDraft",
33858
+ "summary": "Change the draft from an instruction",
33859
+ "description": "Plain words: add, remove or reorder steps, change who decides, what is sent, any setting. With `stepId` only that step's settings change. Touches the draft only. A change that reduces governance (a sign-off, review or checks step removed, a signer dropped, fewer items reaching a person, an agent step acting on its own) is not saved without `confirmed: true`: the answer is `{ status: needs_confirmation, reductions }`. Send `confirmed` only after a person has read those points and agreed. Needs process_build and the write scope. Costs a model call.",
33860
+ "tags": [
33861
+ "Processes"
33862
+ ],
33863
+ "parameters": [
33864
+ {
33865
+ "name": "id",
33866
+ "in": "path",
33867
+ "required": true,
33868
+ "schema": {
33869
+ "type": "string",
33870
+ "format": "uuid"
33871
+ }
33872
+ }
33873
+ ],
33874
+ "requestBody": {
33875
+ "required": true,
33876
+ "content": {
33877
+ "application/json": {
33878
+ "schema": {
33879
+ "type": "object",
33880
+ "required": [
33881
+ "change"
33882
+ ],
33883
+ "properties": {
33884
+ "change": {
33885
+ "type": "string",
33886
+ "maxLength": 2000
33887
+ },
33888
+ "stepId": {
33889
+ "type": "string"
33890
+ },
33891
+ "confirmed": {
33892
+ "type": "boolean"
33893
+ }
33894
+ }
33895
+ }
33896
+ }
33897
+ }
33898
+ },
33899
+ "responses": {
33900
+ "201": {
33901
+ "description": "`{ status: changed, explanation, changes, questions, stillOpen }`, `{ status: needs_confirmation, reductions }` or `{ status: refused, why }`."
33902
+ },
33903
+ "403": {
33904
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33905
+ },
33906
+ "404": {
33907
+ "$ref": "#/components/responses/NotFound"
33908
+ }
33909
+ }
33910
+ }
33911
+ },
33912
+ "/v1/processes/{id}/draft": {
33913
+ "put": {
33914
+ "operationId": "replaceProcessDraft",
33915
+ "summary": "Replace the draft with a process document",
33916
+ "description": "`expectedUpdatedAt` is the `editedAt` of the draft this one was made from; a save over a newer draft is refused. A change that reduces governance (a sign-off, review or checks step removed, a signer dropped, fewer items reaching a person, an agent step acting on its own) is not saved without `confirmed: true`: the answer is `{ status: needs_confirmation, reductions }`. Send `confirmed` only after a person has read those points and agreed. Needs process_build and the write scope.",
33917
+ "tags": [
33918
+ "Processes"
33919
+ ],
33920
+ "parameters": [
33921
+ {
33922
+ "name": "id",
33923
+ "in": "path",
33924
+ "required": true,
33925
+ "schema": {
33926
+ "type": "string",
33927
+ "format": "uuid"
33928
+ }
33929
+ }
33930
+ ],
33931
+ "requestBody": {
33932
+ "required": true,
33933
+ "content": {
33934
+ "application/json": {
33935
+ "schema": {
33936
+ "type": "object",
33937
+ "required": [
33938
+ "draft",
33939
+ "expectedUpdatedAt"
33940
+ ],
33941
+ "properties": {
33942
+ "draft": {
33943
+ "type": "object",
33944
+ "additionalProperties": true
33945
+ },
33946
+ "expectedUpdatedAt": {
33947
+ "type": "string",
33948
+ "format": "date-time"
33949
+ },
33950
+ "confirmed": {
33951
+ "type": "boolean"
33952
+ }
33953
+ }
33954
+ }
33955
+ }
33956
+ }
33957
+ },
33958
+ "responses": {
33959
+ "200": {
33960
+ "description": "`{ status: changed, editedAt, stillOpen }` or `{ status: needs_confirmation, reductions }`."
33961
+ },
33962
+ "403": {
33963
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33964
+ },
33965
+ "404": {
33966
+ "$ref": "#/components/responses/NotFound"
33967
+ },
33968
+ "409": {
33969
+ "description": "The draft was changed by someone else in the meantime."
33970
+ }
33971
+ }
33295
33972
  }
33296
33973
  },
33297
- "/v1/processes/runs": {
33298
- "get": {
33299
- "operationId": "listProcessRuns",
33300
- "summary": "Runs across processes",
33301
- "description": "Newest first, 50 a page, with item counts by state. `stuck` is an open run with a failed item. Needs process_view.",
33974
+ "/v1/processes/{id}/publish": {
33975
+ "post": {
33976
+ "operationId": "publishProcess",
33977
+ "summary": "Make the draft the live version",
33978
+ "description": "Refused while `check` finds an error. From then on the process runs for real: it starts on what its start step says, sends its mail and calls its systems. Needs process_publish and the write scope.",
33302
33979
  "tags": [
33303
33980
  "Processes"
33304
33981
  ],
33305
33982
  "parameters": [
33306
33983
  {
33307
- "name": "state",
33308
- "in": "query",
33984
+ "name": "id",
33985
+ "in": "path",
33986
+ "required": true,
33309
33987
  "schema": {
33310
33988
  "type": "string",
33311
- "enum": [
33312
- "running",
33313
- "completed",
33314
- "failed",
33315
- "stuck"
33316
- ]
33989
+ "format": "uuid"
33990
+ }
33991
+ }
33992
+ ],
33993
+ "requestBody": {
33994
+ "required": true,
33995
+ "content": {
33996
+ "application/json": {
33997
+ "schema": {
33998
+ "type": "object",
33999
+ "properties": {
34000
+ "reason": {
34001
+ "type": "string",
34002
+ "maxLength": 2000
34003
+ }
34004
+ }
34005
+ }
33317
34006
  }
34007
+ }
34008
+ },
34009
+ "responses": {
34010
+ "201": {
34011
+ "description": "`{ version, changed }`."
34012
+ },
34013
+ "400": {
34014
+ "description": "The draft still needs something; the answer lists it."
34015
+ },
34016
+ "403": {
34017
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33318
34018
  },
34019
+ "404": {
34020
+ "$ref": "#/components/responses/NotFound"
34021
+ }
34022
+ }
34023
+ }
34024
+ },
34025
+ "/v1/processes/{id}/test-run": {
34026
+ "post": {
34027
+ "operationId": "testRunProcess",
34028
+ "summary": "Run the draft on documents, sending nothing",
34029
+ "description": "Runs in a test copy: nothing is delivered, emailed or called. Steps that are not set up yet end the test (`endsAt`). Needs process_run and the write scope.",
34030
+ "tags": [
34031
+ "Processes"
34032
+ ],
34033
+ "parameters": [
33319
34034
  {
33320
- "name": "process",
33321
- "in": "query",
34035
+ "name": "id",
34036
+ "in": "path",
34037
+ "required": true,
33322
34038
  "schema": {
33323
34039
  "type": "string",
33324
34040
  "format": "uuid"
33325
34041
  }
34042
+ }
34043
+ ],
34044
+ "requestBody": {
34045
+ "required": true,
34046
+ "content": {
34047
+ "application/json": {
34048
+ "schema": {
34049
+ "type": "object",
34050
+ "required": [
34051
+ "documentIds"
34052
+ ],
34053
+ "properties": {
34054
+ "documentIds": {
34055
+ "type": "array",
34056
+ "items": {
34057
+ "type": "string",
34058
+ "format": "uuid"
34059
+ }
34060
+ }
34061
+ }
34062
+ }
34063
+ }
34064
+ }
34065
+ },
34066
+ "responses": {
34067
+ "201": {
34068
+ "description": "`{ processId, endsAt, runId }`; follow it with `GET /v1/processes/{processId}/status`."
33326
34069
  },
33327
- {
33328
- "name": "waitingForMe",
33329
- "in": "query",
33330
- "schema": {
33331
- "type": "string",
33332
- "enum": [
33333
- "0",
33334
- "1"
33335
- ]
33336
- },
33337
- "description": "Only runs with a sign-off or form waiting for the key's person."
34070
+ "403": {
34071
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
33338
34072
  },
34073
+ "404": {
34074
+ "$ref": "#/components/responses/NotFound"
34075
+ }
34076
+ }
34077
+ }
34078
+ },
34079
+ "/v1/processes/{id}/address": {
34080
+ "get": {
34081
+ "operationId": "getProcessAddress",
34082
+ "summary": "Whether other systems can send items to the process",
34083
+ "description": "Never the address itself: it is shown once, when it is made. Needs process_view.",
34084
+ "tags": [
34085
+ "Processes"
34086
+ ],
34087
+ "parameters": [
33339
34088
  {
33340
- "name": "page",
33341
- "in": "query",
34089
+ "name": "id",
34090
+ "in": "path",
34091
+ "required": true,
33342
34092
  "schema": {
33343
- "type": "integer",
33344
- "minimum": 0
34093
+ "type": "string",
34094
+ "format": "uuid"
33345
34095
  }
33346
34096
  }
33347
34097
  ],
33348
34098
  "responses": {
33349
34099
  "200": {
33350
- "description": "`{ runs, page, more }`."
34100
+ "description": "`{ exists, createdAt, signedWith, test: { exists, createdAt } }`."
33351
34101
  },
33352
34102
  "403": {
33353
34103
  "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
34104
+ },
34105
+ "404": {
34106
+ "$ref": "#/components/responses/NotFound"
33354
34107
  }
33355
34108
  }
33356
- }
33357
- },
33358
- "/v1/processes/waiting": {
33359
- "get": {
33360
- "operationId": "listProcessWaiting",
33361
- "summary": "Sign-offs and forms waiting for the key's person",
33362
- "description": "Per process and step, how many items wait for the person behind the key. Needs process_sign.",
34109
+ },
34110
+ "put": {
34111
+ "operationId": "makeProcessAddress",
34112
+ "summary": "Make the address other systems send items to",
34113
+ "description": "The token is in the answer once; items are posted to `/process-hooks/{token}`. An address that exists is replaced only with `replace: true`: the old one stops working at once. `test: true` makes the address of the test copy. Needs process_govern and the write scope.",
33363
34114
  "tags": [
33364
34115
  "Processes"
33365
34116
  ],
34117
+ "parameters": [
34118
+ {
34119
+ "name": "id",
34120
+ "in": "path",
34121
+ "required": true,
34122
+ "schema": {
34123
+ "type": "string",
34124
+ "format": "uuid"
34125
+ }
34126
+ }
34127
+ ],
34128
+ "requestBody": {
34129
+ "required": true,
34130
+ "content": {
34131
+ "application/json": {
34132
+ "schema": {
34133
+ "type": "object",
34134
+ "properties": {
34135
+ "test": {
34136
+ "type": "boolean"
34137
+ },
34138
+ "replace": {
34139
+ "type": "boolean"
34140
+ }
34141
+ }
34142
+ }
34143
+ }
34144
+ }
34145
+ },
33366
34146
  "responses": {
33367
34147
  "200": {
33368
- "description": "`{ data: [{ processId, process, stepId, step, waiting }] }`."
34148
+ "description": "`{ token, path }`."
33369
34149
  },
33370
34150
  "403": {
33371
34151
  "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
34152
+ },
34153
+ "404": {
34154
+ "$ref": "#/components/responses/NotFound"
34155
+ },
34156
+ "409": {
34157
+ "description": "The address exists and `replace` was not sent."
33372
34158
  }
33373
34159
  }
33374
34160
  }
33375
34161
  },
33376
- "/v1/processes/{id}": {
33377
- "get": {
33378
- "operationId": "getProcess",
33379
- "summary": "One process with its draft",
34162
+ "/v1/processes/{id}/address/signing": {
34163
+ "put": {
34164
+ "operationId": "setProcessAddressSigning",
34165
+ "summary": "Require a signature on the address",
34166
+ "description": "Calls must then carry `X-Signature: sha256=<HMAC of the body with the named secret>`. `secretName: null` stops requiring it. Needs process_govern and the write scope.",
33380
34167
  "tags": [
33381
34168
  "Processes"
33382
34169
  ],
@@ -33391,9 +34178,28 @@
33391
34178
  }
33392
34179
  }
33393
34180
  ],
34181
+ "requestBody": {
34182
+ "required": true,
34183
+ "content": {
34184
+ "application/json": {
34185
+ "schema": {
34186
+ "type": "object",
34187
+ "required": [
34188
+ "secretName"
34189
+ ],
34190
+ "properties": {
34191
+ "secretName": {
34192
+ "type": "string",
34193
+ "nullable": true
34194
+ }
34195
+ }
34196
+ }
34197
+ }
34198
+ }
34199
+ },
33394
34200
  "responses": {
33395
34201
  "200": {
33396
- "description": "The process."
34202
+ "description": "Set."
33397
34203
  },
33398
34204
  "403": {
33399
34205
  "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
@@ -33695,11 +34501,83 @@
33695
34501
  }
33696
34502
  }
33697
34503
  },
34504
+ "/v1/processes/{id}/runs/{runId}/holds/{stepId}/send-back": {
34505
+ "post": {
34506
+ "operationId": "sendBackProcessHold",
34507
+ "summary": "Send items back from a sign-off",
34508
+ "description": "With the reason, to where the process says sent-back items go. Only where the key's person is assigned to the step. Needs process_sign and the write scope.",
34509
+ "tags": [
34510
+ "Processes"
34511
+ ],
34512
+ "parameters": [
34513
+ {
34514
+ "name": "id",
34515
+ "in": "path",
34516
+ "required": true,
34517
+ "schema": {
34518
+ "type": "string",
34519
+ "format": "uuid"
34520
+ }
34521
+ },
34522
+ {
34523
+ "name": "runId",
34524
+ "in": "path",
34525
+ "required": true,
34526
+ "schema": {
34527
+ "type": "string",
34528
+ "format": "uuid"
34529
+ }
34530
+ },
34531
+ {
34532
+ "name": "stepId",
34533
+ "in": "path",
34534
+ "required": true,
34535
+ "schema": {
34536
+ "type": "string"
34537
+ }
34538
+ }
34539
+ ],
34540
+ "requestBody": {
34541
+ "required": true,
34542
+ "content": {
34543
+ "application/json": {
34544
+ "schema": {
34545
+ "type": "object",
34546
+ "required": [
34547
+ "items",
34548
+ "reason"
34549
+ ],
34550
+ "properties": {
34551
+ "items": {
34552
+ "type": "array",
34553
+ "items": {
34554
+ "type": "string"
34555
+ }
34556
+ },
34557
+ "reason": {
34558
+ "type": "string",
34559
+ "maxLength": 2000
34560
+ }
34561
+ }
34562
+ }
34563
+ }
34564
+ }
34565
+ },
34566
+ "responses": {
34567
+ "201": {
34568
+ "description": "`{ sentBack }`."
34569
+ },
34570
+ "403": {
34571
+ "description": "The key has no person, the person lacks the Process Plane permission, or the key lacks the scope."
34572
+ }
34573
+ }
34574
+ }
34575
+ },
33698
34576
  "/v1/contracts": {
33699
34577
  "get": {
33700
34578
  "operationId": "listContracts",
33701
34579
  "summary": "The contract register, filtered",
33702
- "description": "Every contract of the workspace with its status, dates, annual value, direction (sell, buy or internal, derived on read from the parties the documents name against the workspace's own company names), document count, next open key date, open process summary and the Price Baseline and Money Found links. Without `page`, `limit` or `offset` the whole register is returned in one array, ordered by counterparty, then contract key. With any of them the answer is one page of one view, with `total`, `page` and `limit`.",
34580
+ "description": "Every contract of the workspace with its status, dates, annual value, direction (sell, buy or internal, derived on read from the parties the documents name against the workspace's own company names), document count, next open key date, open process summary and the Price Baseline and Money Found links. Without `page`, `limit` or `offset` the whole register is returned in one array, ordered by counterparty, then contract key; the array is written as it is read, so a failure after the response has started ends it early (an incomplete body) instead of answering an error status. With any of them the answer is one page of one view, with `total`, `page` and `limit`.",
33703
34581
  "tags": [
33704
34582
  "Contracts"
33705
34583
  ],
@@ -33850,7 +34728,7 @@
33850
34728
  "get": {
33851
34729
  "operationId": "listContractIssues",
33852
34730
  "summary": "Contracts that look wrong, with the documents concerned",
33853
- "description": "The cleaning worklist: per contract, the issues the documents show, each naming the documents it is about. An issue a person dismissed with `POST /v1/contracts/{id}/issues/{code}/dismiss` stays hidden until the documents concerned change. Contracts with the most issues come first.",
34731
+ "description": "The cleaning worklist: per contract, the issues the documents show, each naming the documents it is about. An issue a person dismissed with `POST /v1/contracts/{id}/issues/{code}/dismiss` stays hidden until the documents concerned change. Contracts with the most issues come first. Without `page` or `limit` the whole worklist is returned in one array; the array is written as it is read, so a failure after the response has started ends it early (an incomplete body) instead of answering an error status. With either of them the answer is one page, with `total`, `page` and `limit`, and `q` searches contract key and title.",
33854
34732
  "tags": [
33855
34733
  "Contracts"
33856
34734
  ],