@deepraxis/sdk 0.1.1-dev.bbfaae8 → 0.1.1-dev.bc829d1
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/METHODS.md +299 -13
- package/README.md +2 -2
- package/dist/core/credentials.d.ts +12 -3
- package/dist/core/credentials.js +22 -2
- package/dist/core/transport.d.ts +1 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +665 -28
- package/dist/generated/sdk.gen.js +3088 -1151
- package/dist/generated/types.gen.d.ts +49265 -37596
- package/dist/helpers/browser-actions.d.ts +84 -0
- package/dist/helpers/browser-actions.js +141 -0
- package/dist/helpers/browser-connect.d.ts +26 -2
- package/dist/helpers/browser-connect.js +263 -25
- package/dist/helpers/browser-decisions.d.ts +44 -0
- package/dist/helpers/browser-decisions.js +53 -0
- package/dist/helpers/browser-documentation.d.ts +1 -1
- package/dist/helpers/browser-documentation.js +20 -11
- package/dist/operations.generated.d.ts +35 -17832
- package/dist/operations.generated.js +9817 -5652
- package/dist/resources.generated.d.ts +219 -10
- package/dist/resources.generated.js +187 -8
- package/package.json +1 -1
package/METHODS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SDK methods
|
|
2
2
|
|
|
3
|
-
Generated by `bun run generate`.
|
|
3
|
+
Generated by `bun run generate`. 673 HTTP operations, plus product aliases. Version segments and path parameters are omitted from resource names. Inputs use typed `{ path, query, body, headers }` options. Collections form nested resource objects; POST actions retain their verb. Naming rules are documented in `scripts/resources.ts`; semantic exceptions and aliases with reasons are in `scripts/naming-overrides.ts`.
|
|
4
4
|
|
|
5
5
|
`always` returns an AsyncIterable; `optional` streams with `{ stream: true }`; `yes` pagination returns a Page. Only `{ data, next_cursor }` + `cursor` query contracts are automatically paginated.
|
|
6
6
|
|
|
@@ -582,6 +582,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
582
582
|
| stream | GET | `/browser/v1/sessions/{sessionId}/stream` | always | no |
|
|
583
583
|
| update | POST | `/browser/v1/sessions/{sessionId}` | no | no |
|
|
584
584
|
|
|
585
|
+
### browser.sessions.actions
|
|
586
|
+
|
|
587
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
588
|
+
|---|---|---|---|---|
|
|
589
|
+
| create | POST | `/browser/v1/sessions/{sessionId}/actions` | no | no |
|
|
590
|
+
|
|
585
591
|
### browser.sessions.events
|
|
586
592
|
|
|
587
593
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -872,12 +878,78 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
872
878
|
|
|
873
879
|
## devops
|
|
874
880
|
|
|
881
|
+
### devops.environments.checkpoints
|
|
882
|
+
|
|
883
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
884
|
+
|---|---|---|---|---|
|
|
885
|
+
| list | GET | `/devops/v1/environments/{id}/checkpoints` | no | no |
|
|
886
|
+
|
|
887
|
+
### devops.flags
|
|
888
|
+
|
|
889
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
890
|
+
|---|---|---|---|---|
|
|
891
|
+
| archive | POST | `/devops/v1/flags/{id}:archive` | no | no |
|
|
892
|
+
| conclude | POST | `/devops/v1/flags/{id}:conclude` | no | no |
|
|
893
|
+
| retrieve | GET | `/devops/v1/flags/{id}` | no | no |
|
|
894
|
+
| update | PATCH | `/devops/v1/flags/{id}` | no | no |
|
|
895
|
+
|
|
896
|
+
### devops.flags.environments
|
|
897
|
+
|
|
898
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
899
|
+
|---|---|---|---|---|
|
|
900
|
+
| update | PATCH | `/devops/v1/flags/{id}/environments/{environment}` | no | no |
|
|
901
|
+
|
|
902
|
+
### devops.progressiveRollouts
|
|
903
|
+
|
|
904
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
905
|
+
|---|---|---|---|---|
|
|
906
|
+
| create | POST | `/devops/v1/progressive-rollouts` | no | no |
|
|
907
|
+
| pause | POST | `/devops/v1/progressive-rollouts/{id}:pause` | no | no |
|
|
908
|
+
| resume | POST | `/devops/v1/progressive-rollouts/{id}:resume` | no | no |
|
|
909
|
+
| retrieve | GET | `/devops/v1/progressive-rollouts/{id}` | no | no |
|
|
910
|
+
| rollback | POST | `/devops/v1/progressive-rollouts/{id}:rollback` | no | no |
|
|
911
|
+
|
|
875
912
|
### devops.projects
|
|
876
913
|
|
|
877
914
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
878
915
|
|---|---|---|---|---|
|
|
916
|
+
| list | GET | `/devops/v1/projects` | no | no |
|
|
917
|
+
| retrieve | GET | `/devops/v1/projects/{id}` | no | no |
|
|
879
918
|
| retrieveTestCatalog | GET | `/devops/v1/projects/{project}/test-catalog` | no | no |
|
|
880
919
|
|
|
920
|
+
### devops.projects.environments
|
|
921
|
+
|
|
922
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
923
|
+
|---|---|---|---|---|
|
|
924
|
+
| list | GET | `/devops/v1/projects/{project}/environments` | no | no |
|
|
925
|
+
|
|
926
|
+
### devops.projects.flags
|
|
927
|
+
|
|
928
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
929
|
+
|---|---|---|---|---|
|
|
930
|
+
| create | POST | `/devops/v1/projects/{project}/flags` | no | no |
|
|
931
|
+
| list | GET | `/devops/v1/projects/{project}/flags` | no | no |
|
|
932
|
+
|
|
933
|
+
### devops.projects.promotions
|
|
934
|
+
|
|
935
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
936
|
+
|---|---|---|---|---|
|
|
937
|
+
| list | GET | `/devops/v1/projects/{project}/promotions` | no | no |
|
|
938
|
+
|
|
939
|
+
### devops.projects.releases
|
|
940
|
+
|
|
941
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
942
|
+
|---|---|---|---|---|
|
|
943
|
+
| create | POST | `/devops/v1/projects/{project}/releases` | no | no |
|
|
944
|
+
| list | GET | `/devops/v1/projects/{project}/releases` | no | no |
|
|
945
|
+
|
|
946
|
+
### devops.projects.targets
|
|
947
|
+
|
|
948
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
949
|
+
|---|---|---|---|---|
|
|
950
|
+
| list | GET | `/devops/v1/projects/{project}/targets` | no | no |
|
|
951
|
+
| refresh | POST | `/devops/v1/projects/{project}/targets:refresh` | no | no |
|
|
952
|
+
|
|
881
953
|
### devops.projects.testCases
|
|
882
954
|
|
|
883
955
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -910,6 +982,36 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
910
982
|
|---|---|---|---|---|
|
|
911
983
|
| list | GET | `/devops/v1/projects/{project}/test-suites` | no | no |
|
|
912
984
|
|
|
985
|
+
### devops.promotions
|
|
986
|
+
|
|
987
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
988
|
+
|---|---|---|---|---|
|
|
989
|
+
| approve | POST | `/devops/v1/promotions/{id}:approve` | no | no |
|
|
990
|
+
| cancel | POST | `/devops/v1/promotions/{id}:cancel` | no | no |
|
|
991
|
+
| conclude | POST | `/devops/v1/promotions/{id}:conclude` | no | no |
|
|
992
|
+
| create | POST | `/devops/v1/promotions` | no | no |
|
|
993
|
+
| retrieve | GET | `/devops/v1/promotions/{id}` | no | no |
|
|
994
|
+
| retry | POST | `/devops/v1/promotions/{id}:retry` | no | no |
|
|
995
|
+
|
|
996
|
+
### devops.promotions.rollouts
|
|
997
|
+
|
|
998
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
999
|
+
|---|---|---|---|---|
|
|
1000
|
+
| list | GET | `/devops/v1/promotions/{promotion}/rollouts` | no | no |
|
|
1001
|
+
|
|
1002
|
+
### devops.releases
|
|
1003
|
+
|
|
1004
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1005
|
+
|---|---|---|---|---|
|
|
1006
|
+
| abandon | POST | `/devops/v1/releases/{id}:abandon` | no | no |
|
|
1007
|
+
| retrieve | GET | `/devops/v1/releases/{id}` | no | no |
|
|
1008
|
+
|
|
1009
|
+
### devops.rollouts
|
|
1010
|
+
|
|
1011
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1012
|
+
|---|---|---|---|---|
|
|
1013
|
+
| retrieve | GET | `/devops/v1/rollouts/{id}` | no | no |
|
|
1014
|
+
|
|
913
1015
|
### devops.testCases
|
|
914
1016
|
|
|
915
1017
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -1062,12 +1164,25 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
1062
1164
|
|
|
1063
1165
|
## media
|
|
1064
1166
|
|
|
1167
|
+
### media.assets
|
|
1168
|
+
|
|
1169
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1170
|
+
|---|---|---|---|---|
|
|
1171
|
+
| edit | POST | `/media/v1/libraries/{library_id}/assets/{asset_id}/edits` | no | no |
|
|
1172
|
+
| lineage | GET | `/media/v1/libraries/{library_id}/assets/{asset_id}/lineage` | no | no |
|
|
1173
|
+
|
|
1065
1174
|
### media.generation.capabilities
|
|
1066
1175
|
|
|
1067
1176
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
1068
1177
|
|---|---|---|---|---|
|
|
1069
1178
|
| list | GET | `/media/v1/generation/capabilities` | no | no |
|
|
1070
1179
|
|
|
1180
|
+
### media.images
|
|
1181
|
+
|
|
1182
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1183
|
+
|---|---|---|---|---|
|
|
1184
|
+
| generate | POST | `/media/v1/libraries/{library_id}/images/generations` | no | no |
|
|
1185
|
+
|
|
1071
1186
|
### media.libraries
|
|
1072
1187
|
|
|
1073
1188
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -1077,6 +1192,8 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
1077
1192
|
| list | GET | `/media/v1/libraries` | no | yes |
|
|
1078
1193
|
| restore | POST | `/media/v1/libraries/{library_id}/restore` | no | no |
|
|
1079
1194
|
| retrieve | GET | `/media/v1/libraries/{library_id}` | no | no |
|
|
1195
|
+
| retrieveDefault | GET | `/media/v1/libraries/default` | no | no |
|
|
1196
|
+
| setDefault | PUT | `/media/v1/libraries/default` | no | no |
|
|
1080
1197
|
| update | PATCH | `/media/v1/libraries/{library_id}` | no | no |
|
|
1081
1198
|
|
|
1082
1199
|
### media.libraries.assets
|
|
@@ -1139,12 +1256,6 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
1139
1256
|
|---|---|---|---|---|
|
|
1140
1257
|
| list | GET | `/media/v1/libraries/{library_id}/folders` | no | no |
|
|
1141
1258
|
|
|
1142
|
-
### media.libraries.generations
|
|
1143
|
-
|
|
1144
|
-
| Method | HTTP | Path | Streaming | Pagination |
|
|
1145
|
-
|---|---|---|---|---|
|
|
1146
|
-
| create | POST | `/media/v1/libraries/{library_id}/generations` | no | no |
|
|
1147
|
-
|
|
1148
1259
|
### media.libraries.jobs
|
|
1149
1260
|
|
|
1150
1261
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -1153,12 +1264,6 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
1153
1264
|
| list | GET | `/media/v1/libraries/{library_id}/jobs` | no | yes |
|
|
1154
1265
|
| retrieve | GET | `/media/v1/libraries/{library_id}/jobs/{job_id}` | no | no |
|
|
1155
1266
|
|
|
1156
|
-
### media.libraries.jobs.outputs.save
|
|
1157
|
-
|
|
1158
|
-
| Method | HTTP | Path | Streaming | Pagination |
|
|
1159
|
-
|---|---|---|---|---|
|
|
1160
|
-
| create | POST | `/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save` | no | no |
|
|
1161
|
-
|
|
1162
1267
|
### media.libraries.purge
|
|
1163
1268
|
|
|
1164
1269
|
| Method | HTTP | Path | Streaming | Pagination |
|
|
@@ -1196,6 +1301,18 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
1196
1301
|
| list | GET | `/media/v1/libraries/{library_id}/understandings` | no | yes |
|
|
1197
1302
|
| retrieveFailureSummary | GET | `/media/v1/libraries/{library_id}/understandings/failure_summary` | no | no |
|
|
1198
1303
|
|
|
1304
|
+
### media.speech
|
|
1305
|
+
|
|
1306
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1307
|
+
|---|---|---|---|---|
|
|
1308
|
+
| create | POST | `/media/v1/libraries/{library_id}/audio/speech` | no | no |
|
|
1309
|
+
|
|
1310
|
+
### media.videos
|
|
1311
|
+
|
|
1312
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1313
|
+
|---|---|---|---|---|
|
|
1314
|
+
| generate | POST | `/media/v1/libraries/{library_id}/videos/generations` | no | no |
|
|
1315
|
+
|
|
1199
1316
|
## meta
|
|
1200
1317
|
|
|
1201
1318
|
### meta.docs
|
|
@@ -1360,6 +1477,7 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
1360
1477
|
| create | POST | `/ontology/v1/nodes` | no | no |
|
|
1361
1478
|
| list | GET | `/ontology/v1/nodes` | no | yes |
|
|
1362
1479
|
| retrieve | GET | `/ontology/v1/nodes/{node_id}` | no | no |
|
|
1480
|
+
| retrieveNeighborhood | GET | `/ontology/v1/nodes/{node_id}/neighborhood` | no | no |
|
|
1363
1481
|
| update | PATCH | `/ontology/v1/nodes/{node_id}` | no | no |
|
|
1364
1482
|
|
|
1365
1483
|
### ontology.nodes.merge
|
|
@@ -1592,6 +1710,166 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
1592
1710
|
|---|---|---|---|---|
|
|
1593
1711
|
| create | POST | `/search/v1/search` | no | no |
|
|
1594
1712
|
|
|
1713
|
+
## studio
|
|
1714
|
+
|
|
1715
|
+
### studio.codexes
|
|
1716
|
+
|
|
1717
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1718
|
+
|---|---|---|---|---|
|
|
1719
|
+
| create | POST | `/studio/v1/codexes` | no | no |
|
|
1720
|
+
| delete | DELETE | `/studio/v1/codexes/{codex}` | no | no |
|
|
1721
|
+
| list | GET | `/studio/v1/codexes` | no | no |
|
|
1722
|
+
| retrieve | GET | `/studio/v1/codexes/{codex}` | no | no |
|
|
1723
|
+
| update | PATCH | `/studio/v1/codexes/{codex}` | no | no |
|
|
1724
|
+
|
|
1725
|
+
### studio.codexes.entries
|
|
1726
|
+
|
|
1727
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1728
|
+
|---|---|---|---|---|
|
|
1729
|
+
| create | POST | `/studio/v1/codexes/{codex}/entries` | no | no |
|
|
1730
|
+
| delete | DELETE | `/studio/v1/codexes/{codex}/entries/{entry}` | no | no |
|
|
1731
|
+
| list | GET | `/studio/v1/codexes/{codex}/entries` | no | no |
|
|
1732
|
+
| retrieve | GET | `/studio/v1/codexes/{codex}/entries/{entry}` | no | no |
|
|
1733
|
+
| update | PATCH | `/studio/v1/codexes/{codex}/entries/{entry}` | no | no |
|
|
1734
|
+
|
|
1735
|
+
### studio.genres
|
|
1736
|
+
|
|
1737
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1738
|
+
|---|---|---|---|---|
|
|
1739
|
+
| list | GET | `/studio/v1/genres` | no | no |
|
|
1740
|
+
| retrieve | GET | `/studio/v1/genres/{genre}` | no | no |
|
|
1741
|
+
|
|
1742
|
+
### studio.platforms
|
|
1743
|
+
|
|
1744
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1745
|
+
|---|---|---|---|---|
|
|
1746
|
+
| list | GET | `/studio/v1/platforms` | no | no |
|
|
1747
|
+
| retrieve | GET | `/studio/v1/platforms/{platform}` | no | no |
|
|
1748
|
+
|
|
1749
|
+
### studio.reviewers
|
|
1750
|
+
|
|
1751
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1752
|
+
|---|---|---|---|---|
|
|
1753
|
+
| list | GET | `/studio/v1/reviewers` | no | no |
|
|
1754
|
+
| update | PATCH | `/studio/v1/reviewers/{agent}` | no | no |
|
|
1755
|
+
|
|
1756
|
+
### studio.styles
|
|
1757
|
+
|
|
1758
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1759
|
+
|---|---|---|---|---|
|
|
1760
|
+
| create | POST | `/studio/v1/styles` | no | no |
|
|
1761
|
+
| delete | DELETE | `/studio/v1/styles/{style}` | no | no |
|
|
1762
|
+
| list | GET | `/studio/v1/styles` | no | no |
|
|
1763
|
+
| retrieve | GET | `/studio/v1/styles/{style}` | no | no |
|
|
1764
|
+
| update | PATCH | `/studio/v1/styles/{style}` | no | no |
|
|
1765
|
+
|
|
1766
|
+
### studio.templates
|
|
1767
|
+
|
|
1768
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1769
|
+
|---|---|---|---|---|
|
|
1770
|
+
| create | POST | `/studio/v1/templates` | no | no |
|
|
1771
|
+
| delete | DELETE | `/studio/v1/templates/{template}` | no | no |
|
|
1772
|
+
| list | GET | `/studio/v1/templates` | no | no |
|
|
1773
|
+
| retrieve | GET | `/studio/v1/templates/{template}` | no | no |
|
|
1774
|
+
|
|
1775
|
+
### studio.themes
|
|
1776
|
+
|
|
1777
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1778
|
+
|---|---|---|---|---|
|
|
1779
|
+
| create | POST | `/studio/v1/themes` | no | no |
|
|
1780
|
+
| delete | DELETE | `/studio/v1/themes/{theme}` | no | no |
|
|
1781
|
+
| list | GET | `/studio/v1/themes` | no | no |
|
|
1782
|
+
| retrieve | GET | `/studio/v1/themes/{theme}` | no | no |
|
|
1783
|
+
| update | PATCH | `/studio/v1/themes/{theme}` | no | no |
|
|
1784
|
+
|
|
1785
|
+
### studio.works
|
|
1786
|
+
|
|
1787
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1788
|
+
|---|---|---|---|---|
|
|
1789
|
+
| create | POST | `/studio/v1/works` | no | no |
|
|
1790
|
+
| list | GET | `/studio/v1/works` | no | no |
|
|
1791
|
+
| resolve | GET | `/studio/v1/works:resolve` | no | no |
|
|
1792
|
+
| retrieve | GET | `/studio/v1/works/{work}` | no | no |
|
|
1793
|
+
| update | PATCH | `/studio/v1/works/{work}` | no | no |
|
|
1794
|
+
| updateBrief | PATCH | `/studio/v1/works/{work}/brief` | no | no |
|
|
1795
|
+
|
|
1796
|
+
### studio.works.drafts
|
|
1797
|
+
|
|
1798
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1799
|
+
|---|---|---|---|---|
|
|
1800
|
+
| create | POST | `/studio/v1/works/{work}/drafts` | no | no |
|
|
1801
|
+
| list | GET | `/studio/v1/works/{work}/drafts` | no | no |
|
|
1802
|
+
| rebase | POST | `/studio/v1/works/{work}/drafts/{draft}:rebase` | no | no |
|
|
1803
|
+
| retrieve | GET | `/studio/v1/works/{work}/drafts/{draft}` | no | no |
|
|
1804
|
+
| retrieveExport | GET | `/studio/v1/works/{work}/drafts/{draft}/export` | no | no |
|
|
1805
|
+
| retrieveOutline | GET | `/studio/v1/works/{work}/drafts/{draft}/outline` | no | no |
|
|
1806
|
+
| retrieveReview | GET | `/studio/v1/works/{work}/drafts/{draft}/review` | no | no |
|
|
1807
|
+
| update | PATCH | `/studio/v1/works/{work}/drafts/{draft}` | no | no |
|
|
1808
|
+
|
|
1809
|
+
### studio.works.drafts.renditions
|
|
1810
|
+
|
|
1811
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1812
|
+
|---|---|---|---|---|
|
|
1813
|
+
| create | POST | `/studio/v1/works/{work}/drafts/{draft}/renditions` | no | no |
|
|
1814
|
+
|
|
1815
|
+
### studio.works.drafts.status
|
|
1816
|
+
|
|
1817
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1818
|
+
|---|---|---|---|---|
|
|
1819
|
+
| list | GET | `/studio/v1/works/{work}/drafts/{draft}/status` | no | no |
|
|
1820
|
+
|
|
1821
|
+
### studio.works.drafts.units
|
|
1822
|
+
|
|
1823
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1824
|
+
|---|---|---|---|---|
|
|
1825
|
+
| batchCreate | POST | `/studio/v1/works/{work}/drafts/{draft}/units:batchCreate` | no | no |
|
|
1826
|
+
| batchUpdate | POST | `/studio/v1/works/{work}/drafts/{draft}/units:batchUpdate` | no | no |
|
|
1827
|
+
| create | POST | `/studio/v1/works/{work}/drafts/{draft}/units` | no | no |
|
|
1828
|
+
|
|
1829
|
+
### studio.works.renditions
|
|
1830
|
+
|
|
1831
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1832
|
+
|---|---|---|---|---|
|
|
1833
|
+
| delete | DELETE | `/studio/v1/works/{work}/renditions/{rendition}` | no | no |
|
|
1834
|
+
| list | GET | `/studio/v1/works/{work}/renditions` | no | no |
|
|
1835
|
+
| publish | POST | `/studio/v1/works/{work}/renditions/{rendition}:publish` | no | no |
|
|
1836
|
+
| render | POST | `/studio/v1/works/{work}/renditions/{rendition}:render` | no | no |
|
|
1837
|
+
| retrieve | GET | `/studio/v1/works/{work}/renditions/{rendition}` | no | no |
|
|
1838
|
+
| retrieveContent | GET | `/studio/v1/works/{work}/renditions/{rendition}/content` | no | no |
|
|
1839
|
+
| update | PATCH | `/studio/v1/works/{work}/renditions/{rendition}` | no | no |
|
|
1840
|
+
|
|
1841
|
+
### studio.works.reviewSettings
|
|
1842
|
+
|
|
1843
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1844
|
+
|---|---|---|---|---|
|
|
1845
|
+
| retrieve | GET | `/studio/v1/works/{work}/review-settings` | no | no |
|
|
1846
|
+
| update | PATCH | `/studio/v1/works/{work}/review-settings` | no | no |
|
|
1847
|
+
|
|
1848
|
+
### studio.works.reviews
|
|
1849
|
+
|
|
1850
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1851
|
+
|---|---|---|---|---|
|
|
1852
|
+
| appeal | POST | `/studio/v1/works/{work}/reviews/{review}:appeal` | no | no |
|
|
1853
|
+
| cancel | POST | `/studio/v1/works/{work}/reviews/{review}:cancel` | no | no |
|
|
1854
|
+
| create | POST | `/studio/v1/works/{work}/reviews` | no | no |
|
|
1855
|
+
| list | GET | `/studio/v1/works/{work}/reviews` | no | no |
|
|
1856
|
+
| retrieve | GET | `/studio/v1/works/{work}/reviews/{review}` | no | no |
|
|
1857
|
+
|
|
1858
|
+
### studio.works.units
|
|
1859
|
+
|
|
1860
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1861
|
+
|---|---|---|---|---|
|
|
1862
|
+
| move | POST | `/studio/v1/works/{work}/units/{unit}:move` | no | no |
|
|
1863
|
+
| retrieve | GET | `/studio/v1/works/{work}/units/{unit}` | no | no |
|
|
1864
|
+
| retrieveContext | GET | `/studio/v1/works/{work}/units/{unit}/context` | no | no |
|
|
1865
|
+
| update | PATCH | `/studio/v1/works/{work}/units/{unit}` | no | no |
|
|
1866
|
+
|
|
1867
|
+
### studio.works.units.blocks
|
|
1868
|
+
|
|
1869
|
+
| Method | HTTP | Path | Streaming | Pagination |
|
|
1870
|
+
|---|---|---|---|---|
|
|
1871
|
+
| patch | POST | `/studio/v1/works/{work}/units/{unit}/blocks:patch` | no | no |
|
|
1872
|
+
|
|
1595
1873
|
## ticket
|
|
1596
1874
|
|
|
1597
1875
|
### ticket.activity
|
|
@@ -1831,11 +2109,19 @@ Multipart request bodies expand plain objects into bracketed fields (for example
|
|
|
1831
2109
|
| crm.properties.archive | CRM DELETE archives the resource rather than permanently deleting it; expose the archive product verb. |
|
|
1832
2110
|
| database.databases.rest.create | The final parameter identifies a table collection; POST inserts rows rather than updating the table. |
|
|
1833
2111
|
| file.uploads.createSigned | Signed upload creation returns a one-time local PUT URL; ADR-039 names this operation uploads.createSigned. |
|
|
2112
|
+
| media.libraries.retrieveDefault | ADR-094 §9 names the default-library read libraries.retrieveDefault; the URL names a reference rather than an id, so the path-derived name would otherwise read as retrieving a library called default. |
|
|
2113
|
+
| media.libraries.setDefault | ADR-094 §9 names the default-library write libraries.setDefault; the URL has no library id because the organization owns one default library, so the path alone cannot say which. |
|
|
2114
|
+
| media.assets.edit | ADR-094 §9 names the edit write assets.edit; an edit acts on the addressed asset and returns a Job, so the URL nesting under a library is a mount rather than an SDK resource level. |
|
|
2115
|
+
| media.assets.lineage | ADR-094 §9 names the edit-tree read assets.lineage; lineage is the product verb and the URL nesting under a library is a mount, not an SDK resource level. |
|
|
2116
|
+
| media.speech.create | ADR-094 §1/§9 names speech synthesis speech.create; the URL says audio/speech because that is the artifact the caller gets back, and the path alone would derive a speech collection create under an audio level that is not an SDK resource. |
|
|
2117
|
+
| media.images.generate | ADR-094 §9 names image generation images.generate; the URL mounts it under a library, but generation is an operation on images and the path alone would derive a generations collection create. |
|
|
2118
|
+
| media.videos.generate | ADR-094 §2/§9 names video generation videos.generate beside images.generate; the URL mounts it under a library, but generation is an operation on videos and the path alone would derive a generations collection create. The unqualified videos resource is the video lane, distinct from the batch and legacy job resources. |
|
|
1834
2119
|
| meta.docs.search | Documentation keyword search is an operation on docs, not a nested collection. |
|
|
1835
2120
|
| sandbox.sandboxes.commands.run | Sandbox data operations use the E2B SDK verb while preserving URL resource nesting. |
|
|
1836
2121
|
| sandbox.sandboxes.files.remove | Sandbox data operations use the E2B SDK verb while preserving URL resource nesting. |
|
|
1837
2122
|
| sandbox.sandboxes.files.read | Sandbox data operations use the E2B SDK verb while preserving URL resource nesting. |
|
|
1838
2123
|
| sandbox.sandboxes.files.write | Sandbox data operations use the E2B SDK verb while preserving URL resource nesting. |
|
|
2124
|
+
| studio.works.reviewSettings.retrieve | A work has one review-settings singleton; the segment ends in s only because English writes it that way, so the collection rule would derive reviewSettings.list for a read that returns the settings object itself. |
|
|
1839
2125
|
| vault.oauth.retrieveClientMetadata | The literal .json filename otherwise introduces a dot inside a method identifier. |
|
|
1840
2126
|
|
|
1841
2127
|
## SDK parameter aliases
|
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ console.log(completion.choices[0]?.message.content);
|
|
|
33
33
|
## Why this SDK
|
|
34
34
|
|
|
35
35
|
- **The whole platform, one client.** About 350 operations across models, agents, sandboxes,
|
|
36
|
-
|
|
36
|
+
browsers, web search, databases, knowledge bases, files, media, automation and hosted
|
|
37
37
|
applications, generated from the same contract as the API.
|
|
38
38
|
- **Types from the contract.** Every path, query, body and response is typed, including the
|
|
39
39
|
events of each stream, so your editor knows what comes back.
|
|
@@ -122,7 +122,7 @@ conversation with it, on its own machine.
|
|
|
122
122
|
```ts
|
|
123
123
|
const { sandboxes } = praxis.sandbox;
|
|
124
124
|
const sandbox = await sandboxes.create({
|
|
125
|
-
body: { templateID: 'base' },
|
|
125
|
+
body: { templateID: 'base', autoPause: false }, // ends at its timeout; autoPause: true keeps a long-lived computer
|
|
126
126
|
});
|
|
127
127
|
const result = await sandboxes.commands.run({
|
|
128
128
|
path: { sandbox_id: sandbox.sandboxID },
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Default credential chain for code running on a Praxis computer (ticket-5367):
|
|
3
|
-
* PRAXIS_API_TOKEN environment variable, then
|
|
4
|
-
*
|
|
2
|
+
* Default credential chain for code running on a Praxis computer (ticket-5367, ADR-098 §2):
|
|
3
|
+
* the PRAXIS_API_TOKEN environment variable, then the login file of the environment,
|
|
4
|
+
* `~/.praxis/cli/<env>.json` — the one file `praxis login` writes for a person and the platform writes
|
|
5
|
+
* for a managed login. Resolved at call time so a token the platform renewed in the file is picked up
|
|
6
|
+
* by an already-running process.
|
|
5
7
|
*/
|
|
6
8
|
export interface ResolvedCredentials {
|
|
7
9
|
token?: string;
|
|
@@ -9,6 +11,13 @@ export interface ResolvedCredentials {
|
|
|
9
11
|
}
|
|
10
12
|
type Env = Record<string, string | undefined>;
|
|
11
13
|
type ReadFile = (path: string) => string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Which environment's login file applies: PRAXIS_ENV when it names one, otherwise a `-develop.` host in
|
|
16
|
+
* PRAXIS_API_URL means develop and any other host production — the rule apps/cli/src/config/env.ts
|
|
17
|
+
* applies. A PRAXIS_ENV that is not a plain name is no environment at all and is ignored. Pure.
|
|
18
|
+
*/
|
|
19
|
+
export declare function credentialsEnv(env: Env): string;
|
|
20
|
+
/** The one login file, the same path the CLI reads for this environment. Null without a home directory. Pure. */
|
|
12
21
|
export declare function credentialsPath(env: Env): string | null;
|
|
13
22
|
export declare function resolveDefaultCredentials(env?: Env, readFile?: ReadFile): ResolvedCredentials;
|
|
14
23
|
export {};
|
package/dist/core/credentials.js
CHANGED
|
@@ -8,9 +8,29 @@ function defaultReadFile(path) {
|
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Which environment's login file applies: PRAXIS_ENV when it names one, otherwise a `-develop.` host in
|
|
13
|
+
* PRAXIS_API_URL means develop and any other host production — the rule apps/cli/src/config/env.ts
|
|
14
|
+
* applies. A PRAXIS_ENV that is not a plain name is no environment at all and is ignored. Pure.
|
|
15
|
+
*/
|
|
16
|
+
export function credentialsEnv(env) {
|
|
17
|
+
const declared = nonEmpty(env.PRAXIS_ENV);
|
|
18
|
+
if (declared && /^[A-Za-z0-9_-]+$/.test(declared))
|
|
19
|
+
return declared;
|
|
20
|
+
const apiUrl = nonEmpty(env.PRAXIS_API_URL);
|
|
21
|
+
if (apiUrl) {
|
|
22
|
+
try {
|
|
23
|
+
if (new URL(apiUrl).hostname.includes('-develop.'))
|
|
24
|
+
return 'develop';
|
|
25
|
+
}
|
|
26
|
+
catch { /* a malformed URL is not evidence of develop */ }
|
|
27
|
+
}
|
|
28
|
+
return 'production';
|
|
29
|
+
}
|
|
30
|
+
/** The one login file, the same path the CLI reads for this environment. Null without a home directory. Pure. */
|
|
11
31
|
export function credentialsPath(env) {
|
|
12
32
|
const home = nonEmpty(env.HOME) ?? nonEmpty(env.USERPROFILE);
|
|
13
|
-
return home ? `${home.replace(
|
|
33
|
+
return home ? `${home.replace(/[/\\]+$/, '')}/.praxis/cli/${credentialsEnv(env)}.json` : null;
|
|
14
34
|
}
|
|
15
35
|
export function resolveDefaultCredentials(env = globalThis.process?.env ?? {}, readFile = defaultReadFile) {
|
|
16
36
|
const envToken = nonEmpty(env.PRAXIS_API_TOKEN);
|
|
@@ -23,7 +43,7 @@ export function resolveDefaultCredentials(env = globalThis.process?.env ?? {}, r
|
|
|
23
43
|
return envUrl ? { apiUrl: envUrl } : {};
|
|
24
44
|
try {
|
|
25
45
|
const file = JSON.parse(text);
|
|
26
|
-
const token = nonEmpty(file.
|
|
46
|
+
const token = nonEmpty(file.access_token);
|
|
27
47
|
const apiUrl = envUrl ?? nonEmpty(file.api_url);
|
|
28
48
|
return { ...(token ? { token } : {}), ...(apiUrl ? { apiUrl } : {}) };
|
|
29
49
|
}
|
package/dist/core/transport.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SSEEvent } from './sse.js';
|
|
2
2
|
export interface PraxisOptions {
|
|
3
|
-
/** Explicit key. Omitted on a Praxis computer: PRAXIS_API_TOKEN, then
|
|
3
|
+
/** Explicit key. Omitted on a Praxis computer: PRAXIS_API_TOKEN, then the login file `~/.praxis/cli/<env>.json`, are used. */
|
|
4
4
|
apiKey?: string;
|
|
5
5
|
baseUrl?: string;
|
|
6
6
|
timeoutMs?: number;
|