@oxyhq/contracts 0.13.0 → 0.13.1
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/deviceSession.js +23 -1
- package/dist/cjs/index.js +7 -6
- package/dist/cjs/userResponse.js +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/deviceSession.js +22 -0
- package/dist/esm/index.js +2 -5
- package/dist/esm/userResponse.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/deviceSession.d.ts +45 -0
- package/dist/types/index.d.ts +3 -5
- package/dist/types/userResponse.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/fedcmToken.js +0 -66
- package/dist/esm/fedcmToken.js +0 -63
- package/dist/types/fedcmToken.d.ts +0 -90
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = void 0;
|
|
3
|
+
exports.deviceHubTicketRedeemResponseSchema = exports.deviceHubTicketRedeemRequestSchema = exports.deviceHubTicketIssueResponseSchema = exports.deviceHubTicketIssueRequestSchema = exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.sessionAccountSchema = zod_1.z.object({
|
|
6
6
|
accountId: zod_1.z.string(),
|
|
@@ -50,3 +50,25 @@ exports.deviceTokenMintResponseSchema = zod_1.z.object({
|
|
|
50
50
|
nextDeviceSecret: zod_1.z.string(),
|
|
51
51
|
state: exports.deviceSessionStateSchema,
|
|
52
52
|
});
|
|
53
|
+
/* -------------------------------------------------------------------------- */
|
|
54
|
+
/* Hub ticket — server-side cross-origin device credential sync */
|
|
55
|
+
/* -------------------------------------------------------------------------- */
|
|
56
|
+
/** Request body for `POST /session/device/hub-ticket`. */
|
|
57
|
+
exports.deviceHubTicketIssueRequestSchema = zod_1.z.object({
|
|
58
|
+
returnOrigin: zod_1.z.string().min(1),
|
|
59
|
+
});
|
|
60
|
+
/** Response from `POST /session/device/hub-ticket`. */
|
|
61
|
+
exports.deviceHubTicketIssueResponseSchema = zod_1.z.object({
|
|
62
|
+
ticket: zod_1.z.string().min(1),
|
|
63
|
+
expiresIn: zod_1.z.number().int().positive(),
|
|
64
|
+
});
|
|
65
|
+
/** Request body for `POST /session/device/redeem-ticket`. */
|
|
66
|
+
exports.deviceHubTicketRedeemRequestSchema = zod_1.z.object({
|
|
67
|
+
ticket: zod_1.z.string().min(1),
|
|
68
|
+
returnOrigin: zod_1.z.string().min(1),
|
|
69
|
+
});
|
|
70
|
+
/** Response from `POST /session/device/redeem-ticket`. */
|
|
71
|
+
exports.deviceHubTicketRedeemResponseSchema = zod_1.z.object({
|
|
72
|
+
deviceId: zod_1.z.string().min(1),
|
|
73
|
+
deviceSecret: zod_1.z.string().min(1),
|
|
74
|
+
});
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @oxyhq/contracts — single source of truth for API request/response contracts.
|
|
4
4
|
*
|
|
5
5
|
* Zod schemas plus their inferred types, shared by the backend (`@oxyhq/api`)
|
|
6
|
-
* and the client SDKs (`@oxyhq/core`, `@oxyhq/
|
|
6
|
+
* and the client SDKs (`@oxyhq/core`, `@oxyhq/services`). The
|
|
7
7
|
* producer validates its output and every consumer validates its input against
|
|
8
8
|
* exactly the same definitions, so the wire shape cannot drift.
|
|
9
9
|
*
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* expo, no `require()` in the ESM build.
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.personhoodBreakdownSchema = exports.personhoodVouchRecordSchema = exports.validationVoteResultSchema = exports.validationRequestSummarySchema = exports.validationOpenResultSchema = exports.validationOpenRequestSchema = exports.validationVerdictRecordSchema = exports.realLifeAttestationResultSchema = exports.realLifeAttestationRecordSchema = exports.signedPublicCardSchema = exports.publicCardSchema = exports.logPageResponseSchema = exports.chainHeadResponseSchema = exports.oxySignedRecordTypeSchema = exports.exportBundleSchema = exports.exportAttestationSchema = exports.authMethodsResponseSchema = exports.authMethodEntrySchema = exports.domainVerificationInstructionsSchema = exports.domainVerificationRequestSchema = exports.verifiedDomainSchema = exports.signedRecordEnvelopeSchema = exports.didDocumentSchema = exports.didServiceSchema = exports.verificationMethodSchema = exports.appAffinityEventsIngestSchema = exports.appAffinityEventSchema = exports.appAffinityEventTypeSchema = exports.appUserSignalIngestSchema = exports.appInterestInputSchema = exports.appEndorsementInputSchema = exports.recommendationResponseSchema = exports.recommendationItemSchema = exports.recommendationCountSchema = exports.recommendationRequestSchema = exports.recommendationSignalWeightsSchema = exports.recommendationBoostSchema = exports.recommendationExcludeTypeSchema = exports.
|
|
15
|
-
exports.loginResultSchema = exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = exports.linkPreviewResponseSchema = exports.linkPreviewBatchResponseSchema = exports.linkPreviewBatchRequestSchema = exports.linkPreviewSchema = exports.credentialVerifyResultSchema = exports.credentialListResultSchema = exports.credentialIssueResultSchema = exports.verifiableCredentialResponseSchema = exports.credentialRecordSchema = exports.vouchResultSchema =
|
|
14
|
+
exports.personhoodStatusResultSchema = exports.personhoodBreakdownSchema = exports.personhoodVouchRecordSchema = exports.validationVoteResultSchema = exports.validationRequestSummarySchema = exports.validationOpenResultSchema = exports.validationOpenRequestSchema = exports.validationVerdictRecordSchema = exports.realLifeAttestationResultSchema = exports.realLifeAttestationRecordSchema = exports.signedPublicCardSchema = exports.publicCardSchema = exports.logPageResponseSchema = exports.chainHeadResponseSchema = exports.oxySignedRecordTypeSchema = exports.exportBundleSchema = exports.exportAttestationSchema = exports.authMethodsResponseSchema = exports.authMethodEntrySchema = exports.domainVerificationInstructionsSchema = exports.domainVerificationRequestSchema = exports.verifiedDomainSchema = exports.signedRecordEnvelopeSchema = exports.didDocumentSchema = exports.didServiceSchema = exports.verificationMethodSchema = exports.appAffinityEventsIngestSchema = exports.appAffinityEventSchema = exports.appAffinityEventTypeSchema = exports.appUserSignalIngestSchema = exports.appInterestInputSchema = exports.appEndorsementInputSchema = exports.recommendationResponseSchema = exports.recommendationItemSchema = exports.recommendationCountSchema = exports.recommendationRequestSchema = exports.recommendationSignalWeightsSchema = exports.recommendationBoostSchema = exports.recommendationExcludeTypeSchema = exports.sessionStatusSchema = exports.publicApplicationSchema = exports.applicationTypeSchema = exports.safeParseContract = exports.resolveUserId = exports.deviceLinkedSessionsResponseSchema = exports.deviceLinkedSessionSchema = exports.currentUserResponseSchema = exports.userProfileUpdateSchema = exports.userResponseSchema = exports.userNameSchema = void 0;
|
|
15
|
+
exports.loginResultSchema = exports.deviceHubTicketRedeemResponseSchema = exports.deviceHubTicketRedeemRequestSchema = exports.deviceHubTicketIssueResponseSchema = exports.deviceHubTicketIssueRequestSchema = exports.deviceTokenMintResponseSchema = exports.deviceTokenMintRequestSchema = exports.deviceSessionSyncSchema = exports.activeTokenSchema = exports.deviceSessionStateSchema = exports.sessionAccountSchema = exports.linkPreviewResponseSchema = exports.linkPreviewBatchResponseSchema = exports.linkPreviewBatchRequestSchema = exports.linkPreviewSchema = exports.credentialVerifyResultSchema = exports.credentialListResultSchema = exports.credentialIssueResultSchema = exports.verifiableCredentialResponseSchema = exports.credentialRecordSchema = exports.vouchResultSchema = void 0;
|
|
16
16
|
var userResponse_1 = require("./userResponse");
|
|
17
17
|
// Schemas
|
|
18
18
|
Object.defineProperty(exports, "userNameSchema", { enumerable: true, get: function () { return userResponse_1.userNameSchema; } });
|
|
@@ -29,9 +29,6 @@ var sessionStatus_1 = require("./sessionStatus");
|
|
|
29
29
|
Object.defineProperty(exports, "applicationTypeSchema", { enumerable: true, get: function () { return sessionStatus_1.applicationTypeSchema; } });
|
|
30
30
|
Object.defineProperty(exports, "publicApplicationSchema", { enumerable: true, get: function () { return sessionStatus_1.publicApplicationSchema; } });
|
|
31
31
|
Object.defineProperty(exports, "sessionStatusSchema", { enumerable: true, get: function () { return sessionStatus_1.sessionStatusSchema; } });
|
|
32
|
-
var fedcmToken_1 = require("./fedcmToken");
|
|
33
|
-
// Schemas
|
|
34
|
-
Object.defineProperty(exports, "fedcmTokenPayloadSchema", { enumerable: true, get: function () { return fedcmToken_1.fedcmTokenPayloadSchema; } });
|
|
35
32
|
var recommendations_1 = require("./recommendations");
|
|
36
33
|
// Schemas
|
|
37
34
|
Object.defineProperty(exports, "recommendationExcludeTypeSchema", { enumerable: true, get: function () { return recommendations_1.recommendationExcludeTypeSchema; } });
|
|
@@ -101,6 +98,10 @@ Object.defineProperty(exports, "activeTokenSchema", { enumerable: true, get: fun
|
|
|
101
98
|
Object.defineProperty(exports, "deviceSessionSyncSchema", { enumerable: true, get: function () { return deviceSession_1.deviceSessionSyncSchema; } });
|
|
102
99
|
Object.defineProperty(exports, "deviceTokenMintRequestSchema", { enumerable: true, get: function () { return deviceSession_1.deviceTokenMintRequestSchema; } });
|
|
103
100
|
Object.defineProperty(exports, "deviceTokenMintResponseSchema", { enumerable: true, get: function () { return deviceSession_1.deviceTokenMintResponseSchema; } });
|
|
101
|
+
Object.defineProperty(exports, "deviceHubTicketIssueRequestSchema", { enumerable: true, get: function () { return deviceSession_1.deviceHubTicketIssueRequestSchema; } });
|
|
102
|
+
Object.defineProperty(exports, "deviceHubTicketIssueResponseSchema", { enumerable: true, get: function () { return deviceSession_1.deviceHubTicketIssueResponseSchema; } });
|
|
103
|
+
Object.defineProperty(exports, "deviceHubTicketRedeemRequestSchema", { enumerable: true, get: function () { return deviceSession_1.deviceHubTicketRedeemRequestSchema; } });
|
|
104
|
+
Object.defineProperty(exports, "deviceHubTicketRedeemResponseSchema", { enumerable: true, get: function () { return deviceSession_1.deviceHubTicketRedeemResponseSchema; } });
|
|
104
105
|
var deviceBoot_1 = require("./deviceBoot");
|
|
105
106
|
// Schemas
|
|
106
107
|
Object.defineProperty(exports, "loginResultSchema", { enumerable: true, get: function () { return deviceBoot_1.loginResultSchema; } });
|
package/dist/cjs/userResponse.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* This package (`@oxyhq/contracts`) is the dedicated, zero-dependency home for
|
|
14
14
|
* these contracts so the backend (`@oxyhq/api`) and the client SDKs
|
|
15
|
-
* (`@oxyhq/core`, `@oxyhq/
|
|
15
|
+
* (`@oxyhq/core`, `@oxyhq/services`) can all depend on it without
|
|
16
16
|
* the backend having to depend on a client SDK to obtain its schemas.
|
|
17
17
|
*
|
|
18
18
|
* Faithful to the producers:
|