@tolinax/ayoune-interfaces 2026.37.1 → 2026.40.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/api/IAPIResult.d.ts +6 -2
- package/data/modelNames.d.ts +2 -0
- package/data/modelNames.js +2 -0
- package/data/modelsAndRights.js +23 -0
- package/interfaces/ICredential.d.ts +3 -0
- package/interfaces/IWebAuthnCredential.d.ts +50 -0
- package/interfaces/IWebAuthnCredential.js +2 -0
- package/interfaces/IWebhookLog.d.ts +25 -0
- package/interfaces/IWebhookLog.js +2 -0
- package/interfaces/IaYOUneUser.d.ts +9 -0
- package/interfaces/index.d.ts +2 -0
- package/interfaces/index.js +2 -0
- package/package.json +1 -1
package/api/IAPIResult.d.ts
CHANGED
|
@@ -49,9 +49,13 @@ export interface IAPIResultMeta {
|
|
|
49
49
|
model?: string;
|
|
50
50
|
rateLimit?: IResponseRateLimit;
|
|
51
51
|
pageInfo?: {
|
|
52
|
-
totalPages: number;
|
|
53
52
|
page: number;
|
|
54
|
-
|
|
53
|
+
/** Total page count. `undefined` when the caller opted out via `?skipCount=true` — pair with `countSkipped`. */
|
|
54
|
+
totalPages?: number;
|
|
55
|
+
/** Total entry count. `undefined` when the caller opted out via `?skipCount=true` — pair with `countSkipped`. */
|
|
56
|
+
totalEntries?: number;
|
|
57
|
+
/** `true` when the server skipped `countDocuments()` to avoid a slow scan on a large collection. Consumers should paginate until the returned page is shorter than `limit` instead of relying on `totalPages`. */
|
|
58
|
+
countSkipped?: boolean;
|
|
55
59
|
};
|
|
56
60
|
debugId?: string;
|
|
57
61
|
audit?: any;
|
package/data/modelNames.d.ts
CHANGED
|
@@ -642,8 +642,10 @@ export declare enum aMN {
|
|
|
642
642
|
Warehouses = "Warehouses",
|
|
643
643
|
Watchers = "Watchers",
|
|
644
644
|
Watchlists = "Watchlists",
|
|
645
|
+
WebAuthnCredentials = "WebAuthnCredentials",
|
|
645
646
|
WebPages = "WebPages",
|
|
646
647
|
WebPushSubscribers = "WebPushSubscribers",
|
|
648
|
+
WebhookLogs = "WebhookLogs",
|
|
647
649
|
WebReceiverLogs = "WebReceiverLogs",
|
|
648
650
|
WebReceivers = "WebReceivers",
|
|
649
651
|
WebsiteMenus = "WebsiteMenus",
|
package/data/modelNames.js
CHANGED
|
@@ -646,8 +646,10 @@ var aMN;
|
|
|
646
646
|
aMN["Warehouses"] = "Warehouses";
|
|
647
647
|
aMN["Watchers"] = "Watchers";
|
|
648
648
|
aMN["Watchlists"] = "Watchlists";
|
|
649
|
+
aMN["WebAuthnCredentials"] = "WebAuthnCredentials";
|
|
649
650
|
aMN["WebPages"] = "WebPages";
|
|
650
651
|
aMN["WebPushSubscribers"] = "WebPushSubscribers";
|
|
652
|
+
aMN["WebhookLogs"] = "WebhookLogs";
|
|
651
653
|
aMN["WebReceiverLogs"] = "WebReceiverLogs";
|
|
652
654
|
aMN["WebReceivers"] = "WebReceivers";
|
|
653
655
|
aMN["WebsiteMenus"] = "WebsiteMenus";
|
package/data/modelsAndRights.js
CHANGED
|
@@ -7268,6 +7268,18 @@ const modelsAndRights = [
|
|
|
7268
7268
|
updateBy: "_id",
|
|
7269
7269
|
availableInSDK: false,
|
|
7270
7270
|
},
|
|
7271
|
+
{
|
|
7272
|
+
plural: "WebAuthnCredentials",
|
|
7273
|
+
singular: "WebAuthnCredential",
|
|
7274
|
+
module: "su",
|
|
7275
|
+
right: "su.users",
|
|
7276
|
+
readOnly: false,
|
|
7277
|
+
importable: false,
|
|
7278
|
+
allowDuplicate: false,
|
|
7279
|
+
updateBy: "_id",
|
|
7280
|
+
availableInSDK: false,
|
|
7281
|
+
piiLevel: "high",
|
|
7282
|
+
},
|
|
7271
7283
|
{
|
|
7272
7284
|
plural: "WebPages",
|
|
7273
7285
|
singular: "WebPage",
|
|
@@ -7301,6 +7313,17 @@ const modelsAndRights = [
|
|
|
7301
7313
|
updateBy: "_id",
|
|
7302
7314
|
availableInSDK: false,
|
|
7303
7315
|
},
|
|
7316
|
+
{
|
|
7317
|
+
plural: "WebhookLogs",
|
|
7318
|
+
singular: "WebhookLog",
|
|
7319
|
+
module: "automation",
|
|
7320
|
+
right: "automation.webhooklogs",
|
|
7321
|
+
readOnly: true,
|
|
7322
|
+
importable: false,
|
|
7323
|
+
allowDuplicate: false,
|
|
7324
|
+
updateBy: "_id",
|
|
7325
|
+
availableInSDK: false,
|
|
7326
|
+
},
|
|
7304
7327
|
{
|
|
7305
7328
|
plural: "WebReceivers",
|
|
7306
7329
|
singular: "WebReceiver",
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
/**
|
|
3
|
+
* One enrolled WebAuthn / passkey credential bound to an `aYOUneUser`.
|
|
4
|
+
*
|
|
5
|
+
* Created by `platform/auth` when a user completes a
|
|
6
|
+
* `POST /webauthn/register/verify` flow. Looked up by `credentialID` (which is
|
|
7
|
+
* whatever the authenticator returns, base64url-encoded) during
|
|
8
|
+
* `POST /webauthn/authenticate/verify` and `POST /webauthn/2factor/verify`.
|
|
9
|
+
*
|
|
10
|
+
* `publicKey` is the COSE-encoded public key material — stored as a `Buffer`
|
|
11
|
+
* so we don't re-encode on every verification. Treat as high-PII / credential
|
|
12
|
+
* material: `select: false` in the Mongoose schema so it never leaks into a
|
|
13
|
+
* default query projection.
|
|
14
|
+
*
|
|
15
|
+
* `counter` tracks the authenticator's signature counter to detect cloned
|
|
16
|
+
* authenticators (must strictly increase on each successful assertion, unless
|
|
17
|
+
* the authenticator reports 0 — several platform authenticators do).
|
|
18
|
+
*
|
|
19
|
+
* Not exposed to the Custom Functions SDK (`availableInSDK: false`). Admin-only
|
|
20
|
+
* CRUD; normal users manage their own credentials via the dedicated
|
|
21
|
+
* `/webauthn/credentials` endpoints.
|
|
22
|
+
*/
|
|
23
|
+
export interface IWebAuthnCredential extends IDefaultFields {
|
|
24
|
+
/** User that owns the credential */
|
|
25
|
+
_userID: ObjectId;
|
|
26
|
+
/** Tenant scope at enrollment time (optional — some users are tenant-less, e.g. su admins) */
|
|
27
|
+
_customerID?: ObjectId;
|
|
28
|
+
/** Base64url-encoded credential identifier returned by the authenticator. Unique. */
|
|
29
|
+
credentialID: string;
|
|
30
|
+
/**
|
|
31
|
+
* COSE public key bytes (select: false in schema).
|
|
32
|
+
* Typed as `Uint8Array` to keep `@tolinax/ayoune-interfaces` runtime-free;
|
|
33
|
+
* Mongoose persists via `Buffer`, which is itself a `Uint8Array` at runtime.
|
|
34
|
+
*/
|
|
35
|
+
publicKey: Uint8Array;
|
|
36
|
+
/** Signature counter from the authenticator; must strictly increase. */
|
|
37
|
+
counter: number;
|
|
38
|
+
/** Single-device passkey (e.g. hardware key) vs multi-device (iCloud Keychain, Google Password Manager, etc.) */
|
|
39
|
+
deviceType: "singleDevice" | "multiDevice";
|
|
40
|
+
/** Whether the credential is backed up to an external service */
|
|
41
|
+
backedUp: boolean;
|
|
42
|
+
/** Hints for how the authenticator communicates ("usb", "nfc", "ble", "internal", "hybrid") */
|
|
43
|
+
transports?: string[];
|
|
44
|
+
/** User-friendly label shown in the "Manage passkeys" UI */
|
|
45
|
+
nickname?: string;
|
|
46
|
+
/** Authenticator Attestation GUID (if available from the attestation) */
|
|
47
|
+
aaguid?: string;
|
|
48
|
+
/** Bumped on every successful assertion */
|
|
49
|
+
lastUsedAt?: Date;
|
|
50
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IDefaultFields } from "./IDefaultFields";
|
|
2
|
+
export interface IWebhookLog extends IDefaultFields {
|
|
3
|
+
_customerID: ObjectId;
|
|
4
|
+
_consumerID?: ObjectId;
|
|
5
|
+
_contract?: ObjectId;
|
|
6
|
+
_clientID?: ObjectId[];
|
|
7
|
+
_subID?: ObjectId[];
|
|
8
|
+
_trigger?: ObjectId;
|
|
9
|
+
_triggerActionId?: ObjectId;
|
|
10
|
+
actionIndex?: number;
|
|
11
|
+
url?: string;
|
|
12
|
+
method?: "POST" | "GET" | "PUT" | "PATCH" | "DELETE";
|
|
13
|
+
requestHeaders?: any;
|
|
14
|
+
requestBody?: string;
|
|
15
|
+
requestBodyType?: "raw" | "form";
|
|
16
|
+
responseStatus?: number;
|
|
17
|
+
responseHeaders?: any;
|
|
18
|
+
responseBody?: string;
|
|
19
|
+
durationMs?: number;
|
|
20
|
+
status?: "pending" | "success" | "failed";
|
|
21
|
+
error?: string;
|
|
22
|
+
attempt?: number;
|
|
23
|
+
retryOf?: ObjectId;
|
|
24
|
+
snapshot?: any;
|
|
25
|
+
}
|
|
@@ -28,7 +28,16 @@ export interface IaYOUneUser extends IDefaultFields {
|
|
|
28
28
|
auth?: any;
|
|
29
29
|
_ayouneid?: string;
|
|
30
30
|
token?: string;
|
|
31
|
+
/**
|
|
32
|
+
* SHA-256 hex digest of the single-use password-reset token.
|
|
33
|
+
* The raw token is only ever sent in the reset email; the DB stores the hash
|
|
34
|
+
* so a DB read cannot grant reset access.
|
|
35
|
+
*/
|
|
31
36
|
resetToken?: string;
|
|
37
|
+
/** Absolute expiry for `resetToken` (typically +30 min from issuance). */
|
|
38
|
+
resetTokenExpiresAt?: Date;
|
|
39
|
+
/** Set when a reset is successfully consumed; prevents replay. */
|
|
40
|
+
resetTokenUsedAt?: Date;
|
|
32
41
|
refreshTokens?: string[];
|
|
33
42
|
salutation?: string;
|
|
34
43
|
position?: string;
|
package/interfaces/index.d.ts
CHANGED
|
@@ -688,10 +688,12 @@ export * from "./IWarehouse";
|
|
|
688
688
|
export * from "./IWarning";
|
|
689
689
|
export * from "./IWatcher";
|
|
690
690
|
export * from "./IWatchlist";
|
|
691
|
+
export * from "./IWebAuthnCredential";
|
|
691
692
|
export * from "./IWebPage";
|
|
692
693
|
export * from "./IWebPushSubscriber";
|
|
693
694
|
export * from "./IWebReceiver";
|
|
694
695
|
export * from "./IWebReceiverLog";
|
|
696
|
+
export * from "./IWebhookLog";
|
|
695
697
|
export * from "./IWebsite";
|
|
696
698
|
export * from "./IWebsiteMenu";
|
|
697
699
|
export * from "./IWebsiteTemplate";
|
package/interfaces/index.js
CHANGED
|
@@ -704,10 +704,12 @@ __exportStar(require("./IWarehouse"), exports);
|
|
|
704
704
|
__exportStar(require("./IWarning"), exports);
|
|
705
705
|
__exportStar(require("./IWatcher"), exports);
|
|
706
706
|
__exportStar(require("./IWatchlist"), exports);
|
|
707
|
+
__exportStar(require("./IWebAuthnCredential"), exports);
|
|
707
708
|
__exportStar(require("./IWebPage"), exports);
|
|
708
709
|
__exportStar(require("./IWebPushSubscriber"), exports);
|
|
709
710
|
__exportStar(require("./IWebReceiver"), exports);
|
|
710
711
|
__exportStar(require("./IWebReceiverLog"), exports);
|
|
712
|
+
__exportStar(require("./IWebhookLog"), exports);
|
|
711
713
|
__exportStar(require("./IWebsite"), exports);
|
|
712
714
|
__exportStar(require("./IWebsiteMenu"), exports);
|
|
713
715
|
__exportStar(require("./IWebsiteTemplate"), exports);
|