///
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js';
import _m0 from 'protobufjs/minimal';
import { ScanResult, Vulnerability } from '../../../../yandex/cloud/containerregistry/v1/scanner';
import { Operation } from '../../../../yandex/cloud/operation/operation';
export declare const protobufPackage = "yandex.cloud.containerregistry.v1";
export interface ScanRequest {
/** ID of the Image to be scanned for vulnerabilities. */
imageId: string;
}
export interface ScanMetadata {
/** ID of the ScanResult that is being created. */
scanResultId: string;
}
export interface GetScanResultRequest {
/** ID of the ScanResult to return. */
scanResultId: string;
}
export interface GetLastScanResultRequest {
/** ID of the Image to get last finished ScanResult. */
imageId: string;
}
export interface ListScanResultsRequest {
imageId: string | undefined;
repositoryId: string | undefined;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size],
* the service returns a [ListRegistriesResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
* Default value: 100.
*/
pageSize: number;
/**
* Page token. To get the next page of results, set [page_token] to the
* [ListRegistriesResponse.next_page_token] returned by a previous list request.
*/
pageToken: string;
/**
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can use filtering only on [ScanResult.status] field.
* 2. An `=` operator.
* 3. The value in double quotes (`"`).
*/
filter: string;
/**
* An order expression that orders resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can use filtering only on [ScanResult.status] field.
* 2. Order selector. Currently you can use ordering only on `ScanResult.status` field (critical first).
*/
orderBy: string;
}
export interface ListScanResultsResponse {
/** List of ScanResult resources. */
scanResults: ScanResult[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListImagesRequest.page_size], use
* the [next_page_token] as the value
* for the [ListImagesRequest.page_token] query parameter
* in the next list request. Each subsequent list request will have its own
* [next_page_token] to continue paging through the results.
*/
nextPageToken: string;
}
export interface ListVulnerabilitiesRequest {
/** ID of the ScanResult to get list of vulnerabilities for. */
scanResultId: string;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size],
* the service returns a [ListRegistriesResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
* Default value: 100.
*/
pageSize: number;
/**
* Page token. To get the next page of results, set [page_token] to the
* [ListRegistriesResponse.next_page_token] returned by a previous list request.
*/
pageToken: string;
/**
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can use filtering only on [Vulnerability.severity] and [PackageVulnerability.name] fields.
* 2. An `=` operator.
* 3. The value in double quotes (`"`).
*/
filter: string;
/**
* An order expression that orders resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can use filtering only on [Vulnerability.severity] and [PackageVulnerability.name] fields.
* 2. Order selector. Currently you can use ordering only on `Vulnerability.severity` field (recent first).
*/
orderBy: string;
}
export interface ListVulnerabilitiesResponse {
/** List of Vulnerability resources. */
vulnerabilities: Vulnerability[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListImagesRequest.page_size], use
* the [next_page_token] as the value
* for the [ListImagesRequest.page_token] query parameter
* in the next list request. Each subsequent list request will have its own
* [next_page_token] to continue paging through the results.
*/
nextPageToken: string;
}
export declare const ScanRequest: {
encode(message: ScanRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ScanRequest;
fromJSON(object: any): ScanRequest;
toJSON(message: ScanRequest): unknown;
fromPartial, never>>(object: I): ScanRequest;
};
export declare const ScanMetadata: {
encode(message: ScanMetadata, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ScanMetadata;
fromJSON(object: any): ScanMetadata;
toJSON(message: ScanMetadata): unknown;
fromPartial, never>>(object: I): ScanMetadata;
};
export declare const GetScanResultRequest: {
encode(message: GetScanResultRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): GetScanResultRequest;
fromJSON(object: any): GetScanResultRequest;
toJSON(message: GetScanResultRequest): unknown;
fromPartial, never>>(object: I): GetScanResultRequest;
};
export declare const GetLastScanResultRequest: {
encode(message: GetLastScanResultRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): GetLastScanResultRequest;
fromJSON(object: any): GetLastScanResultRequest;
toJSON(message: GetLastScanResultRequest): unknown;
fromPartial, never>>(object: I): GetLastScanResultRequest;
};
export declare const ListScanResultsRequest: {
encode(message: ListScanResultsRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ListScanResultsRequest;
fromJSON(object: any): ListScanResultsRequest;
toJSON(message: ListScanResultsRequest): unknown;
fromPartial, never>>(object: I): ListScanResultsRequest;
};
export declare const ListScanResultsResponse: {
encode(message: ListScanResultsResponse, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ListScanResultsResponse;
fromJSON(object: any): ListScanResultsResponse;
toJSON(message: ListScanResultsResponse): unknown;
fromPartial, never>) | undefined;
} & Record, never>)[] & Record, never>) | undefined;
nextPageToken?: string | undefined;
} & Record, never>>(object: I): ListScanResultsResponse;
};
export declare const ListVulnerabilitiesRequest: {
encode(message: ListVulnerabilitiesRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ListVulnerabilitiesRequest;
fromJSON(object: any): ListVulnerabilitiesRequest;
toJSON(message: ListVulnerabilitiesRequest): unknown;
fromPartial, never>>(object: I): ListVulnerabilitiesRequest;
};
export declare const ListVulnerabilitiesResponse: {
encode(message: ListVulnerabilitiesResponse, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): ListVulnerabilitiesResponse;
fromJSON(object: any): ListVulnerabilitiesResponse;
toJSON(message: ListVulnerabilitiesResponse): unknown;
fromPartial, never>) | undefined;
} & Record, never>)[] & Record, never>) | undefined;
nextPageToken?: string | undefined;
} & Record, never>>(object: I): ListVulnerabilitiesResponse;
};
/** A set of methods for scanning Docker images. */
export declare const ScannerServiceService: {
/** Executes scanning of specified image. */
readonly scan: {
readonly path: "/yandex.cloud.containerregistry.v1.ScannerService/Scan";
readonly requestStream: false;
readonly responseStream: false;
readonly requestSerialize: (value: ScanRequest) => Buffer;
readonly requestDeserialize: (value: Buffer) => ScanRequest;
readonly responseSerialize: (value: Operation) => Buffer;
readonly responseDeserialize: (value: Buffer) => Operation;
};
/**
* Returns the specified ScanResult resource.
*
* To get the list of ScanResults for specified Image, make a [List] request.
*/
readonly get: {
readonly path: "/yandex.cloud.containerregistry.v1.ScannerService/Get";
readonly requestStream: false;
readonly responseStream: false;
readonly requestSerialize: (value: GetScanResultRequest) => Buffer;
readonly requestDeserialize: (value: Buffer) => GetScanResultRequest;
readonly responseSerialize: (value: ScanResult) => Buffer;
readonly responseDeserialize: (value: Buffer) => ScanResult;
};
/** Returns the last finished ScanResult for the specified Image. */
readonly getLast: {
readonly path: "/yandex.cloud.containerregistry.v1.ScannerService/GetLast";
readonly requestStream: false;
readonly responseStream: false;
readonly requestSerialize: (value: GetLastScanResultRequest) => Buffer;
readonly requestDeserialize: (value: Buffer) => GetLastScanResultRequest;
readonly responseSerialize: (value: ScanResult) => Buffer;
readonly responseDeserialize: (value: Buffer) => ScanResult;
};
/** Retrieves the list of ScanResults for specified Image. */
readonly list: {
readonly path: "/yandex.cloud.containerregistry.v1.ScannerService/List";
readonly requestStream: false;
readonly responseStream: false;
readonly requestSerialize: (value: ListScanResultsRequest) => Buffer;
readonly requestDeserialize: (value: Buffer) => ListScanResultsRequest;
readonly responseSerialize: (value: ListScanResultsResponse) => Buffer;
readonly responseDeserialize: (value: Buffer) => ListScanResultsResponse;
};
/** Retrieves the list of vulnerabilities found in particular scan. */
readonly listVulnerabilities: {
readonly path: "/yandex.cloud.containerregistry.v1.ScannerService/ListVulnerabilities";
readonly requestStream: false;
readonly responseStream: false;
readonly requestSerialize: (value: ListVulnerabilitiesRequest) => Buffer;
readonly requestDeserialize: (value: Buffer) => ListVulnerabilitiesRequest;
readonly responseSerialize: (value: ListVulnerabilitiesResponse) => Buffer;
readonly responseDeserialize: (value: Buffer) => ListVulnerabilitiesResponse;
};
};
export interface ScannerServiceServer extends UntypedServiceImplementation {
/** Executes scanning of specified image. */
scan: handleUnaryCall;
/**
* Returns the specified ScanResult resource.
*
* To get the list of ScanResults for specified Image, make a [List] request.
*/
get: handleUnaryCall;
/** Returns the last finished ScanResult for the specified Image. */
getLast: handleUnaryCall;
/** Retrieves the list of ScanResults for specified Image. */
list: handleUnaryCall;
/** Retrieves the list of vulnerabilities found in particular scan. */
listVulnerabilities: handleUnaryCall;
}
export interface ScannerServiceClient extends Client {
/** Executes scanning of specified image. */
scan(request: ScanRequest, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
scan(request: ScanRequest, metadata: Metadata, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
scan(request: ScanRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: Operation) => void): ClientUnaryCall;
/**
* Returns the specified ScanResult resource.
*
* To get the list of ScanResults for specified Image, make a [List] request.
*/
get(request: GetScanResultRequest, callback: (error: ServiceError | null, response: ScanResult) => void): ClientUnaryCall;
get(request: GetScanResultRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ScanResult) => void): ClientUnaryCall;
get(request: GetScanResultRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ScanResult) => void): ClientUnaryCall;
/** Returns the last finished ScanResult for the specified Image. */
getLast(request: GetLastScanResultRequest, callback: (error: ServiceError | null, response: ScanResult) => void): ClientUnaryCall;
getLast(request: GetLastScanResultRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ScanResult) => void): ClientUnaryCall;
getLast(request: GetLastScanResultRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ScanResult) => void): ClientUnaryCall;
/** Retrieves the list of ScanResults for specified Image. */
list(request: ListScanResultsRequest, callback: (error: ServiceError | null, response: ListScanResultsResponse) => void): ClientUnaryCall;
list(request: ListScanResultsRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListScanResultsResponse) => void): ClientUnaryCall;
list(request: ListScanResultsRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListScanResultsResponse) => void): ClientUnaryCall;
/** Retrieves the list of vulnerabilities found in particular scan. */
listVulnerabilities(request: ListVulnerabilitiesRequest, callback: (error: ServiceError | null, response: ListVulnerabilitiesResponse) => void): ClientUnaryCall;
listVulnerabilities(request: ListVulnerabilitiesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListVulnerabilitiesResponse) => void): ClientUnaryCall;
listVulnerabilities(request: ListVulnerabilitiesRequest, metadata: Metadata, options: Partial, callback: (error: ServiceError | null, response: ListVulnerabilitiesResponse) => void): ClientUnaryCall;
}
export declare const ScannerServiceClient: {
new (address: string, credentials: ChannelCredentials, options?: Partial): ScannerServiceClient;
service: typeof ScannerServiceService;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? {
[K in keyof T]?: DeepPartial;
} : Partial;
type KeysOfUnion = T extends T ? keyof T : never;
export type Exact
= P extends Builtin ? P : P & {
[K in keyof P]: Exact