@witnium/witniumchain 0.27.0 → 0.28.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/index.d.mts CHANGED
@@ -523,6 +523,268 @@ interface paths$1 {
523
523
  patch?: never;
524
524
  trace?: never;
525
525
  };
526
+ "/v1/auth/identify": {
527
+ parameters: {
528
+ query?: never;
529
+ header?: never;
530
+ path?: never;
531
+ cookie?: never;
532
+ };
533
+ get?: never;
534
+ put?: never;
535
+ /**
536
+ * Email-first sign-in: which methods to offer
537
+ * @description The answer is the same for every address, known, unknown or unverified, and takes the same time: nothing about the address is looked up. Whether an account exists is decided only once a credential is presented, or by the email that signup sends.
538
+ */
539
+ post: {
540
+ parameters: {
541
+ query?: never;
542
+ header?: never;
543
+ path?: never;
544
+ cookie?: never;
545
+ };
546
+ requestBody?: {
547
+ content: {
548
+ "application/json": {
549
+ /**
550
+ * Format: email
551
+ * @description RFC 5321 email address
552
+ * @example user@example.com
553
+ */
554
+ email: string;
555
+ /** @description OAuth interaction to return to (`/interaction/:uid`) once the account is set up. */
556
+ interaction?: string;
557
+ };
558
+ };
559
+ };
560
+ responses: {
561
+ /** @description Created */
562
+ 201: {
563
+ headers: {
564
+ [name: string]: unknown;
565
+ };
566
+ content: {
567
+ "application/json": {
568
+ /**
569
+ * @description What the app shows next. Today always `signin`: whether an account exists is never revealed here; signup is offered beside sign-in, and the signup email tells an existing account holder.
570
+ * @enum {string}
571
+ */
572
+ next: "signin" | "signup";
573
+ /** @description Methods to offer. The same for every address (no account enumeration). Home-realm discovery may later add `{type: "federated", providerId}` entries. */
574
+ methods: ("passkey" | "password_totp")[];
575
+ };
576
+ };
577
+ };
578
+ /** @description Bad Request — validation failed */
579
+ 400: {
580
+ headers: {
581
+ [name: string]: unknown;
582
+ };
583
+ content: {
584
+ "application/json": {
585
+ /**
586
+ * @description HTTP status code
587
+ * @example 400
588
+ */
589
+ statusCode?: number;
590
+ /**
591
+ * @description Short error label
592
+ * @example Bad Request
593
+ */
594
+ error?: string;
595
+ /**
596
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
597
+ * @example Validation failed
598
+ */
599
+ message: string | string[];
600
+ };
601
+ };
602
+ };
603
+ /** @description Forbidden — insufficient permissions or scope */
604
+ 403: {
605
+ headers: {
606
+ [name: string]: unknown;
607
+ };
608
+ content: {
609
+ "application/json": {
610
+ /**
611
+ * @description HTTP status code
612
+ * @example 400
613
+ */
614
+ statusCode?: number;
615
+ /**
616
+ * @description Short error label
617
+ * @example Bad Request
618
+ */
619
+ error?: string;
620
+ /**
621
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
622
+ * @example Validation failed
623
+ */
624
+ message: string | string[];
625
+ };
626
+ };
627
+ };
628
+ /** @description Too Many Requests */
629
+ 429: {
630
+ headers: {
631
+ [name: string]: unknown;
632
+ };
633
+ content: {
634
+ "application/json": {
635
+ /**
636
+ * @description HTTP status code
637
+ * @example 400
638
+ */
639
+ statusCode?: number;
640
+ /**
641
+ * @description Short error label
642
+ * @example Bad Request
643
+ */
644
+ error?: string;
645
+ /**
646
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
647
+ * @example Validation failed
648
+ */
649
+ message: string | string[];
650
+ };
651
+ };
652
+ };
653
+ };
654
+ };
655
+ delete?: never;
656
+ options?: never;
657
+ head?: never;
658
+ patch?: never;
659
+ trace?: never;
660
+ };
661
+ "/v1/auth/reenroll": {
662
+ parameters: {
663
+ query?: never;
664
+ header?: never;
665
+ path?: never;
666
+ cookie?: never;
667
+ };
668
+ get?: never;
669
+ put?: never;
670
+ /**
671
+ * Open a re-enrollment link
672
+ * @description Opens the link a sysadmin had emailed (plan §9.9; any browser: the link proves the mailbox). Consumes it and sets the `wac_enroll` cookie (30 minutes): add a passkey, or a password + authenticator app, with the enrollment endpoints, without the recovery wait. The account's other methods stay. One use, 72 hours; a newer link ends it (400). An account with an authenticator app proves a current code first.
673
+ */
674
+ post: {
675
+ parameters: {
676
+ query?: never;
677
+ header?: never;
678
+ path?: never;
679
+ cookie?: never;
680
+ };
681
+ requestBody?: {
682
+ content: {
683
+ "application/json": {
684
+ /** @description Token from the re-enrollment email. */
685
+ token: string;
686
+ };
687
+ };
688
+ };
689
+ responses: {
690
+ /** @description Created */
691
+ 201: {
692
+ headers: {
693
+ [name: string]: unknown;
694
+ };
695
+ content: {
696
+ "application/json": {
697
+ /**
698
+ * @description The `wac_enroll` cookie is set: continue with the enrollment endpoints.
699
+ * @enum {string}
700
+ */
701
+ next: "secure-account";
702
+ };
703
+ };
704
+ };
705
+ /** @description Bad Request — validation failed */
706
+ 400: {
707
+ headers: {
708
+ [name: string]: unknown;
709
+ };
710
+ content: {
711
+ "application/json": {
712
+ /**
713
+ * @description HTTP status code
714
+ * @example 400
715
+ */
716
+ statusCode?: number;
717
+ /**
718
+ * @description Short error label
719
+ * @example Bad Request
720
+ */
721
+ error?: string;
722
+ /**
723
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
724
+ * @example Validation failed
725
+ */
726
+ message: string | string[];
727
+ };
728
+ };
729
+ };
730
+ /** @description Forbidden — insufficient permissions or scope */
731
+ 403: {
732
+ headers: {
733
+ [name: string]: unknown;
734
+ };
735
+ content: {
736
+ "application/json": {
737
+ /**
738
+ * @description HTTP status code
739
+ * @example 400
740
+ */
741
+ statusCode?: number;
742
+ /**
743
+ * @description Short error label
744
+ * @example Bad Request
745
+ */
746
+ error?: string;
747
+ /**
748
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
749
+ * @example Validation failed
750
+ */
751
+ message: string | string[];
752
+ };
753
+ };
754
+ };
755
+ /** @description Too Many Requests */
756
+ 429: {
757
+ headers: {
758
+ [name: string]: unknown;
759
+ };
760
+ content: {
761
+ "application/json": {
762
+ /**
763
+ * @description HTTP status code
764
+ * @example 400
765
+ */
766
+ statusCode?: number;
767
+ /**
768
+ * @description Short error label
769
+ * @example Bad Request
770
+ */
771
+ error?: string;
772
+ /**
773
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
774
+ * @example Validation failed
775
+ */
776
+ message: string | string[];
777
+ };
778
+ };
779
+ };
780
+ };
781
+ };
782
+ delete?: never;
783
+ options?: never;
784
+ head?: never;
785
+ patch?: never;
786
+ trace?: never;
787
+ };
526
788
  "/v1/auth/login": {
527
789
  parameters: {
528
790
  query?: never;
@@ -8051,6 +8313,11 @@ interface paths$1 {
8051
8313
  };
8052
8314
  content: {
8053
8315
  "application/json": {
8316
+ /**
8317
+ * @description The caller's membership role in the organization (the token's or the session's org).
8318
+ * @enum {string}
8319
+ */
8320
+ role: "org-admin" | "member";
8054
8321
  /** AccountUser */
8055
8322
  user: {
8056
8323
  /**
@@ -9150,7 +9417,7 @@ interface paths$1 {
9150
9417
  "application/json": {
9151
9418
  email: string;
9152
9419
  /** @enum {string} */
9153
- purpose: "signup" | "recovery" | "recovery_code";
9420
+ purpose: "signup" | "recovery" | "recovery_code" | "reenroll";
9154
9421
  /** @description OAuth interaction to return to (`/interaction/:uid`) once the account is set up. */
9155
9422
  interaction: string | null;
9156
9423
  /** @description An account from before D16 with an authenticator app: prove a current code first. */
@@ -11595,16 +11862,856 @@ interface paths$1 {
11595
11862
  patch?: never;
11596
11863
  trace?: never;
11597
11864
  };
11598
- "/health/live": {
11865
+ "/v1/auth/reauth/passkey/options": {
11599
11866
  parameters: {
11600
11867
  query?: never;
11601
11868
  header?: never;
11602
11869
  path?: never;
11603
11870
  cookie?: never;
11604
11871
  };
11872
+ get?: never;
11873
+ put?: never;
11874
+ /**
11875
+ * Re-authentication: a passkey challenge for the signed-in user
11876
+ * @description For an authorization that asks for a fresh authentication (`reauth: true` on the interaction details). Lists only the signed-in user's passkeys and binds the challenge to that user (`wac_webauthn` cookie).
11877
+ */
11878
+ post: {
11879
+ parameters: {
11880
+ query?: never;
11881
+ header?: never;
11882
+ path?: never;
11883
+ cookie?: never;
11884
+ };
11885
+ requestBody?: never;
11886
+ responses: {
11887
+ /** @description Success */
11888
+ 200: {
11889
+ headers: {
11890
+ [name: string]: unknown;
11891
+ };
11892
+ content: {
11893
+ "application/json": Record<string, never>;
11894
+ };
11895
+ };
11896
+ /** @description Bad Request — validation failed */
11897
+ 400: {
11898
+ headers: {
11899
+ [name: string]: unknown;
11900
+ };
11901
+ content: {
11902
+ "application/json": {
11903
+ /**
11904
+ * @description HTTP status code
11905
+ * @example 400
11906
+ */
11907
+ statusCode?: number;
11908
+ /**
11909
+ * @description Short error label
11910
+ * @example Bad Request
11911
+ */
11912
+ error?: string;
11913
+ /**
11914
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
11915
+ * @example Validation failed
11916
+ */
11917
+ message: string | string[];
11918
+ };
11919
+ };
11920
+ };
11921
+ /** @description Unauthorized — authentication required or invalid */
11922
+ 401: {
11923
+ headers: {
11924
+ [name: string]: unknown;
11925
+ };
11926
+ content: {
11927
+ "application/json": {
11928
+ /**
11929
+ * @description HTTP status code
11930
+ * @example 400
11931
+ */
11932
+ statusCode?: number;
11933
+ /**
11934
+ * @description Short error label
11935
+ * @example Bad Request
11936
+ */
11937
+ error?: string;
11938
+ /**
11939
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
11940
+ * @example Validation failed
11941
+ */
11942
+ message: string | string[];
11943
+ };
11944
+ };
11945
+ };
11946
+ /** @description Forbidden — insufficient permissions or scope */
11947
+ 403: {
11948
+ headers: {
11949
+ [name: string]: unknown;
11950
+ };
11951
+ content: {
11952
+ "application/json": {
11953
+ /**
11954
+ * @description HTTP status code
11955
+ * @example 400
11956
+ */
11957
+ statusCode?: number;
11958
+ /**
11959
+ * @description Short error label
11960
+ * @example Bad Request
11961
+ */
11962
+ error?: string;
11963
+ /**
11964
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
11965
+ * @example Validation failed
11966
+ */
11967
+ message: string | string[];
11968
+ };
11969
+ };
11970
+ };
11971
+ };
11972
+ };
11973
+ delete?: never;
11974
+ options?: never;
11975
+ head?: never;
11976
+ patch?: never;
11977
+ trace?: never;
11978
+ };
11979
+ "/v1/auth/reauth/passkey": {
11980
+ parameters: {
11981
+ query?: never;
11982
+ header?: never;
11983
+ path?: never;
11984
+ cookie?: never;
11985
+ };
11986
+ get?: never;
11987
+ put?: never;
11988
+ /**
11989
+ * Re-authentication with a passkey
11990
+ * @description Verifies a passkey of the signed-in user (another account's is refused, 400) and moves the session's last credential verification to now. Never issues or switches a session.
11991
+ */
11992
+ post: {
11993
+ parameters: {
11994
+ query?: never;
11995
+ header?: never;
11996
+ path?: never;
11997
+ cookie?: never;
11998
+ };
11999
+ requestBody?: {
12000
+ content: {
12001
+ "application/json": {
12002
+ /** @description AuthenticationResponseJSON from navigator.credentials.get(). */
12003
+ credential: Record<string, never>;
12004
+ };
12005
+ };
12006
+ };
12007
+ responses: {
12008
+ /** @description Success */
12009
+ 200: {
12010
+ headers: {
12011
+ [name: string]: unknown;
12012
+ };
12013
+ content: {
12014
+ "application/json": {
12015
+ /** @enum {string} */
12016
+ status: "reauthenticated";
12017
+ };
12018
+ };
12019
+ };
12020
+ /** @description Bad Request — validation failed */
12021
+ 400: {
12022
+ headers: {
12023
+ [name: string]: unknown;
12024
+ };
12025
+ content: {
12026
+ "application/json": {
12027
+ /**
12028
+ * @description HTTP status code
12029
+ * @example 400
12030
+ */
12031
+ statusCode?: number;
12032
+ /**
12033
+ * @description Short error label
12034
+ * @example Bad Request
12035
+ */
12036
+ error?: string;
12037
+ /**
12038
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12039
+ * @example Validation failed
12040
+ */
12041
+ message: string | string[];
12042
+ };
12043
+ };
12044
+ };
12045
+ /** @description Unauthorized — authentication required or invalid */
12046
+ 401: {
12047
+ headers: {
12048
+ [name: string]: unknown;
12049
+ };
12050
+ content: {
12051
+ "application/json": {
12052
+ /**
12053
+ * @description HTTP status code
12054
+ * @example 400
12055
+ */
12056
+ statusCode?: number;
12057
+ /**
12058
+ * @description Short error label
12059
+ * @example Bad Request
12060
+ */
12061
+ error?: string;
12062
+ /**
12063
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12064
+ * @example Validation failed
12065
+ */
12066
+ message: string | string[];
12067
+ };
12068
+ };
12069
+ };
12070
+ /** @description Forbidden — insufficient permissions or scope */
12071
+ 403: {
12072
+ headers: {
12073
+ [name: string]: unknown;
12074
+ };
12075
+ content: {
12076
+ "application/json": {
12077
+ /**
12078
+ * @description HTTP status code
12079
+ * @example 400
12080
+ */
12081
+ statusCode?: number;
12082
+ /**
12083
+ * @description Short error label
12084
+ * @example Bad Request
12085
+ */
12086
+ error?: string;
12087
+ /**
12088
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12089
+ * @example Validation failed
12090
+ */
12091
+ message: string | string[];
12092
+ };
12093
+ };
12094
+ };
12095
+ };
12096
+ };
12097
+ delete?: never;
12098
+ options?: never;
12099
+ head?: never;
12100
+ patch?: never;
12101
+ trace?: never;
12102
+ };
12103
+ "/v1/auth/reauth/password": {
12104
+ parameters: {
12105
+ query?: never;
12106
+ header?: never;
12107
+ path?: never;
12108
+ cookie?: never;
12109
+ };
12110
+ get?: never;
12111
+ put?: never;
12112
+ /**
12113
+ * Re-authentication with password and authenticator code
12114
+ * @description Verifies the signed-in user's own password and a TOTP (or recovery) code, then moves the session's last credential verification to now. 401 on a wrong password or code; the session is unchanged.
12115
+ */
12116
+ post: {
12117
+ parameters: {
12118
+ query?: never;
12119
+ header?: never;
12120
+ path?: never;
12121
+ cookie?: never;
12122
+ };
12123
+ requestBody?: {
12124
+ content: {
12125
+ "application/json": {
12126
+ /** @description The signed-in user's password. */
12127
+ password: string;
12128
+ /** @description Current 6-digit TOTP code. */
12129
+ code?: string;
12130
+ /** @description An unused recovery code instead of the TOTP code (consumed). */
12131
+ recoveryCode?: string;
12132
+ };
12133
+ };
12134
+ };
12135
+ responses: {
12136
+ /** @description Success */
12137
+ 200: {
12138
+ headers: {
12139
+ [name: string]: unknown;
12140
+ };
12141
+ content: {
12142
+ "application/json": {
12143
+ /** @enum {string} */
12144
+ status: "reauthenticated";
12145
+ };
12146
+ };
12147
+ };
12148
+ /** @description Bad Request — validation failed */
12149
+ 400: {
12150
+ headers: {
12151
+ [name: string]: unknown;
12152
+ };
12153
+ content: {
12154
+ "application/json": {
12155
+ /**
12156
+ * @description HTTP status code
12157
+ * @example 400
12158
+ */
12159
+ statusCode?: number;
12160
+ /**
12161
+ * @description Short error label
12162
+ * @example Bad Request
12163
+ */
12164
+ error?: string;
12165
+ /**
12166
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12167
+ * @example Validation failed
12168
+ */
12169
+ message: string | string[];
12170
+ };
12171
+ };
12172
+ };
12173
+ /** @description Unauthorized — authentication required or invalid */
12174
+ 401: {
12175
+ headers: {
12176
+ [name: string]: unknown;
12177
+ };
12178
+ content: {
12179
+ "application/json": {
12180
+ /**
12181
+ * @description HTTP status code
12182
+ * @example 400
12183
+ */
12184
+ statusCode?: number;
12185
+ /**
12186
+ * @description Short error label
12187
+ * @example Bad Request
12188
+ */
12189
+ error?: string;
12190
+ /**
12191
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12192
+ * @example Validation failed
12193
+ */
12194
+ message: string | string[];
12195
+ };
12196
+ };
12197
+ };
12198
+ /** @description Forbidden — insufficient permissions or scope */
12199
+ 403: {
12200
+ headers: {
12201
+ [name: string]: unknown;
12202
+ };
12203
+ content: {
12204
+ "application/json": {
12205
+ /**
12206
+ * @description HTTP status code
12207
+ * @example 400
12208
+ */
12209
+ statusCode?: number;
12210
+ /**
12211
+ * @description Short error label
12212
+ * @example Bad Request
12213
+ */
12214
+ error?: string;
12215
+ /**
12216
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12217
+ * @example Validation failed
12218
+ */
12219
+ message: string | string[];
12220
+ };
12221
+ };
12222
+ };
12223
+ /** @description Too Many Requests */
12224
+ 429: {
12225
+ headers: {
12226
+ [name: string]: unknown;
12227
+ };
12228
+ content: {
12229
+ "application/json": {
12230
+ /**
12231
+ * @description HTTP status code
12232
+ * @example 400
12233
+ */
12234
+ statusCode?: number;
12235
+ /**
12236
+ * @description Short error label
12237
+ * @example Bad Request
12238
+ */
12239
+ error?: string;
12240
+ /**
12241
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12242
+ * @example Validation failed
12243
+ */
12244
+ message: string | string[];
12245
+ };
12246
+ };
12247
+ };
12248
+ };
12249
+ };
12250
+ delete?: never;
12251
+ options?: never;
12252
+ head?: never;
12253
+ patch?: never;
12254
+ trace?: never;
12255
+ };
12256
+ "/health/live": {
12257
+ parameters: {
12258
+ query?: never;
12259
+ header?: never;
12260
+ path?: never;
12261
+ cookie?: never;
12262
+ };
12263
+ /**
12264
+ * Liveness probe
12265
+ * @description Returns 200/`{status:"ok"}` whenever the process is running. Used by Kubernetes to decide whether to restart the pod.
12266
+ */
12267
+ get: {
12268
+ parameters: {
12269
+ query?: never;
12270
+ header?: never;
12271
+ path?: never;
12272
+ cookie?: never;
12273
+ };
12274
+ requestBody?: never;
12275
+ responses: {
12276
+ /** @description Success */
12277
+ 200: {
12278
+ headers: {
12279
+ [name: string]: unknown;
12280
+ };
12281
+ content: {
12282
+ "application/json": {
12283
+ /** @enum {string} */
12284
+ status: "ok";
12285
+ };
12286
+ };
12287
+ };
12288
+ };
12289
+ };
12290
+ put?: never;
12291
+ post?: never;
12292
+ delete?: never;
12293
+ options?: never;
12294
+ head?: never;
12295
+ patch?: never;
12296
+ trace?: never;
12297
+ };
12298
+ "/health/ready": {
12299
+ parameters: {
12300
+ query?: never;
12301
+ header?: never;
12302
+ path?: never;
12303
+ cookie?: never;
12304
+ };
12305
+ /**
12306
+ * Readiness probe
12307
+ * @description Returns 200/`{status:"ok"}` once a trivial `SELECT 1` succeeds against PostgreSQL. 503 if the DB is unreachable.
12308
+ */
12309
+ get: {
12310
+ parameters: {
12311
+ query?: never;
12312
+ header?: never;
12313
+ path?: never;
12314
+ cookie?: never;
12315
+ };
12316
+ requestBody?: never;
12317
+ responses: {
12318
+ /** @description Success */
12319
+ 200: {
12320
+ headers: {
12321
+ [name: string]: unknown;
12322
+ };
12323
+ content: {
12324
+ "application/json": {
12325
+ /** @enum {string} */
12326
+ status: "ok";
12327
+ };
12328
+ };
12329
+ };
12330
+ /** @description Service Unavailable */
12331
+ 503: {
12332
+ headers: {
12333
+ [name: string]: unknown;
12334
+ };
12335
+ content: {
12336
+ "application/json": {
12337
+ /**
12338
+ * @description HTTP status code
12339
+ * @example 400
12340
+ */
12341
+ statusCode?: number;
12342
+ /**
12343
+ * @description Short error label
12344
+ * @example Bad Request
12345
+ */
12346
+ error?: string;
12347
+ /**
12348
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12349
+ * @example Validation failed
12350
+ */
12351
+ message: string | string[];
12352
+ };
12353
+ };
12354
+ };
12355
+ };
12356
+ };
12357
+ put?: never;
12358
+ post?: never;
12359
+ delete?: never;
12360
+ options?: never;
12361
+ head?: never;
12362
+ patch?: never;
12363
+ trace?: never;
12364
+ };
12365
+ "/v1/orgs/me/api-keys": {
12366
+ parameters: {
12367
+ query?: never;
12368
+ header?: never;
12369
+ path?: never;
12370
+ cookie?: never;
12371
+ };
12372
+ /** List your organization's API keys */
12373
+ get: {
12374
+ parameters: {
12375
+ query?: never;
12376
+ header?: never;
12377
+ path?: never;
12378
+ cookie?: never;
12379
+ };
12380
+ requestBody?: never;
12381
+ responses: {
12382
+ /** @description Success */
12383
+ 200: {
12384
+ headers: {
12385
+ [name: string]: unknown;
12386
+ };
12387
+ content: {
12388
+ "application/json": {
12389
+ apiKeys: {
12390
+ /**
12391
+ * @description UUID v4
12392
+ * @example 550e8400-e29b-41d4-a716-446655440000
12393
+ */
12394
+ id: string;
12395
+ label: string;
12396
+ externalUserRef: string | null;
12397
+ /** @example wcak_01234567 */
12398
+ secretPrefix: string;
12399
+ /**
12400
+ * Format: date-time
12401
+ * @description ISO 8601 date-time string
12402
+ * @example 2026-05-20T10:30:00.000Z
12403
+ */
12404
+ createdAt: string;
12405
+ /** @description The creator's email; null once that account is deleted. */
12406
+ createdBy: string | null;
12407
+ /**
12408
+ * @description `activating` until its signing key is confirmed on the contract (seconds); then `active`.
12409
+ * @enum {string}
12410
+ */
12411
+ status: "activating" | "active" | "revoked";
12412
+ /**
12413
+ * Format: date-time
12414
+ * @description ISO 8601 date-time string
12415
+ * @example 2026-05-20T10:30:00.000Z
12416
+ */
12417
+ revokedAt: string | null;
12418
+ /** @enum {string|null} */
12419
+ revokeReason: "admin" | "add_failed" | null;
12420
+ /**
12421
+ * @description The key's signing public key on the contract.
12422
+ * @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
12423
+ */
12424
+ publicKey: string | null;
12425
+ }[];
12426
+ /** @description Whether the caller may create and revoke keys (an active org admin). */
12427
+ canManage: boolean;
12428
+ };
12429
+ };
12430
+ };
12431
+ /** @description Forbidden — insufficient permissions or scope */
12432
+ 403: {
12433
+ headers: {
12434
+ [name: string]: unknown;
12435
+ };
12436
+ content: {
12437
+ "application/json": {
12438
+ /**
12439
+ * @description HTTP status code
12440
+ * @example 400
12441
+ */
12442
+ statusCode?: number;
12443
+ /**
12444
+ * @description Short error label
12445
+ * @example Bad Request
12446
+ */
12447
+ error?: string;
12448
+ /**
12449
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12450
+ * @example Validation failed
12451
+ */
12452
+ message: string | string[];
12453
+ };
12454
+ };
12455
+ };
12456
+ };
12457
+ };
12458
+ put?: never;
12459
+ /**
12460
+ * Create an API key
12461
+ * @description An org admin of the caller's own organization, with a step-up in the last 5 minutes, on a Witnium-managed contract. Adds the key's signing key to the contract; the key works once it is active. 10 attempts per organization per hour.
12462
+ */
12463
+ post: {
12464
+ parameters: {
12465
+ query?: never;
12466
+ header?: never;
12467
+ path?: never;
12468
+ cookie?: never;
12469
+ };
12470
+ requestBody?: {
12471
+ content: {
12472
+ "application/json": {
12473
+ /** @description What the key is for, e.g. "ingest server". */
12474
+ label: string;
12475
+ /** @description Your own name for a user this key stands in for (e.g. your user id). A label only: returned to your org, never logged, never public. */
12476
+ externalUserRef?: string;
12477
+ };
12478
+ };
12479
+ };
12480
+ responses: {
12481
+ /** @description Created */
12482
+ 201: {
12483
+ headers: {
12484
+ [name: string]: unknown;
12485
+ };
12486
+ content: {
12487
+ "application/json": {
12488
+ /**
12489
+ * @description UUID v4
12490
+ * @example 550e8400-e29b-41d4-a716-446655440000
12491
+ */
12492
+ id: string;
12493
+ /**
12494
+ * @description The API key, `wcak_` and 64 hex. Shown only here; store it now.
12495
+ * @example wcak_0123456789abcdef…
12496
+ */
12497
+ secret: string;
12498
+ label: string;
12499
+ externalUserRef: string | null;
12500
+ /**
12501
+ * @description `activating` until its signing key is confirmed on the contract (seconds); then `active`.
12502
+ * @enum {string}
12503
+ */
12504
+ status: "activating" | "active" | "revoked";
12505
+ };
12506
+ };
12507
+ };
12508
+ /** @description Bad Request — validation failed */
12509
+ 400: {
12510
+ headers: {
12511
+ [name: string]: unknown;
12512
+ };
12513
+ content: {
12514
+ "application/json": {
12515
+ /**
12516
+ * @description HTTP status code
12517
+ * @example 400
12518
+ */
12519
+ statusCode?: number;
12520
+ /**
12521
+ * @description Short error label
12522
+ * @example Bad Request
12523
+ */
12524
+ error?: string;
12525
+ /**
12526
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12527
+ * @example Validation failed
12528
+ */
12529
+ message: string | string[];
12530
+ };
12531
+ };
12532
+ };
12533
+ /** @description Forbidden — insufficient permissions or scope */
12534
+ 403: {
12535
+ headers: {
12536
+ [name: string]: unknown;
12537
+ };
12538
+ content: {
12539
+ "application/json": {
12540
+ /**
12541
+ * @description HTTP status code
12542
+ * @example 400
12543
+ */
12544
+ statusCode?: number;
12545
+ /**
12546
+ * @description Short error label
12547
+ * @example Bad Request
12548
+ */
12549
+ error?: string;
12550
+ /**
12551
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12552
+ * @example Validation failed
12553
+ */
12554
+ message: string | string[];
12555
+ };
12556
+ };
12557
+ };
12558
+ /** @description Conflict */
12559
+ 409: {
12560
+ headers: {
12561
+ [name: string]: unknown;
12562
+ };
12563
+ content: {
12564
+ "application/json": {
12565
+ /**
12566
+ * @description HTTP status code
12567
+ * @example 400
12568
+ */
12569
+ statusCode?: number;
12570
+ /**
12571
+ * @description Short error label
12572
+ * @example Bad Request
12573
+ */
12574
+ error?: string;
12575
+ /**
12576
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12577
+ * @example Validation failed
12578
+ */
12579
+ message: string | string[];
12580
+ };
12581
+ };
12582
+ };
12583
+ /** @description Too Many Requests */
12584
+ 429: {
12585
+ headers: {
12586
+ [name: string]: unknown;
12587
+ };
12588
+ content: {
12589
+ "application/json": {
12590
+ /**
12591
+ * @description HTTP status code
12592
+ * @example 400
12593
+ */
12594
+ statusCode?: number;
12595
+ /**
12596
+ * @description Short error label
12597
+ * @example Bad Request
12598
+ */
12599
+ error?: string;
12600
+ /**
12601
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12602
+ * @example Validation failed
12603
+ */
12604
+ message: string | string[];
12605
+ };
12606
+ };
12607
+ };
12608
+ };
12609
+ };
12610
+ delete?: never;
12611
+ options?: never;
12612
+ head?: never;
12613
+ patch?: never;
12614
+ trace?: never;
12615
+ };
12616
+ "/v1/orgs/me/api-keys/{id}": {
12617
+ parameters: {
12618
+ query?: never;
12619
+ header?: never;
12620
+ path?: never;
12621
+ cookie?: never;
12622
+ };
12623
+ get?: never;
12624
+ put?: never;
12625
+ post?: never;
11605
12626
  /**
11606
- * Liveness probe
11607
- * @description Returns 200/`{status:"ok"}` whenever the process is running. Used by Kubernetes to decide whether to restart the pod.
12627
+ * Revoke an API key
12628
+ * @description Org admins. The key stops working when this returns; its signing key is then revoked on the contract. Revoking a revoked key is a no-op.
12629
+ */
12630
+ delete: {
12631
+ parameters: {
12632
+ query?: never;
12633
+ header?: never;
12634
+ path: {
12635
+ id: string;
12636
+ };
12637
+ cookie?: never;
12638
+ };
12639
+ requestBody?: never;
12640
+ responses: {
12641
+ /** @description No Content */
12642
+ 204: {
12643
+ headers: {
12644
+ [name: string]: unknown;
12645
+ };
12646
+ content?: never;
12647
+ };
12648
+ /** @description Forbidden — insufficient permissions or scope */
12649
+ 403: {
12650
+ headers: {
12651
+ [name: string]: unknown;
12652
+ };
12653
+ content: {
12654
+ "application/json": {
12655
+ /**
12656
+ * @description HTTP status code
12657
+ * @example 400
12658
+ */
12659
+ statusCode?: number;
12660
+ /**
12661
+ * @description Short error label
12662
+ * @example Bad Request
12663
+ */
12664
+ error?: string;
12665
+ /**
12666
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12667
+ * @example Validation failed
12668
+ */
12669
+ message: string | string[];
12670
+ };
12671
+ };
12672
+ };
12673
+ /** @description Not Found */
12674
+ 404: {
12675
+ headers: {
12676
+ [name: string]: unknown;
12677
+ };
12678
+ content: {
12679
+ "application/json": {
12680
+ /**
12681
+ * @description HTTP status code
12682
+ * @example 400
12683
+ */
12684
+ statusCode?: number;
12685
+ /**
12686
+ * @description Short error label
12687
+ * @example Bad Request
12688
+ */
12689
+ error?: string;
12690
+ /**
12691
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12692
+ * @example Validation failed
12693
+ */
12694
+ message: string | string[];
12695
+ };
12696
+ };
12697
+ };
12698
+ };
12699
+ };
12700
+ options?: never;
12701
+ head?: never;
12702
+ patch?: never;
12703
+ trace?: never;
12704
+ };
12705
+ "/v1/api-key": {
12706
+ parameters: {
12707
+ query?: never;
12708
+ header?: never;
12709
+ path?: never;
12710
+ cookie?: never;
12711
+ };
12712
+ /**
12713
+ * Describe the calling API key
12714
+ * @description Its contract and signing key, so a server finds what it signs with.
11608
12715
  */
11609
12716
  get: {
11610
12717
  parameters: {
@@ -11622,55 +12729,87 @@ interface paths$1 {
11622
12729
  };
11623
12730
  content: {
11624
12731
  "application/json": {
11625
- /** @enum {string} */
11626
- status: "ok";
12732
+ /**
12733
+ * @description UUID v4
12734
+ * @example 550e8400-e29b-41d4-a716-446655440000
12735
+ */
12736
+ id: string;
12737
+ /**
12738
+ * @description UUID v4
12739
+ * @example 550e8400-e29b-41d4-a716-446655440000
12740
+ */
12741
+ organizationId: string;
12742
+ /** @description The only contract this key writes to. */
12743
+ contractAddress: string;
12744
+ /**
12745
+ * @description Its signing key, for POST /v1/sign.
12746
+ * @example 550e8400-e29b-41d4-a716-446655440000
12747
+ */
12748
+ delegatedKeyId: string;
12749
+ /**
12750
+ * @description Ed25519 public key — 32 bytes hex-encoded (64 chars, no 0x prefix)
12751
+ * @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
12752
+ */
12753
+ publicKey: string;
12754
+ label: string;
12755
+ externalUserRef: string | null;
12756
+ /** @enum {string} */
12757
+ status: "active";
12758
+ };
12759
+ };
12760
+ };
12761
+ /** @description Unauthorized — authentication required or invalid */
12762
+ 401: {
12763
+ headers: {
12764
+ [name: string]: unknown;
12765
+ };
12766
+ content: {
12767
+ "application/json": {
12768
+ /**
12769
+ * @description HTTP status code
12770
+ * @example 400
12771
+ */
12772
+ statusCode?: number;
12773
+ /**
12774
+ * @description Short error label
12775
+ * @example Bad Request
12776
+ */
12777
+ error?: string;
12778
+ /**
12779
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12780
+ * @example Validation failed
12781
+ */
12782
+ message: string | string[];
11627
12783
  };
11628
12784
  };
11629
12785
  };
11630
- };
11631
- };
11632
- put?: never;
11633
- post?: never;
11634
- delete?: never;
11635
- options?: never;
11636
- head?: never;
11637
- patch?: never;
11638
- trace?: never;
11639
- };
11640
- "/health/ready": {
11641
- parameters: {
11642
- query?: never;
11643
- header?: never;
11644
- path?: never;
11645
- cookie?: never;
11646
- };
11647
- /**
11648
- * Readiness probe
11649
- * @description Returns 200/`{status:"ok"}` once a trivial `SELECT 1` succeeds against PostgreSQL. 503 if the DB is unreachable.
11650
- */
11651
- get: {
11652
- parameters: {
11653
- query?: never;
11654
- header?: never;
11655
- path?: never;
11656
- cookie?: never;
11657
- };
11658
- requestBody?: never;
11659
- responses: {
11660
- /** @description Success */
11661
- 200: {
12786
+ /** @description Forbidden — insufficient permissions or scope */
12787
+ 403: {
11662
12788
  headers: {
11663
12789
  [name: string]: unknown;
11664
12790
  };
11665
12791
  content: {
11666
12792
  "application/json": {
11667
- /** @enum {string} */
11668
- status: "ok";
12793
+ /**
12794
+ * @description HTTP status code
12795
+ * @example 400
12796
+ */
12797
+ statusCode?: number;
12798
+ /**
12799
+ * @description Short error label
12800
+ * @example Bad Request
12801
+ */
12802
+ error?: string;
12803
+ /**
12804
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12805
+ * @example Validation failed
12806
+ */
12807
+ message: string | string[];
11669
12808
  };
11670
12809
  };
11671
12810
  };
11672
- /** @description Service Unavailable */
11673
- 503: {
12811
+ /** @description Conflict */
12812
+ 409: {
11674
12813
  headers: {
11675
12814
  [name: string]: unknown;
11676
12815
  };
@@ -11704,14 +12843,17 @@ interface paths$1 {
11704
12843
  patch?: never;
11705
12844
  trace?: never;
11706
12845
  };
11707
- "/v1/orgs/me/api-keys": {
12846
+ "/v1/account/dashboard-key": {
11708
12847
  parameters: {
11709
12848
  query?: never;
11710
12849
  header?: never;
11711
12850
  path?: never;
11712
12851
  cookie?: never;
11713
12852
  };
11714
- /** List your organization's API keys */
12853
+ /**
12854
+ * Your dashboard signing key
12855
+ * @description On your organization's Witnium-managed contract. 409 for a self-custody organization or one without a contract.
12856
+ */
11715
12857
  get: {
11716
12858
  parameters: {
11717
12859
  query?: never;
@@ -11728,50 +12870,28 @@ interface paths$1 {
11728
12870
  };
11729
12871
  content: {
11730
12872
  "application/json": {
11731
- apiKeys: {
11732
- /**
11733
- * @description UUID v4
11734
- * @example 550e8400-e29b-41d4-a716-446655440000
11735
- */
11736
- id: string;
11737
- label: string;
11738
- externalUserRef: string | null;
11739
- /** @example wcak_01234567 */
11740
- secretPrefix: string;
11741
- /**
11742
- * Format: date-time
11743
- * @description ISO 8601 date-time string
11744
- * @example 2026-05-20T10:30:00.000Z
11745
- */
11746
- createdAt: string;
11747
- /** @description The creator's email; null once that account is deleted. */
11748
- createdBy: string | null;
11749
- /**
11750
- * @description `activating` until its signing key is confirmed on the contract (seconds); then `active`.
11751
- * @enum {string}
11752
- */
11753
- status: "activating" | "active" | "revoked";
11754
- /**
11755
- * Format: date-time
11756
- * @description ISO 8601 date-time string
11757
- * @example 2026-05-20T10:30:00.000Z
11758
- */
11759
- revokedAt: string | null;
11760
- /** @enum {string|null} */
11761
- revokeReason: "admin" | "add_failed" | null;
11762
- /**
11763
- * @description The key's signing public key on the contract.
11764
- * @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
11765
- */
11766
- publicKey: string | null;
11767
- }[];
11768
- /** @description Whether the caller may create and revoke keys (an active org admin). */
11769
- canManage: boolean;
12873
+ /**
12874
+ * @description `activating` while the key is being added to the contract (seconds); `none` when there is none (or its add failed).
12875
+ * @enum {string}
12876
+ */
12877
+ status: "none" | "activating" | "active";
12878
+ /**
12879
+ * @description The delegated key id, for POST /v1/sign.
12880
+ * @example 550e8400-e29b-41d4-a716-446655440000
12881
+ */
12882
+ id: string | null;
12883
+ /**
12884
+ * @description Ed25519 public key — 32 bytes hex-encoded (64 chars, no 0x prefix)
12885
+ * @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
12886
+ */
12887
+ publicKey: string | null;
12888
+ /** @description Whether DELETE revokes it: true exactly when Witnium has recorded adding this key to the contract (also while that addition settles; DELETE then revokes whatever lands). False for your organization's base key (it stays), for a key whose addition is not recorded yet, and when there is none. */
12889
+ revocable: boolean;
11770
12890
  };
11771
12891
  };
11772
12892
  };
11773
- /** @description Forbidden — insufficient permissions or scope */
11774
- 403: {
12893
+ /** @description Conflict */
12894
+ 409: {
11775
12895
  headers: {
11776
12896
  [name: string]: unknown;
11777
12897
  };
@@ -11799,8 +12919,8 @@ interface paths$1 {
11799
12919
  };
11800
12920
  put?: never;
11801
12921
  /**
11802
- * Create an API key
11803
- * @description An org admin of the caller's own organization, with a step-up in the last 5 minutes, on a Witnium-managed contract. Adds the key's signing key to the contract; the key works once it is active. 10 attempts per organization per hour.
12922
+ * Ensure your dashboard signing key
12923
+ * @description Idempotent. Creates your key and adds it to the contract with the managed owner key when you have none; poll GET until `active`. Members of a managed organization only (403 when suspended, 409 for self-custody). 5 attempts per hour.
11804
12924
  */
11805
12925
  post: {
11806
12926
  parameters: {
@@ -11809,16 +12929,7 @@ interface paths$1 {
11809
12929
  path?: never;
11810
12930
  cookie?: never;
11811
12931
  };
11812
- requestBody?: {
11813
- content: {
11814
- "application/json": {
11815
- /** @description What the key is for, e.g. "ingest server". */
11816
- label: string;
11817
- /** @description Your own name for a user this key stands in for (e.g. your user id). A label only: returned to your org, never logged, never public. */
11818
- externalUserRef?: string;
11819
- };
11820
- };
11821
- };
12932
+ requestBody?: never;
11822
12933
  responses: {
11823
12934
  /** @description Created */
11824
12935
  201: {
@@ -11828,27 +12939,27 @@ interface paths$1 {
11828
12939
  content: {
11829
12940
  "application/json": {
11830
12941
  /**
11831
- * @description UUID v4
11832
- * @example 550e8400-e29b-41d4-a716-446655440000
12942
+ * @description `activating` while the key is being added to the contract (seconds); `none` when there is none (or its add failed).
12943
+ * @enum {string}
11833
12944
  */
11834
- id: string;
12945
+ status: "none" | "activating" | "active";
11835
12946
  /**
11836
- * @description The API key, `wcak_` and 64 hex. Shown only here; store it now.
11837
- * @example wcak_0123456789abcdef…
12947
+ * @description The delegated key id, for POST /v1/sign.
12948
+ * @example 550e8400-e29b-41d4-a716-446655440000
11838
12949
  */
11839
- secret: string;
11840
- label: string;
11841
- externalUserRef: string | null;
12950
+ id: string | null;
11842
12951
  /**
11843
- * @description `activating` until its signing key is confirmed on the contract (seconds); then `active`.
11844
- * @enum {string}
12952
+ * @description Ed25519 public key — 32 bytes hex-encoded (64 chars, no 0x prefix)
12953
+ * @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
11845
12954
  */
11846
- status: "activating" | "active" | "revoked";
12955
+ publicKey: string | null;
12956
+ /** @description Whether DELETE revokes it: true exactly when Witnium has recorded adding this key to the contract (also while that addition settles; DELETE then revokes whatever lands). False for your organization's base key (it stays), for a key whose addition is not recorded yet, and when there is none. */
12957
+ revocable: boolean;
11847
12958
  };
11848
12959
  };
11849
12960
  };
11850
- /** @description Bad Request — validation failed */
11851
- 400: {
12961
+ /** @description Forbidden — insufficient permissions or scope */
12962
+ 403: {
11852
12963
  headers: {
11853
12964
  [name: string]: unknown;
11854
12965
  };
@@ -11872,8 +12983,8 @@ interface paths$1 {
11872
12983
  };
11873
12984
  };
11874
12985
  };
11875
- /** @description Forbidden — insufficient permissions or scope */
11876
- 403: {
12986
+ /** @description Conflict */
12987
+ 409: {
11877
12988
  headers: {
11878
12989
  [name: string]: unknown;
11879
12990
  };
@@ -11897,8 +13008,8 @@ interface paths$1 {
11897
13008
  };
11898
13009
  };
11899
13010
  };
11900
- /** @description Conflict */
11901
- 409: {
13011
+ /** @description Too Many Requests */
13012
+ 429: {
11902
13013
  headers: {
11903
13014
  [name: string]: unknown;
11904
13015
  };
@@ -11922,8 +13033,30 @@ interface paths$1 {
11922
13033
  };
11923
13034
  };
11924
13035
  };
11925
- /** @description Too Many Requests */
11926
- 429: {
13036
+ };
13037
+ };
13038
+ /**
13039
+ * Revoke your dashboard signing key
13040
+ * @description Revoked on the contract; your next witness adds a new one. 409 for your organization's base key (it stays) and for a key still being added.
13041
+ */
13042
+ delete: {
13043
+ parameters: {
13044
+ query?: never;
13045
+ header?: never;
13046
+ path?: never;
13047
+ cookie?: never;
13048
+ };
13049
+ requestBody?: never;
13050
+ responses: {
13051
+ /** @description No Content */
13052
+ 204: {
13053
+ headers: {
13054
+ [name: string]: unknown;
13055
+ };
13056
+ content?: never;
13057
+ };
13058
+ /** @description Conflict */
13059
+ 409: {
11927
13060
  headers: {
11928
13061
  [name: string]: unknown;
11929
13062
  };
@@ -11949,13 +13082,12 @@ interface paths$1 {
11949
13082
  };
11950
13083
  };
11951
13084
  };
11952
- delete?: never;
11953
13085
  options?: never;
11954
13086
  head?: never;
11955
13087
  patch?: never;
11956
13088
  trace?: never;
11957
13089
  };
11958
- "/v1/orgs/me/api-keys/{id}": {
13090
+ "/v1/orgs/me/contract/pause": {
11959
13091
  parameters: {
11960
13092
  query?: never;
11961
13093
  header?: never;
@@ -11964,28 +13096,30 @@ interface paths$1 {
11964
13096
  };
11965
13097
  get?: never;
11966
13098
  put?: never;
11967
- post?: never;
11968
13099
  /**
11969
- * Revoke an API key
11970
- * @description Org admins. The key stops working when this returns; its signing key is then revoked on the contract. Revoking a revoked key is a no-op.
13100
+ * Pause witnessing
13101
+ * @description Org admins, Witnium-managed contracts. Immediate and protective: no step-up. 409 owner_op_settling while another change settles.
11971
13102
  */
11972
- delete: {
13103
+ post: {
11973
13104
  parameters: {
11974
13105
  query?: never;
11975
13106
  header?: never;
11976
- path: {
11977
- id: string;
11978
- };
13107
+ path?: never;
11979
13108
  cookie?: never;
11980
13109
  };
11981
13110
  requestBody?: never;
11982
13111
  responses: {
11983
- /** @description No Content */
11984
- 204: {
13112
+ /** @description Success */
13113
+ 200: {
11985
13114
  headers: {
11986
13115
  [name: string]: unknown;
11987
13116
  };
11988
- content?: never;
13117
+ content: {
13118
+ "application/json": {
13119
+ /** @enum {string} */
13120
+ status: "signed" | "submitted" | "confirmed" | "failed";
13121
+ };
13122
+ };
11989
13123
  };
11990
13124
  /** @description Forbidden — insufficient permissions or scope */
11991
13125
  403: {
@@ -12012,8 +13146,8 @@ interface paths$1 {
12012
13146
  };
12013
13147
  };
12014
13148
  };
12015
- /** @description Not Found */
12016
- 404: {
13149
+ /** @description Conflict */
13150
+ 409: {
12017
13151
  headers: {
12018
13152
  [name: string]: unknown;
12019
13153
  };
@@ -12039,23 +13173,26 @@ interface paths$1 {
12039
13173
  };
12040
13174
  };
12041
13175
  };
13176
+ delete?: never;
12042
13177
  options?: never;
12043
13178
  head?: never;
12044
13179
  patch?: never;
12045
13180
  trace?: never;
12046
13181
  };
12047
- "/v1/api-key": {
13182
+ "/v1/orgs/me/contract/resume": {
12048
13183
  parameters: {
12049
13184
  query?: never;
12050
13185
  header?: never;
12051
13186
  path?: never;
12052
13187
  cookie?: never;
12053
13188
  };
13189
+ get?: never;
13190
+ put?: never;
12054
13191
  /**
12055
- * Describe the calling API key
12056
- * @description Its contract and signing key, so a server finds what it signs with.
13192
+ * Resume witnessing
13193
+ * @description Org admins, Witnium-managed contracts, with a step-up in the last 5 minutes: on a session, a passkey or authenticator step-up; with a bearer token, an `auth_time` in the last 5 minutes (authorize with `max_age=0` first). 409 owner_op_settling while another change settles.
12057
13194
  */
12058
- get: {
13195
+ post: {
12059
13196
  parameters: {
12060
13197
  query?: never;
12061
13198
  header?: never;
@@ -12071,37 +13208,13 @@ interface paths$1 {
12071
13208
  };
12072
13209
  content: {
12073
13210
  "application/json": {
12074
- /**
12075
- * @description UUID v4
12076
- * @example 550e8400-e29b-41d4-a716-446655440000
12077
- */
12078
- id: string;
12079
- /**
12080
- * @description UUID v4
12081
- * @example 550e8400-e29b-41d4-a716-446655440000
12082
- */
12083
- organizationId: string;
12084
- /** @description The only contract this key writes to. */
12085
- contractAddress: string;
12086
- /**
12087
- * @description Its signing key, for POST /v1/sign.
12088
- * @example 550e8400-e29b-41d4-a716-446655440000
12089
- */
12090
- delegatedKeyId: string;
12091
- /**
12092
- * @description Ed25519 public key — 32 bytes hex-encoded (64 chars, no 0x prefix)
12093
- * @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
12094
- */
12095
- publicKey: string;
12096
- label: string;
12097
- externalUserRef: string | null;
12098
13211
  /** @enum {string} */
12099
- status: "active";
13212
+ status: "signed" | "submitted" | "confirmed" | "failed";
12100
13213
  };
12101
13214
  };
12102
13215
  };
12103
- /** @description Unauthorized — authentication required or invalid */
12104
- 401: {
13216
+ /** @description Forbidden — insufficient permissions or scope */
13217
+ 403: {
12105
13218
  headers: {
12106
13219
  [name: string]: unknown;
12107
13220
  };
@@ -12125,8 +13238,8 @@ interface paths$1 {
12125
13238
  };
12126
13239
  };
12127
13240
  };
12128
- /** @description Forbidden — insufficient permissions or scope */
12129
- 403: {
13241
+ /** @description Conflict */
13242
+ 409: {
12130
13243
  headers: {
12131
13244
  [name: string]: unknown;
12132
13245
  };
@@ -12150,8 +13263,8 @@ interface paths$1 {
12150
13263
  };
12151
13264
  };
12152
13265
  };
12153
- /** @description Conflict */
12154
- 409: {
13266
+ /** @description Too Many Requests */
13267
+ 429: {
12155
13268
  headers: {
12156
13269
  [name: string]: unknown;
12157
13270
  };
@@ -12177,15 +13290,13 @@ interface paths$1 {
12177
13290
  };
12178
13291
  };
12179
13292
  };
12180
- put?: never;
12181
- post?: never;
12182
13293
  delete?: never;
12183
13294
  options?: never;
12184
13295
  head?: never;
12185
13296
  patch?: never;
12186
13297
  trace?: never;
12187
13298
  };
12188
- "/v1/account/dashboard-key": {
13299
+ "/v1/orgs/me/owner-operations": {
12189
13300
  parameters: {
12190
13301
  query?: never;
12191
13302
  header?: never;
@@ -12193,12 +13304,14 @@ interface paths$1 {
12193
13304
  cookie?: never;
12194
13305
  };
12195
13306
  /**
12196
- * Your dashboard signing key
12197
- * @description On your organization's Witnium-managed contract. 409 for a self-custody organization or one without a contract.
13307
+ * Your organization's contract activity
13308
+ * @description The latest owner operations on the contract, newest first: keys added and revoked, pause and resume; and whether witnessing is paused now. Any active member.
12198
13309
  */
12199
13310
  get: {
12200
13311
  parameters: {
12201
- query?: never;
13312
+ query?: {
13313
+ limit?: number;
13314
+ };
12202
13315
  header?: never;
12203
13316
  path?: never;
12204
13317
  cookie?: never;
@@ -12212,28 +13325,35 @@ interface paths$1 {
12212
13325
  };
12213
13326
  content: {
12214
13327
  "application/json": {
12215
- /**
12216
- * @description `activating` while the key is being added to the contract (seconds); `none` when there is none (or its add failed).
12217
- * @enum {string}
12218
- */
12219
- status: "none" | "activating" | "active";
12220
- /**
12221
- * @description The delegated key id, for POST /v1/sign.
12222
- * @example 550e8400-e29b-41d4-a716-446655440000
12223
- */
12224
- id: string | null;
12225
- /**
12226
- * @description Ed25519 public key — 32 bytes hex-encoded (64 chars, no 0x prefix)
12227
- * @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
12228
- */
12229
- publicKey: string | null;
12230
- /** @description Whether DELETE revokes it: true exactly when Witnium has recorded adding this key to the contract (also while that addition settles; DELETE then revokes whatever lands). False for your organization's base key (it stays), for a key whose addition is not recorded yet, and when there is none. */
12231
- revocable: boolean;
13328
+ operations: {
13329
+ /**
13330
+ * @description UUID v4
13331
+ * @example 550e8400-e29b-41d4-a716-446655440000
13332
+ */
13333
+ id: string;
13334
+ /** @enum {string} */
13335
+ op: "add-signing-key" | "revoke-signing-key" | "pause" | "unpause";
13336
+ /** @enum {string} */
13337
+ status: "signed" | "submitted" | "confirmed" | "failed";
13338
+ /** @enum {string} */
13339
+ source: "connection" | "api-key" | "member-key" | "admin" | "operator";
13340
+ /** @description The API key's label or the member's email, when known. */
13341
+ label: string | null;
13342
+ /**
13343
+ * Format: date-time
13344
+ * @description ISO 8601 date-time string
13345
+ * @example 2026-05-20T10:30:00.000Z
13346
+ */
13347
+ createdAt: string;
13348
+ txHash: string | null;
13349
+ }[];
13350
+ /** @description Whether witnessing is paused on the active contract: its newest confirmed pause or resume is a pause (false without an active contract). */
13351
+ paused: boolean;
12232
13352
  };
12233
13353
  };
12234
13354
  };
12235
- /** @description Conflict */
12236
- 409: {
13355
+ /** @description Forbidden — insufficient permissions or scope */
13356
+ 403: {
12237
13357
  headers: {
12238
13358
  [name: string]: unknown;
12239
13359
  };
@@ -12260,9 +13380,25 @@ interface paths$1 {
12260
13380
  };
12261
13381
  };
12262
13382
  put?: never;
13383
+ post?: never;
13384
+ delete?: never;
13385
+ options?: never;
13386
+ head?: never;
13387
+ patch?: never;
13388
+ trace?: never;
13389
+ };
13390
+ "/v1/orgs/me/contract/keys": {
13391
+ parameters: {
13392
+ query?: never;
13393
+ header?: never;
13394
+ path?: never;
13395
+ cookie?: never;
13396
+ };
13397
+ get?: never;
13398
+ put?: never;
12263
13399
  /**
12264
- * Ensure your dashboard signing key
12265
- * @description Idempotent. Creates your key and adds it to the contract with the managed owner key when you have none; poll GET until `active`. Members of a managed organization only (403 when suspended, 409 for self-custody). 5 attempts per hour.
13400
+ * Add a key you hold to the managed contract
13401
+ * @description Plan §17.7. Org admins, after a step-up. Witnium signs the add with the managed owner key; the key counts once the op confirms (`status`), and the admins are emailed. 409 owner_op_settling while another change settles.
12266
13402
  */
12267
13403
  post: {
12268
13404
  parameters: {
@@ -12271,37 +13407,59 @@ interface paths$1 {
12271
13407
  path?: never;
12272
13408
  cookie?: never;
12273
13409
  };
12274
- requestBody?: never;
13410
+ requestBody?: {
13411
+ content: {
13412
+ "application/json": {
13413
+ /**
13414
+ * @description A key you hold (your SDK, your own systems). Witnium never sees its private key.
13415
+ * @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
13416
+ */
13417
+ publicKey: string;
13418
+ /** @description A name for the key, e.g. "ingest server". */
13419
+ label: string;
13420
+ };
13421
+ };
13422
+ };
12275
13423
  responses: {
12276
- /** @description Created */
12277
- 201: {
13424
+ /** @description Success */
13425
+ 200: {
13426
+ headers: {
13427
+ [name: string]: unknown;
13428
+ };
13429
+ content: {
13430
+ "application/json": {
13431
+ /** @enum {string} */
13432
+ status: "signed" | "submitted" | "confirmed" | "failed";
13433
+ };
13434
+ };
13435
+ };
13436
+ /** @description Bad Request — validation failed */
13437
+ 400: {
12278
13438
  headers: {
12279
13439
  [name: string]: unknown;
12280
13440
  };
12281
13441
  content: {
12282
13442
  "application/json": {
12283
13443
  /**
12284
- * @description `activating` while the key is being added to the contract (seconds); `none` when there is none (or its add failed).
12285
- * @enum {string}
13444
+ * @description HTTP status code
13445
+ * @example 400
12286
13446
  */
12287
- status: "none" | "activating" | "active";
13447
+ statusCode?: number;
12288
13448
  /**
12289
- * @description The delegated key id, for POST /v1/sign.
12290
- * @example 550e8400-e29b-41d4-a716-446655440000
13449
+ * @description Short error label
13450
+ * @example Bad Request
12291
13451
  */
12292
- id: string | null;
13452
+ error?: string;
12293
13453
  /**
12294
- * @description Ed25519 public key — 32 bytes hex-encoded (64 chars, no 0x prefix)
12295
- * @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
13454
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
13455
+ * @example Validation failed
12296
13456
  */
12297
- publicKey: string | null;
12298
- /** @description Whether DELETE revokes it: true exactly when Witnium has recorded adding this key to the contract (also while that addition settles; DELETE then revokes whatever lands). False for your organization's base key (it stays), for a key whose addition is not recorded yet, and when there is none. */
12299
- revocable: boolean;
13457
+ message: string | string[];
12300
13458
  };
12301
13459
  };
12302
13460
  };
12303
- /** @description Forbidden — insufficient permissions or scope */
12304
- 403: {
13461
+ /** @description Unauthorized — authentication required or invalid */
13462
+ 401: {
12305
13463
  headers: {
12306
13464
  [name: string]: unknown;
12307
13465
  };
@@ -12325,8 +13483,8 @@ interface paths$1 {
12325
13483
  };
12326
13484
  };
12327
13485
  };
12328
- /** @description Conflict */
12329
- 409: {
13486
+ /** @description Forbidden — insufficient permissions or scope */
13487
+ 403: {
12330
13488
  headers: {
12331
13489
  [name: string]: unknown;
12332
13490
  };
@@ -12350,8 +13508,8 @@ interface paths$1 {
12350
13508
  };
12351
13509
  };
12352
13510
  };
12353
- /** @description Too Many Requests */
12354
- 429: {
13511
+ /** @description Conflict */
13512
+ 409: {
12355
13513
  headers: {
12356
13514
  [name: string]: unknown;
12357
13515
  };
@@ -12375,30 +13533,8 @@ interface paths$1 {
12375
13533
  };
12376
13534
  };
12377
13535
  };
12378
- };
12379
- };
12380
- /**
12381
- * Revoke your dashboard signing key
12382
- * @description Revoked on the contract; your next witness adds a new one. 409 for your organization's base key (it stays) and for a key still being added.
12383
- */
12384
- delete: {
12385
- parameters: {
12386
- query?: never;
12387
- header?: never;
12388
- path?: never;
12389
- cookie?: never;
12390
- };
12391
- requestBody?: never;
12392
- responses: {
12393
- /** @description No Content */
12394
- 204: {
12395
- headers: {
12396
- [name: string]: unknown;
12397
- };
12398
- content?: never;
12399
- };
12400
- /** @description Conflict */
12401
- 409: {
13536
+ /** @description Too Many Requests */
13537
+ 429: {
12402
13538
  headers: {
12403
13539
  [name: string]: unknown;
12404
13540
  };
@@ -12424,12 +13560,13 @@ interface paths$1 {
12424
13560
  };
12425
13561
  };
12426
13562
  };
13563
+ delete?: never;
12427
13564
  options?: never;
12428
13565
  head?: never;
12429
13566
  patch?: never;
12430
13567
  trace?: never;
12431
13568
  };
12432
- "/v1/orgs/me/contract/pause": {
13569
+ "/v1/orgs/me/contract/keys/{publicKey}": {
12433
13570
  parameters: {
12434
13571
  query?: never;
12435
13572
  header?: never;
@@ -12438,15 +13575,18 @@ interface paths$1 {
12438
13575
  };
12439
13576
  get?: never;
12440
13577
  put?: never;
13578
+ post?: never;
12441
13579
  /**
12442
- * Pause witnessing
12443
- * @description Org admins, Witnium-managed contracts. Immediate and protective: no step-up. 409 owner_op_settling while another change settles.
13580
+ * Revoke a key you hold from the managed contract
13581
+ * @description Org admins; protective, no step-up. The key stops counting at once and Witnium signs the on-chain revoke (`status`); a key whose add never landed is just ended (`ended`).
12444
13582
  */
12445
- post: {
13583
+ delete: {
12446
13584
  parameters: {
12447
13585
  query?: never;
12448
13586
  header?: never;
12449
- path?: never;
13587
+ path: {
13588
+ publicKey: string;
13589
+ };
12450
13590
  cookie?: never;
12451
13591
  };
12452
13592
  requestBody?: never;
@@ -12459,12 +13599,62 @@ interface paths$1 {
12459
13599
  content: {
12460
13600
  "application/json": {
12461
13601
  /** @enum {string} */
12462
- status: "signed" | "submitted" | "confirmed" | "failed";
13602
+ status: "signed" | "submitted" | "confirmed" | "failed" | "ended";
13603
+ };
13604
+ };
13605
+ };
13606
+ /** @description Unauthorized — authentication required or invalid */
13607
+ 401: {
13608
+ headers: {
13609
+ [name: string]: unknown;
13610
+ };
13611
+ content: {
13612
+ "application/json": {
13613
+ /**
13614
+ * @description HTTP status code
13615
+ * @example 400
13616
+ */
13617
+ statusCode?: number;
13618
+ /**
13619
+ * @description Short error label
13620
+ * @example Bad Request
13621
+ */
13622
+ error?: string;
13623
+ /**
13624
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
13625
+ * @example Validation failed
13626
+ */
13627
+ message: string | string[];
13628
+ };
13629
+ };
13630
+ };
13631
+ /** @description Forbidden — insufficient permissions or scope */
13632
+ 403: {
13633
+ headers: {
13634
+ [name: string]: unknown;
13635
+ };
13636
+ content: {
13637
+ "application/json": {
13638
+ /**
13639
+ * @description HTTP status code
13640
+ * @example 400
13641
+ */
13642
+ statusCode?: number;
13643
+ /**
13644
+ * @description Short error label
13645
+ * @example Bad Request
13646
+ */
13647
+ error?: string;
13648
+ /**
13649
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
13650
+ * @example Validation failed
13651
+ */
13652
+ message: string | string[];
12463
13653
  };
12464
13654
  };
12465
13655
  };
12466
- /** @description Forbidden — insufficient permissions or scope */
12467
- 403: {
13656
+ /** @description Not Found */
13657
+ 404: {
12468
13658
  headers: {
12469
13659
  [name: string]: unknown;
12470
13660
  };
@@ -12515,30 +13705,29 @@ interface paths$1 {
12515
13705
  };
12516
13706
  };
12517
13707
  };
12518
- delete?: never;
12519
13708
  options?: never;
12520
13709
  head?: never;
12521
13710
  patch?: never;
12522
13711
  trace?: never;
12523
13712
  };
12524
- "/v1/orgs/me/contract/resume": {
13713
+ "/interaction/{uid}/details": {
12525
13714
  parameters: {
12526
13715
  query?: never;
12527
13716
  header?: never;
12528
13717
  path?: never;
12529
13718
  cookie?: never;
12530
13719
  };
12531
- get?: never;
12532
- put?: never;
12533
13720
  /**
12534
- * Resume witnessing
12535
- * @description Org admins, Witnium-managed contracts, with a step-up in the last 5 minutes. 409 owner_op_settling while another change settles.
13721
+ * What the account app shows for an interaction
13722
+ * @description Login prompt (no session needed): the client and its product branding. Consent prompt: also the requested scopes and whether consent may be given now; 401 without the provider session. 410 when the interaction is finished or expired. Needs the provider's `_interaction` cookie (path `/interaction/<uid>`), which the browser holds from /auth.
12536
13723
  */
12537
- post: {
13724
+ get: {
12538
13725
  parameters: {
12539
13726
  query?: never;
12540
13727
  header?: never;
12541
- path?: never;
13728
+ path: {
13729
+ uid: string;
13730
+ };
12542
13731
  cookie?: never;
12543
13732
  };
12544
13733
  requestBody?: never;
@@ -12550,38 +13739,64 @@ interface paths$1 {
12550
13739
  };
12551
13740
  content: {
12552
13741
  "application/json": {
13742
+ uid: string;
12553
13743
  /** @enum {string} */
12554
- status: "signed" | "submitted" | "confirmed" | "failed";
12555
- };
12556
- };
12557
- };
12558
- /** @description Forbidden — insufficient permissions or scope */
12559
- 403: {
12560
- headers: {
12561
- [name: string]: unknown;
12562
- };
12563
- content: {
12564
- "application/json": {
13744
+ prompt: "login" | "consent";
13745
+ client: {
13746
+ id: string;
13747
+ name: string;
13748
+ /**
13749
+ * ProductSummary
13750
+ * @description The product the app belongs to, for branding; null shows neutral Witnium.
13751
+ */
13752
+ product: {
13753
+ /** @description Product slug, e.g. `chain` or `vault`. */
13754
+ id: string;
13755
+ name: string;
13756
+ /** ProductBranding */
13757
+ branding: {
13758
+ /** @description Product name shown on sign-in and consent pages. */
13759
+ name: string;
13760
+ /** @description Absolute path of the logo on the account app origin; null shows the name only. */
13761
+ logoUrl: string | null;
13762
+ /** @description `#rrggbb` colors: `primary` for buttons, `accent` for links. */
13763
+ colors: {
13764
+ primary: string;
13765
+ accent: string;
13766
+ };
13767
+ };
13768
+ } | null;
13769
+ firstParty: boolean;
13770
+ };
13771
+ /** @description Consent prompt only: the requested scopes the provider serves. */
13772
+ scopes?: {
13773
+ name: string;
13774
+ description: string;
13775
+ }[];
13776
+ /** @description Consent prompt only: the requested resource indicator(s) (RFC 8707), space-separated when several. */
13777
+ resource?: string;
12565
13778
  /**
12566
- * @description HTTP status code
12567
- * @example 400
13779
+ * @description `ready`: consent may be given now (always `ready` for a `login` prompt). `provisioning`: the org's contract, or this connection's signing key, is still being set up; poll this route (every 2 to 3 seconds) and post /confirm again once it is `ready`. `no_contract`: the org has no contract yet; set one up in the product first. `refused`: consent cannot be given; `refusal` says why.
13780
+ * @enum {string}
12568
13781
  */
12569
- statusCode?: number;
13782
+ state: "ready" | "provisioning" | "no_contract" | "refused";
12570
13783
  /**
12571
- * @description Short error label
12572
- * @example Bad Request
13784
+ * @description Present when `state` is `refused`.
13785
+ * @enum {string}
12573
13786
  */
12574
- error?: string;
13787
+ refusal?: "self_custody" | "suspended" | "not_home" | "connection_ended" | "key_add_failed" | "contract_busy" | "key_rate_limited";
12575
13788
  /**
12576
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12577
- * @example Validation failed
13789
+ * @description Login prompt only: the app asked for a fresh authentication (prompt=login, max_age) and the browser has an older session. Ask `email` to sign in again; the cookie alone does not finish this login.
13790
+ * @enum {boolean}
12578
13791
  */
12579
- message: string | string[];
13792
+ reauth?: true;
13793
+ /** @description With `reauth`: the account of the current session. */
13794
+ email?: string;
12580
13795
  };
12581
13796
  };
12582
13797
  };
12583
- /** @description Conflict */
12584
- 409: {
13798
+ /** @description Bad Request — validation failed */
13799
+ 400: {
12585
13800
  headers: {
12586
13801
  [name: string]: unknown;
12587
13802
  };
@@ -12605,8 +13820,8 @@ interface paths$1 {
12605
13820
  };
12606
13821
  };
12607
13822
  };
12608
- /** @description Too Many Requests */
12609
- 429: {
13823
+ /** @description Unauthorized — authentication required or invalid */
13824
+ 401: {
12610
13825
  headers: {
12611
13826
  [name: string]: unknown;
12612
13827
  };
@@ -12630,70 +13845,8 @@ interface paths$1 {
12630
13845
  };
12631
13846
  };
12632
13847
  };
12633
- };
12634
- };
12635
- delete?: never;
12636
- options?: never;
12637
- head?: never;
12638
- patch?: never;
12639
- trace?: never;
12640
- };
12641
- "/v1/orgs/me/owner-operations": {
12642
- parameters: {
12643
- query?: never;
12644
- header?: never;
12645
- path?: never;
12646
- cookie?: never;
12647
- };
12648
- /**
12649
- * Your organization's contract activity
12650
- * @description The latest owner operations on the contract, newest first: keys added and revoked, pause and resume. Any active member.
12651
- */
12652
- get: {
12653
- parameters: {
12654
- query?: {
12655
- limit?: number;
12656
- };
12657
- header?: never;
12658
- path?: never;
12659
- cookie?: never;
12660
- };
12661
- requestBody?: never;
12662
- responses: {
12663
- /** @description Success */
12664
- 200: {
12665
- headers: {
12666
- [name: string]: unknown;
12667
- };
12668
- content: {
12669
- "application/json": {
12670
- operations: {
12671
- /**
12672
- * @description UUID v4
12673
- * @example 550e8400-e29b-41d4-a716-446655440000
12674
- */
12675
- id: string;
12676
- /** @enum {string} */
12677
- op: "add-signing-key" | "revoke-signing-key" | "pause" | "unpause";
12678
- /** @enum {string} */
12679
- status: "signed" | "submitted" | "confirmed" | "failed";
12680
- /** @enum {string} */
12681
- source: "connection" | "api-key" | "member-key" | "admin" | "operator";
12682
- /** @description The API key's label or the member's email, when known. */
12683
- label: string | null;
12684
- /**
12685
- * Format: date-time
12686
- * @description ISO 8601 date-time string
12687
- * @example 2026-05-20T10:30:00.000Z
12688
- */
12689
- createdAt: string;
12690
- txHash: string | null;
12691
- }[];
12692
- };
12693
- };
12694
- };
12695
- /** @description Forbidden — insufficient permissions or scope */
12696
- 403: {
13848
+ /** @description Gone */
13849
+ 410: {
12697
13850
  headers: {
12698
13851
  [name: string]: unknown;
12699
13852
  };
@@ -12727,7 +13880,7 @@ interface paths$1 {
12727
13880
  patch?: never;
12728
13881
  trace?: never;
12729
13882
  };
12730
- "/v1/orgs/me/contract/keys": {
13883
+ "/interaction/{uid}/confirm": {
12731
13884
  parameters: {
12732
13885
  query?: never;
12733
13886
  header?: never;
@@ -12737,29 +13890,19 @@ interface paths$1 {
12737
13890
  get?: never;
12738
13891
  put?: never;
12739
13892
  /**
12740
- * Add a key you hold to the managed contract
12741
- * @description Plan §17.7. Org admins, after a step-up. Witnium signs the add with the managed owner key; the key counts once the op confirms (`status`), and the admins are emailed. 409 owner_op_settling while another change settles.
13893
+ * Give consent
13894
+ * @description Saves the grant, and for a `sign:write` connection creates its signing key and adds it on chain. 200: finished, navigate to `redirectTo`. 202: still being set up; poll /details and post again when it is `ready` (a repeated post never adds a second grant or key). 409: consent cannot be given. Allowed Origin only. Needs the provider's `_interaction` cookie (path `/interaction/<uid>`), which the browser holds from /auth.
12742
13895
  */
12743
13896
  post: {
12744
13897
  parameters: {
12745
13898
  query?: never;
12746
13899
  header?: never;
12747
- path?: never;
12748
- cookie?: never;
12749
- };
12750
- requestBody?: {
12751
- content: {
12752
- "application/json": {
12753
- /**
12754
- * @description A key you hold (your SDK, your own systems). Witnium never sees its private key.
12755
- * @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
12756
- */
12757
- publicKey: string;
12758
- /** @description A name for the key, e.g. "ingest server". */
12759
- label: string;
12760
- };
13900
+ path: {
13901
+ uid: string;
12761
13902
  };
13903
+ cookie?: never;
12762
13904
  };
13905
+ requestBody?: never;
12763
13906
  responses: {
12764
13907
  /** @description Success */
12765
13908
  200: {
@@ -12768,38 +13911,28 @@ interface paths$1 {
12768
13911
  };
12769
13912
  content: {
12770
13913
  "application/json": {
12771
- /** @enum {string} */
12772
- status: "signed" | "submitted" | "confirmed" | "failed";
13914
+ /**
13915
+ * Format: uri
13916
+ * @description Navigate the browser here (the provider's resume).
13917
+ */
13918
+ redirectTo: string;
12773
13919
  };
12774
13920
  };
12775
13921
  };
12776
- /** @description Bad Request — validation failed */
12777
- 400: {
13922
+ /** @description Accepted */
13923
+ 202: {
12778
13924
  headers: {
12779
13925
  [name: string]: unknown;
12780
13926
  };
12781
13927
  content: {
12782
13928
  "application/json": {
12783
- /**
12784
- * @description HTTP status code
12785
- * @example 400
12786
- */
12787
- statusCode?: number;
12788
- /**
12789
- * @description Short error label
12790
- * @example Bad Request
12791
- */
12792
- error?: string;
12793
- /**
12794
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12795
- * @example Validation failed
12796
- */
12797
- message: string | string[];
13929
+ /** @enum {string} */
13930
+ state: "provisioning";
12798
13931
  };
12799
13932
  };
12800
13933
  };
12801
- /** @description Unauthorized — authentication required or invalid */
12802
- 401: {
13934
+ /** @description Bad Request — validation failed */
13935
+ 400: {
12803
13936
  headers: {
12804
13937
  [name: string]: unknown;
12805
13938
  };
@@ -12855,26 +13988,23 @@ interface paths$1 {
12855
13988
  };
12856
13989
  content: {
12857
13990
  "application/json": {
13991
+ /** @enum {number} */
13992
+ statusCode: 409;
13993
+ /** @enum {string} */
13994
+ error: "consent_unavailable";
13995
+ message: string;
13996
+ /** @enum {string} */
13997
+ state: "no_contract" | "refused";
12858
13998
  /**
12859
- * @description HTTP status code
12860
- * @example 400
12861
- */
12862
- statusCode?: number;
12863
- /**
12864
- * @description Short error label
12865
- * @example Bad Request
12866
- */
12867
- error?: string;
12868
- /**
12869
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12870
- * @example Validation failed
13999
+ * @description `self_custody`: the app signs witnesses, and the org holds its own keys. `suspended`: the membership is suspended. `not_home`: a signing app can only connect for your own organization. `connection_ended`: the connection was ended while it was being set up. `key_add_failed`: adding the signing key to the contract failed. `contract_busy`: another change to the contract was still settling. `key_rate_limited`: the contract's daily key-change budget is used up. Except for the first three, start connecting again from the app.
14000
+ * @enum {string}
12871
14001
  */
12872
- message: string | string[];
14002
+ refusal?: "self_custody" | "suspended" | "not_home" | "connection_ended" | "key_add_failed" | "contract_busy" | "key_rate_limited";
12873
14003
  };
12874
14004
  };
12875
14005
  };
12876
- /** @description Too Many Requests */
12877
- 429: {
14006
+ /** @description Gone */
14007
+ 410: {
12878
14008
  headers: {
12879
14009
  [name: string]: unknown;
12880
14010
  };
@@ -12906,7 +14036,7 @@ interface paths$1 {
12906
14036
  patch?: never;
12907
14037
  trace?: never;
12908
14038
  };
12909
- "/v1/orgs/me/contract/keys/{publicKey}": {
14039
+ "/interaction/{uid}/abort": {
12910
14040
  parameters: {
12911
14041
  query?: never;
12912
14042
  header?: never;
@@ -12915,17 +14045,16 @@ interface paths$1 {
12915
14045
  };
12916
14046
  get?: never;
12917
14047
  put?: never;
12918
- post?: never;
12919
14048
  /**
12920
- * Revoke a key you hold from the managed contract
12921
- * @description Org admins; protective, no step-up. The key stops counting at once and Witnium signs the on-chain revoke (`status`); a key whose add never landed is just ended (`ended`).
14049
+ * Deny
14050
+ * @description Finishes the interaction with `access_denied` (and ends a signing key it was adding). Navigate to `redirectTo`. Allowed Origin only. Needs the provider's `_interaction` cookie (path `/interaction/<uid>`), which the browser holds from /auth.
12922
14051
  */
12923
- delete: {
14052
+ post: {
12924
14053
  parameters: {
12925
14054
  query?: never;
12926
14055
  header?: never;
12927
14056
  path: {
12928
- publicKey: string;
14057
+ uid: string;
12929
14058
  };
12930
14059
  cookie?: never;
12931
14060
  };
@@ -12938,38 +14067,16 @@ interface paths$1 {
12938
14067
  };
12939
14068
  content: {
12940
14069
  "application/json": {
12941
- /** @enum {string} */
12942
- status: "signed" | "submitted" | "confirmed" | "failed" | "ended";
12943
- };
12944
- };
12945
- };
12946
- /** @description Unauthorized — authentication required or invalid */
12947
- 401: {
12948
- headers: {
12949
- [name: string]: unknown;
12950
- };
12951
- content: {
12952
- "application/json": {
12953
- /**
12954
- * @description HTTP status code
12955
- * @example 400
12956
- */
12957
- statusCode?: number;
12958
- /**
12959
- * @description Short error label
12960
- * @example Bad Request
12961
- */
12962
- error?: string;
12963
14070
  /**
12964
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
12965
- * @example Validation failed
14071
+ * Format: uri
14072
+ * @description Navigate the browser here (the provider's resume).
12966
14073
  */
12967
- message: string | string[];
14074
+ redirectTo: string;
12968
14075
  };
12969
14076
  };
12970
14077
  };
12971
- /** @description Forbidden — insufficient permissions or scope */
12972
- 403: {
14078
+ /** @description Bad Request — validation failed */
14079
+ 400: {
12973
14080
  headers: {
12974
14081
  [name: string]: unknown;
12975
14082
  };
@@ -12993,8 +14100,8 @@ interface paths$1 {
12993
14100
  };
12994
14101
  };
12995
14102
  };
12996
- /** @description Not Found */
12997
- 404: {
14103
+ /** @description Forbidden — insufficient permissions or scope */
14104
+ 403: {
12998
14105
  headers: {
12999
14106
  [name: string]: unknown;
13000
14107
  };
@@ -13018,8 +14125,8 @@ interface paths$1 {
13018
14125
  };
13019
14126
  };
13020
14127
  };
13021
- /** @description Conflict */
13022
- 409: {
14128
+ /** @description Gone */
14129
+ 410: {
13023
14130
  headers: {
13024
14131
  [name: string]: unknown;
13025
14132
  };
@@ -13045,6 +14152,7 @@ interface paths$1 {
13045
14152
  };
13046
14153
  };
13047
14154
  };
14155
+ delete?: never;
13048
14156
  options?: never;
13049
14157
  head?: never;
13050
14158
  patch?: never;
@@ -16122,6 +17230,28 @@ interface BeginOAuthLoginArgs {
16122
17230
  * SSO (returns `login_required` if not possible). Default: unset.
16123
17231
  */
16124
17232
  prompt?: 'login' | 'none';
17233
+ /**
17234
+ * OIDC `max_age` in seconds: the authorization server re-authenticates the
17235
+ * user when their last authentication is older. `0` forces a fresh sign-in,
17236
+ * the step-up before a sensitive action; the issued tokens then carry a
17237
+ * fresh `auth_time`. A non-negative integer.
17238
+ */
17239
+ maxAge?: number;
17240
+ }
17241
+ /** Arguments to {@link WitniumchainClient.beginOAuthLogout}. */
17242
+ interface BeginOAuthLogoutArgs {
17243
+ /**
17244
+ * Where the authorization server sends the browser after ending its
17245
+ * session. Must exactly match one of the client's registered
17246
+ * `post_logout_redirect_uris`.
17247
+ */
17248
+ postLogoutRedirectUri: string;
17249
+ /** Optional opaque value the authorization server hands back on that redirect. */
17250
+ state?: string;
17251
+ }
17252
+ interface BeginOAuthLogoutResult {
17253
+ /** The end-session URL. The caller does `window.location.assign(...)`. */
17254
+ logoutUrl: string;
16125
17255
  }
16126
17256
  interface BeginOAuthLoginResult {
16127
17257
  /** URL to redirect the user to. The caller does `window.location.assign(...)`. */
@@ -16140,7 +17270,13 @@ interface OAuthTokenSnapshot {
16140
17270
  expiresAt: number;
16141
17271
  }
16142
17272
  type AuthMode = 'SessionCookie'
16143
- /** Accounts routes that take a session or a scoped bearer token (plan §18.4): the token when the client has one, else the cookie. */
17273
+ /**
17274
+ * Accounts routes that take a session or a scoped bearer token (plan §18.4):
17275
+ * the OAuth access token when the client holds one (an OAuth client such as
17276
+ * the CLI or the dashboard), else the cookie session (the account app). A
17277
+ * token minted from the cookie session (`exchangeSessionForToken`) does not
17278
+ * count: a cookie client stays on its cookie for these routes.
17279
+ */
16144
17280
  | 'SessionOrBearer' | 'BearerJWT' | 'ApiKey' | 'SignedRequest' | 'Public';
16145
17281
  interface RequestOpts {
16146
17282
  body?: unknown;
@@ -16169,6 +17305,7 @@ declare class WitniumchainClient {
16169
17305
  private readonly fetchImpl;
16170
17306
  private accessToken;
16171
17307
  private refreshToken;
17308
+ private idToken;
16172
17309
  private hasRefreshCookie;
16173
17310
  private readonly oauthClientId;
16174
17311
  private readonly verifierStorage;
@@ -16541,6 +17678,20 @@ declare class WitniumchainClient {
16541
17678
  * dropped — which it is, here.
16542
17679
  */
16543
17680
  signOut(): void;
17681
+ /**
17682
+ * End the session at the authorization server (OIDC RP-Initiated Logout).
17683
+ *
17684
+ * Builds the `end_session_endpoint` URL with `id_token_hint` (the ID token
17685
+ * from {@link completeOAuthLogin}), `client_id` and
17686
+ * `post_logout_redirect_uri`, then forgets every in-memory credential like
17687
+ * {@link signOut}. The caller does the redirect
17688
+ * (`window.location.assign(result.logoutUrl)`).
17689
+ *
17690
+ * Throws when no `oauthClientId` is configured, when this client holds no
17691
+ * ID token (the login was not completed here, or it did not ask for
17692
+ * `openid`), or when the discovery document has no `end_session_endpoint`.
17693
+ */
17694
+ beginOAuthLogout(args: BeginOAuthLogoutArgs): Promise<BeginOAuthLogoutResult>;
16544
17695
  private verifierStorageOrDefault;
16545
17696
  private fetchDiscovery;
16546
17697
  private postTokenEndpoint;
@@ -17135,4 +18286,4 @@ declare const ownerKeyFile: {
17135
18286
  sign: typeof signWithOwnerKeyFile;
17136
18287
  };
17137
18288
 
17138
- export { type AcceptInviteResponse, type AccountContractStatusResponse, type AccountResponse, AccountSecurity, type AccountSecurityResponse, type paths$1 as AccountsPaths, type AddContractKeyRequest, type AddPasswordTotpResponse, type AddSigningKeyRequest$1 as AddSigningKeyRequest, type AddSigningKeyResponse, type ApiKeySelfResponse, type ApproveSigningKeyRequest, type BeginOAuthLoginArgs, type BeginOAuthLoginResult, type paths as ChainPaths, type CheckoutRequest, type CheckoutResponse, type ChooseCustodyRequest, type ChooseCustodyResponse, type ContractActivityResponse, type ContractOwnerOpResponse, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateOrgRequest, type CreateOrgResponse, DashboardKey, type DashboardKeyResponse, DelegatedKeys, type DeploySelfCustodyRequest, type DeploySelfCustodyResponse, Enrollment, type EnrollmentCompleteResponse, type EnrollmentStateResponse, type FinalizeWitnessResponse, type ForgotPasswordRequest, type ForgotPasswordResponse, type GetWitnessResponse, type HealthLiveResponse, type HealthReadyResponse, type InviteMemberRequest, type InviteMemberResponse, type LedgerResponse, type ListApiKeysResponse, type ListDelegatedKeysResponse, type ListOauthSessionsResponse, type LoginRequest, type LoginResponse, type LogoutResponse, type MembersListResponse, type MessageResponse, type MfaProofRequest, type OAuthTokenSnapshot, OWNER_KEY_FILE_FORMAT, OWNER_OP, OauthNamespace, OauthSessions, OrgApiKeys, OrgContract, OrgMembers, Organization, type OwnerKeyFile, type OwnerOpName, type OwnerSigner, type PauseRequest$1 as PauseRequest, type PauseResponse, type PkceVerifierStorage, type PortalResponse, type PrepareDelegatedKeyRequest, type PreparedDelegatedKeyResponse, type ProposeWitnessRequest, type ProposeWitnessResponse, type ProposeWitnessV5Created, type ProposeWitnessV5Existing, type ProposeWitnessV5LegacyRequest, type ProposeWitnessV5LegacyResponse, type ProposeWitnessV5Request, type ProposeWitnessV5Result, type ProvisionContractRequest, type ProvisionContractResponse, type ProvisionDelegatedKeyArgs, type ProvisionDelegatedKeyResult, Recovery, type RecoveryCodesResponse, type RecoveryStatusResponse, type ReissueProvisioningTokenResponse, type RemoveContractKeyResponse, type RemoveMemberResponse, type RenameOrgRequest, type RenameOrgResponse, type ResendInviteResponse, type ResetAccountResponse, type ResetPasswordRequest, type ResetPasswordResponse, type RevokeDelegatedKeyResponse, type RevokeSigningKeyRequest$1 as RevokeSigningKeyRequest, type RevokeSigningKeyResponse, type RevokeWitnessRequest, type RevokeWitnessResponse, type SessionStartedResponse, type SetMemberRoleRequest, type SetMemberRoleResponse, type SignRequest, type SignResponse, type SignWitnessRequest, type SignWitnessResponse, type SignedRequestSigner, type SigningKeyRequestCreate, type SigningKeyRequestView, type SigningKeyRequestsResponse, type SigningKeyView, SigningKeys, type SigningKeysResponse, type SignupRequest, type SignupResponse, type StepUpProof, type SubmitDelegatedKeyRequest, type SubmitDelegatedKeyResponse, Subscriptions, type SuspendMemberResponse, type TotpSetupResponse, type UnpauseRequest, type UnpauseResponse, type VerifySignupRequest, type VerifySignupResponse, type WitnessIntentRecoveryV5, WitnessProposeError, type WitnessScopeConflictCode, WitnessScopeConflictError, WitniumchainApiError, WitniumchainApiKeyClient, type WitniumchainApiKeyClientConfig, WitniumchainChainAdminClient, type WitniumchainChainAdminClientConfig, WitniumchainClient, type WitniumchainClientConfig, buildAddSigningKeyPayload, buildPausePayload, buildRevokeSigningKeyPayload, buildUnpausePayload, defaultVerifierStorage, generateOwnerKeyFile, ownerKeyFile, ownerKeyFileName, parseOwnerKeyFile, randomWitnessScope, serializeOwnerKeyFile, signWithOwnerKeyFile, witnessScopeFor };
18289
+ export { type AcceptInviteResponse, type AccountContractStatusResponse, type AccountResponse, AccountSecurity, type AccountSecurityResponse, type paths$1 as AccountsPaths, type AddContractKeyRequest, type AddPasswordTotpResponse, type AddSigningKeyRequest$1 as AddSigningKeyRequest, type AddSigningKeyResponse, type ApiKeySelfResponse, type ApproveSigningKeyRequest, type BeginOAuthLoginArgs, type BeginOAuthLoginResult, type BeginOAuthLogoutArgs, type BeginOAuthLogoutResult, type paths as ChainPaths, type CheckoutRequest, type CheckoutResponse, type ChooseCustodyRequest, type ChooseCustodyResponse, type ContractActivityResponse, type ContractOwnerOpResponse, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateOrgRequest, type CreateOrgResponse, DashboardKey, type DashboardKeyResponse, DelegatedKeys, type DeploySelfCustodyRequest, type DeploySelfCustodyResponse, Enrollment, type EnrollmentCompleteResponse, type EnrollmentStateResponse, type FinalizeWitnessResponse, type ForgotPasswordRequest, type ForgotPasswordResponse, type GetWitnessResponse, type HealthLiveResponse, type HealthReadyResponse, type InviteMemberRequest, type InviteMemberResponse, type LedgerResponse, type ListApiKeysResponse, type ListDelegatedKeysResponse, type ListOauthSessionsResponse, type LoginRequest, type LoginResponse, type LogoutResponse, type MembersListResponse, type MessageResponse, type MfaProofRequest, type OAuthTokenSnapshot, OWNER_KEY_FILE_FORMAT, OWNER_OP, OauthNamespace, OauthSessions, OrgApiKeys, OrgContract, OrgMembers, Organization, type OwnerKeyFile, type OwnerOpName, type OwnerSigner, type PauseRequest$1 as PauseRequest, type PauseResponse, type PkceVerifierStorage, type PortalResponse, type PrepareDelegatedKeyRequest, type PreparedDelegatedKeyResponse, type ProposeWitnessRequest, type ProposeWitnessResponse, type ProposeWitnessV5Created, type ProposeWitnessV5Existing, type ProposeWitnessV5LegacyRequest, type ProposeWitnessV5LegacyResponse, type ProposeWitnessV5Request, type ProposeWitnessV5Result, type ProvisionContractRequest, type ProvisionContractResponse, type ProvisionDelegatedKeyArgs, type ProvisionDelegatedKeyResult, Recovery, type RecoveryCodesResponse, type RecoveryStatusResponse, type ReissueProvisioningTokenResponse, type RemoveContractKeyResponse, type RemoveMemberResponse, type RenameOrgRequest, type RenameOrgResponse, type ResendInviteResponse, type ResetAccountResponse, type ResetPasswordRequest, type ResetPasswordResponse, type RevokeDelegatedKeyResponse, type RevokeSigningKeyRequest$1 as RevokeSigningKeyRequest, type RevokeSigningKeyResponse, type RevokeWitnessRequest, type RevokeWitnessResponse, type SessionStartedResponse, type SetMemberRoleRequest, type SetMemberRoleResponse, type SignRequest, type SignResponse, type SignWitnessRequest, type SignWitnessResponse, type SignedRequestSigner, type SigningKeyRequestCreate, type SigningKeyRequestView, type SigningKeyRequestsResponse, type SigningKeyView, SigningKeys, type SigningKeysResponse, type SignupRequest, type SignupResponse, type StepUpProof, type SubmitDelegatedKeyRequest, type SubmitDelegatedKeyResponse, Subscriptions, type SuspendMemberResponse, type TotpSetupResponse, type UnpauseRequest, type UnpauseResponse, type VerifySignupRequest, type VerifySignupResponse, type WitnessIntentRecoveryV5, WitnessProposeError, type WitnessScopeConflictCode, WitnessScopeConflictError, WitniumchainApiError, WitniumchainApiKeyClient, type WitniumchainApiKeyClientConfig, WitniumchainChainAdminClient, type WitniumchainChainAdminClientConfig, WitniumchainClient, type WitniumchainClientConfig, buildAddSigningKeyPayload, buildPausePayload, buildRevokeSigningKeyPayload, buildUnpausePayload, defaultVerifierStorage, generateOwnerKeyFile, ownerKeyFile, ownerKeyFileName, parseOwnerKeyFile, randomWitnessScope, serializeOwnerKeyFile, signWithOwnerKeyFile, witnessScopeFor };