@reduck-ai/sdk 2.0.0 → 3.0.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.
package/openapi.json CHANGED
@@ -738,7 +738,14 @@
738
738
  "additionalProperties": false,
739
739
  "properties": {
740
740
  "account": {
741
- "description": "The identity a probe script or the SSO sign-in reported (usually an email). Null until one has; it is never set by hand.",
741
+ "description": "The account the last check that found the session signed in named (usually an email). Null until one has, or when that check named none; it is never set by hand.",
742
+ "type": [
743
+ "string",
744
+ "null"
745
+ ]
746
+ },
747
+ "checked_at": {
748
+ "description": "When the last check of its account that answered started. A check that failed or did not end leaves it. Null until one has answered. Cookies synced after it may be signed in to another account.",
742
749
  "type": [
743
750
  "string",
744
751
  "null"
@@ -748,48 +755,60 @@
748
755
  "type": "string"
749
756
  },
750
757
  "host": {
751
- "description": "The website, bare: no scheme, no leading \"www.\", e.g. \"linkedin.com\". For an SSO connector this is the identity provider, e.g. \"accounts.google.com\".",
758
+ "description": "The website, bare: no scheme, no leading \"www.\", e.g. \"linkedin.com\".",
752
759
  "type": "string"
753
760
  },
754
761
  "id": {
755
762
  "type": "string"
756
763
  },
757
- "is_sso": {
758
- "description": "True when this is an identity-provider session usable for \"Continue with <provider>\".",
759
- "type": "boolean"
760
- },
761
- "label": {
762
- "description": "The name a person gave this connector, to tell it apart from the host's others.",
764
+ "logged_in": {
765
+ "description": "Whether that check found the session signed in. Null until one has answered.",
763
766
  "type": [
764
- "string",
767
+ "boolean",
765
768
  "null"
766
769
  ]
767
770
  },
768
771
  "profile_id": {
769
- "description": "The end-user this connector is kept for, as the developer named them. Empty for the account's own connectors.",
770
- "type": "string"
771
- },
772
- "sso_account": {
773
- "description": "For a connector created through an SSO connector: that SSO's account (email). The reference autoreconnect follows. Null otherwise.",
772
+ "description": "The profile it sits in; null for none.",
774
773
  "type": [
775
774
  "string",
776
775
  "null"
777
776
  ]
778
777
  },
778
+ "subdomains": {
779
+ "description": "The subdomains of its host that its cookies are set on, without Chrome's leading dot, in alphabetical order. Names only, never a value.",
780
+ "items": {
781
+ "type": "string"
782
+ },
783
+ "type": "array"
784
+ },
785
+ "synced_at": {
786
+ "description": "When its cookies were last saved: from a sign-in or a save through the API. A run writing back the cookies it refreshed does not move it.",
787
+ "type": "string"
788
+ },
779
789
  "updated_at": {
780
790
  "type": "string"
791
+ },
792
+ "used_at": {
793
+ "description": "When a run last used it. Null until one has.",
794
+ "type": [
795
+ "string",
796
+ "null"
797
+ ]
781
798
  }
782
799
  },
783
800
  "required": [
784
- "id",
785
- "host",
786
- "profile_id",
787
801
  "account",
788
- "label",
789
- "is_sso",
790
- "sso_account",
802
+ "checked_at",
791
803
  "created_at",
792
- "updated_at"
804
+ "host",
805
+ "id",
806
+ "logged_in",
807
+ "profile_id",
808
+ "subdomains",
809
+ "synced_at",
810
+ "updated_at",
811
+ "used_at"
793
812
  ],
794
813
  "type": "object"
795
814
  },
@@ -838,61 +857,168 @@
838
857
  ],
839
858
  "type": "object"
840
859
  },
841
- "ConnectorLoginCredential": {
860
+ "ConnectorLink": {
842
861
  "additionalProperties": false,
843
862
  "properties": {
844
- "password": {
863
+ "connector_id": {
864
+ "description": "The ID of the Auth session cookies the login saved, once the link is `done`. Absent before, and once those Auth session cookies are deleted.",
845
865
  "type": "string"
846
866
  },
847
- "username": {
867
+ "created_at": {
868
+ "type": "string"
869
+ },
870
+ "error": {
871
+ "description": "Why the browser closed with nothing saved, when something went wrong.",
872
+ "type": "string"
873
+ },
874
+ "expires_at": {
875
+ "description": "While nobody has opened the link, when it stops opening. While its browser is open, when the browser closes, saving what it holds by then.",
848
876
  "type": "string"
849
- }
850
- },
851
- "type": "object"
852
- },
853
- "ConnectorLoginHost": {
854
- "additionalProperties": false,
855
- "properties": {
856
- "cookies": {
857
- "description": "Cookies stored for this site; 0 until the sign-in lands.",
858
- "type": "number"
859
877
  },
860
878
  "host": {
879
+ "description": "The site whose cookies become the Auth session cookies, bare (e.g. \"linkedin.com\").",
861
880
  "type": "string"
862
881
  },
863
- "stored": {
864
- "type": "boolean"
882
+ "id": {
883
+ "type": "string"
884
+ },
885
+ "page_url": {
886
+ "description": "Where the open browser stands, so a person watching can tell whether the login has moved.",
887
+ "type": "string"
888
+ },
889
+ "profile_id": {
890
+ "description": "The profile the Auth session cookies are saved into; absent for none.",
891
+ "type": "string"
892
+ },
893
+ "return_url": {
894
+ "description": "Where the page sends the person once the login ends, or when its browser cannot open, with `link_id` and `status` added to its query. Absent: the page tells them they can close it.",
895
+ "type": "string"
896
+ },
897
+ "start_url": {
898
+ "description": "Where the browser opens.",
899
+ "type": "string"
900
+ },
901
+ "status": {
902
+ "$ref": "#/components/schemas/ConnectorLinkStatus",
903
+ "description": "`waiting`: the browser is not closed yet. `done`: the browser closed with the cookies saved. `failed`: it closed with nothing saved. `expired`: nobody opened the link in time."
865
904
  }
866
905
  },
867
906
  "required": [
907
+ "id",
908
+ "status",
868
909
  "host",
869
- "cookies",
870
- "stored"
910
+ "start_url",
911
+ "expires_at",
912
+ "created_at"
871
913
  ],
872
914
  "type": "object"
873
915
  },
874
- "ConnectorLoginStatus": {
916
+ "ConnectorLinkStatus": {
875
917
  "enum": [
876
- "waiting",
877
- "stored",
878
918
  "done",
879
- "failed"
919
+ "expired",
920
+ "failed",
921
+ "waiting"
880
922
  ],
881
923
  "type": "string"
882
924
  },
883
925
  "ConnectorProfile": {
884
926
  "additionalProperties": false,
885
927
  "properties": {
886
- "connectors": {
887
- "type": "number"
928
+ "created_at": {
929
+ "type": "string"
930
+ },
931
+ "id": {
932
+ "type": "string"
933
+ },
934
+ "name": {
935
+ "description": "Unique among the user's profiles.",
936
+ "type": "string"
937
+ },
938
+ "updated_at": {
939
+ "type": "string"
940
+ }
941
+ },
942
+ "required": [
943
+ "id",
944
+ "name",
945
+ "created_at",
946
+ "updated_at"
947
+ ],
948
+ "type": "object"
949
+ },
950
+ "ConnectorSummary": {
951
+ "additionalProperties": false,
952
+ "properties": {
953
+ "account": {
954
+ "description": "The account the last check that found the session signed in named (usually an email). Null until one has, or when that check named none; it is never set by hand.",
955
+ "type": [
956
+ "string",
957
+ "null"
958
+ ]
959
+ },
960
+ "checked_at": {
961
+ "description": "When the last check of its account that answered started. A check that failed or did not end leaves it. Null until one has answered. Cookies synced after it may be signed in to another account.",
962
+ "type": [
963
+ "string",
964
+ "null"
965
+ ]
966
+ },
967
+ "created_at": {
968
+ "type": "string"
969
+ },
970
+ "host": {
971
+ "description": "The website, bare: no scheme, no leading \"www.\", e.g. \"linkedin.com\".",
972
+ "type": "string"
973
+ },
974
+ "id": {
975
+ "type": "string"
976
+ },
977
+ "logged_in": {
978
+ "description": "Whether that check found the session signed in. Null until one has answered.",
979
+ "type": [
980
+ "boolean",
981
+ "null"
982
+ ]
888
983
  },
889
984
  "profile_id": {
985
+ "description": "The profile it sits in; null for none.",
986
+ "type": [
987
+ "string",
988
+ "null"
989
+ ]
990
+ },
991
+ "subdomain_count": {
992
+ "description": "How many subdomains of its host its cookies are set on.",
993
+ "type": "number"
994
+ },
995
+ "synced_at": {
996
+ "description": "When its cookies were last saved: from a sign-in or a save through the API. A run writing back the cookies it refreshed does not move it.",
997
+ "type": "string"
998
+ },
999
+ "updated_at": {
890
1000
  "type": "string"
1001
+ },
1002
+ "used_at": {
1003
+ "description": "When a run last used it. Null until one has.",
1004
+ "type": [
1005
+ "string",
1006
+ "null"
1007
+ ]
891
1008
  }
892
1009
  },
893
1010
  "required": [
1011
+ "account",
1012
+ "checked_at",
1013
+ "created_at",
1014
+ "host",
1015
+ "id",
1016
+ "logged_in",
894
1017
  "profile_id",
895
- "connectors"
1018
+ "subdomain_count",
1019
+ "synced_at",
1020
+ "updated_at",
1021
+ "used_at"
896
1022
  ],
897
1023
  "type": "object"
898
1024
  },
@@ -900,7 +1026,14 @@
900
1026
  "additionalProperties": false,
901
1027
  "properties": {
902
1028
  "account": {
903
- "description": "The identity a probe script or the SSO sign-in reported (usually an email). Null until one has; it is never set by hand.",
1029
+ "description": "The account the last check that found the session signed in named (usually an email). Null until one has, or when that check named none; it is never set by hand.",
1030
+ "type": [
1031
+ "string",
1032
+ "null"
1033
+ ]
1034
+ },
1035
+ "checked_at": {
1036
+ "description": "When the last check of its account that answered started. A check that failed or did not end leaves it. Null until one has answered. Cookies synced after it may be signed in to another account.",
904
1037
  "type": [
905
1038
  "string",
906
1039
  "null"
@@ -916,49 +1049,123 @@
916
1049
  "type": "string"
917
1050
  },
918
1051
  "host": {
919
- "description": "The website, bare: no scheme, no leading \"www.\", e.g. \"linkedin.com\". For an SSO connector this is the identity provider, e.g. \"accounts.google.com\".",
1052
+ "description": "The website, bare: no scheme, no leading \"www.\", e.g. \"linkedin.com\".",
920
1053
  "type": "string"
921
1054
  },
922
1055
  "id": {
923
1056
  "type": "string"
924
1057
  },
925
- "is_sso": {
926
- "description": "True when this is an identity-provider session usable for \"Continue with <provider>\".",
927
- "type": "boolean"
928
- },
929
- "label": {
930
- "description": "The name a person gave this connector, to tell it apart from the host's others.",
1058
+ "logged_in": {
1059
+ "description": "Whether that check found the session signed in. Null until one has answered.",
931
1060
  "type": [
932
- "string",
1061
+ "boolean",
933
1062
  "null"
934
1063
  ]
935
1064
  },
936
1065
  "profile_id": {
937
- "description": "The end-user this connector is kept for, as the developer named them. Empty for the account's own connectors.",
938
- "type": "string"
939
- },
940
- "sso_account": {
941
- "description": "For a connector created through an SSO connector: that SSO's account (email). The reference autoreconnect follows. Null otherwise.",
1066
+ "description": "The profile it sits in; null for none.",
942
1067
  "type": [
943
1068
  "string",
944
1069
  "null"
945
1070
  ]
946
1071
  },
1072
+ "subdomains": {
1073
+ "description": "The subdomains of its host that its cookies are set on, without Chrome's leading dot, in alphabetical order. Names only, never a value.",
1074
+ "items": {
1075
+ "type": "string"
1076
+ },
1077
+ "type": "array"
1078
+ },
1079
+ "synced_at": {
1080
+ "description": "When its cookies were last saved: from a sign-in or a save through the API. A run writing back the cookies it refreshed does not move it.",
1081
+ "type": "string"
1082
+ },
947
1083
  "updated_at": {
948
1084
  "type": "string"
1085
+ },
1086
+ "used_at": {
1087
+ "description": "When a run last used it. Null until one has.",
1088
+ "type": [
1089
+ "string",
1090
+ "null"
1091
+ ]
949
1092
  }
950
1093
  },
951
1094
  "required": [
952
1095
  "account",
1096
+ "checked_at",
953
1097
  "cookies",
954
1098
  "created_at",
955
1099
  "host",
956
1100
  "id",
957
- "is_sso",
958
- "label",
1101
+ "logged_in",
959
1102
  "profile_id",
960
- "sso_account",
961
- "updated_at"
1103
+ "subdomains",
1104
+ "synced_at",
1105
+ "updated_at",
1106
+ "used_at"
1107
+ ],
1108
+ "type": "object"
1109
+ },
1110
+ "CreatedConnectorLink": {
1111
+ "additionalProperties": false,
1112
+ "description": "A link as its creation answers it, the one time its address is given.",
1113
+ "properties": {
1114
+ "connector_id": {
1115
+ "description": "The ID of the Auth session cookies the login saved, once the link is `done`. Absent before, and once those Auth session cookies are deleted.",
1116
+ "type": "string"
1117
+ },
1118
+ "created_at": {
1119
+ "type": "string"
1120
+ },
1121
+ "error": {
1122
+ "description": "Why the browser closed with nothing saved, when something went wrong.",
1123
+ "type": "string"
1124
+ },
1125
+ "expires_at": {
1126
+ "description": "While nobody has opened the link, when it stops opening. While its browser is open, when the browser closes, saving what it holds by then.",
1127
+ "type": "string"
1128
+ },
1129
+ "host": {
1130
+ "description": "The site whose cookies become the Auth session cookies, bare (e.g. \"linkedin.com\").",
1131
+ "type": "string"
1132
+ },
1133
+ "id": {
1134
+ "type": "string"
1135
+ },
1136
+ "page_url": {
1137
+ "description": "Where the open browser stands, so a person watching can tell whether the login has moved.",
1138
+ "type": "string"
1139
+ },
1140
+ "profile_id": {
1141
+ "description": "The profile the Auth session cookies are saved into; absent for none.",
1142
+ "type": "string"
1143
+ },
1144
+ "return_url": {
1145
+ "description": "Where the page sends the person once the login ends, or when its browser cannot open, with `link_id` and `status` added to its query. Absent: the page tells them they can close it.",
1146
+ "type": "string"
1147
+ },
1148
+ "start_url": {
1149
+ "description": "Where the browser opens.",
1150
+ "type": "string"
1151
+ },
1152
+ "status": {
1153
+ "$ref": "#/components/schemas/ConnectorLinkStatus",
1154
+ "description": "`waiting`: the browser is not closed yet. `done`: the browser closed with the cookies saved. `failed`: it closed with nothing saved. `expired`: nobody opened the link in time."
1155
+ },
1156
+ "url": {
1157
+ "description": "The page to sign in on. Only the creation of the link gives it: keep it. Anyone who has it can use it, with or without a Reduck account, until the link is over: give it only to the person who must sign in.",
1158
+ "type": "string"
1159
+ }
1160
+ },
1161
+ "required": [
1162
+ "created_at",
1163
+ "expires_at",
1164
+ "host",
1165
+ "id",
1166
+ "start_url",
1167
+ "status",
1168
+ "url"
962
1169
  ],
963
1170
  "type": "object"
964
1171
  },
@@ -1059,6 +1266,7 @@
1059
1266
  "method_not_allowed",
1060
1267
  "request_timeout",
1061
1268
  "conflict",
1269
+ "gone",
1062
1270
  "content_too_large",
1063
1271
  "unsupported_media_type",
1064
1272
  "unprocessable_content",
@@ -1067,6 +1275,7 @@
1067
1275
  "internal_error",
1068
1276
  "upstream_failed",
1069
1277
  "unavailable",
1278
+ "upstream_timeout",
1070
1279
  "device_not_found",
1071
1280
  "feature_locked",
1072
1281
  "name_taken",
@@ -1078,6 +1287,7 @@
1078
1287
  "stale_version",
1079
1288
  "draft_changed",
1080
1289
  "noncompliant",
1290
+ "whoami_format",
1081
1291
  "eval_args_invalid",
1082
1292
  "evals_failing",
1083
1293
  "type_errors",
@@ -1085,14 +1295,12 @@
1085
1295
  "release_not_published",
1086
1296
  "no_release",
1087
1297
  "migration_missing",
1088
- "migration_edited",
1089
- "connector_ambiguous"
1298
+ "migration_edited"
1090
1299
  ],
1091
1300
  "type": "string",
1092
1301
  "x-enum-descriptions": {
1093
1302
  "archived": "The resource is archived. Restore it first.",
1094
1303
  "conflict": "The request conflicts with the current state of the resource.",
1095
- "connector_ambiguous": "More than one connector matches. `connectors` lists them: name one.",
1096
1304
  "content_too_large": "The request body is larger than this endpoint accepts.",
1097
1305
  "dependency_failed": "A service that the request needs refused it. The message gives its answer.",
1098
1306
  "device_not_found": "The device does not exist, or it belongs to another account. A browser that holds this device must pair again.",
@@ -1102,6 +1310,7 @@
1102
1310
  "evals_failing": "An eval fails, or did not run, on this version. `evals` gives each eval.",
1103
1311
  "feature_locked": "The account does not have this feature. The message says where to ask for access.",
1104
1312
  "forbidden": "The credential does not give access to this action.",
1313
+ "gone": "The resource is no longer available.",
1105
1314
  "internal_error": "An unexpected error occurred on the server.",
1106
1315
  "invalid_request": "The request is not valid. When the body failed validation, `variables` names the fields that are wrong.",
1107
1316
  "method_not_allowed": "This endpoint does not accept this method.",
@@ -1124,7 +1333,9 @@
1124
1333
  "unavailable": "The service is not available at this time. Send the request again later.",
1125
1334
  "unprocessable_content": "The request is valid, but its content cannot be accepted.",
1126
1335
  "unsupported_media_type": "The request body is not in a format that this endpoint accepts.",
1127
- "upstream_failed": "A service that the request needs did not answer correctly."
1336
+ "upstream_failed": "A service that the request needs did not answer correctly.",
1337
+ "upstream_timeout": "A service that the request needs did not answer in time.",
1338
+ "whoami_format": "Whoami scripts (slug `whoami`) must follow the whoami format. The version must be loggedIn, and its output schema must declare `loggedIn` as a required boolean and give each other field of the format the correct type. `problems` gives each problem."
1128
1339
  }
1129
1340
  },
1130
1341
  "error": {
@@ -1252,6 +1463,15 @@
1252
1463
  ],
1253
1464
  "type": "object"
1254
1465
  },
1466
+ "ManagedRegion": {
1467
+ "enum": [
1468
+ "eu-central-1",
1469
+ "us-east-1",
1470
+ "us-west-2",
1471
+ "ap-southeast-1"
1472
+ ],
1473
+ "type": "string"
1474
+ },
1255
1475
  "ManagedUsage": {
1256
1476
  "additionalProperties": false,
1257
1477
  "properties": {
@@ -1364,12 +1584,12 @@
1364
1584
  ],
1365
1585
  "type": "object"
1366
1586
  },
1367
- "PaginatedResponseRun": {
1587
+ "PaginatedResponseConnectorLink": {
1368
1588
  "additionalProperties": false,
1369
1589
  "properties": {
1370
1590
  "data": {
1371
1591
  "items": {
1372
- "$ref": "#/components/schemas/Run"
1592
+ "$ref": "#/components/schemas/ConnectorLink"
1373
1593
  },
1374
1594
  "type": "array"
1375
1595
  },
@@ -1386,12 +1606,12 @@
1386
1606
  ],
1387
1607
  "type": "object"
1388
1608
  },
1389
- "PaginatedResponseScriptLibVersionSummary": {
1609
+ "PaginatedResponseConnectorProfile": {
1390
1610
  "additionalProperties": false,
1391
1611
  "properties": {
1392
1612
  "data": {
1393
1613
  "items": {
1394
- "$ref": "#/components/schemas/ScriptLibVersionSummary"
1614
+ "$ref": "#/components/schemas/ConnectorProfile"
1395
1615
  },
1396
1616
  "type": "array"
1397
1617
  },
@@ -1408,12 +1628,12 @@
1408
1628
  ],
1409
1629
  "type": "object"
1410
1630
  },
1411
- "PaginatedResponseScriptSummary": {
1631
+ "PaginatedResponseConnectorSummary": {
1412
1632
  "additionalProperties": false,
1413
1633
  "properties": {
1414
1634
  "data": {
1415
1635
  "items": {
1416
- "$ref": "#/components/schemas/ScriptSummary"
1636
+ "$ref": "#/components/schemas/ConnectorSummary"
1417
1637
  },
1418
1638
  "type": "array"
1419
1639
  },
@@ -1430,12 +1650,12 @@
1430
1650
  ],
1431
1651
  "type": "object"
1432
1652
  },
1433
- "PaginatedResponseScriptVersionSummary": {
1653
+ "PaginatedResponseRun": {
1434
1654
  "additionalProperties": false,
1435
1655
  "properties": {
1436
1656
  "data": {
1437
1657
  "items": {
1438
- "$ref": "#/components/schemas/ScriptVersionSummary"
1658
+ "$ref": "#/components/schemas/Run"
1439
1659
  },
1440
1660
  "type": "array"
1441
1661
  },
@@ -1452,29 +1672,109 @@
1452
1672
  ],
1453
1673
  "type": "object"
1454
1674
  },
1455
- "Recordstringstring": {
1456
- "additionalProperties": {
1457
- "type": "string"
1675
+ "PaginatedResponseScriptLibVersionSummary": {
1676
+ "additionalProperties": false,
1677
+ "properties": {
1678
+ "data": {
1679
+ "items": {
1680
+ "$ref": "#/components/schemas/ScriptLibVersionSummary"
1681
+ },
1682
+ "type": "array"
1683
+ },
1684
+ "has_next_page": {
1685
+ "type": "boolean"
1686
+ },
1687
+ "total_count": {
1688
+ "type": "number"
1689
+ }
1458
1690
  },
1691
+ "required": [
1692
+ "data",
1693
+ "has_next_page"
1694
+ ],
1459
1695
  "type": "object"
1460
1696
  },
1461
- "Recordstringunknown": {
1462
- "additionalProperties": {},
1463
- "type": "object"
1464
- },
1465
- "Run": {
1697
+ "PaginatedResponseScriptSummary": {
1466
1698
  "additionalProperties": false,
1467
1699
  "properties": {
1468
- "args": {
1469
- "type": "object"
1700
+ "data": {
1701
+ "items": {
1702
+ "$ref": "#/components/schemas/ScriptSummary"
1703
+ },
1704
+ "type": "array"
1470
1705
  },
1471
- "batch_id": {
1706
+ "has_next_page": {
1707
+ "type": "boolean"
1708
+ },
1709
+ "total_count": {
1710
+ "type": "number"
1711
+ }
1712
+ },
1713
+ "required": [
1714
+ "data",
1715
+ "has_next_page"
1716
+ ],
1717
+ "type": "object"
1718
+ },
1719
+ "PaginatedResponseScriptVersionSummary": {
1720
+ "additionalProperties": false,
1721
+ "properties": {
1722
+ "data": {
1723
+ "items": {
1724
+ "$ref": "#/components/schemas/ScriptVersionSummary"
1725
+ },
1726
+ "type": "array"
1727
+ },
1728
+ "has_next_page": {
1729
+ "type": "boolean"
1730
+ },
1731
+ "total_count": {
1732
+ "type": "number"
1733
+ }
1734
+ },
1735
+ "required": [
1736
+ "data",
1737
+ "has_next_page"
1738
+ ],
1739
+ "type": "object"
1740
+ },
1741
+ "Recordstringstring": {
1742
+ "additionalProperties": {
1743
+ "type": "string"
1744
+ },
1745
+ "type": "object"
1746
+ },
1747
+ "Recordstringunknown": {
1748
+ "additionalProperties": {},
1749
+ "type": "object"
1750
+ },
1751
+ "Run": {
1752
+ "additionalProperties": false,
1753
+ "properties": {
1754
+ "args": {
1755
+ "type": "object"
1756
+ },
1757
+ "batch_id": {
1472
1758
  "description": "The batch of scripts the run is part of, to read them all with GET /api/runs?batch_id=. Null for a run of one script.",
1473
1759
  "type": [
1474
1760
  "string",
1475
1761
  "null"
1476
1762
  ]
1477
1763
  },
1764
+ "batch_index": {
1765
+ "description": "The run's place in its batch, from 1, in the order the scripts were given. Null for a run of one script.",
1766
+ "type": [
1767
+ "number",
1768
+ "null"
1769
+ ]
1770
+ },
1771
+ "batch_total": {
1772
+ "description": "How many scripts its batch was given. Null for a run of one script.",
1773
+ "type": [
1774
+ "number",
1775
+ "null"
1776
+ ]
1777
+ },
1478
1778
  "browser": {
1479
1779
  "$ref": "#/components/schemas/RunDevice"
1480
1780
  },
@@ -1589,6 +1889,8 @@
1589
1889
  "error_type",
1590
1890
  "external_message",
1591
1891
  "batch_id",
1892
+ "batch_index",
1893
+ "batch_total",
1592
1894
  "script"
1593
1895
  ],
1594
1896
  "type": "object"
@@ -1776,7 +2078,16 @@
1776
2078
  ]
1777
2079
  },
1778
2080
  "region": {
1779
- "type": "string"
2081
+ "anyOf": [
2082
+ {
2083
+ "$ref": "#/components/schemas/ManagedRegion"
2084
+ },
2085
+ {
2086
+ "const": "",
2087
+ "type": "string"
2088
+ }
2089
+ ],
2090
+ "description": "The datacenter of a managed browser; \"\" for the default one."
1780
2091
  },
1781
2092
  "validation_code": {
1782
2093
  "type": [
@@ -1955,9 +2266,6 @@
1955
2266
  "host": {
1956
2267
  "type": "string"
1957
2268
  },
1958
- "human_required": {
1959
- "type": "boolean"
1960
- },
1961
2269
  "id": {
1962
2270
  "type": "string"
1963
2271
  },
@@ -2003,7 +2311,6 @@
2003
2311
  "description",
2004
2312
  "execution_count",
2005
2313
  "host",
2006
- "human_required",
2007
2314
  "id",
2008
2315
  "last_run_at",
2009
2316
  "name",
@@ -2290,9 +2597,6 @@
2290
2597
  "host": {
2291
2598
  "type": "string"
2292
2599
  },
2293
- "human_required": {
2294
- "type": "boolean"
2295
- },
2296
2600
  "id": {
2297
2601
  "type": "string"
2298
2602
  },
@@ -2338,7 +2642,6 @@
2338
2642
  "description",
2339
2643
  "execution_count",
2340
2644
  "host",
2341
- "human_required",
2342
2645
  "id",
2343
2646
  "last_run_at",
2344
2647
  "name",
@@ -3644,6 +3947,12 @@
3644
3947
  },
3645
3948
  {
3646
3949
  "properties": {
3950
+ "code": {
3951
+ "enum": [
3952
+ "forbidden",
3953
+ "feature_locked"
3954
+ ]
3955
+ },
3647
3956
  "status": {
3648
3957
  "enum": [
3649
3958
  403
@@ -4195,6 +4504,12 @@
4195
4504
  },
4196
4505
  {
4197
4506
  "properties": {
4507
+ "code": {
4508
+ "enum": [
4509
+ "forbidden",
4510
+ "feature_locked"
4511
+ ]
4512
+ },
4198
4513
  "status": {
4199
4514
  "enum": [
4200
4515
  403
@@ -6213,17 +6528,101 @@
6213
6528
  },
6214
6529
  "/api/connectors": {
6215
6530
  "get": {
6216
- "description": "List your connectors for one profile (your own account when `profile` is omitted), by website. Summaries only: cookies are never part of a listing.",
6531
+ "description": "List your Auth session cookies, one entry for each website, without the cookies.",
6217
6532
  "operationId": "listConnectors",
6218
6533
  "parameters": [
6219
6534
  {
6220
6535
  "in": "query",
6221
- "name": "profile",
6536
+ "name": "page",
6537
+ "required": false,
6538
+ "schema": {
6539
+ "maximum": 10000,
6540
+ "minimum": 0,
6541
+ "type": "integer"
6542
+ }
6543
+ },
6544
+ {
6545
+ "in": "query",
6546
+ "name": "page_size",
6547
+ "required": false,
6548
+ "schema": {
6549
+ "maximum": 100,
6550
+ "minimum": 1,
6551
+ "type": "integer"
6552
+ }
6553
+ },
6554
+ {
6555
+ "in": "query",
6556
+ "name": "host",
6557
+ "required": false,
6558
+ "schema": {
6559
+ "description": "Only the Auth session cookies of the site this host belongs to: mail.google.com names google.com.",
6560
+ "type": "string"
6561
+ }
6562
+ },
6563
+ {
6564
+ "in": "query",
6565
+ "name": "profile_id",
6566
+ "required": false,
6567
+ "schema": {
6568
+ "anyOf": [
6569
+ {
6570
+ "format": "uuid",
6571
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
6572
+ "type": "string"
6573
+ },
6574
+ {
6575
+ "const": "all",
6576
+ "type": "string"
6577
+ }
6578
+ ],
6579
+ "description": "The profile whose Auth session cookies to list, by ID, or \"all\" for every profile. Left out, the Auth session cookies in no profile."
6580
+ }
6581
+ },
6582
+ {
6583
+ "in": "query",
6584
+ "name": "account",
6585
+ "required": false,
6586
+ "schema": {
6587
+ "description": "Only the Auth session cookies signed in to this account on the site.",
6588
+ "maxLength": 320,
6589
+ "type": "string"
6590
+ }
6591
+ },
6592
+ {
6593
+ "in": "query",
6594
+ "name": "q",
6595
+ "required": false,
6596
+ "schema": {
6597
+ "description": "Only the Auth session cookies whose host or one of whose subdomains contains this text.",
6598
+ "maxLength": 253,
6599
+ "type": "string"
6600
+ }
6601
+ },
6602
+ {
6603
+ "in": "query",
6604
+ "name": "sort_by",
6605
+ "required": false,
6606
+ "schema": {
6607
+ "description": "The field to sort by: \"host\" (the default), \"account\" or \"used_at\".",
6608
+ "enum": [
6609
+ "host",
6610
+ "account",
6611
+ "used_at"
6612
+ ],
6613
+ "type": "string"
6614
+ }
6615
+ },
6616
+ {
6617
+ "in": "query",
6618
+ "name": "order",
6222
6619
  "required": false,
6223
6620
  "schema": {
6224
- "description": "The end-user this connector is kept for, in your own naming (for example your user id). Omit, or leave empty, for your own account's connectors. Only an API key or an OAuth token can read or create an end-user's connector.",
6225
- "maxLength": 128,
6226
- "pattern": "^[A-Za-z0-9_.@:-]*$",
6621
+ "description": "\"asc\" (the default) or \"desc\".",
6622
+ "enum": [
6623
+ "asc",
6624
+ "desc"
6625
+ ],
6227
6626
  "type": "string"
6228
6627
  }
6229
6628
  }
@@ -6233,10 +6632,7 @@
6233
6632
  "content": {
6234
6633
  "application/json": {
6235
6634
  "schema": {
6236
- "items": {
6237
- "$ref": "#/components/schemas/Connector"
6238
- },
6239
- "type": "array"
6635
+ "$ref": "#/components/schemas/PaginatedResponseConnectorSummary"
6240
6636
  }
6241
6637
  }
6242
6638
  },
@@ -6289,6 +6685,30 @@
6289
6685
  }
6290
6686
  },
6291
6687
  "description": "Forbidden"
6688
+ },
6689
+ "404": {
6690
+ "content": {
6691
+ "application/json": {
6692
+ "schema": {
6693
+ "allOf": [
6694
+ {
6695
+ "$ref": "#/components/schemas/ErrorResponse"
6696
+ },
6697
+ {
6698
+ "properties": {
6699
+ "status": {
6700
+ "enum": [
6701
+ 404
6702
+ ]
6703
+ }
6704
+ },
6705
+ "type": "object"
6706
+ }
6707
+ ]
6708
+ }
6709
+ }
6710
+ },
6711
+ "description": "No such profile."
6292
6712
  }
6293
6713
  },
6294
6714
  "security": [
@@ -6302,85 +6722,32 @@
6302
6722
  }
6303
6723
  ],
6304
6724
  "summary": "List connectors"
6305
- },
6725
+ }
6726
+ },
6727
+ "/api/connectors/delete": {
6306
6728
  "post": {
6307
- "description": "Store a new connector for a website, beside any the site already holds for that profile. Every cookie has to belong to that host. A connector gets its account only from a probe script, so a second connector for the same site and profile needs a label to tell it apart.",
6308
- "operationId": "createConnector",
6729
+ "description": "Delete several entries of Auth session cookies and the cookies they hold.",
6730
+ "operationId": "batchDeleteConnectors",
6309
6731
  "requestBody": {
6310
6732
  "content": {
6311
6733
  "application/json": {
6312
6734
  "schema": {
6313
6735
  "additionalProperties": false,
6314
6736
  "properties": {
6315
- "cookies": {
6737
+ "ids": {
6738
+ "description": "The IDs of the Auth session cookies to delete. An ID that is not yours is skipped.",
6316
6739
  "items": {
6317
- "additionalProperties": {},
6318
- "properties": {
6319
- "domain": {
6320
- "minLength": 1,
6321
- "type": "string"
6322
- },
6323
- "expires": {
6324
- "type": "number"
6325
- },
6326
- "httpOnly": {
6327
- "type": "boolean"
6328
- },
6329
- "name": {
6330
- "type": "string"
6331
- },
6332
- "path": {
6333
- "minLength": 1,
6334
- "type": "string"
6335
- },
6336
- "sameSite": {
6337
- "enum": [
6338
- "Strict",
6339
- "Lax",
6340
- "None"
6341
- ],
6342
- "type": "string"
6343
- },
6344
- "secure": {
6345
- "type": "boolean"
6346
- },
6347
- "value": {
6348
- "type": "string"
6349
- }
6350
- },
6351
- "required": [
6352
- "name",
6353
- "value",
6354
- "domain",
6355
- "path",
6356
- "expires",
6357
- "httpOnly",
6358
- "secure"
6359
- ],
6360
- "type": "object"
6740
+ "format": "uuid",
6741
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
6742
+ "type": "string"
6361
6743
  },
6744
+ "maxItems": 500,
6362
6745
  "minItems": 1,
6363
6746
  "type": "array"
6364
- },
6365
- "host": {
6366
- "type": "string"
6367
- },
6368
- "label": {
6369
- "description": "A name for the connector, to tell it apart from the site's other connectors.",
6370
- "maxLength": 200,
6371
- "minLength": 1,
6372
- "type": "string"
6373
- },
6374
- "profile": {
6375
- "description": "The end-user this connector is kept for, in your own naming (for example your user id). Omit, or leave empty, for your own account's connectors. Only an API key or an OAuth token can read or create an end-user's connector.",
6376
- "maxLength": 128,
6377
- "pattern": "^[A-Za-z0-9_.@:-]*$",
6378
- "type": "string"
6379
6747
  }
6380
6748
  },
6381
6749
  "required": [
6382
- "host",
6383
- "cookies"
6750
+ "ids"
6384
6751
  ],
6385
6752
  "type": "object"
6386
6753
  }
@@ -6389,14 +6756,929 @@
6389
6756
  "required": true
6390
6757
  },
6391
6758
  "responses": {
6392
- "201": {
6759
+ "204": {
6760
+ "description": "No content"
6761
+ },
6762
+ "400": {
6393
6763
  "content": {
6394
6764
  "application/json": {
6395
6765
  "schema": {
6396
- "$ref": "#/components/schemas/Connector"
6397
- }
6398
- }
6399
- },
6766
+ "allOf": [
6767
+ {
6768
+ "$ref": "#/components/schemas/ErrorResponse"
6769
+ },
6770
+ {
6771
+ "properties": {
6772
+ "status": {
6773
+ "enum": [
6774
+ 400
6775
+ ]
6776
+ }
6777
+ },
6778
+ "type": "object"
6779
+ }
6780
+ ]
6781
+ }
6782
+ }
6783
+ },
6784
+ "description": "Invalid request"
6785
+ },
6786
+ "401": {
6787
+ "content": {
6788
+ "application/json": {
6789
+ "schema": {
6790
+ "allOf": [
6791
+ {
6792
+ "$ref": "#/components/schemas/ErrorResponse"
6793
+ },
6794
+ {
6795
+ "properties": {
6796
+ "status": {
6797
+ "enum": [
6798
+ 401
6799
+ ]
6800
+ }
6801
+ },
6802
+ "type": "object"
6803
+ }
6804
+ ]
6805
+ }
6806
+ }
6807
+ },
6808
+ "description": "Not authenticated"
6809
+ },
6810
+ "403": {
6811
+ "content": {
6812
+ "application/json": {
6813
+ "schema": {
6814
+ "allOf": [
6815
+ {
6816
+ "$ref": "#/components/schemas/ErrorResponse"
6817
+ },
6818
+ {
6819
+ "properties": {
6820
+ "status": {
6821
+ "enum": [
6822
+ 403
6823
+ ]
6824
+ }
6825
+ },
6826
+ "type": "object"
6827
+ }
6828
+ ]
6829
+ }
6830
+ }
6831
+ },
6832
+ "description": "Forbidden"
6833
+ }
6834
+ },
6835
+ "security": [
6836
+ {
6837
+ "bearerAuth": [
6838
+ "connector:write"
6839
+ ]
6840
+ },
6841
+ {
6842
+ "apiKey": []
6843
+ }
6844
+ ],
6845
+ "summary": "Batch delete connectors"
6846
+ }
6847
+ },
6848
+ "/api/connectors/hosts/{host}": {
6849
+ "get": {
6850
+ "description": "Get the Auth session cookies of the website a host belongs to, with the cookies.",
6851
+ "operationId": "resolveConnector",
6852
+ "parameters": [
6853
+ {
6854
+ "in": "query",
6855
+ "name": "profile_id",
6856
+ "required": false,
6857
+ "schema": {
6858
+ "description": "The profile to work in, by ID. Left out, the Auth session cookies that are in no profile. A profile holds one set of Auth session cookies per site.",
6859
+ "format": "uuid",
6860
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
6861
+ "type": "string"
6862
+ }
6863
+ },
6864
+ {
6865
+ "in": "path",
6866
+ "name": "host",
6867
+ "required": true,
6868
+ "schema": {
6869
+ "type": "string"
6870
+ }
6871
+ }
6872
+ ],
6873
+ "responses": {
6874
+ "200": {
6875
+ "content": {
6876
+ "application/json": {
6877
+ "schema": {
6878
+ "$ref": "#/components/schemas/ConnectorWithCookies"
6879
+ }
6880
+ }
6881
+ },
6882
+ "description": "OK"
6883
+ },
6884
+ "401": {
6885
+ "content": {
6886
+ "application/json": {
6887
+ "schema": {
6888
+ "allOf": [
6889
+ {
6890
+ "$ref": "#/components/schemas/ErrorResponse"
6891
+ },
6892
+ {
6893
+ "properties": {
6894
+ "status": {
6895
+ "enum": [
6896
+ 401
6897
+ ]
6898
+ }
6899
+ },
6900
+ "type": "object"
6901
+ }
6902
+ ]
6903
+ }
6904
+ }
6905
+ },
6906
+ "description": "Not authenticated"
6907
+ },
6908
+ "403": {
6909
+ "content": {
6910
+ "application/json": {
6911
+ "schema": {
6912
+ "allOf": [
6913
+ {
6914
+ "$ref": "#/components/schemas/ErrorResponse"
6915
+ },
6916
+ {
6917
+ "properties": {
6918
+ "status": {
6919
+ "enum": [
6920
+ 403
6921
+ ]
6922
+ }
6923
+ },
6924
+ "type": "object"
6925
+ }
6926
+ ]
6927
+ }
6928
+ }
6929
+ },
6930
+ "description": "Forbidden"
6931
+ },
6932
+ "404": {
6933
+ "content": {
6934
+ "application/json": {
6935
+ "schema": {
6936
+ "allOf": [
6937
+ {
6938
+ "$ref": "#/components/schemas/ErrorResponse"
6939
+ },
6940
+ {
6941
+ "properties": {
6942
+ "status": {
6943
+ "enum": [
6944
+ 404
6945
+ ]
6946
+ }
6947
+ },
6948
+ "type": "object"
6949
+ }
6950
+ ]
6951
+ }
6952
+ }
6953
+ },
6954
+ "description": "No such profile, or the host's website has no Auth session cookies in it."
6955
+ }
6956
+ },
6957
+ "security": [
6958
+ {
6959
+ "bearerAuth": [
6960
+ "connector:read"
6961
+ ]
6962
+ },
6963
+ {
6964
+ "apiKey": []
6965
+ }
6966
+ ],
6967
+ "summary": "Resolve connector"
6968
+ },
6969
+ "put": {
6970
+ "description": "Save a website's cookies as its Auth session cookies: they replace the cookies saved for the website, or create the entry. The account recorded for them does not change.",
6971
+ "operationId": "saveConnector",
6972
+ "parameters": [
6973
+ {
6974
+ "in": "path",
6975
+ "name": "host",
6976
+ "required": true,
6977
+ "schema": {
6978
+ "description": "A host of the site, which names its Auth session cookies: cookies saved for mail.google.com are stored on google.com.",
6979
+ "type": "string"
6980
+ }
6981
+ }
6982
+ ],
6983
+ "requestBody": {
6984
+ "content": {
6985
+ "application/json": {
6986
+ "schema": {
6987
+ "additionalProperties": false,
6988
+ "properties": {
6989
+ "cookies": {
6990
+ "description": "Every cookie belongs to the site of `host`: its domain or one of the domain's subdomains.",
6991
+ "items": {
6992
+ "additionalProperties": {},
6993
+ "properties": {
6994
+ "domain": {
6995
+ "minLength": 1,
6996
+ "type": "string"
6997
+ },
6998
+ "expires": {
6999
+ "type": "number"
7000
+ },
7001
+ "httpOnly": {
7002
+ "type": "boolean"
7003
+ },
7004
+ "name": {
7005
+ "type": "string"
7006
+ },
7007
+ "path": {
7008
+ "minLength": 1,
7009
+ "type": "string"
7010
+ },
7011
+ "sameSite": {
7012
+ "enum": [
7013
+ "Strict",
7014
+ "Lax",
7015
+ "None"
7016
+ ],
7017
+ "type": "string"
7018
+ },
7019
+ "secure": {
7020
+ "type": "boolean"
7021
+ },
7022
+ "value": {
7023
+ "type": "string"
7024
+ }
7025
+ },
7026
+ "required": [
7027
+ "name",
7028
+ "value",
7029
+ "domain",
7030
+ "path",
7031
+ "expires",
7032
+ "httpOnly",
7033
+ "secure"
7034
+ ],
7035
+ "type": "object"
7036
+ },
7037
+ "minItems": 1,
7038
+ "type": "array"
7039
+ },
7040
+ "profile_id": {
7041
+ "description": "The profile to work in, by ID. Left out, the Auth session cookies that are in no profile. A profile holds one set of Auth session cookies per site.",
7042
+ "format": "uuid",
7043
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
7044
+ "type": "string"
7045
+ }
7046
+ },
7047
+ "required": [
7048
+ "cookies"
7049
+ ],
7050
+ "type": "object"
7051
+ }
7052
+ }
7053
+ },
7054
+ "required": true
7055
+ },
7056
+ "responses": {
7057
+ "200": {
7058
+ "content": {
7059
+ "application/json": {
7060
+ "schema": {
7061
+ "$ref": "#/components/schemas/Connector"
7062
+ }
7063
+ }
7064
+ },
7065
+ "description": "OK"
7066
+ },
7067
+ "201": {
7068
+ "content": {
7069
+ "application/json": {
7070
+ "schema": {
7071
+ "$ref": "#/components/schemas/Connector"
7072
+ }
7073
+ }
7074
+ },
7075
+ "description": "Created"
7076
+ },
7077
+ "400": {
7078
+ "content": {
7079
+ "application/json": {
7080
+ "schema": {
7081
+ "allOf": [
7082
+ {
7083
+ "$ref": "#/components/schemas/ErrorResponse"
7084
+ },
7085
+ {
7086
+ "properties": {
7087
+ "status": {
7088
+ "enum": [
7089
+ 400
7090
+ ]
7091
+ }
7092
+ },
7093
+ "type": "object"
7094
+ }
7095
+ ]
7096
+ }
7097
+ }
7098
+ },
7099
+ "description": "Invalid request"
7100
+ },
7101
+ "401": {
7102
+ "content": {
7103
+ "application/json": {
7104
+ "schema": {
7105
+ "allOf": [
7106
+ {
7107
+ "$ref": "#/components/schemas/ErrorResponse"
7108
+ },
7109
+ {
7110
+ "properties": {
7111
+ "status": {
7112
+ "enum": [
7113
+ 401
7114
+ ]
7115
+ }
7116
+ },
7117
+ "type": "object"
7118
+ }
7119
+ ]
7120
+ }
7121
+ }
7122
+ },
7123
+ "description": "Not authenticated"
7124
+ },
7125
+ "403": {
7126
+ "content": {
7127
+ "application/json": {
7128
+ "schema": {
7129
+ "allOf": [
7130
+ {
7131
+ "$ref": "#/components/schemas/ErrorResponse"
7132
+ },
7133
+ {
7134
+ "properties": {
7135
+ "status": {
7136
+ "enum": [
7137
+ 403
7138
+ ]
7139
+ }
7140
+ },
7141
+ "type": "object"
7142
+ }
7143
+ ]
7144
+ }
7145
+ }
7146
+ },
7147
+ "description": "Forbidden"
7148
+ },
7149
+ "404": {
7150
+ "content": {
7151
+ "application/json": {
7152
+ "schema": {
7153
+ "allOf": [
7154
+ {
7155
+ "$ref": "#/components/schemas/ErrorResponse"
7156
+ },
7157
+ {
7158
+ "properties": {
7159
+ "status": {
7160
+ "enum": [
7161
+ 404
7162
+ ]
7163
+ }
7164
+ },
7165
+ "type": "object"
7166
+ }
7167
+ ]
7168
+ }
7169
+ }
7170
+ },
7171
+ "description": "No such profile."
7172
+ }
7173
+ },
7174
+ "security": [
7175
+ {
7176
+ "bearerAuth": [
7177
+ "connector:write"
7178
+ ]
7179
+ },
7180
+ {
7181
+ "apiKey": []
7182
+ }
7183
+ ],
7184
+ "summary": "Save connector"
7185
+ }
7186
+ },
7187
+ "/api/connectors/hosts/{host}/whoami": {
7188
+ "post": {
7189
+ "description": "Check who the Auth session cookies of a website are signed in as: run a whoami script with these cookies on a cloud browser, and record what it finds with them. This is a run on a cloud browser, billed as one, and the call waits up to 60 seconds for it to end. When the session is signed out, the account recorded for them does not change.",
7190
+ "operationId": "identifyConnectorAccount",
7191
+ "parameters": [
7192
+ {
7193
+ "in": "path",
7194
+ "name": "host",
7195
+ "required": true,
7196
+ "schema": {
7197
+ "description": "A host of the site whose Auth session cookies to check: mail.google.com checks the Auth session cookies of google.com.",
7198
+ "type": "string"
7199
+ }
7200
+ }
7201
+ ],
7202
+ "requestBody": {
7203
+ "content": {
7204
+ "application/json": {
7205
+ "schema": {
7206
+ "additionalProperties": false,
7207
+ "properties": {
7208
+ "profile_id": {
7209
+ "description": "The profile to work in, by ID. Left out, the Auth session cookies that are in no profile. A profile holds one set of Auth session cookies per site.",
7210
+ "format": "uuid",
7211
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
7212
+ "type": "string"
7213
+ },
7214
+ "script": {
7215
+ "additionalProperties": false,
7216
+ "description": "The whoami script to run, on a host of the same site and marked `logged_in`. It returns an object with `loggedIn` (a boolean) and, when signed in, `account`, `email` or `username`: the first one set is the account. It can also return `name`, `userId` and `workspace` ({ id, name }). When the session is signed out, it returns `loggedIn: false` or throws a `SignedOutError`. Left out, the official whoami script for the site.",
7217
+ "properties": {
7218
+ "handle": {
7219
+ "description": "The owner a resource is addressed under: \"@username\" for a personal scope, or a bare slug for a project.",
7220
+ "type": "string"
7221
+ },
7222
+ "host": {
7223
+ "description": "The site the script automates, as a hostname.",
7224
+ "maxLength": 253,
7225
+ "minLength": 1,
7226
+ "type": "string"
7227
+ },
7228
+ "slug": {
7229
+ "description": "The script's unique identifier within its host, unique per owner.",
7230
+ "maxLength": 64,
7231
+ "pattern": "^[a-z0-9_-]+$",
7232
+ "type": "string"
7233
+ }
7234
+ },
7235
+ "required": [
7236
+ "handle",
7237
+ "host",
7238
+ "slug"
7239
+ ],
7240
+ "type": "object"
7241
+ }
7242
+ },
7243
+ "required": [],
7244
+ "type": "object"
7245
+ }
7246
+ }
7247
+ },
7248
+ "required": true
7249
+ },
7250
+ "responses": {
7251
+ "200": {
7252
+ "content": {
7253
+ "application/json": {
7254
+ "schema": {
7255
+ "additionalProperties": false,
7256
+ "properties": {
7257
+ "account": {
7258
+ "description": "The account the script found: `account`, else `email`, else `username`. When the session is signed in, the Auth session cookies record it. Null when the script names none.",
7259
+ "type": [
7260
+ "string",
7261
+ "null"
7262
+ ]
7263
+ },
7264
+ "checked_at": {
7265
+ "description": "When the check started, as recorded with the Auth session cookies. Cookies synced after it may be signed in to another account.",
7266
+ "type": "string"
7267
+ },
7268
+ "email": {
7269
+ "description": "The email address the site shows for the person.",
7270
+ "type": [
7271
+ "string",
7272
+ "null"
7273
+ ]
7274
+ },
7275
+ "logged_in": {
7276
+ "description": "Whether the session is signed in.",
7277
+ "type": "boolean"
7278
+ },
7279
+ "name": {
7280
+ "description": "The name the site shows for the person.",
7281
+ "type": [
7282
+ "string",
7283
+ "null"
7284
+ ]
7285
+ },
7286
+ "run_id": {
7287
+ "description": "The run of the whoami script, to read its trace.",
7288
+ "type": "string"
7289
+ },
7290
+ "user_id": {
7291
+ "description": "The site's own id for the person.",
7292
+ "type": [
7293
+ "string",
7294
+ "null"
7295
+ ]
7296
+ },
7297
+ "username": {
7298
+ "description": "The handle or the login name on the site.",
7299
+ "type": [
7300
+ "string",
7301
+ "null"
7302
+ ]
7303
+ },
7304
+ "workspace": {
7305
+ "anyOf": [
7306
+ {
7307
+ "additionalProperties": false,
7308
+ "properties": {
7309
+ "id": {
7310
+ "type": [
7311
+ "string",
7312
+ "null"
7313
+ ]
7314
+ },
7315
+ "name": {
7316
+ "type": [
7317
+ "string",
7318
+ "null"
7319
+ ]
7320
+ }
7321
+ },
7322
+ "required": [
7323
+ "id",
7324
+ "name"
7325
+ ],
7326
+ "type": "object"
7327
+ },
7328
+ {
7329
+ "type": "null"
7330
+ }
7331
+ ],
7332
+ "description": "The organization, team or store the session acts in, on a site where one account holds several."
7333
+ }
7334
+ },
7335
+ "required": [
7336
+ "logged_in",
7337
+ "account",
7338
+ "email",
7339
+ "username",
7340
+ "name",
7341
+ "user_id",
7342
+ "workspace",
7343
+ "checked_at",
7344
+ "run_id"
7345
+ ],
7346
+ "type": "object"
7347
+ }
7348
+ }
7349
+ },
7350
+ "description": "OK"
7351
+ },
7352
+ "400": {
7353
+ "content": {
7354
+ "application/json": {
7355
+ "schema": {
7356
+ "allOf": [
7357
+ {
7358
+ "$ref": "#/components/schemas/ErrorResponse"
7359
+ },
7360
+ {
7361
+ "properties": {
7362
+ "status": {
7363
+ "enum": [
7364
+ 400
7365
+ ]
7366
+ }
7367
+ },
7368
+ "type": "object"
7369
+ }
7370
+ ]
7371
+ }
7372
+ }
7373
+ },
7374
+ "description": "The request is malformed, the script is on another website, or the script is not marked `logged_in`."
7375
+ },
7376
+ "401": {
7377
+ "content": {
7378
+ "application/json": {
7379
+ "schema": {
7380
+ "allOf": [
7381
+ {
7382
+ "$ref": "#/components/schemas/ErrorResponse"
7383
+ },
7384
+ {
7385
+ "properties": {
7386
+ "status": {
7387
+ "enum": [
7388
+ 401
7389
+ ]
7390
+ }
7391
+ },
7392
+ "type": "object"
7393
+ }
7394
+ ]
7395
+ }
7396
+ }
7397
+ },
7398
+ "description": "Not authenticated"
7399
+ },
7400
+ "403": {
7401
+ "content": {
7402
+ "application/json": {
7403
+ "schema": {
7404
+ "allOf": [
7405
+ {
7406
+ "$ref": "#/components/schemas/ErrorResponse"
7407
+ },
7408
+ {
7409
+ "properties": {
7410
+ "status": {
7411
+ "enum": [
7412
+ 403
7413
+ ]
7414
+ }
7415
+ },
7416
+ "type": "object"
7417
+ }
7418
+ ]
7419
+ }
7420
+ }
7421
+ },
7422
+ "description": "This account is out of runs or of cloud browser time for this period."
7423
+ },
7424
+ "404": {
7425
+ "content": {
7426
+ "application/json": {
7427
+ "schema": {
7428
+ "allOf": [
7429
+ {
7430
+ "$ref": "#/components/schemas/ErrorResponse"
7431
+ },
7432
+ {
7433
+ "properties": {
7434
+ "status": {
7435
+ "enum": [
7436
+ 404
7437
+ ]
7438
+ }
7439
+ },
7440
+ "type": "object"
7441
+ }
7442
+ ]
7443
+ }
7444
+ }
7445
+ },
7446
+ "description": "No such profile, the website has no Auth session cookies in it, no such script or it has no current version, or there is no official whoami script for the website."
7447
+ },
7448
+ "429": {
7449
+ "content": {
7450
+ "application/json": {
7451
+ "schema": {
7452
+ "allOf": [
7453
+ {
7454
+ "$ref": "#/components/schemas/ErrorResponse"
7455
+ },
7456
+ {
7457
+ "properties": {
7458
+ "status": {
7459
+ "enum": [
7460
+ 429
7461
+ ]
7462
+ }
7463
+ },
7464
+ "type": "object"
7465
+ }
7466
+ ]
7467
+ }
7468
+ }
7469
+ },
7470
+ "description": "Too many requests. Wait for the time `Retry-After` gives, then try again."
7471
+ },
7472
+ "502": {
7473
+ "content": {
7474
+ "application/json": {
7475
+ "schema": {
7476
+ "allOf": [
7477
+ {
7478
+ "$ref": "#/components/schemas/ErrorResponse"
7479
+ },
7480
+ {
7481
+ "properties": {
7482
+ "status": {
7483
+ "enum": [
7484
+ 502
7485
+ ]
7486
+ }
7487
+ },
7488
+ "type": "object"
7489
+ }
7490
+ ]
7491
+ }
7492
+ }
7493
+ },
7494
+ "description": "The run did not start, Reduck could not confirm that it started, the whoami script failed, or its answer does not have the shape `script` describes. The message gives the run id when there is one."
7495
+ },
7496
+ "504": {
7497
+ "content": {
7498
+ "application/json": {
7499
+ "schema": {
7500
+ "allOf": [
7501
+ {
7502
+ "$ref": "#/components/schemas/ErrorResponse"
7503
+ },
7504
+ {
7505
+ "properties": {
7506
+ "status": {
7507
+ "enum": [
7508
+ 504
7509
+ ]
7510
+ }
7511
+ },
7512
+ "type": "object"
7513
+ }
7514
+ ]
7515
+ }
7516
+ }
7517
+ },
7518
+ "description": "The whoami script did not end in time. The run goes on and is billed, but what it finds is not recorded. The message gives the run id."
7519
+ }
7520
+ },
7521
+ "security": [
7522
+ {
7523
+ "bearerAuth": [
7524
+ "run:write",
7525
+ "connector:write"
7526
+ ]
7527
+ },
7528
+ {
7529
+ "apiKey": []
7530
+ }
7531
+ ],
7532
+ "summary": "Identify connector account"
7533
+ }
7534
+ },
7535
+ "/api/connectors/links": {
7536
+ "get": {
7537
+ "description": "List your login links, newest first, each as last recorded. Read one link to see where its browser stands.",
7538
+ "operationId": "listConnectorLinks",
7539
+ "parameters": [
7540
+ {
7541
+ "in": "query",
7542
+ "name": "page",
7543
+ "required": false,
7544
+ "schema": {
7545
+ "maximum": 10000,
7546
+ "minimum": 0,
7547
+ "type": "integer"
7548
+ }
7549
+ },
7550
+ {
7551
+ "in": "query",
7552
+ "name": "page_size",
7553
+ "required": false,
7554
+ "schema": {
7555
+ "maximum": 100,
7556
+ "minimum": 1,
7557
+ "type": "integer"
7558
+ }
7559
+ }
7560
+ ],
7561
+ "responses": {
7562
+ "200": {
7563
+ "content": {
7564
+ "application/json": {
7565
+ "schema": {
7566
+ "$ref": "#/components/schemas/PaginatedResponseConnectorLink"
7567
+ }
7568
+ }
7569
+ },
7570
+ "description": "OK"
7571
+ },
7572
+ "401": {
7573
+ "content": {
7574
+ "application/json": {
7575
+ "schema": {
7576
+ "allOf": [
7577
+ {
7578
+ "$ref": "#/components/schemas/ErrorResponse"
7579
+ },
7580
+ {
7581
+ "properties": {
7582
+ "status": {
7583
+ "enum": [
7584
+ 401
7585
+ ]
7586
+ }
7587
+ },
7588
+ "type": "object"
7589
+ }
7590
+ ]
7591
+ }
7592
+ }
7593
+ },
7594
+ "description": "Not authenticated"
7595
+ },
7596
+ "403": {
7597
+ "content": {
7598
+ "application/json": {
7599
+ "schema": {
7600
+ "allOf": [
7601
+ {
7602
+ "$ref": "#/components/schemas/ErrorResponse"
7603
+ },
7604
+ {
7605
+ "properties": {
7606
+ "status": {
7607
+ "enum": [
7608
+ 403
7609
+ ]
7610
+ }
7611
+ },
7612
+ "type": "object"
7613
+ }
7614
+ ]
7615
+ }
7616
+ }
7617
+ },
7618
+ "description": "Forbidden"
7619
+ }
7620
+ },
7621
+ "security": [
7622
+ {
7623
+ "bearerAuth": [
7624
+ "connector:read"
7625
+ ]
7626
+ },
7627
+ {
7628
+ "apiKey": []
7629
+ }
7630
+ ],
7631
+ "summary": "List connector links"
7632
+ },
7633
+ "post": {
7634
+ "description": "Create a link to a Reduck page where a person signs in to a website in a cloud browser. Give the link to the person who has the account on the website: they do not need a Reduck account. When they sign in, Reduck saves the cookies of the website as your Auth session cookies. Anyone who has the link can use it. The link stops opening 7 days after its creation if nobody opens it. It is over when its browser closes, about 10 minutes after it opens. The browser spends your cloud browser time.",
7635
+ "operationId": "createConnectorLink",
7636
+ "requestBody": {
7637
+ "content": {
7638
+ "application/json": {
7639
+ "schema": {
7640
+ "additionalProperties": false,
7641
+ "properties": {
7642
+ "host": {
7643
+ "description": "The site whose cookies become the Auth session cookies. The start URL's own site when omitted. The Auth session cookies of a site also serve its subdomains.",
7644
+ "type": "string"
7645
+ },
7646
+ "profile_id": {
7647
+ "description": "The profile to work in, by ID. Left out, the Auth session cookies that are in no profile. A profile holds one set of Auth session cookies per site.",
7648
+ "format": "uuid",
7649
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
7650
+ "type": "string"
7651
+ },
7652
+ "return_url": {
7653
+ "description": "The page of your product where the person goes when the login ends: an https URL, or an http URL on localhost. Reduck adds `link_id` and `status` to its query: `done`, `failed` or `expired`, or `waiting` when the person goes back before the login ends (the cloud browser could not open). Do not trust `status`: anyone can open this URL. Read the link to know its outcome.",
7654
+ "format": "uri",
7655
+ "maxLength": 2048,
7656
+ "type": "string"
7657
+ },
7658
+ "start_url": {
7659
+ "description": "The site's login page, where the browser opens.",
7660
+ "format": "uri",
7661
+ "type": "string"
7662
+ }
7663
+ },
7664
+ "required": [
7665
+ "start_url"
7666
+ ],
7667
+ "type": "object"
7668
+ }
7669
+ }
7670
+ },
7671
+ "required": true
7672
+ },
7673
+ "responses": {
7674
+ "201": {
7675
+ "content": {
7676
+ "application/json": {
7677
+ "schema": {
7678
+ "$ref": "#/components/schemas/CreatedConnectorLink"
7679
+ }
7680
+ }
7681
+ },
6400
7682
  "description": "Created"
6401
7683
  },
6402
7684
  "400": {
@@ -6421,7 +7703,7 @@
6421
7703
  }
6422
7704
  }
6423
7705
  },
6424
- "description": "Invalid request"
7706
+ "description": "The request is malformed, or the start URL's host is not a site that Auth session cookies can be stored under: name it with `host`."
6425
7707
  },
6426
7708
  "401": {
6427
7709
  "content": {
@@ -6469,39 +7751,9 @@
6469
7751
  }
6470
7752
  }
6471
7753
  },
6472
- "description": "An end-user's connector is created with an API key or an OAuth token, not from a browser session."
6473
- },
6474
- "409": {
6475
- "content": {
6476
- "application/json": {
6477
- "schema": {
6478
- "allOf": [
6479
- {
6480
- "$ref": "#/components/schemas/ErrorResponse"
6481
- },
6482
- {
6483
- "properties": {
6484
- "code": {
6485
- "enum": [
6486
- "conflict",
6487
- "name_taken"
6488
- ]
6489
- },
6490
- "status": {
6491
- "enum": [
6492
- 409
6493
- ]
6494
- }
6495
- },
6496
- "type": "object"
6497
- }
6498
- ]
6499
- }
6500
- }
6501
- },
6502
- "description": "The site already has a connector with that label, or one with neither an account nor a label, for this profile."
7754
+ "description": "This account is out of cloud browser time for this period."
6503
7755
  },
6504
- "503": {
7756
+ "404": {
6505
7757
  "content": {
6506
7758
  "application/json": {
6507
7759
  "schema": {
@@ -6513,7 +7765,7 @@
6513
7765
  "properties": {
6514
7766
  "status": {
6515
7767
  "enum": [
6516
- 503
7768
+ 404
6517
7769
  ]
6518
7770
  }
6519
7771
  },
@@ -6523,7 +7775,7 @@
6523
7775
  }
6524
7776
  }
6525
7777
  },
6526
- "description": "This environment stores no connectors."
7778
+ "description": "No such profile."
6527
7779
  }
6528
7780
  },
6529
7781
  "security": [
@@ -6536,17 +7788,17 @@
6536
7788
  "apiKey": []
6537
7789
  }
6538
7790
  ],
6539
- "summary": "Create connector"
7791
+ "summary": "Create connector link"
6540
7792
  }
6541
7793
  },
6542
- "/api/connectors/by-id/{id}": {
7794
+ "/api/connectors/links/{link_id}": {
6543
7795
  "delete": {
6544
- "description": "Delete one connector, by id, and the cookies it holds.",
6545
- "operationId": "deleteConnectorById",
7796
+ "description": "Delete a login link, so it no longer opens. A browser it already opened is closed, and nothing it holds is saved.",
7797
+ "operationId": "deleteConnectorLink",
6546
7798
  "parameters": [
6547
7799
  {
6548
7800
  "in": "path",
6549
- "name": "id",
7801
+ "name": "link_id",
6550
7802
  "required": true,
6551
7803
  "schema": {
6552
7804
  "format": "uuid",
@@ -6653,7 +7905,7 @@
6653
7905
  }
6654
7906
  }
6655
7907
  },
6656
- "description": "Not found"
7908
+ "description": "No such link."
6657
7909
  }
6658
7910
  },
6659
7911
  "security": [
@@ -6666,15 +7918,15 @@
6666
7918
  "apiKey": []
6667
7919
  }
6668
7920
  ],
6669
- "summary": "Delete connector by id"
7921
+ "summary": "Delete connector link"
6670
7922
  },
6671
- "patch": {
6672
- "description": "Rename a connector, or remove its label.",
6673
- "operationId": "patchConnector",
7923
+ "get": {
7924
+ "description": "How a login link is going: whether someone opened it and signed in, and whether the cookies were saved.",
7925
+ "operationId": "getConnectorLink",
6674
7926
  "parameters": [
6675
7927
  {
6676
7928
  "in": "path",
6677
- "name": "id",
7929
+ "name": "link_id",
6678
7930
  "required": true,
6679
7931
  "schema": {
6680
7932
  "format": "uuid",
@@ -6683,74 +7935,17 @@
6683
7935
  }
6684
7936
  }
6685
7937
  ],
6686
- "requestBody": {
6687
- "content": {
6688
- "application/json": {
6689
- "schema": {
6690
- "additionalProperties": false,
6691
- "properties": {
6692
- "account": {
6693
- "description": "The account a probe reported. Only Reduck's own run service sets it.",
6694
- "maxLength": 320,
6695
- "type": "string"
6696
- },
6697
- "label": {
6698
- "anyOf": [
6699
- {
6700
- "description": "A name for the connector, to tell it apart from the site's other connectors.",
6701
- "maxLength": 200,
6702
- "minLength": 1,
6703
- "type": "string"
6704
- },
6705
- {
6706
- "type": "null"
6707
- }
6708
- ],
6709
- "description": "The new label, or null to remove it."
6710
- }
6711
- },
6712
- "required": [],
6713
- "type": "object"
6714
- }
6715
- }
6716
- },
6717
- "required": true
6718
- },
6719
7938
  "responses": {
6720
7939
  "200": {
6721
7940
  "content": {
6722
7941
  "application/json": {
6723
7942
  "schema": {
6724
- "$ref": "#/components/schemas/Connector"
7943
+ "$ref": "#/components/schemas/ConnectorLink"
6725
7944
  }
6726
7945
  }
6727
7946
  },
6728
7947
  "description": "OK"
6729
7948
  },
6730
- "400": {
6731
- "content": {
6732
- "application/json": {
6733
- "schema": {
6734
- "allOf": [
6735
- {
6736
- "$ref": "#/components/schemas/ErrorResponse"
6737
- },
6738
- {
6739
- "properties": {
6740
- "status": {
6741
- "enum": [
6742
- 400
6743
- ]
6744
- }
6745
- },
6746
- "type": "object"
6747
- }
6748
- ]
6749
- }
6750
- }
6751
- },
6752
- "description": "The request is malformed, or it sets an account: only a probe script records one."
6753
- },
6754
7949
  "401": {
6755
7950
  "content": {
6756
7951
  "application/json": {
@@ -6821,9 +8016,9 @@
6821
8016
  }
6822
8017
  }
6823
8018
  },
6824
- "description": "Not found"
8019
+ "description": "No such link."
6825
8020
  },
6826
- "409": {
8021
+ "502": {
6827
8022
  "content": {
6828
8023
  "application/json": {
6829
8024
  "schema": {
@@ -6833,15 +8028,9 @@
6833
8028
  },
6834
8029
  {
6835
8030
  "properties": {
6836
- "code": {
6837
- "enum": [
6838
- "conflict",
6839
- "name_taken"
6840
- ]
6841
- },
6842
8031
  "status": {
6843
8032
  "enum": [
6844
- 409
8033
+ 502
6845
8034
  ]
6846
8035
  }
6847
8036
  },
@@ -6851,190 +8040,71 @@
6851
8040
  }
6852
8041
  }
6853
8042
  },
6854
- "description": "Another connector on the site already has that label for this profile."
8043
+ "description": "Where its browser stands could not be read."
6855
8044
  }
6856
8045
  },
6857
8046
  "security": [
6858
8047
  {
6859
8048
  "bearerAuth": [
6860
- "connector:write"
8049
+ "connector:read"
6861
8050
  ]
6862
8051
  },
6863
8052
  {
6864
8053
  "apiKey": []
6865
8054
  }
6866
8055
  ],
6867
- "summary": "Patch connector"
6868
- },
6869
- "put": {
6870
- "description": "Replace one connector's cookies, by id. This is how a run writes the cookies it refreshed back to the connector it used.",
6871
- "operationId": "putConnectorById",
8056
+ "summary": "Get connector link"
8057
+ }
8058
+ },
8059
+ "/api/connectors/profiles": {
8060
+ "get": {
8061
+ "description": "List your profiles, by name. A profile holds one entry of Auth session cookies per website, so a second account on a site goes into a second profile.",
8062
+ "operationId": "listConnectorProfiles",
6872
8063
  "parameters": [
6873
8064
  {
6874
- "in": "path",
6875
- "name": "id",
6876
- "required": true,
8065
+ "in": "query",
8066
+ "name": "page",
8067
+ "required": false,
6877
8068
  "schema": {
6878
- "format": "uuid",
6879
- "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
6880
- "type": "string"
6881
- }
6882
- }
6883
- ],
6884
- "requestBody": {
6885
- "content": {
6886
- "application/json": {
6887
- "schema": {
6888
- "additionalProperties": false,
6889
- "properties": {
6890
- "cookies": {
6891
- "items": {
6892
- "additionalProperties": {},
6893
- "properties": {
6894
- "domain": {
6895
- "minLength": 1,
6896
- "type": "string"
6897
- },
6898
- "expires": {
6899
- "type": "number"
6900
- },
6901
- "httpOnly": {
6902
- "type": "boolean"
6903
- },
6904
- "name": {
6905
- "type": "string"
6906
- },
6907
- "path": {
6908
- "minLength": 1,
6909
- "type": "string"
6910
- },
6911
- "sameSite": {
6912
- "enum": [
6913
- "Strict",
6914
- "Lax",
6915
- "None"
6916
- ],
6917
- "type": "string"
6918
- },
6919
- "secure": {
6920
- "type": "boolean"
6921
- },
6922
- "value": {
6923
- "type": "string"
6924
- }
6925
- },
6926
- "required": [
6927
- "name",
6928
- "value",
6929
- "domain",
6930
- "path",
6931
- "expires",
6932
- "httpOnly",
6933
- "secure"
6934
- ],
6935
- "type": "object"
6936
- },
6937
- "minItems": 1,
6938
- "type": "array"
6939
- },
6940
- "sso_account": {
6941
- "maxLength": 320,
6942
- "type": "string"
6943
- }
6944
- },
6945
- "required": [
6946
- "cookies"
6947
- ],
6948
- "type": "object"
6949
- }
8069
+ "maximum": 10000,
8070
+ "minimum": 0,
8071
+ "type": "integer"
6950
8072
  }
6951
8073
  },
6952
- "required": true
6953
- },
6954
- "responses": {
6955
- "200": {
6956
- "content": {
6957
- "application/json": {
6958
- "schema": {
6959
- "$ref": "#/components/schemas/Connector"
6960
- }
6961
- }
6962
- },
6963
- "description": "OK"
6964
- },
6965
- "400": {
6966
- "content": {
6967
- "application/json": {
6968
- "schema": {
6969
- "allOf": [
6970
- {
6971
- "$ref": "#/components/schemas/ErrorResponse"
6972
- },
6973
- {
6974
- "properties": {
6975
- "status": {
6976
- "enum": [
6977
- 400
6978
- ]
6979
- }
6980
- },
6981
- "type": "object"
6982
- }
6983
- ]
6984
- }
6985
- }
6986
- },
6987
- "description": "Invalid request"
6988
- },
6989
- "401": {
6990
- "content": {
6991
- "application/json": {
6992
- "schema": {
6993
- "allOf": [
6994
- {
6995
- "$ref": "#/components/schemas/ErrorResponse"
6996
- },
6997
- {
6998
- "properties": {
6999
- "status": {
7000
- "enum": [
7001
- 401
7002
- ]
7003
- }
7004
- },
7005
- "type": "object"
7006
- }
7007
- ]
7008
- }
7009
- }
7010
- },
7011
- "description": "Not authenticated"
8074
+ {
8075
+ "in": "query",
8076
+ "name": "page_size",
8077
+ "required": false,
8078
+ "schema": {
8079
+ "maximum": 100,
8080
+ "minimum": 1,
8081
+ "type": "integer"
8082
+ }
7012
8083
  },
7013
- "403": {
8084
+ {
8085
+ "in": "query",
8086
+ "name": "name",
8087
+ "required": false,
8088
+ "schema": {
8089
+ "description": "Only the profile with this name. A name is unique among your profiles.",
8090
+ "maxLength": 200,
8091
+ "minLength": 1,
8092
+ "type": "string"
8093
+ }
8094
+ }
8095
+ ],
8096
+ "responses": {
8097
+ "200": {
7014
8098
  "content": {
7015
8099
  "application/json": {
7016
8100
  "schema": {
7017
- "allOf": [
7018
- {
7019
- "$ref": "#/components/schemas/ErrorResponse"
7020
- },
7021
- {
7022
- "properties": {
7023
- "status": {
7024
- "enum": [
7025
- 403
7026
- ]
7027
- }
7028
- },
7029
- "type": "object"
7030
- }
7031
- ]
8101
+ "$ref": "#/components/schemas/PaginatedResponseConnectorProfile"
7032
8102
  }
7033
8103
  }
7034
8104
  },
7035
- "description": "An end-user's connector is written with an API key or an OAuth token, not from a browser session."
8105
+ "description": "OK"
7036
8106
  },
7037
- "404": {
8107
+ "401": {
7038
8108
  "content": {
7039
8109
  "application/json": {
7040
8110
  "schema": {
@@ -7046,7 +8116,7 @@
7046
8116
  "properties": {
7047
8117
  "status": {
7048
8118
  "enum": [
7049
- 404
8119
+ 401
7050
8120
  ]
7051
8121
  }
7052
8122
  },
@@ -7056,9 +8126,9 @@
7056
8126
  }
7057
8127
  }
7058
8128
  },
7059
- "description": "Not found"
8129
+ "description": "Not authenticated"
7060
8130
  },
7061
- "503": {
8131
+ "403": {
7062
8132
  "content": {
7063
8133
  "application/json": {
7064
8134
  "schema": {
@@ -7070,7 +8140,7 @@
7070
8140
  "properties": {
7071
8141
  "status": {
7072
8142
  "enum": [
7073
- 503
8143
+ 403
7074
8144
  ]
7075
8145
  }
7076
8146
  },
@@ -7080,70 +8150,39 @@
7080
8150
  }
7081
8151
  }
7082
8152
  },
7083
- "description": "This environment stores no connectors."
8153
+ "description": "Forbidden"
7084
8154
  }
7085
8155
  },
7086
8156
  "security": [
7087
8157
  {
7088
8158
  "bearerAuth": [
7089
- "connector:write"
8159
+ "connector:read"
7090
8160
  ]
7091
8161
  },
7092
8162
  {
7093
8163
  "apiKey": []
7094
8164
  }
7095
8165
  ],
7096
- "summary": "Put connector by id"
7097
- }
7098
- },
7099
- "/api/connectors/login": {
8166
+ "summary": "List connector profiles"
8167
+ },
7100
8168
  "post": {
7101
- "description": "Open a Reduck cloud browser at a site's sign-in page for a PERSON to sign into. Returns `signInUrl`, a Reduck page that shows the live browser — hand it to whoever holds the account on that site. When they sign in, the connector for each host is stored on its own; poll `getConnectorLogin` to see it land. Use this when there is no Reduck extension to upload cookies from. `hosts` defaults to the login URL's own site. The browser is created when the page is opened and lives ~10 minutes from then. With `profile`, the connectors are stored for that end-user; `endUserLink` then also answers `endUserUrl`, a page the end-user signs in on without a Reduck account. An end-user's sign-in never answers what they typed.",
7102
- "operationId": "startConnectorLogin",
8169
+ "description": "Create an empty profile.",
8170
+ "operationId": "createConnectorProfile",
7103
8171
  "requestBody": {
7104
8172
  "content": {
7105
8173
  "application/json": {
7106
8174
  "schema": {
7107
8175
  "additionalProperties": false,
7108
8176
  "properties": {
7109
- "endUserLink": {
7110
- "description": "Also answer `endUserUrl`: a link for the end-user of `profile` to sign in on, with no Reduck account. Anyone holding it drives this one sign-in browser until it ends.",
7111
- "type": "boolean"
7112
- },
7113
- "hosts": {
7114
- "items": {
7115
- "type": "string"
7116
- },
7117
- "maxItems": 10,
7118
- "minItems": 1,
7119
- "type": "array"
7120
- },
7121
- "label": {
7122
- "description": "The label of the connector the sign-in stores into. Needed when the site already holds several connectors for the profile; without it the site's only one is refreshed.",
8177
+ "name": {
8178
+ "description": "The profile's name, unique among your profiles.",
7123
8179
  "maxLength": 200,
7124
8180
  "minLength": 1,
7125
8181
  "type": "string"
7126
- },
7127
- "loginUrl": {
7128
- "format": "uri",
7129
- "type": "string"
7130
- },
7131
- "profile": {
7132
- "description": "The end-user this connector is kept for, in your own naming (for example your user id). Omit, or leave empty, for your own account's connectors. Only an API key or an OAuth token can read or create an end-user's connector.",
7133
- "maxLength": 128,
7134
- "pattern": "^[A-Za-z0-9_.@:-]*$",
7135
- "type": "string"
7136
- },
7137
- "sso": {
7138
- "type": "boolean"
7139
- },
7140
- "ssoAccount": {
7141
- "maxLength": 320,
7142
- "type": "string"
7143
8182
  }
7144
8183
  },
7145
8184
  "required": [
7146
- "loginUrl"
8185
+ "name"
7147
8186
  ],
7148
8187
  "type": "object"
7149
8188
  }
@@ -7152,56 +8191,15 @@
7152
8191
  "required": true
7153
8192
  },
7154
8193
  "responses": {
7155
- "200": {
8194
+ "201": {
7156
8195
  "content": {
7157
8196
  "application/json": {
7158
8197
  "schema": {
7159
- "additionalProperties": false,
7160
- "properties": {
7161
- "endUserUrl": {
7162
- "description": "With `endUserLink`: the page the end-user signs in on, no Reduck account needed. It opens this one sign-in only, and stops working when the sign-in ends.",
7163
- "type": "string"
7164
- },
7165
- "expiresAt": {
7166
- "description": "When the browser closes on its own, storing whatever the jar holds by then.",
7167
- "type": "string"
7168
- },
7169
- "hosts": {
7170
- "description": "The sites that become connectors, canonical — the login URL's own when none were named.",
7171
- "items": {
7172
- "type": "string"
7173
- },
7174
- "type": "array"
7175
- },
7176
- "loginId": {
7177
- "description": "The sign-in's id. Nothing has to be called with it: it identifies this one in a log.",
7178
- "type": "string"
7179
- },
7180
- "loginUrl": {
7181
- "description": "Where the browser was sent, echoed back.",
7182
- "type": "string"
7183
- },
7184
- "profile": {
7185
- "description": "The end-user profile the connectors are stored into; absent for your own account.",
7186
- "type": "string"
7187
- },
7188
- "signInUrl": {
7189
- "description": "Where the person signs in: a Reduck page showing the live browser. Give it to the account's owner — the page opens for them and for nobody else, so a link that leaks is a dead end rather than somebody else's browser.",
7190
- "type": "string"
7191
- }
7192
- },
7193
- "required": [
7194
- "loginId",
7195
- "signInUrl",
7196
- "loginUrl",
7197
- "hosts",
7198
- "expiresAt"
7199
- ],
7200
- "type": "object"
8198
+ "$ref": "#/components/schemas/ConnectorProfile"
7201
8199
  }
7202
8200
  }
7203
8201
  },
7204
- "description": "OK"
8202
+ "description": "Created"
7205
8203
  },
7206
8204
  "400": {
7207
8205
  "content": {
@@ -7273,7 +8271,7 @@
7273
8271
  }
7274
8272
  }
7275
8273
  },
7276
- "description": "Out of cloud browser time for this period, or an end-user's sign-in was started from a browser session instead of with an API key or an OAuth token."
8274
+ "description": "Forbidden"
7277
8275
  },
7278
8276
  "409": {
7279
8277
  "content": {
@@ -7287,7 +8285,8 @@
7287
8285
  "properties": {
7288
8286
  "code": {
7289
8287
  "enum": [
7290
- "conflict"
8288
+ "conflict",
8289
+ "name_taken"
7291
8290
  ]
7292
8291
  },
7293
8292
  "status": {
@@ -7302,9 +8301,43 @@
7302
8301
  }
7303
8302
  }
7304
8303
  },
7305
- "description": "A site already holds several connectors for the profile and the sign-in names none: give it a `label`."
8304
+ "description": "You already have a profile with that name."
8305
+ }
8306
+ },
8307
+ "security": [
8308
+ {
8309
+ "bearerAuth": [
8310
+ "connector:write"
8311
+ ]
7306
8312
  },
7307
- "429": {
8313
+ {
8314
+ "apiKey": []
8315
+ }
8316
+ ],
8317
+ "summary": "Create connector profile"
8318
+ }
8319
+ },
8320
+ "/api/connectors/profiles/{profile_id}": {
8321
+ "delete": {
8322
+ "description": "Delete a profile, with all the Auth session cookies in it.",
8323
+ "operationId": "deleteConnectorProfile",
8324
+ "parameters": [
8325
+ {
8326
+ "in": "path",
8327
+ "name": "profile_id",
8328
+ "required": true,
8329
+ "schema": {
8330
+ "format": "uuid",
8331
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
8332
+ "type": "string"
8333
+ }
8334
+ }
8335
+ ],
8336
+ "responses": {
8337
+ "204": {
8338
+ "description": "No content"
8339
+ },
8340
+ "400": {
7308
8341
  "content": {
7309
8342
  "application/json": {
7310
8343
  "schema": {
@@ -7316,7 +8349,7 @@
7316
8349
  "properties": {
7317
8350
  "status": {
7318
8351
  "enum": [
7319
- 429
8352
+ 400
7320
8353
  ]
7321
8354
  }
7322
8355
  },
@@ -7326,9 +8359,9 @@
7326
8359
  }
7327
8360
  }
7328
8361
  },
7329
- "description": "Too many sign-ins already open on this account."
8362
+ "description": "Invalid request"
7330
8363
  },
7331
- "502": {
8364
+ "401": {
7332
8365
  "content": {
7333
8366
  "application/json": {
7334
8367
  "schema": {
@@ -7340,7 +8373,7 @@
7340
8373
  "properties": {
7341
8374
  "status": {
7342
8375
  "enum": [
7343
- 502
8376
+ 401
7344
8377
  ]
7345
8378
  }
7346
8379
  },
@@ -7350,9 +8383,9 @@
7350
8383
  }
7351
8384
  }
7352
8385
  },
7353
- "description": "The browser could not be opened."
8386
+ "description": "Not authenticated"
7354
8387
  },
7355
- "503": {
8388
+ "403": {
7356
8389
  "content": {
7357
8390
  "application/json": {
7358
8391
  "schema": {
@@ -7364,7 +8397,31 @@
7364
8397
  "properties": {
7365
8398
  "status": {
7366
8399
  "enum": [
7367
- 503
8400
+ 403
8401
+ ]
8402
+ }
8403
+ },
8404
+ "type": "object"
8405
+ }
8406
+ ]
8407
+ }
8408
+ }
8409
+ },
8410
+ "description": "Forbidden"
8411
+ },
8412
+ "404": {
8413
+ "content": {
8414
+ "application/json": {
8415
+ "schema": {
8416
+ "allOf": [
8417
+ {
8418
+ "$ref": "#/components/schemas/ErrorResponse"
8419
+ },
8420
+ {
8421
+ "properties": {
8422
+ "status": {
8423
+ "enum": [
8424
+ 404
7368
8425
  ]
7369
8426
  }
7370
8427
  },
@@ -7374,7 +8431,7 @@
7374
8431
  }
7375
8432
  }
7376
8433
  },
7377
- "description": "This environment stores no connectors, or provisions no browsers."
8434
+ "description": "No such profile."
7378
8435
  }
7379
8436
  },
7380
8437
  "security": [
@@ -7387,20 +8444,19 @@
7387
8444
  "apiKey": []
7388
8445
  }
7389
8446
  ],
7390
- "summary": "Start connector login"
7391
- }
7392
- },
7393
- "/api/connectors/login/{login_id}": {
8447
+ "summary": "Delete connector profile"
8448
+ },
7394
8449
  "get": {
7395
- "description": "How a sign-in started by `startConnectorLogin` is going: `waiting` (browser open, not signed in yet), `stored` (cookies saved, may still be refreshing), `done` (finished), `failed` (ended with nothing saved). `hosts` says how many cookies each site has so far.",
7396
- "operationId": "getConnectorLogin",
8450
+ "description": "Fetch one profile.",
8451
+ "operationId": "getConnectorProfile",
7397
8452
  "parameters": [
7398
8453
  {
7399
8454
  "in": "path",
7400
- "name": "login_id",
8455
+ "name": "profile_id",
7401
8456
  "required": true,
7402
8457
  "schema": {
7403
- "minLength": 1,
8458
+ "format": "uuid",
8459
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
7404
8460
  "type": "string"
7405
8461
  }
7406
8462
  }
@@ -7410,55 +8466,7 @@
7410
8466
  "content": {
7411
8467
  "application/json": {
7412
8468
  "schema": {
7413
- "additionalProperties": false,
7414
- "properties": {
7415
- "credential": {
7416
- "$ref": "#/components/schemas/ConnectorLoginCredential",
7417
- "description": "The username and password to offer to save, when the detector recognised them. Never answered for an end-user's sign-in: their password is not yours to keep."
7418
- },
7419
- "error": {
7420
- "description": "Why nothing more will happen, when something went wrong.",
7421
- "type": "string"
7422
- },
7423
- "expiresAt": {
7424
- "type": "string"
7425
- },
7426
- "hosts": {
7427
- "items": {
7428
- "$ref": "#/components/schemas/ConnectorLoginHost"
7429
- },
7430
- "type": "array"
7431
- },
7432
- "label": {
7433
- "description": "The label of the connector the sign-in stores into, when it was given one.",
7434
- "type": "string"
7435
- },
7436
- "loginId": {
7437
- "type": "string"
7438
- },
7439
- "loginUrl": {
7440
- "type": "string"
7441
- },
7442
- "pageUrl": {
7443
- "description": "Where the browser stands, so the page can say whether the sign-in has moved.",
7444
- "type": "string"
7445
- },
7446
- "profile": {
7447
- "description": "The end-user profile the connectors are stored into; absent for your own account.",
7448
- "type": "string"
7449
- },
7450
- "status": {
7451
- "$ref": "#/components/schemas/ConnectorLoginStatus"
7452
- }
7453
- },
7454
- "required": [
7455
- "loginId",
7456
- "status",
7457
- "loginUrl",
7458
- "hosts",
7459
- "expiresAt"
7460
- ],
7461
- "type": "object"
8469
+ "$ref": "#/components/schemas/ConnectorProfile"
7462
8470
  }
7463
8471
  }
7464
8472
  },
@@ -7534,7 +8542,7 @@
7534
8542
  }
7535
8543
  }
7536
8544
  },
7537
- "description": "No such sign-in on this account."
8545
+ "description": "No such profile."
7538
8546
  }
7539
8547
  },
7540
8548
  "security": [
@@ -7547,78 +8555,51 @@
7547
8555
  "apiKey": []
7548
8556
  }
7549
8557
  ],
7550
- "summary": "Get connector login"
7551
- }
7552
- },
7553
- "/api/connectors/login/{login_id}/finish": {
7554
- "post": {
7555
- "description": "End a sign-in now instead of waiting out its window: harvest whatever cookies are there, store them, release the browser. Returns the final state. A sign-in also ends on its own when the person is done or the window closes, so this is only a shortcut.",
7556
- "operationId": "finishConnectorLogin",
8558
+ "summary": "Get connector profile"
8559
+ },
8560
+ "patch": {
8561
+ "description": "Rename a profile.",
8562
+ "operationId": "patchConnectorProfile",
7557
8563
  "parameters": [
7558
8564
  {
7559
8565
  "in": "path",
7560
- "name": "login_id",
8566
+ "name": "profile_id",
7561
8567
  "required": true,
7562
8568
  "schema": {
7563
- "minLength": 1,
8569
+ "format": "uuid",
8570
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
7564
8571
  "type": "string"
7565
8572
  }
7566
8573
  }
7567
8574
  ],
8575
+ "requestBody": {
8576
+ "content": {
8577
+ "application/json": {
8578
+ "schema": {
8579
+ "additionalProperties": false,
8580
+ "properties": {
8581
+ "name": {
8582
+ "description": "The profile's name, unique among your profiles.",
8583
+ "maxLength": 200,
8584
+ "minLength": 1,
8585
+ "type": "string"
8586
+ }
8587
+ },
8588
+ "required": [
8589
+ "name"
8590
+ ],
8591
+ "type": "object"
8592
+ }
8593
+ }
8594
+ },
8595
+ "required": true
8596
+ },
7568
8597
  "responses": {
7569
8598
  "200": {
7570
- "content": {
7571
- "application/json": {
7572
- "schema": {
7573
- "additionalProperties": false,
7574
- "properties": {
7575
- "credential": {
7576
- "$ref": "#/components/schemas/ConnectorLoginCredential",
7577
- "description": "The username and password to offer to save, when the detector recognised them. Never answered for an end-user's sign-in: their password is not yours to keep."
7578
- },
7579
- "error": {
7580
- "description": "Why nothing more will happen, when something went wrong.",
7581
- "type": "string"
7582
- },
7583
- "expiresAt": {
7584
- "type": "string"
7585
- },
7586
- "hosts": {
7587
- "items": {
7588
- "$ref": "#/components/schemas/ConnectorLoginHost"
7589
- },
7590
- "type": "array"
7591
- },
7592
- "label": {
7593
- "description": "The label of the connector the sign-in stores into, when it was given one.",
7594
- "type": "string"
7595
- },
7596
- "loginId": {
7597
- "type": "string"
7598
- },
7599
- "loginUrl": {
7600
- "type": "string"
7601
- },
7602
- "pageUrl": {
7603
- "description": "Where the browser stands, so the page can say whether the sign-in has moved.",
7604
- "type": "string"
7605
- },
7606
- "profile": {
7607
- "description": "The end-user profile the connectors are stored into; absent for your own account.",
7608
- "type": "string"
7609
- },
7610
- "status": {
7611
- "$ref": "#/components/schemas/ConnectorLoginStatus"
7612
- }
7613
- },
7614
- "required": [
7615
- "loginId",
7616
- "status",
7617
- "loginUrl",
7618
- "hosts",
7619
- "expiresAt"
7620
- ],
7621
- "type": "object"
8599
+ "content": {
8600
+ "application/json": {
8601
+ "schema": {
8602
+ "$ref": "#/components/schemas/ConnectorProfile"
7622
8603
  }
7623
8604
  }
7624
8605
  },
@@ -7718,41 +8699,9 @@
7718
8699
  }
7719
8700
  }
7720
8701
  },
7721
- "description": "No such sign-in on this account."
7722
- }
7723
- },
7724
- "security": [
7725
- {
7726
- "bearerAuth": [
7727
- "connector:write"
7728
- ]
7729
- },
7730
- {
7731
- "apiKey": []
7732
- }
7733
- ],
7734
- "summary": "Finish connector login"
7735
- }
7736
- },
7737
- "/api/connectors/profiles": {
7738
- "get": {
7739
- "description": "List the end-user profiles you hold connectors for, with how many each has. Your own account's connectors are not a profile and are not listed.",
7740
- "operationId": "listConnectorProfiles",
7741
- "responses": {
7742
- "200": {
7743
- "content": {
7744
- "application/json": {
7745
- "schema": {
7746
- "items": {
7747
- "$ref": "#/components/schemas/ConnectorProfile"
7748
- },
7749
- "type": "array"
7750
- }
7751
- }
7752
- },
7753
- "description": "OK"
8702
+ "description": "No such profile."
7754
8703
  },
7755
- "401": {
8704
+ "409": {
7756
8705
  "content": {
7757
8706
  "application/json": {
7758
8707
  "schema": {
@@ -7762,33 +8711,15 @@
7762
8711
  },
7763
8712
  {
7764
8713
  "properties": {
7765
- "status": {
8714
+ "code": {
7766
8715
  "enum": [
7767
- 401
8716
+ "conflict",
8717
+ "name_taken"
7768
8718
  ]
7769
- }
7770
- },
7771
- "type": "object"
7772
- }
7773
- ]
7774
- }
7775
- }
7776
- },
7777
- "description": "Not authenticated"
7778
- },
7779
- "403": {
7780
- "content": {
7781
- "application/json": {
7782
- "schema": {
7783
- "allOf": [
7784
- {
7785
- "$ref": "#/components/schemas/ErrorResponse"
7786
- },
7787
- {
7788
- "properties": {
8719
+ },
7789
8720
  "status": {
7790
8721
  "enum": [
7791
- 403
8722
+ 409
7792
8723
  ]
7793
8724
  }
7794
8725
  },
@@ -7798,63 +8729,34 @@
7798
8729
  }
7799
8730
  }
7800
8731
  },
7801
- "description": "Forbidden"
8732
+ "description": "You already have a profile with that name."
7802
8733
  }
7803
8734
  },
7804
8735
  "security": [
7805
8736
  {
7806
8737
  "bearerAuth": [
7807
- "connector:read"
8738
+ "connector:write"
7808
8739
  ]
7809
8740
  },
7810
8741
  {
7811
8742
  "apiKey": []
7812
8743
  }
7813
8744
  ],
7814
- "summary": "List connector profiles"
8745
+ "summary": "Patch connector profile"
7815
8746
  }
7816
8747
  },
7817
- "/api/connectors/{host}": {
8748
+ "/api/connectors/{connector_id}": {
7818
8749
  "delete": {
7819
- "description": "Delete the connector you name on a host, and the cookies it holds. With no name, the site's only connector for the profile.",
8750
+ "description": "Delete one entry of Auth session cookies and the cookies it holds.",
7820
8751
  "operationId": "deleteConnector",
7821
8752
  "parameters": [
7822
- {
7823
- "in": "query",
7824
- "name": "profile",
7825
- "required": false,
7826
- "schema": {
7827
- "description": "The end-user this connector is kept for, in your own naming (for example your user id). Omit, or leave empty, for your own account's connectors. Only an API key or an OAuth token can read or create an end-user's connector.",
7828
- "maxLength": 128,
7829
- "pattern": "^[A-Za-z0-9_.@:-]*$",
7830
- "type": "string"
7831
- }
7832
- },
7833
- {
7834
- "in": "query",
7835
- "name": "account",
7836
- "required": false,
7837
- "schema": {
7838
- "description": "The connector whose account (as its probe or SSO sign-in reported it) is this one.",
7839
- "maxLength": 320,
7840
- "type": "string"
7841
- }
7842
- },
7843
- {
7844
- "in": "query",
7845
- "name": "label",
7846
- "required": false,
7847
- "schema": {
7848
- "description": "The connector with this label, or \"\" for the one without a label.",
7849
- "maxLength": 200,
7850
- "type": "string"
7851
- }
7852
- },
7853
8753
  {
7854
8754
  "in": "path",
7855
- "name": "host",
8755
+ "name": "connector_id",
7856
8756
  "required": true,
7857
8757
  "schema": {
8758
+ "format": "uuid",
8759
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
7858
8760
  "type": "string"
7859
8761
  }
7860
8762
  }
@@ -7957,37 +8859,7 @@
7957
8859
  }
7958
8860
  }
7959
8861
  },
7960
- "description": "Not found"
7961
- },
7962
- "409": {
7963
- "content": {
7964
- "application/json": {
7965
- "schema": {
7966
- "allOf": [
7967
- {
7968
- "$ref": "#/components/schemas/ErrorResponse"
7969
- },
7970
- {
7971
- "properties": {
7972
- "code": {
7973
- "enum": [
7974
- "conflict",
7975
- "connector_ambiguous"
7976
- ]
7977
- },
7978
- "status": {
7979
- "enum": [
7980
- 409
7981
- ]
7982
- }
7983
- },
7984
- "type": "object"
7985
- }
7986
- ]
7987
- }
7988
- }
7989
- },
7990
- "description": "Several connectors match; the body's `connectors` lists them. Name one with `account` or `label`."
8862
+ "description": "No such Auth session cookies."
7991
8863
  }
7992
8864
  },
7993
8865
  "security": [
@@ -8003,45 +8875,16 @@
8003
8875
  "summary": "Delete connector"
8004
8876
  },
8005
8877
  "get": {
8006
- "description": "Fetch the connector for a host, cookies included, ready for a run to inject. A host with no connector of its own is served by its nearest parent's, and a host with neither is a 404. When the site holds several connectors for the profile, name one with `account` or `label` (an empty `label` for the one without a label).",
8878
+ "description": "Get one entry of Auth session cookies, without the cookies.",
8007
8879
  "operationId": "getConnector",
8008
8880
  "parameters": [
8009
- {
8010
- "in": "query",
8011
- "name": "profile",
8012
- "required": false,
8013
- "schema": {
8014
- "description": "The end-user this connector is kept for, in your own naming (for example your user id). Omit, or leave empty, for your own account's connectors. Only an API key or an OAuth token can read or create an end-user's connector.",
8015
- "maxLength": 128,
8016
- "pattern": "^[A-Za-z0-9_.@:-]*$",
8017
- "type": "string"
8018
- }
8019
- },
8020
- {
8021
- "in": "query",
8022
- "name": "account",
8023
- "required": false,
8024
- "schema": {
8025
- "description": "The connector whose account (as its probe or SSO sign-in reported it) is this one.",
8026
- "maxLength": 320,
8027
- "type": "string"
8028
- }
8029
- },
8030
- {
8031
- "in": "query",
8032
- "name": "label",
8033
- "required": false,
8034
- "schema": {
8035
- "description": "The connector with this label, or \"\" for the one without a label.",
8036
- "maxLength": 200,
8037
- "type": "string"
8038
- }
8039
- },
8040
8881
  {
8041
8882
  "in": "path",
8042
- "name": "host",
8883
+ "name": "connector_id",
8043
8884
  "required": true,
8044
8885
  "schema": {
8886
+ "format": "uuid",
8887
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
8045
8888
  "type": "string"
8046
8889
  }
8047
8890
  }
@@ -8051,7 +8894,7 @@
8051
8894
  "content": {
8052
8895
  "application/json": {
8053
8896
  "schema": {
8054
- "$ref": "#/components/schemas/ConnectorWithCookies"
8897
+ "$ref": "#/components/schemas/Connector"
8055
8898
  }
8056
8899
  }
8057
8900
  },
@@ -8103,7 +8946,7 @@
8103
8946
  }
8104
8947
  }
8105
8948
  },
8106
- "description": "An end-user's connector is read with an API key or an OAuth token, not from a browser session."
8949
+ "description": "Forbidden"
8107
8950
  },
8108
8951
  "404": {
8109
8952
  "content": {
@@ -8127,37 +8970,7 @@
8127
8970
  }
8128
8971
  }
8129
8972
  },
8130
- "description": "Not found"
8131
- },
8132
- "409": {
8133
- "content": {
8134
- "application/json": {
8135
- "schema": {
8136
- "allOf": [
8137
- {
8138
- "$ref": "#/components/schemas/ErrorResponse"
8139
- },
8140
- {
8141
- "properties": {
8142
- "code": {
8143
- "enum": [
8144
- "conflict",
8145
- "connector_ambiguous"
8146
- ]
8147
- },
8148
- "status": {
8149
- "enum": [
8150
- 409
8151
- ]
8152
- }
8153
- },
8154
- "type": "object"
8155
- }
8156
- ]
8157
- }
8158
- }
8159
- },
8160
- "description": "Several connectors match; the body's `connectors` lists them. Name one with `account` or `label`."
8973
+ "description": "No such Auth session cookies."
8161
8974
  }
8162
8975
  },
8163
8976
  "security": [
@@ -8173,14 +8986,16 @@
8173
8986
  "summary": "Get connector"
8174
8987
  },
8175
8988
  "put": {
8176
- "description": "Replace the cookies of the connector you name on a host, creating it when none matches. With no name, the site's only connector for the profile is replaced, or created when there is none. Every cookie has to belong to that host. This is how the extension uploads a site's cookies.",
8177
- "operationId": "putConnector",
8989
+ "description": "Replace the cookies of one entry of Auth session cookies.",
8990
+ "operationId": "replaceConnectorCookies",
8178
8991
  "parameters": [
8179
8992
  {
8180
8993
  "in": "path",
8181
- "name": "host",
8994
+ "name": "connector_id",
8182
8995
  "required": true,
8183
8996
  "schema": {
8997
+ "format": "uuid",
8998
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
8184
8999
  "type": "string"
8185
9000
  }
8186
9001
  }
@@ -8191,12 +9006,8 @@
8191
9006
  "schema": {
8192
9007
  "additionalProperties": false,
8193
9008
  "properties": {
8194
- "account": {
8195
- "description": "The connector whose account (as its probe or SSO sign-in reported it) is this one.",
8196
- "maxLength": 320,
8197
- "type": "string"
8198
- },
8199
9009
  "cookies": {
9010
+ "description": "Every cookie belongs to the site of these Auth session cookies: its domain or one of the domain's subdomains.",
8200
9011
  "items": {
8201
9012
  "additionalProperties": {},
8202
9013
  "properties": {
@@ -8245,24 +9056,6 @@
8245
9056
  },
8246
9057
  "minItems": 1,
8247
9058
  "type": "array"
8248
- },
8249
- "is_sso": {
8250
- "type": "boolean"
8251
- },
8252
- "label": {
8253
- "description": "The connector with this label, or \"\" for the one without a label.",
8254
- "maxLength": 200,
8255
- "type": "string"
8256
- },
8257
- "profile": {
8258
- "description": "The end-user this connector is kept for, in your own naming (for example your user id). Omit, or leave empty, for your own account's connectors. Only an API key or an OAuth token can read or create an end-user's connector.",
8259
- "maxLength": 128,
8260
- "pattern": "^[A-Za-z0-9_.@:-]*$",
8261
- "type": "string"
8262
- },
8263
- "sso_account": {
8264
- "maxLength": 320,
8265
- "type": "string"
8266
9059
  }
8267
9060
  },
8268
9061
  "required": [
@@ -8307,7 +9100,7 @@
8307
9100
  }
8308
9101
  }
8309
9102
  },
8310
- "description": "The request is malformed, or it names an account no connector holds: an account is only ever recorded by a probe script."
9103
+ "description": "The request is malformed, or a cookie belongs to another site than the Auth session cookies."
8311
9104
  },
8312
9105
  "401": {
8313
9106
  "content": {
@@ -8355,7 +9148,7 @@
8355
9148
  }
8356
9149
  }
8357
9150
  },
8358
- "description": "An end-user's connector is written with an API key or an OAuth token, not from a browser session."
9151
+ "description": "Forbidden"
8359
9152
  },
8360
9153
  "404": {
8361
9154
  "content": {
@@ -8379,38 +9172,7 @@
8379
9172
  }
8380
9173
  }
8381
9174
  },
8382
- "description": "Not found"
8383
- },
8384
- "409": {
8385
- "content": {
8386
- "application/json": {
8387
- "schema": {
8388
- "allOf": [
8389
- {
8390
- "$ref": "#/components/schemas/ErrorResponse"
8391
- },
8392
- {
8393
- "properties": {
8394
- "code": {
8395
- "enum": [
8396
- "conflict",
8397
- "connector_ambiguous",
8398
- "name_taken"
8399
- ]
8400
- },
8401
- "status": {
8402
- "enum": [
8403
- 409
8404
- ]
8405
- }
8406
- },
8407
- "type": "object"
8408
- }
8409
- ]
8410
- }
8411
- }
8412
- },
8413
- "description": "Several connectors match; the body's `connectors` lists them. Or the label is already taken."
9175
+ "description": "No such Auth session cookies."
8414
9176
  }
8415
9177
  },
8416
9178
  "security": [
@@ -8423,7 +9185,7 @@
8423
9185
  "apiKey": []
8424
9186
  }
8425
9187
  ],
8426
- "summary": "Put connector"
9188
+ "summary": "Replace connector cookies"
8427
9189
  }
8428
9190
  },
8429
9191
  "/api/devices": {
@@ -8708,13 +9470,20 @@
8708
9470
  ],
8709
9471
  "type": "object"
8710
9472
  },
9473
+ "developer_mode": {
9474
+ "description": "Whether this account builds a product on Reduck for its own users, which publishes to it the MCP tools for Auth session cookies. False until the account says so.",
9475
+ "type": "boolean"
9476
+ },
8711
9477
  "email": {
8712
9478
  "type": "string"
8713
9479
  },
8714
9480
  "experimental_features": {
8715
9481
  "description": "Experimental features this account has been let into, whether granted to it directly or to one of its projects.",
8716
9482
  "items": {
8717
- "const": "flock_apps",
9483
+ "enum": [
9484
+ "flock_apps",
9485
+ "reduck_backend"
9486
+ ],
8718
9487
  "type": "string"
8719
9488
  },
8720
9489
  "type": "array"
@@ -8783,6 +9552,7 @@
8783
9552
  "role",
8784
9553
  "projects",
8785
9554
  "experimental_features",
9555
+ "developer_mode",
8786
9556
  "usage",
8787
9557
  "credential"
8788
9558
  ],
@@ -9054,8 +9824,20 @@
9054
9824
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
9055
9825
  "type": "string"
9056
9826
  },
9827
+ "profile_id": {
9828
+ "description": "The profile to use for a `loggedIn` script on a cloud browser. When you do not give it, the script uses your Auth session cookies that are in no profile.",
9829
+ "format": "uuid",
9830
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
9831
+ "type": "string"
9832
+ },
9057
9833
  "region": {
9058
9834
  "description": "The datacenter region of the managed browser. Select the region nearest to the site. If Reduck does not know the region, it refuses the request and gives the regions that it knows.",
9835
+ "enum": [
9836
+ "eu-central-1",
9837
+ "us-east-1",
9838
+ "us-west-2",
9839
+ "ap-southeast-1"
9840
+ ],
9059
9841
  "type": "string"
9060
9842
  },
9061
9843
  "scripts": {
@@ -10385,6 +11167,7 @@
10385
11167
  },
10386
11168
  "content": {
10387
11169
  "description": "The code of the version: a module with a default export, `export default async ({ builtins, page, args, files, ai }) => { ... }`. The default export gets the scope, and the value that it returns is the result. Code without a default export cannot run.",
11170
+ "maxLength": 200000,
10388
11171
  "minLength": 1,
10389
11172
  "type": "string"
10390
11173
  },
@@ -10403,9 +11186,6 @@
10403
11186
  "minLength": 1,
10404
11187
  "type": "string"
10405
11188
  },
10406
- "human_required": {
10407
- "type": "boolean"
10408
- },
10409
11189
  "input_schema": {
10410
11190
  "additionalProperties": true,
10411
11191
  "type": "object"
@@ -10656,6 +11436,7 @@
10656
11436
  "code": {
10657
11437
  "enum": [
10658
11438
  "unprocessable_content",
11439
+ "whoami_format",
10659
11440
  "noncompliant",
10660
11441
  "type_errors"
10661
11442
  ]
@@ -11015,7 +11796,7 @@
11015
11796
  "additionalProperties": false,
11016
11797
  "properties": {
11017
11798
  "content": {
11018
- "maxLength": 100000,
11799
+ "maxLength": 200000,
11019
11800
  "minLength": 1,
11020
11801
  "type": "string"
11021
11802
  },
@@ -12322,9 +13103,6 @@
12322
13103
  "minLength": 1,
12323
13104
  "type": "string"
12324
13105
  },
12325
- "human_required": {
12326
- "type": "boolean"
12327
- },
12328
13106
  "name": {
12329
13107
  "maxLength": 75,
12330
13108
  "minLength": 1,
@@ -12869,8 +13647,14 @@
12869
13647
  "description": "What the eval covers and why it exists, for whoever reads its verdict."
12870
13648
  },
12871
13649
  "region": {
12872
- "description": "Managed datacenter. Managed only; omit for the default region.",
12873
- "maxLength": 64,
13650
+ "description": "Managed datacenter. Managed only; omit it, or send \"\", for the default region.",
13651
+ "enum": [
13652
+ "eu-central-1",
13653
+ "us-east-1",
13654
+ "us-west-2",
13655
+ "ap-southeast-1",
13656
+ ""
13657
+ ],
12874
13658
  "type": "string"
12875
13659
  },
12876
13660
  "validation_code": {
@@ -12966,7 +13750,16 @@
12966
13750
  ]
12967
13751
  },
12968
13752
  "region": {
12969
- "type": "string"
13753
+ "anyOf": [
13754
+ {
13755
+ "$ref": "#/components/schemas/ManagedRegion"
13756
+ },
13757
+ {
13758
+ "const": "",
13759
+ "type": "string"
13760
+ }
13761
+ ],
13762
+ "description": "The datacenter of a managed browser; \"\" for the default one."
12970
13763
  },
12971
13764
  "validation_code": {
12972
13765
  "type": [
@@ -14160,8 +14953,20 @@
14160
14953
  },
14161
14954
  "type": "object"
14162
14955
  },
14956
+ "profile_id": {
14957
+ "description": "The profile to use for a `loggedIn` script on a cloud browser. When you do not give it, the script uses your Auth session cookies that are in no profile.",
14958
+ "format": "uuid",
14959
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
14960
+ "type": "string"
14961
+ },
14163
14962
  "region": {
14164
14963
  "description": "The datacenter region of the managed browser. Select the region nearest to the site. If Reduck does not know the region, it refuses the request and gives the regions that it knows.",
14964
+ "enum": [
14965
+ "eu-central-1",
14966
+ "us-east-1",
14967
+ "us-west-2",
14968
+ "ap-southeast-1"
14969
+ ],
14165
14970
  "type": "string"
14166
14971
  },
14167
14972
  "version_id": {
@@ -15172,6 +15977,7 @@
15172
15977
  "properties": {
15173
15978
  "content": {
15174
15979
  "description": "The code of the version: a module with a default export, `export default async ({ builtins, page, args, files, ai }) => { ... }`. The default export gets the scope, and the value that it returns is the result. Code without a default export cannot run.",
15980
+ "maxLength": 200000,
15175
15981
  "minLength": 1,
15176
15982
  "type": "string"
15177
15983
  },
@@ -15503,7 +16309,7 @@
15503
16309
  },
15504
16310
  "/api/scripts/{handle}/{host}/{slug}/versions/{version_id}": {
15505
16311
  "delete": {
15506
- "description": "Discard a draft version.",
16312
+ "description": "Discard a draft version. If it is the only version of the script, the script is deleted too.",
15507
16313
  "operationId": "deleteDraftScriptVersion",
15508
16314
  "parameters": [
15509
16315
  {
@@ -15888,6 +16694,7 @@
15888
16694
  "properties": {
15889
16695
  "content": {
15890
16696
  "description": "The code of the version: a module with a default export, `export default async ({ builtins, page, args, files, ai }) => { ... }`. The default export gets the scope, and the value that it returns is the result. Code without a default export cannot run.",
16697
+ "maxLength": 200000,
15891
16698
  "minLength": 1,
15892
16699
  "type": "string"
15893
16700
  },
@@ -16566,6 +17373,7 @@
16566
17373
  "code": {
16567
17374
  "enum": [
16568
17375
  "unprocessable_content",
17376
+ "whoami_format",
16569
17377
  "noncompliant",
16570
17378
  "type_errors",
16571
17379
  "eval_args_invalid",