import { APIResource } from "../../../../core/resource.mjs"; import * as LatestAPI from "./latest.mjs"; import { BaseLatest, Latest, LatestListParams, LatestListResponse } from "./latest.mjs"; import { APIPromise } from "../../../../core/api-promise.mjs"; import { RequestOptions } from "../../../../internal/request-options.mjs"; export declare class BaseEvents extends APIResource { static readonly _key: readonly ['magicTransit', 'connectors', 'events']; /** * List Events * * @example * ```ts * const events = * await client.magicTransit.connectors.events.list( * 'connector_id', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * from: 0, * to: 0, * }, * ); * ``` */ list(connectorID: string, params: EventListParams, options?: RequestOptions): APIPromise; /** * Get Event * * @example * ```ts * const event = * await client.magicTransit.connectors.events.get(0, { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * connector_id: 'connector_id', * event_t: 0, * }); * ``` */ get(eventN: number, params: EventGetParams, options?: RequestOptions): APIPromise; } export declare class Events extends BaseEvents { latest: LatestAPI.Latest; } export interface EventListResponse { count: number; items: Array; cursor?: string; } export declare namespace EventListResponse { interface Item { /** * Time the Event was collected (seconds since the Unix epoch) */ a: number; /** * Kind */ k: string; /** * Sequence number, used to order events with the same timestamp */ n: number; /** * Time the Event was recorded (seconds since the Unix epoch) */ t: number; } } /** * Recorded Event */ export interface EventGetResponse { e: EventGetResponse.Init | EventGetResponse.Leave | EventGetResponse.StartAttestation | EventGetResponse.FinishAttestationSuccess | EventGetResponse.FinishAttestationFailure | EventGetResponse.StartRotateCryptKey | EventGetResponse.FinishRotateCryptKeySuccess | EventGetResponse.FinishRotateCryptKeyFailure | EventGetResponse.StartRotatePki | EventGetResponse.FinishRotatePkiSuccess | EventGetResponse.FinishRotatePkiFailure | EventGetResponse.StartUpgrade | EventGetResponse.FinishUpgradeSuccess | EventGetResponse.FinishUpgradeFailure | EventGetResponse.Reconcile | EventGetResponse.ConfigureCloudflaredTunnel | EventGetResponse.RekeyInstallBoth | EventGetResponse.RekeyStart | EventGetResponse.RekeyAdvance | EventGetResponse.RekeyComplete | EventGetResponse.RekeyReset; /** * Sequence number, used to order events with the same timestamp */ n: number; /** * Time the Event was recorded (seconds since the Unix epoch) */ t: number; /** * Version */ v?: string; } export declare namespace EventGetResponse { interface Init { /** * Initialized process */ k: 'Init'; } interface Leave { /** * Stopped process */ k: 'Leave'; } interface StartAttestation { /** * Started attestation */ k: 'StartAttestation'; } interface FinishAttestationSuccess { /** * Finished attestation */ k: 'FinishAttestationSuccess'; } interface FinishAttestationFailure { /** * Failed attestation */ k: 'FinishAttestationFailure'; } interface StartRotateCryptKey { /** * Started crypt key rotation */ k: 'StartRotateCryptKey'; } interface FinishRotateCryptKeySuccess { /** * Finished crypt key rotation */ k: 'FinishRotateCryptKeySuccess'; } interface FinishRotateCryptKeyFailure { /** * Failed crypt key rotation */ k: 'FinishRotateCryptKeyFailure'; } interface StartRotatePki { /** * Started PKI rotation */ k: 'StartRotatePki'; } interface FinishRotatePkiSuccess { /** * Finished PKI rotation */ k: 'FinishRotatePkiSuccess'; } interface FinishRotatePkiFailure { /** * Failed PKI rotation */ k: 'FinishRotatePkiFailure'; } interface StartUpgrade { /** * Started upgrade */ k: 'StartUpgrade'; /** * Location of upgrade bundle */ url: string; } interface FinishUpgradeSuccess { /** * Finished upgrade */ k: 'FinishUpgradeSuccess'; } interface FinishUpgradeFailure { /** * Failed upgrade */ k: 'FinishUpgradeFailure'; } interface Reconcile { /** * Reconciled */ k: 'Reconcile'; } interface ConfigureCloudflaredTunnel { /** * Configured Cloudflared tunnel */ k: 'ConfigureCloudflaredTunnel'; } interface RekeyInstallBoth { /** * Installed initial inbound and outbound keys */ k: 'RekeyInstallBoth'; /** * Tunnel identifier */ tunnel_id: string; } interface RekeyStart { /** * Installed new inbound key, kept old outbound */ k: 'RekeyStart'; /** * Tunnel identifier */ tunnel_id: string; } interface RekeyAdvance { /** * Confirmed traffic on new inbound key, swapped outbound to new */ k: 'RekeyAdvance'; /** * Tunnel identifier */ tunnel_id: string; } interface RekeyComplete { /** * Deleted old keys */ k: 'RekeyComplete'; /** * Tunnel identifier */ tunnel_id: string; } interface RekeyReset { /** * Deleted all keys after receiving an unexpected key */ k: 'RekeyReset'; /** * Tunnel identifier */ tunnel_id: string; } } export interface EventListParams { /** * Path param: Account identifier */ account_id: string; /** * Query param */ from: number; /** * Query param */ to: number; /** * Query param */ cursor?: string; /** * Query param: Filter by event kind */ k?: string; /** * Query param */ limit?: number; } export interface EventGetParams { /** * Account identifier */ account_id: string; connector_id: string; event_t: number; } export declare namespace Events { export { type EventListResponse as EventListResponse, type EventGetResponse as EventGetResponse, type EventListParams as EventListParams, type EventGetParams as EventGetParams, }; export { Latest as Latest, BaseLatest as BaseLatest, type LatestListResponse as LatestListResponse, type LatestListParams as LatestListParams, }; } //# sourceMappingURL=events.d.mts.map