@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.
@@ -47,3 +47,25 @@ export const deviceTokenMintResponseSchema = z.object({
47
47
  nextDeviceSecret: z.string(),
48
48
  state: deviceSessionStateSchema,
49
49
  });
50
+ /* -------------------------------------------------------------------------- */
51
+ /* Hub ticket — server-side cross-origin device credential sync */
52
+ /* -------------------------------------------------------------------------- */
53
+ /** Request body for `POST /session/device/hub-ticket`. */
54
+ export const deviceHubTicketIssueRequestSchema = z.object({
55
+ returnOrigin: z.string().min(1),
56
+ });
57
+ /** Response from `POST /session/device/hub-ticket`. */
58
+ export const deviceHubTicketIssueResponseSchema = z.object({
59
+ ticket: z.string().min(1),
60
+ expiresIn: z.number().int().positive(),
61
+ });
62
+ /** Request body for `POST /session/device/redeem-ticket`. */
63
+ export const deviceHubTicketRedeemRequestSchema = z.object({
64
+ ticket: z.string().min(1),
65
+ returnOrigin: z.string().min(1),
66
+ });
67
+ /** Response from `POST /session/device/redeem-ticket`. */
68
+ export const deviceHubTicketRedeemResponseSchema = z.object({
69
+ deviceId: z.string().min(1),
70
+ deviceSecret: z.string().min(1),
71
+ });
package/dist/esm/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * @oxyhq/contracts — single source of truth for API request/response contracts.
3
3
  *
4
4
  * Zod schemas plus their inferred types, shared by the backend (`@oxyhq/api`)
5
- * and the client SDKs (`@oxyhq/core`, `@oxyhq/auth`, `@oxyhq/services`). The
5
+ * and the client SDKs (`@oxyhq/core`, `@oxyhq/services`). The
6
6
  * producer validates its output and every consumer validates its input against
7
7
  * exactly the same definitions, so the wire shape cannot drift.
8
8
  *
@@ -19,9 +19,6 @@ export {
19
19
  applicationTypeSchema, publicApplicationSchema, sessionStatusSchema, } from './sessionStatus.js';
20
20
  export {
21
21
  // Schemas
22
- fedcmTokenPayloadSchema, } from './fedcmToken.js';
23
- export {
24
- // Schemas
25
22
  recommendationExcludeTypeSchema, recommendationBoostSchema, recommendationSignalWeightsSchema, recommendationRequestSchema, recommendationCountSchema, recommendationItemSchema, recommendationResponseSchema, appEndorsementInputSchema, appInterestInputSchema, appUserSignalIngestSchema, appAffinityEventTypeSchema, appAffinityEventSchema, appAffinityEventsIngestSchema, } from './recommendations.js';
26
23
  export {
27
24
  // Schemas
@@ -40,7 +37,7 @@ credentialRecordSchema, verifiableCredentialResponseSchema, credentialIssueResul
40
37
  export {
41
38
  // Schemas
42
39
  linkPreviewSchema, linkPreviewBatchRequestSchema, linkPreviewBatchResponseSchema, linkPreviewResponseSchema, } from './links.js';
43
- export { sessionAccountSchema, deviceSessionStateSchema, activeTokenSchema, deviceSessionSyncSchema, deviceTokenMintRequestSchema, deviceTokenMintResponseSchema, } from './deviceSession.js';
40
+ export { sessionAccountSchema, deviceSessionStateSchema, activeTokenSchema, deviceSessionSyncSchema, deviceTokenMintRequestSchema, deviceTokenMintResponseSchema, deviceHubTicketIssueRequestSchema, deviceHubTicketIssueResponseSchema, deviceHubTicketRedeemRequestSchema, deviceHubTicketRedeemResponseSchema, } from './deviceSession.js';
44
41
  export {
45
42
  // Schemas
46
43
  loginResultSchema, } from './deviceBoot.js';
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * This package (`@oxyhq/contracts`) is the dedicated, zero-dependency home for
13
13
  * these contracts so the backend (`@oxyhq/api`) and the client SDKs
14
- * (`@oxyhq/core`, `@oxyhq/auth`, `@oxyhq/services`) can all depend on it without
14
+ * (`@oxyhq/core`, `@oxyhq/services`) can all depend on it without
15
15
  * the backend having to depend on a client SDK to obtain its schemas.
16
16
  *
17
17
  * Faithful to the producers: