@lynx-seo/engine 3.3.2 → 3.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -22
- package/dist/http-middleware.d.ts +91 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +5425 -155
- package/dist/index.mjs +5425 -155
- package/dist/plugin/rum-plugin.d.ts +1 -1
- package/dist/plugins/early-access-features/index.d.ts +6 -1
- package/dist/plugins/llm-observability/index.d.ts +0 -1
- package/dist/plugins/mobile-messaging/index.d.ts +1 -1
- package/dist/plugins/page-performance/index.d.ts +1 -1
- package/dist/plugins/real-time-usage/index.d.ts +24 -5
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ export declare class RUMPlugin implements LynxSeoPlugin {
|
|
|
17
17
|
private ctx?;
|
|
18
18
|
enable(ctx: RUMPluginContext): Promise<void>;
|
|
19
19
|
onEvent(event: PluginEvent): Promise<void>;
|
|
20
|
-
aggregate(siteId: string, pageUrl?: string): import("
|
|
20
|
+
aggregate(siteId: string, pageUrl?: string): import("..").PagePerformanceAggregated | null;
|
|
21
21
|
getSamples(siteId: string, limit?: number): NavigationTimingMetrics[];
|
|
22
22
|
countSamples(siteId: string): number;
|
|
23
23
|
disable(): Promise<void>;
|
|
@@ -42,7 +42,12 @@ export declare class EarlyAccessFeaturesPlugin implements LynxSeoPlugin {
|
|
|
42
42
|
private userOptIns;
|
|
43
43
|
private feedbacks;
|
|
44
44
|
constructor();
|
|
45
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Catalogue produit des fonctionnalités beta/alpha exposées à l'opt-in.
|
|
47
|
+
* Les compteurs démarrent à zéro : seules les inscriptions et notes réelles
|
|
48
|
+
* les alimentent, aucun utilisateur de démonstration n'est pré-inscrit.
|
|
49
|
+
*/
|
|
50
|
+
private registerCatalogFeatures;
|
|
46
51
|
enable(_ctx: PluginContext): Promise<void>;
|
|
47
52
|
onEvent(event: PluginEvent): Promise<void>;
|
|
48
53
|
toggleUserOptIn(userId: string, featureId: string, optIn: boolean): boolean;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* validation E.164, vérification par code à 6 chiffres et calcul GSM 7-bit vs UCS-2.
|
|
7
7
|
*/
|
|
8
8
|
import type { LynxSeoPlugin, PluginManifest, PluginContext, PluginEvent } from "../../plugin/types";
|
|
9
|
-
export type SmsProviderType = "twilio" | "infobip" | "sinch" | "webhook"
|
|
9
|
+
export type SmsProviderType = "twilio" | "infobip" | "sinch" | "webhook";
|
|
10
10
|
export interface SmsProviderConfig {
|
|
11
11
|
provider: SmsProviderType;
|
|
12
12
|
accountSid?: string;
|
|
@@ -15,7 +15,7 @@ export declare class RUMPlugin implements LynxSeoPlugin {
|
|
|
15
15
|
/**
|
|
16
16
|
* Agrège les métriques RUM pour un site (et optionnellement une page).
|
|
17
17
|
*/
|
|
18
|
-
aggregate(siteId: string, pageUrl?: string): import("
|
|
18
|
+
aggregate(siteId: string, pageUrl?: string): import("../..").PagePerformanceAggregated | null;
|
|
19
19
|
/**
|
|
20
20
|
* Récupère les échantillons RUM bruts pour un site.
|
|
21
21
|
*/
|
|
@@ -47,6 +47,23 @@ export interface RealTimeUsageReport {
|
|
|
47
47
|
averageEventsPerSecond: number;
|
|
48
48
|
peakEventsPerSecond: number;
|
|
49
49
|
}
|
|
50
|
+
export interface RealTimeUsageInput {
|
|
51
|
+
/** Events stored since the first day of the current month. */
|
|
52
|
+
currentMonthEvents: number;
|
|
53
|
+
planQuota: number;
|
|
54
|
+
/** Events stored during the last hour. */
|
|
55
|
+
eventsLastHour: number;
|
|
56
|
+
/** Real per-minute counts, oldest first; timestamps are ISO. */
|
|
57
|
+
minuteBuckets: Array<{
|
|
58
|
+
timestamp: string;
|
|
59
|
+
count: number;
|
|
60
|
+
}>;
|
|
61
|
+
topEventCounts: Array<{
|
|
62
|
+
eventName: string;
|
|
63
|
+
count: number;
|
|
64
|
+
estimatedPayloadKb: number;
|
|
65
|
+
}>;
|
|
66
|
+
}
|
|
50
67
|
export declare class RealTimeUsagePlugin implements LynxSeoPlugin {
|
|
51
68
|
manifest: PluginManifest;
|
|
52
69
|
private maxThresholdPerMinute;
|
|
@@ -59,9 +76,11 @@ export declare class RealTimeUsagePlugin implements LynxSeoPlugin {
|
|
|
59
76
|
setSamplingRate(rate: number): void;
|
|
60
77
|
resetCircuitBreaker(): void;
|
|
61
78
|
triggerSpikeProtection(reason: string, emergencySamplingRate?: number): void;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Every figure below is computed from stored events. The plugin refuses to
|
|
81
|
+
* invent throughput or event breakdown when the caller has no real data:
|
|
82
|
+
* an empty input yields zeros and empty series, never a plausible-looking
|
|
83
|
+
* sample.
|
|
84
|
+
*/
|
|
85
|
+
calculateUsageReport(projectId: string, input: RealTimeUsageInput): RealTimeUsageReport;
|
|
67
86
|
}
|