@deepraxis/sdk 0.1.1-dev.da8587f → 0.1.1-dev.daf2585

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.
@@ -903,6 +903,24 @@ export const browserListEvents = (options) => (options.client ?? client).get({
903
903
  url: '/browser/v1/sessions/{sessionId}/events',
904
904
  ...options
905
905
  });
906
+ /**
907
+ * 执行页面动作
908
+ *
909
+ * 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab 时作用于当前标签页。
910
+ */
911
+ export const browserRunPageAction = (options) => (options.client ?? client).post({
912
+ security: [{
913
+ key: 'BrowserBearer',
914
+ scheme: 'bearer',
915
+ type: 'http'
916
+ }],
917
+ url: '/browser/v1/sessions/{sessionId}/actions',
918
+ ...options,
919
+ headers: {
920
+ 'Content-Type': 'application/json',
921
+ ...options.headers
922
+ }
923
+ });
906
924
  /**
907
925
  * 请求人工接管
908
926
  *
@@ -956,7 +974,7 @@ export const browserViewerHeartbeat = (options) => (options.client ?? client).po
956
974
  /**
957
975
  * 列出浏览器上下文
958
976
  *
959
- * 分页列出当前账户保存的登录态,按登录态 ID 升序排列。每项返回名称、标签及保存内容的统计信息;将 nextCursor 原样传入读取下一页,直到其为 null。
977
+ * 分页列出当前账户保存的登录态,按登录态 ID 升序排列。每项返回名称、标签及保存内容的统计信息;将 nextCursor 原样传入读取下一页,直到其为 null。传 name 时只返回该名称的登录态;名称在当前账户内唯一,所以最多一条。
960
978
  */
961
979
  export const browserListContexts = (options) => (options?.client ?? client).get({
962
980
  security: [{
@@ -6428,9 +6446,9 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6428
6446
  * - `GetTimeline` — Duration, tracks, joins; clips are under `items`.
6429
6447
  * - `GetItem` — One clip's compact view, by id.
6430
6448
  * - `FindItems` — Visit every clip with its track; collect results.
6431
- * - `GetMedia` — Media metadata; `durationUs` is microseconds.
6449
+ * - `GetMedia` — Media metadata; `duration` is seconds.
6432
6450
  * - `GetTranscript` — Transcript words in source microseconds.
6433
- * - `GetAnalysis` — Silence, filler or scene segments.
6451
+ * - `GetAnalysis` — Silence, filler, scene or beat segments.
6434
6452
  * - `ListTransitions` — Join transition kinds and parameters.
6435
6453
  * - `ListEffects` — Visual-effect catalog and parameters.
6436
6454
  * - `ListAnimations` — Animation presets by phase and target.
@@ -6466,7 +6484,7 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6466
6484
  *
6467
6485
  * - `type` — Clip kind; decides which fields apply.
6468
6486
  * - `start` — Clip start in seconds; snaps to frames.
6469
- * - `length` — Duration; optional for video and audio.
6487
+ * - `length` — Duration; video and audio may omit it or write "auto".
6470
6488
  * - `media` — Source `{ libraryId, assetId }`.
6471
6489
  * - `sourceIn` — First source second kept; default 0.
6472
6490
  * - `sourceOut` — Exclusive source end; read-only.
@@ -6532,6 +6550,7 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6532
6550
  * - `TOO_MANY_EFFECTS` — More than 8 effects on one clip.
6533
6551
  * - `PROJECT_NOT_FOUND` — No visible project has this id.
6534
6552
  * - `EXPORT_NOT_FOUND` — No such export in this project.
6553
+ * - `DRAFT_RENDER_NOT_FOUND` — No such draft render.
6535
6554
  * - `VERSION_NOT_FOUND` — No saved version has this revision.
6536
6555
  * - `LIBRARY_NOT_FOUND` — The library is missing or invisible.
6537
6556
  * - `BINDING_INVALID` — The binding request is malformed.
@@ -6546,6 +6565,7 @@ export const cutUndeleteProject = (options) => (options.client ?? client).post({
6546
6565
  * - `SCRIPT_LIMIT` — An execute budget was exceeded.
6547
6566
  * - `OPS_REJECTED` — An op failed; the whole edit rolled back.
6548
6567
  * - `EDIT_EXPIRED` — The saved edit id is over ten minutes old.
6568
+ * - `MEDIA_NOT_FOUND` — The asset id is not in that library.
6549
6569
  * - `MEDIA_OFFLINE` — The asset cannot be fetched right now.
6550
6570
  * - `MEDIA_UNAVAILABLE` — The asset is not usable for rendering.
6551
6571
  * - `MEDIA_IMPORT_FAILED` — Importing media failed.
@@ -6632,9 +6652,9 @@ export const cutListFrames = (options) => (options.client ?? client).get({
6632
6652
  ...options
6633
6653
  });
6634
6654
  /**
6635
- * Analyze project media
6655
+ * Analyze project media or measure the project mix
6636
6656
  *
6637
- * Request silence, filler-word or scene analysis for selected bound assets before editing. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible. Silence measures transcript-based speech pauses, not music or loudness. A completed transcript without words returns ready with empty segments and reason no_speech; no completed transcript returns unsupported with reason no_transcript. A failed transcription remains failed.
6657
+ * Request silence, filler-word, scene or beat analysis for selected bound assets before editing, or measure the mix the timeline itself renders with kind mix. That kind is a render job, not a read: it answers pending with retry_after_sec and an id. Poll by calling this same method again with body { kinds: ["mix"], id } (there is no separate retrieve method); that call reads the measurement and renders nothing. The answer only exists once the audio has been rendered and measured. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible. Silence measures transcript-based speech pauses, not music or loudness. A completed transcript without words returns ready with empty segments and reason no_speech; no completed transcript returns unsupported with reason no_transcript. A failed transcription remains failed. kind mix is separate: it reports the project mix loudness, the loudness of each role and where music masks speech, so an editor can fix the mix rather than guess at it.
6638
6658
  */
6639
6659
  export const cutCreateAnalysis = (options) => (options.client ?? client).post({
6640
6660
  security: [{
@@ -6776,7 +6796,7 @@ export const cutCreateExport = (options) => (options.client ?? client).post({
6776
6796
  /**
6777
6797
  * Create draft range render
6778
6798
  *
6779
- * Render one interval of the timeline so you can hear or look at how that passage comes out, without publishing anything to a media library. Choose kind audio for the mixed soundtrack as an .m4a file, or kind video for a draft-quality .mp4 with picture and sound. from and to are seconds on the project clock and must satisfy 0 <= from < to, to <= the timeline duration, and to - from <= 120; a longer passage is requested in several 分段请求 ranges and joined by the caller. The result is a temporary file (purpose user_data) that expires 24 hours after it is stored and is never imported into a library, so it is not a deliverable and carries no cut-export tag. HTTP 202 only accepts the job; poll praxis.cut.renders.retrieve using the returned id until status is done or failed, then read url while it lasts. A draft also bills like a draft export, by rendered seconds. Each project runs at most 2 draft renders at a time, a budget separate from its exports; a third answers HTTP 429 CUT_BUSY and the same call succeeds once one finishes.
6799
+ * Render one interval of the timeline so you can hear or look at how that passage comes out, without publishing anything to a media library. Choose kind audio for the mixed soundtrack as an .m4a file, or kind video for a draft-quality .mp4 with picture and sound. from and to are seconds on the project clock and must satisfy 0 <= from < to, to <= the timeline duration (an end up to 0.05 s past it, a rounded duration, is read as the end), and to - from <= 120; a longer passage is requested in several 分段请求 ranges and joined by the caller. The result is a temporary file (purpose user_data) that expires 24 hours after it is stored and is never imported into a library, so it is not a deliverable and carries no cut-export tag. HTTP 202 only accepts the job; poll praxis.cut.renders.retrieve using the returned id until status is done or failed, then read url while it lasts. A draft also bills like a draft export, by rendered seconds. Each project runs at most 2 draft renders at a time, a budget separate from its exports; a third answers HTTP 429 CUT_BUSY and the same call succeeds once one finishes.
6780
6800
  */
6781
6801
  export const cutCreateRender = (options) => (options.client ?? client).post({
6782
6802
  security: [{
@@ -7432,7 +7452,7 @@ export const devopsTestRunsList = (options) => (options.client ?? client).get({
7432
7452
  /**
7433
7453
  * Create a test run
7434
7454
  *
7435
- * Start a run of the project's tests at one commit. Name a plan to use its selector, or pass a selector directly for this run alone; the ref says which commit to test and is required, because a run without a commit has nothing to report against. waitUntil decides how far the call waits before answering — queued returns as soon as the run exists, finished waits for a verdict and may take minutes. A retry of an earlier run is a new run: pass its commit and selector, and read the earlier run to compare.
7455
+ * Start a run of the project's tests at one commit. Name a plan to use its selector, or pass a selector directly for this run alone; the ref says which commit to test and is required, because a run without a commit has nothing to report against. waitUntil decides how far the call waits before answering — queued, the default, returns as soon as the run exists; started waits until the run has begun, except for an external run, which is answered at once because it leaves queued only when your own CI uploads; finished waits for a verdict. The wait is bounded at about 25 seconds, and a wait that reaches that bound returns the run as it stands rather than failing — read state to see whether it finished. A retry of an earlier run is a new run: pass its commit and selector, and read the earlier run to compare.
7436
7456
  */
7437
7457
  export const devopsTestRunsCreate = (options) => (options.client ?? client).post({
7438
7458
  security: [{
@@ -7510,7 +7530,7 @@ export const devopsTestExecutionsGet = (options) => (options.client ?? client).g
7510
7530
  /**
7511
7531
  * Upload an external test report
7512
7532
  *
7513
- * Record the results of a run executed outside Praxis by uploading a CTRF or JUnit report. The report is folded into the run named by ref and the run's counts and verdict are recomputed from it. Uploading the same reportId again is idempotent and counts once, so a retry after a timeout is safe; a different reportId for the same run adds its results. Pass the run you created with executor external — a report for a run that does not exist is NOT_FOUND, never silently recorded against another run.
7533
+ * Record the results of a run executed outside Praxis by uploading a CTRF or JUnit report. Nothing has to exist first: a first upload from CI creates the run it reports on (executor external) and catalogues the cases the report names, so there is no setup call before the first result. When the report already belongs to a run, pass ref and the upload joins it; the run's counts and verdict are recomputed from the report. Uploading the same reportId again is idempotent and counts once, so a retry after a timeout is safe — and a reported case is catalogued once, however many reports carry it. The report's bytes are kept as a file (the file field of the answer) rather than in the results database, so the original document stays retrievable.
7514
7534
  */
7515
7535
  export const devopsTestReportsUpload = (options) => (options.client ?? client).post({
7516
7536
  security: [{
@@ -8507,6 +8527,20 @@ export const ontologyUpdateNode = (options) => (options.client ?? client).patch(
8507
8527
  ...options.headers
8508
8528
  }
8509
8529
  });
8530
+ /**
8531
+ * Retrieve neighborhood
8532
+ *
8533
+ * Load the subgraph around one node instead of the whole graph — the read to use when a screen or an agent needs the context of one entity. Returns the start node, every node within depth hops of it, the relations whose both ends are in that set, and truncated true when the node limit cut the walk short. direction chooses which way relations are followed; as_of and include_invalid read the graph as those parameters do elsewhere. Visibility is exactly nodes.retrieve's — a node you may reach but not read comes back restricted with its name only, and relations touching it are withheld, so this read never reaches further than a node read does. The node id comes from nodes.list, nodes.create or a changeset; an unknown one answers ONTOLOGY_NODE_NOT_FOUND, the same answer nodes.retrieve gives.
8534
+ */
8535
+ export const ontologyNeighborhood = (options) => (options.client ?? client).get({
8536
+ security: [{
8537
+ key: 'ontology-bearerAuth',
8538
+ scheme: 'bearer',
8539
+ type: 'http'
8540
+ }],
8541
+ url: '/ontology/v1/nodes/{node_id}/neighborhood',
8542
+ ...options
8543
+ });
8510
8544
  /**
8511
8545
  * Merge node
8512
8546
  *
@@ -9708,6 +9742,1008 @@ export const searchMap = (options) => (options.client ?? client).post({
9708
9742
  ...options.headers
9709
9743
  }
9710
9744
  });
9745
+ /**
9746
+ * List the genres Studio can write
9747
+ *
9748
+ * List the genre catalog so you can choose how a piece is structured before creating a draft. Each genre names its unit kinds, draft properties, deterministic checks and writing rules, and by default only the genres open today are returned. Read the chosen genre in full with studioGenresGet before the first write, because its kinds and limits decide what that draft accepts.
9749
+ */
9750
+ export const studioGenresList = (options) => (options?.client ?? client).get({
9751
+ security: [{
9752
+ key: 'BearerAuth',
9753
+ scheme: 'bearer',
9754
+ type: 'http'
9755
+ }, {
9756
+ key: 'ApiKeyAuth',
9757
+ name: 'X-API-Key',
9758
+ type: 'apiKey'
9759
+ }],
9760
+ url: '/studio/v1/genres',
9761
+ ...options
9762
+ });
9763
+ /**
9764
+ * Read one genre with its built-in templates
9765
+ *
9766
+ * Read the full rules of one genre: its unit kinds and what each may contain, the draft properties with their limits, the deterministic checks the software runs, the semantic review list, and the built-in templates that can seed a draft. Ask for this before creating a draft of that genre, and again when a write is refused for an unknown kind, a property limit or a block type the genre does not allow.
9767
+ */
9768
+ export const studioGenresGet = (options) => (options.client ?? client).get({
9769
+ security: [{
9770
+ key: 'BearerAuth',
9771
+ scheme: 'bearer',
9772
+ type: 'http'
9773
+ }, {
9774
+ key: 'ApiKeyAuth',
9775
+ name: 'X-API-Key',
9776
+ type: 'apiKey'
9777
+ }],
9778
+ url: '/studio/v1/genres/{genre}',
9779
+ ...options
9780
+ });
9781
+ /**
9782
+ * List the platforms a work can be produced for
9783
+ *
9784
+ * List rendition targets with the format each needs, whether it receives a finished piece through an API, a draft box or an export, and the hard limits a piece must respect. Pass a genre to see only the platforms that genre produces by default. Read one platform in full before rendering, because its limits decide whether the rendition validates.
9785
+ */
9786
+ export const studioPlatformsList = (options) => (options?.client ?? client).get({
9787
+ security: [{
9788
+ key: 'BearerAuth',
9789
+ scheme: 'bearer',
9790
+ type: 'http'
9791
+ }, {
9792
+ key: 'ApiKeyAuth',
9793
+ name: 'X-API-Key',
9794
+ type: 'apiKey'
9795
+ }],
9796
+ url: '/studio/v1/platforms',
9797
+ ...options
9798
+ });
9799
+ /**
9800
+ * Read the rules of one platform
9801
+ *
9802
+ * Read one platform in full: the format it consumes, how it receives a finished piece, the preview fidelity the Console can offer, the limits on title, body, image count and aspect, and whether a connected channel is required. Read this before creating a rendition, and again when validation reports that the piece breaks a platform limit.
9803
+ */
9804
+ export const studioPlatformsGet = (options) => (options.client ?? client).get({
9805
+ security: [{
9806
+ key: 'BearerAuth',
9807
+ scheme: 'bearer',
9808
+ type: 'http'
9809
+ }, {
9810
+ key: 'ApiKeyAuth',
9811
+ name: 'X-API-Key',
9812
+ type: 'apiKey'
9813
+ }],
9814
+ url: '/studio/v1/platforms/{platform}',
9815
+ ...options
9816
+ });
9817
+ /**
9818
+ * List the works of this organization
9819
+ *
9820
+ * List works owned by the API key organization so you can find the one being discussed, with its drafts and how long ago each moved. Archived works are left out unless you ask for them. Continue with next_page_token until the answer stops carrying one; the summaries carry no unit bodies, so read a work before writing in it.
9821
+ */
9822
+ export const studioWorksList = (options) => (options?.client ?? client).get({
9823
+ security: [{
9824
+ key: 'BearerAuth',
9825
+ scheme: 'bearer',
9826
+ type: 'http'
9827
+ }, {
9828
+ key: 'ApiKeyAuth',
9829
+ name: 'X-API-Key',
9830
+ type: 'apiKey'
9831
+ }],
9832
+ url: '/studio/v1/works',
9833
+ ...options
9834
+ });
9835
+ /**
9836
+ * Create a work with its goal
9837
+ *
9838
+ * Create a work: one deliverable piece plus everything around it. Pass the goal the writing serves — the reader, what that reader should get or do, the one-sentence message and the constraints — and the original brief the person gave in their own words. A slug is derived from the title unless you pass one. The work starts with no drafts; create the first one with the drafts create call, because the genre decides the structure.
9839
+ */
9840
+ export const studioWorksCreate = (options) => (options.client ?? client).post({
9841
+ security: [{
9842
+ key: 'BearerAuth',
9843
+ scheme: 'bearer',
9844
+ type: 'http'
9845
+ }, {
9846
+ key: 'ApiKeyAuth',
9847
+ name: 'X-API-Key',
9848
+ type: 'apiKey'
9849
+ }],
9850
+ url: '/studio/v1/works',
9851
+ ...options,
9852
+ headers: {
9853
+ 'Content-Type': 'application/json',
9854
+ ...options.headers
9855
+ }
9856
+ });
9857
+ /**
9858
+ * Resolve a loose reference to a work, draft or unit
9859
+ *
9860
+ * Turn a loose reference into the address the other calls take: a slug, a work title, a draft key or a unit number, as a person or another tool would say it. A hit answers the work slug and, when the reference pointed deeper, the draft key and unit number; a miss answers an empty resolved value with up to three near matches instead of failing. Use it when a person names something instead of an id.
9861
+ */
9862
+ export const studioWorksResolve = (options) => (options.client ?? client).get({
9863
+ security: [{
9864
+ key: 'BearerAuth',
9865
+ scheme: 'bearer',
9866
+ type: 'http'
9867
+ }, {
9868
+ key: 'ApiKeyAuth',
9869
+ name: 'X-API-Key',
9870
+ type: 'apiKey'
9871
+ }],
9872
+ url: '/studio/v1/works:resolve',
9873
+ ...options
9874
+ });
9875
+ /**
9876
+ * Read a work, optionally with one draft and unit
9877
+ *
9878
+ * Read a work and, in the same answer, whatever part of it the page needs: pass draft to get that draft with its todos, its unit outline and its properties, and unit to get one unit with its blocks and Markdown body. This is the call that opens an editing session, because it answers the goal, the brief, the current revisions and the unit to write in one round trip.
9879
+ */
9880
+ export const studioWorksGet = (options) => (options.client ?? client).get({
9881
+ security: [{
9882
+ key: 'BearerAuth',
9883
+ scheme: 'bearer',
9884
+ type: 'http'
9885
+ }, {
9886
+ key: 'ApiKeyAuth',
9887
+ name: 'X-API-Key',
9888
+ type: 'apiKey'
9889
+ }],
9890
+ url: '/studio/v1/works/{work}',
9891
+ ...options
9892
+ });
9893
+ /**
9894
+ * Change the title, goal or attached libraries
9895
+ *
9896
+ * Change work-level settings: the title, the slug, the goal, the attached reference libraries, the style or the archived flag. Send update_mask naming exactly the fields you change; a field left out keeps its value. Pass expected_revision to have the write refused when someone else changed the work first, and note that changing the message makes every draft derived from it stale.
9897
+ */
9898
+ export const studioWorksUpdate = (options) => (options.client ?? client).patch({
9899
+ security: [{
9900
+ key: 'BearerAuth',
9901
+ scheme: 'bearer',
9902
+ type: 'http'
9903
+ }, {
9904
+ key: 'ApiKeyAuth',
9905
+ name: 'X-API-Key',
9906
+ type: 'apiKey'
9907
+ }],
9908
+ url: '/studio/v1/works/{work}',
9909
+ ...options,
9910
+ headers: {
9911
+ 'Content-Type': 'application/json',
9912
+ ...options.headers
9913
+ }
9914
+ });
9915
+ /**
9916
+ * Add to or correct the original brief
9917
+ *
9918
+ * Extend the original brief: append text, attach files, add points taken from an outline, edit one point, or drop a point. Points are how the software checks that every requirement landed in a written unit, so split the person's outline into points here rather than burying them in prose. The brief carries its own revision, separate from the work and from each draft.
9919
+ */
9920
+ export const studioWorksUpdateBrief = (options) => (options.client ?? client).patch({
9921
+ security: [{
9922
+ key: 'BearerAuth',
9923
+ scheme: 'bearer',
9924
+ type: 'http'
9925
+ }, {
9926
+ key: 'ApiKeyAuth',
9927
+ name: 'X-API-Key',
9928
+ type: 'apiKey'
9929
+ }],
9930
+ url: '/studio/v1/works/{work}/brief',
9931
+ ...options,
9932
+ headers: {
9933
+ 'Content-Type': 'application/json',
9934
+ ...options.headers
9935
+ }
9936
+ });
9937
+ /**
9938
+ * List the drafts a work carries
9939
+ *
9940
+ * List every draft of one work, each with its genre, its size and whether it is out of date against what it was derived from. Use it to choose the draft a later call works in: the key beside each draft is what the draft path segment takes. This list is not paged, because a work carries a handful of drafts rather than thousands.
9941
+ */
9942
+ export const studioDraftsList = (options) => (options.client ?? client).get({
9943
+ security: [{
9944
+ key: 'BearerAuth',
9945
+ scheme: 'bearer',
9946
+ type: 'http'
9947
+ }, {
9948
+ key: 'ApiKeyAuth',
9949
+ name: 'X-API-Key',
9950
+ type: 'apiKey'
9951
+ }],
9952
+ url: '/studio/v1/works/{work}/drafts',
9953
+ ...options
9954
+ });
9955
+ /**
9956
+ * Create a draft of a genre inside a work
9957
+ *
9958
+ * Create a draft: one way of delivering the work, written in one genre. The genre decides the unit kinds, the properties and the checks, so read it first with the genre call and pass its key. A template may seed the unit tree, an outline may be given instead, and derived_from records that this draft is built from the goal message or from another draft of the work. The work may hold several drafts, one per platform or per length.
9959
+ */
9960
+ export const studioDraftsCreate = (options) => (options.client ?? client).post({
9961
+ security: [{
9962
+ key: 'BearerAuth',
9963
+ scheme: 'bearer',
9964
+ type: 'http'
9965
+ }, {
9966
+ key: 'ApiKeyAuth',
9967
+ name: 'X-API-Key',
9968
+ type: 'apiKey'
9969
+ }],
9970
+ url: '/studio/v1/works/{work}/drafts',
9971
+ ...options,
9972
+ headers: {
9973
+ 'Content-Type': 'application/json',
9974
+ ...options.headers
9975
+ }
9976
+ });
9977
+ /**
9978
+ * Read one draft with optional units and todos
9979
+ *
9980
+ * Read one draft: its genre, its properties, its revisions, whether it is stale, and optionally its unit tree and its todo list. Pass expand to add the parts you need in this one call instead of reading them separately. Read this before writing to the draft, because the revision it returns is the precondition the next write has to carry.
9981
+ */
9982
+ export const studioDraftsGet = (options) => (options.client ?? client).get({
9983
+ security: [{
9984
+ key: 'BearerAuth',
9985
+ scheme: 'bearer',
9986
+ type: 'http'
9987
+ }, {
9988
+ key: 'ApiKeyAuth',
9989
+ name: 'X-API-Key',
9990
+ type: 'apiKey'
9991
+ }],
9992
+ url: '/studio/v1/works/{work}/drafts/{draft}',
9993
+ ...options
9994
+ });
9995
+ /**
9996
+ * Change a draft title, key, properties or style
9997
+ *
9998
+ * Change the draft itself rather than its units: its page title, its in-work key, its generic properties, the style that overrides the work style, or its mode. Send update_mask naming exactly the fields you change. Changing the key keeps the previous one resolving, so old links and old references still work; a key another draft of the work already uses answers DRAFT_KEY_TAKEN.
9999
+ */
10000
+ export const studioDraftsUpdate = (options) => (options.client ?? client).patch({
10001
+ security: [{
10002
+ key: 'BearerAuth',
10003
+ scheme: 'bearer',
10004
+ type: 'http'
10005
+ }, {
10006
+ key: 'ApiKeyAuth',
10007
+ name: 'X-API-Key',
10008
+ type: 'apiKey'
10009
+ }],
10010
+ url: '/studio/v1/works/{work}/drafts/{draft}',
10011
+ ...options,
10012
+ headers: {
10013
+ 'Content-Type': 'application/json',
10014
+ ...options.headers
10015
+ }
10016
+ });
10017
+ /**
10018
+ * Read the whole unit outline as Markdown
10019
+ *
10020
+ * Read the draft structure as one Markdown page: one line per unit carrying its number, structure name, intent, status, length and revision, followed by the unit list itself. Use it to plan a sequence of writes without reading every unit, since it carries no body text. Read one unit in full with the unit call once you know which one to write.
10021
+ */
10022
+ export const studioDraftsOutline = (options) => (options.client ?? client).get({
10023
+ security: [{
10024
+ key: 'BearerAuth',
10025
+ scheme: 'bearer',
10026
+ type: 'http'
10027
+ }, {
10028
+ key: 'ApiKeyAuth',
10029
+ name: 'X-API-Key',
10030
+ type: 'apiKey'
10031
+ }],
10032
+ url: '/studio/v1/works/{work}/drafts/{draft}/outline',
10033
+ ...options
10034
+ });
10035
+ /**
10036
+ * Read the computed todo list of a draft
10037
+ *
10038
+ * Read what is outstanding in one draft, computed from the data rather than from a plan: a unit without an intent, a body behind its intent, an unclaimed brief point, a failed check, a stale rendition. Each item names the layer it belongs to and suggests the call that resolves it. Follow the list instead of inventing an order, and re-read it after a batch of writes.
10039
+ */
10040
+ export const studioDraftsStatus = (options) => (options.client ?? client).get({
10041
+ security: [{
10042
+ key: 'BearerAuth',
10043
+ scheme: 'bearer',
10044
+ type: 'http'
10045
+ }, {
10046
+ key: 'ApiKeyAuth',
10047
+ name: 'X-API-Key',
10048
+ type: 'apiKey'
10049
+ }],
10050
+ url: '/studio/v1/works/{work}/drafts/{draft}/status',
10051
+ ...options
10052
+ });
10053
+ /**
10054
+ * Read a review pass over the whole draft
10055
+ *
10056
+ * Read everything a reviewer needs in one answer: the deterministic check results, the semantic review list the genre asks a reader to judge, the brief coverage showing which unit claims each requirement point, and the body text. When the draft is long the body is a synopsis with an excerpt around each unit and next_page_token carries the full text. This is the call an agent makes before writing review comments.
10057
+ */
10058
+ export const studioDraftsReview = (options) => (options.client ?? client).get({
10059
+ security: [{
10060
+ key: 'BearerAuth',
10061
+ scheme: 'bearer',
10062
+ type: 'http'
10063
+ }, {
10064
+ key: 'ApiKeyAuth',
10065
+ name: 'X-API-Key',
10066
+ type: 'apiKey'
10067
+ }],
10068
+ url: '/studio/v1/works/{work}/drafts/{draft}/review',
10069
+ ...options
10070
+ });
10071
+ /**
10072
+ * Confirm a draft already follows its source
10073
+ *
10074
+ * Clear the stale flag after checking that the draft still matches what it was derived from: the recorded source revision moves to the source current revision without touching any unit. Call it after the source moved and you have brought this draft up to date, not to make the flag disappear while the text is still behind. It answers the same shape as a draft write, and the draft revision does not move.
10075
+ */
10076
+ export const studioDraftsRebase = (options) => (options.client ?? client).post({
10077
+ security: [{
10078
+ key: 'BearerAuth',
10079
+ scheme: 'bearer',
10080
+ type: 'http'
10081
+ }, {
10082
+ key: 'ApiKeyAuth',
10083
+ name: 'X-API-Key',
10084
+ type: 'apiKey'
10085
+ }],
10086
+ url: '/studio/v1/works/{work}/drafts/{draft}:rebase',
10087
+ ...options,
10088
+ headers: {
10089
+ 'Content-Type': 'application/json',
10090
+ ...options.headers
10091
+ }
10092
+ });
10093
+ /**
10094
+ * Export the draft as Markdown or plain text
10095
+ *
10096
+ * Read the whole draft as one document in Markdown or plain text, returned synchronously in the answer. This is the quick path for a person who wants the text now; a file in a platform format, a card image or a docx comes from creating a rendition instead. Ask for text rather than markdown when the reader should not see block anchors or heading syntax.
10097
+ */
10098
+ export const studioDraftsExport = (options) => (options.client ?? client).get({
10099
+ security: [{
10100
+ key: 'BearerAuth',
10101
+ scheme: 'bearer',
10102
+ type: 'http'
10103
+ }, {
10104
+ key: 'ApiKeyAuth',
10105
+ name: 'X-API-Key',
10106
+ type: 'apiKey'
10107
+ }],
10108
+ url: '/studio/v1/works/{work}/drafts/{draft}/export',
10109
+ ...options
10110
+ });
10111
+ /**
10112
+ * Add one unit to the draft tree
10113
+ *
10114
+ * Add a unit to the structure: a chapter, a scene, a section, an argument or a product depending on the genre. Say where it goes with parent and after, give it the structure name people will use to manage it, and write the intent that says what it has to accomplish. Adding a unit changes the draft revision, so pass expected_revision, and the new unit itself starts with no body.
10115
+ */
10116
+ export const studioUnitsCreate = (options) => (options.client ?? client).post({
10117
+ security: [{
10118
+ key: 'BearerAuth',
10119
+ scheme: 'bearer',
10120
+ type: 'http'
10121
+ }, {
10122
+ key: 'ApiKeyAuth',
10123
+ name: 'X-API-Key',
10124
+ type: 'apiKey'
10125
+ }],
10126
+ url: '/studio/v1/works/{work}/drafts/{draft}/units',
10127
+ ...options,
10128
+ headers: {
10129
+ 'Content-Type': 'application/json',
10130
+ ...options.headers
10131
+ }
10132
+ });
10133
+ /**
10134
+ * Add a whole outline of units at once
10135
+ *
10136
+ * Create many units in one write from a nested outline, which is how a structure is built after the person approved a plan. Nesting in the outline becomes the parent chain, numbers are assigned in order, and the draft gets one revision for the whole batch rather than one per unit. Sending the same outline twice would duplicate it, so pass the draft revision you read and repeat the call only after a refusal.
10137
+ */
10138
+ export const studioUnitsBatchCreate = (options) => (options.client ?? client).post({
10139
+ security: [{
10140
+ key: 'BearerAuth',
10141
+ scheme: 'bearer',
10142
+ type: 'http'
10143
+ }, {
10144
+ key: 'ApiKeyAuth',
10145
+ name: 'X-API-Key',
10146
+ type: 'apiKey'
10147
+ }],
10148
+ url: '/studio/v1/works/{work}/drafts/{draft}/units:batchCreate',
10149
+ ...options,
10150
+ headers: {
10151
+ 'Content-Type': 'application/json',
10152
+ ...options.headers
10153
+ }
10154
+ });
10155
+ /**
10156
+ * Write intents for many units in one call
10157
+ *
10158
+ * Change the intent of several units in one write: the synopsis, the points and the brief points each of them claims. Bodies are not part of this call, because a body is written one unit at a time with its own revision; here the whole batch shares the draft revision you read. Use it to lay out a plan across the tree, then write bodies one by one.
10159
+ */
10160
+ export const studioUnitsBatchUpdate = (options) => (options.client ?? client).post({
10161
+ security: [{
10162
+ key: 'BearerAuth',
10163
+ scheme: 'bearer',
10164
+ type: 'http'
10165
+ }, {
10166
+ key: 'ApiKeyAuth',
10167
+ name: 'X-API-Key',
10168
+ type: 'apiKey'
10169
+ }],
10170
+ url: '/studio/v1/works/{work}/drafts/{draft}/units:batchUpdate',
10171
+ ...options,
10172
+ headers: {
10173
+ 'Content-Type': 'application/json',
10174
+ ...options.headers
10175
+ }
10176
+ });
10177
+ /**
10178
+ * Read one unit with its blocks and Markdown
10179
+ *
10180
+ * Read one unit: its intent, its status, its revision, its links to reference entries, and its body as both blocks and Markdown. The Markdown carries each block identifier inline as an anchor comment, so a rewrite can keep the identifiers of the blocks it keeps. Read this before writing the body, because the revision it returns is the precondition that write has to carry.
10181
+ */
10182
+ export const studioUnitsGet = (options) => (options.client ?? client).get({
10183
+ security: [{
10184
+ key: 'BearerAuth',
10185
+ scheme: 'bearer',
10186
+ type: 'http'
10187
+ }, {
10188
+ key: 'ApiKeyAuth',
10189
+ name: 'X-API-Key',
10190
+ type: 'apiKey'
10191
+ }],
10192
+ url: '/studio/v1/works/{work}/units/{unit}',
10193
+ ...options
10194
+ });
10195
+ /**
10196
+ * Change a unit intent, body or status
10197
+ *
10198
+ * Change one unit: its name, its heading, its synopsis and points, the brief points it claims, its status, its links to reference entries, or its body as a whole Markdown text. A body write requires expected_revision, because replacing the whole text would drop blocks someone else inserted. The answer carries the unit as it now stands, so read the next field of the answer instead of re-reading the unit.
10199
+ */
10200
+ export const studioUnitsUpdate = (options) => (options.client ?? client).patch({
10201
+ security: [{
10202
+ key: 'BearerAuth',
10203
+ scheme: 'bearer',
10204
+ type: 'http'
10205
+ }, {
10206
+ key: 'ApiKeyAuth',
10207
+ name: 'X-API-Key',
10208
+ type: 'apiKey'
10209
+ }],
10210
+ url: '/studio/v1/works/{work}/units/{unit}',
10211
+ ...options,
10212
+ headers: {
10213
+ 'Content-Type': 'application/json',
10214
+ ...options.headers
10215
+ }
10216
+ });
10217
+ /**
10218
+ * Move a unit to another place in the tree
10219
+ *
10220
+ * Move a unit under another parent or after another sibling, without changing its number, its identifier, its intent or its body. A move that would put a unit inside its own descendant, or that would cross into another draft, is refused. Only the moved unit changes, so the revision to pass is its own.
10221
+ */
10222
+ export const studioUnitsMove = (options) => (options.client ?? client).post({
10223
+ security: [{
10224
+ key: 'BearerAuth',
10225
+ scheme: 'bearer',
10226
+ type: 'http'
10227
+ }, {
10228
+ key: 'ApiKeyAuth',
10229
+ name: 'X-API-Key',
10230
+ type: 'apiKey'
10231
+ }],
10232
+ url: '/studio/v1/works/{work}/units/{unit}:move',
10233
+ ...options,
10234
+ headers: {
10235
+ 'Content-Type': 'application/json',
10236
+ ...options.headers
10237
+ }
10238
+ });
10239
+ /**
10240
+ * Edit a unit body block by block
10241
+ *
10242
+ * Change a body by naming the blocks to insert, replace or delete instead of resending the whole text. This is the safe way for a writer that only touches part of a unit, because a block another writer changed after your revision is refused rather than overwritten. The revision is required, and the answer carries the unit with its blocks so the next edit can address them.
10243
+ */
10244
+ export const studioUnitsPatchBlocks = (options) => (options.client ?? client).post({
10245
+ security: [{
10246
+ key: 'BearerAuth',
10247
+ scheme: 'bearer',
10248
+ type: 'http'
10249
+ }, {
10250
+ key: 'ApiKeyAuth',
10251
+ name: 'X-API-Key',
10252
+ type: 'apiKey'
10253
+ }],
10254
+ url: '/studio/v1/works/{work}/units/{unit}/blocks:patch',
10255
+ ...options,
10256
+ headers: {
10257
+ 'Content-Type': 'application/json',
10258
+ ...options.headers
10259
+ }
10260
+ });
10261
+ /**
10262
+ * Read the context pack for writing one unit
10263
+ *
10264
+ * Read everything a writer needs before touching one unit: the genre rules, the goal, the brief, the style, the upstream source, the reference entries this unit draws on, the synopses of the units before it, and the intent of this unit, assembled in a fixed order and measured against a token budget. Entries left out say why, so a missing detail is visible rather than silent. Same input gives the same pack, which is what makes a written result reproducible.
10265
+ */
10266
+ export const studioUnitsContext = (options) => (options.client ?? client).get({
10267
+ security: [{
10268
+ key: 'BearerAuth',
10269
+ scheme: 'bearer',
10270
+ type: 'http'
10271
+ }, {
10272
+ key: 'ApiKeyAuth',
10273
+ name: 'X-API-Key',
10274
+ type: 'apiKey'
10275
+ }],
10276
+ url: '/studio/v1/works/{work}/units/{unit}/context',
10277
+ ...options
10278
+ });
10279
+ /**
10280
+ * List the reference libraries of this organization
10281
+ *
10282
+ * List the reference libraries this API key organization owns, each with how many entries it holds, so you can choose the one a work draws on. Continue with next_page_token until the answer stops carrying one. A library is shared across works, so the list is the whole organization's rather than one work's.
10283
+ */
10284
+ export const studioCodexesList = (options) => (options?.client ?? client).get({
10285
+ security: [{
10286
+ key: 'BearerAuth',
10287
+ scheme: 'bearer',
10288
+ type: 'http'
10289
+ }, {
10290
+ key: 'ApiKeyAuth',
10291
+ name: 'X-API-Key',
10292
+ type: 'apiKey'
10293
+ }],
10294
+ url: '/studio/v1/codexes',
10295
+ ...options
10296
+ });
10297
+ /**
10298
+ * Create a reference library
10299
+ *
10300
+ * Create a reference library: a shared store of the people, places, products and facts a piece draws on, reusable across works. Attach it to a work with the work update call, and the entries it holds then reach the context packs of that work's units. A library is not private to one work, so the same brand facts can serve every piece that mentions them.
10301
+ */
10302
+ export const studioCodexesCreate = (options) => (options.client ?? client).post({
10303
+ security: [{
10304
+ key: 'BearerAuth',
10305
+ scheme: 'bearer',
10306
+ type: 'http'
10307
+ }, {
10308
+ key: 'ApiKeyAuth',
10309
+ name: 'X-API-Key',
10310
+ type: 'apiKey'
10311
+ }],
10312
+ url: '/studio/v1/codexes',
10313
+ ...options,
10314
+ headers: {
10315
+ 'Content-Type': 'application/json',
10316
+ ...options.headers
10317
+ }
10318
+ });
10319
+ /**
10320
+ * Delete a reference library
10321
+ *
10322
+ * Delete a library and every entry inside it. A library attached to any work is refused with CODEX_IN_USE, because deleting it would silently strip the reference material those units draw on; detach it from the work first. This cannot be undone, so confirm which library the identifier names.
10323
+ */
10324
+ export const studioCodexesDelete = (options) => (options.client ?? client).delete({
10325
+ security: [{
10326
+ key: 'BearerAuth',
10327
+ scheme: 'bearer',
10328
+ type: 'http'
10329
+ }, {
10330
+ key: 'ApiKeyAuth',
10331
+ name: 'X-API-Key',
10332
+ type: 'apiKey'
10333
+ }],
10334
+ url: '/studio/v1/codexes/{codex}',
10335
+ ...options
10336
+ });
10337
+ /**
10338
+ * Read one reference library
10339
+ *
10340
+ * Read one reference library: its name, its description, its labels and how many entries it holds. Read this to confirm a library exists before attaching it to a work; the entries themselves are listed with the entry list call, because a library may hold more of them than fit in one answer.
10341
+ */
10342
+ export const studioCodexesGet = (options) => (options.client ?? client).get({
10343
+ security: [{
10344
+ key: 'BearerAuth',
10345
+ scheme: 'bearer',
10346
+ type: 'http'
10347
+ }, {
10348
+ key: 'ApiKeyAuth',
10349
+ name: 'X-API-Key',
10350
+ type: 'apiKey'
10351
+ }],
10352
+ url: '/studio/v1/codexes/{codex}',
10353
+ ...options
10354
+ });
10355
+ /**
10356
+ * Rename a reference library or change its description
10357
+ *
10358
+ * Change the library itself: its name, its description or its labels. Send update_mask naming exactly the fields you change; a field left out keeps its value. The entries inside are untouched, and a work that has the library attached keeps it attached under the new name.
10359
+ */
10360
+ export const studioCodexesUpdate = (options) => (options.client ?? client).patch({
10361
+ security: [{
10362
+ key: 'BearerAuth',
10363
+ scheme: 'bearer',
10364
+ type: 'http'
10365
+ }, {
10366
+ key: 'ApiKeyAuth',
10367
+ name: 'X-API-Key',
10368
+ type: 'apiKey'
10369
+ }],
10370
+ url: '/studio/v1/codexes/{codex}',
10371
+ ...options,
10372
+ headers: {
10373
+ 'Content-Type': 'application/json',
10374
+ ...options.headers
10375
+ }
10376
+ });
10377
+ /**
10378
+ * List the entries of a reference library
10379
+ *
10380
+ * List the entries of one library in pages, each with its type, its name, its aliases and whether it is always present in context. Use it to see what a work already knows before adding an entry, since a duplicate name is refused rather than merged. Continue with next_page_token until the answer stops carrying one.
10381
+ */
10382
+ export const studioEntriesList = (options) => (options.client ?? client).get({
10383
+ security: [{
10384
+ key: 'BearerAuth',
10385
+ scheme: 'bearer',
10386
+ type: 'http'
10387
+ }, {
10388
+ key: 'ApiKeyAuth',
10389
+ name: 'X-API-Key',
10390
+ type: 'apiKey'
10391
+ }],
10392
+ url: '/studio/v1/codexes/{codex}/entries',
10393
+ ...options
10394
+ });
10395
+ /**
10396
+ * Add an entry to a reference library
10397
+ *
10398
+ * Add one entry: a character, a place, a product, a source of facts. Give it the type the genre uses, the name the text will mention, and the description and facts that should reach a writer when it is mentioned. Aliases and excluded phrases keep detection honest, so a common word inside an idiom is not mistaken for the entry. A name already used in the library is refused.
10399
+ */
10400
+ export const studioEntriesCreate = (options) => (options.client ?? client).post({
10401
+ security: [{
10402
+ key: 'BearerAuth',
10403
+ scheme: 'bearer',
10404
+ type: 'http'
10405
+ }, {
10406
+ key: 'ApiKeyAuth',
10407
+ name: 'X-API-Key',
10408
+ type: 'apiKey'
10409
+ }],
10410
+ url: '/studio/v1/codexes/{codex}/entries',
10411
+ ...options,
10412
+ headers: {
10413
+ 'Content-Type': 'application/json',
10414
+ ...options.headers
10415
+ }
10416
+ });
10417
+ /**
10418
+ * Delete a reference entry
10419
+ *
10420
+ * Delete one entry from a library, which also removes the mentions and the links that pointed at it. Units that claimed it keep their text; only the reference goes away. This cannot be undone, so confirm the name of the entry before deleting it, and prefer changing its tracking setting to never when it should stop reaching writers but stay recorded.
10421
+ */
10422
+ export const studioEntriesDelete = (options) => (options.client ?? client).delete({
10423
+ security: [{
10424
+ key: 'BearerAuth',
10425
+ scheme: 'bearer',
10426
+ type: 'http'
10427
+ }, {
10428
+ key: 'ApiKeyAuth',
10429
+ name: 'X-API-Key',
10430
+ type: 'apiKey'
10431
+ }],
10432
+ url: '/studio/v1/codexes/{codex}/entries/{entry}',
10433
+ ...options
10434
+ });
10435
+ /**
10436
+ * Read one reference entry
10437
+ *
10438
+ * Read one entry in full: its description, its fact ledger, its relations to other entries, its detection settings and its images. Read it before changing it, because an update replaces the fields it names rather than merging them. The entry is addressed by its name in this library, or by its ent_ identifier.
10439
+ */
10440
+ export const studioEntriesGet = (options) => (options.client ?? client).get({
10441
+ security: [{
10442
+ key: 'BearerAuth',
10443
+ scheme: 'bearer',
10444
+ type: 'http'
10445
+ }, {
10446
+ key: 'ApiKeyAuth',
10447
+ name: 'X-API-Key',
10448
+ type: 'apiKey'
10449
+ }],
10450
+ url: '/studio/v1/codexes/{codex}/entries/{entry}',
10451
+ ...options
10452
+ });
10453
+ /**
10454
+ * Change what a reference entry says
10455
+ *
10456
+ * Change one entry: its type, its name, its aliases, its description, its facts, its notes, its tracking setting, its images or its relations. Send update_mask naming exactly the fields you change, because a field the mask leaves out keeps its value while a list field the mask names is replaced whole. Renaming an entry changes what the text has to mention for detection to find it.
10457
+ */
10458
+ export const studioEntriesUpdate = (options) => (options.client ?? client).patch({
10459
+ security: [{
10460
+ key: 'BearerAuth',
10461
+ scheme: 'bearer',
10462
+ type: 'http'
10463
+ }, {
10464
+ key: 'ApiKeyAuth',
10465
+ name: 'X-API-Key',
10466
+ type: 'apiKey'
10467
+ }],
10468
+ url: '/studio/v1/codexes/{codex}/entries/{entry}',
10469
+ ...options,
10470
+ headers: {
10471
+ 'Content-Type': 'application/json',
10472
+ ...options.headers
10473
+ }
10474
+ });
10475
+ /**
10476
+ * List the writing styles of this organization
10477
+ *
10478
+ * List the styles this API key organization owns, each with its name and description, so you can choose the voice a work should be written in. Continue with next_page_token until the answer stops carrying one. Read one style in full before attaching it, because its samples are what actually shape the writing.
10479
+ */
10480
+ export const studioStylesList = (options) => (options?.client ?? client).get({
10481
+ security: [{
10482
+ key: 'BearerAuth',
10483
+ scheme: 'bearer',
10484
+ type: 'http'
10485
+ }, {
10486
+ key: 'ApiKeyAuth',
10487
+ name: 'X-API-Key',
10488
+ type: 'apiKey'
10489
+ }],
10490
+ url: '/studio/v1/styles',
10491
+ ...options
10492
+ });
10493
+ /**
10494
+ * Create a writing style
10495
+ *
10496
+ * Create a style: the voice a piece is written in, held as samples rather than as adjectives. Samples matter more than a description, so paste one to five paragraphs of writing the piece should sound like, and put the words to avoid into avoid so the banned-word check uses them. Attach a style to a work, or to one draft of it, and its samples then reach every context pack.
10497
+ */
10498
+ export const studioStylesCreate = (options) => (options.client ?? client).post({
10499
+ security: [{
10500
+ key: 'BearerAuth',
10501
+ scheme: 'bearer',
10502
+ type: 'http'
10503
+ }, {
10504
+ key: 'ApiKeyAuth',
10505
+ name: 'X-API-Key',
10506
+ type: 'apiKey'
10507
+ }],
10508
+ url: '/studio/v1/styles',
10509
+ ...options,
10510
+ headers: {
10511
+ 'Content-Type': 'application/json',
10512
+ ...options.headers
10513
+ }
10514
+ });
10515
+ /**
10516
+ * Delete a writing style
10517
+ *
10518
+ * Delete a style, which detaches it from every work and draft that used it; those units then stop receiving its samples and glossary in their context packs. This cannot be undone, so confirm the style identifier before deleting it, and read the work first when it is not certain which style it uses.
10519
+ */
10520
+ export const studioStylesDelete = (options) => (options.client ?? client).delete({
10521
+ security: [{
10522
+ key: 'BearerAuth',
10523
+ scheme: 'bearer',
10524
+ type: 'http'
10525
+ }, {
10526
+ key: 'ApiKeyAuth',
10527
+ name: 'X-API-Key',
10528
+ type: 'apiKey'
10529
+ }],
10530
+ url: '/studio/v1/styles/{style}',
10531
+ ...options
10532
+ });
10533
+ /**
10534
+ * Read one writing style
10535
+ *
10536
+ * Read one style in full: its samples, the wording to use and to avoid, and its glossary of wrong-to-right terms. Read it before attaching it to a work, since samples decide the sound of the writing far more than the description does, and a glossary term also becomes a deterministic check against the text.
10537
+ */
10538
+ export const studioStylesGet = (options) => (options.client ?? client).get({
10539
+ security: [{
10540
+ key: 'BearerAuth',
10541
+ scheme: 'bearer',
10542
+ type: 'http'
10543
+ }, {
10544
+ key: 'ApiKeyAuth',
10545
+ name: 'X-API-Key',
10546
+ type: 'apiKey'
10547
+ }],
10548
+ url: '/studio/v1/styles/{style}',
10549
+ ...options
10550
+ });
10551
+ /**
10552
+ * Change a writing style
10553
+ *
10554
+ * Change a style: its name, its description, its samples, its use and avoid lists, or its glossary. Send update_mask naming exactly the fields you change; a list the mask names is replaced whole. Adding a term to the glossary or to avoid also changes what the deterministic checks flag, so a work that uses this style sees new findings on its next check.
10555
+ */
10556
+ export const studioStylesUpdate = (options) => (options.client ?? client).patch({
10557
+ security: [{
10558
+ key: 'BearerAuth',
10559
+ scheme: 'bearer',
10560
+ type: 'http'
10561
+ }, {
10562
+ key: 'ApiKeyAuth',
10563
+ name: 'X-API-Key',
10564
+ type: 'apiKey'
10565
+ }],
10566
+ url: '/studio/v1/styles/{style}',
10567
+ ...options,
10568
+ headers: {
10569
+ 'Content-Type': 'application/json',
10570
+ ...options.headers
10571
+ }
10572
+ });
10573
+ /**
10574
+ * List the templates a genre can start from
10575
+ *
10576
+ * List templates: the built-in starting structures of each genre, followed by the ones this organization saved. Pass a genre to see only the templates that genre can use. A template is used once when a draft is created and is then detached, so changing a template never rewrites a draft that already started from it.
10577
+ */
10578
+ export const studioTemplatesList = (options) => (options?.client ?? client).get({
10579
+ security: [{
10580
+ key: 'BearerAuth',
10581
+ scheme: 'bearer',
10582
+ type: 'http'
10583
+ }, {
10584
+ key: 'ApiKeyAuth',
10585
+ name: 'X-API-Key',
10586
+ type: 'apiKey'
10587
+ }],
10588
+ url: '/studio/v1/templates',
10589
+ ...options
10590
+ });
10591
+ /**
10592
+ * Save a starting structure as a template
10593
+ *
10594
+ * Save a unit tree as a reusable template for one genre, so the same structure can seed later drafts. Give the genre, a name, the outline of units with their intents, and optionally the writing guidance a writer should follow. Creating a template from an existing draft is a separate milestone and answers NOT_IMPLEMENTED, so build the outline here instead.
10595
+ */
10596
+ export const studioTemplatesCreate = (options) => (options.client ?? client).post({
10597
+ security: [{
10598
+ key: 'BearerAuth',
10599
+ scheme: 'bearer',
10600
+ type: 'http'
10601
+ }, {
10602
+ key: 'ApiKeyAuth',
10603
+ name: 'X-API-Key',
10604
+ type: 'apiKey'
10605
+ }],
10606
+ url: '/studio/v1/templates',
10607
+ ...options,
10608
+ headers: {
10609
+ 'Content-Type': 'application/json',
10610
+ ...options.headers
10611
+ }
10612
+ });
10613
+ /**
10614
+ * Delete a saved template
10615
+ *
10616
+ * Delete a template this organization saved. A built-in template belongs to the catalog and cannot be deleted, so this answers TEMPLATE_NOT_FOUND for one. Drafts that already started from the template are unaffected, because the template was detached when they were created. This cannot be undone.
10617
+ */
10618
+ export const studioTemplatesDelete = (options) => (options.client ?? client).delete({
10619
+ security: [{
10620
+ key: 'BearerAuth',
10621
+ scheme: 'bearer',
10622
+ type: 'http'
10623
+ }, {
10624
+ key: 'ApiKeyAuth',
10625
+ name: 'X-API-Key',
10626
+ type: 'apiKey'
10627
+ }],
10628
+ url: '/studio/v1/templates/{template}',
10629
+ ...options
10630
+ });
10631
+ /**
10632
+ * Read one template
10633
+ *
10634
+ * Read one template: its genre, the writing guidance it carries and the unit outline it seeds, with each unit's intent. Address a saved template by its identifier and a built-in one by its key, alone or with its genre prefix such as novel_long:three_act when two genres share a key. Read it before creating a draft from it, because the template decides the structure the draft starts with.
10635
+ */
10636
+ export const studioTemplatesGet = (options) => (options.client ?? client).get({
10637
+ security: [{
10638
+ key: 'BearerAuth',
10639
+ scheme: 'bearer',
10640
+ type: 'http'
10641
+ }, {
10642
+ key: 'ApiKeyAuth',
10643
+ name: 'X-API-Key',
10644
+ type: 'apiKey'
10645
+ }],
10646
+ url: '/studio/v1/templates/{template}',
10647
+ ...options
10648
+ });
10649
+ /**
10650
+ * List the rendition themes of a platform
10651
+ *
10652
+ * List themes: the layouts a rendition is produced with, for one platform or for all of them. Pass a platform to see only the themes that platform can use. A theme decides the page or card a rendition is built into, so read the chosen theme before creating a rendition rather than after the output looks wrong.
10653
+ */
10654
+ export const studioThemesList = (options) => (options?.client ?? client).get({
10655
+ security: [{
10656
+ key: 'BearerAuth',
10657
+ scheme: 'bearer',
10658
+ type: 'http'
10659
+ }, {
10660
+ key: 'ApiKeyAuth',
10661
+ name: 'X-API-Key',
10662
+ type: 'apiKey'
10663
+ }],
10664
+ url: '/studio/v1/themes',
10665
+ ...options
10666
+ });
10667
+ /**
10668
+ * Create a rendition theme
10669
+ *
10670
+ * Create a theme for one platform: the HTML and CSS a written piece is rendered into, plus the fixed header and footer every rendition carries. A DOCX platform takes a reference document instead of markup, and a card theme takes its aspect, width and fonts. An agent may write a theme here, which is how a new layout appears without a release.
10671
+ */
10672
+ export const studioThemesCreate = (options) => (options.client ?? client).post({
10673
+ security: [{
10674
+ key: 'BearerAuth',
10675
+ scheme: 'bearer',
10676
+ type: 'http'
10677
+ }, {
10678
+ key: 'ApiKeyAuth',
10679
+ name: 'X-API-Key',
10680
+ type: 'apiKey'
10681
+ }],
10682
+ url: '/studio/v1/themes',
10683
+ ...options,
10684
+ headers: {
10685
+ 'Content-Type': 'application/json',
10686
+ ...options.headers
10687
+ }
10688
+ });
10689
+ /**
10690
+ * Delete a rendition theme
10691
+ *
10692
+ * Delete a theme this organization created. A built-in theme belongs to the platform and cannot be deleted, so this answers THEME_NOT_FOUND for one. Renditions already produced with the theme keep their output, because the produced file no longer depends on the theme. This cannot be undone.
10693
+ */
10694
+ export const studioThemesDelete = (options) => (options.client ?? client).delete({
10695
+ security: [{
10696
+ key: 'BearerAuth',
10697
+ scheme: 'bearer',
10698
+ type: 'http'
10699
+ }, {
10700
+ key: 'ApiKeyAuth',
10701
+ name: 'X-API-Key',
10702
+ type: 'apiKey'
10703
+ }],
10704
+ url: '/studio/v1/themes/{theme}',
10705
+ ...options
10706
+ });
10707
+ /**
10708
+ * Read one rendition theme
10709
+ *
10710
+ * Read one theme in full: the HTML template and stylesheet it renders with, the header and footer it always carries, the reference document a DOCX rendition uses, or the card proportions a card rendition uses. Read it before creating a rendition with it, because a theme decides what the output looks like and a DOCX theme is a file rather than markup.
10711
+ */
10712
+ export const studioThemesGet = (options) => (options.client ?? client).get({
10713
+ security: [{
10714
+ key: 'BearerAuth',
10715
+ scheme: 'bearer',
10716
+ type: 'http'
10717
+ }, {
10718
+ key: 'ApiKeyAuth',
10719
+ name: 'X-API-Key',
10720
+ type: 'apiKey'
10721
+ }],
10722
+ url: '/studio/v1/themes/{theme}',
10723
+ ...options
10724
+ });
10725
+ /**
10726
+ * Change a rendition theme
10727
+ *
10728
+ * Change a theme: its name, its markup, its stylesheet, or the fixed fragments around every rendition. Send update_mask naming exactly the fields you change. Changing a theme does not rewrite renditions already produced with an earlier version, because each rendition records the theme version it was built from.
10729
+ */
10730
+ export const studioThemesUpdate = (options) => (options.client ?? client).patch({
10731
+ security: [{
10732
+ key: 'BearerAuth',
10733
+ scheme: 'bearer',
10734
+ type: 'http'
10735
+ }, {
10736
+ key: 'ApiKeyAuth',
10737
+ name: 'X-API-Key',
10738
+ type: 'apiKey'
10739
+ }],
10740
+ url: '/studio/v1/themes/{theme}',
10741
+ ...options,
10742
+ headers: {
10743
+ 'Content-Type': 'application/json',
10744
+ ...options.headers
10745
+ }
10746
+ });
9711
10747
  /**
9712
10748
  * List vaults
9713
10749
  *