@oxyhq/contracts 0.13.2 → 0.14.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/userResponse.js +14 -3
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/userResponse.js +14 -3
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/userResponse.d.ts +133 -22
- package/package.json +1 -1
|
@@ -74,7 +74,7 @@ export declare const userNameSchema: z.ZodType<UserNameResponse>;
|
|
|
74
74
|
*
|
|
75
75
|
* `.passthrough()` keeps the large tail of profile fields
|
|
76
76
|
* (`privacySettings`, `locations`, `links`, `linksMetadata`, `bio`,
|
|
77
|
-
* `description`, `
|
|
77
|
+
* `description`, `languages`, `verified`, timestamps, …) available to callers
|
|
78
78
|
* that need them without enumerating every nested shape here — the load-bearing
|
|
79
79
|
* identity/display fields are the ones we pin precisely.
|
|
80
80
|
*/
|
|
@@ -95,7 +95,13 @@ export declare const userResponseSchema: z.ZodObject<{
|
|
|
95
95
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
96
96
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
97
97
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
-
|
|
98
|
+
/**
|
|
99
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
100
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
101
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
102
|
+
* `language` field.
|
|
103
|
+
*/
|
|
104
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
99
105
|
/**
|
|
100
106
|
* The account's self-sovereign identifier
|
|
101
107
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -129,7 +135,13 @@ export declare const userResponseSchema: z.ZodObject<{
|
|
|
129
135
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
130
136
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
131
137
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
-
|
|
138
|
+
/**
|
|
139
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
140
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
141
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
142
|
+
* `language` field.
|
|
143
|
+
*/
|
|
144
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
133
145
|
/**
|
|
134
146
|
* The account's self-sovereign identifier
|
|
135
147
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -163,7 +175,13 @@ export declare const userResponseSchema: z.ZodObject<{
|
|
|
163
175
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
176
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
165
177
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
-
|
|
178
|
+
/**
|
|
179
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
180
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
181
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
182
|
+
* `language` field.
|
|
183
|
+
*/
|
|
184
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
167
185
|
/**
|
|
168
186
|
* The account's self-sovereign identifier
|
|
169
187
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -223,7 +241,12 @@ export declare const userProfileUpdateSchema: z.ZodObject<{
|
|
|
223
241
|
title?: string | undefined;
|
|
224
242
|
image?: string | undefined;
|
|
225
243
|
}>, "many">>;
|
|
226
|
-
|
|
244
|
+
/**
|
|
245
|
+
* Ordered account locales (`language-REGION`), primary first. Replaces
|
|
246
|
+
* the eliminated singular `language`; `languages[0]` is the primary UI
|
|
247
|
+
* locale.
|
|
248
|
+
*/
|
|
249
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
227
250
|
accountExpiresAfterInactivityDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
228
251
|
notificationPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
229
252
|
userPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -269,7 +292,12 @@ export declare const userProfileUpdateSchema: z.ZodObject<{
|
|
|
269
292
|
title?: string | undefined;
|
|
270
293
|
image?: string | undefined;
|
|
271
294
|
}>, "many">>;
|
|
272
|
-
|
|
295
|
+
/**
|
|
296
|
+
* Ordered account locales (`language-REGION`), primary first. Replaces
|
|
297
|
+
* the eliminated singular `language`; `languages[0]` is the primary UI
|
|
298
|
+
* locale.
|
|
299
|
+
*/
|
|
300
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
273
301
|
accountExpiresAfterInactivityDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
274
302
|
notificationPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
275
303
|
userPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -315,7 +343,12 @@ export declare const userProfileUpdateSchema: z.ZodObject<{
|
|
|
315
343
|
title?: string | undefined;
|
|
316
344
|
image?: string | undefined;
|
|
317
345
|
}>, "many">>;
|
|
318
|
-
|
|
346
|
+
/**
|
|
347
|
+
* Ordered account locales (`language-REGION`), primary first. Replaces
|
|
348
|
+
* the eliminated singular `language`; `languages[0]` is the primary UI
|
|
349
|
+
* locale.
|
|
350
|
+
*/
|
|
351
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
319
352
|
accountExpiresAfterInactivityDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
320
353
|
notificationPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
321
354
|
userPreferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -351,7 +384,13 @@ export declare const currentUserResponseSchema: z.ZodObject<{
|
|
|
351
384
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
352
385
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
353
386
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
354
|
-
|
|
387
|
+
/**
|
|
388
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
389
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
390
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
391
|
+
* `language` field.
|
|
392
|
+
*/
|
|
393
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
355
394
|
/**
|
|
356
395
|
* The account's self-sovereign identifier
|
|
357
396
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -385,7 +424,13 @@ export declare const currentUserResponseSchema: z.ZodObject<{
|
|
|
385
424
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
386
425
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
387
426
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
388
|
-
|
|
427
|
+
/**
|
|
428
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
429
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
430
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
431
|
+
* `language` field.
|
|
432
|
+
*/
|
|
433
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
389
434
|
/**
|
|
390
435
|
* The account's self-sovereign identifier
|
|
391
436
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -419,7 +464,13 @@ export declare const currentUserResponseSchema: z.ZodObject<{
|
|
|
419
464
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
420
465
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
421
466
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
422
|
-
|
|
467
|
+
/**
|
|
468
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
469
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
470
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
471
|
+
* `language` field.
|
|
472
|
+
*/
|
|
473
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
423
474
|
/**
|
|
424
475
|
* The account's self-sovereign identifier
|
|
425
476
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -454,7 +505,7 @@ export declare const currentUserResponseSchema: z.ZodObject<{
|
|
|
454
505
|
address?: string | undefined;
|
|
455
506
|
birthday?: string | undefined;
|
|
456
507
|
color?: string | null | undefined;
|
|
457
|
-
|
|
508
|
+
languages?: string[] | undefined;
|
|
458
509
|
} & {
|
|
459
510
|
[k: string]: unknown;
|
|
460
511
|
};
|
|
@@ -475,7 +526,7 @@ export declare const currentUserResponseSchema: z.ZodObject<{
|
|
|
475
526
|
address?: string | undefined;
|
|
476
527
|
birthday?: string | undefined;
|
|
477
528
|
color?: string | null | undefined;
|
|
478
|
-
|
|
529
|
+
languages?: string[] | undefined;
|
|
479
530
|
} & {
|
|
480
531
|
[k: string]: unknown;
|
|
481
532
|
};
|
|
@@ -507,7 +558,13 @@ export declare const deviceLinkedSessionSchema: z.ZodObject<{
|
|
|
507
558
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
508
559
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
509
560
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
510
|
-
|
|
561
|
+
/**
|
|
562
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
563
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
564
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
565
|
+
* `language` field.
|
|
566
|
+
*/
|
|
567
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
511
568
|
/**
|
|
512
569
|
* The account's self-sovereign identifier
|
|
513
570
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -541,7 +598,13 @@ export declare const deviceLinkedSessionSchema: z.ZodObject<{
|
|
|
541
598
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
542
599
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
543
600
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
544
|
-
|
|
601
|
+
/**
|
|
602
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
603
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
604
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
605
|
+
* `language` field.
|
|
606
|
+
*/
|
|
607
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
545
608
|
/**
|
|
546
609
|
* The account's self-sovereign identifier
|
|
547
610
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -575,7 +638,13 @@ export declare const deviceLinkedSessionSchema: z.ZodObject<{
|
|
|
575
638
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
576
639
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
577
640
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
578
|
-
|
|
641
|
+
/**
|
|
642
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
643
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
644
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
645
|
+
* `language` field.
|
|
646
|
+
*/
|
|
647
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
579
648
|
/**
|
|
580
649
|
* The account's self-sovereign identifier
|
|
581
650
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -612,7 +681,13 @@ export declare const deviceLinkedSessionSchema: z.ZodObject<{
|
|
|
612
681
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
613
682
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
614
683
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
615
|
-
|
|
684
|
+
/**
|
|
685
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
686
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
687
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
688
|
+
* `language` field.
|
|
689
|
+
*/
|
|
690
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
616
691
|
/**
|
|
617
692
|
* The account's self-sovereign identifier
|
|
618
693
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -650,7 +725,13 @@ export declare const deviceLinkedSessionSchema: z.ZodObject<{
|
|
|
650
725
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
651
726
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
652
727
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
653
|
-
|
|
728
|
+
/**
|
|
729
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
730
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
731
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
732
|
+
* `language` field.
|
|
733
|
+
*/
|
|
734
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
654
735
|
/**
|
|
655
736
|
* The account's self-sovereign identifier
|
|
656
737
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -692,7 +773,13 @@ export declare const deviceLinkedSessionsResponseSchema: z.ZodArray<z.ZodObject<
|
|
|
692
773
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
693
774
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
694
775
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
695
|
-
|
|
776
|
+
/**
|
|
777
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
778
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
779
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
780
|
+
* `language` field.
|
|
781
|
+
*/
|
|
782
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
696
783
|
/**
|
|
697
784
|
* The account's self-sovereign identifier
|
|
698
785
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -726,7 +813,13 @@ export declare const deviceLinkedSessionsResponseSchema: z.ZodArray<z.ZodObject<
|
|
|
726
813
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
727
814
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
728
815
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
729
|
-
|
|
816
|
+
/**
|
|
817
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
818
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
819
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
820
|
+
* `language` field.
|
|
821
|
+
*/
|
|
822
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
730
823
|
/**
|
|
731
824
|
* The account's self-sovereign identifier
|
|
732
825
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -760,7 +853,13 @@ export declare const deviceLinkedSessionsResponseSchema: z.ZodArray<z.ZodObject<
|
|
|
760
853
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
761
854
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
762
855
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
763
|
-
|
|
856
|
+
/**
|
|
857
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
858
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
859
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
860
|
+
* `language` field.
|
|
861
|
+
*/
|
|
862
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
764
863
|
/**
|
|
765
864
|
* The account's self-sovereign identifier
|
|
766
865
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -797,7 +896,13 @@ export declare const deviceLinkedSessionsResponseSchema: z.ZodArray<z.ZodObject<
|
|
|
797
896
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
798
897
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
799
898
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
800
|
-
|
|
899
|
+
/**
|
|
900
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
901
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
902
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
903
|
+
* `language` field.
|
|
904
|
+
*/
|
|
905
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
801
906
|
/**
|
|
802
907
|
* The account's self-sovereign identifier
|
|
803
908
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
@@ -835,7 +940,13 @@ export declare const deviceLinkedSessionsResponseSchema: z.ZodArray<z.ZodObject<
|
|
|
835
940
|
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
836
941
|
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
837
942
|
verified: z.ZodOptional<z.ZodBoolean>;
|
|
838
|
-
|
|
943
|
+
/**
|
|
944
|
+
* The account's languages as full BCP-47 locales (`language-REGION`,
|
|
945
|
+
* e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
|
|
946
|
+
* first. `languages[0]` is the primary locale — there is no singular
|
|
947
|
+
* `language` field.
|
|
948
|
+
*/
|
|
949
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
839
950
|
/**
|
|
840
951
|
* The account's self-sovereign identifier
|
|
841
952
|
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.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",
|