@oxyhq/contracts 0.15.0 → 0.17.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/index.js +16 -3
- package/dist/cjs/keyRecovery.js +91 -0
- package/dist/cjs/keyRotation.js +75 -0
- package/dist/cjs/userResponse.js +27 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/index.js +7 -1
- package/dist/esm/keyRecovery.js +88 -0
- package/dist/esm/keyRotation.js +72 -0
- package/dist/esm/userResponse.js +26 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +6 -2
- package/dist/types/keyRecovery.d.ts +138 -0
- package/dist/types/keyRotation.d.ts +103 -0
- package/dist/types/sessionStatus.d.ts +6 -6
- package/dist/types/userResponse.d.ts +256 -0
- package/package.json +2 -2
|
@@ -61,6 +61,35 @@ export interface UserNameResponse {
|
|
|
61
61
|
[key: string]: unknown;
|
|
62
62
|
}
|
|
63
63
|
export declare const userNameSchema: z.ZodType<UserNameResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* The authenticated viewer's relationship to a fetched profile.
|
|
66
|
+
*
|
|
67
|
+
* Rides the SINGLE-profile fetch (profile-by-username / profile-by-id) so
|
|
68
|
+
* consumers get follow state without a second round-trip. Present ONLY when the
|
|
69
|
+
* request is authenticated (the viewer id is known) — OMITTED entirely for
|
|
70
|
+
* anonymous requests, so a consumer can distinguish "unknown" (field absent)
|
|
71
|
+
* from "known, not following" (`isFollowing: false`).
|
|
72
|
+
*/
|
|
73
|
+
export interface UserRelationship {
|
|
74
|
+
/** The viewer follows this profile (viewer → target). */
|
|
75
|
+
isFollowing: boolean;
|
|
76
|
+
/** This profile follows the viewer (target → viewer). */
|
|
77
|
+
followsYou: boolean;
|
|
78
|
+
}
|
|
79
|
+
export declare const userRelationshipSchema: z.ZodType<UserRelationship>;
|
|
80
|
+
/**
|
|
81
|
+
* Portable per-account theme preference, applied across every Oxy app.
|
|
82
|
+
*
|
|
83
|
+
* Persisted on the Oxy user document and projected onto the self/session
|
|
84
|
+
* payload the SDK already loads during cold boot, so Bloom can theme on first
|
|
85
|
+
* paint with ZERO extra network call. `colorPreset` is a Bloom preset KEY
|
|
86
|
+
* (e.g. `"blue"`) — never raw colors.
|
|
87
|
+
*/
|
|
88
|
+
export interface ThemePreference {
|
|
89
|
+
mode: 'light' | 'dark' | 'system';
|
|
90
|
+
colorPreset: string;
|
|
91
|
+
}
|
|
92
|
+
export declare const themePreferenceSchema: z.ZodType<ThemePreference>;
|
|
64
93
|
/**
|
|
65
94
|
* The canonical user object emitted by `formatUserResponse`.
|
|
66
95
|
*
|
|
@@ -118,6 +147,19 @@ export declare const userResponseSchema: z.ZodObject<{
|
|
|
118
147
|
* Absent on personal, project, and bot accounts.
|
|
119
148
|
*/
|
|
120
149
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
150
|
+
/**
|
|
151
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
152
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
153
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
154
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
155
|
+
*/
|
|
156
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
157
|
+
/**
|
|
158
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
159
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
160
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
161
|
+
*/
|
|
162
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
121
163
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
122
164
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
123
165
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -158,6 +200,19 @@ export declare const userResponseSchema: z.ZodObject<{
|
|
|
158
200
|
* Absent on personal, project, and bot accounts.
|
|
159
201
|
*/
|
|
160
202
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
203
|
+
/**
|
|
204
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
205
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
206
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
207
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
208
|
+
*/
|
|
209
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
210
|
+
/**
|
|
211
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
212
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
213
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
214
|
+
*/
|
|
215
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
161
216
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
162
217
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
163
218
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -198,6 +253,19 @@ export declare const userResponseSchema: z.ZodObject<{
|
|
|
198
253
|
* Absent on personal, project, and bot accounts.
|
|
199
254
|
*/
|
|
200
255
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
256
|
+
/**
|
|
257
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
258
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
259
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
260
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
261
|
+
*/
|
|
262
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
263
|
+
/**
|
|
264
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
265
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
266
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
267
|
+
*/
|
|
268
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
201
269
|
}, z.ZodTypeAny, "passthrough">>;
|
|
202
270
|
export type UserResponse = z.infer<typeof userResponseSchema>;
|
|
203
271
|
export declare const userProfileUpdateSchema: z.ZodObject<{
|
|
@@ -251,6 +319,11 @@ export declare const userProfileUpdateSchema: z.ZodObject<{
|
|
|
251
319
|
notificationPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
252
320
|
userPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
253
321
|
privacySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
322
|
+
/**
|
|
323
|
+
* Portable theme preference. Written through the same `PUT /users/me`
|
|
324
|
+
* settings-update path as `languages`/`userPreferences`.
|
|
325
|
+
*/
|
|
326
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
254
327
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
255
328
|
name: z.ZodOptional<z.ZodObject<{
|
|
256
329
|
first: z.ZodOptional<z.ZodString>;
|
|
@@ -302,6 +375,11 @@ export declare const userProfileUpdateSchema: z.ZodObject<{
|
|
|
302
375
|
notificationPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
303
376
|
userPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
304
377
|
privacySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
378
|
+
/**
|
|
379
|
+
* Portable theme preference. Written through the same `PUT /users/me`
|
|
380
|
+
* settings-update path as `languages`/`userPreferences`.
|
|
381
|
+
*/
|
|
382
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
305
383
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
306
384
|
name: z.ZodOptional<z.ZodObject<{
|
|
307
385
|
first: z.ZodOptional<z.ZodString>;
|
|
@@ -353,6 +431,11 @@ export declare const userProfileUpdateSchema: z.ZodObject<{
|
|
|
353
431
|
notificationPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
354
432
|
userPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
355
433
|
privacySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
434
|
+
/**
|
|
435
|
+
* Portable theme preference. Written through the same `PUT /users/me`
|
|
436
|
+
* settings-update path as `languages`/`userPreferences`.
|
|
437
|
+
*/
|
|
438
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
356
439
|
}, z.ZodTypeAny, "passthrough">>;
|
|
357
440
|
export type UserProfileUpdate = z.infer<typeof userProfileUpdateSchema>;
|
|
358
441
|
/**
|
|
@@ -407,6 +490,19 @@ export declare const currentUserResponseSchema: z.ZodObject<{
|
|
|
407
490
|
* Absent on personal, project, and bot accounts.
|
|
408
491
|
*/
|
|
409
492
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
493
|
+
/**
|
|
494
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
495
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
496
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
497
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
498
|
+
*/
|
|
499
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
500
|
+
/**
|
|
501
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
502
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
503
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
504
|
+
*/
|
|
505
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
410
506
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
411
507
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
412
508
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -447,6 +543,19 @@ export declare const currentUserResponseSchema: z.ZodObject<{
|
|
|
447
543
|
* Absent on personal, project, and bot accounts.
|
|
448
544
|
*/
|
|
449
545
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
546
|
+
/**
|
|
547
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
548
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
549
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
550
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
551
|
+
*/
|
|
552
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
553
|
+
/**
|
|
554
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
555
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
556
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
557
|
+
*/
|
|
558
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
450
559
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
451
560
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
452
561
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -487,6 +596,19 @@ export declare const currentUserResponseSchema: z.ZodObject<{
|
|
|
487
596
|
* Absent on personal, project, and bot accounts.
|
|
488
597
|
*/
|
|
489
598
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
599
|
+
/**
|
|
600
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
601
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
602
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
603
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
604
|
+
*/
|
|
605
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
606
|
+
/**
|
|
607
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
608
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
609
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
610
|
+
*/
|
|
611
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
490
612
|
}, z.ZodTypeAny, "passthrough">>;
|
|
491
613
|
}, "strip", z.ZodTypeAny, {
|
|
492
614
|
data: {
|
|
@@ -506,6 +628,8 @@ export declare const currentUserResponseSchema: z.ZodObject<{
|
|
|
506
628
|
birthday?: string | undefined;
|
|
507
629
|
color?: string | null | undefined;
|
|
508
630
|
languages?: string[] | undefined;
|
|
631
|
+
relationship?: UserRelationship | undefined;
|
|
632
|
+
themePreference?: ThemePreference | undefined;
|
|
509
633
|
} & {
|
|
510
634
|
[k: string]: unknown;
|
|
511
635
|
};
|
|
@@ -527,6 +651,8 @@ export declare const currentUserResponseSchema: z.ZodObject<{
|
|
|
527
651
|
birthday?: string | undefined;
|
|
528
652
|
color?: string | null | undefined;
|
|
529
653
|
languages?: string[] | undefined;
|
|
654
|
+
relationship?: UserRelationship | undefined;
|
|
655
|
+
themePreference?: ThemePreference | undefined;
|
|
530
656
|
} & {
|
|
531
657
|
[k: string]: unknown;
|
|
532
658
|
};
|
|
@@ -581,6 +707,19 @@ export declare const deviceLinkedSessionSchema: z.ZodObject<{
|
|
|
581
707
|
* Absent on personal, project, and bot accounts.
|
|
582
708
|
*/
|
|
583
709
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
710
|
+
/**
|
|
711
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
712
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
713
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
714
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
715
|
+
*/
|
|
716
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
717
|
+
/**
|
|
718
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
719
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
720
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
721
|
+
*/
|
|
722
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
584
723
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
585
724
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
586
725
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -621,6 +760,19 @@ export declare const deviceLinkedSessionSchema: z.ZodObject<{
|
|
|
621
760
|
* Absent on personal, project, and bot accounts.
|
|
622
761
|
*/
|
|
623
762
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
763
|
+
/**
|
|
764
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
765
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
766
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
767
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
768
|
+
*/
|
|
769
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
770
|
+
/**
|
|
771
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
772
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
773
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
774
|
+
*/
|
|
775
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
624
776
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
625
777
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
626
778
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -661,6 +813,19 @@ export declare const deviceLinkedSessionSchema: z.ZodObject<{
|
|
|
661
813
|
* Absent on personal, project, and bot accounts.
|
|
662
814
|
*/
|
|
663
815
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
816
|
+
/**
|
|
817
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
818
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
819
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
820
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
821
|
+
*/
|
|
822
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
823
|
+
/**
|
|
824
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
825
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
826
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
827
|
+
*/
|
|
828
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
664
829
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
665
830
|
}, "strip", z.ZodTypeAny, {
|
|
666
831
|
sessionId: string;
|
|
@@ -704,6 +869,19 @@ export declare const deviceLinkedSessionSchema: z.ZodObject<{
|
|
|
704
869
|
* Absent on personal, project, and bot accounts.
|
|
705
870
|
*/
|
|
706
871
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
872
|
+
/**
|
|
873
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
874
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
875
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
876
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
877
|
+
*/
|
|
878
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
879
|
+
/**
|
|
880
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
881
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
882
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
883
|
+
*/
|
|
884
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
707
885
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
708
886
|
isCurrent?: boolean | undefined;
|
|
709
887
|
}, {
|
|
@@ -748,6 +926,19 @@ export declare const deviceLinkedSessionSchema: z.ZodObject<{
|
|
|
748
926
|
* Absent on personal, project, and bot accounts.
|
|
749
927
|
*/
|
|
750
928
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
929
|
+
/**
|
|
930
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
931
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
932
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
933
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
934
|
+
*/
|
|
935
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
936
|
+
/**
|
|
937
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
938
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
939
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
940
|
+
*/
|
|
941
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
751
942
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
752
943
|
isCurrent?: boolean | undefined;
|
|
753
944
|
}>;
|
|
@@ -796,6 +987,19 @@ export declare const deviceLinkedSessionsResponseSchema: z.ZodArray<z.ZodObject<
|
|
|
796
987
|
* Absent on personal, project, and bot accounts.
|
|
797
988
|
*/
|
|
798
989
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
990
|
+
/**
|
|
991
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
992
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
993
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
994
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
995
|
+
*/
|
|
996
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
997
|
+
/**
|
|
998
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
999
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
1000
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
1001
|
+
*/
|
|
1002
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
799
1003
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
800
1004
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
801
1005
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -836,6 +1040,19 @@ export declare const deviceLinkedSessionsResponseSchema: z.ZodArray<z.ZodObject<
|
|
|
836
1040
|
* Absent on personal, project, and bot accounts.
|
|
837
1041
|
*/
|
|
838
1042
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
1043
|
+
/**
|
|
1044
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
1045
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
1046
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
1047
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
1048
|
+
*/
|
|
1049
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
1050
|
+
/**
|
|
1051
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
1052
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
1053
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
1054
|
+
*/
|
|
1055
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
839
1056
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
840
1057
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
841
1058
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -876,6 +1093,19 @@ export declare const deviceLinkedSessionsResponseSchema: z.ZodArray<z.ZodObject<
|
|
|
876
1093
|
* Absent on personal, project, and bot accounts.
|
|
877
1094
|
*/
|
|
878
1095
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
1096
|
+
/**
|
|
1097
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
1098
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
1099
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
1100
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
1101
|
+
*/
|
|
1102
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
1103
|
+
/**
|
|
1104
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
1105
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
1106
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
1107
|
+
*/
|
|
1108
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
879
1109
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
880
1110
|
}, "strip", z.ZodTypeAny, {
|
|
881
1111
|
sessionId: string;
|
|
@@ -919,6 +1149,19 @@ export declare const deviceLinkedSessionsResponseSchema: z.ZodArray<z.ZodObject<
|
|
|
919
1149
|
* Absent on personal, project, and bot accounts.
|
|
920
1150
|
*/
|
|
921
1151
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
1152
|
+
/**
|
|
1153
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
1154
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
1155
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
1156
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
1157
|
+
*/
|
|
1158
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
1159
|
+
/**
|
|
1160
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
1161
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
1162
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
1163
|
+
*/
|
|
1164
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
922
1165
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
923
1166
|
isCurrent?: boolean | undefined;
|
|
924
1167
|
}, {
|
|
@@ -963,6 +1206,19 @@ export declare const deviceLinkedSessionsResponseSchema: z.ZodArray<z.ZodObject<
|
|
|
963
1206
|
* Absent on personal, project, and bot accounts.
|
|
964
1207
|
*/
|
|
965
1208
|
organizationCategory: z.ZodOptional<z.ZodEnum<["agency", "cooperative", "landlord", "other"]>>;
|
|
1209
|
+
/**
|
|
1210
|
+
* The authenticated viewer's relationship to this profile. Present ONLY
|
|
1211
|
+
* on single-profile fetches (`GET /profiles/username/:username`,
|
|
1212
|
+
* `GET /users/:userId`) when the request is authenticated; OMITTED for
|
|
1213
|
+
* anonymous requests and for the bulk `POST /users/by-ids` fan-out.
|
|
1214
|
+
*/
|
|
1215
|
+
relationship: z.ZodOptional<z.ZodType<UserRelationship, z.ZodTypeDef, UserRelationship>>;
|
|
1216
|
+
/**
|
|
1217
|
+
* Portable theme preference. Rides the self/session payload (cold boot),
|
|
1218
|
+
* so it is present on the current-user DTO (`GET /users/me`,
|
|
1219
|
+
* `GET /session/user/:sessionId`) and absent until the user sets it.
|
|
1220
|
+
*/
|
|
1221
|
+
themePreference: z.ZodOptional<z.ZodType<ThemePreference, z.ZodTypeDef, ThemePreference>>;
|
|
966
1222
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
967
1223
|
isCurrent?: boolean | undefined;
|
|
968
1224
|
}>, "many">;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "OxyHQ API contracts — single source of truth for request/response Zod schemas and inferred types, shared by the backend and the client SDKs",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@biomejs/biome": "^1.9.4",
|
|
81
|
-
"@types/node": "^20.19.
|
|
81
|
+
"@types/node": "^20.19.43",
|
|
82
82
|
"release-it": "^19.0.6",
|
|
83
83
|
"typescript": "^5.9.2"
|
|
84
84
|
}
|