@attraccess/application-models 0.0.0-stage → 1.11.0-beta.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 +6 -2
- package/package.json +21 -3
- package/src/index.d.ts +78 -0
- package/src/index.js +82 -0
- package/src/index.js.map +1 -0
- package/src/lib/api-token.d.ts +29 -0
- package/src/lib/api-token.js +3 -0
- package/src/lib/api-token.js.map +1 -0
- package/src/lib/attractap-card.d.ts +48 -0
- package/src/lib/attractap-card.js +3 -0
- package/src/lib/attractap-card.js.map +1 -0
- package/src/lib/attractap-crash-report.d.ts +35 -0
- package/src/lib/attractap-crash-report.js +3 -0
- package/src/lib/attractap-crash-report.js.map +1 -0
- package/src/lib/attractap-installation.d.ts +9 -0
- package/src/lib/attractap-installation.js +3 -0
- package/src/lib/attractap-installation.js.map +1 -0
- package/src/lib/attractap-reader.d.ts +113 -0
- package/src/lib/attractap-reader.js +3 -0
- package/src/lib/attractap-reader.js.map +1 -0
- package/src/lib/attractap-secure-boot.d.ts +17 -0
- package/src/lib/attractap-secure-boot.js +3 -0
- package/src/lib/attractap-secure-boot.js.map +1 -0
- package/src/lib/audit-entry.d.ts +47 -0
- package/src/lib/audit-entry.js +6 -0
- package/src/lib/audit-entry.js.map +1 -0
- package/src/lib/authentication-credential.d.ts +31 -0
- package/src/lib/authentication-credential.js +3 -0
- package/src/lib/authentication-credential.js.map +1 -0
- package/src/lib/authentication-type.d.ts +5 -0
- package/src/lib/authentication-type.js +10 -0
- package/src/lib/authentication-type.js.map +1 -0
- package/src/lib/billing-ledger.d.ts +114 -0
- package/src/lib/billing-ledger.js +3 -0
- package/src/lib/billing-ledger.js.map +1 -0
- package/src/lib/billing-transaction.d.ts +5 -0
- package/src/lib/billing-transaction.js +10 -0
- package/src/lib/billing-transaction.js.map +1 -0
- package/src/lib/companion-device.d.ts +23 -0
- package/src/lib/companion-device.js +3 -0
- package/src/lib/companion-device.js.map +1 -0
- package/src/lib/csv-export-template-record.d.ts +21 -0
- package/src/lib/csv-export-template-record.js +3 -0
- package/src/lib/csv-export-template-record.js.map +1 -0
- package/src/lib/csv-export-template.d.ts +9 -0
- package/src/lib/csv-export-template.js +15 -0
- package/src/lib/csv-export-template.js.map +1 -0
- package/src/lib/dashboard-pins.d.ts +9 -0
- package/src/lib/dashboard-pins.js +3 -0
- package/src/lib/dashboard-pins.js.map +1 -0
- package/src/lib/documentation-type.d.ts +7 -0
- package/src/lib/documentation-type.js +12 -0
- package/src/lib/documentation-type.js.map +1 -0
- package/src/lib/email-template-record.d.ts +17 -0
- package/src/lib/email-template-record.js +3 -0
- package/src/lib/email-template-record.js.map +1 -0
- package/src/lib/email-template.d.ts +18 -0
- package/src/lib/email-template.js +23 -0
- package/src/lib/email-template.js.map +1 -0
- package/src/lib/flow-records.d.ts +77 -0
- package/src/lib/flow-records.js +3 -0
- package/src/lib/flow-records.js.map +1 -0
- package/src/lib/form.d.ts +11 -0
- package/src/lib/form.js +17 -0
- package/src/lib/form.js.map +1 -0
- package/src/lib/mcp-oauth.d.ts +39 -0
- package/src/lib/mcp-oauth.js +3 -0
- package/src/lib/mcp-oauth.js.map +1 -0
- package/src/lib/message.d.ts +4 -0
- package/src/lib/message.js +9 -0
- package/src/lib/message.js.map +1 -0
- package/src/lib/messaging-models.d.ts +52 -0
- package/src/lib/messaging-models.js +3 -0
- package/src/lib/messaging-models.js.map +1 -0
- package/src/lib/metering-records.d.ts +148 -0
- package/src/lib/metering-records.js +3 -0
- package/src/lib/metering-records.js.map +1 -0
- package/src/lib/mqtt-server.d.ts +39 -0
- package/src/lib/mqtt-server.js +3 -0
- package/src/lib/mqtt-server.js.map +1 -0
- package/src/lib/node-type.d.ts +43 -0
- package/src/lib/node-type.js +48 -0
- package/src/lib/node-type.js.map +1 -0
- package/src/lib/notification-preference-record.d.ts +7 -0
- package/src/lib/notification-preference-record.js +3 -0
- package/src/lib/notification-preference-record.js.map +1 -0
- package/src/lib/notification-recipient.d.ts +7 -0
- package/src/lib/notification-recipient.js +3 -0
- package/src/lib/notification-recipient.js.map +1 -0
- package/src/lib/operating-interval.d.ts +33 -0
- package/src/lib/operating-interval.js +3 -0
- package/src/lib/operating-interval.js.map +1 -0
- package/src/lib/passkey.d.ts +28 -0
- package/src/lib/passkey.js +3 -0
- package/src/lib/passkey.js.map +1 -0
- package/src/lib/password-policy-override.d.ts +3 -0
- package/src/lib/password-policy-override.js +8 -0
- package/src/lib/password-policy-override.js.map +1 -0
- package/src/lib/password-policy-records.d.ts +24 -0
- package/src/lib/password-policy-records.js +19 -0
- package/src/lib/password-policy-records.js.map +1 -0
- package/src/lib/password-policy.d.ts +1 -0
- package/src/lib/password-policy.js +5 -0
- package/src/lib/password-policy.js.map +1 -0
- package/src/lib/plugin-ble-endpoint.d.ts +24 -0
- package/src/lib/plugin-ble-endpoint.js +3 -0
- package/src/lib/plugin-ble-endpoint.js.map +1 -0
- package/src/lib/plugin-host-models.d.ts +23 -0
- package/src/lib/plugin-host-models.js +3 -0
- package/src/lib/plugin-host-models.js.map +1 -0
- package/src/lib/project-invitation.d.ts +6 -0
- package/src/lib/project-invitation.js +11 -0
- package/src/lib/project-invitation.js.map +1 -0
- package/src/lib/project-member.d.ts +3 -0
- package/src/lib/project-member.js +8 -0
- package/src/lib/project-member.js.map +1 -0
- package/src/lib/project-record.d.ts +87 -0
- package/src/lib/project-record.js +3 -0
- package/src/lib/project-record.js.map +1 -0
- package/src/lib/push-subscription.d.ts +19 -0
- package/src/lib/push-subscription.js +3 -0
- package/src/lib/push-subscription.js.map +1 -0
- package/src/lib/rbac-record.d.ts +61 -0
- package/src/lib/rbac-record.js +3 -0
- package/src/lib/rbac-record.js.map +1 -0
- package/src/lib/reader-ui-alert.d.ts +15 -0
- package/src/lib/reader-ui-alert.js +3 -0
- package/src/lib/reader-ui-alert.js.map +1 -0
- package/src/lib/resource-actor-user.d.ts +21 -0
- package/src/lib/resource-actor-user.js +3 -0
- package/src/lib/resource-actor-user.js.map +1 -0
- package/src/lib/resource-flow-node/companion-schemas.d.ts +15 -0
- package/src/lib/resource-flow-node/companion-schemas.js +27 -0
- package/src/lib/resource-flow-node/companion-schemas.js.map +1 -0
- package/src/lib/resource-flow-node/external-effect-policy.d.ts +19 -0
- package/src/lib/resource-flow-node/external-effect-policy.js +24 -0
- package/src/lib/resource-flow-node/external-effect-policy.js.map +1 -0
- package/src/lib/resource-flow-node/health-schemas.d.ts +18 -0
- package/src/lib/resource-flow-node/health-schemas.js +34 -0
- package/src/lib/resource-flow-node/health-schemas.js.map +1 -0
- package/src/lib/resource-flow-node/http-schema.d.ts +25 -0
- package/src/lib/resource-flow-node/http-schema.js +20 -0
- package/src/lib/resource-flow-node/http-schema.js.map +1 -0
- package/src/lib/resource-flow-node/metering-schemas.d.ts +28 -0
- package/src/lib/resource-flow-node/metering-schemas.js +48 -0
- package/src/lib/resource-flow-node/metering-schemas.js.map +1 -0
- package/src/lib/resource-flow-node/mqtt-schemas.d.ts +33 -0
- package/src/lib/resource-flow-node/mqtt-schemas.js +43 -0
- package/src/lib/resource-flow-node/mqtt-schemas.js.map +1 -0
- package/src/lib/resource-flow-node/processing-schemas.d.ts +35 -0
- package/src/lib/resource-flow-node/processing-schemas.js +32 -0
- package/src/lib/resource-flow-node/processing-schemas.js.map +1 -0
- package/src/lib/resource-flow-node/resource-schemas.d.ts +27 -0
- package/src/lib/resource-flow-node/resource-schemas.js +44 -0
- package/src/lib/resource-flow-node/resource-schemas.js.map +1 -0
- package/src/lib/resource-flow-node/schema-registry.d.ts +180 -0
- package/src/lib/resource-flow-node/schema-registry.js +80 -0
- package/src/lib/resource-flow-node/schema-registry.js.map +1 -0
- package/src/lib/resource-flow-node/variable-schemas.d.ts +38 -0
- package/src/lib/resource-flow-node/variable-schemas.js +31 -0
- package/src/lib/resource-flow-node/variable-schemas.js.map +1 -0
- package/src/lib/resource-form-records.d.ts +23 -0
- package/src/lib/resource-form-records.js +3 -0
- package/src/lib/resource-form-records.js.map +1 -0
- package/src/lib/resource-health-records.d.ts +12 -0
- package/src/lib/resource-health-records.js +3 -0
- package/src/lib/resource-health-records.js.map +1 -0
- package/src/lib/resource-introducer-records.d.ts +13 -0
- package/src/lib/resource-introducer-records.js +3 -0
- package/src/lib/resource-introducer-records.js.map +1 -0
- package/src/lib/resource-introduction-records.d.ts +43 -0
- package/src/lib/resource-introduction-records.js +3 -0
- package/src/lib/resource-introduction-records.js.map +1 -0
- package/src/lib/resource-maintenance-records.d.ts +54 -0
- package/src/lib/resource-maintenance-records.js +3 -0
- package/src/lib/resource-maintenance-records.js.map +1 -0
- package/src/lib/resource-maintenance-request.d.ts +5 -0
- package/src/lib/resource-maintenance-request.js +10 -0
- package/src/lib/resource-maintenance-request.js.map +1 -0
- package/src/lib/resource-maintenance-schedule.d.ts +11 -0
- package/src/lib/resource-maintenance-schedule.js +17 -0
- package/src/lib/resource-maintenance-schedule.js.map +1 -0
- package/src/lib/resource-metering.d.ts +12 -0
- package/src/lib/resource-metering.js +17 -0
- package/src/lib/resource-metering.js.map +1 -0
- package/src/lib/resource-records.d.ts +33 -0
- package/src/lib/resource-records.js +3 -0
- package/src/lib/resource-records.js.map +1 -0
- package/src/lib/resource-supervision.d.ts +20 -0
- package/src/lib/resource-supervision.js +26 -0
- package/src/lib/resource-supervision.js.map +1 -0
- package/src/lib/resource-type.d.ts +4 -0
- package/src/lib/resource-type.js +9 -0
- package/src/lib/resource-type.js.map +1 -0
- package/src/lib/resourceFlowVariable.d.ts +4 -0
- package/src/lib/resourceFlowVariable.js +9 -0
- package/src/lib/resourceFlowVariable.js.map +1 -0
- package/src/lib/resourceHealthState.d.ts +9 -0
- package/src/lib/resourceHealthState.js +15 -0
- package/src/lib/resourceHealthState.js.map +1 -0
- package/src/lib/resourceIntroducer.d.ts +4 -0
- package/src/lib/resourceIntroducer.js +9 -0
- package/src/lib/resourceIntroducer.js.map +1 -0
- package/src/lib/resourceIntroductionHistoryItem.d.ts +4 -0
- package/src/lib/resourceIntroductionHistoryItem.js +9 -0
- package/src/lib/resourceIntroductionHistoryItem.js.map +1 -0
- package/src/lib/resourceUsage-type.d.ts +6 -0
- package/src/lib/resourceUsage-type.js +11 -0
- package/src/lib/resourceUsage-type.js.map +1 -0
- package/src/lib/session.d.ts +88 -0
- package/src/lib/session.js +3 -0
- package/src/lib/session.js.map +1 -0
- package/src/lib/sso-provider-record.d.ts +61 -0
- package/src/lib/sso-provider-record.js +3 -0
- package/src/lib/sso-provider-record.js.map +1 -0
- package/src/lib/sso-session-context.d.ts +32 -0
- package/src/lib/sso-session-context.js +3 -0
- package/src/lib/sso-session-context.js.map +1 -0
- package/src/lib/ssoProvider-oidc.d.ts +2 -0
- package/src/lib/ssoProvider-oidc.js +6 -0
- package/src/lib/ssoProvider-oidc.js.map +1 -0
- package/src/lib/ssoProvider.d.ts +4 -0
- package/src/lib/ssoProvider.js +9 -0
- package/src/lib/ssoProvider.js.map +1 -0
- package/src/lib/usage-duration-unit.d.ts +5 -0
- package/src/lib/usage-duration-unit.js +10 -0
- package/src/lib/usage-duration-unit.js.map +1 -0
- package/src/lib/usage-session.d.ts +139 -0
- package/src/lib/usage-session.js +3 -0
- package/src/lib/usage-session.js.map +1 -0
- package/src/lib/user-account.d.ts +50 -0
- package/src/lib/user-account.js +3 -0
- package/src/lib/user-account.js.map +1 -0
- package/src/lib/user-record.d.ts +38 -0
- package/src/lib/user-record.js +3 -0
- package/src/lib/user-record.js.map +1 -0
- package/src/lib/user-role.d.ts +4 -0
- package/src/lib/user-role.js +9 -0
- package/src/lib/user-role.js.map +1 -0
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# application-models
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Backend-neutral models, enums and constants that the application, the HTTP/WebSocket contracts and the plugin SDK
|
|
4
|
+
share. Nothing here may import `typeorm`, a database driver or `@attraccess/database-entities`.
|
|
5
|
+
|
|
6
|
+
The SQLite/TypeORM schema (entities, column types, indexes, subscribers) lives in `libs/database-entities` and imports
|
|
7
|
+
from this library, never the other way round. See `docs/development` for the ownership rules.
|
package/package.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attraccess/application-models",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.11.0-beta.4",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"main": "./src/index.js",
|
|
7
|
+
"types": "./src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
"./package.json": "./package.json",
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./src/index.d.ts",
|
|
12
|
+
"import": "./src/index.js",
|
|
13
|
+
"default": "./src/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"src",
|
|
18
|
+
"!**/*.tsbuildinfo"
|
|
19
|
+
],
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"tslib": "^2.8.1",
|
|
22
|
+
"zod": "^4.1.5"
|
|
23
|
+
}
|
|
6
24
|
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export * from './lib/authentication-type';
|
|
2
|
+
export * from './lib/billing-transaction';
|
|
3
|
+
export * from './lib/csv-export-template';
|
|
4
|
+
export * from './lib/documentation-type';
|
|
5
|
+
export * from './lib/email-template';
|
|
6
|
+
export * from './lib/form';
|
|
7
|
+
export * from './lib/message';
|
|
8
|
+
export * from './lib/node-type';
|
|
9
|
+
export * from './lib/password-policy';
|
|
10
|
+
export * from './lib/password-policy-override';
|
|
11
|
+
export * from './lib/project-invitation';
|
|
12
|
+
export * from './lib/project-member';
|
|
13
|
+
export * from './lib/resource-maintenance-request';
|
|
14
|
+
export * from './lib/resource-maintenance-schedule';
|
|
15
|
+
export * from './lib/resource-metering';
|
|
16
|
+
export * from './lib/resource-supervision';
|
|
17
|
+
export * from './lib/resource-type';
|
|
18
|
+
export * from './lib/resourceFlowVariable';
|
|
19
|
+
export * from './lib/resourceHealthState';
|
|
20
|
+
export * from './lib/resourceIntroducer';
|
|
21
|
+
export * from './lib/resourceIntroductionHistoryItem';
|
|
22
|
+
export * from './lib/resourceUsage-type';
|
|
23
|
+
export * from './lib/sso-session-context';
|
|
24
|
+
export * from './lib/ssoProvider';
|
|
25
|
+
export * from './lib/ssoProvider-oidc';
|
|
26
|
+
export * from './lib/usage-duration-unit';
|
|
27
|
+
export * from './lib/user-role';
|
|
28
|
+
export * from './lib/operating-interval';
|
|
29
|
+
export * from './lib/usage-session';
|
|
30
|
+
export * from './lib/billing-ledger';
|
|
31
|
+
export * from './lib/passkey';
|
|
32
|
+
export * from './lib/session';
|
|
33
|
+
export * from './lib/sso-provider-record';
|
|
34
|
+
export * from './lib/email-template-record';
|
|
35
|
+
export * from './lib/push-subscription';
|
|
36
|
+
export * from './lib/notification-preference-record';
|
|
37
|
+
export * from './lib/notification-recipient';
|
|
38
|
+
export * from './lib/messaging-models';
|
|
39
|
+
export * from './lib/csv-export-template-record';
|
|
40
|
+
export * from './lib/resource-actor-user';
|
|
41
|
+
export * from './lib/resource-maintenance-records';
|
|
42
|
+
export * from './lib/resource-health-records';
|
|
43
|
+
export * from './lib/companion-device';
|
|
44
|
+
export * from './lib/audit-entry';
|
|
45
|
+
export * from './lib/mqtt-server';
|
|
46
|
+
export * from './lib/attractap-card';
|
|
47
|
+
export * from './lib/attractap-crash-report';
|
|
48
|
+
export * from './lib/attractap-installation';
|
|
49
|
+
export * from './lib/attractap-reader';
|
|
50
|
+
export * from './lib/attractap-secure-boot';
|
|
51
|
+
export * from './lib/plugin-host-models';
|
|
52
|
+
export * from './lib/reader-ui-alert';
|
|
53
|
+
export * from './lib/resource-form-records';
|
|
54
|
+
export * from './lib/resource-introducer-records';
|
|
55
|
+
export * from './lib/resource-flow-node/external-effect-policy';
|
|
56
|
+
export * from './lib/resource-flow-node/http-schema';
|
|
57
|
+
export * from './lib/resource-flow-node/mqtt-schemas';
|
|
58
|
+
export * from './lib/resource-flow-node/processing-schemas';
|
|
59
|
+
export * from './lib/resource-flow-node/resource-schemas';
|
|
60
|
+
export * from './lib/resource-flow-node/variable-schemas';
|
|
61
|
+
export * from './lib/resource-flow-node/health-schemas';
|
|
62
|
+
export * from './lib/resource-flow-node/companion-schemas';
|
|
63
|
+
export * from './lib/resource-flow-node/metering-schemas';
|
|
64
|
+
export * from './lib/resource-flow-node/schema-registry';
|
|
65
|
+
export * from './lib/flow-records';
|
|
66
|
+
export * from './lib/metering-records';
|
|
67
|
+
export * from './lib/resource-introduction-records';
|
|
68
|
+
export * from './lib/resource-records';
|
|
69
|
+
export * from './lib/project-record';
|
|
70
|
+
export * from './lib/user-record';
|
|
71
|
+
export * from './lib/rbac-record';
|
|
72
|
+
export * from './lib/api-token';
|
|
73
|
+
export * from './lib/authentication-credential';
|
|
74
|
+
export * from './lib/password-policy-records';
|
|
75
|
+
export * from './lib/user-account';
|
|
76
|
+
export * from './lib/dashboard-pins';
|
|
77
|
+
export * from './lib/mcp-oauth';
|
|
78
|
+
export * from './lib/plugin-ble-endpoint';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./lib/authentication-type"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./lib/billing-transaction"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./lib/csv-export-template"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./lib/documentation-type"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./lib/email-template"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./lib/form"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./lib/message"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./lib/node-type"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./lib/password-policy"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./lib/password-policy-override"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./lib/project-invitation"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./lib/project-member"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./lib/resource-maintenance-request"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./lib/resource-maintenance-schedule"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./lib/resource-metering"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./lib/resource-supervision"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./lib/resource-type"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./lib/resourceFlowVariable"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./lib/resourceHealthState"), exports);
|
|
23
|
+
tslib_1.__exportStar(require("./lib/resourceIntroducer"), exports);
|
|
24
|
+
tslib_1.__exportStar(require("./lib/resourceIntroductionHistoryItem"), exports);
|
|
25
|
+
tslib_1.__exportStar(require("./lib/resourceUsage-type"), exports);
|
|
26
|
+
tslib_1.__exportStar(require("./lib/sso-session-context"), exports);
|
|
27
|
+
tslib_1.__exportStar(require("./lib/ssoProvider"), exports);
|
|
28
|
+
tslib_1.__exportStar(require("./lib/ssoProvider-oidc"), exports);
|
|
29
|
+
tslib_1.__exportStar(require("./lib/usage-duration-unit"), exports);
|
|
30
|
+
tslib_1.__exportStar(require("./lib/user-role"), exports);
|
|
31
|
+
tslib_1.__exportStar(require("./lib/operating-interval"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("./lib/usage-session"), exports);
|
|
33
|
+
tslib_1.__exportStar(require("./lib/billing-ledger"), exports);
|
|
34
|
+
tslib_1.__exportStar(require("./lib/passkey"), exports);
|
|
35
|
+
tslib_1.__exportStar(require("./lib/session"), exports);
|
|
36
|
+
tslib_1.__exportStar(require("./lib/sso-provider-record"), exports);
|
|
37
|
+
tslib_1.__exportStar(require("./lib/email-template-record"), exports);
|
|
38
|
+
tslib_1.__exportStar(require("./lib/push-subscription"), exports);
|
|
39
|
+
tslib_1.__exportStar(require("./lib/notification-preference-record"), exports);
|
|
40
|
+
tslib_1.__exportStar(require("./lib/notification-recipient"), exports);
|
|
41
|
+
tslib_1.__exportStar(require("./lib/messaging-models"), exports);
|
|
42
|
+
tslib_1.__exportStar(require("./lib/csv-export-template-record"), exports);
|
|
43
|
+
tslib_1.__exportStar(require("./lib/resource-actor-user"), exports);
|
|
44
|
+
tslib_1.__exportStar(require("./lib/resource-maintenance-records"), exports);
|
|
45
|
+
tslib_1.__exportStar(require("./lib/resource-health-records"), exports);
|
|
46
|
+
tslib_1.__exportStar(require("./lib/companion-device"), exports);
|
|
47
|
+
tslib_1.__exportStar(require("./lib/audit-entry"), exports);
|
|
48
|
+
tslib_1.__exportStar(require("./lib/mqtt-server"), exports);
|
|
49
|
+
tslib_1.__exportStar(require("./lib/attractap-card"), exports);
|
|
50
|
+
tslib_1.__exportStar(require("./lib/attractap-crash-report"), exports);
|
|
51
|
+
tslib_1.__exportStar(require("./lib/attractap-installation"), exports);
|
|
52
|
+
tslib_1.__exportStar(require("./lib/attractap-reader"), exports);
|
|
53
|
+
tslib_1.__exportStar(require("./lib/attractap-secure-boot"), exports);
|
|
54
|
+
tslib_1.__exportStar(require("./lib/plugin-host-models"), exports);
|
|
55
|
+
tslib_1.__exportStar(require("./lib/reader-ui-alert"), exports);
|
|
56
|
+
tslib_1.__exportStar(require("./lib/resource-form-records"), exports);
|
|
57
|
+
tslib_1.__exportStar(require("./lib/resource-introducer-records"), exports);
|
|
58
|
+
tslib_1.__exportStar(require("./lib/resource-flow-node/external-effect-policy"), exports);
|
|
59
|
+
tslib_1.__exportStar(require("./lib/resource-flow-node/http-schema"), exports);
|
|
60
|
+
tslib_1.__exportStar(require("./lib/resource-flow-node/mqtt-schemas"), exports);
|
|
61
|
+
tslib_1.__exportStar(require("./lib/resource-flow-node/processing-schemas"), exports);
|
|
62
|
+
tslib_1.__exportStar(require("./lib/resource-flow-node/resource-schemas"), exports);
|
|
63
|
+
tslib_1.__exportStar(require("./lib/resource-flow-node/variable-schemas"), exports);
|
|
64
|
+
tslib_1.__exportStar(require("./lib/resource-flow-node/health-schemas"), exports);
|
|
65
|
+
tslib_1.__exportStar(require("./lib/resource-flow-node/companion-schemas"), exports);
|
|
66
|
+
tslib_1.__exportStar(require("./lib/resource-flow-node/metering-schemas"), exports);
|
|
67
|
+
tslib_1.__exportStar(require("./lib/resource-flow-node/schema-registry"), exports);
|
|
68
|
+
tslib_1.__exportStar(require("./lib/flow-records"), exports);
|
|
69
|
+
tslib_1.__exportStar(require("./lib/metering-records"), exports);
|
|
70
|
+
tslib_1.__exportStar(require("./lib/resource-introduction-records"), exports);
|
|
71
|
+
tslib_1.__exportStar(require("./lib/resource-records"), exports);
|
|
72
|
+
tslib_1.__exportStar(require("./lib/project-record"), exports);
|
|
73
|
+
tslib_1.__exportStar(require("./lib/user-record"), exports);
|
|
74
|
+
tslib_1.__exportStar(require("./lib/rbac-record"), exports);
|
|
75
|
+
tslib_1.__exportStar(require("./lib/api-token"), exports);
|
|
76
|
+
tslib_1.__exportStar(require("./lib/authentication-credential"), exports);
|
|
77
|
+
tslib_1.__exportStar(require("./lib/password-policy-records"), exports);
|
|
78
|
+
tslib_1.__exportStar(require("./lib/user-account"), exports);
|
|
79
|
+
tslib_1.__exportStar(require("./lib/dashboard-pins"), exports);
|
|
80
|
+
tslib_1.__exportStar(require("./lib/mcp-oauth"), exports);
|
|
81
|
+
tslib_1.__exportStar(require("./lib/plugin-ble-endpoint"), exports);
|
|
82
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/application-models/src/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAC1C,oEAA0C;AAC1C,oEAA0C;AAC1C,mEAAyC;AACzC,+DAAqC;AACrC,qDAA2B;AAC3B,wDAA8B;AAC9B,0DAAgC;AAChC,gEAAsC;AACtC,yEAA+C;AAC/C,mEAAyC;AACzC,+DAAqC;AACrC,6EAAmD;AACnD,8EAAoD;AACpD,kEAAwC;AACxC,qEAA2C;AAC3C,8DAAoC;AACpC,qEAA2C;AAC3C,oEAA0C;AAC1C,mEAAyC;AACzC,gFAAsD;AACtD,mEAAyC;AACzC,oEAA0C;AAC1C,4DAAkC;AAClC,iEAAuC;AACvC,oEAA0C;AAC1C,0DAAgC;AAChC,mEAAyC;AACzC,8DAAoC;AACpC,+DAAqC;AACrC,wDAA8B;AAC9B,wDAA8B;AAC9B,oEAA0C;AAC1C,sEAA4C;AAC5C,kEAAwC;AACxC,+EAAqD;AACrD,uEAA6C;AAC7C,iEAAuC;AACvC,2EAAiD;AACjD,oEAA0C;AAC1C,6EAAmD;AACnD,wEAA8C;AAC9C,iEAAuC;AACvC,4DAAkC;AAClC,4DAAkC;AAClC,+DAAqC;AACrC,uEAA6C;AAC7C,uEAA6C;AAC7C,iEAAuC;AACvC,sEAA4C;AAC5C,mEAAyC;AACzC,gEAAsC;AACtC,sEAA4C;AAC5C,4EAAkD;AAClD,0FAAgE;AAChE,+EAAqD;AACrD,gFAAsD;AACtD,sFAA4D;AAC5D,oFAA0D;AAC1D,oFAA0D;AAC1D,kFAAwD;AACxD,qFAA2D;AAC3D,oFAA0D;AAC1D,mFAAyD;AACzD,6DAAmC;AACnC,iEAAuC;AACvC,8EAAoD;AACpD,iEAAuC;AACvC,+DAAqC;AACrC,4DAAkC;AAClC,4DAAkC;AAClC,0DAAgC;AAChC,0EAAgD;AAChD,wEAA8C;AAC9C,6DAAmC;AACnC,+DAAqC;AACrC,0DAAgC;AAChC,oEAA0C"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** An API token as the application knows it. The token secret and its hash are never part of it. */
|
|
2
|
+
export interface ApiTokenRecord {
|
|
3
|
+
id: number;
|
|
4
|
+
userId: number;
|
|
5
|
+
name: string;
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
lastUsedAt: Date | null;
|
|
8
|
+
expiresAt: Date | null;
|
|
9
|
+
revokedAt: Date | null;
|
|
10
|
+
permissionKeys: string[];
|
|
11
|
+
}
|
|
12
|
+
/** What is stored when a token is issued. The hash is the only form of the secret that reaches storage. */
|
|
13
|
+
export interface NewApiToken {
|
|
14
|
+
userId: number;
|
|
15
|
+
name: string;
|
|
16
|
+
tokenHash: string;
|
|
17
|
+
expiresAt: Date | null;
|
|
18
|
+
permissionKeys: string[];
|
|
19
|
+
}
|
|
20
|
+
/** The editable parts of a token. A field that is absent stays as it is. */
|
|
21
|
+
export interface ApiTokenChanges {
|
|
22
|
+
name?: string;
|
|
23
|
+
permissionKeys?: string[];
|
|
24
|
+
expiresAt?: Date | null;
|
|
25
|
+
}
|
|
26
|
+
export interface ApiTokenPage {
|
|
27
|
+
data: ApiTokenRecord[];
|
|
28
|
+
total: number;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-token.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/api-token.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** The user a card belongs to: the user row, without its relations. `email` is internal. */
|
|
2
|
+
export interface AttractapCardOwner {
|
|
3
|
+
id: number;
|
|
4
|
+
username: string;
|
|
5
|
+
email: string;
|
|
6
|
+
locale: string;
|
|
7
|
+
dateTimeLocale: string | null;
|
|
8
|
+
isEmailVerified: boolean;
|
|
9
|
+
isDisabled: boolean;
|
|
10
|
+
externalIdentifier: string | null;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
deletedAt?: Date | null;
|
|
14
|
+
}
|
|
15
|
+
/** An NFC card. `key` and `keyNo` are secrets of the card; they never belong in a response. */
|
|
16
|
+
export interface AttractapNfcCard {
|
|
17
|
+
id: number;
|
|
18
|
+
uid: string;
|
|
19
|
+
keyNo: number;
|
|
20
|
+
/** Stored encrypted; the card service decrypts it for use. */
|
|
21
|
+
key: string;
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
updatedAt: Date;
|
|
24
|
+
lastSeen: Date;
|
|
25
|
+
isActive: boolean;
|
|
26
|
+
/** Present when the read asked for the owner. */
|
|
27
|
+
user?: AttractapCardOwner;
|
|
28
|
+
}
|
|
29
|
+
export interface NewAttractapNfcCard {
|
|
30
|
+
uid: string;
|
|
31
|
+
keyNo: number;
|
|
32
|
+
/** Already encrypted. */
|
|
33
|
+
key: string;
|
|
34
|
+
}
|
|
35
|
+
/** A key change the server started but has not seen confirmed yet. */
|
|
36
|
+
export interface AttractapNfcCardPendingChange {
|
|
37
|
+
id: number;
|
|
38
|
+
uid: string;
|
|
39
|
+
kind: 'enroll' | 'reset';
|
|
40
|
+
userId: number | null;
|
|
41
|
+
cardId: number | null;
|
|
42
|
+
keyNo: number;
|
|
43
|
+
/** Encrypted; null for a reset. */
|
|
44
|
+
key: string | null;
|
|
45
|
+
actorId: number | null;
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
}
|
|
48
|
+
export type NewAttractapNfcCardPendingChange = Omit<AttractapNfcCardPendingChange, 'id' | 'createdAt'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attractap-card.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/attractap-card.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Upload state of a report's coredump: awaiting while a chunked upload is owed, stored once the whole dump
|
|
3
|
+
* was verified and saved, rejected when the server refused the announced dump.
|
|
4
|
+
*/
|
|
5
|
+
export type AttractapCoredumpStatus = 'awaiting' | 'stored' | 'rejected';
|
|
6
|
+
export interface AttractapCrashReportRecord {
|
|
7
|
+
id: number;
|
|
8
|
+
attractapId: number;
|
|
9
|
+
resetReason: string;
|
|
10
|
+
rebootReason: string | null;
|
|
11
|
+
heapFreeBytes: number | null;
|
|
12
|
+
largestFreeBlockBytes: number | null;
|
|
13
|
+
uptimeBeforeResetMs: number | null;
|
|
14
|
+
wsState: string | null;
|
|
15
|
+
wifiState: string | null;
|
|
16
|
+
firmwareVersion: string | null;
|
|
17
|
+
coredumpSize: number | null;
|
|
18
|
+
/** Only filled by the read that asks for the coredump, and on the report that was just stored. */
|
|
19
|
+
coredump: Uint8Array | null;
|
|
20
|
+
coredumpStatus: AttractapCoredumpStatus | null;
|
|
21
|
+
/** Size the reader announced for a chunked upload (or for a refused dump). */
|
|
22
|
+
coredumpExpectedSize: number | null;
|
|
23
|
+
/** Unsigned CRC-32 the reader announced; internal, never part of a response. */
|
|
24
|
+
coredumpExpectedCrc32: number | null;
|
|
25
|
+
coredumpBuildId: string | null;
|
|
26
|
+
symbolicationStatus: string | null;
|
|
27
|
+
symbolizedBacktrace: string | null;
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
}
|
|
30
|
+
export type NewAttractapCrashReport = Omit<AttractapCrashReportRecord, 'id' | 'createdAt' | 'coredumpBuildId' | 'symbolizedBacktrace'>;
|
|
31
|
+
export interface AttractapCrashSymbolication {
|
|
32
|
+
coredumpBuildId?: string | null;
|
|
33
|
+
symbolicationStatus: string | null;
|
|
34
|
+
symbolizedBacktrace: string | null;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attractap-crash-report.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/attractap-crash-report.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The installation identity: CA and server certificate. Private keys are stored encrypted. */
|
|
2
|
+
export interface AttractapInstallationRecord {
|
|
3
|
+
installationId: string;
|
|
4
|
+
caCertificatePem: string;
|
|
5
|
+
caPrivateKeyEncrypted: string;
|
|
6
|
+
serverCertificatePem: string;
|
|
7
|
+
serverPrivateKeyEncrypted: string;
|
|
8
|
+
serverCertificateNotAfter: Date;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attractap-installation.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/attractap-installation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { AutoIntroductionTarget, SupervisionMode } from './resource-supervision';
|
|
2
|
+
import type { DocumentationType } from './documentation-type';
|
|
3
|
+
import type { ResourceType } from './resource-type';
|
|
4
|
+
export type AttractapPairingState = 'unpaired' | 'paired' | 'revoked';
|
|
5
|
+
/** What the reader firmware can do, as reported by the reader. */
|
|
6
|
+
export interface AttractapReaderCapabilities {
|
|
7
|
+
resourceSelection: boolean;
|
|
8
|
+
resourceActionSelection: boolean;
|
|
9
|
+
cardEnrollment: boolean;
|
|
10
|
+
hasLeds: boolean;
|
|
11
|
+
cardRelay: boolean;
|
|
12
|
+
/** Reader UI capabilities; null means schema version 0 (no plugin UI). */
|
|
13
|
+
ui: Record<string, unknown> | null;
|
|
14
|
+
resetReason: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface AttractapFirmwareInfo {
|
|
17
|
+
name: string | null;
|
|
18
|
+
variant: string | null;
|
|
19
|
+
version: string | null;
|
|
20
|
+
capabilities: AttractapReaderCapabilities;
|
|
21
|
+
}
|
|
22
|
+
/** A resource as it is linked to a reader: the resource's own columns, without its relations. */
|
|
23
|
+
export interface AttractapLinkedResource {
|
|
24
|
+
id: number;
|
|
25
|
+
name: string;
|
|
26
|
+
type: ResourceType;
|
|
27
|
+
separateUnlockAndUnlatch: boolean | null;
|
|
28
|
+
description: string | null;
|
|
29
|
+
imageFilename: string | null;
|
|
30
|
+
documentationType: DocumentationType | null;
|
|
31
|
+
documentationMarkdown: string | null;
|
|
32
|
+
documentationUrl: string | null;
|
|
33
|
+
metadata: Record<string, unknown> | null;
|
|
34
|
+
allowTakeOver: boolean;
|
|
35
|
+
maxParallelSessions: number;
|
|
36
|
+
retrainingMaxAgeDays: number | null;
|
|
37
|
+
retrainingMaxInactivityDays: number | null;
|
|
38
|
+
retrainingBlocksAccess: boolean;
|
|
39
|
+
supervisionMode: SupervisionMode;
|
|
40
|
+
supervisedUsagesUntilIntroduction: number | null;
|
|
41
|
+
autoIntroductionTarget: AutoIntroductionTarget | null;
|
|
42
|
+
autoIntroductionGroupId: number | null;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
updatedAt: Date;
|
|
45
|
+
deletedAt: Date | null;
|
|
46
|
+
}
|
|
47
|
+
/** An Attractap reader. `apiTokenHash` is internal: it never belongs in a response. */
|
|
48
|
+
export interface AttractapReader {
|
|
49
|
+
id: number;
|
|
50
|
+
name: string;
|
|
51
|
+
apiTokenHash: string;
|
|
52
|
+
pairingState: AttractapPairingState;
|
|
53
|
+
credentialFingerprint: string | null;
|
|
54
|
+
secureBootDigest0: string | null;
|
|
55
|
+
secureBootDigest1: string | null;
|
|
56
|
+
secureBootSignerDigest: string | null;
|
|
57
|
+
pairedAt: Date | null;
|
|
58
|
+
certificateNotAfter: Date | null;
|
|
59
|
+
certificateSerial: string | null;
|
|
60
|
+
/** Present only when the read asked for the linked resources. */
|
|
61
|
+
resources?: AttractapLinkedResource[];
|
|
62
|
+
lastConnection: Date;
|
|
63
|
+
firstConnection: Date;
|
|
64
|
+
ledBrightness: number;
|
|
65
|
+
/** Whether backend plugins with the BLE_TRANSPORT permission may use this reader's Bluetooth radio. */
|
|
66
|
+
allowPluginBle: boolean;
|
|
67
|
+
firmware: AttractapFirmwareInfo;
|
|
68
|
+
}
|
|
69
|
+
/** A reader read together with its linked resources. */
|
|
70
|
+
export type AttractapReaderWithResources = AttractapReader & {
|
|
71
|
+
resources: AttractapLinkedResource[];
|
|
72
|
+
};
|
|
73
|
+
/** The credential columns of a reader row, so a pairing can be undone. */
|
|
74
|
+
export interface AttractapCredentialSnapshot {
|
|
75
|
+
pairingState: AttractapPairingState;
|
|
76
|
+
credentialFingerprint: string | null;
|
|
77
|
+
pairedAt: Date | null;
|
|
78
|
+
certificateNotAfter: Date | null;
|
|
79
|
+
certificateSerial: string | null;
|
|
80
|
+
apiTokenHash: string;
|
|
81
|
+
}
|
|
82
|
+
/** The reader fields an administrator or the reader itself may change; credentials are never part of it. */
|
|
83
|
+
export interface AttractapReaderEdit {
|
|
84
|
+
name?: string;
|
|
85
|
+
ledBrightness?: number;
|
|
86
|
+
allowPluginBle?: boolean;
|
|
87
|
+
firmware?: AttractapFirmwareInfo;
|
|
88
|
+
/** Replaces the linked resources. */
|
|
89
|
+
resourceIds?: number[];
|
|
90
|
+
}
|
|
91
|
+
/** Narrowing for reader lists. */
|
|
92
|
+
export interface AttractapReaderFilter {
|
|
93
|
+
/** Only readers linked to this resource. */
|
|
94
|
+
resourceId?: number;
|
|
95
|
+
/** Only readers linked to any resource of this group. */
|
|
96
|
+
resourceGroupId?: number;
|
|
97
|
+
/** Only readers whose pairing state is paired (true) or is not paired (false). */
|
|
98
|
+
paired?: boolean;
|
|
99
|
+
/** Load the linked resources. */
|
|
100
|
+
withResources?: boolean;
|
|
101
|
+
}
|
|
102
|
+
export type AttractapCredentialEventState = 'paired' | 'revoked' | 'replaced';
|
|
103
|
+
/** Append-only credential history entry. */
|
|
104
|
+
export interface AttractapCredentialEventRecord {
|
|
105
|
+
id: number;
|
|
106
|
+
readerId: number;
|
|
107
|
+
readerName: string;
|
|
108
|
+
keyFingerprint: string;
|
|
109
|
+
certificateSerial: string | null;
|
|
110
|
+
state: AttractapCredentialEventState;
|
|
111
|
+
actorId: number | null;
|
|
112
|
+
createdAt: Date;
|
|
113
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attractap-reader.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/attractap-reader.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type AttractapSecureBootKeyRole = 'signing' | 'recovery';
|
|
2
|
+
/** A Secure Boot key held by this installation. */
|
|
3
|
+
export interface AttractapSecureBootKeyRecord {
|
|
4
|
+
id: number;
|
|
5
|
+
role: AttractapSecureBootKeyRole;
|
|
6
|
+
publicKeyPem: string;
|
|
7
|
+
/** Secure Boot v2 digest as burned into an eFuse key block, hex. */
|
|
8
|
+
digest: string;
|
|
9
|
+
/** SHA-256 of the SPKI, hex. */
|
|
10
|
+
fingerprint: string;
|
|
11
|
+
/** PKCS#8 PEM, encrypted. Null once the server no longer holds it. */
|
|
12
|
+
privateKeyEncrypted: string | null;
|
|
13
|
+
verifiedAt: Date | null;
|
|
14
|
+
restoredAt: Date | null;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
}
|
|
17
|
+
export type NewAttractapSecureBootKey = Pick<AttractapSecureBootKeyRecord, 'role' | 'publicKeyPem' | 'digest' | 'fingerprint' | 'privateKeyEncrypted' | 'verifiedAt' | 'restoredAt'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attractap-secure-boot.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/attractap-secure-boot.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type AuditOutcome = 'attempted' | 'succeeded' | 'failed';
|
|
2
|
+
/** How a principal authenticated. Extend this list (not a copy of it) when a new method is added. */
|
|
3
|
+
export declare const AUTHENTICATION_METHODS: readonly ["session", "api-token", "mcp-oauth"];
|
|
4
|
+
export type AuthenticationMethod = (typeof AUTHENTICATION_METHODS)[number];
|
|
5
|
+
export type AuditAuthenticationMethod = AuthenticationMethod;
|
|
6
|
+
type AuditEntryDetails = Record<string, string | number | boolean | null>;
|
|
7
|
+
/** One audit record before storage: everything but the identity and timestamp the store assigns. */
|
|
8
|
+
export interface AuditEntryDraft {
|
|
9
|
+
domain: string;
|
|
10
|
+
pluginId: string | null;
|
|
11
|
+
action: string;
|
|
12
|
+
operationId: string;
|
|
13
|
+
actorId: number | null;
|
|
14
|
+
authenticationMethod: AuditAuthenticationMethod | null;
|
|
15
|
+
apiTokenId: number | null;
|
|
16
|
+
outcome: AuditOutcome;
|
|
17
|
+
subjectType: string;
|
|
18
|
+
subjectId: number | null;
|
|
19
|
+
ipAddress: string | null;
|
|
20
|
+
userAgent: string | null;
|
|
21
|
+
details: AuditEntryDetails;
|
|
22
|
+
}
|
|
23
|
+
/** A stored audit record. */
|
|
24
|
+
export interface AuditEntry extends AuditEntryDraft {
|
|
25
|
+
id: number;
|
|
26
|
+
at: Date;
|
|
27
|
+
}
|
|
28
|
+
/** Filters of the audit listing. `notBefore` is the retention cutoff; every filter narrows the result. */
|
|
29
|
+
export interface AuditEntryFilter {
|
|
30
|
+
notBefore: Date;
|
|
31
|
+
domain?: string;
|
|
32
|
+
action?: string;
|
|
33
|
+
outcome?: AuditOutcome;
|
|
34
|
+
operationId?: string;
|
|
35
|
+
actorId?: number;
|
|
36
|
+
subjectId?: number;
|
|
37
|
+
subjectType?: string;
|
|
38
|
+
/** Entries whose action starts with this prefix. */
|
|
39
|
+
eventPrefix?: string;
|
|
40
|
+
from?: Date;
|
|
41
|
+
to?: Date;
|
|
42
|
+
/** Cursor: only entries with a smaller id. */
|
|
43
|
+
beforeId?: number;
|
|
44
|
+
}
|
|
45
|
+
/** Kinds of subjects whose current display name the audit listing can look up. */
|
|
46
|
+
export type AuditSubjectNameKind = 'user' | 'resource' | 'resource-group' | 'project';
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AUTHENTICATION_METHODS = void 0;
|
|
4
|
+
/** How a principal authenticated. Extend this list (not a copy of it) when a new method is added. */
|
|
5
|
+
exports.AUTHENTICATION_METHODS = ['session', 'api-token', 'mcp-oauth'];
|
|
6
|
+
//# sourceMappingURL=audit-entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-entry.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/audit-entry.ts"],"names":[],"mappings":";;;AAEA,qGAAqG;AACxF,QAAA,sBAAsB,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,CAAU,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AuthenticationType } from './authentication-type';
|
|
2
|
+
import type { SSOProviderType } from './ssoProvider';
|
|
3
|
+
/** A credential of a user without its secret material (password hash, TOTP secret). */
|
|
4
|
+
export interface CredentialRecord {
|
|
5
|
+
id: number;
|
|
6
|
+
userId: number;
|
|
7
|
+
type: AuthenticationType;
|
|
8
|
+
}
|
|
9
|
+
/** The binding of a user to an identity at a single sign-on provider. */
|
|
10
|
+
export interface SsoCredentialRecord extends CredentialRecord {
|
|
11
|
+
providerType: SSOProviderType | null;
|
|
12
|
+
providerId: number | null;
|
|
13
|
+
ssoSubject: string | null;
|
|
14
|
+
}
|
|
15
|
+
/** A credential to add for a user. A password arrives hashed. */
|
|
16
|
+
export type NewCredential = {
|
|
17
|
+
type: AuthenticationType.LOCAL_PASSWORD;
|
|
18
|
+
passwordHash: string;
|
|
19
|
+
} | {
|
|
20
|
+
type: AuthenticationType.SSO;
|
|
21
|
+
providerType: SSOProviderType;
|
|
22
|
+
providerId: number;
|
|
23
|
+
subject: string;
|
|
24
|
+
};
|
|
25
|
+
/** The authenticator-app (TOTP) enrollment of a user. The secret is stored encrypted. */
|
|
26
|
+
export interface TotpCredentialRecord {
|
|
27
|
+
id: number;
|
|
28
|
+
userId: number;
|
|
29
|
+
encryptedSecret: string | null;
|
|
30
|
+
enabledAt: Date | null;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authentication-credential.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/authentication-credential.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthenticationType = void 0;
|
|
4
|
+
var AuthenticationType;
|
|
5
|
+
(function (AuthenticationType) {
|
|
6
|
+
AuthenticationType["LOCAL_PASSWORD"] = "local_password";
|
|
7
|
+
AuthenticationType["SSO"] = "sso";
|
|
8
|
+
AuthenticationType["TOTP"] = "totp";
|
|
9
|
+
})(AuthenticationType || (exports.AuthenticationType = AuthenticationType = {}));
|
|
10
|
+
//# sourceMappingURL=authentication-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authentication-type.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/authentication-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,uDAAiC,CAAA;IACjC,iCAAW,CAAA;IACX,mCAAa,CAAA;AACf,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B"}
|