declare const _default: {}; export default _default; export type RegisterAPI = { /** * - Add a page action for the registered entity. */ addPageAction: (name: string, attributes?: object) => void; /** * - Capture a log for the registered entity. */ log: (message: string, options?: { customAttributes?: object; level?: "ERROR" | "TRACE" | "DEBUG" | "INFO" | "WARN"; }) => void; /** * - Notice an error for the registered entity. */ noticeError: (error: Error | string, customAttributes?: object) => void; /** * - Deregister the registered entity, which blocks its use and captures end of life timings. */ deregister: () => void; /** * - Record a custom event for the registered entity. */ recordCustomEvent: (eventType: string, attributes?: Object) => void; /** * - Measures a task that is recorded as a BrowserPerformance event. */ measure: (eventType: string, options?: { start?: number | PerformanceMark; end?: number | PerformanceMark; customAttributes?: object; }) => ({ start: number; end: number; duration: number; customAttributes: object; }); /** * - Add an application.version attribute to all outgoing data for the registered entity. */ setApplicationVersion: (value: string | null) => void; /** * - Add a custom attribute to outgoing data for the registered entity. */ setCustomAttribute: (name: string, value: string | number | boolean | null, persist?: boolean) => void; /** * - Add an enduser.id attribute to all outgoing API data for the registered entity. Note: a registered entity will not be able to initiate a session reset. It must be done from the main agent. */ setUserId: (value: string | null, resetSession?: boolean) => void; /** * - The metadata object containing the custom attributes and target information for the registered entity. */ metadata: RegisterAPIMetadata; }; export type RegisterAPIConstructor = { /** * - The unique id for the registered entity. This will be assigned to any synthesized entities. */ id: string; /** * - The readable name for the registered entity. This will be assigned to any synthesized entities. */ name: string; /** * - The tags for the registered entity as key-value pairs. This will be assigned to any synthesized entities. Tags are converted to source.* attributes (e.g., {environment: 'production'} becomes source.environment: 'production'). */ tags?: { [key: string]: any; } | undefined; /** * - The parent target for the registered entity. If none was supplied, it will assume the entity guid from the main agent. */ parent?: RegisterAPITarget | undefined; /** * - The parentId for the registered entity. If none was supplied, it will assume the entity guid from the main agent. */ parentId?: string | undefined; }; export type RegisterAPIMetadata = { /** * - The custom attributes for the registered entity. */ customAttributes: Object; /** * - The timing metrics for the registered entity. */ timings: Partial; /** * - The options for the registered entity. */ target: Partial; }; export type RegisterAPITarget = { /** * - The ID for the registered entity. */ id: string; /** * - The name returned for the registered entity. */ name: string; /** * - The tags for the registered entity as key-value pairs. */ tags?: { [key: string]: any; } | undefined; /** * - The parentId for the registered entity. If none was supplied, it will assume the entity guid from the main agent. */ parentId?: string | undefined; }; export type RegisterAPITimings = { /** * - The timestamp when the registered entity was created. */ registeredAt: number; /** * - The timestamp when the registered entity was deregistered. */ reportedAt?: number | undefined; /** * - The timestamp when the registered entity began fetching (performance.start). */ fetchStart: number; /** * - The timestamp when the registered entity finished fetching (performance.end). */ fetchEnd: number; /** * - The timestamp when script initialization began (max of dom.start or performance.end, or performance.end if no dom.start). */ scriptStart: number; /** * - The timestamp when script loading completed (dom.end or registeredAt if no dom.end). */ scriptEnd: number; /** * - The asset path (if found) for the registered entity. */ asset?: Object | undefined; /** * - The type of timing associated with the registered entity, 'script' or 'link' if found with the performance resource API, 'fetch' for dynamic imports, 'inline' if found to be associated with the root document URL, or 'unknown' if no associated resource could be found. */ type: string; }; //# sourceMappingURL=register-api-types.d.ts.map