Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
import type { Payload } from '../../types/index.js';
|
|
import type { AdminInitEvent } from './events/adminInit.js';
|
|
import type { ServerInitEvent } from './events/serverInit.js';
|
|
export type BaseEvent = {
|
|
ciName: null | string;
|
|
dbAdapter: string;
|
|
emailAdapter: null | string;
|
|
envID: string;
|
|
isCI: boolean;
|
|
locales: string[];
|
|
localizationDefaultLocale: null | string;
|
|
localizationEnabled: boolean;
|
|
nodeEnv: string;
|
|
nodeVersion: string;
|
|
payloadVersion: string;
|
|
projectID: string;
|
|
projectIDSource: 'cwd' | 'git' | 'packageJSON' | 'serverURL';
|
|
uploadAdapters: string[];
|
|
};
|
|
type PackageJSON = {
|
|
dependencies: Record<string, string | undefined>;
|
|
name: string;
|
|
};
|
|
type TelemetryEvent = AdminInitEvent | ServerInitEvent;
|
|
type Args = {
|
|
event: TelemetryEvent;
|
|
payload: Payload;
|
|
};
|
|
export declare const sendEvent: ({ event, payload }: Args) => Promise<void>;
|
|
export declare const getPayloadVersion: (packageJSON: PackageJSON) => string;
|
|
export declare const getLocalizationInfo: (payload: Payload) => Pick<BaseEvent, "locales" | "localizationDefaultLocale" | "localizationEnabled">;
|
|
export {};
|
|
//# sourceMappingURL=index.d.ts.map |