cloudflare
Version:
The official TypeScript library for the Cloudflare API
203 lines • 7.53 kB
TypeScript
import { APIResource } from "../../../../core/resource.js";
import * as LatestAPI from "./latest.js";
import { BaseLatest, Latest, LatestListParams, LatestListResponse } from "./latest.js";
import { APIPromise } from "../../../../core/api-promise.js";
import { RequestOptions } from "../../../../internal/request-options.js";
export declare class BaseEvents extends APIResource {
static readonly _key: readonly ['magicTransit', 'connectors', 'events'];
/**
* Lists Magic WAN Connector Telemetry 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<EventListResponse>;
/**
* Gets Magic WAN Connector Telemetry 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<EventGetResponse>;
}
export declare class Events extends BaseEvents {
latest: LatestAPI.Latest;
}
export interface EventListResponse {
count: number;
items: Array<EventListResponse.Item>;
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 {
/**
* Event kind plus event-specific payload fields.
*
* Event kinds:
*
* - `Init`: Initialized process
* - `Leave`: Stopped process
* - `StartAttestation`: Started attestation
* - `FinishAttestationSuccess`: Finished attestation
* - `FinishAttestationFailure`: Failed attestation
* - `StartRotateCryptKey`: Started crypt key rotation
* - `FinishRotateCryptKeySuccess`: Finished crypt key rotation
* - `FinishRotateCryptKeyFailure`: Failed crypt key rotation
* - `StartRotatePki`: Started PKI rotation
* - `FinishRotatePkiSuccess`: Finished PKI rotation
* - `FinishRotatePkiFailure`: Failed PKI rotation
* - `StartUpgrade`: Started upgrade
* - `FinishUpgradeSuccess`: Finished upgrade
* - `FinishUpgradeFailure`: Failed upgrade
* - `BlessSlotSuccess`: Blessed boot entry slot
* - `BlessSlotPending`: Boot entry slot is not yet blessed
* - `BlessSlotFailure`: Failed to bless boot entry slot
* - `Reconcile`: Reconciled
* - `ConfigureCloudflaredTunnel`: Configured Cloudflared tunnel
* - `RekeyInstallBoth`: Installed initial inbound and outbound keys
* - `RekeyStart`: Installed new inbound key, kept old outbound
* - `RekeyRestart`: Restarted in-progress rekey with newer key material
* - `RekeyAdvance`: Confirmed traffic on new inbound key, swapped outbound to new
* - `RekeyComplete`: Deleted old keys
* - `RekeyReset`: Deleted all keys after receiving an unexpected key
* - `HaTransition`: Completed HA state transition
* - `HaError`: Received unexpected HA error
* - `HaInit`: Initialized HA subsystem
* - `HaLeave`: Stopped HA subsystem
*/
e: EventGetResponse.E;
/**
* 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 {
/**
* Event kind plus event-specific payload fields.
*
* Event kinds:
*
* - `Init`: Initialized process
* - `Leave`: Stopped process
* - `StartAttestation`: Started attestation
* - `FinishAttestationSuccess`: Finished attestation
* - `FinishAttestationFailure`: Failed attestation
* - `StartRotateCryptKey`: Started crypt key rotation
* - `FinishRotateCryptKeySuccess`: Finished crypt key rotation
* - `FinishRotateCryptKeyFailure`: Failed crypt key rotation
* - `StartRotatePki`: Started PKI rotation
* - `FinishRotatePkiSuccess`: Finished PKI rotation
* - `FinishRotatePkiFailure`: Failed PKI rotation
* - `StartUpgrade`: Started upgrade
* - `FinishUpgradeSuccess`: Finished upgrade
* - `FinishUpgradeFailure`: Failed upgrade
* - `BlessSlotSuccess`: Blessed boot entry slot
* - `BlessSlotPending`: Boot entry slot is not yet blessed
* - `BlessSlotFailure`: Failed to bless boot entry slot
* - `Reconcile`: Reconciled
* - `ConfigureCloudflaredTunnel`: Configured Cloudflared tunnel
* - `RekeyInstallBoth`: Installed initial inbound and outbound keys
* - `RekeyStart`: Installed new inbound key, kept old outbound
* - `RekeyRestart`: Restarted in-progress rekey with newer key material
* - `RekeyAdvance`: Confirmed traffic on new inbound key, swapped outbound to new
* - `RekeyComplete`: Deleted old keys
* - `RekeyReset`: Deleted all keys after receiving an unexpected key
* - `HaTransition`: Completed HA state transition
* - `HaError`: Received unexpected HA error
* - `HaInit`: Initialized HA subsystem
* - `HaLeave`: Stopped HA subsystem
*/
interface E {
/**
* Event kind
*/
k: 'Init' | 'Leave' | 'StartAttestation' | 'FinishAttestationSuccess' | 'FinishAttestationFailure' | 'StartRotateCryptKey' | 'FinishRotateCryptKeySuccess' | 'FinishRotateCryptKeyFailure' | 'StartRotatePki' | 'FinishRotatePkiSuccess' | 'FinishRotatePkiFailure' | 'StartUpgrade' | 'FinishUpgradeSuccess' | 'FinishUpgradeFailure' | 'BlessSlotSuccess' | 'BlessSlotPending' | 'BlessSlotFailure' | 'Reconcile' | 'ConfigureCloudflaredTunnel' | 'RekeyInstallBoth' | 'RekeyStart' | 'RekeyRestart' | 'RekeyAdvance' | 'RekeyComplete' | 'RekeyReset' | 'HaTransition' | 'HaError' | 'HaInit' | 'HaLeave';
[k: string]: unknown;
}
}
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.ts.map