@usestatemachines/sdk 0.9.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +16 -2
  2. package/agents/index.js +2 -2
  3. package/agents/llms.txt +4 -4
  4. package/esm/extensions/client.d.ts +31 -1
  5. package/esm/extensions/client.js +74 -2
  6. package/esm/extensions/errors.d.ts +7 -0
  7. package/esm/extensions/errors.js +46 -2
  8. package/esm/extensions/index.d.ts +2 -2
  9. package/esm/funcs/imports-complete.d.ts +12 -0
  10. package/esm/funcs/imports-complete.js +93 -0
  11. package/esm/funcs/imports-create.d.ts +12 -0
  12. package/esm/funcs/imports-create.js +89 -0
  13. package/esm/funcs/imports-delete.d.ts +12 -0
  14. package/esm/funcs/imports-delete.js +93 -0
  15. package/esm/funcs/imports-get.d.ts +12 -0
  16. package/esm/funcs/imports-get.js +93 -0
  17. package/esm/funcs/imports-list.d.ts +11 -0
  18. package/esm/funcs/imports-list.js +93 -0
  19. package/esm/lib/config.d.ts +2 -2
  20. package/esm/lib/config.js +2 -2
  21. package/esm/models/absent-reason.d.ts +36 -0
  22. package/esm/models/absent-reason.js +44 -0
  23. package/esm/models/absent-record-source.d.ts +13 -0
  24. package/esm/models/absent-record-source.js +14 -0
  25. package/esm/models/absent-record.d.ts +23 -0
  26. package/esm/models/absent-record.js +18 -0
  27. package/esm/models/create-snapshot-from-environment.d.ts +13 -0
  28. package/esm/models/create-snapshot-from-environment.js +12 -0
  29. package/esm/models/create-snapshot-from-import.d.ts +16 -0
  30. package/esm/models/create-snapshot-from-import.js +12 -0
  31. package/esm/models/create-snapshot.d.ts +9 -0
  32. package/esm/models/create-snapshot.js +14 -0
  33. package/esm/models/created-import.d.ts +38 -0
  34. package/esm/models/created-import.js +30 -0
  35. package/esm/models/import-problem.d.ts +40 -0
  36. package/esm/models/import-problem.js +28 -0
  37. package/esm/models/import-status.d.ts +13 -0
  38. package/esm/models/import-status.js +14 -0
  39. package/esm/models/import.d.ts +45 -0
  40. package/esm/models/import.js +36 -0
  41. package/esm/models/index.d.ts +12 -0
  42. package/esm/models/index.js +12 -0
  43. package/esm/models/operations/complete-import.d.ts +11 -0
  44. package/esm/models/operations/complete-import.js +11 -0
  45. package/esm/models/operations/create-import.d.ts +36 -0
  46. package/esm/models/operations/create-import.js +26 -0
  47. package/esm/models/operations/create-snapshot.d.ts +3 -14
  48. package/esm/models/operations/create-snapshot.js +2 -9
  49. package/esm/models/operations/delete-import.d.ts +11 -0
  50. package/esm/models/operations/delete-import.js +11 -0
  51. package/esm/models/operations/get-import.d.ts +11 -0
  52. package/esm/models/operations/get-import.js +11 -0
  53. package/esm/models/operations/index.d.ts +5 -0
  54. package/esm/models/operations/index.js +5 -0
  55. package/esm/models/operations/list-imports.d.ts +30 -0
  56. package/esm/models/operations/list-imports.js +25 -0
  57. package/esm/models/snapshot-app-load.d.ts +20 -0
  58. package/esm/models/snapshot-app-load.js +15 -0
  59. package/esm/models/snapshot-failure-union.d.ts +40 -0
  60. package/esm/models/snapshot-failure-union.js +42 -0
  61. package/esm/models/snapshot.d.ts +15 -19
  62. package/esm/models/snapshot.js +6 -19
  63. package/esm/sdk/imports.d.ts +10 -0
  64. package/esm/sdk/imports.js +27 -0
  65. package/esm/sdk/sdk.d.ts +3 -0
  66. package/esm/sdk/sdk.js +5 -0
  67. package/openapi.json +1253 -187
  68. package/package.json +1 -1
package/openapi.json CHANGED
@@ -1,6 +1,95 @@
1
1
  {
2
2
  "components": {
3
3
  "schemas": {
4
+ "AbsentReason": {
5
+ "anyOf": [
6
+ {
7
+ "properties": {
8
+ "message": {
9
+ "type": "string"
10
+ },
11
+ "type": {
12
+ "enum": ["identity"],
13
+ "type": "string"
14
+ }
15
+ },
16
+ "required": ["type", "message"],
17
+ "type": "object"
18
+ },
19
+ {
20
+ "properties": {
21
+ "code": {
22
+ "type": "string"
23
+ },
24
+ "message": {
25
+ "type": "string"
26
+ },
27
+ "pointer": {
28
+ "type": ["string", "null"]
29
+ },
30
+ "type": {
31
+ "enum": ["problem"],
32
+ "type": "string"
33
+ }
34
+ },
35
+ "required": ["type", "code", "pointer", "message"],
36
+ "type": "object"
37
+ },
38
+ {
39
+ "properties": {
40
+ "nativeId": {
41
+ "type": "string"
42
+ },
43
+ "object": {
44
+ "type": "string"
45
+ },
46
+ "pointer": {
47
+ "type": "string"
48
+ },
49
+ "type": {
50
+ "enum": ["reference"],
51
+ "type": "string"
52
+ }
53
+ },
54
+ "required": ["type", "pointer", "object", "nativeId"],
55
+ "type": "object"
56
+ }
57
+ ],
58
+ "description": "Why the record did not load."
59
+ },
60
+ "AbsentRecord": {
61
+ "properties": {
62
+ "nativeId": {
63
+ "description": "The vendor's ID of the record, or null for a record that holds none.",
64
+ "type": ["string", "null"]
65
+ },
66
+ "object": {
67
+ "type": "string"
68
+ },
69
+ "reason": {
70
+ "$ref": "#/components/schemas/AbsentReason"
71
+ },
72
+ "source": {
73
+ "$ref": "#/components/schemas/AbsentRecordSource"
74
+ }
75
+ },
76
+ "required": ["object", "source", "nativeId", "reason"],
77
+ "type": "object"
78
+ },
79
+ "AbsentRecordSource": {
80
+ "description": "The file of the record in the import, such as `salesforce/records/Opportunity.jsonl`, and its line, counted from 1.",
81
+ "properties": {
82
+ "file": {
83
+ "type": "string"
84
+ },
85
+ "line": {
86
+ "exclusiveMinimum": 0,
87
+ "type": ["integer", "null"]
88
+ }
89
+ },
90
+ "required": ["file", "line"],
91
+ "type": "object"
92
+ },
4
93
  "Actor": {
5
94
  "properties": {
6
95
  "id": {
@@ -252,6 +341,83 @@
252
341
  "required": ["appId"],
253
342
  "type": "object"
254
343
  },
344
+ "CreateSnapshot": {
345
+ "anyOf": [
346
+ {
347
+ "$ref": "#/components/schemas/CreateSnapshotFromEnvironment"
348
+ },
349
+ {
350
+ "$ref": "#/components/schemas/CreateSnapshotFromImport"
351
+ }
352
+ ]
353
+ },
354
+ "CreateSnapshotFromEnvironment": {
355
+ "additionalProperties": false,
356
+ "properties": {
357
+ "environmentId": {
358
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
359
+ "type": "string"
360
+ },
361
+ "name": {
362
+ "maxLength": 120,
363
+ "minLength": 1,
364
+ "type": ["string", "null"]
365
+ }
366
+ },
367
+ "required": ["environmentId"],
368
+ "type": "object"
369
+ },
370
+ "CreateSnapshotFromImport": {
371
+ "additionalProperties": false,
372
+ "properties": {
373
+ "importId": {
374
+ "description": "A `ready` import that the caller reaches. The snapshot gets every app of the import, each on the app's default version, with empty setup and services.",
375
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
376
+ "type": "string"
377
+ },
378
+ "name": {
379
+ "maxLength": 120,
380
+ "minLength": 1,
381
+ "type": ["string", "null"]
382
+ }
383
+ },
384
+ "required": ["importId"],
385
+ "type": "object"
386
+ },
387
+ "CreatedImport": {
388
+ "properties": {
389
+ "import": {
390
+ "$ref": "#/components/schemas/Import"
391
+ },
392
+ "upload": {
393
+ "description": "Where to send the zip file while the import is `uploading`, and null after. Complete the import once the upload succeeds.",
394
+ "properties": {
395
+ "expiresAt": {
396
+ "format": "date-time",
397
+ "type": "string"
398
+ },
399
+ "headers": {
400
+ "additionalProperties": {
401
+ "type": "string"
402
+ },
403
+ "description": "Send the zip file as the body of a PUT to `url`, with each of these headers as given. The URL refuses another value of each.",
404
+ "type": "object"
405
+ },
406
+ "method": {
407
+ "enum": ["PUT"],
408
+ "type": "string"
409
+ },
410
+ "url": {
411
+ "type": "string"
412
+ }
413
+ },
414
+ "required": ["method", "url", "headers", "expiresAt"],
415
+ "type": ["object", "null"]
416
+ }
417
+ },
418
+ "required": ["import", "upload"],
419
+ "type": "object"
420
+ },
255
421
  "Credential": {
256
422
  "oneOf": [
257
423
  {
@@ -672,6 +838,120 @@
672
838
  "required": ["error"],
673
839
  "type": "object"
674
840
  },
841
+ "Import": {
842
+ "properties": {
843
+ "apps": {
844
+ "description": "Each app of the import's manifest, by its name and its app ID. Empty until the check reads the manifest, and when the check cannot read it.",
845
+ "items": {
846
+ "properties": {
847
+ "appId": {
848
+ "type": "string"
849
+ },
850
+ "name": {
851
+ "type": "string"
852
+ }
853
+ },
854
+ "required": ["name", "appId"],
855
+ "type": "object"
856
+ },
857
+ "type": "array"
858
+ },
859
+ "checkedAt": {
860
+ "format": "date-time",
861
+ "type": ["string", "null"]
862
+ },
863
+ "createdAt": {
864
+ "format": "date-time",
865
+ "type": "string"
866
+ },
867
+ "createdBy": {
868
+ "$ref": "#/components/schemas/Principal"
869
+ },
870
+ "deletedAt": {
871
+ "format": "date-time",
872
+ "type": ["string", "null"]
873
+ },
874
+ "digest": {
875
+ "description": "`sha256:` and the lowercase hex SHA-256 of the zip file, as the create declared it.",
876
+ "type": "string"
877
+ },
878
+ "id": {
879
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
880
+ "type": "string"
881
+ },
882
+ "problemCount": {
883
+ "description": "How many problems the check found. It is larger than the length of `problems` when they did not all fit.",
884
+ "type": "integer"
885
+ },
886
+ "problems": {
887
+ "description": "The first problems that the check found, errors before warnings. A delete clears them.",
888
+ "items": {
889
+ "$ref": "#/components/schemas/ImportProblem"
890
+ },
891
+ "type": "array"
892
+ },
893
+ "sizeBytes": {
894
+ "description": "The size of the zip file in bytes, as the create declared it.",
895
+ "type": "integer"
896
+ },
897
+ "status": {
898
+ "$ref": "#/components/schemas/ImportStatus"
899
+ },
900
+ "workspaceId": {
901
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
902
+ "type": "string"
903
+ }
904
+ },
905
+ "required": [
906
+ "id",
907
+ "workspaceId",
908
+ "status",
909
+ "sizeBytes",
910
+ "digest",
911
+ "apps",
912
+ "problems",
913
+ "problemCount",
914
+ "createdBy",
915
+ "createdAt",
916
+ "checkedAt",
917
+ "deletedAt"
918
+ ],
919
+ "type": "object"
920
+ },
921
+ "ImportProblem": {
922
+ "properties": {
923
+ "code": {
924
+ "type": "string"
925
+ },
926
+ "file": {
927
+ "description": "The path in the import, such as `salesforce/records/Account.jsonl`. An empty path names the zip file as a whole.",
928
+ "type": "string"
929
+ },
930
+ "line": {
931
+ "description": "The line in the file, counted from 1, or null when the problem is about the whole file.",
932
+ "exclusiveMinimum": 0,
933
+ "type": ["integer", "null"]
934
+ },
935
+ "message": {
936
+ "type": "string"
937
+ },
938
+ "pointer": {
939
+ "description": "The JSON pointer of the value, such as `/apps/0/name`. In a records file, it points into the record on `line`. Null when the problem names no value.",
940
+ "type": ["string", "null"]
941
+ },
942
+ "severity": {
943
+ "description": "An error refuses the import: the check of the zip file makes the import `invalid`, and the load of a snapshot from the import fails the snapshot. A warning refuses nothing.",
944
+ "enum": ["error", "warning"],
945
+ "type": "string"
946
+ }
947
+ },
948
+ "required": ["file", "line", "pointer", "code", "severity", "message"],
949
+ "type": "object"
950
+ },
951
+ "ImportStatus": {
952
+ "enum": ["uploading", "ready", "invalid", "deleted"],
953
+ "type": "string"
954
+ },
675
955
  "LaunchUiSession": {
676
956
  "additionalProperties": false,
677
957
  "properties": {
@@ -1167,6 +1447,9 @@
1167
1447
  "appId": {
1168
1448
  "type": "string"
1169
1449
  },
1450
+ "load": {
1451
+ "$ref": "#/components/schemas/SnapshotAppLoad"
1452
+ },
1170
1453
  "name": {
1171
1454
  "pattern": "^[a-z][a-z0-9-]{0,39}$",
1172
1455
  "type": "string"
@@ -1179,9 +1462,6 @@
1179
1462
  "additionalProperties": {},
1180
1463
  "type": "object"
1181
1464
  },
1182
- "sizeBytes": {
1183
- "type": ["integer", "null"]
1184
- },
1185
1465
  "version": {
1186
1466
  "type": "string"
1187
1467
  },
@@ -1196,8 +1476,7 @@
1196
1476
  "versionId",
1197
1477
  "version",
1198
1478
  "setup",
1199
- "services",
1200
- "sizeBytes"
1479
+ "services"
1201
1480
  ],
1202
1481
  "type": "object"
1203
1482
  },
@@ -1215,29 +1494,25 @@
1215
1494
  "type": ["string", "null"]
1216
1495
  },
1217
1496
  "environmentId": {
1497
+ "description": "The environment that the snapshot copies, or null for a snapshot built from an import.",
1218
1498
  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
1219
- "type": "string"
1499
+ "type": ["string", "null"]
1220
1500
  },
1221
1501
  "environmentName": {
1222
1502
  "type": ["string", "null"]
1223
1503
  },
1224
1504
  "failure": {
1225
- "properties": {
1226
- "code": {
1227
- "enum": ["interrupted", "internal_error"],
1228
- "type": "string"
1229
- },
1230
- "message": {
1231
- "type": "string"
1232
- }
1233
- },
1234
- "required": ["code", "message"],
1235
- "type": ["object", "null"]
1505
+ "$ref": "#/components/schemas/SnapshotFailure"
1236
1506
  },
1237
1507
  "id": {
1238
1508
  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
1239
1509
  "type": "string"
1240
1510
  },
1511
+ "importId": {
1512
+ "description": "The import that the snapshot was built from, or null for a snapshot of an environment.",
1513
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
1514
+ "type": ["string", "null"]
1515
+ },
1241
1516
  "name": {
1242
1517
  "type": ["string", "null"]
1243
1518
  },
@@ -1245,9 +1520,6 @@
1245
1520
  "format": "date-time",
1246
1521
  "type": ["string", "null"]
1247
1522
  },
1248
- "sizeBytes": {
1249
- "type": ["integer", "null"]
1250
- },
1251
1523
  "status": {
1252
1524
  "$ref": "#/components/schemas/SnapshotStatus"
1253
1525
  },
@@ -1264,7 +1536,6 @@
1264
1536
  "name",
1265
1537
  "status",
1266
1538
  "failure",
1267
- "sizeBytes",
1268
1539
  "apps",
1269
1540
  "createdBy",
1270
1541
  "createdAt",
@@ -1273,21 +1544,82 @@
1273
1544
  ],
1274
1545
  "type": "object"
1275
1546
  },
1276
- "SnapshotStatus": {
1277
- "enum": ["saving", "ready", "failed", "deleted"],
1278
- "type": "string"
1279
- },
1280
- "UiSessionLaunch": {
1547
+ "SnapshotAppLoad": {
1548
+ "description": "What the load of the snapshot's import left out of the app. Null for a snapshot of an environment, and until the app's load ends.",
1281
1549
  "properties": {
1282
- "actorId": {
1283
- "type": "string"
1550
+ "absent": {
1551
+ "description": "The first records of the import that did not load, in the order of the import.",
1552
+ "items": {
1553
+ "$ref": "#/components/schemas/AbsentRecord"
1554
+ },
1555
+ "type": "array"
1284
1556
  },
1285
- "appName": {
1286
- "pattern": "^[a-z][a-z0-9-]{0,39}$",
1287
- "type": "string"
1557
+ "absentCount": {
1558
+ "description": "How many records of the import did not load. It is larger than the length of `absent` when they did not all fit.",
1559
+ "type": "integer"
1560
+ }
1561
+ },
1562
+ "required": ["absentCount", "absent"],
1563
+ "type": ["object", "null"]
1564
+ },
1565
+ "SnapshotFailure": {
1566
+ "anyOf": [
1567
+ {
1568
+ "properties": {
1569
+ "code": {
1570
+ "enum": ["interrupted", "internal_error"],
1571
+ "type": "string"
1572
+ },
1573
+ "message": {
1574
+ "type": "string"
1575
+ }
1576
+ },
1577
+ "required": ["code", "message"],
1578
+ "type": "object"
1288
1579
  },
1289
- "entryPath": {
1290
- "type": "string"
1580
+ {
1581
+ "properties": {
1582
+ "appName": {
1583
+ "type": "string"
1584
+ },
1585
+ "code": {
1586
+ "enum": ["invalid_import"],
1587
+ "type": "string"
1588
+ },
1589
+ "message": {
1590
+ "type": "string"
1591
+ },
1592
+ "problems": {
1593
+ "description": "The first problems that the load of the refusing app found, errors before warnings. It can be empty, such as when the load passed its time limit.",
1594
+ "items": {
1595
+ "$ref": "#/components/schemas/ImportProblem"
1596
+ },
1597
+ "type": "array"
1598
+ }
1599
+ },
1600
+ "required": ["code", "message"],
1601
+ "type": "object"
1602
+ },
1603
+ {
1604
+ "type": "null"
1605
+ }
1606
+ ]
1607
+ },
1608
+ "SnapshotStatus": {
1609
+ "enum": ["saving", "ready", "failed", "deleted"],
1610
+ "type": "string"
1611
+ },
1612
+ "UiSessionLaunch": {
1613
+ "properties": {
1614
+ "actorId": {
1615
+ "type": "string"
1616
+ },
1617
+ "appName": {
1618
+ "pattern": "^[a-z][a-z0-9-]{0,39}$",
1619
+ "type": "string"
1620
+ },
1621
+ "entryPath": {
1622
+ "type": "string"
1291
1623
  },
1292
1624
  "environmentId": {
1293
1625
  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
@@ -2354,24 +2686,774 @@
2354
2686
  }
2355
2687
  ],
2356
2688
  "responses": {
2357
- "200": {
2689
+ "200": {
2690
+ "content": {
2691
+ "application/json": {
2692
+ "schema": {
2693
+ "properties": {
2694
+ "data": {
2695
+ "items": {
2696
+ "$ref": "#/components/schemas/Principal"
2697
+ },
2698
+ "type": "array"
2699
+ }
2700
+ },
2701
+ "required": ["data"],
2702
+ "type": "object"
2703
+ }
2704
+ }
2705
+ },
2706
+ "description": "Each principal that created an environment in the workspace, by name"
2707
+ },
2708
+ "400": {
2709
+ "content": {
2710
+ "application/json": {
2711
+ "schema": {
2712
+ "$ref": "#/components/schemas/Error"
2713
+ }
2714
+ }
2715
+ },
2716
+ "description": "Invalid request"
2717
+ },
2718
+ "401": {
2719
+ "content": {
2720
+ "application/json": {
2721
+ "schema": {
2722
+ "$ref": "#/components/schemas/Error"
2723
+ }
2724
+ }
2725
+ },
2726
+ "description": "Authentication required"
2727
+ },
2728
+ "403": {
2729
+ "content": {
2730
+ "application/json": {
2731
+ "schema": {
2732
+ "$ref": "#/components/schemas/Error"
2733
+ }
2734
+ }
2735
+ },
2736
+ "description": "Permission denied"
2737
+ },
2738
+ "404": {
2739
+ "content": {
2740
+ "application/json": {
2741
+ "schema": {
2742
+ "$ref": "#/components/schemas/Error"
2743
+ }
2744
+ }
2745
+ },
2746
+ "description": "Resource not found"
2747
+ },
2748
+ "409": {
2749
+ "content": {
2750
+ "application/json": {
2751
+ "schema": {
2752
+ "$ref": "#/components/schemas/Error"
2753
+ }
2754
+ }
2755
+ },
2756
+ "description": "Conflicting request"
2757
+ },
2758
+ "413": {
2759
+ "content": {
2760
+ "application/json": {
2761
+ "schema": {
2762
+ "$ref": "#/components/schemas/Error"
2763
+ }
2764
+ }
2765
+ },
2766
+ "description": "Request body too large"
2767
+ },
2768
+ "422": {
2769
+ "content": {
2770
+ "application/json": {
2771
+ "schema": {
2772
+ "$ref": "#/components/schemas/Error"
2773
+ }
2774
+ }
2775
+ },
2776
+ "description": "Version unavailable"
2777
+ },
2778
+ "429": {
2779
+ "content": {
2780
+ "application/json": {
2781
+ "schema": {
2782
+ "$ref": "#/components/schemas/Error"
2783
+ }
2784
+ }
2785
+ },
2786
+ "description": "Limit reached"
2787
+ },
2788
+ "500": {
2789
+ "content": {
2790
+ "application/json": {
2791
+ "schema": {
2792
+ "$ref": "#/components/schemas/Error"
2793
+ }
2794
+ }
2795
+ },
2796
+ "description": "Unexpected failure"
2797
+ },
2798
+ "503": {
2799
+ "content": {
2800
+ "application/json": {
2801
+ "schema": {
2802
+ "$ref": "#/components/schemas/Error"
2803
+ }
2804
+ }
2805
+ },
2806
+ "description": "Dependency unavailable"
2807
+ }
2808
+ },
2809
+ "security": [
2810
+ {
2811
+ "bearerAuth": []
2812
+ }
2813
+ ]
2814
+ }
2815
+ },
2816
+ "/v1/environments/{environmentId}": {
2817
+ "delete": {
2818
+ "operationId": "deleteEnvironment",
2819
+ "parameters": [
2820
+ {
2821
+ "in": "path",
2822
+ "name": "environmentId",
2823
+ "required": true,
2824
+ "schema": {
2825
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
2826
+ "type": "string"
2827
+ }
2828
+ },
2829
+ {
2830
+ "in": "header",
2831
+ "name": "idempotency-key",
2832
+ "required": false,
2833
+ "schema": {
2834
+ "maxLength": 128,
2835
+ "minLength": 8,
2836
+ "pattern": "^[A-Za-z0-9._:-]+$",
2837
+ "type": "string"
2838
+ }
2839
+ }
2840
+ ],
2841
+ "responses": {
2842
+ "200": {
2843
+ "content": {
2844
+ "application/json": {
2845
+ "schema": {
2846
+ "$ref": "#/components/schemas/Environment"
2847
+ }
2848
+ }
2849
+ },
2850
+ "description": "Environment deleted; compute and data are released after the response"
2851
+ },
2852
+ "400": {
2853
+ "content": {
2854
+ "application/json": {
2855
+ "schema": {
2856
+ "$ref": "#/components/schemas/Error"
2857
+ }
2858
+ }
2859
+ },
2860
+ "description": "Invalid request"
2861
+ },
2862
+ "401": {
2863
+ "content": {
2864
+ "application/json": {
2865
+ "schema": {
2866
+ "$ref": "#/components/schemas/Error"
2867
+ }
2868
+ }
2869
+ },
2870
+ "description": "Authentication required"
2871
+ },
2872
+ "403": {
2873
+ "content": {
2874
+ "application/json": {
2875
+ "schema": {
2876
+ "$ref": "#/components/schemas/Error"
2877
+ }
2878
+ }
2879
+ },
2880
+ "description": "Permission denied"
2881
+ },
2882
+ "404": {
2883
+ "content": {
2884
+ "application/json": {
2885
+ "schema": {
2886
+ "$ref": "#/components/schemas/Error"
2887
+ }
2888
+ }
2889
+ },
2890
+ "description": "Resource not found"
2891
+ },
2892
+ "409": {
2893
+ "content": {
2894
+ "application/json": {
2895
+ "schema": {
2896
+ "$ref": "#/components/schemas/Error"
2897
+ }
2898
+ }
2899
+ },
2900
+ "description": "Conflicting request"
2901
+ },
2902
+ "413": {
2903
+ "content": {
2904
+ "application/json": {
2905
+ "schema": {
2906
+ "$ref": "#/components/schemas/Error"
2907
+ }
2908
+ }
2909
+ },
2910
+ "description": "Request body too large"
2911
+ },
2912
+ "422": {
2913
+ "content": {
2914
+ "application/json": {
2915
+ "schema": {
2916
+ "$ref": "#/components/schemas/Error"
2917
+ }
2918
+ }
2919
+ },
2920
+ "description": "Version unavailable"
2921
+ },
2922
+ "429": {
2923
+ "content": {
2924
+ "application/json": {
2925
+ "schema": {
2926
+ "$ref": "#/components/schemas/Error"
2927
+ }
2928
+ }
2929
+ },
2930
+ "description": "Limit reached"
2931
+ },
2932
+ "500": {
2933
+ "content": {
2934
+ "application/json": {
2935
+ "schema": {
2936
+ "$ref": "#/components/schemas/Error"
2937
+ }
2938
+ }
2939
+ },
2940
+ "description": "Unexpected failure"
2941
+ },
2942
+ "503": {
2943
+ "content": {
2944
+ "application/json": {
2945
+ "schema": {
2946
+ "$ref": "#/components/schemas/Error"
2947
+ }
2948
+ }
2949
+ },
2950
+ "description": "Dependency unavailable"
2951
+ }
2952
+ },
2953
+ "security": [
2954
+ {
2955
+ "bearerAuth": []
2956
+ }
2957
+ ]
2958
+ },
2959
+ "get": {
2960
+ "operationId": "getEnvironment",
2961
+ "parameters": [
2962
+ {
2963
+ "in": "path",
2964
+ "name": "environmentId",
2965
+ "required": true,
2966
+ "schema": {
2967
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
2968
+ "type": "string"
2969
+ }
2970
+ }
2971
+ ],
2972
+ "responses": {
2973
+ "200": {
2974
+ "content": {
2975
+ "application/json": {
2976
+ "schema": {
2977
+ "$ref": "#/components/schemas/Environment"
2978
+ }
2979
+ }
2980
+ },
2981
+ "description": "Environment"
2982
+ },
2983
+ "400": {
2984
+ "content": {
2985
+ "application/json": {
2986
+ "schema": {
2987
+ "$ref": "#/components/schemas/Error"
2988
+ }
2989
+ }
2990
+ },
2991
+ "description": "Invalid request"
2992
+ },
2993
+ "401": {
2994
+ "content": {
2995
+ "application/json": {
2996
+ "schema": {
2997
+ "$ref": "#/components/schemas/Error"
2998
+ }
2999
+ }
3000
+ },
3001
+ "description": "Authentication required"
3002
+ },
3003
+ "403": {
3004
+ "content": {
3005
+ "application/json": {
3006
+ "schema": {
3007
+ "$ref": "#/components/schemas/Error"
3008
+ }
3009
+ }
3010
+ },
3011
+ "description": "Permission denied"
3012
+ },
3013
+ "404": {
3014
+ "content": {
3015
+ "application/json": {
3016
+ "schema": {
3017
+ "$ref": "#/components/schemas/Error"
3018
+ }
3019
+ }
3020
+ },
3021
+ "description": "Resource not found"
3022
+ },
3023
+ "409": {
3024
+ "content": {
3025
+ "application/json": {
3026
+ "schema": {
3027
+ "$ref": "#/components/schemas/Error"
3028
+ }
3029
+ }
3030
+ },
3031
+ "description": "Conflicting request"
3032
+ },
3033
+ "413": {
3034
+ "content": {
3035
+ "application/json": {
3036
+ "schema": {
3037
+ "$ref": "#/components/schemas/Error"
3038
+ }
3039
+ }
3040
+ },
3041
+ "description": "Request body too large"
3042
+ },
3043
+ "422": {
3044
+ "content": {
3045
+ "application/json": {
3046
+ "schema": {
3047
+ "$ref": "#/components/schemas/Error"
3048
+ }
3049
+ }
3050
+ },
3051
+ "description": "Version unavailable"
3052
+ },
3053
+ "429": {
3054
+ "content": {
3055
+ "application/json": {
3056
+ "schema": {
3057
+ "$ref": "#/components/schemas/Error"
3058
+ }
3059
+ }
3060
+ },
3061
+ "description": "Limit reached"
3062
+ },
3063
+ "500": {
3064
+ "content": {
3065
+ "application/json": {
3066
+ "schema": {
3067
+ "$ref": "#/components/schemas/Error"
3068
+ }
3069
+ }
3070
+ },
3071
+ "description": "Unexpected failure"
3072
+ },
3073
+ "503": {
3074
+ "content": {
3075
+ "application/json": {
3076
+ "schema": {
3077
+ "$ref": "#/components/schemas/Error"
3078
+ }
3079
+ }
3080
+ },
3081
+ "description": "Dependency unavailable"
3082
+ }
3083
+ },
3084
+ "security": [
3085
+ {
3086
+ "bearerAuth": []
3087
+ }
3088
+ ]
3089
+ },
3090
+ "patch": {
3091
+ "operationId": "updateEnvironment",
3092
+ "parameters": [
3093
+ {
3094
+ "in": "path",
3095
+ "name": "environmentId",
3096
+ "required": true,
3097
+ "schema": {
3098
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
3099
+ "type": "string"
3100
+ }
3101
+ }
3102
+ ],
3103
+ "requestBody": {
3104
+ "content": {
3105
+ "application/json": {
3106
+ "schema": {
3107
+ "properties": {
3108
+ "labels": {
3109
+ "additionalProperties": {
3110
+ "maxLength": 256,
3111
+ "type": "string"
3112
+ },
3113
+ "type": "object"
3114
+ },
3115
+ "name": {
3116
+ "maxLength": 120,
3117
+ "minLength": 1,
3118
+ "type": ["string", "null"]
3119
+ }
3120
+ },
3121
+ "type": "object"
3122
+ }
3123
+ }
3124
+ },
3125
+ "required": true
3126
+ },
3127
+ "responses": {
3128
+ "200": {
3129
+ "content": {
3130
+ "application/json": {
3131
+ "schema": {
3132
+ "$ref": "#/components/schemas/Environment"
3133
+ }
3134
+ }
3135
+ },
3136
+ "description": "Environment updated"
3137
+ },
3138
+ "400": {
3139
+ "content": {
3140
+ "application/json": {
3141
+ "schema": {
3142
+ "$ref": "#/components/schemas/Error"
3143
+ }
3144
+ }
3145
+ },
3146
+ "description": "Invalid request"
3147
+ },
3148
+ "401": {
3149
+ "content": {
3150
+ "application/json": {
3151
+ "schema": {
3152
+ "$ref": "#/components/schemas/Error"
3153
+ }
3154
+ }
3155
+ },
3156
+ "description": "Authentication required"
3157
+ },
3158
+ "403": {
3159
+ "content": {
3160
+ "application/json": {
3161
+ "schema": {
3162
+ "$ref": "#/components/schemas/Error"
3163
+ }
3164
+ }
3165
+ },
3166
+ "description": "Permission denied"
3167
+ },
3168
+ "404": {
3169
+ "content": {
3170
+ "application/json": {
3171
+ "schema": {
3172
+ "$ref": "#/components/schemas/Error"
3173
+ }
3174
+ }
3175
+ },
3176
+ "description": "Resource not found"
3177
+ },
3178
+ "409": {
3179
+ "content": {
3180
+ "application/json": {
3181
+ "schema": {
3182
+ "$ref": "#/components/schemas/Error"
3183
+ }
3184
+ }
3185
+ },
3186
+ "description": "Conflicting request"
3187
+ },
3188
+ "413": {
3189
+ "content": {
3190
+ "application/json": {
3191
+ "schema": {
3192
+ "$ref": "#/components/schemas/Error"
3193
+ }
3194
+ }
3195
+ },
3196
+ "description": "Request body too large"
3197
+ },
3198
+ "422": {
3199
+ "content": {
3200
+ "application/json": {
3201
+ "schema": {
3202
+ "$ref": "#/components/schemas/Error"
3203
+ }
3204
+ }
3205
+ },
3206
+ "description": "Version unavailable"
3207
+ },
3208
+ "429": {
3209
+ "content": {
3210
+ "application/json": {
3211
+ "schema": {
3212
+ "$ref": "#/components/schemas/Error"
3213
+ }
3214
+ }
3215
+ },
3216
+ "description": "Limit reached"
3217
+ },
3218
+ "500": {
3219
+ "content": {
3220
+ "application/json": {
3221
+ "schema": {
3222
+ "$ref": "#/components/schemas/Error"
3223
+ }
3224
+ }
3225
+ },
3226
+ "description": "Unexpected failure"
3227
+ },
3228
+ "503": {
3229
+ "content": {
3230
+ "application/json": {
3231
+ "schema": {
3232
+ "$ref": "#/components/schemas/Error"
3233
+ }
3234
+ }
3235
+ },
3236
+ "description": "Dependency unavailable"
3237
+ }
3238
+ },
3239
+ "security": [
3240
+ {
3241
+ "bearerAuth": []
3242
+ }
3243
+ ]
3244
+ }
3245
+ },
3246
+ "/v1/environments/{environmentId}/apps/{appName}/credentials": {
3247
+ "post": {
3248
+ "operationId": "createCredentials",
3249
+ "parameters": [
3250
+ {
3251
+ "in": "path",
3252
+ "name": "environmentId",
3253
+ "required": true,
3254
+ "schema": {
3255
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
3256
+ "type": "string"
3257
+ }
3258
+ },
3259
+ {
3260
+ "in": "path",
3261
+ "name": "appName",
3262
+ "required": true,
3263
+ "schema": {
3264
+ "pattern": "^[a-z][a-z0-9-]{0,39}$",
3265
+ "type": "string"
3266
+ }
3267
+ }
3268
+ ],
3269
+ "requestBody": {
3270
+ "content": {
3271
+ "application/json": {
3272
+ "schema": {
3273
+ "properties": {
3274
+ "actorId": {
3275
+ "maxLength": 255,
3276
+ "minLength": 1,
3277
+ "type": "string"
3278
+ },
3279
+ "services": {
3280
+ "items": {
3281
+ "pattern": "^[a-z][a-z0-9-]{0,39}$",
3282
+ "type": "string"
3283
+ },
3284
+ "maxItems": 20,
3285
+ "type": "array"
3286
+ }
3287
+ },
3288
+ "type": "object"
3289
+ }
3290
+ }
3291
+ },
3292
+ "required": false
3293
+ },
3294
+ "responses": {
3295
+ "200": {
3296
+ "content": {
3297
+ "application/json": {
3298
+ "schema": {
3299
+ "$ref": "#/components/schemas/Credentials"
3300
+ }
3301
+ }
3302
+ },
3303
+ "description": "How to call one app as one actor; the same tokens each time"
3304
+ },
3305
+ "400": {
3306
+ "content": {
3307
+ "application/json": {
3308
+ "schema": {
3309
+ "$ref": "#/components/schemas/Error"
3310
+ }
3311
+ }
3312
+ },
3313
+ "description": "Invalid request"
3314
+ },
3315
+ "401": {
3316
+ "content": {
3317
+ "application/json": {
3318
+ "schema": {
3319
+ "$ref": "#/components/schemas/Error"
3320
+ }
3321
+ }
3322
+ },
3323
+ "description": "Authentication required"
3324
+ },
3325
+ "403": {
3326
+ "content": {
3327
+ "application/json": {
3328
+ "schema": {
3329
+ "$ref": "#/components/schemas/Error"
3330
+ }
3331
+ }
3332
+ },
3333
+ "description": "Permission denied"
3334
+ },
3335
+ "404": {
3336
+ "content": {
3337
+ "application/json": {
3338
+ "schema": {
3339
+ "$ref": "#/components/schemas/Error"
3340
+ }
3341
+ }
3342
+ },
3343
+ "description": "Resource not found"
3344
+ },
3345
+ "409": {
3346
+ "content": {
3347
+ "application/json": {
3348
+ "schema": {
3349
+ "$ref": "#/components/schemas/Error"
3350
+ }
3351
+ }
3352
+ },
3353
+ "description": "Conflicting request"
3354
+ },
3355
+ "413": {
3356
+ "content": {
3357
+ "application/json": {
3358
+ "schema": {
3359
+ "$ref": "#/components/schemas/Error"
3360
+ }
3361
+ }
3362
+ },
3363
+ "description": "Request body too large"
3364
+ },
3365
+ "422": {
3366
+ "content": {
3367
+ "application/json": {
3368
+ "schema": {
3369
+ "$ref": "#/components/schemas/Error"
3370
+ }
3371
+ }
3372
+ },
3373
+ "description": "Version unavailable"
3374
+ },
3375
+ "429": {
3376
+ "content": {
3377
+ "application/json": {
3378
+ "schema": {
3379
+ "$ref": "#/components/schemas/Error"
3380
+ }
3381
+ }
3382
+ },
3383
+ "description": "Limit reached"
3384
+ },
3385
+ "500": {
3386
+ "content": {
3387
+ "application/json": {
3388
+ "schema": {
3389
+ "$ref": "#/components/schemas/Error"
3390
+ }
3391
+ }
3392
+ },
3393
+ "description": "Unexpected failure"
3394
+ },
3395
+ "503": {
3396
+ "content": {
3397
+ "application/json": {
3398
+ "schema": {
3399
+ "$ref": "#/components/schemas/Error"
3400
+ }
3401
+ }
3402
+ },
3403
+ "description": "Dependency unavailable"
3404
+ }
3405
+ },
3406
+ "security": [
3407
+ {
3408
+ "bearerAuth": []
3409
+ }
3410
+ ]
3411
+ }
3412
+ },
3413
+ "/v1/environments/{environmentId}/apps/{appName}/ui-sessions": {
3414
+ "post": {
3415
+ "description": "Launches a browser session of one actor in an app's UI. The answer holds a one-use grant and no reusable credential. Return it only to the browser of the user it is for, which posts the grant to `exchangeUrl` from `launcherOrigin`.",
3416
+ "operationId": "launchUiSession",
3417
+ "parameters": [
3418
+ {
3419
+ "in": "path",
3420
+ "name": "environmentId",
3421
+ "required": true,
3422
+ "schema": {
3423
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
3424
+ "type": "string"
3425
+ }
3426
+ },
3427
+ {
3428
+ "in": "path",
3429
+ "name": "appName",
3430
+ "required": true,
3431
+ "schema": {
3432
+ "pattern": "^[a-z][a-z0-9-]{0,39}$",
3433
+ "type": "string"
3434
+ }
3435
+ }
3436
+ ],
3437
+ "requestBody": {
3438
+ "content": {
3439
+ "application/json": {
3440
+ "schema": {
3441
+ "$ref": "#/components/schemas/LaunchUiSession"
3442
+ }
3443
+ }
3444
+ },
3445
+ "required": true
3446
+ },
3447
+ "responses": {
3448
+ "201": {
2358
3449
  "content": {
2359
3450
  "application/json": {
2360
3451
  "schema": {
2361
- "properties": {
2362
- "data": {
2363
- "items": {
2364
- "$ref": "#/components/schemas/Principal"
2365
- },
2366
- "type": "array"
2367
- }
2368
- },
2369
- "required": ["data"],
2370
- "type": "object"
3452
+ "$ref": "#/components/schemas/UiSessionLaunch"
2371
3453
  }
2372
3454
  }
2373
3455
  },
2374
- "description": "Each principal that created an environment in the workspace, by name"
3456
+ "description": "A pending session and its one-use grant"
2375
3457
  },
2376
3458
  "400": {
2377
3459
  "content": {
@@ -2481,9 +3563,10 @@
2481
3563
  ]
2482
3564
  }
2483
3565
  },
2484
- "/v1/environments/{environmentId}": {
3566
+ "/v1/environments/{environmentId}/apps/{appName}/ui-sessions/{sessionId}": {
2485
3567
  "delete": {
2486
- "operationId": "deleteEnvironment",
3568
+ "description": "Revokes a browser session that the caller's own credential launched. Revoking again answers the same result. Another credential's session is not found.",
3569
+ "operationId": "revokeUiSession",
2487
3570
  "parameters": [
2488
3571
  {
2489
3572
  "in": "path",
@@ -2495,13 +3578,20 @@
2495
3578
  }
2496
3579
  },
2497
3580
  {
2498
- "in": "header",
2499
- "name": "idempotency-key",
2500
- "required": false,
3581
+ "in": "path",
3582
+ "name": "appName",
3583
+ "required": true,
2501
3584
  "schema": {
2502
- "maxLength": 128,
2503
- "minLength": 8,
2504
- "pattern": "^[A-Za-z0-9._:-]+$",
3585
+ "pattern": "^[a-z][a-z0-9-]{0,39}$",
3586
+ "type": "string"
3587
+ }
3588
+ },
3589
+ {
3590
+ "in": "path",
3591
+ "name": "sessionId",
3592
+ "required": true,
3593
+ "schema": {
3594
+ "pattern": "^uis_[0-9a-z]{26}$",
2505
3595
  "type": "string"
2506
3596
  }
2507
3597
  }
@@ -2511,11 +3601,11 @@
2511
3601
  "content": {
2512
3602
  "application/json": {
2513
3603
  "schema": {
2514
- "$ref": "#/components/schemas/Environment"
3604
+ "$ref": "#/components/schemas/UiSessionRevocation"
2515
3605
  }
2516
3606
  }
2517
3607
  },
2518
- "description": "Environment deleted; compute and data are released after the response"
3608
+ "description": "The session is revoked"
2519
3609
  },
2520
3610
  "400": {
2521
3611
  "content": {
@@ -2623,18 +3713,52 @@
2623
3713
  "bearerAuth": []
2624
3714
  }
2625
3715
  ]
2626
- },
3716
+ }
3717
+ },
3718
+ "/v1/imports": {
2627
3719
  "get": {
2628
- "operationId": "getEnvironment",
3720
+ "operationId": "listImports",
2629
3721
  "parameters": [
2630
3722
  {
2631
- "in": "path",
2632
- "name": "environmentId",
2633
- "required": true,
3723
+ "in": "query",
3724
+ "name": "limit",
3725
+ "required": false,
3726
+ "schema": {
3727
+ "default": 50,
3728
+ "maximum": 100,
3729
+ "minimum": 1,
3730
+ "type": "integer"
3731
+ }
3732
+ },
3733
+ {
3734
+ "in": "query",
3735
+ "name": "cursor",
3736
+ "required": false,
3737
+ "schema": {
3738
+ "maxLength": 2048,
3739
+ "type": "string"
3740
+ }
3741
+ },
3742
+ {
3743
+ "in": "query",
3744
+ "name": "workspaceId",
3745
+ "required": false,
2634
3746
  "schema": {
2635
3747
  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
2636
3748
  "type": "string"
2637
3749
  }
3750
+ },
3751
+ {
3752
+ "in": "query",
3753
+ "name": "status",
3754
+ "required": false,
3755
+ "schema": {
3756
+ "items": {
3757
+ "$ref": "#/components/schemas/ImportStatus"
3758
+ },
3759
+ "maxItems": 4,
3760
+ "type": "array"
3761
+ }
2638
3762
  }
2639
3763
  ],
2640
3764
  "responses": {
@@ -2642,11 +3766,23 @@
2642
3766
  "content": {
2643
3767
  "application/json": {
2644
3768
  "schema": {
2645
- "$ref": "#/components/schemas/Environment"
3769
+ "properties": {
3770
+ "data": {
3771
+ "items": {
3772
+ "$ref": "#/components/schemas/Import"
3773
+ },
3774
+ "type": "array"
3775
+ },
3776
+ "nextCursor": {
3777
+ "type": ["string", "null"]
3778
+ }
3779
+ },
3780
+ "required": ["data", "nextCursor"],
3781
+ "type": "object"
2646
3782
  }
2647
3783
  }
2648
3784
  },
2649
- "description": "Environment"
3785
+ "description": "The workspace's imports, newest first"
2650
3786
  },
2651
3787
  "400": {
2652
3788
  "content": {
@@ -2755,15 +3891,17 @@
2755
3891
  }
2756
3892
  ]
2757
3893
  },
2758
- "patch": {
2759
- "operationId": "updateEnvironment",
3894
+ "post": {
3895
+ "operationId": "createImport",
2760
3896
  "parameters": [
2761
3897
  {
2762
- "in": "path",
2763
- "name": "environmentId",
2764
- "required": true,
3898
+ "in": "header",
3899
+ "name": "idempotency-key",
3900
+ "required": false,
2765
3901
  "schema": {
2766
- "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
3902
+ "maxLength": 128,
3903
+ "minLength": 8,
3904
+ "pattern": "^[A-Za-z0-9._:-]+$",
2767
3905
  "type": "string"
2768
3906
  }
2769
3907
  }
@@ -2773,19 +3911,24 @@
2773
3911
  "application/json": {
2774
3912
  "schema": {
2775
3913
  "properties": {
2776
- "labels": {
2777
- "additionalProperties": {
2778
- "maxLength": 256,
2779
- "type": "string"
2780
- },
2781
- "type": "object"
3914
+ "digest": {
3915
+ "description": "`sha256:` and the lowercase hex SHA-256 of the zip file. The check refuses a zip file with another digest.",
3916
+ "pattern": "^sha256:[0-9a-f]{64}$",
3917
+ "type": "string"
2782
3918
  },
2783
- "name": {
2784
- "maxLength": 120,
2785
- "minLength": 1,
2786
- "type": ["string", "null"]
3919
+ "sizeBytes": {
3920
+ "description": "The size of the zip file in bytes. The upload URL takes exactly this many bytes.",
3921
+ "maximum": 67108864,
3922
+ "minimum": 1,
3923
+ "type": "integer"
3924
+ },
3925
+ "workspaceId": {
3926
+ "description": "The import's workspace. A member must send it. An API key's own workspace is the default.",
3927
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
3928
+ "type": "string"
2787
3929
  }
2788
3930
  },
3931
+ "required": ["sizeBytes", "digest"],
2789
3932
  "type": "object"
2790
3933
  }
2791
3934
  }
@@ -2797,11 +3940,21 @@
2797
3940
  "content": {
2798
3941
  "application/json": {
2799
3942
  "schema": {
2800
- "$ref": "#/components/schemas/Environment"
3943
+ "$ref": "#/components/schemas/CreatedImport"
2801
3944
  }
2802
3945
  }
2803
3946
  },
2804
- "description": "Environment updated"
3947
+ "description": "The import an earlier request with this Idempotency-Key created, as it is now, with a new upload URL while it is `uploading`"
3948
+ },
3949
+ "201": {
3950
+ "content": {
3951
+ "application/json": {
3952
+ "schema": {
3953
+ "$ref": "#/components/schemas/CreatedImport"
3954
+ }
3955
+ }
3956
+ },
3957
+ "description": "Import created; send its zip file to the upload URL, then complete it"
2805
3958
  },
2806
3959
  "400": {
2807
3960
  "content": {
@@ -2911,64 +4064,30 @@
2911
4064
  ]
2912
4065
  }
2913
4066
  },
2914
- "/v1/environments/{environmentId}/apps/{appName}/credentials": {
2915
- "post": {
2916
- "operationId": "createCredentials",
4067
+ "/v1/imports/{importId}": {
4068
+ "delete": {
4069
+ "operationId": "deleteImport",
2917
4070
  "parameters": [
2918
4071
  {
2919
4072
  "in": "path",
2920
- "name": "environmentId",
4073
+ "name": "importId",
2921
4074
  "required": true,
2922
4075
  "schema": {
2923
4076
  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
2924
4077
  "type": "string"
2925
4078
  }
2926
- },
2927
- {
2928
- "in": "path",
2929
- "name": "appName",
2930
- "required": true,
2931
- "schema": {
2932
- "pattern": "^[a-z][a-z0-9-]{0,39}$",
2933
- "type": "string"
2934
- }
2935
4079
  }
2936
4080
  ],
2937
- "requestBody": {
2938
- "content": {
2939
- "application/json": {
2940
- "schema": {
2941
- "properties": {
2942
- "actorId": {
2943
- "maxLength": 255,
2944
- "minLength": 1,
2945
- "type": "string"
2946
- },
2947
- "services": {
2948
- "items": {
2949
- "pattern": "^[a-z][a-z0-9-]{0,39}$",
2950
- "type": "string"
2951
- },
2952
- "maxItems": 20,
2953
- "type": "array"
2954
- }
2955
- },
2956
- "type": "object"
2957
- }
2958
- }
2959
- },
2960
- "required": false
2961
- },
2962
4081
  "responses": {
2963
4082
  "200": {
2964
4083
  "content": {
2965
4084
  "application/json": {
2966
4085
  "schema": {
2967
- "$ref": "#/components/schemas/Credentials"
4086
+ "$ref": "#/components/schemas/Import"
2968
4087
  }
2969
4088
  }
2970
4089
  },
2971
- "description": "How to call one app as one actor; the same tokens each time"
4090
+ "description": "Import deleted, with its problems cleared and its zip file removed"
2972
4091
  },
2973
4092
  "400": {
2974
4093
  "content": {
@@ -3076,52 +4195,30 @@
3076
4195
  "bearerAuth": []
3077
4196
  }
3078
4197
  ]
3079
- }
3080
- },
3081
- "/v1/environments/{environmentId}/apps/{appName}/ui-sessions": {
3082
- "post": {
3083
- "description": "Launches a browser session of one actor in an app's UI. The answer holds a one-use grant and no reusable credential. Return it only to the browser of the user it is for, which posts the grant to `exchangeUrl` from `launcherOrigin`.",
3084
- "operationId": "launchUiSession",
4198
+ },
4199
+ "get": {
4200
+ "operationId": "getImport",
3085
4201
  "parameters": [
3086
4202
  {
3087
4203
  "in": "path",
3088
- "name": "environmentId",
4204
+ "name": "importId",
3089
4205
  "required": true,
3090
4206
  "schema": {
3091
4207
  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
3092
4208
  "type": "string"
3093
4209
  }
3094
- },
3095
- {
3096
- "in": "path",
3097
- "name": "appName",
3098
- "required": true,
3099
- "schema": {
3100
- "pattern": "^[a-z][a-z0-9-]{0,39}$",
3101
- "type": "string"
3102
- }
3103
4210
  }
3104
4211
  ],
3105
- "requestBody": {
3106
- "content": {
3107
- "application/json": {
3108
- "schema": {
3109
- "$ref": "#/components/schemas/LaunchUiSession"
3110
- }
3111
- }
3112
- },
3113
- "required": true
3114
- },
3115
4212
  "responses": {
3116
- "201": {
4213
+ "200": {
3117
4214
  "content": {
3118
4215
  "application/json": {
3119
4216
  "schema": {
3120
- "$ref": "#/components/schemas/UiSessionLaunch"
4217
+ "$ref": "#/components/schemas/Import"
3121
4218
  }
3122
4219
  }
3123
4220
  },
3124
- "description": "A pending session and its one-use grant"
4221
+ "description": "Import"
3125
4222
  },
3126
4223
  "400": {
3127
4224
  "content": {
@@ -3231,37 +4328,18 @@
3231
4328
  ]
3232
4329
  }
3233
4330
  },
3234
- "/v1/environments/{environmentId}/apps/{appName}/ui-sessions/{sessionId}": {
3235
- "delete": {
3236
- "description": "Revokes a browser session that the caller's own credential launched. Revoking again answers the same result. Another credential's session is not found.",
3237
- "operationId": "revokeUiSession",
4331
+ "/v1/imports/{importId}/complete": {
4332
+ "post": {
4333
+ "operationId": "completeImport",
3238
4334
  "parameters": [
3239
4335
  {
3240
4336
  "in": "path",
3241
- "name": "environmentId",
4337
+ "name": "importId",
3242
4338
  "required": true,
3243
4339
  "schema": {
3244
4340
  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
3245
4341
  "type": "string"
3246
4342
  }
3247
- },
3248
- {
3249
- "in": "path",
3250
- "name": "appName",
3251
- "required": true,
3252
- "schema": {
3253
- "pattern": "^[a-z][a-z0-9-]{0,39}$",
3254
- "type": "string"
3255
- }
3256
- },
3257
- {
3258
- "in": "path",
3259
- "name": "sessionId",
3260
- "required": true,
3261
- "schema": {
3262
- "pattern": "^uis_[0-9a-z]{26}$",
3263
- "type": "string"
3264
- }
3265
4343
  }
3266
4344
  ],
3267
4345
  "responses": {
@@ -3269,11 +4347,11 @@
3269
4347
  "content": {
3270
4348
  "application/json": {
3271
4349
  "schema": {
3272
- "$ref": "#/components/schemas/UiSessionRevocation"
4350
+ "$ref": "#/components/schemas/Import"
3273
4351
  }
3274
4352
  }
3275
4353
  },
3276
- "description": "The session is revoked"
4354
+ "description": "The import after the check of its zip file: `ready`, or `invalid` with its problems"
3277
4355
  },
3278
4356
  "400": {
3279
4357
  "content": {
@@ -4556,19 +5634,7 @@
4556
5634
  "content": {
4557
5635
  "application/json": {
4558
5636
  "schema": {
4559
- "properties": {
4560
- "environmentId": {
4561
- "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
4562
- "type": "string"
4563
- },
4564
- "name": {
4565
- "maxLength": 120,
4566
- "minLength": 1,
4567
- "type": ["string", "null"]
4568
- }
4569
- },
4570
- "required": ["environmentId"],
4571
- "type": "object"
5637
+ "$ref": "#/components/schemas/CreateSnapshot"
4572
5638
  }
4573
5639
  }
4574
5640
  },