import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import Long from "long"; import type { CallContext, CallOptions } from "nice-grpc-common"; import { PaginationRequest, PaginationResponse } from "../../filter/v2/filter.js"; import { CustomDomain, CustomDomainFilter, DomainFieldName, FieldName, Filter, Instance, TrustedDomain, TrustedDomainFieldName, TrustedDomainFilter } from "./instance.js"; export declare const protobufPackage = "zitadel.instance.v2"; export interface DeleteInstanceRequest { /** InstanceID is the unique ID of the instance to be deleted. */ instanceId: string; } export interface DeleteInstanceResponse { /** DeletionDate is the timestamp when the instance was deleted. */ deletionDate: Date | undefined; } export interface GetInstanceRequest { /** * InstanceID is the unique ID of the instance to be retrieved. * If not set, the instance in the current context (e.g. identified by the host header) will be returned. * If an ID is set, the caller must have additional permissions. */ instanceId: string; } export interface GetInstanceResponse { /** The instance matching the instance ID */ instance: Instance | undefined; } export interface UpdateInstanceRequest { /** * InstanceID is the unique ID of the instance to be updated. * If not set, the instance in the current context (e.g. identified by the host header) will be changed. * If an ID is set, the caller must have additional permissions. */ instanceId: string; /** InstanceName is the new name of the instance to be set. */ instanceName: string; } export interface UpdateInstanceResponse { /** * ChangeDate is the timestamp when the instance was last changed. * In case the instance was not changed during the call, the previous change date is returned. */ changeDate: Date | undefined; } export interface ListInstancesRequest { /** Paginate through the results using a limit, offset and sorting. */ pagination: PaginationRequest | undefined; /** The field the result is sorted by. */ sortingColumn: FieldName; /** Filter the instances to be returned. */ filters: Filter[]; } export interface ListInstancesResponse { /** The instances matching the query. */ instances: Instance[]; /** Contains the total number of instances matching the query and the applied limit. */ pagination: PaginationResponse | undefined; } export interface AddCustomDomainRequest { /** InstanceID is the unique ID of the instance to which the domain will be added. */ instanceId: string; /** * Custom domain to add to the instance. * Must be a valid domain name. * Once the domain is added, it will be used to route requests to this instance. */ customDomain: string; } export interface AddCustomDomainResponse { /** CreationDate is the timestamp when the domain was added. */ creationDate: Date | undefined; } export interface RemoveCustomDomainRequest { /** InstanceID is the unique ID of the instance from which the domain will be removed. */ instanceId: string; /** CustomDomain is the the domain to remove from the instance. */ customDomain: string; } export interface RemoveCustomDomainResponse { /** DeletionDate is the timestamp when the domain was removed. */ deletionDate: Date | undefined; } export interface ListCustomDomainsRequest { /** * InstanceID is the unique ID of the instance whose domains will be listed. * If not set, the instance in the current context (e.g. identified by the host header) will be used. * If an ID is set, the caller must have additional permissions. */ instanceId: string; /** Paginate and sort the results using a limit, offset and sorting. */ pagination: PaginationRequest | undefined; /** The field the result is sorted by. */ sortingColumn: DomainFieldName; /** Filter the domains to be returned. */ filters: CustomDomainFilter[]; } export interface ListCustomDomainsResponse { /** The list of custom domains matching the query. */ domains: CustomDomain[]; /** Contains the total number of domains matching the query and the applied limit. */ pagination: PaginationResponse | undefined; } export interface AddTrustedDomainRequest { /** * InstanceID is the unique ID of the instance to which the trusted domain will be added. * If not set, the instance in the current context (e.g. identified by the host header) will be used. * If an ID is set, the caller must have additional permissions. */ instanceId: string; /** * Trusted domain to be added to the instance. * Must be a valid domain name. * Once the domain is added, it can be used in API responses like OIDC discovery, * email templates, and more. * This can be used in cases where the API is accessed through a different domain * than the instance domain, e.g. proxy setups and custom login UIs. * Unlike custom domains, trusted domains are not used to route requests to this instance * and therefore do not need to be uniquely assigned to an instance. */ trustedDomain: string; } export interface AddTrustedDomainResponse { /** CreationDate is the timestamp when the trusted domain was added. */ creationDate: Date | undefined; } export interface RemoveTrustedDomainRequest { /** * InstanceID is the unique ID of the instance from which the trusted domain will be removed. * If not set, the instance in the current context (e.g. identified by the host header) will be used. * If an ID is set, the caller must have additional permissions. */ instanceId: string; /** The trusted domain to remove from the instance. */ trustedDomain: string; } export interface RemoveTrustedDomainResponse { /** DeletionDate is the timestamp when the trusted domain was removed. */ deletionDate: Date | undefined; } export interface ListTrustedDomainsRequest { /** * InstanceID is the unique ID of the instance whose trusted domains will be listed. * If not set, the instance in the current context (e.g. identified by the host header) will be used. * If an ID is set, the caller must have additional permissions. */ instanceId: string; /** Paginate and sort the results using a limit, offset and sorting. */ pagination: PaginationRequest | undefined; /** The field the result is sorted by. */ sortingColumn: TrustedDomainFieldName; /** Filter the domains to be returned. */ filters: TrustedDomainFilter[]; } export interface ListTrustedDomainsResponse { /** The list of trusted domains matching the query. */ trustedDomain: TrustedDomain[]; /** Contains the total number of domains matching the query and the applied limit. */ pagination: PaginationResponse | undefined; } export declare const DeleteInstanceRequest: MessageFns; export declare const DeleteInstanceResponse: MessageFns; export declare const GetInstanceRequest: MessageFns; export declare const GetInstanceResponse: MessageFns; export declare const UpdateInstanceRequest: MessageFns; export declare const UpdateInstanceResponse: MessageFns; export declare const ListInstancesRequest: MessageFns; export declare const ListInstancesResponse: MessageFns; export declare const AddCustomDomainRequest: MessageFns; export declare const AddCustomDomainResponse: MessageFns; export declare const RemoveCustomDomainRequest: MessageFns; export declare const RemoveCustomDomainResponse: MessageFns; export declare const ListCustomDomainsRequest: MessageFns; export declare const ListCustomDomainsResponse: MessageFns; export declare const AddTrustedDomainRequest: MessageFns; export declare const AddTrustedDomainResponse: MessageFns; export declare const RemoveTrustedDomainRequest: MessageFns; export declare const RemoveTrustedDomainResponse: MessageFns; export declare const ListTrustedDomainsRequest: MessageFns; export declare const ListTrustedDomainsResponse: MessageFns; /** * Service to manage instances and their domains. * The service provides methods to create, update, delete and list instances and their domains. * * Contrary to most services in ZITADEL, the instance service allows accessing data not only from * the current instance, but also from other instances. */ export type InstanceServiceDefinition = typeof InstanceServiceDefinition; export declare const InstanceServiceDefinition: { readonly name: "InstanceService"; readonly fullName: "zitadel.instance.v2.InstanceService"; readonly methods: { /** * Delete Instance * * Deletes an instance with the given ID. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.instance.delete` */ readonly deleteInstance: { readonly name: "DeleteInstance"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 400010: readonly [Buffer]; }; }; }; /** * Get Instance * * Returns the instance in the current context or by its ID. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to retrieve a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.read` * - `system.instance.read` (if InstanceID is set) */ readonly getInstance: { readonly name: "GetInstance"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 400010: readonly [Buffer]; }; }; }; /** * Update Instance * * Updates instance's name in the current context or by its ID. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to update a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.write` * - `system.instance.write` (if InstanceID is set) */ readonly updateInstance: { readonly name: "UpdateInstance"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 400010: readonly [Buffer]; }; }; }; /** * List Instances * * Lists instances matching the given query. * The query can be used to filter either by instance ID or domain. * The request is paginated and returns 100 results by default. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.instance.read` */ readonly listInstances: { readonly name: "ListInstances"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 400010: readonly [Buffer]; }; }; }; /** * Add Custom Domain * * Adds a custom domain to the instance. * The custom domain must be unique across all instances. * Once the domain is added, it will be used to route requests to this instance. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.domain.write` */ readonly addCustomDomain: { readonly name: "AddCustomDomain"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 400010: readonly [Buffer]; }; }; }; /** * Remove Custom Domain * * Removes a custom domain from the instance. * Be aware that this will stop routing requests from this domain to the instance and * might break existing setups or integrations. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.domain.write` */ readonly removeCustomDomain: { readonly name: "RemoveCustomDomain"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 400010: readonly [Buffer]; }; }; }; /** * List Custom Domains * * Lists custom domains of the instance. * * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.read` * - `system.instance.read` (if InstanceID is set) */ readonly listCustomDomains: { readonly name: "ListCustomDomains"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 400010: readonly [Buffer]; }; }; }; /** * Add Trusted Domain * * Adds a trusted domain to the instance. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * It must be a valid domain name. * Once the domain is added, it can be used in API responses like OIDC discovery, * email templates, and more. * This can be used in cases where the API is accessed through a different domain * than the instance domain, e.g. proxy setups and custom login UIs. * Unlike custom domain, trusted domains are not used to route requests to this instance * and therefore do not need to be uniquely assigned to an instance. * * Required permissions: * - `iam.write` * - `system.instance.write` (if InstanceID is set) */ readonly addTrustedDomain: { readonly name: "AddTrustedDomain"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 400010: readonly [Buffer]; }; }; }; /** * Remove Trusted Domain * * Removes a trusted domain from the instance. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.write` * - `system.instance.write` (if InstanceID is set) */ readonly removeTrustedDomain: { readonly name: "RemoveTrustedDomain"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 400010: readonly [Buffer]; }; }; }; /** * List Trusted Domains * * Lists trusted domains of the instance. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.read` * - `system.instance.read` (if InstanceID is set) */ readonly listTrustedDomains: { readonly name: "ListTrustedDomains"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 400010: readonly [Buffer]; }; }; }; }; }; export interface InstanceServiceImplementation { /** * Delete Instance * * Deletes an instance with the given ID. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.instance.delete` */ deleteInstance(request: DeleteInstanceRequest, context: CallContext & CallContextExt): Promise>; /** * Get Instance * * Returns the instance in the current context or by its ID. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to retrieve a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.read` * - `system.instance.read` (if InstanceID is set) */ getInstance(request: GetInstanceRequest, context: CallContext & CallContextExt): Promise>; /** * Update Instance * * Updates instance's name in the current context or by its ID. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to update a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.write` * - `system.instance.write` (if InstanceID is set) */ updateInstance(request: UpdateInstanceRequest, context: CallContext & CallContextExt): Promise>; /** * List Instances * * Lists instances matching the given query. * The query can be used to filter either by instance ID or domain. * The request is paginated and returns 100 results by default. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.instance.read` */ listInstances(request: ListInstancesRequest, context: CallContext & CallContextExt): Promise>; /** * Add Custom Domain * * Adds a custom domain to the instance. * The custom domain must be unique across all instances. * Once the domain is added, it will be used to route requests to this instance. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.domain.write` */ addCustomDomain(request: AddCustomDomainRequest, context: CallContext & CallContextExt): Promise>; /** * Remove Custom Domain * * Removes a custom domain from the instance. * Be aware that this will stop routing requests from this domain to the instance and * might break existing setups or integrations. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.domain.write` */ removeCustomDomain(request: RemoveCustomDomainRequest, context: CallContext & CallContextExt): Promise>; /** * List Custom Domains * * Lists custom domains of the instance. * * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.read` * - `system.instance.read` (if InstanceID is set) */ listCustomDomains(request: ListCustomDomainsRequest, context: CallContext & CallContextExt): Promise>; /** * Add Trusted Domain * * Adds a trusted domain to the instance. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * It must be a valid domain name. * Once the domain is added, it can be used in API responses like OIDC discovery, * email templates, and more. * This can be used in cases where the API is accessed through a different domain * than the instance domain, e.g. proxy setups and custom login UIs. * Unlike custom domain, trusted domains are not used to route requests to this instance * and therefore do not need to be uniquely assigned to an instance. * * Required permissions: * - `iam.write` * - `system.instance.write` (if InstanceID is set) */ addTrustedDomain(request: AddTrustedDomainRequest, context: CallContext & CallContextExt): Promise>; /** * Remove Trusted Domain * * Removes a trusted domain from the instance. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.write` * - `system.instance.write` (if InstanceID is set) */ removeTrustedDomain(request: RemoveTrustedDomainRequest, context: CallContext & CallContextExt): Promise>; /** * List Trusted Domains * * Lists trusted domains of the instance. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.read` * - `system.instance.read` (if InstanceID is set) */ listTrustedDomains(request: ListTrustedDomainsRequest, context: CallContext & CallContextExt): Promise>; } export interface InstanceServiceClient { /** * Delete Instance * * Deletes an instance with the given ID. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.instance.delete` */ deleteInstance(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * Get Instance * * Returns the instance in the current context or by its ID. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to retrieve a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.read` * - `system.instance.read` (if InstanceID is set) */ getInstance(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * Update Instance * * Updates instance's name in the current context or by its ID. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to update a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.write` * - `system.instance.write` (if InstanceID is set) */ updateInstance(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * List Instances * * Lists instances matching the given query. * The query can be used to filter either by instance ID or domain. * The request is paginated and returns 100 results by default. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.instance.read` */ listInstances(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * Add Custom Domain * * Adds a custom domain to the instance. * The custom domain must be unique across all instances. * Once the domain is added, it will be used to route requests to this instance. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.domain.write` */ addCustomDomain(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * Remove Custom Domain * * Removes a custom domain from the instance. * Be aware that this will stop routing requests from this domain to the instance and * might break existing setups or integrations. * This method requires system level permissions and cannot be called from an instance context. * * Required permissions: * - `system.domain.write` */ removeCustomDomain(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * List Custom Domains * * Lists custom domains of the instance. * * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.read` * - `system.instance.read` (if InstanceID is set) */ listCustomDomains(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * Add Trusted Domain * * Adds a trusted domain to the instance. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * It must be a valid domain name. * Once the domain is added, it can be used in API responses like OIDC discovery, * email templates, and more. * This can be used in cases where the API is accessed through a different domain * than the instance domain, e.g. proxy setups and custom login UIs. * Unlike custom domain, trusted domains are not used to route requests to this instance * and therefore do not need to be uniquely assigned to an instance. * * Required permissions: * - `iam.write` * - `system.instance.write` (if InstanceID is set) */ addTrustedDomain(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * Remove Trusted Domain * * Removes a trusted domain from the instance. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.write` * - `system.instance.write` (if InstanceID is set) */ removeTrustedDomain(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * List Trusted Domains * * Lists trusted domains of the instance. * By default the instance will be determined by the context of the request, * e.g. the host header. * You can optionally pass an InstanceID to list the domains of a specific instance. * This requires additional permissions. * * Required permissions: * - `iam.read` * - `system.instance.read` (if InstanceID is set) */ listTrustedDomains(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; } type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; export interface MessageFns { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create(base?: DeepPartial): T; fromPartial(object: DeepPartial): T; } export {};