@oxyhq/contracts 0.9.0 → 0.10.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 +51 -8
- package/dist/cjs/index.js +3 -4
- package/dist/cjs/userResponse.js +1 -24
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/deviceBoot.js +50 -7
- package/dist/esm/index.js +2 -2
- package/dist/esm/userResponse.js +0 -23
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/deviceBoot.d.ts +71 -16
- package/dist/types/deviceSession.d.ts +24 -24
- package/dist/types/index.d.ts +4 -4
- package/dist/types/userResponse.d.ts +4 -359
- package/package.json +1 -1
|
@@ -189,7 +189,6 @@ export declare const userProfileUpdateSchema: z.ZodObject<{
|
|
|
189
189
|
phone: z.ZodOptional<z.ZodString>;
|
|
190
190
|
address: z.ZodOptional<z.ZodString>;
|
|
191
191
|
birthday: z.ZodOptional<z.ZodString>;
|
|
192
|
-
location: z.ZodOptional<z.ZodString>;
|
|
193
192
|
locations: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
194
193
|
links: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
195
194
|
linksMetadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -236,7 +235,6 @@ export declare const userProfileUpdateSchema: z.ZodObject<{
|
|
|
236
235
|
phone: z.ZodOptional<z.ZodString>;
|
|
237
236
|
address: z.ZodOptional<z.ZodString>;
|
|
238
237
|
birthday: z.ZodOptional<z.ZodString>;
|
|
239
|
-
location: z.ZodOptional<z.ZodString>;
|
|
240
238
|
locations: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
241
239
|
links: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
242
240
|
linksMetadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -283,7 +281,6 @@ export declare const userProfileUpdateSchema: z.ZodObject<{
|
|
|
283
281
|
phone: z.ZodOptional<z.ZodString>;
|
|
284
282
|
address: z.ZodOptional<z.ZodString>;
|
|
285
283
|
birthday: z.ZodOptional<z.ZodString>;
|
|
286
|
-
location: z.ZodOptional<z.ZodString>;
|
|
287
284
|
locations: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
288
285
|
links: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
289
286
|
linksMetadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -317,358 +314,6 @@ export type UserProfileUpdate = z.infer<typeof userProfileUpdateSchema>;
|
|
|
317
314
|
* the `formatUserResponse` `id` field or the raw-document `_id` field.
|
|
318
315
|
*/
|
|
319
316
|
export declare function resolveUserId(user: UserResponse): string | undefined;
|
|
320
|
-
/**
|
|
321
|
-
* One rotated account entry from `POST /auth/refresh-all`.
|
|
322
|
-
*
|
|
323
|
-
* `authuser` is the device-local slot index (`0..N-1`). `user` is the canonical
|
|
324
|
-
* {@link userResponseSchema} shape (the handler projects a whitelist and runs it
|
|
325
|
-
* through `formatUserResponse`).
|
|
326
|
-
*/
|
|
327
|
-
export declare const refreshAllAccountSchema: z.ZodObject<{
|
|
328
|
-
authuser: z.ZodNumber;
|
|
329
|
-
accessToken: z.ZodString;
|
|
330
|
-
expiresAt: z.ZodString;
|
|
331
|
-
sessionId: z.ZodString;
|
|
332
|
-
user: z.ZodObject<{
|
|
333
|
-
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
334
|
-
id: z.ZodOptional<z.ZodString>;
|
|
335
|
-
/** Raw-document id (e.g. `GET /users/me`). Present when `id` is not. */
|
|
336
|
-
_id: z.ZodOptional<z.ZodString>;
|
|
337
|
-
publicKey: z.ZodOptional<z.ZodString>;
|
|
338
|
-
username: z.ZodOptional<z.ZodString>;
|
|
339
|
-
email: z.ZodOptional<z.ZodString>;
|
|
340
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
341
|
-
address: z.ZodOptional<z.ZodString>;
|
|
342
|
-
birthday: z.ZodOptional<z.ZodString>;
|
|
343
|
-
/** Avatar file id (string) or null. */
|
|
344
|
-
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
345
|
-
/** Named Bloom color preset (e.g. `"blue"`) or null. */
|
|
346
|
-
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
347
|
-
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
348
|
-
verified: z.ZodOptional<z.ZodBoolean>;
|
|
349
|
-
language: z.ZodOptional<z.ZodString>;
|
|
350
|
-
/**
|
|
351
|
-
* The account's self-sovereign identifier
|
|
352
|
-
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
353
|
-
* virtual; present on formatted DTOs once the identity layer is live.
|
|
354
|
-
*/
|
|
355
|
-
did: z.ZodOptional<z.ZodString>;
|
|
356
|
-
/**
|
|
357
|
-
* Proven domain-ownership badges. Each is a {@link verifiedDomainSchema}
|
|
358
|
-
* entry; present only when the account has verified at least one domain.
|
|
359
|
-
*/
|
|
360
|
-
verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
|
|
361
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
362
|
-
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
363
|
-
id: z.ZodOptional<z.ZodString>;
|
|
364
|
-
/** Raw-document id (e.g. `GET /users/me`). Present when `id` is not. */
|
|
365
|
-
_id: z.ZodOptional<z.ZodString>;
|
|
366
|
-
publicKey: z.ZodOptional<z.ZodString>;
|
|
367
|
-
username: z.ZodOptional<z.ZodString>;
|
|
368
|
-
email: z.ZodOptional<z.ZodString>;
|
|
369
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
370
|
-
address: z.ZodOptional<z.ZodString>;
|
|
371
|
-
birthday: z.ZodOptional<z.ZodString>;
|
|
372
|
-
/** Avatar file id (string) or null. */
|
|
373
|
-
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
374
|
-
/** Named Bloom color preset (e.g. `"blue"`) or null. */
|
|
375
|
-
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
376
|
-
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
377
|
-
verified: z.ZodOptional<z.ZodBoolean>;
|
|
378
|
-
language: z.ZodOptional<z.ZodString>;
|
|
379
|
-
/**
|
|
380
|
-
* The account's self-sovereign identifier
|
|
381
|
-
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
382
|
-
* virtual; present on formatted DTOs once the identity layer is live.
|
|
383
|
-
*/
|
|
384
|
-
did: z.ZodOptional<z.ZodString>;
|
|
385
|
-
/**
|
|
386
|
-
* Proven domain-ownership badges. Each is a {@link verifiedDomainSchema}
|
|
387
|
-
* entry; present only when the account has verified at least one domain.
|
|
388
|
-
*/
|
|
389
|
-
verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
|
|
390
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
391
|
-
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
392
|
-
id: z.ZodOptional<z.ZodString>;
|
|
393
|
-
/** Raw-document id (e.g. `GET /users/me`). Present when `id` is not. */
|
|
394
|
-
_id: z.ZodOptional<z.ZodString>;
|
|
395
|
-
publicKey: z.ZodOptional<z.ZodString>;
|
|
396
|
-
username: z.ZodOptional<z.ZodString>;
|
|
397
|
-
email: z.ZodOptional<z.ZodString>;
|
|
398
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
399
|
-
address: z.ZodOptional<z.ZodString>;
|
|
400
|
-
birthday: z.ZodOptional<z.ZodString>;
|
|
401
|
-
/** Avatar file id (string) or null. */
|
|
402
|
-
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
403
|
-
/** Named Bloom color preset (e.g. `"blue"`) or null. */
|
|
404
|
-
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
405
|
-
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
406
|
-
verified: z.ZodOptional<z.ZodBoolean>;
|
|
407
|
-
language: z.ZodOptional<z.ZodString>;
|
|
408
|
-
/**
|
|
409
|
-
* The account's self-sovereign identifier
|
|
410
|
-
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
411
|
-
* virtual; present on formatted DTOs once the identity layer is live.
|
|
412
|
-
*/
|
|
413
|
-
did: z.ZodOptional<z.ZodString>;
|
|
414
|
-
/**
|
|
415
|
-
* Proven domain-ownership badges. Each is a {@link verifiedDomainSchema}
|
|
416
|
-
* entry; present only when the account has verified at least one domain.
|
|
417
|
-
*/
|
|
418
|
-
verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
|
|
419
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
420
|
-
}, "strip", z.ZodTypeAny, {
|
|
421
|
-
expiresAt: string;
|
|
422
|
-
authuser: number;
|
|
423
|
-
accessToken: string;
|
|
424
|
-
sessionId: string;
|
|
425
|
-
user: {
|
|
426
|
-
name: UserNameResponse;
|
|
427
|
-
id?: string | undefined;
|
|
428
|
-
publicKey?: string | undefined;
|
|
429
|
-
did?: string | undefined;
|
|
430
|
-
verifiedDomains?: import("./identity").VerifiedDomain[] | undefined;
|
|
431
|
-
verified?: boolean | undefined;
|
|
432
|
-
username?: string | undefined;
|
|
433
|
-
_id?: string | undefined;
|
|
434
|
-
email?: string | undefined;
|
|
435
|
-
phone?: string | undefined;
|
|
436
|
-
address?: string | undefined;
|
|
437
|
-
birthday?: string | undefined;
|
|
438
|
-
avatar?: string | null | undefined;
|
|
439
|
-
color?: string | null | undefined;
|
|
440
|
-
language?: string | undefined;
|
|
441
|
-
} & {
|
|
442
|
-
[k: string]: unknown;
|
|
443
|
-
};
|
|
444
|
-
}, {
|
|
445
|
-
expiresAt: string;
|
|
446
|
-
authuser: number;
|
|
447
|
-
accessToken: string;
|
|
448
|
-
sessionId: string;
|
|
449
|
-
user: {
|
|
450
|
-
name: UserNameResponse;
|
|
451
|
-
id?: string | undefined;
|
|
452
|
-
publicKey?: string | undefined;
|
|
453
|
-
did?: string | undefined;
|
|
454
|
-
verifiedDomains?: import("./identity").VerifiedDomain[] | undefined;
|
|
455
|
-
verified?: boolean | undefined;
|
|
456
|
-
username?: string | undefined;
|
|
457
|
-
_id?: string | undefined;
|
|
458
|
-
email?: string | undefined;
|
|
459
|
-
phone?: string | undefined;
|
|
460
|
-
address?: string | undefined;
|
|
461
|
-
birthday?: string | undefined;
|
|
462
|
-
avatar?: string | null | undefined;
|
|
463
|
-
color?: string | null | undefined;
|
|
464
|
-
language?: string | undefined;
|
|
465
|
-
} & {
|
|
466
|
-
[k: string]: unknown;
|
|
467
|
-
};
|
|
468
|
-
}>;
|
|
469
|
-
export type RefreshAllAccountResponse = z.infer<typeof refreshAllAccountSchema>;
|
|
470
|
-
/**
|
|
471
|
-
* Wire shape of `POST /auth/refresh-all`: every valid device-local account,
|
|
472
|
-
* sorted by `authuser` ascending. An empty `accounts` array means "no signed-in
|
|
473
|
-
* accounts on this device" — the IdP must show the sign-in form.
|
|
474
|
-
*/
|
|
475
|
-
export declare const refreshAllResponseSchema: z.ZodObject<{
|
|
476
|
-
accounts: z.ZodArray<z.ZodObject<{
|
|
477
|
-
authuser: z.ZodNumber;
|
|
478
|
-
accessToken: z.ZodString;
|
|
479
|
-
expiresAt: z.ZodString;
|
|
480
|
-
sessionId: z.ZodString;
|
|
481
|
-
user: z.ZodObject<{
|
|
482
|
-
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
483
|
-
id: z.ZodOptional<z.ZodString>;
|
|
484
|
-
/** Raw-document id (e.g. `GET /users/me`). Present when `id` is not. */
|
|
485
|
-
_id: z.ZodOptional<z.ZodString>;
|
|
486
|
-
publicKey: z.ZodOptional<z.ZodString>;
|
|
487
|
-
username: z.ZodOptional<z.ZodString>;
|
|
488
|
-
email: z.ZodOptional<z.ZodString>;
|
|
489
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
490
|
-
address: z.ZodOptional<z.ZodString>;
|
|
491
|
-
birthday: z.ZodOptional<z.ZodString>;
|
|
492
|
-
/** Avatar file id (string) or null. */
|
|
493
|
-
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
494
|
-
/** Named Bloom color preset (e.g. `"blue"`) or null. */
|
|
495
|
-
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
496
|
-
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
497
|
-
verified: z.ZodOptional<z.ZodBoolean>;
|
|
498
|
-
language: z.ZodOptional<z.ZodString>;
|
|
499
|
-
/**
|
|
500
|
-
* The account's self-sovereign identifier
|
|
501
|
-
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
502
|
-
* virtual; present on formatted DTOs once the identity layer is live.
|
|
503
|
-
*/
|
|
504
|
-
did: z.ZodOptional<z.ZodString>;
|
|
505
|
-
/**
|
|
506
|
-
* Proven domain-ownership badges. Each is a {@link verifiedDomainSchema}
|
|
507
|
-
* entry; present only when the account has verified at least one domain.
|
|
508
|
-
*/
|
|
509
|
-
verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
|
|
510
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
511
|
-
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
512
|
-
id: z.ZodOptional<z.ZodString>;
|
|
513
|
-
/** Raw-document id (e.g. `GET /users/me`). Present when `id` is not. */
|
|
514
|
-
_id: z.ZodOptional<z.ZodString>;
|
|
515
|
-
publicKey: z.ZodOptional<z.ZodString>;
|
|
516
|
-
username: z.ZodOptional<z.ZodString>;
|
|
517
|
-
email: z.ZodOptional<z.ZodString>;
|
|
518
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
519
|
-
address: z.ZodOptional<z.ZodString>;
|
|
520
|
-
birthday: z.ZodOptional<z.ZodString>;
|
|
521
|
-
/** Avatar file id (string) or null. */
|
|
522
|
-
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
523
|
-
/** Named Bloom color preset (e.g. `"blue"`) or null. */
|
|
524
|
-
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
525
|
-
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
526
|
-
verified: z.ZodOptional<z.ZodBoolean>;
|
|
527
|
-
language: z.ZodOptional<z.ZodString>;
|
|
528
|
-
/**
|
|
529
|
-
* The account's self-sovereign identifier
|
|
530
|
-
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
531
|
-
* virtual; present on formatted DTOs once the identity layer is live.
|
|
532
|
-
*/
|
|
533
|
-
did: z.ZodOptional<z.ZodString>;
|
|
534
|
-
/**
|
|
535
|
-
* Proven domain-ownership badges. Each is a {@link verifiedDomainSchema}
|
|
536
|
-
* entry; present only when the account has verified at least one domain.
|
|
537
|
-
*/
|
|
538
|
-
verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
|
|
539
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
540
|
-
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
541
|
-
id: z.ZodOptional<z.ZodString>;
|
|
542
|
-
/** Raw-document id (e.g. `GET /users/me`). Present when `id` is not. */
|
|
543
|
-
_id: z.ZodOptional<z.ZodString>;
|
|
544
|
-
publicKey: z.ZodOptional<z.ZodString>;
|
|
545
|
-
username: z.ZodOptional<z.ZodString>;
|
|
546
|
-
email: z.ZodOptional<z.ZodString>;
|
|
547
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
548
|
-
address: z.ZodOptional<z.ZodString>;
|
|
549
|
-
birthday: z.ZodOptional<z.ZodString>;
|
|
550
|
-
/** Avatar file id (string) or null. */
|
|
551
|
-
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
552
|
-
/** Named Bloom color preset (e.g. `"blue"`) or null. */
|
|
553
|
-
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
554
|
-
name: z.ZodType<UserNameResponse, z.ZodTypeDef, UserNameResponse>;
|
|
555
|
-
verified: z.ZodOptional<z.ZodBoolean>;
|
|
556
|
-
language: z.ZodOptional<z.ZodString>;
|
|
557
|
-
/**
|
|
558
|
-
* The account's self-sovereign identifier
|
|
559
|
-
* (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
|
|
560
|
-
* virtual; present on formatted DTOs once the identity layer is live.
|
|
561
|
-
*/
|
|
562
|
-
did: z.ZodOptional<z.ZodString>;
|
|
563
|
-
/**
|
|
564
|
-
* Proven domain-ownership badges. Each is a {@link verifiedDomainSchema}
|
|
565
|
-
* entry; present only when the account has verified at least one domain.
|
|
566
|
-
*/
|
|
567
|
-
verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
|
|
568
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
569
|
-
}, "strip", z.ZodTypeAny, {
|
|
570
|
-
expiresAt: string;
|
|
571
|
-
authuser: number;
|
|
572
|
-
accessToken: string;
|
|
573
|
-
sessionId: string;
|
|
574
|
-
user: {
|
|
575
|
-
name: UserNameResponse;
|
|
576
|
-
id?: string | undefined;
|
|
577
|
-
publicKey?: string | undefined;
|
|
578
|
-
did?: string | undefined;
|
|
579
|
-
verifiedDomains?: import("./identity").VerifiedDomain[] | undefined;
|
|
580
|
-
verified?: boolean | undefined;
|
|
581
|
-
username?: string | undefined;
|
|
582
|
-
_id?: string | undefined;
|
|
583
|
-
email?: string | undefined;
|
|
584
|
-
phone?: string | undefined;
|
|
585
|
-
address?: string | undefined;
|
|
586
|
-
birthday?: string | undefined;
|
|
587
|
-
avatar?: string | null | undefined;
|
|
588
|
-
color?: string | null | undefined;
|
|
589
|
-
language?: string | undefined;
|
|
590
|
-
} & {
|
|
591
|
-
[k: string]: unknown;
|
|
592
|
-
};
|
|
593
|
-
}, {
|
|
594
|
-
expiresAt: string;
|
|
595
|
-
authuser: number;
|
|
596
|
-
accessToken: string;
|
|
597
|
-
sessionId: string;
|
|
598
|
-
user: {
|
|
599
|
-
name: UserNameResponse;
|
|
600
|
-
id?: string | undefined;
|
|
601
|
-
publicKey?: string | undefined;
|
|
602
|
-
did?: string | undefined;
|
|
603
|
-
verifiedDomains?: import("./identity").VerifiedDomain[] | undefined;
|
|
604
|
-
verified?: boolean | undefined;
|
|
605
|
-
username?: string | undefined;
|
|
606
|
-
_id?: string | undefined;
|
|
607
|
-
email?: string | undefined;
|
|
608
|
-
phone?: string | undefined;
|
|
609
|
-
address?: string | undefined;
|
|
610
|
-
birthday?: string | undefined;
|
|
611
|
-
avatar?: string | null | undefined;
|
|
612
|
-
color?: string | null | undefined;
|
|
613
|
-
language?: string | undefined;
|
|
614
|
-
} & {
|
|
615
|
-
[k: string]: unknown;
|
|
616
|
-
};
|
|
617
|
-
}>, "many">;
|
|
618
|
-
}, "strip", z.ZodTypeAny, {
|
|
619
|
-
accounts: {
|
|
620
|
-
expiresAt: string;
|
|
621
|
-
authuser: number;
|
|
622
|
-
accessToken: string;
|
|
623
|
-
sessionId: string;
|
|
624
|
-
user: {
|
|
625
|
-
name: UserNameResponse;
|
|
626
|
-
id?: string | undefined;
|
|
627
|
-
publicKey?: string | undefined;
|
|
628
|
-
did?: string | undefined;
|
|
629
|
-
verifiedDomains?: import("./identity").VerifiedDomain[] | undefined;
|
|
630
|
-
verified?: boolean | undefined;
|
|
631
|
-
username?: string | undefined;
|
|
632
|
-
_id?: string | undefined;
|
|
633
|
-
email?: string | undefined;
|
|
634
|
-
phone?: string | undefined;
|
|
635
|
-
address?: string | undefined;
|
|
636
|
-
birthday?: string | undefined;
|
|
637
|
-
avatar?: string | null | undefined;
|
|
638
|
-
color?: string | null | undefined;
|
|
639
|
-
language?: string | undefined;
|
|
640
|
-
} & {
|
|
641
|
-
[k: string]: unknown;
|
|
642
|
-
};
|
|
643
|
-
}[];
|
|
644
|
-
}, {
|
|
645
|
-
accounts: {
|
|
646
|
-
expiresAt: string;
|
|
647
|
-
authuser: number;
|
|
648
|
-
accessToken: string;
|
|
649
|
-
sessionId: string;
|
|
650
|
-
user: {
|
|
651
|
-
name: UserNameResponse;
|
|
652
|
-
id?: string | undefined;
|
|
653
|
-
publicKey?: string | undefined;
|
|
654
|
-
did?: string | undefined;
|
|
655
|
-
verifiedDomains?: import("./identity").VerifiedDomain[] | undefined;
|
|
656
|
-
verified?: boolean | undefined;
|
|
657
|
-
username?: string | undefined;
|
|
658
|
-
_id?: string | undefined;
|
|
659
|
-
email?: string | undefined;
|
|
660
|
-
phone?: string | undefined;
|
|
661
|
-
address?: string | undefined;
|
|
662
|
-
birthday?: string | undefined;
|
|
663
|
-
avatar?: string | null | undefined;
|
|
664
|
-
color?: string | null | undefined;
|
|
665
|
-
language?: string | undefined;
|
|
666
|
-
} & {
|
|
667
|
-
[k: string]: unknown;
|
|
668
|
-
};
|
|
669
|
-
}[];
|
|
670
|
-
}>;
|
|
671
|
-
export type RefreshAllResponseContract = z.infer<typeof refreshAllResponseSchema>;
|
|
672
317
|
/**
|
|
673
318
|
* Wire shape of `GET /users/me` — the API success envelope (`{ data: <user> }`)
|
|
674
319
|
* wrapping the current-user DTO. Some older producers use `_id` instead of
|
|
@@ -905,6 +550,7 @@ export declare const deviceSessionAccountSchema: z.ZodObject<{
|
|
|
905
550
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
906
551
|
}, "strip", z.ZodTypeAny, {
|
|
907
552
|
sessionId: string;
|
|
553
|
+
isCurrent?: boolean | undefined;
|
|
908
554
|
user?: z.objectOutputType<{
|
|
909
555
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
910
556
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -935,9 +581,9 @@ export declare const deviceSessionAccountSchema: z.ZodObject<{
|
|
|
935
581
|
*/
|
|
936
582
|
verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
|
|
937
583
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
938
|
-
isCurrent?: boolean | undefined;
|
|
939
584
|
}, {
|
|
940
585
|
sessionId: string;
|
|
586
|
+
isCurrent?: boolean | undefined;
|
|
941
587
|
user?: z.objectInputType<{
|
|
942
588
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
943
589
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -968,7 +614,6 @@ export declare const deviceSessionAccountSchema: z.ZodObject<{
|
|
|
968
614
|
*/
|
|
969
615
|
verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
|
|
970
616
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
971
|
-
isCurrent?: boolean | undefined;
|
|
972
617
|
}>;
|
|
973
618
|
export type DeviceSessionAccountResponse = z.infer<typeof deviceSessionAccountSchema>;
|
|
974
619
|
/** Wire shape of `GET /session/device/sessions/:sessionId` (an array). */
|
|
@@ -1065,6 +710,7 @@ export declare const deviceSessionsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
1065
710
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
1066
711
|
}, "strip", z.ZodTypeAny, {
|
|
1067
712
|
sessionId: string;
|
|
713
|
+
isCurrent?: boolean | undefined;
|
|
1068
714
|
user?: z.objectOutputType<{
|
|
1069
715
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
1070
716
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1095,9 +741,9 @@ export declare const deviceSessionsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
1095
741
|
*/
|
|
1096
742
|
verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
|
|
1097
743
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
1098
|
-
isCurrent?: boolean | undefined;
|
|
1099
744
|
}, {
|
|
1100
745
|
sessionId: string;
|
|
746
|
+
isCurrent?: boolean | undefined;
|
|
1101
747
|
user?: z.objectInputType<{
|
|
1102
748
|
/** MongoDB ObjectId as a string. Present on `formatUserResponse` output. */
|
|
1103
749
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1128,7 +774,6 @@ export declare const deviceSessionsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
1128
774
|
*/
|
|
1129
775
|
verifiedDomains: z.ZodOptional<z.ZodArray<z.ZodType<import("./identity").VerifiedDomain, z.ZodTypeDef, import("./identity").VerifiedDomain>, "many">>;
|
|
1130
776
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
1131
|
-
isCurrent?: boolean | undefined;
|
|
1132
777
|
}>, "many">;
|
|
1133
778
|
export type DeviceSessionsResponseContract = z.infer<typeof deviceSessionsResponseSchema>;
|
|
1134
779
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.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",
|