@oxyhq/contracts 0.14.2 → 0.15.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/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/deviceBoot.js +6 -12
- package/dist/cjs/identity.js +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/deviceBoot.js +6 -12
- package/dist/esm/identity.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/deviceBoot.d.ts +10 -18
- package/dist/types/identity.d.ts +7 -7
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/deviceBoot.js
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* First-party login result contract.
|
|
4
4
|
*
|
|
5
|
-
* SINGLE SOURCE OF TRUTH for the first-party
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* SINGLE SOURCE OF TRUTH for the first-party login result (the session arm). The
|
|
6
|
+
* API validates its OUTPUT against this schema; every consumer (`@oxyhq/core`'s
|
|
7
|
+
* auth mixin) validates its INPUT against the same definition, so producer and
|
|
8
|
+
* consumers cannot drift. Sign-in is passkey (WebAuthn) or Commons handoff —
|
|
9
|
+
* password and 2FA were removed, so the only outcome is a completed session.
|
|
9
10
|
*
|
|
10
11
|
* The device transport is `deviceId` + `deviceSecret` + `POST /session/device/token`
|
|
11
12
|
* (see `deviceSession.ts`). The legacy cookie/bootstrap/refresh-family lanes were
|
|
@@ -25,10 +26,6 @@
|
|
|
25
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
27
|
exports.loginResultSchema = void 0;
|
|
27
28
|
const zod_1 = require("zod");
|
|
28
|
-
const loginTwoFactorRequiredSchema = zod_1.z.object({
|
|
29
|
-
twoFactorRequired: zod_1.z.literal(true),
|
|
30
|
-
loginToken: zod_1.z.string(),
|
|
31
|
-
});
|
|
32
29
|
const securityAlertSchema = zod_1.z.object({
|
|
33
30
|
message: zod_1.z.string(),
|
|
34
31
|
anomalies: zod_1.z.array(zod_1.z.object({
|
|
@@ -50,7 +47,4 @@ const loginSessionResultSchema = zod_1.z.object({
|
|
|
50
47
|
avatar: zod_1.z.string().optional(),
|
|
51
48
|
}),
|
|
52
49
|
});
|
|
53
|
-
exports.loginResultSchema =
|
|
54
|
-
loginTwoFactorRequiredSchema,
|
|
55
|
-
loginSessionResultSchema,
|
|
56
|
-
]);
|
|
50
|
+
exports.loginResultSchema = loginSessionResultSchema;
|
package/dist/cjs/identity.js
CHANGED
|
@@ -190,7 +190,7 @@ exports.domainVerificationInstructionsSchema = zod_1.z.object({
|
|
|
190
190
|
}),
|
|
191
191
|
});
|
|
192
192
|
exports.authMethodEntrySchema = zod_1.z.object({
|
|
193
|
-
type: zod_1.z.enum(['identity', '
|
|
193
|
+
type: zod_1.z.enum(['identity', 'webauthn']),
|
|
194
194
|
linkedAt: zod_1.z.union([zod_1.z.string(), zod_1.z.date()]),
|
|
195
195
|
verificationMethodId: zod_1.z.string().optional(),
|
|
196
196
|
credentialId: zod_1.z.string().optional(),
|