import * as API from "@distilled.cloud/core/api"; import * as C from "@distilled.cloud/core/category"; // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-stackit). Do not edit. import * as S from "@distilled.cloud/core/schema-lite"; import * as __L from "@distilled.cloud/core/schema-lite"; import type * as Redacted from "effect/Redacted"; import { StackitServiceErrors } from "../errors.ts"; import { StackitProtocol, type StackitOpError, type StackitOpContext } from "../protocol.ts"; import * as Retry from "../retry.ts"; import * as T from "../traits.ts"; // Schema table, filled on first reach (see __S at the end). const __s: any[] = []; export type { StackitOpError, StackitOpContext }; /** Span facts shared by every operation (com.distilled.telemetry#service). */ const TELEMETRY = { system: "stackit-api", responseHeaders: [ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" }, { header: "request-id", name: "http.response.header.request-id", transform: "list" }, ], prefix: "STACKIT", service: "SecretsManager", labels: "stackit", propagate: "w3c", } as const; export class BadRequest extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("BadRequest", { code: S.Number, message: S.String, body: /*@__PURE__*/ S.optional( /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(0, __c0, 0)), S.String]), ), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withBadRequestError), [{ status: 400 }], ) { declare readonly body?: BadRequest2 | string; } export class Conflict extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Conflict", { code: S.Number, message: S.String, body: /*@__PURE__*/ S.optional( /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(0, __c0, 0)), S.String]), ), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withConflictError), [{ status: 409 }], ) { declare readonly body?: Conflict2 | string; } export class NotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("NotFound", { code: S.Number, message: S.String, body: /*@__PURE__*/ S.optional( /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(0, __c0, 0)), S.String]), ), headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)), }).pipe(C.withBadRequestError), [{ status: 404 }], ) { declare readonly body?: NotFound2 | string; } export interface CreateACLRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The given IP/IP Range that is permitted to access. */ cidr: string; } export interface ACL { /** The given IP/IP Range that is permitted to access. */ cidr: string; /** A auto generated unique id which identifies the acl. */ id: string; } export interface CreateApproleRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** A user chosen description to differentiate between multiple approles. */ description?: string | undefined; secret_id_num_uses?: number | undefined; /** Token TTL in time.Duration format (eg 15m for 15 minutes, 1h for 1 hour). */ secret_id_ttl?: string | undefined; /** Is true if the approle has write access to the secrets engine. Is false for a read-only approle. */ write?: boolean | undefined; } export interface Approle { /** A user chosen description to differentiate between multiple approles. */ description: string; /** Identifier used for authentication */ role_id: string; secret_id_num_uses: number; /** Token TTL in time.Duration format (eg 15m for 15 minutes, 1h for 1 hour). */ secret_id_ttl: string; /** Is true if the approle has write access to the secrets engine. Is false for a read-only approle. */ write: boolean; } export interface CreateApproleSecretIdRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The approle with permissions on the Secrets Manager instance. */ roleId: string; /** A user chosen description to differentiate between multiple approle secrets. */ description?: string | undefined; } export interface ApproleSecret { /** A user chosen description to differentiate between multiple approle secrets. */ description: string; num_uses: number; /** Identifier used for authentication, returned only at creation */ secret_id?: string | undefined; /** Token TTL in time.Duration format (eg 15m for 15 minutes, 1h for 1 hour). */ ttl: string; /** Accessor used for handling secrets */ version: number; } /** The key for secret encryption and decryption. */ export interface KmsKeyPayload { /** The key UUID. */ keyId: string; /** The key ring UUID the key is part of. */ keyRingId: string; /** The Key version number. */ keyVersion: number; /** The Service account email that will consume the key. Must be in the same project as the Secrets Manager instance. */ serviceAccountEmail: string; } export interface CreateInstanceRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; kmsKey?: KmsKeyPayload | undefined; /** A user chosen name to distinguish multiple secrets manager instances. */ name: string; } export interface Instance { /** The API endpoint for connecting to the secrets engine. */ apiUrl: string; /** The date and time the creation of the Secrets Manager instance was finished. */ creationFinishedDate?: string | undefined; /** The date and time the creation of the Secrets Manager instance was triggered. */ creationStartDate: string; /** A auto generated unique id which identifies the secrets manager instances. */ id: string; kmsKey?: KmsKeyPayload | undefined; /** A user chosen name to distinguish multiple secrets manager instances. */ name: string; /** The number of secrets currently stored inside of the instance. This value will be updated once per hour. */ secretCount: number; /** The name of the secrets engine. */ secretsEngine: string; /** The current state of the Secrets Manager instance. */ state: string; updateFinishedDate?: string | undefined; updateStartDate?: string | undefined; } export interface CreateUserRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** A user chosen description to differentiate between multiple users. */ description: string; /** Is true if the user has write access to the secrets engine. Is false for a read-only user. */ write: boolean; } export interface User { /** A user chosen description to differentiate between multiple users. */ description: string; /** A auto generated unique id which identifies the users. */ id: string; /** A auto generated password for logging in with the user. */ password: string | Redacted.Redacted; /** A auto generated username for logging in with the user. */ username: string; /** Is true if the user has write access to the secrets engine. Is false for a read-only user. */ write: boolean; } export interface DeleteACLRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The acl UUID of the Secrets Manager instance. */ aclId: string; } export interface DeleteACLResponse {} export interface DeleteApproleRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The approle with permissions on the Secrets Manager instance. */ roleId: string; } export interface DeleteApproleResponse {} export interface DeleteApproleSecretIdRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The approle with permissions on the Secrets Manager instance. */ roleId: string; /** The version of the secret id. */ secretIdVersion: number; } export interface DeleteApproleSecretIdResponse {} export interface DeleteInstanceRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; } export interface DeleteInstanceResponse {} export interface DeleteUserRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The user UUID with permissions on the Secrets Manager instance. */ userId: string; } export interface DeleteUserResponse {} export interface GetACLRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The acl UUID of the Secrets Manager instance. */ aclId: string; } export interface GetApproleRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The approle with permissions on the Secrets Manager instance. */ roleId: string; } export interface GetApprolesRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; } export type ApproleListApprolesList = Array; export interface ApproleList { approles: ApproleListApprolesList; } export interface GetApproleSecretIdRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The approle with permissions on the Secrets Manager instance. */ roleId: string; /** The version of the secret id. */ secretIdVersion: number; } export interface GetInstanceRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; } export interface GetUserRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The user UUID with permissions on the Secrets Manager instance. */ userId: string; } export interface ListACLsRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; } export type ListACLsResponseAclsList = Array; export interface ListACLsResponse { acls: ListACLsResponseAclsList; } export interface ListApproleSecretIdsRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The approle with permissions on the Secrets Manager instance. */ roleId: string; } export type ApproleSecretListSecretIdsList = Array; export interface ApproleSecretList { secretIds: ApproleSecretListSecretIdsList; } export interface ListInstancesRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; } export type ListInstancesResponseInstancesList = Array; export interface ListInstancesResponse { instances: ListInstancesResponseInstancesList; } export interface ListUsersRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; } export type ListUsersResponseUsersList = Array; export interface ListUsersResponse { users: ListUsersResponseUsersList; } export interface UpdateACLRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The acl UUID of the Secrets Manager instance. */ aclId: string; /** The given IP/IP Range that is permitted to access. */ cidr: string; } export interface UpdateACLResponse {} export interface UpdateACLPayload { /** The given IP/IP Range that is permitted to access. */ cidr: string; } export type UpdateACLsRequestCidrsList = Array; export interface UpdateACLsRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; cidrs?: UpdateACLsRequestCidrsList | undefined; } export interface UpdateACLsResponse {} export interface UpdateApproleRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The approle with permissions on the Secrets Manager instance. */ roleId: string; /** A user chosen description to differentiate between multiple approles. */ description?: string | undefined; secret_id_num_uses?: number | undefined; /** Token TTL in time.Duration format (eg 15m for 15 minutes, 1h for 1 hour). */ secret_id_ttl?: string | undefined; /** Is true if the approle has write access to the secrets engine. Is false for a read-only approle. */ write?: boolean | undefined; } export interface UpdateApproleSecretIdRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The approle with permissions on the Secrets Manager instance. */ roleId: string; /** The version of the secret id. */ secretIdVersion: number; /** A user chosen description to differentiate between multiple approle secrets. */ description?: string | undefined; } export interface UpdateInstanceRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; kmsKey?: KmsKeyPayload | undefined; /** A user chosen name to distinguish multiple secrets manager instances. */ name: string; } export interface UpdateInstanceResponse {} export interface UpdateUserRequest { /** The STACKIT portal project UUID the Secrets Manager instance is part of. */ projectId: string; /** The Secrets Manager instance UUID. */ instanceId: string; /** The user UUID with permissions on the Secrets Manager instance. */ userId: string; /** A user chosen description to differentiate between multiple users. */ description?: string | undefined; /** Is true if the user has write access to the secrets engine. Is false for a read-only user. */ write?: boolean | undefined; } export interface UpdateUserResponse {} export interface BadRequest2 { /** The error message for bad requests */ message: string; } export interface Conflict2 { /** The error message for conflicts */ message: string; } export interface NotFound2 { /** The error message for not found resources */ message: string; } export type CreateACLError = BadRequest | NotFound | Conflict | StackitOpError; /** Creates a new Secrets Manager acl within the project. */ export const createACL: API.OperationMethod< CreateACLRequest, ACL, CreateACLError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(80, __c20, 0) as any as S.Schema, output: __S(84, __c21, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateACL", })); export type CreateApproleError = BadRequest | NotFound | Conflict | StackitOpError; /** Creates a new approle for the given Secrets Manager instance. */ export const createApprole: API.OperationMethod< CreateApproleRequest, Approle, CreateApproleError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(88, __c22, 0) as any as S.Schema, output: __S(92, __c23, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateApprole", })); export type CreateApproleSecretIdError = BadRequest | NotFound | StackitOpError; /** Generate new secret id for the given approle. */ export const createApproleSecretId: API.OperationMethod< CreateApproleSecretIdRequest, ApproleSecret, CreateApproleSecretIdError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(96, __c24, 0) as any as S.Schema, output: __S(100, __c25, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateApproleSecretId", })); export type CreateInstanceError = BadRequest | StackitOpError; /** Creates a new Secrets Manager instance within the project. */ export const createInstance: API.OperationMethod< CreateInstanceRequest, Instance, CreateInstanceError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(104, __c26, 0) as any as S.Schema, output: __S(108, __c27, 0) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateInstance", })); export type CreateUserError = BadRequest | NotFound | Conflict | StackitOpError; /** Creates a new user for the given Secrets Manager instance. */ export const createUser: API.OperationMethod< CreateUserRequest, User, CreateUserError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(116, __c29, 0) as any as S.Schema, output: __S(120, __c30, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "CreateUser", })); export type DeleteACLError = BadRequest | NotFound | StackitOpError; /** Deletes the given acl. */ export const deleteACL: API.OperationMethod< DeleteACLRequest, DeleteACLResponse, DeleteACLError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(124, __c31, 0) as any as S.Schema, output: __S(128, __c32, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteACL", })); export type DeleteApproleError = BadRequest | NotFound | StackitOpError; /** Deletes the given approle. */ export const deleteApprole: API.OperationMethod< DeleteApproleRequest, DeleteApproleResponse, DeleteApproleError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(132, __c33, 0) as any as S.Schema, output: __S(128, __c32, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteApprole", })); export type DeleteApproleSecretIdError = BadRequest | NotFound | StackitOpError; /** Deletes the secret id by its given version. */ export const deleteApproleSecretId: API.OperationMethod< DeleteApproleSecretIdRequest, DeleteApproleSecretIdResponse, DeleteApproleSecretIdError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(4, __c1, 0) as any as S.Schema, output: __S(128, __c32, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteApproleSecretId", })); export type DeleteInstanceError = BadRequest | NotFound | StackitOpError; /** Deletes the given Secrets Manager instance. */ export const deleteInstance: API.OperationMethod< DeleteInstanceRequest, DeleteInstanceResponse, DeleteInstanceError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(8, __c2, 0) as any as S.Schema, output: __S(128, __c32, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteInstance", })); export type DeleteUserError = BadRequest | NotFound | StackitOpError; /** Deletes the given user. */ export const deleteUser: API.OperationMethod< DeleteUserRequest, DeleteUserResponse, DeleteUserError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(12, __c3, 0) as any as S.Schema, output: __S(128, __c32, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "DeleteUser", })); export type GetACLError = BadRequest | NotFound | StackitOpError; /** Returns the details for the given acl. */ export const getACL: API.OperationMethod = /*@__PURE__*/ API.make(() => ({ input: __S(16, __c4, 0) as any as S.Schema, output: __S(84, __c21, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetACL", })); export type GetApproleError = BadRequest | NotFound | StackitOpError; /** Returns the details for the given approle. */ export const getApprole: API.OperationMethod< GetApproleRequest, Approle, GetApproleError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(20, __c5, 0) as any as S.Schema, output: __S(92, __c23, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetApprole", })); export type GetApprolesError = BadRequest | NotFound | StackitOpError; /** Returns the approles for the given Secrets Manager instance. */ export const getApproles: API.OperationMethod< GetApprolesRequest, ApproleList, GetApprolesError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(24, __c6, 0) as any as S.Schema, output: __S(26, __c6, 2) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetApproles", })); export type GetApproleSecretIdError = BadRequest | NotFound | StackitOpError; /** Read the properties of a given secret id by its given version. */ export const getApproleSecretId: API.OperationMethod< GetApproleSecretIdRequest, ApproleSecret, GetApproleSecretIdError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(28, __c7, 0) as any as S.Schema, output: __S(100, __c25, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetApproleSecretId", })); export type GetInstanceError = BadRequest | NotFound | StackitOpError; /** Returns the details for the given Secrets Manager instance. */ export const getInstance: API.OperationMethod< GetInstanceRequest, Instance, GetInstanceError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(32, __c8, 0) as any as S.Schema, output: __S(108, __c27, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetInstance", })); export type GetUserError = BadRequest | NotFound | StackitOpError; /** Returns the details for the given user. */ export const getUser: API.OperationMethod = /*@__PURE__*/ API.make(() => ({ input: __S(36, __c9, 0) as any as S.Schema, output: __S(120, __c30, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "GetUser", })); export type ListACLsError = BadRequest | NotFound | StackitOpError; /** Returns the acls for the given Secrets Manager instance. */ export const listACLs: API.OperationMethod< ListACLsRequest, ListACLsResponse, ListACLsError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(40, __c10, 0) as any as S.Schema, output: __S(42, __c10, 2) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListACLs", })); export type ListApproleSecretIdsError = BadRequest | NotFound | StackitOpError; /** Returns the secret id list for the given Secrets Manager instance and approle. */ export const listApproleSecretIds: API.OperationMethod< ListApproleSecretIdsRequest, ApproleSecretList, ListApproleSecretIdsError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(44, __c11, 0) as any as S.Schema, output: __S(46, __c11, 2) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListApproleSecretIds", })); export type ListInstancesError = BadRequest | StackitOpError; /** Returns a list of all Secrets Manager instances within the project. */ export const listInstances: API.OperationMethod< ListInstancesRequest, ListInstancesResponse, ListInstancesError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(48, __c12, 0) as any as S.Schema, output: __S(50, __c12, 2) as any as S.Schema, errors: [BadRequest], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListInstances", })); export type ListUsersError = BadRequest | NotFound | StackitOpError; /** Returns the users for the given Secrets Manager instance. */ export const listUsers: API.OperationMethod< ListUsersRequest, ListUsersResponse, ListUsersError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(52, __c13, 0) as any as S.Schema, output: __S(54, __c13, 2) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "ListUsers", })); export type UpdateACLError = BadRequest | NotFound | StackitOpError; /** Updates the ip ranges for the acl. */ export const updateACL: API.OperationMethod< UpdateACLRequest, UpdateACLResponse, UpdateACLError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(56, __c14, 0) as any as S.Schema, output: __S(128, __c32, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "UpdateACL", })); export type UpdateACLsError = BadRequest | NotFound | Conflict | StackitOpError; /** Changes a list of ACLs within the project. */ export const updateACLs: API.OperationMethod< UpdateACLsRequest, UpdateACLsResponse, UpdateACLsError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(62, __c15, 2) as any as S.Schema, output: __S(128, __c32, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "UpdateACLs", })); export type UpdateApproleError = BadRequest | NotFound | StackitOpError; /** Updates the details for the given approle. */ export const updateApprole: API.OperationMethod< UpdateApproleRequest, Approle, UpdateApproleError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(64, __c16, 0) as any as S.Schema, output: __S(92, __c23, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "UpdateApprole", })); export type UpdateApproleSecretIdError = BadRequest | NotFound | StackitOpError; /** Update the description of a secret id by its given version. */ export const updateApproleSecretId: API.OperationMethod< UpdateApproleSecretIdRequest, ApproleSecret, UpdateApproleSecretIdError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(68, __c17, 0) as any as S.Schema, output: __S(100, __c25, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "UpdateApproleSecretId", })); export type UpdateInstanceError = BadRequest | NotFound | Conflict | StackitOpError; /** Updates the given Secrets Manager instance. */ export const updateInstance: API.OperationMethod< UpdateInstanceRequest, UpdateInstanceResponse, UpdateInstanceError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(72, __c18, 0) as any as S.Schema, output: __S(128, __c32, 0) as any as S.Schema, errors: [BadRequest, NotFound, Conflict], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "UpdateInstance", })); export type UpdateUserError = BadRequest | NotFound | StackitOpError; /** Updates the details for the given user. */ export const updateUser: API.OperationMethod< UpdateUserRequest, UpdateUserResponse, UpdateUserError, StackitOpContext > = /*@__PURE__*/ API.make(() => ({ input: __S(76, __c19, 0) as any as S.Schema, output: __S(128, __c32, 0) as any as S.Schema, errors: [BadRequest, NotFound], serviceErrors: StackitServiceErrors, protocol: StackitProtocol, retry: Retry.Retry, telemetry: TELEMETRY, span: "UpdateUser", })); // Schema builders: each runs one schema initializer, on that schema's first use. function __c0(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ message: S.String, }), ).annotate({ identifier: "BadRequest2" }); } } function __c1(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), roleId: S.String.pipe(T.Label()), secretIdVersion: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}/secretids/{secretIdVersion}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "DeleteApproleSecretIdRequest" }); } } function __c2(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/instances/{instanceId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "DeleteInstanceRequest" }); } } function __c3(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), userId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "DeleteUserRequest" }); } } function __c4(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), aclId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "GetACLRequest" }); } } function __c5(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), roleId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "GetApproleRequest" }); } } function __c6(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/instances/{instanceId}/approles", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "GetApprolesRequest" }); case 1: return S.Array(__S(92, __c23, 0)); case 2: return S.suspend(() => S.Struct({ approles: __S(25, __c6, 1), }), ).annotate({ identifier: "ApproleList" }); } } function __c7(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), roleId: S.String.pipe(T.Label()), secretIdVersion: S.Number.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}/secretids/{secretIdVersion}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "GetApproleSecretIdRequest" }); } } function __c8(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/instances/{instanceId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "GetInstanceRequest" }); } } function __c9(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), userId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "GetUserRequest" }); } } function __c10(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/instances/{instanceId}/acls", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "ListACLsRequest" }); case 1: return S.Array(__S(84, __c21, 0)); case 2: return S.suspend(() => S.Struct({ acls: __S(41, __c10, 1), }), ).annotate({ identifier: "ListACLsResponse" }); } } function __c11(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), roleId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}/secretids", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "ListApproleSecretIdsRequest" }); case 1: return S.Array(__S(100, __c25, 0)); case 2: return S.suspend(() => S.Struct({ secretIds: __S(45, __c11, 1), }), ).annotate({ identifier: "ApproleSecretList" }); } } function __c12(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/instances", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "ListInstancesRequest" }); case 1: return S.Array(__S(108, __c27, 0)); case 2: return S.suspend(() => S.Struct({ instances: __S(49, __c12, 1), }), ).annotate({ identifier: "ListInstancesResponse" }); } } function __c13(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "GET", uri: "/v1/projects/{projectId}/instances/{instanceId}/users", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "ListUsersRequest" }); case 1: return S.Array(__S(120, __c30, 0)); case 2: return S.suspend(() => S.Struct({ users: __S(53, __c13, 1), }), ).annotate({ identifier: "ListUsersResponse" }); } } function __c14(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), aclId: S.String.pipe(T.Label()), cidr: S.String, }).pipe( T.Http({ method: "PUT", uri: "/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "UpdateACLRequest" }); } } function __c15(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ cidr: S.String, }), ).annotate({ identifier: "UpdateACLPayload" }); case 1: return S.Array(__S(60, __c15, 0)); case 2: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), cidrs: S.optional(__S(61, __c15, 1)), }).pipe( T.Http({ method: "PUT", uri: "/v1/projects/{projectId}/instances/{instanceId}/acls", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "UpdateACLsRequest" }); } } function __c16(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), roleId: S.String.pipe(T.Label()), description: S.optional(S.String), secret_id_num_uses: S.optional(S.Number), secret_id_ttl: S.optional(S.String), write: S.optional(S.Boolean), }).pipe( T.Http({ method: "PUT", uri: "/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "UpdateApproleRequest" }); } } function __c17(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), roleId: S.String.pipe(T.Label()), secretIdVersion: S.Number.pipe(T.Label()), description: S.optional(S.String), }).pipe( T.Http({ method: "PUT", uri: "/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}/secretids/{secretIdVersion}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "UpdateApproleSecretIdRequest" }); } } function __c18(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), kmsKey: S.optional(__S(112, __c28, 0)), name: S.String, }).pipe( T.Http({ method: "PUT", uri: "/v1/projects/{projectId}/instances/{instanceId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "UpdateInstanceRequest" }); } } function __c19(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), userId: S.String.pipe(T.Label()), description: S.optional(S.String), write: S.optional(S.Boolean), }).pipe( T.Http({ method: "PUT", uri: "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "UpdateUserRequest" }); } } function __c20(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), cidr: S.String, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/instances/{instanceId}/acls", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "CreateACLRequest" }); } } function __c21(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ cidr: S.String, id: S.String, }), ).annotate({ identifier: "ACL" }); } } function __c22(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), description: S.optional(S.String), secret_id_num_uses: S.optional(S.Number), secret_id_ttl: S.optional(S.String), write: S.optional(S.Boolean), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/instances/{instanceId}/approles", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "CreateApproleRequest" }); } } function __c23(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ description: S.String, role_id: S.String, secret_id_num_uses: S.Number, secret_id_ttl: S.String, write: S.Boolean, }), ).annotate({ identifier: "Approle" }); } } function __c24(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), roleId: S.String.pipe(T.Label()), description: S.optional(S.String), }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}/secretids", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "CreateApproleSecretIdRequest" }); } } function __c25(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ description: S.String, num_uses: S.Number, secret_id: S.optional(S.String), ttl: S.String, version: S.Number, }), ).annotate({ identifier: "ApproleSecret" }); } } function __c26(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), kmsKey: S.optional(__S(112, __c28, 0)), name: S.String, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/instances", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "CreateInstanceRequest" }); } } function __c27(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ apiUrl: S.String, creationFinishedDate: S.optional(S.String), creationStartDate: S.String, id: S.String, kmsKey: S.optional(__S(112, __c28, 0)), name: S.String, secretCount: S.Number, secretsEngine: S.String, state: S.String, updateFinishedDate: S.optional(S.String), updateStartDate: S.optional(S.String), }), ).annotate({ identifier: "Instance" }); } } function __c28(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ keyId: S.String, keyRingId: S.String, keyVersion: S.Number, serviceAccountEmail: S.String, }), ).annotate({ identifier: "KmsKeyPayload" }); } } function __c29(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), description: S.String, write: S.Boolean, }).pipe( T.Http({ method: "POST", uri: "/v1/projects/{projectId}/instances/{instanceId}/users", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "CreateUserRequest" }); } } function __c30(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ description: S.String, id: S.String, password: S.String.pipe(T.SensitiveValue({})), username: S.String, write: S.Boolean, }), ).annotate({ identifier: "User" }); } } function __c31(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), aclId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "DeleteACLRequest" }); } } function __c32(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({})).annotate({ identifier: "DeleteACLResponse" }); } } function __c33(j: number): any { switch (j) { case 0: return S.suspend(() => S.Struct({ projectId: S.String.pipe(T.Label()), instanceId: S.String.pipe(T.Label()), roleId: S.String.pipe(T.Label()), }).pipe( T.Http({ method: "DELETE", uri: "/v1/projects/{projectId}/instances/{instanceId}/approles/{roleId}", code: 200, baseUrl: "https://secrets-manager.api.{region}stackit.cloud", }), ), ).annotate({ identifier: "DeleteApproleRequest" }); } } // Schema table: entry i is schema j of builder f, made on first reach. function __S(i: number, f: (j: number) => unknown, j: number): any { return (__s[i] ??= __L.at(f, j)); }