@hawk.so/types 0.2.0 → 0.4.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/.github/workflows/bump-version.yml +4 -4
- package/.github/workflows/lint-and-build.yml +4 -4
- package/.github/workflows/npm-publish.yml +4 -4
- package/.nvmrc +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +6 -1
- package/build/src/base/businessOperation/businessOperation.d.ts +4 -4
- package/build/src/base/businessOperation/businessOperation.js +4 -4
- package/build/src/base/event/addons/default.d.ts +1 -1
- package/build/src/base/event/addons/index.d.ts +9 -9
- package/build/src/base/event/addons/javascript.d.ts +2 -2
- package/build/src/base/event/addons/php.d.ts +1 -1
- package/build/src/base/event/addons/sentry.js +1 -0
- package/build/src/base/event/backtraceFrame.d.ts +1 -1
- package/build/src/base/event/breadcrumb.d.ts +3 -6
- package/build/src/base/event/event.d.ts +5 -10
- package/build/src/base/integrations/integrationToken.d.ts +1 -1
- package/build/src/catchers/catcher-message.d.ts +30 -9
- package/build/src/dbScheme/businessOperation.d.ts +2 -2
- package/build/src/dbScheme/groupedEvent.d.ts +12 -6
- package/build/src/dbScheme/membership.d.ts +2 -2
- package/build/src/dbScheme/notificationsChannels.d.ts +1 -1
- package/build/src/dbScheme/plan.d.ts +1 -1
- package/build/src/dbScheme/project.d.ts +3 -4
- package/build/src/dbScheme/projectEventGroupingPattern.d.ts +5 -1
- package/build/src/dbScheme/projectNotificationsRule.d.ts +3 -3
- package/build/src/dbScheme/release.d.ts +2 -7
- package/build/src/dbScheme/repetition.d.ts +13 -4
- package/build/src/dbScheme/sourceMap.d.ts +3 -7
- package/build/src/dbScheme/sso.d.ts +77 -0
- package/build/src/dbScheme/sso.js +5 -0
- package/build/src/dbScheme/user.d.ts +23 -3
- package/build/src/dbScheme/userNotifications.d.ts +1 -1
- package/build/src/dbScheme/workspace.d.ts +6 -1
- package/build/src/notifications/createProjectNotifications.d.ts +2 -2
- package/build/src/notifications/receiveTypes.js +1 -1
- package/build/src/notifications/updateProjectNotifications.d.ts +2 -2
- package/build/src/notifications/userNotification.js +1 -1
- package/build/src/utils/index.d.ts +2 -2
- package/eslint.config.mjs +34 -0
- package/index.ts +1 -0
- package/package.json +11 -6
- package/src/auth/tokensPair.ts +9 -9
- package/src/base/businessOperation/businessOperation.ts +8 -8
- package/src/base/event/addons/default.ts +1 -1
- package/src/base/event/addons/index.ts +11 -12
- package/src/base/event/addons/javascript.ts +2 -2
- package/src/base/event/addons/php.ts +1 -1
- package/src/base/event/addons/sentry.ts +3 -1
- package/src/base/event/affectedUser.ts +16 -16
- package/src/base/event/backtraceFrame.ts +25 -25
- package/src/base/event/breadcrumb.ts +5 -9
- package/src/base/event/event.ts +53 -59
- package/src/base/event/sourceCodeLine.ts +8 -8
- package/src/base/performance/performance.ts +1 -1
- package/src/catchers/catcher-message.ts +29 -8
- package/src/dbScheme/businessOperation.ts +26 -26
- package/src/dbScheme/groupedEvent.ts +52 -46
- package/src/dbScheme/membership.ts +24 -27
- package/src/dbScheme/notificationsChannelSettings.ts +12 -12
- package/src/dbScheme/notificationsChannels.ts +25 -25
- package/src/dbScheme/plan.ts +30 -30
- package/src/dbScheme/project.ts +3 -4
- package/src/dbScheme/projectEventGroupingPattern.ts +8 -4
- package/src/dbScheme/projectNotificationsRule.ts +52 -52
- package/src/dbScheme/release.ts +3 -8
- package/src/dbScheme/repetition.ts +39 -30
- package/src/dbScheme/sourceMap.ts +4 -8
- package/src/dbScheme/sso.ts +88 -0
- package/src/dbScheme/user.ts +25 -3
- package/src/dbScheme/userNotifications.ts +9 -9
- package/src/dbScheme/workspace.ts +84 -78
- package/src/notifications/createProjectNotifications.ts +27 -27
- package/src/notifications/receiveTypes.ts +8 -8
- package/src/notifications/updateProjectNotifications.ts +26 -26
- package/src/notifications/userNotification.ts +12 -12
- package/src/utils/index.ts +1 -1
- package/.eslintrc +0 -12
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SSO configuration types for database schema
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* SAML attribute mapping configuration
|
|
6
|
+
*/
|
|
7
|
+
export interface SamlAttributeMapping {
|
|
8
|
+
/**
|
|
9
|
+
* Attribute name for email in SAML Assertion
|
|
10
|
+
* @example "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
|
|
11
|
+
* to get email from XML like this:
|
|
12
|
+
* <Attribute Name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress">
|
|
13
|
+
* <AttributeValue>alice@company.com</AttributeValue>
|
|
14
|
+
* </Attribute>
|
|
15
|
+
*/
|
|
16
|
+
email: string;
|
|
17
|
+
/**
|
|
18
|
+
* Attribute name for user name in SAML Assertion
|
|
19
|
+
*/
|
|
20
|
+
name?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* SAML SSO configuration
|
|
24
|
+
*/
|
|
25
|
+
export interface SamlConfig {
|
|
26
|
+
/**
|
|
27
|
+
* IdP Entity ID.
|
|
28
|
+
* Used to validate "this response is intended for Hawk"
|
|
29
|
+
* @example "urn:hawk:tracker:saml"
|
|
30
|
+
*/
|
|
31
|
+
idpEntityId: string;
|
|
32
|
+
/**
|
|
33
|
+
* SSO URL for redirecting user to IdP
|
|
34
|
+
* Used to redirect user to IdP for authentication
|
|
35
|
+
* @example "https://idp.example.com/sso"
|
|
36
|
+
*/
|
|
37
|
+
ssoUrl: string;
|
|
38
|
+
/**
|
|
39
|
+
* X.509 certificate for signature verification
|
|
40
|
+
* @example "-----BEGIN CERTIFICATE-----\nMIIDYjCCAkqgAwIBAgI...END CERTIFICATE-----"
|
|
41
|
+
*/
|
|
42
|
+
x509Cert: string;
|
|
43
|
+
/**
|
|
44
|
+
* Desired NameID format
|
|
45
|
+
* @example "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
|
|
46
|
+
*/
|
|
47
|
+
nameIdFormat?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Attribute mapping configuration
|
|
50
|
+
* Used to extract user attributes from SAML Response
|
|
51
|
+
*/
|
|
52
|
+
attributeMapping: SamlAttributeMapping;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* SSO configuration for workspace
|
|
56
|
+
*/
|
|
57
|
+
export interface WorkspaceSsoConfig {
|
|
58
|
+
/**
|
|
59
|
+
* Is SSO enabled
|
|
60
|
+
*/
|
|
61
|
+
enabled: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Is SSO enforced (only SSO login allowed)
|
|
64
|
+
* If true, login via email/password is not allowed
|
|
65
|
+
*/
|
|
66
|
+
enforced: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* SSO provider type
|
|
69
|
+
* Currently only SAML is supported. In future we can add other providers (OAuth 2, etc.)
|
|
70
|
+
*/
|
|
71
|
+
type: 'saml';
|
|
72
|
+
/**
|
|
73
|
+
* SAML-specific configuration.
|
|
74
|
+
* Got from IdP metadata.
|
|
75
|
+
*/
|
|
76
|
+
saml: SamlConfig;
|
|
77
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ObjectId } from '
|
|
2
|
-
import { UserNotificationsDBScheme } from '../../index';
|
|
3
|
-
import { BankCard } from './bankCard';
|
|
1
|
+
import type { ObjectId } from 'bson';
|
|
2
|
+
import type { UserNotificationsDBScheme } from '../../index.ts';
|
|
3
|
+
import type { BankCard } from './bankCard.ts';
|
|
4
4
|
/**
|
|
5
5
|
* Interface representing how user is stored in DB
|
|
6
6
|
*/
|
|
@@ -67,4 +67,24 @@ export interface UserDBScheme {
|
|
|
67
67
|
*/
|
|
68
68
|
term?: string;
|
|
69
69
|
};
|
|
70
|
+
/**
|
|
71
|
+
* External identities for SSO (keyed by workspaceId)
|
|
72
|
+
*/
|
|
73
|
+
identities?: {
|
|
74
|
+
[workspaceId: string]: {
|
|
75
|
+
/**
|
|
76
|
+
* SAML-mode params
|
|
77
|
+
*/
|
|
78
|
+
saml: {
|
|
79
|
+
/**
|
|
80
|
+
* NameID value from IdP (stable identifier)
|
|
81
|
+
*/
|
|
82
|
+
id: string;
|
|
83
|
+
/**
|
|
84
|
+
* Email at the time of linking (for audit)
|
|
85
|
+
*/
|
|
86
|
+
email: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
70
90
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NotificationsChannelsDBScheme, UserNotificationType } from
|
|
1
|
+
import type { NotificationsChannelsDBScheme, UserNotificationType } from '../../index.ts';
|
|
2
2
|
/**
|
|
3
3
|
* This structure represents how user notifications are stored at the DB (in 'users' collection)
|
|
4
4
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ObjectId } from
|
|
1
|
+
import type { ObjectId } from 'bson';
|
|
2
|
+
import type { WorkspaceSsoConfig } from './sso.ts';
|
|
2
3
|
/**
|
|
3
4
|
* Workspace representation in DataBase
|
|
4
5
|
*/
|
|
@@ -68,4 +69,8 @@ export interface WorkspaceDBScheme {
|
|
|
68
69
|
lastNotificationDate?: {
|
|
69
70
|
[key: string]: Date;
|
|
70
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* SSO configuration (optional, only for workspaces with SSO enabled)
|
|
74
|
+
*/
|
|
75
|
+
sso?: WorkspaceSsoConfig;
|
|
71
76
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReceiveTypes } from
|
|
2
|
-
import { NotificationsChannelsDBScheme } from
|
|
1
|
+
import type { ReceiveTypes } from '../../index.ts';
|
|
2
|
+
import type { NotificationsChannelsDBScheme } from '../dbScheme/notificationsChannels.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Payload for creating new notification rule
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReceiveTypes } from
|
|
2
|
-
import { NotificationsChannelsDBScheme } from
|
|
1
|
+
import type { ReceiveTypes } from '../../index.ts';
|
|
2
|
+
import type { NotificationsChannelsDBScheme } from '../dbScheme/notificationsChannels.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Payload for updating existing notifications rule
|
|
5
5
|
*/
|
|
@@ -18,4 +18,4 @@ var UserNotificationType;
|
|
|
18
18
|
* Only important messages from Hawk team
|
|
19
19
|
*/
|
|
20
20
|
UserNotificationType["SystemMessages"] = "SystemMessages";
|
|
21
|
-
})(UserNotificationType
|
|
21
|
+
})(UserNotificationType || (exports.UserNotificationType = UserNotificationType = {}));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Represents simple JSON-like document
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type Json = {
|
|
5
5
|
[key: string]: JsonNode;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* Represents possible field values in Dict
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type JsonNode = string | number | boolean | Json;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import codex from 'eslint-config-codex';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
7
|
+
|
|
8
|
+
export default [
|
|
9
|
+
...codex,
|
|
10
|
+
{
|
|
11
|
+
languageOptions: {
|
|
12
|
+
parserOptions: {
|
|
13
|
+
project: path.resolve(__dirname, 'tsconfig.json'),
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
rules: {
|
|
17
|
+
'object-curly-spacing': ['error', 'always'],
|
|
18
|
+
'@typescript-eslint/no-empty-interface': 'off',
|
|
19
|
+
'@typescript-eslint/no-empty-object-type': ['error', { allowInterfaces: 'always' }],
|
|
20
|
+
'@typescript-eslint/naming-convention': [
|
|
21
|
+
'error',
|
|
22
|
+
{
|
|
23
|
+
selector: 'property',
|
|
24
|
+
filter: {
|
|
25
|
+
regex: '^_id$',
|
|
26
|
+
match: true,
|
|
27
|
+
},
|
|
28
|
+
format: null,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
|
package/index.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * from "./src/dbScheme/user";
|
|
|
28
28
|
export * from "./src/dbScheme/userNotifications";
|
|
29
29
|
export * from "./src/dbScheme/workspace";
|
|
30
30
|
export * from "./src/dbScheme/bankCard";
|
|
31
|
+
export * from "./src/dbScheme/sso";
|
|
31
32
|
export * from "./src/dbScheme/projectEventGroupingPattern";
|
|
32
33
|
|
|
33
34
|
export * from "./src/notifications/createProjectNotifications";
|
package/package.json
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hawk.so/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "TypeScript definitions for Hawk",
|
|
5
5
|
"types": "build/index.d.ts",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"repository": "https://github.com/codex-team/hawk.types.git",
|
|
8
8
|
"license": "AGPL-3.0-only",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": "24.x",
|
|
11
|
+
"yarn": ">=1.22.0"
|
|
12
|
+
},
|
|
13
|
+
"packageManager": "yarn@1.22.0",
|
|
9
14
|
"scripts": {
|
|
10
|
-
"lint": "eslint src/ --
|
|
15
|
+
"lint": "eslint src/ --fix",
|
|
11
16
|
"build": "tsc"
|
|
12
17
|
},
|
|
13
18
|
"dependencies": {
|
|
14
|
-
"
|
|
19
|
+
"bson": "^7.0.0"
|
|
15
20
|
},
|
|
16
21
|
"devDependencies": {
|
|
17
|
-
"eslint": "^
|
|
18
|
-
"eslint-config-codex": "^
|
|
19
|
-
"typescript": "^
|
|
22
|
+
"eslint": "^9.39.2",
|
|
23
|
+
"eslint-config-codex": "^2.0.3",
|
|
24
|
+
"typescript": "^5.9.3"
|
|
20
25
|
}
|
|
21
26
|
}
|
package/src/auth/tokensPair.ts
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Authorization by access token and refreshing pair by refresh token (after access token was expired).
|
|
4
4
|
*/
|
|
5
5
|
export interface TokensPair {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
/**
|
|
7
|
+
* User's access token
|
|
8
|
+
*/
|
|
9
|
+
accessToken: string;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
11
|
+
/**
|
|
12
|
+
* User's refresh token for getting new tokens pair
|
|
13
|
+
*/
|
|
14
|
+
refreshToken: string;
|
|
15
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ObjectId } from '
|
|
1
|
+
import type { ObjectId } from 'bson';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Business operations statuses
|
|
@@ -7,17 +7,17 @@ export enum BusinessOperationStatus {
|
|
|
7
7
|
/**
|
|
8
8
|
* Business operation is pending
|
|
9
9
|
*/
|
|
10
|
-
Pending='PENDING',
|
|
10
|
+
Pending = 'PENDING',
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Business operation is confirmed
|
|
14
14
|
*/
|
|
15
|
-
Confirmed='CONFIRMED',
|
|
15
|
+
Confirmed = 'CONFIRMED',
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Business operation is rejected
|
|
19
19
|
*/
|
|
20
|
-
Rejected='REJECTED'
|
|
20
|
+
Rejected = 'REJECTED'
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -34,13 +34,13 @@ export enum BusinessOperationType {
|
|
|
34
34
|
*/
|
|
35
35
|
DepositByUser = 'DEPOSIT_BY_USER',
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
* Charge minimal amount of money to link a card for further recurrent payments
|
|
38
|
+
*/
|
|
39
39
|
CardLinkCharge = 'CARD_LINK_CHARGE',
|
|
40
40
|
/**
|
|
41
41
|
* Refund the money that were charged to link a card
|
|
42
42
|
*/
|
|
43
|
-
CardLinkRefund = 'CARD_LINK_REFUND'
|
|
43
|
+
CardLinkRefund = 'CARD_LINK_REFUND'
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -100,7 +100,7 @@ export interface PayloadOfWorkspacePlanPurchase {
|
|
|
100
100
|
/**
|
|
101
101
|
* Id of the workspace tariff plan
|
|
102
102
|
*/
|
|
103
|
-
tariffPlanId: ObjectId
|
|
103
|
+
tariffPlanId: ObjectId;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { JavaScriptAddons, WindowData, VueIntegrationAddons, BeautifiedUserAgent, ConsoleLogEvent } from './javascript';
|
|
2
|
-
import { PhpAddons } from './php';
|
|
3
|
-
import { NodeJSAddons } from './nodejs';
|
|
4
|
-
import { GoAddons } from './go';
|
|
5
|
-
import { PythonAddons } from './python';
|
|
6
|
-
import { DefaultAddons } from './default';
|
|
7
|
-
import { SentryAddons } from './sentry';
|
|
1
|
+
import type { JavaScriptAddons, WindowData, VueIntegrationAddons, BeautifiedUserAgent, ConsoleLogEvent } from './javascript.ts';
|
|
2
|
+
import type { PhpAddons } from './php.ts';
|
|
3
|
+
import type { NodeJSAddons } from './nodejs.ts';
|
|
4
|
+
import type { GoAddons } from './go.ts';
|
|
5
|
+
import type { PythonAddons } from './python.ts';
|
|
6
|
+
import type { DefaultAddons } from './default.ts';
|
|
7
|
+
import type { SentryAddons } from './sentry.ts';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Union Type describing all catcher-specific additional data
|
|
@@ -16,11 +16,10 @@ type EventAddons =
|
|
|
16
16
|
| NodeJSAddons
|
|
17
17
|
| GoAddons
|
|
18
18
|
| PythonAddons
|
|
19
|
-
| DefaultAddons
|
|
20
|
-
| SentryAddons;
|
|
21
19
|
|
|
20
|
+
| SentryAddons;
|
|
22
21
|
|
|
23
|
-
export {
|
|
22
|
+
export type {
|
|
24
23
|
WindowData,
|
|
25
24
|
VueIntegrationAddons,
|
|
26
25
|
BeautifiedUserAgent,
|
|
@@ -32,5 +31,5 @@ export {
|
|
|
32
31
|
NodeJSAddons,
|
|
33
32
|
GoAddons,
|
|
34
33
|
PythonAddons,
|
|
35
|
-
SentryAddons
|
|
36
|
-
}
|
|
34
|
+
SentryAddons
|
|
35
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable jsdoc/require-jsdoc */
|
|
2
2
|
/**
|
|
3
3
|
* Additional data extracted from the Sentry event payload
|
|
4
4
|
*/
|
|
@@ -17,6 +17,7 @@ export interface SentryAddons {
|
|
|
17
17
|
request?: {
|
|
18
18
|
url?: string;
|
|
19
19
|
method?: string;
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
21
|
data?: any;
|
|
21
22
|
query_string?: string | {
|
|
22
23
|
[key: string]: string;
|
|
@@ -41,3 +42,4 @@ export interface SentryAddons {
|
|
|
41
42
|
};
|
|
42
43
|
extra?: Record<string, unknown>;
|
|
43
44
|
}
|
|
45
|
+
/* eslint-enable jsdoc/require-jsdoc */
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
* Represents affected user object
|
|
3
3
|
*/
|
|
4
4
|
export interface AffectedUser {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Internal user's identifier inside an app
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
/**
|
|
11
|
+
* User public name
|
|
12
|
+
*/
|
|
13
|
+
name?: string;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
/**
|
|
16
|
+
* URL for user's details page
|
|
17
|
+
*/
|
|
18
|
+
url?: string;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
/**
|
|
21
|
+
* User's public picture
|
|
22
|
+
*/
|
|
23
|
+
photo?: string;
|
|
24
24
|
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { SourceCodeLine } from
|
|
1
|
+
import type { SourceCodeLine } from './sourceCodeLine.ts';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Single item of backtrace
|
|
5
5
|
*/
|
|
6
6
|
export interface BacktraceFrame {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
/**
|
|
8
|
+
* File
|
|
9
|
+
*/
|
|
10
|
+
file: string;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Line number
|
|
14
|
+
*/
|
|
15
|
+
line: number;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Column number
|
|
19
|
+
*/
|
|
20
|
+
column?: number;
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Sibling source code lines: some above and some below
|
|
24
|
+
*/
|
|
25
|
+
sourceCode?: SourceCodeLine[];
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Function name extracted from current stack frame
|
|
29
|
+
*/
|
|
30
|
+
function?: string;
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Function arguments extracted from current stack frame
|
|
34
|
+
*/
|
|
35
|
+
arguments?: string[];
|
|
36
36
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Json } from '../../utils';
|
|
1
|
+
import type { Json } from '../../utils/index.ts';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Breadcrumb severity level
|
|
@@ -11,11 +11,11 @@ export type BreadcrumbLevel = 'fatal' | 'error' | 'warning' | 'info' | 'debug';
|
|
|
11
11
|
*/
|
|
12
12
|
export type BreadcrumbType =
|
|
13
13
|
| 'default'
|
|
14
|
-
| 'request'
|
|
15
|
-
| 'ui'
|
|
14
|
+
| 'request' // fetch, xhr, db calls, etc
|
|
15
|
+
| 'ui' // click, mousemove, scroll, etc
|
|
16
16
|
| 'navigation' // page open, route change, etc
|
|
17
|
-
| 'logic'
|
|
18
|
-
| 'error';
|
|
17
|
+
| 'logic' // gql resolvers, internal methods calls, etc
|
|
18
|
+
| 'error'; // errors, exceptions, etc
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Single breadcrumb entry - represents an event that occurred before the error
|
|
@@ -26,7 +26,6 @@ export interface Breadcrumb {
|
|
|
26
26
|
* Unix timestamp in milliseconds since epoch (e.g., 1701867896789)
|
|
27
27
|
*
|
|
28
28
|
* Note: This field uses milliseconds format
|
|
29
|
-
*
|
|
30
29
|
* @example 1701867896789
|
|
31
30
|
*/
|
|
32
31
|
timestamp: number;
|
|
@@ -44,7 +43,6 @@ export interface Breadcrumb {
|
|
|
44
43
|
* - For type='request': "fetch", "xhr", "db.query", "db.insert"
|
|
45
44
|
* - For type='logic': "gql.resolver", "service.method", "middleware.auth"
|
|
46
45
|
* - For type='navigation': "history.push", "history.replace", "route.change"
|
|
47
|
-
*
|
|
48
46
|
* @example "ui.click"
|
|
49
47
|
* @example "fetch"
|
|
50
48
|
* @example "gql.resolver"
|
|
@@ -53,7 +51,6 @@ export interface Breadcrumb {
|
|
|
53
51
|
|
|
54
52
|
/**
|
|
55
53
|
* Human-readable message describing the event
|
|
56
|
-
*
|
|
57
54
|
* @example "GET /api/profile 200"
|
|
58
55
|
* @example "Click on button#submit"
|
|
59
56
|
* @example "Navigated to /dashboard"
|
|
@@ -71,4 +68,3 @@ export interface Breadcrumb {
|
|
|
71
68
|
*/
|
|
72
69
|
data?: Record<string, Json>;
|
|
73
70
|
}
|
|
74
|
-
|