@oore/client 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/@tanstack/react-query.gen.d.ts +4 -4
- package/dist/generated/@tanstack/react-query.gen.js +4 -4
- package/dist/generated/sdk.gen.d.ts +2 -2
- package/dist/generated/sdk.gen.js +2 -2
- package/dist/generated/types.gen.d.ts +51 -4
- package/dist/generated/valibot/v-approver-role.d.ts +2 -0
- package/dist/generated/valibot/v-approver-role.js +3 -0
- package/dist/generated/valibot/v-create-project-environment-body.d.ts +4 -0
- package/dist/generated/valibot/v-create-project-environment-request.d.ts +4 -0
- package/dist/generated/valibot/v-create-project-environment-request.js +2 -0
- package/dist/generated/valibot/v-create-project-environment-response.d.ts +7 -0
- package/dist/generated/valibot/v-environment-approver.d.ts +5 -0
- package/dist/generated/valibot/v-environment-approver.js +6 -0
- package/dist/generated/valibot/v-environment-approvers-input.d.ts +5 -0
- package/dist/generated/valibot/v-environment-approvers-input.js +7 -0
- package/dist/generated/valibot/v-environment-approvers.d.ts +8 -0
- package/dist/generated/valibot/v-environment-approvers.js +8 -0
- package/dist/generated/valibot/v-list-project-environments-response.d.ts +7 -0
- package/dist/generated/valibot/v-list-project-environments-response2.d.ts +7 -0
- package/dist/generated/valibot/v-project-environment.d.ts +7 -0
- package/dist/generated/valibot/v-project-environment.js +2 -0
- package/dist/generated/valibot/v-update-project-environment-body.d.ts +4 -0
- package/dist/generated/valibot/v-update-project-environment-request.d.ts +4 -0
- package/dist/generated/valibot/v-update-project-environment-request.js +2 -0
- package/dist/generated/valibot/v-update-project-environment-response.d.ts +7 -0
- package/dist/valibot.d.ts +4 -0
- package/dist/valibot.js +4 -0
- package/openapi/openapi.json +106 -5
- package/package.json +1 -1
|
@@ -2800,13 +2800,13 @@ export declare const approvePromotionMutationKey: (options?: Partial<Options<App
|
|
|
2800
2800
|
/**
|
|
2801
2801
|
* Approve promotion
|
|
2802
2802
|
*
|
|
2803
|
-
* Approves a pending promotion and makes the store change as the approver. Requires the maintainer
|
|
2803
|
+
* Approves a pending promotion and makes the store change as the approver. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
2804
2804
|
*/
|
|
2805
2805
|
export declare const approvePromotionMutation: (options?: Partial<Options<ApprovePromotionData>>) => UseMutationOptions<ApprovePromotionResponse, ApprovePromotionError, Options<ApprovePromotionData>>;
|
|
2806
2806
|
/**
|
|
2807
2807
|
* Approve promotion
|
|
2808
2808
|
*
|
|
2809
|
-
* Approves a pending promotion and makes the store change as the approver. Requires the maintainer
|
|
2809
|
+
* Approves a pending promotion and makes the store change as the approver. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
2810
2810
|
*/
|
|
2811
2811
|
export declare const useApprovePromotionMutation: (mutationOptions?: Partial<Omit<UseMutationOptions<ApprovePromotionResponse, ApprovePromotionError, Options<ApprovePromotionData>>, "mutationFn">>) => import("@tanstack/react-query").UseMutationResult<import("../types.gen.js").EnvironmentPromotion, import("../types.gen.js").ApiError, Options<ApprovePromotionData>, unknown>;
|
|
2812
2812
|
export declare const rejectPromotionMutationKey: (options?: Partial<Options<RejectPromotionData>>) => [Pick<Partial<Options<RejectPromotionData>>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
@@ -2816,13 +2816,13 @@ export declare const rejectPromotionMutationKey: (options?: Partial<Options<Reje
|
|
|
2816
2816
|
/**
|
|
2817
2817
|
* Reject promotion
|
|
2818
2818
|
*
|
|
2819
|
-
* Rejects a pending promotion; nothing changes at the store. Requires the maintainer
|
|
2819
|
+
* Rejects a pending promotion; nothing changes at the store. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
2820
2820
|
*/
|
|
2821
2821
|
export declare const rejectPromotionMutation: (options?: Partial<Options<RejectPromotionData>>) => UseMutationOptions<RejectPromotionResponse, RejectPromotionError, Options<RejectPromotionData>>;
|
|
2822
2822
|
/**
|
|
2823
2823
|
* Reject promotion
|
|
2824
2824
|
*
|
|
2825
|
-
* Rejects a pending promotion; nothing changes at the store. Requires the maintainer
|
|
2825
|
+
* Rejects a pending promotion; nothing changes at the store. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
2826
2826
|
*/
|
|
2827
2827
|
export declare const useRejectPromotionMutation: (mutationOptions?: Partial<Omit<UseMutationOptions<RejectPromotionResponse, RejectPromotionError, Options<RejectPromotionData>>, "mutationFn">>) => import("@tanstack/react-query").UseMutationResult<import("../types.gen.js").EnvironmentPromotion, import("../types.gen.js").ApiError, Options<RejectPromotionData>, unknown>;
|
|
2828
2828
|
export declare const discoverRepositoryWorkflowsQueryKey: (options: Options<DiscoverRepositoryWorkflowsData>) => [Pick<Options<DiscoverRepositoryWorkflowsData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
@@ -2829,7 +2829,7 @@ export const approvePromotionMutationKey = (options) => createMutationKey('appro
|
|
|
2829
2829
|
/**
|
|
2830
2830
|
* Approve promotion
|
|
2831
2831
|
*
|
|
2832
|
-
* Approves a pending promotion and makes the store change as the approver. Requires the maintainer
|
|
2832
|
+
* Approves a pending promotion and makes the store change as the approver. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
2833
2833
|
*/
|
|
2834
2834
|
export const approvePromotionMutation = (options) => {
|
|
2835
2835
|
const mutationOptions = {
|
|
@@ -2845,14 +2845,14 @@ export const approvePromotionMutation = (options) => {
|
|
|
2845
2845
|
/**
|
|
2846
2846
|
* Approve promotion
|
|
2847
2847
|
*
|
|
2848
|
-
* Approves a pending promotion and makes the store change as the approver. Requires the maintainer
|
|
2848
|
+
* Approves a pending promotion and makes the store change as the approver. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
2849
2849
|
*/
|
|
2850
2850
|
export const useApprovePromotionMutation = (mutationOptions) => useMutation({ ...approvePromotionMutation(), ...mutationOptions });
|
|
2851
2851
|
export const rejectPromotionMutationKey = (options) => createMutationKey('rejectPromotion', options, ['Environments']);
|
|
2852
2852
|
/**
|
|
2853
2853
|
* Reject promotion
|
|
2854
2854
|
*
|
|
2855
|
-
* Rejects a pending promotion; nothing changes at the store. Requires the maintainer
|
|
2855
|
+
* Rejects a pending promotion; nothing changes at the store. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
2856
2856
|
*/
|
|
2857
2857
|
export const rejectPromotionMutation = (options) => {
|
|
2858
2858
|
const mutationOptions = {
|
|
@@ -2868,7 +2868,7 @@ export const rejectPromotionMutation = (options) => {
|
|
|
2868
2868
|
/**
|
|
2869
2869
|
* Reject promotion
|
|
2870
2870
|
*
|
|
2871
|
-
* Rejects a pending promotion; nothing changes at the store. Requires the maintainer
|
|
2871
|
+
* Rejects a pending promotion; nothing changes at the store. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
2872
2872
|
*/
|
|
2873
2873
|
export const useRejectPromotionMutation = (mutationOptions) => useMutation({ ...rejectPromotionMutation(), ...mutationOptions });
|
|
2874
2874
|
export const discoverRepositoryWorkflowsQueryKey = (options) => createQueryKey('discoverRepositoryWorkflows', options, false, ['Pipelines']);
|
|
@@ -717,13 +717,13 @@ export declare const promoteBuild: <ThrowOnError extends boolean = true>(options
|
|
|
717
717
|
/**
|
|
718
718
|
* Approve promotion
|
|
719
719
|
*
|
|
720
|
-
* Approves a pending promotion and makes the store change as the approver. Requires the maintainer
|
|
720
|
+
* Approves a pending promotion and makes the store change as the approver. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
721
721
|
*/
|
|
722
722
|
export declare const approvePromotion: <ThrowOnError extends boolean = true>(options: Options<ApprovePromotionData, ThrowOnError>) => RequestResult<ApprovePromotionResponses, ApprovePromotionErrors, ThrowOnError, "data">;
|
|
723
723
|
/**
|
|
724
724
|
* Reject promotion
|
|
725
725
|
*
|
|
726
|
-
* Rejects a pending promotion; nothing changes at the store. Requires the maintainer
|
|
726
|
+
* Rejects a pending promotion; nothing changes at the store. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
727
727
|
*/
|
|
728
728
|
export declare const rejectPromotion: <ThrowOnError extends boolean = true>(options: Options<RejectPromotionData, ThrowOnError>) => RequestResult<RejectPromotionResponses, RejectPromotionErrors, ThrowOnError, "data">;
|
|
729
729
|
/**
|
|
@@ -1442,7 +1442,7 @@ export const promoteBuild = (options) => options.client.post({
|
|
|
1442
1442
|
/**
|
|
1443
1443
|
* Approve promotion
|
|
1444
1444
|
*
|
|
1445
|
-
* Approves a pending promotion and makes the store change as the approver. Requires the maintainer
|
|
1445
|
+
* Approves a pending promotion and makes the store change as the approver. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
1446
1446
|
*/
|
|
1447
1447
|
export const approvePromotion = (options) => options.client.post({
|
|
1448
1448
|
responseStyle: 'data',
|
|
@@ -1457,7 +1457,7 @@ export const approvePromotion = (options) => options.client.post({
|
|
|
1457
1457
|
/**
|
|
1458
1458
|
* Reject promotion
|
|
1459
1459
|
*
|
|
1460
|
-
* Rejects a pending promotion; nothing changes at the store. Requires the maintainer
|
|
1460
|
+
* Rejects a pending promotion; nothing changes at the store. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.
|
|
1461
1461
|
*/
|
|
1462
1462
|
export const rejectPromotion = (options) => options.client.post({
|
|
1463
1463
|
responseStyle: 'data',
|
|
@@ -128,6 +128,10 @@ export type ApprovalPolicy = {
|
|
|
128
128
|
expires_after_hours?: number | null;
|
|
129
129
|
required: boolean;
|
|
130
130
|
};
|
|
131
|
+
/**
|
|
132
|
+
* The lowest project role that may approve promotions into an environment.
|
|
133
|
+
*/
|
|
134
|
+
export type ApproverRole = 'maintainer' | 'developer';
|
|
131
135
|
export type Artifact = {
|
|
132
136
|
artifact_type: ArtifactType;
|
|
133
137
|
build_id: string;
|
|
@@ -703,6 +707,7 @@ export type CreatePipelineResponse = {
|
|
|
703
707
|
};
|
|
704
708
|
export type CreateProjectEnvironmentRequest = {
|
|
705
709
|
approval_required?: boolean;
|
|
710
|
+
approvers?: null | EnvironmentApproversInput;
|
|
706
711
|
key: string;
|
|
707
712
|
name: string;
|
|
708
713
|
rollout_policy?: null | ReleasePolicy;
|
|
@@ -802,6 +807,42 @@ export type EffectiveProjectRetentionResponse = {
|
|
|
802
807
|
has_override: boolean;
|
|
803
808
|
override_fields?: null | ProjectRetentionOverride;
|
|
804
809
|
};
|
|
810
|
+
/**
|
|
811
|
+
* A project member named as an approver.
|
|
812
|
+
*/
|
|
813
|
+
export type EnvironmentApprover = {
|
|
814
|
+
email: string;
|
|
815
|
+
user_id: string;
|
|
816
|
+
};
|
|
817
|
+
/**
|
|
818
|
+
* Who may approve or reject promotions into an environment.
|
|
819
|
+
*
|
|
820
|
+
* A member may decide when their project role is at least `role`, or when
|
|
821
|
+
* they are one of `users` (developers and maintainers only). With no role
|
|
822
|
+
* and no users, any project maintainer may decide, as before approvers
|
|
823
|
+
* existed. Instance owners and admins may always decide. API tokens never
|
|
824
|
+
* decide: approvals are interactive.
|
|
825
|
+
*/
|
|
826
|
+
export type EnvironmentApprovers = {
|
|
827
|
+
role?: null | ApproverRole;
|
|
828
|
+
/**
|
|
829
|
+
* Project members named as approvers. A user who leaves the project,
|
|
830
|
+
* or becomes a viewer, stops counting.
|
|
831
|
+
*/
|
|
832
|
+
users: Array<EnvironmentApprover>;
|
|
833
|
+
};
|
|
834
|
+
/**
|
|
835
|
+
* Approvers to set on an environment. Replaces the whole set; send an empty
|
|
836
|
+
* object to go back to "any maintainer".
|
|
837
|
+
*/
|
|
838
|
+
export type EnvironmentApproversInput = {
|
|
839
|
+
role?: null | ApproverRole;
|
|
840
|
+
/**
|
|
841
|
+
* User ids of project members who are developers or maintainers. At
|
|
842
|
+
* most 20.
|
|
843
|
+
*/
|
|
844
|
+
user_ids?: Array<string>;
|
|
845
|
+
};
|
|
805
846
|
/**
|
|
806
847
|
* A request to put an existing build into an environment.
|
|
807
848
|
*/
|
|
@@ -1749,10 +1790,15 @@ export type ProjectDetailResponse = {
|
|
|
1749
1790
|
*/
|
|
1750
1791
|
export type ProjectEnvironment = {
|
|
1751
1792
|
/**
|
|
1752
|
-
* A promotion into this environment waits for
|
|
1753
|
-
*
|
|
1793
|
+
* A promotion into this environment waits for an approval before
|
|
1794
|
+
* anything changes at the store. `approvers` says who may give it.
|
|
1754
1795
|
*/
|
|
1755
1796
|
approval_required: boolean;
|
|
1797
|
+
/**
|
|
1798
|
+
* Who may approve or reject promotions into this environment. With no
|
|
1799
|
+
* role and no users, any project maintainer may.
|
|
1800
|
+
*/
|
|
1801
|
+
approvers: EnvironmentApprovers;
|
|
1756
1802
|
created_at: number;
|
|
1757
1803
|
id: string;
|
|
1758
1804
|
/**
|
|
@@ -2823,6 +2869,7 @@ export type UpdatePipelineRequest = {
|
|
|
2823
2869
|
*/
|
|
2824
2870
|
export type UpdateProjectEnvironmentRequest = {
|
|
2825
2871
|
approval_required?: boolean | null;
|
|
2872
|
+
approvers?: null | EnvironmentApproversInput;
|
|
2826
2873
|
name?: string | null;
|
|
2827
2874
|
position?: number | null;
|
|
2828
2875
|
rollout_policy?: null | ReleasePolicy;
|
|
@@ -6342,7 +6389,7 @@ export type ApprovePromotionData = {
|
|
|
6342
6389
|
};
|
|
6343
6390
|
export type ApprovePromotionErrors = {
|
|
6344
6391
|
/**
|
|
6345
|
-
*
|
|
6392
|
+
* Not one of the environment's approvers, or an API token
|
|
6346
6393
|
*/
|
|
6347
6394
|
403: ApiError;
|
|
6348
6395
|
/**
|
|
@@ -6386,7 +6433,7 @@ export type RejectPromotionData = {
|
|
|
6386
6433
|
};
|
|
6387
6434
|
export type RejectPromotionErrors = {
|
|
6388
6435
|
/**
|
|
6389
|
-
*
|
|
6436
|
+
* Not one of the environment's approvers, or an API token
|
|
6390
6437
|
*/
|
|
6391
6438
|
403: ApiError;
|
|
6392
6439
|
/**
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const vCreateProjectEnvironmentBody: v.ObjectSchema<{
|
|
3
3
|
readonly approval_required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
4
|
+
readonly approvers: v.NullishSchema<v.ObjectSchema<{
|
|
5
|
+
readonly role: v.NullishSchema<v.PicklistSchema<["maintainer", "developer"], undefined>, undefined>;
|
|
6
|
+
readonly user_ids: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
7
|
+
}, undefined>, undefined>;
|
|
4
8
|
readonly key: v.StringSchema<undefined>;
|
|
5
9
|
readonly name: v.StringSchema<undefined>;
|
|
6
10
|
readonly rollout_policy: v.NullishSchema<v.ObjectSchema<{
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const vCreateProjectEnvironmentRequest: v.ObjectSchema<{
|
|
3
3
|
readonly approval_required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
4
|
+
readonly approvers: v.NullishSchema<v.ObjectSchema<{
|
|
5
|
+
readonly role: v.NullishSchema<v.PicklistSchema<["maintainer", "developer"], undefined>, undefined>;
|
|
6
|
+
readonly user_ids: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
7
|
+
}, undefined>, undefined>;
|
|
4
8
|
readonly key: v.StringSchema<undefined>;
|
|
5
9
|
readonly name: v.StringSchema<undefined>;
|
|
6
10
|
readonly rollout_policy: v.NullishSchema<v.ObjectSchema<{
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// Generated by scripts/generate-valibot-modules.ts. Do not edit.
|
|
2
2
|
import * as v from 'valibot';
|
|
3
|
+
import { vEnvironmentApproversInput } from './v-environment-approvers-input.js';
|
|
3
4
|
import { vReleasePolicy } from './v-release-policy.js';
|
|
4
5
|
import { vReleaseStore } from './v-release-store.js';
|
|
5
6
|
export const vCreateProjectEnvironmentRequest = v.object({
|
|
6
7
|
approval_required: v.optional(v.boolean()),
|
|
8
|
+
approvers: v.nullish(vEnvironmentApproversInput),
|
|
7
9
|
key: v.string(),
|
|
8
10
|
name: v.string(),
|
|
9
11
|
rollout_policy: v.nullish(vReleasePolicy),
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const vCreateProjectEnvironmentResponse: v.ObjectSchema<{
|
|
3
3
|
readonly approval_required: v.BooleanSchema<undefined>;
|
|
4
|
+
readonly approvers: v.ObjectSchema<{
|
|
5
|
+
readonly role: v.NullishSchema<v.PicklistSchema<["maintainer", "developer"], undefined>, undefined>;
|
|
6
|
+
readonly users: v.ArraySchema<v.ObjectSchema<{
|
|
7
|
+
readonly email: v.StringSchema<undefined>;
|
|
8
|
+
readonly user_id: v.StringSchema<undefined>;
|
|
9
|
+
}, undefined>, undefined>;
|
|
10
|
+
}, undefined>;
|
|
4
11
|
readonly created_at: v.SchemaWithPipe<readonly [v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>, v.BigintSchema<undefined>], undefined>, v.TransformAction<string | number | bigint, bigint>, v.MinValueAction<bigint, bigint, "Invalid value: Expected int64 to be >= -9223372036854775808">, v.MaxValueAction<bigint, bigint, "Invalid value: Expected int64 to be <= 9223372036854775807">]>;
|
|
5
12
|
readonly id: v.StringSchema<undefined>;
|
|
6
13
|
readonly key: v.StringSchema<undefined>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const vEnvironmentApproversInput: v.ObjectSchema<{
|
|
3
|
+
readonly role: v.NullishSchema<v.PicklistSchema<["maintainer", "developer"], undefined>, undefined>;
|
|
4
|
+
readonly user_ids: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
5
|
+
}, undefined>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Generated by scripts/generate-valibot-modules.ts. Do not edit.
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { vApproverRole } from './v-approver-role.js';
|
|
4
|
+
export const vEnvironmentApproversInput = v.object({
|
|
5
|
+
role: v.nullish(vApproverRole),
|
|
6
|
+
user_ids: v.optional(v.array(v.string()))
|
|
7
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const vEnvironmentApprovers: v.ObjectSchema<{
|
|
3
|
+
readonly role: v.NullishSchema<v.PicklistSchema<["maintainer", "developer"], undefined>, undefined>;
|
|
4
|
+
readonly users: v.ArraySchema<v.ObjectSchema<{
|
|
5
|
+
readonly email: v.StringSchema<undefined>;
|
|
6
|
+
readonly user_id: v.StringSchema<undefined>;
|
|
7
|
+
}, undefined>, undefined>;
|
|
8
|
+
}, undefined>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Generated by scripts/generate-valibot-modules.ts. Do not edit.
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { vApproverRole } from './v-approver-role.js';
|
|
4
|
+
import { vEnvironmentApprover } from './v-environment-approver.js';
|
|
5
|
+
export const vEnvironmentApprovers = v.object({
|
|
6
|
+
role: v.nullish(vApproverRole),
|
|
7
|
+
users: v.array(vEnvironmentApprover)
|
|
8
|
+
});
|
|
@@ -2,6 +2,13 @@ import * as v from 'valibot';
|
|
|
2
2
|
export declare const vListProjectEnvironmentsResponse: v.ObjectSchema<{
|
|
3
3
|
readonly environments: v.ArraySchema<v.ObjectSchema<{
|
|
4
4
|
readonly approval_required: v.BooleanSchema<undefined>;
|
|
5
|
+
readonly approvers: v.ObjectSchema<{
|
|
6
|
+
readonly role: v.NullishSchema<v.PicklistSchema<["maintainer", "developer"], undefined>, undefined>;
|
|
7
|
+
readonly users: v.ArraySchema<v.ObjectSchema<{
|
|
8
|
+
readonly email: v.StringSchema<undefined>;
|
|
9
|
+
readonly user_id: v.StringSchema<undefined>;
|
|
10
|
+
}, undefined>, undefined>;
|
|
11
|
+
}, undefined>;
|
|
5
12
|
readonly created_at: v.SchemaWithPipe<readonly [v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>, v.BigintSchema<undefined>], undefined>, v.TransformAction<string | number | bigint, bigint>, v.MinValueAction<bigint, bigint, "Invalid value: Expected int64 to be >= -9223372036854775808">, v.MaxValueAction<bigint, bigint, "Invalid value: Expected int64 to be <= 9223372036854775807">]>;
|
|
6
13
|
readonly id: v.StringSchema<undefined>;
|
|
7
14
|
readonly key: v.StringSchema<undefined>;
|
|
@@ -2,6 +2,13 @@ import * as v from 'valibot';
|
|
|
2
2
|
export declare const vListProjectEnvironmentsResponse2: v.ObjectSchema<{
|
|
3
3
|
readonly environments: v.ArraySchema<v.ObjectSchema<{
|
|
4
4
|
readonly approval_required: v.BooleanSchema<undefined>;
|
|
5
|
+
readonly approvers: v.ObjectSchema<{
|
|
6
|
+
readonly role: v.NullishSchema<v.PicklistSchema<["maintainer", "developer"], undefined>, undefined>;
|
|
7
|
+
readonly users: v.ArraySchema<v.ObjectSchema<{
|
|
8
|
+
readonly email: v.StringSchema<undefined>;
|
|
9
|
+
readonly user_id: v.StringSchema<undefined>;
|
|
10
|
+
}, undefined>, undefined>;
|
|
11
|
+
}, undefined>;
|
|
5
12
|
readonly created_at: v.SchemaWithPipe<readonly [v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>, v.BigintSchema<undefined>], undefined>, v.TransformAction<string | number | bigint, bigint>, v.MinValueAction<bigint, bigint, "Invalid value: Expected int64 to be >= -9223372036854775808">, v.MaxValueAction<bigint, bigint, "Invalid value: Expected int64 to be <= 9223372036854775807">]>;
|
|
6
13
|
readonly id: v.StringSchema<undefined>;
|
|
7
14
|
readonly key: v.StringSchema<undefined>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const vProjectEnvironment: v.ObjectSchema<{
|
|
3
3
|
readonly approval_required: v.BooleanSchema<undefined>;
|
|
4
|
+
readonly approvers: v.ObjectSchema<{
|
|
5
|
+
readonly role: v.NullishSchema<v.PicklistSchema<["maintainer", "developer"], undefined>, undefined>;
|
|
6
|
+
readonly users: v.ArraySchema<v.ObjectSchema<{
|
|
7
|
+
readonly email: v.StringSchema<undefined>;
|
|
8
|
+
readonly user_id: v.StringSchema<undefined>;
|
|
9
|
+
}, undefined>, undefined>;
|
|
10
|
+
}, undefined>;
|
|
4
11
|
readonly created_at: v.SchemaWithPipe<readonly [v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>, v.BigintSchema<undefined>], undefined>, v.TransformAction<string | number | bigint, bigint>, v.MinValueAction<bigint, bigint, "Invalid value: Expected int64 to be >= -9223372036854775808">, v.MaxValueAction<bigint, bigint, "Invalid value: Expected int64 to be <= 9223372036854775807">]>;
|
|
5
12
|
readonly id: v.StringSchema<undefined>;
|
|
6
13
|
readonly key: v.StringSchema<undefined>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// Generated by scripts/generate-valibot-modules.ts. Do not edit.
|
|
2
2
|
import * as v from 'valibot';
|
|
3
|
+
import { vEnvironmentApprovers } from './v-environment-approvers.js';
|
|
3
4
|
import { vRelease } from './v-release.js';
|
|
4
5
|
import { vReleasePolicy } from './v-release-policy.js';
|
|
5
6
|
import { vReleaseStore } from './v-release-store.js';
|
|
6
7
|
export const vProjectEnvironment = v.object({
|
|
7
8
|
approval_required: v.boolean(),
|
|
9
|
+
approvers: vEnvironmentApprovers,
|
|
8
10
|
created_at: v.pipe(v.union([
|
|
9
11
|
v.number(),
|
|
10
12
|
v.string(),
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const vUpdateProjectEnvironmentBody: v.ObjectSchema<{
|
|
3
3
|
readonly approval_required: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
4
|
+
readonly approvers: v.NullishSchema<v.ObjectSchema<{
|
|
5
|
+
readonly role: v.NullishSchema<v.PicklistSchema<["maintainer", "developer"], undefined>, undefined>;
|
|
6
|
+
readonly user_ids: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
7
|
+
}, undefined>, undefined>;
|
|
4
8
|
readonly name: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
5
9
|
readonly position: v.NullishSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>, v.BigintSchema<undefined>], undefined>, v.TransformAction<string | number | bigint, bigint>, v.MinValueAction<bigint, bigint, "Invalid value: Expected int64 to be >= -9223372036854775808">, v.MaxValueAction<bigint, bigint, "Invalid value: Expected int64 to be <= 9223372036854775807">]>, undefined>;
|
|
6
10
|
readonly rollout_policy: v.NullishSchema<v.ObjectSchema<{
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const vUpdateProjectEnvironmentRequest: v.ObjectSchema<{
|
|
3
3
|
readonly approval_required: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
4
|
+
readonly approvers: v.NullishSchema<v.ObjectSchema<{
|
|
5
|
+
readonly role: v.NullishSchema<v.PicklistSchema<["maintainer", "developer"], undefined>, undefined>;
|
|
6
|
+
readonly user_ids: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
7
|
+
}, undefined>, undefined>;
|
|
4
8
|
readonly name: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
5
9
|
readonly position: v.NullishSchema<v.SchemaWithPipe<readonly [v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>, v.BigintSchema<undefined>], undefined>, v.TransformAction<string | number | bigint, bigint>, v.MinValueAction<bigint, bigint, "Invalid value: Expected int64 to be >= -9223372036854775808">, v.MaxValueAction<bigint, bigint, "Invalid value: Expected int64 to be <= 9223372036854775807">]>, undefined>;
|
|
6
10
|
readonly rollout_policy: v.NullishSchema<v.ObjectSchema<{
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Generated by scripts/generate-valibot-modules.ts. Do not edit.
|
|
2
2
|
import * as v from 'valibot';
|
|
3
|
+
import { vEnvironmentApproversInput } from './v-environment-approvers-input.js';
|
|
3
4
|
import { vReleasePolicy } from './v-release-policy.js';
|
|
4
5
|
export const vUpdateProjectEnvironmentRequest = v.object({
|
|
5
6
|
approval_required: v.nullish(v.boolean()),
|
|
7
|
+
approvers: v.nullish(vEnvironmentApproversInput),
|
|
6
8
|
name: v.nullish(v.string()),
|
|
7
9
|
position: v.nullish(v.pipe(v.union([
|
|
8
10
|
v.number(),
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const vUpdateProjectEnvironmentResponse: v.ObjectSchema<{
|
|
3
3
|
readonly approval_required: v.BooleanSchema<undefined>;
|
|
4
|
+
readonly approvers: v.ObjectSchema<{
|
|
5
|
+
readonly role: v.NullishSchema<v.PicklistSchema<["maintainer", "developer"], undefined>, undefined>;
|
|
6
|
+
readonly users: v.ArraySchema<v.ObjectSchema<{
|
|
7
|
+
readonly email: v.StringSchema<undefined>;
|
|
8
|
+
readonly user_id: v.StringSchema<undefined>;
|
|
9
|
+
}, undefined>, undefined>;
|
|
10
|
+
}, undefined>;
|
|
4
11
|
readonly created_at: v.SchemaWithPipe<readonly [v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>, v.BigintSchema<undefined>], undefined>, v.TransformAction<string | number | bigint, bigint>, v.MinValueAction<bigint, bigint, "Invalid value: Expected int64 to be >= -9223372036854775808">, v.MaxValueAction<bigint, bigint, "Invalid value: Expected int64 to be <= 9223372036854775807">]>;
|
|
5
12
|
readonly id: v.StringSchema<undefined>;
|
|
6
13
|
readonly key: v.StringSchema<undefined>;
|
package/dist/valibot.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { vAppStoreReleaseNote } from './generated/valibot/v-app-store-release-no
|
|
|
9
9
|
export { vAppStorePublishConfig } from './generated/valibot/v-app-store-publish-config.js';
|
|
10
10
|
export { vAppendBuildLogsResponse } from './generated/valibot/v-append-build-logs-response.js';
|
|
11
11
|
export { vApprovalPolicy } from './generated/valibot/v-approval-policy.js';
|
|
12
|
+
export { vApproverRole } from './generated/valibot/v-approver-role.js';
|
|
12
13
|
export { vArtifactDownloadLinkResponse } from './generated/valibot/v-artifact-download-link-response.js';
|
|
13
14
|
export { vArtifactDownloadTokenSummary } from './generated/valibot/v-artifact-download-token-summary.js';
|
|
14
15
|
export { vArtifactInstallPlatform } from './generated/valibot/v-artifact-install-platform.js';
|
|
@@ -67,6 +68,9 @@ export { vCreateScopedDownloadTokenResponse } from './generated/valibot/v-create
|
|
|
67
68
|
export { vCreateSecretRequest } from './generated/valibot/v-create-secret-request.js';
|
|
68
69
|
export { vDeleteNotificationChannelResponse } from './generated/valibot/v-delete-notification-channel-response.js';
|
|
69
70
|
export { vDurationPercentiles } from './generated/valibot/v-duration-percentiles.js';
|
|
71
|
+
export { vEnvironmentApprover } from './generated/valibot/v-environment-approver.js';
|
|
72
|
+
export { vEnvironmentApprovers } from './generated/valibot/v-environment-approvers.js';
|
|
73
|
+
export { vEnvironmentApproversInput } from './generated/valibot/v-environment-approvers-input.js';
|
|
70
74
|
export { vEventStreamReady } from './generated/valibot/v-event-stream-ready.js';
|
|
71
75
|
export { vEventStreamResync } from './generated/valibot/v-event-stream-resync.js';
|
|
72
76
|
export { vExportPipelineYamlResponse } from './generated/valibot/v-export-pipeline-yaml-response.js';
|
package/dist/valibot.js
CHANGED
|
@@ -10,6 +10,7 @@ export { vAppStoreReleaseNote } from './generated/valibot/v-app-store-release-no
|
|
|
10
10
|
export { vAppStorePublishConfig } from './generated/valibot/v-app-store-publish-config.js';
|
|
11
11
|
export { vAppendBuildLogsResponse } from './generated/valibot/v-append-build-logs-response.js';
|
|
12
12
|
export { vApprovalPolicy } from './generated/valibot/v-approval-policy.js';
|
|
13
|
+
export { vApproverRole } from './generated/valibot/v-approver-role.js';
|
|
13
14
|
export { vArtifactDownloadLinkResponse } from './generated/valibot/v-artifact-download-link-response.js';
|
|
14
15
|
export { vArtifactDownloadTokenSummary } from './generated/valibot/v-artifact-download-token-summary.js';
|
|
15
16
|
export { vArtifactInstallPlatform } from './generated/valibot/v-artifact-install-platform.js';
|
|
@@ -68,6 +69,9 @@ export { vCreateScopedDownloadTokenResponse } from './generated/valibot/v-create
|
|
|
68
69
|
export { vCreateSecretRequest } from './generated/valibot/v-create-secret-request.js';
|
|
69
70
|
export { vDeleteNotificationChannelResponse } from './generated/valibot/v-delete-notification-channel-response.js';
|
|
70
71
|
export { vDurationPercentiles } from './generated/valibot/v-duration-percentiles.js';
|
|
72
|
+
export { vEnvironmentApprover } from './generated/valibot/v-environment-approver.js';
|
|
73
|
+
export { vEnvironmentApprovers } from './generated/valibot/v-environment-approvers.js';
|
|
74
|
+
export { vEnvironmentApproversInput } from './generated/valibot/v-environment-approvers-input.js';
|
|
71
75
|
export { vEventStreamReady } from './generated/valibot/v-event-stream-ready.js';
|
|
72
76
|
export { vEventStreamResync } from './generated/valibot/v-event-stream-resync.js';
|
|
73
77
|
export { vExportPipelineYamlResponse } from './generated/valibot/v-export-pipeline-yaml-response.js';
|
package/openapi/openapi.json
CHANGED
|
@@ -7152,7 +7152,7 @@
|
|
|
7152
7152
|
"Environments"
|
|
7153
7153
|
],
|
|
7154
7154
|
"summary": "Approve promotion",
|
|
7155
|
-
"description": "Approves a pending promotion and makes the store change as the approver. Requires the maintainer
|
|
7155
|
+
"description": "Approves a pending promotion and makes the store change as the approver. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.",
|
|
7156
7156
|
"operationId": "approve_promotion",
|
|
7157
7157
|
"parameters": [
|
|
7158
7158
|
{
|
|
@@ -7203,7 +7203,7 @@
|
|
|
7203
7203
|
}
|
|
7204
7204
|
},
|
|
7205
7205
|
"403": {
|
|
7206
|
-
"description": "
|
|
7206
|
+
"description": "Not one of the environment's approvers, or an API token",
|
|
7207
7207
|
"content": {
|
|
7208
7208
|
"application/json": {
|
|
7209
7209
|
"schema": {
|
|
@@ -7256,7 +7256,7 @@
|
|
|
7256
7256
|
"Environments"
|
|
7257
7257
|
],
|
|
7258
7258
|
"summary": "Reject promotion",
|
|
7259
|
-
"description": "Rejects a pending promotion; nothing changes at the store. Requires the maintainer
|
|
7259
|
+
"description": "Rejects a pending promotion; nothing changes at the store. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.",
|
|
7260
7260
|
"operationId": "reject_promotion",
|
|
7261
7261
|
"parameters": [
|
|
7262
7262
|
{
|
|
@@ -7307,7 +7307,7 @@
|
|
|
7307
7307
|
}
|
|
7308
7308
|
},
|
|
7309
7309
|
"403": {
|
|
7310
|
-
"description": "
|
|
7310
|
+
"description": "Not one of the environment's approvers, or an API token",
|
|
7311
7311
|
"content": {
|
|
7312
7312
|
"application/json": {
|
|
7313
7313
|
"schema": {
|
|
@@ -13499,6 +13499,14 @@
|
|
|
13499
13499
|
},
|
|
13500
13500
|
"additionalProperties": false
|
|
13501
13501
|
},
|
|
13502
|
+
"ApproverRole": {
|
|
13503
|
+
"type": "string",
|
|
13504
|
+
"description": "The lowest project role that may approve promotions into an environment.",
|
|
13505
|
+
"enum": [
|
|
13506
|
+
"maintainer",
|
|
13507
|
+
"developer"
|
|
13508
|
+
]
|
|
13509
|
+
},
|
|
13502
13510
|
"Artifact": {
|
|
13503
13511
|
"type": "object",
|
|
13504
13512
|
"required": [
|
|
@@ -15503,6 +15511,17 @@
|
|
|
15503
15511
|
"approval_required": {
|
|
15504
15512
|
"type": "boolean"
|
|
15505
15513
|
},
|
|
15514
|
+
"approvers": {
|
|
15515
|
+
"oneOf": [
|
|
15516
|
+
{
|
|
15517
|
+
"type": "null"
|
|
15518
|
+
},
|
|
15519
|
+
{
|
|
15520
|
+
"$ref": "#/components/schemas/EnvironmentApproversInput",
|
|
15521
|
+
"description": "Who may approve promotions. Defaults to any project maintainer."
|
|
15522
|
+
}
|
|
15523
|
+
]
|
|
15524
|
+
},
|
|
15506
15525
|
"key": {
|
|
15507
15526
|
"type": "string"
|
|
15508
15527
|
},
|
|
@@ -15840,6 +15859,72 @@
|
|
|
15840
15859
|
}
|
|
15841
15860
|
}
|
|
15842
15861
|
},
|
|
15862
|
+
"EnvironmentApprover": {
|
|
15863
|
+
"type": "object",
|
|
15864
|
+
"description": "A project member named as an approver.",
|
|
15865
|
+
"required": [
|
|
15866
|
+
"user_id",
|
|
15867
|
+
"email"
|
|
15868
|
+
],
|
|
15869
|
+
"properties": {
|
|
15870
|
+
"email": {
|
|
15871
|
+
"type": "string"
|
|
15872
|
+
},
|
|
15873
|
+
"user_id": {
|
|
15874
|
+
"type": "string"
|
|
15875
|
+
}
|
|
15876
|
+
}
|
|
15877
|
+
},
|
|
15878
|
+
"EnvironmentApprovers": {
|
|
15879
|
+
"type": "object",
|
|
15880
|
+
"description": "Who may approve or reject promotions into an environment.\n\nA member may decide when their project role is at least `role`, or when\nthey are one of `users` (developers and maintainers only). With no role\nand no users, any project maintainer may decide, as before approvers\nexisted. Instance owners and admins may always decide. API tokens never\ndecide: approvals are interactive.",
|
|
15881
|
+
"required": [
|
|
15882
|
+
"users"
|
|
15883
|
+
],
|
|
15884
|
+
"properties": {
|
|
15885
|
+
"role": {
|
|
15886
|
+
"oneOf": [
|
|
15887
|
+
{
|
|
15888
|
+
"type": "null"
|
|
15889
|
+
},
|
|
15890
|
+
{
|
|
15891
|
+
"$ref": "#/components/schemas/ApproverRole",
|
|
15892
|
+
"description": "A developer role lets developers and maintainers approve."
|
|
15893
|
+
}
|
|
15894
|
+
]
|
|
15895
|
+
},
|
|
15896
|
+
"users": {
|
|
15897
|
+
"type": "array",
|
|
15898
|
+
"items": {
|
|
15899
|
+
"$ref": "#/components/schemas/EnvironmentApprover"
|
|
15900
|
+
},
|
|
15901
|
+
"description": "Project members named as approvers. A user who leaves the project,\nor becomes a viewer, stops counting."
|
|
15902
|
+
}
|
|
15903
|
+
}
|
|
15904
|
+
},
|
|
15905
|
+
"EnvironmentApproversInput": {
|
|
15906
|
+
"type": "object",
|
|
15907
|
+
"description": "Approvers to set on an environment. Replaces the whole set; send an empty\nobject to go back to \"any maintainer\".",
|
|
15908
|
+
"properties": {
|
|
15909
|
+
"role": {
|
|
15910
|
+
"oneOf": [
|
|
15911
|
+
{
|
|
15912
|
+
"type": "null"
|
|
15913
|
+
},
|
|
15914
|
+
{
|
|
15915
|
+
"$ref": "#/components/schemas/ApproverRole"
|
|
15916
|
+
}
|
|
15917
|
+
]
|
|
15918
|
+
},
|
|
15919
|
+
"user_ids": {
|
|
15920
|
+
"type": "array",
|
|
15921
|
+
"items": {
|
|
15922
|
+
"type": "string"
|
|
15923
|
+
},
|
|
15924
|
+
"description": "User ids of project members who are developers or maintainers. At\nmost 20."
|
|
15925
|
+
}
|
|
15926
|
+
}
|
|
15927
|
+
},
|
|
15843
15928
|
"EnvironmentPromotion": {
|
|
15844
15929
|
"type": "object",
|
|
15845
15930
|
"description": "A request to put an existing build into an environment.",
|
|
@@ -18999,6 +19084,7 @@
|
|
|
18999
19084
|
"store",
|
|
19000
19085
|
"track",
|
|
19001
19086
|
"approval_required",
|
|
19087
|
+
"approvers",
|
|
19002
19088
|
"rollout_policy",
|
|
19003
19089
|
"promotable",
|
|
19004
19090
|
"created_at",
|
|
@@ -19007,7 +19093,11 @@
|
|
|
19007
19093
|
"properties": {
|
|
19008
19094
|
"approval_required": {
|
|
19009
19095
|
"type": "boolean",
|
|
19010
|
-
"description": "A promotion into this environment waits for
|
|
19096
|
+
"description": "A promotion into this environment waits for an approval before\nanything changes at the store. `approvers` says who may give it."
|
|
19097
|
+
},
|
|
19098
|
+
"approvers": {
|
|
19099
|
+
"$ref": "#/components/schemas/EnvironmentApprovers",
|
|
19100
|
+
"description": "Who may approve or reject promotions into this environment. With no\nrole and no users, any project maintainer may."
|
|
19011
19101
|
},
|
|
19012
19102
|
"created_at": {
|
|
19013
19103
|
"type": "integer",
|
|
@@ -22498,6 +22588,17 @@
|
|
|
22498
22588
|
"null"
|
|
22499
22589
|
]
|
|
22500
22590
|
},
|
|
22591
|
+
"approvers": {
|
|
22592
|
+
"oneOf": [
|
|
22593
|
+
{
|
|
22594
|
+
"type": "null"
|
|
22595
|
+
},
|
|
22596
|
+
{
|
|
22597
|
+
"$ref": "#/components/schemas/EnvironmentApproversInput",
|
|
22598
|
+
"description": "Replaces who may approve promotions; leave out (or send null) to keep\nthem."
|
|
22599
|
+
}
|
|
22600
|
+
]
|
|
22601
|
+
},
|
|
22501
22602
|
"name": {
|
|
22502
22603
|
"type": [
|
|
22503
22604
|
"string",
|