@deepraxis/sdk 0.1.1-dev.936276d → 0.1.1-dev.93cc895

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.
@@ -7545,6 +7545,496 @@ export const devopsTestReportsUpload = (options) => (options.client ?? client).p
7545
7545
  ...options.headers
7546
7546
  }
7547
7547
  });
7548
+ /**
7549
+ * List projects
7550
+ *
7551
+ * List the delivery projects this organization has, newest first, with each project's repository binding and settings. Call this first when you do not already hold a project id: every other operation in this domain is addressed by one. A project from another organization is never listed, so an empty page means this organization has none rather than that they are hidden. The order is by creation time descending; follow nextPageToken until it is empty to see them all.
7552
+ */
7553
+ export const devopsProjectsList = (options) => (options?.client ?? client).get({
7554
+ security: [{
7555
+ key: 'devops-bearerAuth',
7556
+ scheme: 'bearer',
7557
+ type: 'http'
7558
+ }],
7559
+ url: '/devops/v1/projects',
7560
+ ...options
7561
+ });
7562
+ /**
7563
+ * Retrieve a project
7564
+ *
7565
+ * Read one project by id: its repository binding, its release schedule and its gate settings. Use it to confirm a project's configuration before releasing into it, and to learn which environment a promotion order starts from. A project that was deleted, or that belongs to another organization, answers PROJECT_NOT_FOUND — the two are indistinguishable on purpose, so the answer never tells you whether a project exists elsewhere.
7566
+ */
7567
+ export const devopsProjectsGet = (options) => (options.client ?? client).get({
7568
+ security: [{
7569
+ key: 'devops-bearerAuth',
7570
+ scheme: 'bearer',
7571
+ type: 'http'
7572
+ }],
7573
+ url: '/devops/v1/projects/{id}',
7574
+ ...options
7575
+ });
7576
+ /**
7577
+ * List releases
7578
+ *
7579
+ * List the project's releases, newest first. Use it to find the release a promotion should carry, or to see what has been released recently and whether any of it was abandoned. The list carries the render state and the abandoned flag, so a caller can skip a release that is still rendering or that was withdrawn without reading each one. Neither filter nor orderBy is accepted on this collection yet; a request that sends one is refused rather than silently ignored.
7580
+ */
7581
+ export const devopsReleasesList = (options) => (options.client ?? client).get({
7582
+ security: [{
7583
+ key: 'devops-bearerAuth',
7584
+ scheme: 'bearer',
7585
+ type: 'http'
7586
+ }],
7587
+ url: '/devops/v1/projects/{project}/releases',
7588
+ ...options
7589
+ });
7590
+ /**
7591
+ * Create a release
7592
+ *
7593
+ * Create a release: an immutable snapshot of what will be deployed, named and fingerprinted once so later promotions can be compared against it. Send commit to release a commit as it stands, or base plus picks to build a patch release on a release that is already in production; the two shapes are exclusive and the patch shape is refused with PATCH_NOT_ELIGIBLE when the picks do not qualify. Rendering starts immediately and the answer reports its state; a promotion refuses a release that is still rendering with RELEASE_NOT_READY rather than deploying half of it. Set validateOnly to see the plan and the refusals without writing a release, and requestId to make a retry of the same call answer the first release instead of creating a second.
7594
+ */
7595
+ export const devopsReleasesCreate = (options) => (options.client ?? client).post({
7596
+ security: [{
7597
+ key: 'devops-bearerAuth',
7598
+ scheme: 'bearer',
7599
+ type: 'http'
7600
+ }],
7601
+ url: '/devops/v1/projects/{project}/releases',
7602
+ ...options,
7603
+ headers: {
7604
+ 'Content-Type': 'application/json',
7605
+ ...options.headers
7606
+ }
7607
+ });
7608
+ /**
7609
+ * Retrieve a release
7610
+ *
7611
+ * Read one release in full: the commit it carries, the targets and source digests it was rendered from, which environments have verified it, and where it currently runs. Call it before promoting to confirm the release is not abandoned and that its render succeeded, and after deploying to learn which environments already hold it so the same release is not promoted twice. A release from another organization answers RELEASE_NOT_FOUND, which is also the answer for one that never existed.
7612
+ */
7613
+ export const devopsReleasesGet = (options) => (options.client ?? client).get({
7614
+ security: [{
7615
+ key: 'devops-bearerAuth',
7616
+ scheme: 'bearer',
7617
+ type: 'http'
7618
+ }],
7619
+ url: '/devops/v1/releases/{id}',
7620
+ ...options
7621
+ });
7622
+ /**
7623
+ * Abandon a release
7624
+ *
7625
+ * Withdraw a release so it can no longer be promoted: a later promotion of it is refused with RELEASE_ABANDONED. Use it when a release was created by mistake or has been superseded, and record why in reason — the reason is stored on the release as the attribution of the act. A release with a promotion still in flight cannot be abandoned, because the queue is mid-flight on it; cancel that promotion first, which is the door for stopping a deployment. Abandoning is one-way: a withdrawn release is never un-abandoned, and a new release is created instead.
7626
+ */
7627
+ export const devopsReleasesAbandon = (options) => (options.client ?? client).post({
7628
+ security: [{
7629
+ key: 'devops-bearerAuth',
7630
+ scheme: 'bearer',
7631
+ type: 'http'
7632
+ }],
7633
+ url: '/devops/v1/releases/{id}:abandon',
7634
+ ...options,
7635
+ headers: {
7636
+ 'Content-Type': 'application/json',
7637
+ ...options.headers
7638
+ }
7639
+ });
7640
+ /**
7641
+ * Create a promotion
7642
+ *
7643
+ * Promote a release into one environment: this is the operation that actually schedules a deployment. Name the release and the environment; path is regular for an ordinary promotion, patch to carry a patch release, targeted to deploy only the targets you list, and rollback to return the environment to an earlier release. The service reads the environment's promotion order and refuses when an upstream environment has not verified this release yet, unless a bypass carries the authorization for that gate. An environment takes one promotion at a time, so a create while another is running is queued behind it rather than refused. Set validateOnly to read the plan and its refusals — layers, skipped targets, pending migrations, missing configuration keys — without scheduling anything, which is the safe way to find out what a promotion will do.
7644
+ */
7645
+ export const devopsPromotionsCreate = (options) => (options.client ?? client).post({
7646
+ security: [{
7647
+ key: 'devops-bearerAuth',
7648
+ scheme: 'bearer',
7649
+ type: 'http'
7650
+ }],
7651
+ url: '/devops/v1/promotions',
7652
+ ...options,
7653
+ headers: {
7654
+ 'Content-Type': 'application/json',
7655
+ ...options.headers
7656
+ }
7657
+ });
7658
+ /**
7659
+ * List promotions
7660
+ *
7661
+ * List the project's promotions, newest first, across every environment. Use it to see what is queued, what is observing, and what finished recently, without reading each environment separately. A promotion in a terminal state stays in this list, which is how a caller tells "never promoted" apart from "promoted and then rolled back". Neither filter nor orderBy is accepted yet, so page through with pageToken instead of narrowing the query.
7662
+ */
7663
+ export const devopsPromotionsList = (options) => (options.client ?? client).get({
7664
+ security: [{
7665
+ key: 'devops-bearerAuth',
7666
+ scheme: 'bearer',
7667
+ type: 'http'
7668
+ }],
7669
+ url: '/devops/v1/projects/{project}/promotions',
7670
+ ...options
7671
+ });
7672
+ /**
7673
+ * Retrieve a promotion
7674
+ *
7675
+ * Read one promotion: its state, its approval, its plan, and the failure that stopped it when there is one. Poll this after creating a promotion to follow it to a terminal state, or read it to find out why a deployment stopped — failure.cause tells plan refusal apart from a failed deploy, and executor names the runs involved. Pass expand=rollouts to receive the per-target rollouts in the same answer instead of listing them separately. state observing means the environment is deployed and the observation window is running, so the promotion is not finished and conclude is still to come.
7676
+ */
7677
+ export const devopsPromotionsGet = (options) => (options.client ?? client).get({
7678
+ security: [{
7679
+ key: 'devops-bearerAuth',
7680
+ scheme: 'bearer',
7681
+ type: 'http'
7682
+ }],
7683
+ url: '/devops/v1/promotions/{id}',
7684
+ ...options
7685
+ });
7686
+ /**
7687
+ * Approve or reject a promotion
7688
+ *
7689
+ * Answer the approval an environment asked for: send approved true to let the promotion proceed, false to reject it and end it in approval_rejected. This is the environment-level gate an environment with requireApproval raises, not the per-rollout approval. Comment records the reasoning next to the decision, which is what a later reader sees instead of the bare verdict. The call is refused with PROMOTION_NOT_AWAITING_APPROVAL when the promotion is not waiting for one, so a stale approval cannot restart something that already finished. Approving is attributed to the credential that sends it.
7690
+ */
7691
+ export const devopsPromotionsApprove = (options) => (options.client ?? client).post({
7692
+ security: [{
7693
+ key: 'devops-bearerAuth',
7694
+ scheme: 'bearer',
7695
+ type: 'http'
7696
+ }],
7697
+ url: '/devops/v1/promotions/{id}:approve',
7698
+ ...options,
7699
+ headers: {
7700
+ 'Content-Type': 'application/json',
7701
+ ...options.headers
7702
+ }
7703
+ });
7704
+ /**
7705
+ * Cancel a promotion
7706
+ *
7707
+ * Stop a promotion that has not finished, moving it through cancelling to cancelled and stopping the deploys it had scheduled. Use it to halt a deployment that is failing or that should no longer continue; reason is recorded as the attribution of the stop. Cancelling does not undo what already deployed: an environment whose targets were written keeps those targets, and returning them to an earlier release is a separate rollback promotion. A promotion that already reached a terminal state is refused with PROMOTION_ALREADY_FINISHED rather than silently ignored.
7708
+ */
7709
+ export const devopsPromotionsCancel = (options) => (options.client ?? client).post({
7710
+ security: [{
7711
+ key: 'devops-bearerAuth',
7712
+ scheme: 'bearer',
7713
+ type: 'http'
7714
+ }],
7715
+ url: '/devops/v1/promotions/{id}:cancel',
7716
+ ...options,
7717
+ headers: {
7718
+ 'Content-Type': 'application/json',
7719
+ ...options.headers
7720
+ }
7721
+ });
7722
+ /**
7723
+ * Retry a promotion
7724
+ *
7725
+ * Continue a promotion that stopped part-way, such as one in halted where some targets succeeded and others failed. The retry re-runs the targets that did not succeed and leaves the ones that did alone, so a partially deployed environment is completed rather than redeployed from the start. A promotion that is still running is refused, and so is one that already reached a terminal state; read the promotion first and retry only a halted or errored one. The retry is attributed to the credential that sends it and is recorded on the promotion.
7726
+ */
7727
+ export const devopsPromotionsRetry = (options) => (options.client ?? client).post({
7728
+ security: [{
7729
+ key: 'devops-bearerAuth',
7730
+ scheme: 'bearer',
7731
+ type: 'http'
7732
+ }],
7733
+ url: '/devops/v1/promotions/{id}:retry',
7734
+ ...options
7735
+ });
7736
+ /**
7737
+ * Conclude an observation
7738
+ *
7739
+ * Record the verdict on a promotion that is observing: send keep to accept the deployment as the environment's new state, or rollback to return the environment to the release it held before. This is the decision the observation window exists for, so a promotion in observing state stays open until it is concluded; reason is stored as the attribution. Concluding with rollback schedules the return, it does not merely label the promotion. A promotion that is not observing is refused with PROMOTION_NOT_OBSERVING, which is how a caller tells "already concluded" apart from a call that had no effect.
7740
+ */
7741
+ export const devopsPromotionsConclude = (options) => (options.client ?? client).post({
7742
+ security: [{
7743
+ key: 'devops-bearerAuth',
7744
+ scheme: 'bearer',
7745
+ type: 'http'
7746
+ }],
7747
+ url: '/devops/v1/promotions/{id}:conclude',
7748
+ ...options,
7749
+ headers: {
7750
+ 'Content-Type': 'application/json',
7751
+ ...options.headers
7752
+ }
7753
+ });
7754
+ /**
7755
+ * List a promotion's rollouts
7756
+ *
7757
+ * List the per-target rollouts of one promotion: which target each is deploying, which layer it waits on, and where in its phases it has got to. Call it when a promotion is halted or failed to find the target that stopped, since the promotion's own state summarises what the rollouts show one by one. A promotion with nothing to deploy answers an empty page rather than a refusal. Neither filter nor orderBy is accepted here, and the rollouts come in the order the plan laid them out.
7758
+ */
7759
+ export const devopsRolloutsList = (options) => (options.client ?? client).get({
7760
+ security: [{
7761
+ key: 'devops-bearerAuth',
7762
+ scheme: 'bearer',
7763
+ type: 'http'
7764
+ }],
7765
+ url: '/devops/v1/promotions/{promotion}/rollouts',
7766
+ ...options
7767
+ });
7768
+ /**
7769
+ * Retrieve a rollout
7770
+ *
7771
+ * Read one rollout in full: its phases and the jobs inside them, each job's most recent attempt, the checkpoint it was deploying from, and why it failed when it did. This is the level that names the failing step — a promotion tells you that a target failed, a rollout tells you which job run did and what it reported. Use logFileId or a job run's eventLogPath to reach the logs that step produced. A rollout from another organization answers ROLLOUT_NOT_FOUND, the same answer as one that never existed.
7772
+ */
7773
+ export const devopsRolloutsGet = (options) => (options.client ?? client).get({
7774
+ security: [{
7775
+ key: 'devops-bearerAuth',
7776
+ scheme: 'bearer',
7777
+ type: 'http'
7778
+ }],
7779
+ url: '/devops/v1/rollouts/{id}',
7780
+ ...options
7781
+ });
7782
+ /**
7783
+ * List environments
7784
+ *
7785
+ * List the project's environments in promotion order: development first, production last. order is the promotion sequence, so the environment before the one you are promoting into is the one that must have verified the release first. Each entry carries its tier, whether it requires approval, and whether its queue is idle or busy; a busy queue names the promotion holding it and how many wait behind. This collection is not paged: a project has few environments and the whole ordered list is the answer.
7786
+ */
7787
+ export const devopsEnvironmentsList = (options) => (options.client ?? client).get({
7788
+ security: [{
7789
+ key: 'devops-bearerAuth',
7790
+ scheme: 'bearer',
7791
+ type: 'http'
7792
+ }],
7793
+ url: '/devops/v1/projects/{project}/environments',
7794
+ ...options
7795
+ });
7796
+ /**
7797
+ * List environment checkpoints
7798
+ *
7799
+ * List where each target of an environment currently stands: the release and commit deployed to it, the promotion that put it there, and how far behind the default branch that commit is. Read it to answer "what is running in production right now" and to tell a promotion that will change something apart from one that will skip every target as unchanged. behindMain counts commits on the default branch that the deployed commit does not have, so zero means the environment carries the current branch head. Targets that were never deployed to have no checkpoints until something deploys to them.
7800
+ */
7801
+ export const devopsEnvironmentsCheckpointsList = (options) => (options.client ?? client).get({
7802
+ security: [{
7803
+ key: 'devops-bearerAuth',
7804
+ scheme: 'bearer',
7805
+ type: 'http'
7806
+ }],
7807
+ url: '/devops/v1/environments/{id}/checkpoints',
7808
+ ...options
7809
+ });
7810
+ /**
7811
+ * List targets
7812
+ *
7813
+ * List what the project deploys — one target per deployable path in the repository, with its kind, its destination and the targets it depends on. Targets are discovered from the code, not entered by hand, so this list is the service's reading of the repository rather than a configuration you maintain here. A project whose catalog has never been read has it read on the first call, at the default branch's head, so the first answer is already the catalog instead of an empty page. Archived targets, which the repository no longer deploys, are left out.
7814
+ */
7815
+ export const devopsTargetsList = (options) => (options.client ?? client).get({
7816
+ security: [{
7817
+ key: 'devops-bearerAuth',
7818
+ scheme: 'bearer',
7819
+ type: 'http'
7820
+ }],
7821
+ url: '/devops/v1/projects/{project}/targets',
7822
+ ...options
7823
+ });
7824
+ /**
7825
+ * Refresh the target catalog
7826
+ *
7827
+ * Re-read the repository at a commit and answer the deployment targets it implies, recording what was found. Call it after adding or removing a deployable service so later promotions see the current layout; omit commit to read the default branch's head, or name one to read that commit. The answer includes the dependency graph and any cycles in it, and a cycle is reported rather than refused, matching how the deploy pipeline treats one. This is a read of the repository that also remembers what it read, so it is safe to call again; nothing is deployed by it.
7828
+ */
7829
+ export const devopsTargetsRefresh = (options) => (options.client ?? client).post({
7830
+ security: [{
7831
+ key: 'devops-bearerAuth',
7832
+ scheme: 'bearer',
7833
+ type: 'http'
7834
+ }],
7835
+ url: '/devops/v1/projects/{project}/targets:refresh',
7836
+ ...options,
7837
+ headers: {
7838
+ 'Content-Type': 'application/json',
7839
+ ...options.headers
7840
+ }
7841
+ });
7842
+ /**
7843
+ * List flags
7844
+ *
7845
+ * List the project's flags with their per-environment configuration, newest first. Use it to find a flag by key when code names one, and to review the flags of a project — the entries carry lifecycle, staleness, the observation deadline and the removal ticket, which is what an expiry review reads. filter accepts exactly one term, lifecycle=archived, to list the archived flags instead of the live ones; any other filter or orderBy is refused rather than ignored. totalSize is answered on the first page only.
7846
+ */
7847
+ export const devopsFlagsList = (options) => (options.client ?? client).get({
7848
+ security: [{
7849
+ key: 'devops-bearerAuth',
7850
+ scheme: 'bearer',
7851
+ type: 'http'
7852
+ }],
7853
+ url: '/devops/v1/projects/{project}/flags',
7854
+ ...options
7855
+ });
7856
+ /**
7857
+ * Create a flag
7858
+ *
7859
+ * Create a feature flag in a project: its key, what kind of flag it is, the values it can serve, and which variation is served when it is off. The key is what code names, so it is unique per project and a key already in use is refused with FLAG_KEY_TAKEN rather than reused — an archived flag keeps its key. owner, observeUntil and removalTicket carry the flag's lifecycle: a release or experiment flag expects an observation deadline and the ticket that removes it, and a flag missing them is refused with FLAG_LIFECYCLE_INCOMPLETE. A new flag starts with every environment off, so creating one changes no runtime behaviour; turn an environment on with the environment update.
7860
+ */
7861
+ export const devopsFlagsCreate = (options) => (options.client ?? client).post({
7862
+ security: [{
7863
+ key: 'devops-bearerAuth',
7864
+ scheme: 'bearer',
7865
+ type: 'http'
7866
+ }],
7867
+ url: '/devops/v1/projects/{project}/flags',
7868
+ ...options,
7869
+ headers: {
7870
+ 'Content-Type': 'application/json',
7871
+ ...options.headers
7872
+ }
7873
+ });
7874
+ /**
7875
+ * Retrieve a flag
7876
+ *
7877
+ * Read one flag in full: every environment's configuration, the rules and rollouts each environment serves, the flag's lifecycle, and where code references its key as of the last scan. Call it before changing an environment so you can send the version you read, and after a release to confirm the flag reached the state you expected. An archived flag is still readable here — that is how its key and history stay answerable after it stopped evaluating. codeRefs.count tells you how much code still names the key, which is what decides whether removing the flag is safe.
7878
+ */
7879
+ export const devopsFlagsGet = (options) => (options.client ?? client).get({
7880
+ security: [{
7881
+ key: 'devops-bearerAuth',
7882
+ scheme: 'bearer',
7883
+ type: 'http'
7884
+ }],
7885
+ url: '/devops/v1/flags/{id}',
7886
+ ...options
7887
+ });
7888
+ /**
7889
+ * Update a flag
7890
+ *
7891
+ * Change a flag's metadata — its name, description, owner, observation deadline, removal ticket or tags — without touching what any environment serves. Send the fields to change inside flag and name them in updateMask; a field present in flag but absent from the mask is left alone, and a mask naming a field this operation cannot change is refused rather than ignored. Sending null clears a nullable field such as observeUntil. Served values are not changed here: use the environment update for what an environment serves, which is versioned and checked. An archived flag cannot be updated.
7892
+ */
7893
+ export const devopsFlagsUpdate = (options) => (options.client ?? client).patch({
7894
+ security: [{
7895
+ key: 'devops-bearerAuth',
7896
+ scheme: 'bearer',
7897
+ type: 'http'
7898
+ }],
7899
+ url: '/devops/v1/flags/{id}',
7900
+ ...options,
7901
+ headers: {
7902
+ 'Content-Type': 'application/json',
7903
+ ...options.headers
7904
+ }
7905
+ });
7906
+ /**
7907
+ * Update a flag's environment
7908
+ *
7909
+ * Change what one environment of a flag serves: whether it is on, its targeting rules, its prerequisite flags, its individually targeted keys, its fallthrough, and the progressive rollout it runs. This is the write that changes runtime behaviour, so it is versioned: send the version you read and a change based on a stale version is refused with FLAG_VERSION_CONFLICT instead of silently overwriting someone else's edit. comment records why the configuration changed, next to the change itself. Targets whose keys are not deployed yet are refused with FLAG_CODE_NOT_DEPLOYED, because serving a variation the running code cannot name would fail at evaluation time.
7910
+ */
7911
+ export const devopsFlagsUpdateEnvironment = (options) => (options.client ?? client).patch({
7912
+ security: [{
7913
+ key: 'devops-bearerAuth',
7914
+ scheme: 'bearer',
7915
+ type: 'http'
7916
+ }],
7917
+ url: '/devops/v1/flags/{id}/environments/{environment}',
7918
+ ...options,
7919
+ headers: {
7920
+ 'Content-Type': 'application/json',
7921
+ ...options.headers
7922
+ }
7923
+ });
7924
+ /**
7925
+ * Conclude a flag
7926
+ *
7927
+ * Record the decision a temporary flag's observation window ended with: promote makes the chosen variation the permanent behaviour and moves the flag to launched, rollback returns the environment to its off behaviour, and extend keeps observing with a new observeUntil deadline. reason is stored as the attribution of the decision. This is the act the observation flag machinery requires when the deadline arrives, so an expired flag is concluded rather than left standing. A promote or rollback finishes the flag's rollout; the code and the flag are then removed by the ticket the flag recorded, which this call does not do.
7928
+ */
7929
+ export const devopsFlagsConclude = (options) => (options.client ?? client).post({
7930
+ security: [{
7931
+ key: 'devops-bearerAuth',
7932
+ scheme: 'bearer',
7933
+ type: 'http'
7934
+ }],
7935
+ url: '/devops/v1/flags/{id}:conclude',
7936
+ ...options,
7937
+ headers: {
7938
+ 'Content-Type': 'application/json',
7939
+ ...options.headers
7940
+ }
7941
+ });
7942
+ /**
7943
+ * Archive a flag
7944
+ *
7945
+ * Archive a flag once it is no longer needed: it stops evaluating in every environment, leaves the ordinary flag list, and keeps its key and history. Use it for a flag whose code has been removed and whose key nothing names any more; codeRefs.count on the flag is what tells you whether that is true. Archiving is the terminal lifecycle state — an archived flag is never un-archived and its key is never reused, so a flag that may come back is turned off in its environment instead. The key stays reserved, which is why a later create with the same key is refused.
7946
+ */
7947
+ export const devopsFlagsArchive = (options) => (options.client ?? client).post({
7948
+ security: [{
7949
+ key: 'devops-bearerAuth',
7950
+ scheme: 'bearer',
7951
+ type: 'http'
7952
+ }],
7953
+ url: '/devops/v1/flags/{id}:archive',
7954
+ ...options
7955
+ });
7956
+ /**
7957
+ * Create a progressive rollout
7958
+ *
7959
+ * Start a staged rollout of one variation of a flag in one environment: the steps are percentages with a hold time each, and the guard says which signals are watched and whether a bad reading pauses the rollout or rolls it back. Use it instead of turning a flag fully on, so a bad variation is caught at a small percentage. bucketBy names the context attribute that decides which bucket a caller falls into, so the same caller stays in the same bucket across steps. One progressive rollout runs per flag and environment; a second one while the first is active is refused with ROLLOUT_ALREADY_ACTIVE.
7960
+ */
7961
+ export const devopsProgressiveRolloutsCreate = (options) => (options.client ?? client).post({
7962
+ security: [{
7963
+ key: 'devops-bearerAuth',
7964
+ scheme: 'bearer',
7965
+ type: 'http'
7966
+ }],
7967
+ url: '/devops/v1/progressive-rollouts',
7968
+ ...options,
7969
+ headers: {
7970
+ 'Content-Type': 'application/json',
7971
+ ...options.headers
7972
+ }
7973
+ });
7974
+ /**
7975
+ * Retrieve a progressive rollout
7976
+ *
7977
+ * Read one progressive rollout: which step it is on, how much of the audience that is, when the next step is due, and every step it has already taken with who moved it and why. Poll it to follow a rollout, and read history to find out why it paused or rolled back — a guard that fired leaves the step and the reason there. state scheduled means the first step has not started, running means it is advancing on its hold times, and rolled_back is terminal. nextStepTime is the time the current hold ends.
7978
+ */
7979
+ export const devopsProgressiveRolloutsGet = (options) => (options.client ?? client).get({
7980
+ security: [{
7981
+ key: 'devops-bearerAuth',
7982
+ scheme: 'bearer',
7983
+ type: 'http'
7984
+ }],
7985
+ url: '/devops/v1/progressive-rollouts/{id}',
7986
+ ...options
7987
+ });
7988
+ /**
7989
+ * Pause a progressive rollout
7990
+ *
7991
+ * Hold a running progressive rollout at its current percentage: no further step is taken until it is resumed, and the percentage already served keeps being served. Use it when a guard signal looks wrong but not wrong enough to roll back, so a person can look before the rollout advances. reason is recorded on the rollout as the attribution of the hold. Pausing a rollout that already completed or was rolled back is refused; read it first to see whether there is anything to hold.
7992
+ */
7993
+ export const devopsProgressiveRolloutsPause = (options) => (options.client ?? client).post({
7994
+ security: [{
7995
+ key: 'devops-bearerAuth',
7996
+ scheme: 'bearer',
7997
+ type: 'http'
7998
+ }],
7999
+ url: '/devops/v1/progressive-rollouts/{id}:pause',
8000
+ ...options,
8001
+ headers: {
8002
+ 'Content-Type': 'application/json',
8003
+ ...options.headers
8004
+ }
8005
+ });
8006
+ /**
8007
+ * Resume a progressive rollout
8008
+ *
8009
+ * Continue a paused progressive rollout from the step it stopped at, restarting the hold time for the current step rather than skipping it. Use it after a pause has been looked into and the rollout is judged safe to continue. A rollout that is running already, or that finished, is refused; read it first to see whether it is paused. The resumption is attributed to the credential that sends it and recorded in the rollout's step history.
8010
+ */
8011
+ export const devopsProgressiveRolloutsResume = (options) => (options.client ?? client).post({
8012
+ security: [{
8013
+ key: 'devops-bearerAuth',
8014
+ scheme: 'bearer',
8015
+ type: 'http'
8016
+ }],
8017
+ url: '/devops/v1/progressive-rollouts/{id}:resume',
8018
+ ...options
8019
+ });
8020
+ /**
8021
+ * Roll back a progressive rollout
8022
+ *
8023
+ * End a progressive rollout by returning the flag's environment to the variation it served before the rollout started, so the audience that was already switched over goes back. Use it when a guard signal says the variation is bad and waiting for the next step would expose more callers. reason is recorded on the rollout as the attribution of the decision. The rollback is terminal: the rollout does not restart, and a new rollout is created if the variation should be tried again. It changes what the environment serves, not the flag's other environments.
8024
+ */
8025
+ export const devopsProgressiveRolloutsRollback = (options) => (options.client ?? client).post({
8026
+ security: [{
8027
+ key: 'devops-bearerAuth',
8028
+ scheme: 'bearer',
8029
+ type: 'http'
8030
+ }],
8031
+ url: '/devops/v1/progressive-rollouts/{id}:rollback',
8032
+ ...options,
8033
+ headers: {
8034
+ 'Content-Type': 'application/json',
8035
+ ...options.headers
8036
+ }
8037
+ });
7548
8038
  /**
7549
8039
  * List knowledge bases
7550
8040
  *
@@ -8268,7 +8758,7 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
8268
8758
  /**
8269
8759
  * Get job
8270
8760
  *
8271
- * Read the current batch or video-generation Job status and progress. For generation, inspect outputs and failures, then save successful candidates before their preview and save window expires after 7 days.
8761
+ * Read the current batch or generation Job status and progress. For generation, inspect outputs and failures; a successful output has already landed in the library as an asset.
8272
8762
  */
8273
8763
  export const mediaGetJob = (options) => (options.client ?? client).get({
8274
8764
  security: [{
@@ -8312,45 +8802,63 @@ export const mediaCreateDeliveryToken = (options) => (options.client ?? client).
8312
8802
  }
8313
8803
  });
8314
8804
  /**
8315
- * Summarize understanding failures
8805
+ * Get default library
8316
8806
  *
8317
- * Inspect current understanding failures before retrying. Use library_id from library creation or listing. Groups include code, output kind, actual producer model, retryability and up to five sample asset IDs. At most 1024 detailed groups plus two overflow groups are returned; overflow groups separate retryable and unrecoverable entries and mark overflow=true. Unknown failure codes remain retryable. Historical counts are provisional while counts_complete is false. Example: GET /media/v1/libraries/lib_example/understandings/failure_summary.
8807
+ * Return this organization’s default library. Calling ensures the organization’s default library exists (ADR-093): the first call creates it and later calls return the same library, so this is the method to call before writing when no library id is known. Generated and edited media land here when no library is named. The path segment {lib} accepts the literal default, which resolves to this library before the credential check — so an agent that has never listed libraries can still write to the right place. Returns the same Library object as libraries.retrieve; a credential bound to one library reaches this only when that binding covers the default library.
8318
8808
  */
8319
- export const mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
8809
+ export const mediaGetDefaultLibrary = (options) => (options?.client ?? client).get({
8320
8810
  security: [{
8321
8811
  key: 'media-BearerAuth',
8322
8812
  scheme: 'bearer',
8323
8813
  type: 'http'
8324
8814
  }],
8325
- url: '/media/v1/libraries/{library_id}/understandings/failure_summary',
8815
+ url: '/media/v1/libraries/default',
8326
8816
  ...options
8327
8817
  });
8328
8818
  /**
8329
- * List understanding results across a library
8819
+ * Set default library
8330
8820
  *
8331
- * Read current understanding entries across one library without fetching every asset separately. Use library_id from creation or listing. folder includes descendants; kinds is a comma-separated list of output kinds. Entries are ordered by asset_id and then understanding id. Continue with next_cursor and the same folder and kinds; limit defaults to 100 and cannot exceed 100. Superseded, deleted and old-version entries are excluded. During historical backfill, this method returns 503 CAPACITY rather than incomplete pages; poll failureSummary until counts_complete is true, then start pagination. Example: GET /media/v1/libraries/lib_example/understandings?folder=travel&kinds=caption,transcript&limit=100.
8821
+ * Point this organization’s default library at an existing library. Calling ensures the organization’s default library exists (ADR-093): the path is resolved before the credential check, so a first call creates the default library when there is none and then repoints it. The path segment {lib} accepts the literal default, which resolves to this library before the credential check. Supply library_id from library creation or listing; the library must be active and belong to the organization. This changes where library-less generation and uploads land across the whole organization, so it affects other callers as well as this one. It does not move or copy any asset — assets already in the previous default library stay there. Returns the library now set as the default. Deleting the default library is refused with LIBRARY_IS_DEFAULT until another library is made the default.
8332
8822
  */
8333
- export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
8823
+ export const mediaSetDefaultLibrary = (options) => (options.client ?? client).put({
8334
8824
  security: [{
8335
8825
  key: 'media-BearerAuth',
8336
8826
  scheme: 'bearer',
8337
8827
  type: 'http'
8338
8828
  }],
8339
- url: '/media/v1/libraries/{library_id}/understandings',
8829
+ url: '/media/v1/libraries/default',
8830
+ ...options,
8831
+ headers: {
8832
+ 'Content-Type': 'application/json',
8833
+ ...options.headers
8834
+ }
8835
+ });
8836
+ /**
8837
+ * Get asset lineage
8838
+ *
8839
+ * Read the whole edit tree containing one asset, so a caller sees what it was edited from and what was edited from it. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The response names the root the tree descends from, the asset asked about, and every step between them, each with the operation, prompt and creation time that produced it. Deleted assets stay in the tree, marked deleted, so the chain stays connected after cleanup. This is a read: it starts no processing and changes no asset. Example: GET /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/lineage.
8840
+ */
8841
+ export const mediaGetAssetLineage = (options) => (options.client ?? client).get({
8842
+ security: [{
8843
+ key: 'media-BearerAuth',
8844
+ scheme: 'bearer',
8845
+ type: 'http'
8846
+ }],
8847
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/lineage',
8340
8848
  ...options
8341
8849
  });
8342
8850
  /**
8343
- * Create video generation
8851
+ * Generate image
8344
8852
  *
8345
- * Create a video.generate job. Generation is charged per second. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until terminal, then save successful outputs. Unsaved candidate Files expire after 7 days.
8853
+ * Generate one or more images from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. The request body is the image request itself: prompt is required, and n, size, background, output_format, output, references, seed, model, asset_folder and understanding are optional. Set output to sticker for a cut-out with a transparent background. references attach existing assets with a role — edit_target, style, structure or subject — and a model that cannot honour a role returns REFERENCE_TYPE_MISMATCH. Aspect ratio is not accepted for images; name size instead. Generation is charged through Router and the job records the charge in usage; nothing is charged for a request refused before it starts. The response is 202 with a queued Job whose type is image and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/images/generations with {"prompt":"A red kite above a calm sea at sunrise","n":1,"output":"sticker"}.
8346
8854
  */
8347
- export const mediaCreateGeneration = (options) => (options.client ?? client).post({
8855
+ export const mediaGenerateImage = (options) => (options.client ?? client).post({
8348
8856
  security: [{
8349
8857
  key: 'media-BearerAuth',
8350
8858
  scheme: 'bearer',
8351
8859
  type: 'http'
8352
8860
  }],
8353
- url: '/media/v1/libraries/{library_id}/generations',
8861
+ url: '/media/v1/libraries/{library_id}/images/generations',
8354
8862
  ...options,
8355
8863
  headers: {
8356
8864
  'Content-Type': 'application/json',
@@ -8358,55 +8866,119 @@ export const mediaCreateGeneration = (options) => (options.client ?? client).pos
8358
8866
  }
8359
8867
  });
8360
8868
  /**
8361
- * List jobs
8869
+ * Generate video
8362
8870
  *
8363
- * List batch and video-generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal, then save successful candidate outputs before they expire after 7 days.
8871
+ * Generate one or more videos from a text prompt and store them straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still generate. mode says what the video is anchored to: text needs only a prompt, image animates the existing image named by first_frame, and first_last interpolates between first_frame and last_frame. The frames must be image or sticker assets of the same library; Router is sent a fetchable URL for each, recorded in the produced asset’s provenance. mode reference and output gif are refused with OPERATION_NOT_SUPPORTED in this release, and negative_prompt, references and an unknown mode are refused before anything is charged. Every output lands in the library as a video asset as soon as it is ready — there is no candidate state and nothing expires, so outputs.save is not part of this lane. Generation is charged per second through Router and the job records the charge in usage; a refused request costs nothing. The response is 202 with a queued Job whose type is video and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced assets from the library. Send Idempotency-Key, or idempotency_key in the body, to retry without generating and charging twice. Example: POST /media/v1/libraries/default/videos/generations with {"prompt":"A red kite above a calm sea at sunrise","mode":"text","n":1}.
8364
8872
  */
8365
- export const mediaListJobs = (options) => (options.client ?? client).get({
8873
+ export const mediaGenerateVideo = (options) => (options.client ?? client).post({
8366
8874
  security: [{
8367
8875
  key: 'media-BearerAuth',
8368
8876
  scheme: 'bearer',
8369
8877
  type: 'http'
8370
8878
  }],
8371
- url: '/media/v1/libraries/{library_id}/jobs',
8372
- ...options
8879
+ url: '/media/v1/libraries/{library_id}/videos/generations',
8880
+ ...options,
8881
+ headers: {
8882
+ 'Content-Type': 'application/json',
8883
+ ...options.headers
8884
+ }
8373
8885
  });
8374
8886
  /**
8375
- * Cancel job
8887
+ * Edit asset
8376
8888
  *
8377
- * Cancel a queued or running generation job. Already completed outputs remain available to save; poll or read the returned Job to confirm its status.
8889
+ * Edit an existing asset and store the result as a new asset. Use library_id from creation or listing and asset_id from asset creation or listing; library_id also accepts the literal default, which resolves to the organization’s default library before the credential check. The source asset is never overwritten: the new asset hangs under it in the edit chain, records it in derived_from, and reads back with assets.lineage, so earlier steps stay reachable. The body is operation plus the optional model, asset_folder, understanding and idempotency_key; operation.type selects the edit and carries that operation’s own fields. This release performs variations, inpaint, erase, replace_object, recolor, remove_background and replace_background on images; every other type in the operation vocabulary — the video and audio edits — is refused with OPERATION_NOT_SUPPORTED. inpaint takes mask, a PNG File identifier beginning with file- whose transparent area marks the region to replace, plus the prompt describing what belongs there. Aspects beyond the source asset’s material type return REFERENCE_TYPE_MISMATCH. Editing is charged through Router and the job records the charge in usage. The response is 202 with a queued Job whose type is image, whose operation is the edit applied, and whose source_asset_id is the asset edited; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until it is completed or failed, then read the produced asset. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/edits with {"operation":{"type":"variations","strength":"subtle"}}.
8378
8890
  */
8379
- export const mediaCancelJob = (options) => (options.client ?? client).post({
8891
+ export const mediaEditAsset = (options) => (options.client ?? client).post({
8380
8892
  security: [{
8381
8893
  key: 'media-BearerAuth',
8382
8894
  scheme: 'bearer',
8383
8895
  type: 'http'
8384
8896
  }],
8385
- url: '/media/v1/libraries/{library_id}/jobs/{job_id}/cancel',
8386
- ...options
8897
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/edits',
8898
+ ...options,
8899
+ headers: {
8900
+ 'Content-Type': 'application/json',
8901
+ ...options.headers
8902
+ }
8387
8903
  });
8388
8904
  /**
8389
- * Save generation output
8905
+ * Create speech
8390
8906
  *
8391
- * Save a successful candidate as a library asset. Candidate outputs expire after 7 days; save before expiry. Generation is charged per second when the job runs, not when an output is saved.
8907
+ * Synthesise speech from text and store the recording straight into the library. Use library_id from creation or listing; the path segment {library_id} also accepts the literal default, which resolves to the organization’s default library before the credential check, so an agent that has never listed a library can still synthesise. input is the text to speak and voice is required; speed is passed to the provider unchanged, and instructions and language are refused with OPERATION_NOT_SUPPORTED in this release. A voice that names a voice material of this library is refused the same way — voice cloning opens with voices.create. The provider caps one request at a short stretch of text, so a long input is cut into segments at paragraph and sentence boundaries and synthesised in order, then joined into the single recording the library receives: nothing is spoken twice and nothing is dropped. Because the segments are joined byte for byte, a multi-segment input accepts only response_format mp3 (the default) or pcm; opus is available for a single-segment input. A speech job has one result however many segments it took. Synthesis is charged through Router and the job records the charge in usage; a request refused before it starts costs nothing. The response is 202 with a queued Job whose type is speech and whose operation is generate; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until its status is completed or failed, then read the produced asset from the library — the recording carries material_type audio, audio_role voice, ai_generated true, and provenance naming this job, the text spoken and the model. Send Idempotency-Key, or idempotency_key in the body, to retry without synthesising and charging twice. Example: POST /media/v1/libraries/default/audio/speech with {"input":"A red kite above a calm sea at sunrise.","voice":"alloy"}.
8392
8908
  */
8393
- export const mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
8909
+ export const mediaCreateSpeech = (options) => (options.client ?? client).post({
8394
8910
  security: [{
8395
8911
  key: 'media-BearerAuth',
8396
8912
  scheme: 'bearer',
8397
8913
  type: 'http'
8398
8914
  }],
8399
- url: '/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save',
8915
+ url: '/media/v1/libraries/{library_id}/audio/speech',
8400
8916
  ...options,
8401
8917
  headers: {
8402
8918
  'Content-Type': 'application/json',
8403
8919
  ...options.headers
8404
8920
  }
8405
8921
  });
8922
+ /**
8923
+ * Summarize understanding failures
8924
+ *
8925
+ * Inspect current understanding failures before retrying. Use library_id from library creation or listing. Groups include code, output kind, actual producer model, retryability and up to five sample asset IDs. At most 1024 detailed groups plus two overflow groups are returned; overflow groups separate retryable and unrecoverable entries and mark overflow=true. Unknown failure codes remain retryable. Historical counts are provisional while counts_complete is false. Example: GET /media/v1/libraries/lib_example/understandings/failure_summary.
8926
+ */
8927
+ export const mediaUnderstandingFailureSummary = (options) => (options.client ?? client).get({
8928
+ security: [{
8929
+ key: 'media-BearerAuth',
8930
+ scheme: 'bearer',
8931
+ type: 'http'
8932
+ }],
8933
+ url: '/media/v1/libraries/{library_id}/understandings/failure_summary',
8934
+ ...options
8935
+ });
8936
+ /**
8937
+ * List understanding results across a library
8938
+ *
8939
+ * Read current understanding entries across one library without fetching every asset separately. Use library_id from creation or listing. folder includes descendants; kinds is a comma-separated list of output kinds. Entries are ordered by asset_id and then understanding id. Continue with next_cursor and the same folder and kinds; limit defaults to 100 and cannot exceed 100. Superseded, deleted and old-version entries are excluded. During historical backfill, this method returns 503 CAPACITY rather than incomplete pages; poll failureSummary until counts_complete is true, then start pagination. Example: GET /media/v1/libraries/lib_example/understandings?folder=travel&kinds=caption,transcript&limit=100.
8940
+ */
8941
+ export const mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).get({
8942
+ security: [{
8943
+ key: 'media-BearerAuth',
8944
+ scheme: 'bearer',
8945
+ type: 'http'
8946
+ }],
8947
+ url: '/media/v1/libraries/{library_id}/understandings',
8948
+ ...options
8949
+ });
8950
+ /**
8951
+ * List jobs
8952
+ *
8953
+ * List batch and generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal; every produced output is already a library asset.
8954
+ */
8955
+ export const mediaListJobs = (options) => (options.client ?? client).get({
8956
+ security: [{
8957
+ key: 'media-BearerAuth',
8958
+ scheme: 'bearer',
8959
+ type: 'http'
8960
+ }],
8961
+ url: '/media/v1/libraries/{library_id}/jobs',
8962
+ ...options
8963
+ });
8964
+ /**
8965
+ * Cancel job
8966
+ *
8967
+ * Cancel a queued or running generation job. Outputs already produced remain in the library; poll or read the returned Job to confirm its status.
8968
+ */
8969
+ export const mediaCancelJob = (options) => (options.client ?? client).post({
8970
+ security: [{
8971
+ key: 'media-BearerAuth',
8972
+ scheme: 'bearer',
8973
+ type: 'http'
8974
+ }],
8975
+ url: '/media/v1/libraries/{library_id}/jobs/{job_id}/cancel',
8976
+ ...options
8977
+ });
8406
8978
  /**
8407
8979
  * Get generation capabilities
8408
8980
  *
8409
- * Read supported text-to-video intent, default model, duration and aspect-ratio limits, per-library concurrency and candidate retention. Generation is charged per second; unsaved candidates expire after 7 days.
8981
+ * Read supported video generation intents, default model, duration and aspect-ratio limits and per-library concurrency. Generation is charged per second; every output is stored in the library.
8410
8982
  */
8411
8983
  export const mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
8412
8984
  security: [{
@@ -10649,7 +11221,7 @@ export const studioTemplatesGet = (options) => (options.client ?? client).get({
10649
11221
  /**
10650
11222
  * List the rendition themes of a platform
10651
11223
  *
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.
11224
+ * 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. The first page starts with the built-in themes (builtin true, such as warm-card@1 for Xiaohongshu cards and plain-mono@1 for WeChat articles), which every organization can use and nobody can change or delete; your organization's own themes follow. 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
11225
  */
10654
11226
  export const studioThemesList = (options) => (options?.client ?? client).get({
10655
11227
  security: [{