@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
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { BillingTransactionStatus } from './billing-transaction';
|
|
2
|
+
/**
|
|
3
|
+
* Neutral billing records. They carry exactly the fields the HTTP API, live notifications and receipts expose, so
|
|
4
|
+
* adapters map storage rows to them and application code never sees an ORM entity. Nullable columns are optional
|
|
5
|
+
* as well: a freshly inserted row only carries what was written.
|
|
6
|
+
*/
|
|
7
|
+
/** One person's share of a segment of a machine that several people used at once. */
|
|
8
|
+
export interface BillingAllocationSegmentRecord {
|
|
9
|
+
startedAt: string;
|
|
10
|
+
endedAt: string;
|
|
11
|
+
participants: number;
|
|
12
|
+
/** Total of the whole segment in meter units, or milliseconds for running time. */
|
|
13
|
+
totalQuantity: string;
|
|
14
|
+
totalCredits: number;
|
|
15
|
+
/** This person's share of the quantity and the whole credits charged for it. */
|
|
16
|
+
shareQuantity: string;
|
|
17
|
+
shareCredits: number;
|
|
18
|
+
}
|
|
19
|
+
export interface BillingAllocationRecord {
|
|
20
|
+
kind: 'meter' | 'operating-time';
|
|
21
|
+
segments: BillingAllocationSegmentRecord[];
|
|
22
|
+
/** The share is not known yet: a segment the person was in has no closing reading. */
|
|
23
|
+
pending?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface BillingTransactionItemRecord {
|
|
26
|
+
id: number;
|
|
27
|
+
billingTransactionId: number;
|
|
28
|
+
name: string;
|
|
29
|
+
description: string | null;
|
|
30
|
+
externalReference: string | null;
|
|
31
|
+
unitPrice: number;
|
|
32
|
+
quantity: number;
|
|
33
|
+
durationMs: number | null;
|
|
34
|
+
meterQuantity: string | null;
|
|
35
|
+
meterCreditsPerUnit: number | null;
|
|
36
|
+
allocation: BillingAllocationRecord | null;
|
|
37
|
+
}
|
|
38
|
+
export interface BillingTransactionRecord {
|
|
39
|
+
id: number;
|
|
40
|
+
userId: number;
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
updatedAt: Date;
|
|
43
|
+
amount: number;
|
|
44
|
+
initiatorId?: number | null;
|
|
45
|
+
resourceUsageId?: number | null;
|
|
46
|
+
refundOfId?: number | null;
|
|
47
|
+
correctionOfId?: number | null;
|
|
48
|
+
externalReference?: string | null;
|
|
49
|
+
status: BillingTransactionStatus;
|
|
50
|
+
items?: BillingTransactionItemRecord[];
|
|
51
|
+
}
|
|
52
|
+
/** The public fields of a user as shown beside a transaction (never mail address, tokens or lock state). */
|
|
53
|
+
export interface BillingUserSummary {
|
|
54
|
+
id: number;
|
|
55
|
+
username: string;
|
|
56
|
+
locale: string;
|
|
57
|
+
dateTimeLocale: string | null;
|
|
58
|
+
isEmailVerified: boolean;
|
|
59
|
+
isDisabled: boolean;
|
|
60
|
+
createdAt: Date;
|
|
61
|
+
updatedAt: Date;
|
|
62
|
+
deletedAt?: Date | null;
|
|
63
|
+
externalIdentifier: string | null;
|
|
64
|
+
creditBalance: number;
|
|
65
|
+
billingFactor: number;
|
|
66
|
+
}
|
|
67
|
+
/** The serialized fields of a resource usage or resource owned by the resources area, passed through as shown. */
|
|
68
|
+
export interface BillingSerializedRecord {
|
|
69
|
+
id: number;
|
|
70
|
+
[field: string]: unknown;
|
|
71
|
+
}
|
|
72
|
+
/** A transaction with the relations the history and detail views show. */
|
|
73
|
+
export interface BillingTransactionDetail extends BillingTransactionRecord {
|
|
74
|
+
initiator?: BillingUserSummary | null;
|
|
75
|
+
resourceUsage?: (BillingSerializedRecord & {
|
|
76
|
+
resource?: BillingSerializedRecord | null;
|
|
77
|
+
}) | null;
|
|
78
|
+
refundOf?: BillingTransactionRecord | null;
|
|
79
|
+
}
|
|
80
|
+
export interface BillingTransactionPage {
|
|
81
|
+
data: BillingTransactionDetail[];
|
|
82
|
+
total: number;
|
|
83
|
+
page: number;
|
|
84
|
+
limit: number;
|
|
85
|
+
}
|
|
86
|
+
export interface ResourceBillingConfigurationRecord {
|
|
87
|
+
id: number;
|
|
88
|
+
createdAt: Date;
|
|
89
|
+
updatedAt: Date;
|
|
90
|
+
resourceId: number;
|
|
91
|
+
creditsPerUsage: number;
|
|
92
|
+
creditsPerMinute: number;
|
|
93
|
+
creditsPerOperatingMinute: number;
|
|
94
|
+
}
|
|
95
|
+
/** What a usage receipt mail is built from. */
|
|
96
|
+
export interface UsageReceiptSource {
|
|
97
|
+
transaction: BillingTransactionRecord;
|
|
98
|
+
recipient: {
|
|
99
|
+
id: number;
|
|
100
|
+
username: string;
|
|
101
|
+
email: string;
|
|
102
|
+
locale: string;
|
|
103
|
+
creditBalance: number;
|
|
104
|
+
} | null;
|
|
105
|
+
usage: {
|
|
106
|
+
startTime: Date;
|
|
107
|
+
endTime: Date | null;
|
|
108
|
+
billingFactor: number | null;
|
|
109
|
+
resource: {
|
|
110
|
+
id: number;
|
|
111
|
+
name: string;
|
|
112
|
+
};
|
|
113
|
+
} | null;
|
|
114
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-ledger.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/billing-ledger.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingTransactionStatus = void 0;
|
|
4
|
+
var BillingTransactionStatus;
|
|
5
|
+
(function (BillingTransactionStatus) {
|
|
6
|
+
BillingTransactionStatus["Pending"] = "pending";
|
|
7
|
+
BillingTransactionStatus["Completed"] = "completed";
|
|
8
|
+
BillingTransactionStatus["Failed"] = "failed";
|
|
9
|
+
})(BillingTransactionStatus || (exports.BillingTransactionStatus = BillingTransactionStatus = {}));
|
|
10
|
+
//# sourceMappingURL=billing-transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-transaction.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/billing-transaction.ts"],"names":[],"mappings":";;;AAAA,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,mDAAuB,CAAA;IACvB,6CAAiB,CAAA;AACnB,CAAC,EAJW,wBAAwB,wCAAxB,wBAAwB,QAInC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** A resource reference as it is listed on a companion device. Extra resource fields are carried through unchanged. */
|
|
2
|
+
export interface CompanionDeviceResource {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
[field: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
/** A registered companion device (a desktop app that locks/unlocks a PC for a machine). */
|
|
8
|
+
export interface CompanionDeviceRecord {
|
|
9
|
+
id: number;
|
|
10
|
+
name: string;
|
|
11
|
+
/** Hash of the device token. Never returned to API clients. */
|
|
12
|
+
tokenHash: string;
|
|
13
|
+
resources: CompanionDeviceResource[];
|
|
14
|
+
locked: boolean;
|
|
15
|
+
lastConnection: Date;
|
|
16
|
+
firstConnection: Date;
|
|
17
|
+
appVersion: string | null;
|
|
18
|
+
}
|
|
19
|
+
/** The resources a companion device controls through a flow node. */
|
|
20
|
+
export interface CompanionControlledResource {
|
|
21
|
+
id: number;
|
|
22
|
+
name: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"companion-device.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/companion-device.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CsvExportTemplateColumnType, CsvExportType } from './csv-export-template';
|
|
2
|
+
/** One configured column of a CSV export template. */
|
|
3
|
+
export interface CsvExportTemplateColumnRecord {
|
|
4
|
+
type: CsvExportTemplateColumnType;
|
|
5
|
+
header: string;
|
|
6
|
+
fieldKey?: string | null;
|
|
7
|
+
value?: string | null;
|
|
8
|
+
}
|
|
9
|
+
export interface CsvExportTemplateRecord {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
exportType: CsvExportType;
|
|
13
|
+
columns: CsvExportTemplateColumnRecord[];
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
17
|
+
export interface NewCsvExportTemplate {
|
|
18
|
+
name: string;
|
|
19
|
+
exportType: CsvExportType;
|
|
20
|
+
columns: CsvExportTemplateColumnRecord[];
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csv-export-template-record.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/csv-export-template-record.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare enum CsvExportType {
|
|
2
|
+
RESOURCE_USAGE_HOURS = "resourceUsageHours",
|
|
3
|
+
BILLING_TRANSACTIONS = "billingTransactions",
|
|
4
|
+
RESOURCE_HOURS_SUMMARY = "resourceHoursSummary"
|
|
5
|
+
}
|
|
6
|
+
export declare enum CsvExportTemplateColumnType {
|
|
7
|
+
FIELD = "field",
|
|
8
|
+
CONSTANT = "constant"
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CsvExportTemplateColumnType = exports.CsvExportType = void 0;
|
|
4
|
+
var CsvExportType;
|
|
5
|
+
(function (CsvExportType) {
|
|
6
|
+
CsvExportType["RESOURCE_USAGE_HOURS"] = "resourceUsageHours";
|
|
7
|
+
CsvExportType["BILLING_TRANSACTIONS"] = "billingTransactions";
|
|
8
|
+
CsvExportType["RESOURCE_HOURS_SUMMARY"] = "resourceHoursSummary";
|
|
9
|
+
})(CsvExportType || (exports.CsvExportType = CsvExportType = {}));
|
|
10
|
+
var CsvExportTemplateColumnType;
|
|
11
|
+
(function (CsvExportTemplateColumnType) {
|
|
12
|
+
CsvExportTemplateColumnType["FIELD"] = "field";
|
|
13
|
+
CsvExportTemplateColumnType["CONSTANT"] = "constant";
|
|
14
|
+
})(CsvExportTemplateColumnType || (exports.CsvExportTemplateColumnType = CsvExportTemplateColumnType = {}));
|
|
15
|
+
//# sourceMappingURL=csv-export-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"csv-export-template.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/csv-export-template.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,4DAA2C,CAAA;IAC3C,6DAA4C,CAAA;IAC5C,gEAA+C,CAAA;AACjD,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,8CAAe,CAAA;IACf,oDAAqB,CAAA;AACvB,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type DashboardPinItemType = 'page' | 'resource' | 'widget';
|
|
2
|
+
export type DashboardPinSize = 'small' | 'medium' | 'large';
|
|
3
|
+
/** One entry on a user's personal dashboard: the item and the tile size the user chose (null: default size). */
|
|
4
|
+
export interface StoredDashboardPin {
|
|
5
|
+
itemType: DashboardPinItemType;
|
|
6
|
+
/** The route path of a page pin, the decimal id of a resource pin, or the id of a widget pin. */
|
|
7
|
+
itemId: string;
|
|
8
|
+
size: DashboardPinSize | null;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-pins.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/dashboard-pins.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocumentationType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Enum for resource documentation types
|
|
6
|
+
*/
|
|
7
|
+
var DocumentationType;
|
|
8
|
+
(function (DocumentationType) {
|
|
9
|
+
DocumentationType["MARKDOWN"] = "markdown";
|
|
10
|
+
DocumentationType["URL"] = "url";
|
|
11
|
+
})(DocumentationType || (exports.DocumentationType = DocumentationType = {}));
|
|
12
|
+
//# sourceMappingURL=documentation-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentation-type.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/documentation-type.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,0CAAqB,CAAA;IACrB,gCAAW,CAAA;AACb,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EmailTemplateType } from './email-template';
|
|
2
|
+
/** A stored email template. The type is a core template type or the namespaced key of a plugin template. */
|
|
3
|
+
export interface EmailTemplateRecord {
|
|
4
|
+
type: EmailTemplateType;
|
|
5
|
+
subject: string;
|
|
6
|
+
body: string;
|
|
7
|
+
variables: string[];
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
updatedAt: Date;
|
|
10
|
+
}
|
|
11
|
+
/** One translated text of a template for one locale. */
|
|
12
|
+
export interface EmailTemplateTranslationRecord {
|
|
13
|
+
templateType: EmailTemplateType;
|
|
14
|
+
key: string;
|
|
15
|
+
locale: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-template-record.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/email-template-record.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum EmailTemplateType {
|
|
2
|
+
VERIFY_EMAIL = "verify-email",
|
|
3
|
+
USER_INVITATION = "user-invitation",
|
|
4
|
+
RESET_PASSWORD = "reset-password",
|
|
5
|
+
USERNAME_CHANGED = "username-changed",
|
|
6
|
+
PASSWORD_CHANGED = "password-changed",
|
|
7
|
+
RESOURCE_USAGE_BILLING_TRANSACTION_SUMMARY = "resource-usage-billing-transaction-summary",
|
|
8
|
+
PROJECT_INVITATION = "project-invitation",
|
|
9
|
+
DELETE_ACCOUNT_CONFIRMATION = "delete-account-confirmation",
|
|
10
|
+
RESOURCE_HEALTH_CHANGED = "resource-health-changed",
|
|
11
|
+
USER_RETRAINING_REQUIRED = "user-retraining-required",
|
|
12
|
+
MAINTENANCE_REQUEST_CREATED = "maintenance-request-created",
|
|
13
|
+
MESSAGE_RECEIVED = "message-received",
|
|
14
|
+
RESOURCE_USAGE_NOTE_ADDED = "resource-usage-note-added",
|
|
15
|
+
RESOURCE_TAKEOVER = "resource-takeover",
|
|
16
|
+
ACCESS_CHANGE = "access-change",
|
|
17
|
+
RESOURCE_SESSION_ENDED = "resource-session-ended"
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailTemplateType = void 0;
|
|
4
|
+
var EmailTemplateType;
|
|
5
|
+
(function (EmailTemplateType) {
|
|
6
|
+
EmailTemplateType["VERIFY_EMAIL"] = "verify-email";
|
|
7
|
+
EmailTemplateType["USER_INVITATION"] = "user-invitation";
|
|
8
|
+
EmailTemplateType["RESET_PASSWORD"] = "reset-password";
|
|
9
|
+
EmailTemplateType["USERNAME_CHANGED"] = "username-changed";
|
|
10
|
+
EmailTemplateType["PASSWORD_CHANGED"] = "password-changed";
|
|
11
|
+
EmailTemplateType["RESOURCE_USAGE_BILLING_TRANSACTION_SUMMARY"] = "resource-usage-billing-transaction-summary";
|
|
12
|
+
EmailTemplateType["PROJECT_INVITATION"] = "project-invitation";
|
|
13
|
+
EmailTemplateType["DELETE_ACCOUNT_CONFIRMATION"] = "delete-account-confirmation";
|
|
14
|
+
EmailTemplateType["RESOURCE_HEALTH_CHANGED"] = "resource-health-changed";
|
|
15
|
+
EmailTemplateType["USER_RETRAINING_REQUIRED"] = "user-retraining-required";
|
|
16
|
+
EmailTemplateType["MAINTENANCE_REQUEST_CREATED"] = "maintenance-request-created";
|
|
17
|
+
EmailTemplateType["MESSAGE_RECEIVED"] = "message-received";
|
|
18
|
+
EmailTemplateType["RESOURCE_USAGE_NOTE_ADDED"] = "resource-usage-note-added";
|
|
19
|
+
EmailTemplateType["RESOURCE_TAKEOVER"] = "resource-takeover";
|
|
20
|
+
EmailTemplateType["ACCESS_CHANGE"] = "access-change";
|
|
21
|
+
EmailTemplateType["RESOURCE_SESSION_ENDED"] = "resource-session-ended";
|
|
22
|
+
})(EmailTemplateType || (exports.EmailTemplateType = EmailTemplateType = {}));
|
|
23
|
+
//# sourceMappingURL=email-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-template.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/email-template.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAiBX;AAjBD,WAAY,iBAAiB;IAC3B,kDAA6B,CAAA;IAC7B,wDAAmC,CAAA;IACnC,sDAAiC,CAAA;IACjC,0DAAqC,CAAA;IACrC,0DAAqC,CAAA;IACrC,8GAAyF,CAAA;IACzF,8DAAyC,CAAA;IACzC,gFAA2D,CAAA;IAC3D,wEAAmD,CAAA;IACnD,0EAAqD,CAAA;IACrD,gFAA2D,CAAA;IAC3D,0DAAqC,CAAA;IACrC,4EAAuD,CAAA;IACvD,4DAAuC,CAAA;IACvC,oDAA+B,CAAA;IAC/B,sEAAiD,CAAA;AACnD,CAAC,EAjBW,iBAAiB,iCAAjB,iBAAiB,QAiB5B"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ResourceFlowNodeType } from './node-type';
|
|
2
|
+
import { ResourceFlowVariableScope } from './resourceFlowVariable';
|
|
3
|
+
import { ResourceType } from './resource-type';
|
|
4
|
+
/** Which kind of flow an owner is: bound to one resource, or reacting to events of every resource. */
|
|
5
|
+
export type FlowScope = 'resource' | 'global';
|
|
6
|
+
export type ResourceFlowVariableValueType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'null';
|
|
7
|
+
/** A named flow that is not tied to one resource. */
|
|
8
|
+
export interface FlowRecord {
|
|
9
|
+
id: number;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string | null;
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
scope: FlowScope;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
17
|
+
interface FlowNodePosition {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}
|
|
21
|
+
/** A node of a resource flow (`resourceId` set) or of a global flow (`flowId` set). */
|
|
22
|
+
export interface FlowNodeRecord {
|
|
23
|
+
id: string;
|
|
24
|
+
type: ResourceFlowNodeType;
|
|
25
|
+
position: FlowNodePosition;
|
|
26
|
+
data: Record<string, unknown>;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
updatedAt: Date;
|
|
29
|
+
resourceId: number | null;
|
|
30
|
+
flowId: number | null;
|
|
31
|
+
}
|
|
32
|
+
export interface FlowEdgeRecord {
|
|
33
|
+
id: string;
|
|
34
|
+
source: string;
|
|
35
|
+
sourceHandle: string | null;
|
|
36
|
+
target: string;
|
|
37
|
+
targetHandle: string | null;
|
|
38
|
+
createdAt: Date;
|
|
39
|
+
updatedAt: Date;
|
|
40
|
+
resourceId: number | null;
|
|
41
|
+
flowId: number | null;
|
|
42
|
+
}
|
|
43
|
+
/** The canvas an owner saves: what the editor sends, without timestamps. */
|
|
44
|
+
export interface FlowCanvasInput {
|
|
45
|
+
nodes: Array<{
|
|
46
|
+
id: string;
|
|
47
|
+
type: string;
|
|
48
|
+
position: FlowNodePosition;
|
|
49
|
+
data?: Record<string, unknown> | null;
|
|
50
|
+
}>;
|
|
51
|
+
edges: Array<{
|
|
52
|
+
id: string;
|
|
53
|
+
source: string;
|
|
54
|
+
sourceHandle: string | null;
|
|
55
|
+
target: string;
|
|
56
|
+
targetHandle: string | null;
|
|
57
|
+
}>;
|
|
58
|
+
}
|
|
59
|
+
export interface FlowVariableRecord {
|
|
60
|
+
id: number;
|
|
61
|
+
scope: ResourceFlowVariableScope;
|
|
62
|
+
resourceId: number | null;
|
|
63
|
+
key: string;
|
|
64
|
+
/** JSON-stringified value. */
|
|
65
|
+
value: string;
|
|
66
|
+
valueType: ResourceFlowVariableValueType;
|
|
67
|
+
createdAt: Date;
|
|
68
|
+
updatedAt: Date;
|
|
69
|
+
}
|
|
70
|
+
/** What a flow run knows about the resource it acts on. */
|
|
71
|
+
export interface FlowResourceRecord {
|
|
72
|
+
id: number;
|
|
73
|
+
name: string;
|
|
74
|
+
type: ResourceType;
|
|
75
|
+
metadata: Record<string, unknown> | null;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-records.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/flow-records.ts"],"names":[],"mappings":""}
|
package/src/lib/form.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResourceFormAction = exports.FormFieldType = void 0;
|
|
4
|
+
var FormFieldType;
|
|
5
|
+
(function (FormFieldType) {
|
|
6
|
+
FormFieldType["TEXT"] = "text";
|
|
7
|
+
FormFieldType["NUMBER"] = "number";
|
|
8
|
+
FormFieldType["BOOLEAN"] = "boolean";
|
|
9
|
+
FormFieldType["SELECT"] = "select";
|
|
10
|
+
})(FormFieldType || (exports.FormFieldType = FormFieldType = {}));
|
|
11
|
+
var ResourceFormAction;
|
|
12
|
+
(function (ResourceFormAction) {
|
|
13
|
+
ResourceFormAction["START"] = "start";
|
|
14
|
+
ResourceFormAction["TAKEOVER"] = "takeover";
|
|
15
|
+
ResourceFormAction["END"] = "end";
|
|
16
|
+
})(ResourceFormAction || (exports.ResourceFormAction = ResourceFormAction = {}));
|
|
17
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/form.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;IACnB,kCAAiB,CAAA;AACnB,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,2CAAqB,CAAA;IACrB,iCAAW,CAAA;AACb,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type McpOAuthTokenKind = 'request' | 'code' | 'access' | 'refresh';
|
|
2
|
+
/** A public OAuth client that registered itself through Dynamic Client Registration (RFC 7591). */
|
|
3
|
+
export interface McpOAuthClientRecord {
|
|
4
|
+
clientId: string;
|
|
5
|
+
clientName: string;
|
|
6
|
+
redirectUris: string[];
|
|
7
|
+
registeredIp: string | null;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
}
|
|
10
|
+
export type NewMcpOAuthClient = Pick<McpOAuthClientRecord, 'clientId' | 'clientName' | 'redirectUris' | 'registeredIp'>;
|
|
11
|
+
/** A user's consent for one MCP client; the root of a refresh-token family. */
|
|
12
|
+
export interface McpOAuthGrantRecord {
|
|
13
|
+
id: string;
|
|
14
|
+
userId: number;
|
|
15
|
+
clientId: string;
|
|
16
|
+
/** Permissions the user approved; the effective ones are these intersected with the user's current ones. */
|
|
17
|
+
permissionKeys: string[];
|
|
18
|
+
/** Canonical URL of the MCP resource the tokens are bound to (RFC 8707). */
|
|
19
|
+
resource: string;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
/** Absolute lifetime of the grant; refresh tokens cannot extend it. */
|
|
22
|
+
expiresAt: Date;
|
|
23
|
+
lastUsedAt: Date | null;
|
|
24
|
+
revokedAt: Date | null;
|
|
25
|
+
}
|
|
26
|
+
export type NewMcpOAuthGrant = Pick<McpOAuthGrantRecord, 'id' | 'userId' | 'clientId' | 'permissionKeys' | 'resource' | 'expiresAt'>;
|
|
27
|
+
/** A pending authorization request, authorization code, access token or refresh token. Only the hash is stored. */
|
|
28
|
+
export interface McpOAuthTokenRecord {
|
|
29
|
+
tokenHash: string;
|
|
30
|
+
kind: McpOAuthTokenKind;
|
|
31
|
+
grantId: string | null;
|
|
32
|
+
/** Request and code parameters (client, redirect URI, PKCE challenge, state, scope, resource). */
|
|
33
|
+
payload: Record<string, unknown> | null;
|
|
34
|
+
createdAt: Date;
|
|
35
|
+
expiresAt: Date;
|
|
36
|
+
/** Set when a single-use value (request, code, refresh token) has been consumed. */
|
|
37
|
+
usedAt: Date | null;
|
|
38
|
+
}
|
|
39
|
+
export type NewMcpOAuthToken = Pick<McpOAuthTokenRecord, 'tokenHash' | 'kind' | 'grantId' | 'payload' | 'expiresAt'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-oauth.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/mcp-oauth.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageReferenceType = void 0;
|
|
4
|
+
var MessageReferenceType;
|
|
5
|
+
(function (MessageReferenceType) {
|
|
6
|
+
MessageReferenceType["RESOURCE"] = "RESOURCE";
|
|
7
|
+
MessageReferenceType["ACTIVITY"] = "ACTIVITY";
|
|
8
|
+
})(MessageReferenceType || (exports.MessageReferenceType = MessageReferenceType = {}));
|
|
9
|
+
//# sourceMappingURL=message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/message.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACvB,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { MessageReferenceType } from './message';
|
|
2
|
+
/** The public part of an account as other participants of a conversation see it. */
|
|
3
|
+
export interface MessagingUser {
|
|
4
|
+
id: number;
|
|
5
|
+
username: string;
|
|
6
|
+
locale: string;
|
|
7
|
+
dateTimeLocale: string | null;
|
|
8
|
+
isEmailVerified: boolean;
|
|
9
|
+
isDisabled: boolean;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
deletedAt?: Date | null;
|
|
13
|
+
externalIdentifier: string | null;
|
|
14
|
+
creditBalance: number;
|
|
15
|
+
billingFactor: number;
|
|
16
|
+
}
|
|
17
|
+
export interface ConversationRecord {
|
|
18
|
+
id: number;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
}
|
|
22
|
+
export interface MessageRecord {
|
|
23
|
+
id: number;
|
|
24
|
+
conversationId: number;
|
|
25
|
+
senderId: number;
|
|
26
|
+
content: string;
|
|
27
|
+
referenceType: MessageReferenceType | null;
|
|
28
|
+
referenceId: number | null;
|
|
29
|
+
referenceLabel: string | null;
|
|
30
|
+
referenceUrl: string | null;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
/** Present when the message was read together with its sender. */
|
|
33
|
+
sender?: MessagingUser;
|
|
34
|
+
}
|
|
35
|
+
export interface NewMessage {
|
|
36
|
+
conversationId: number;
|
|
37
|
+
senderId: number;
|
|
38
|
+
content: string;
|
|
39
|
+
referenceType: MessageReferenceType | null;
|
|
40
|
+
referenceId: number | null;
|
|
41
|
+
referenceLabel: string | null;
|
|
42
|
+
referenceUrl: string | null;
|
|
43
|
+
}
|
|
44
|
+
/** One user's membership of a conversation with the state of their inbox. */
|
|
45
|
+
export interface ConversationParticipation {
|
|
46
|
+
participantId: number;
|
|
47
|
+
conversationId: number;
|
|
48
|
+
userId: number;
|
|
49
|
+
lastReadAt: Date | null;
|
|
50
|
+
lastNotifiedAt: Date | null;
|
|
51
|
+
conversationUpdatedAt: Date;
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messaging-models.js","sourceRoot":"","sources":["../../../../../libs/application-models/src/lib/messaging-models.ts"],"names":[],"mappings":""}
|