@abyss-project/commons-front-core 8.0.0 → 8.1.0
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 +40 -1
- package/dist/index.js +1439 -1373
- package/dist/rum/abyss-main-session-path.d.ts +13 -0
- package/dist/rum/abyss-main-session-path.spec.d.ts +1 -0
- package/dist/rum/feedback-ticket.d.ts +7 -0
- package/dist/rum/index.d.ts +5 -0
- package/dist/rum/route-resolver.d.ts +7 -0
- package/dist/rum/route-resolver.spec.d.ts +1 -0
- package/dist/rum/rum-provider-config.d.ts +39 -0
- package/dist/rum/rum-provider-config.spec.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** The route of a RUM session page in abyss-main's front. */
|
|
2
|
+
export declare const ABYSS_MAIN_RUM_SESSION_ROUTE: "/org/:orgId/project/:projectId/application/:applicationId/monitor/rum/sessions/:sessionId";
|
|
3
|
+
/** The Monitor application a session belongs to, in abyss-main's front. */
|
|
4
|
+
export interface AbyssMainRumSessionContext {
|
|
5
|
+
orgId: string;
|
|
6
|
+
projectId: string;
|
|
7
|
+
applicationId: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The path of a session page; `t` (seconds since the start of the session, floored, never
|
|
11
|
+
* negative) opens it at that instant (§35.8). The session id is URI-encoded.
|
|
12
|
+
*/
|
|
13
|
+
export declare const abyssMainRumSessionPath: ({ orgId, projectId, applicationId }: AbyssMainRumSessionContext, sessionId: string, t?: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,6 +9,13 @@ export interface AbyssRumFeedbackTicket {
|
|
|
9
9
|
appName: string;
|
|
10
10
|
/** The Monitor page of the session at the instant of the feedback. */
|
|
11
11
|
sessionUrl: (sessionId: string, offsetMs: number) => string;
|
|
12
|
+
/**
|
|
13
|
+
* The language the front is read in at the instant of the feedback (`fr`, `en-GB`…): the
|
|
14
|
+
* language of the intake's follow-up e-mails. Read at each feedback, so a language switched after
|
|
15
|
+
* start is followed. Without it, or for a language the intake does not speak, none is sent and the
|
|
16
|
+
* intake uses its default.
|
|
17
|
+
*/
|
|
18
|
+
locale?: () => string | undefined;
|
|
12
19
|
}
|
|
13
20
|
/** The signed-in user of the front, when there is one: the reporter of last resort. */
|
|
14
21
|
export interface FeedbackAccount {
|
package/dist/rum/index.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export * from './AbyssRumProvider';
|
|
2
2
|
export type { AbyssRumFeedbackTicket } from './feedback-ticket';
|
|
3
|
+
export { createRouteResolver } from './route-resolver';
|
|
4
|
+
export { ABYSS_MAIN_RUM_SESSION_ROUTE, abyssMainRumSessionPath, } from './abyss-main-session-path';
|
|
5
|
+
export type { AbyssMainRumSessionContext } from './abyss-main-session-path';
|
|
6
|
+
export { buildAbyssRumProviderConfig } from './rum-provider-config';
|
|
7
|
+
export type { AbyssRumProviderConfigInput } from './rum-provider-config';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The SDK's `routeResolver` over the front's full route templates. The templates are ranked as
|
|
3
|
+
* react-router ranks its routes: a static segment beats a parameter, a parameter beats a splat, so
|
|
4
|
+
* the most precise template wins whatever the order of the list. A URL no template matches resolves
|
|
5
|
+
* to its own `pathname` (the SDK masks it).
|
|
6
|
+
*/
|
|
7
|
+
export declare const createRouteResolver: (patterns: readonly string[]) => ((location: Location) => string);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AbyssRumProviderConfig } from './AbyssRumProvider';
|
|
2
|
+
/** The raw config values of a front's RUM; an empty string counts as not set. */
|
|
3
|
+
export interface AbyssRumProviderConfigInput {
|
|
4
|
+
/** Public RUM token of the front's environment (`VITE_ABYSS_MONITOR_RUM_TOKEN`). */
|
|
5
|
+
token: string | undefined;
|
|
6
|
+
/** The Monitor application of the front's API. */
|
|
7
|
+
applicationId: string | undefined;
|
|
8
|
+
/** Monitor's API URL; only its origin is kept. */
|
|
9
|
+
monitorApiUrl: string | undefined;
|
|
10
|
+
/** The front's own API URL: the relay, and an instrumented origin. */
|
|
11
|
+
apiUrl: string | undefined;
|
|
12
|
+
/** abyss-main's API URL: an instrumented origin (the same as `apiUrl` for abyss-main's front). */
|
|
13
|
+
mainApiUrl: string | undefined;
|
|
14
|
+
/** `true` for a front that calls Monitor's API itself (abyss-main's): Monitor is instrumented too. */
|
|
15
|
+
instrumentMonitorApi?: boolean;
|
|
16
|
+
/** Commit SHA of the build (`VITE_RELEASE`); empty: the sessions carry no release. */
|
|
17
|
+
release: string | undefined;
|
|
18
|
+
/** The front's full route templates, as its router mounts them (`/org/:orgId/boards/:boardId`). */
|
|
19
|
+
routeTemplates: readonly string[];
|
|
20
|
+
/** Product name, in the title of a feedback ticket (`AbyssCloud`). */
|
|
21
|
+
appName: string;
|
|
22
|
+
/** abyss-main's front URL, where the session page lives; only its origin is kept. */
|
|
23
|
+
mainFrontUrl: string | undefined;
|
|
24
|
+
/** Slug of the Internal Tickets intake the feedback is filed in. */
|
|
25
|
+
feedbackIntakeSlug: string | undefined;
|
|
26
|
+
/** Section of that intake. */
|
|
27
|
+
feedbackSectionId: string | undefined;
|
|
28
|
+
/** Organization of the Monitor application, in the session page's path. */
|
|
29
|
+
organizationId: string | undefined;
|
|
30
|
+
/** Project of the Monitor application, in the session page's path. */
|
|
31
|
+
projectId: string | undefined;
|
|
32
|
+
/** The front's current language, read at each feedback (see `AbyssRumFeedbackTicket.locale`). */
|
|
33
|
+
locale?: () => string | undefined;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The provider's options, `null` when the token, the application, Monitor's API, the front's API or
|
|
37
|
+
* abyss-main's API is not set (nothing to install).
|
|
38
|
+
*/
|
|
39
|
+
export declare const buildAbyssRumProviderConfig: (input: AbyssRumProviderConfigInput) => AbyssRumProviderConfig | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abyss-project/commons-front-core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "Front Core package of AbyssProject",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"react-is": "^18.0.0 || ^19.0.0",
|
|
81
81
|
"react-router-dom": "^6.15.0",
|
|
82
82
|
"zustand": "^5.0.0",
|
|
83
|
-
"@abyss-project/main": "15.
|
|
83
|
+
"@abyss-project/main": "15.2.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependenciesMeta": {
|
|
86
86
|
"@abyss-project/capacitor-auth": {
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"use-debounce": "^10.0.5",
|
|
131
131
|
"uuid": "^9.0.0",
|
|
132
132
|
"yup": "^0.32.11",
|
|
133
|
-
"@abyss-project/main": "15.
|
|
133
|
+
"@abyss-project/main": "15.2.0"
|
|
134
134
|
},
|
|
135
135
|
"devDependencies": {
|
|
136
136
|
"@abyss-project/cloud": "^2.4.0",
|