@witnium/witniumchain 0.26.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/README.md +104 -6
- package/dist/index.d.mts +1678 -333
- package/dist/index.d.ts +1678 -333
- package/dist/index.js +198 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +195 -49
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
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;
|
|
@@ -6533,7 +6795,7 @@ interface paths$1 {
|
|
|
6533
6795
|
put?: never;
|
|
6534
6796
|
/**
|
|
6535
6797
|
* Propose a v5 witness (metered)
|
|
6536
|
-
* @description
|
|
6798
|
+
* @description Proposes the witness of `dataId` in the witness `scope`. Auth is an OAuth Bearer token (the URL contract must be the user's) or an org API key (its organization's active contract). 120 proposes per minute per caller. A scope holds at most one witness per dataId, ever. When it already holds it, the answer is 200 with that witness and `outcome: "existing"`, and nothing is charged. Otherwise one credit is reserved and the answer is 201, an intent to sign and finalize, `outcome: "created"`; a retry while it is in flight gets the same intent, and a failed, cancelled or expired attempt frees the scope. The same scope and dataId with another `userTimestamp`, `revealAfter` or `drandRound` is a 409 (`tlockCiphertext` is not compared: tlock encryption is randomized). Deprecated for one release: no `scope` and an `Idempotency-Key` header instead (per-caller key, no `outcome`).
|
|
6537
6799
|
*/
|
|
6538
6800
|
post: {
|
|
6539
6801
|
parameters: {
|
|
@@ -6547,6 +6809,8 @@ interface paths$1 {
|
|
|
6547
6809
|
requestBody?: {
|
|
6548
6810
|
content: {
|
|
6549
6811
|
"application/json": {
|
|
6812
|
+
/** @description The witness scope: the SHA-256 of a key you choose, as 64 hex characters (case-insensitive). A scope holds at most one witness per dataId, ever, shared by every caller on the contract. Hash a date for "once per day", a project id for "once per project", a record id for a pipeline, or 32 random bytes for a new witness. Same scope and dataId: the same witness (`outcome: "existing"`, not charged). Required; for one release a propose without it may still send the deprecated `Idempotency-Key` header instead. */
|
|
6813
|
+
scope?: string;
|
|
6550
6814
|
/** @description Content hash being witnessed. */
|
|
6551
6815
|
dataId: string;
|
|
6552
6816
|
/** @description Ed25519 public keys whose signatures must be collected before finalize. */
|
|
@@ -6567,15 +6831,40 @@ interface paths$1 {
|
|
|
6567
6831
|
};
|
|
6568
6832
|
};
|
|
6569
6833
|
responses: {
|
|
6570
|
-
/** @description
|
|
6571
|
-
|
|
6834
|
+
/** @description Success */
|
|
6835
|
+
200: {
|
|
6572
6836
|
headers: {
|
|
6573
6837
|
[name: string]: unknown;
|
|
6574
6838
|
};
|
|
6575
6839
|
content: {
|
|
6576
6840
|
"application/json": {
|
|
6577
6841
|
/**
|
|
6578
|
-
*
|
|
6842
|
+
* @description The scope already holds the witness for this dataId: this call created nothing and charged nothing.
|
|
6843
|
+
* @enum {string}
|
|
6844
|
+
*/
|
|
6845
|
+
outcome: "existing";
|
|
6846
|
+
/**
|
|
6847
|
+
* Format: uuid
|
|
6848
|
+
* @description UUID minted at propose time. Identifies the in-flight v5 witness intent until finalize; once finalized, the intent maps to an on-chain witnessId returned in the finalize response.
|
|
6849
|
+
*/
|
|
6850
|
+
intentId: string;
|
|
6851
|
+
/** @description 32-byte hash, lower-case hex without 0x prefix. */
|
|
6852
|
+
witnessId: string;
|
|
6853
|
+
blockNumber: number;
|
|
6854
|
+
/** @description Block timestamp of the block that created the witness (unix seconds): when it was made. */
|
|
6855
|
+
chainTimestamp: number;
|
|
6856
|
+
};
|
|
6857
|
+
};
|
|
6858
|
+
};
|
|
6859
|
+
/** @description Created */
|
|
6860
|
+
201: {
|
|
6861
|
+
headers: {
|
|
6862
|
+
[name: string]: unknown;
|
|
6863
|
+
};
|
|
6864
|
+
content: {
|
|
6865
|
+
"application/json": {
|
|
6866
|
+
/**
|
|
6867
|
+
* Format: uuid
|
|
6579
6868
|
* @description UUID minted at propose time. Identifies the in-flight v5 witness intent until finalize; once finalized, the intent maps to an on-chain witnessId returned in the finalize response.
|
|
6580
6869
|
*/
|
|
6581
6870
|
intentId: string;
|
|
@@ -6586,6 +6875,11 @@ interface paths$1 {
|
|
|
6586
6875
|
/** @description Prepare-record TTL on chain-api. Sign + finalize within this window. */
|
|
6587
6876
|
expiresInSeconds: number;
|
|
6588
6877
|
requiredSigners: string[];
|
|
6878
|
+
/**
|
|
6879
|
+
* @description Set on a scoped propose: this intent creates the witness in the scope (sign and finalize it). A retry while the intent is in flight gets the same intent. Absent on the deprecated Idempotency-Key path.
|
|
6880
|
+
* @enum {string}
|
|
6881
|
+
*/
|
|
6882
|
+
outcome?: "created";
|
|
6589
6883
|
};
|
|
6590
6884
|
};
|
|
6591
6885
|
};
|
|
@@ -6689,6 +6983,41 @@ interface paths$1 {
|
|
|
6689
6983
|
};
|
|
6690
6984
|
};
|
|
6691
6985
|
};
|
|
6986
|
+
/** @description Conflict */
|
|
6987
|
+
409: {
|
|
6988
|
+
headers: {
|
|
6989
|
+
[name: string]: unknown;
|
|
6990
|
+
};
|
|
6991
|
+
content: {
|
|
6992
|
+
"application/json": {
|
|
6993
|
+
/**
|
|
6994
|
+
* @description `scope_details_mismatch`: the scope holds (or is creating) the witness for this dataId with another userTimestamp, revealAfter or drandRound (v5). `scope_in_progress`: an attempt this request cannot join is in flight in the scope (another caller, or your own with another body); retry later. `scope_registry_mismatch`: proposed on another registry version.
|
|
6995
|
+
* @enum {string}
|
|
6996
|
+
*/
|
|
6997
|
+
code: "scope_details_mismatch" | "scope_in_progress" | "scope_registry_mismatch";
|
|
6998
|
+
message: string;
|
|
6999
|
+
scope: string;
|
|
7000
|
+
/** @description The witness already in the scope (`scope_details_mismatch` once it is mined). */
|
|
7001
|
+
witnessId?: string;
|
|
7002
|
+
} | {
|
|
7003
|
+
/**
|
|
7004
|
+
* @description HTTP status code
|
|
7005
|
+
* @example 400
|
|
7006
|
+
*/
|
|
7007
|
+
statusCode?: number;
|
|
7008
|
+
/**
|
|
7009
|
+
* @description Short error label
|
|
7010
|
+
* @example Bad Request
|
|
7011
|
+
*/
|
|
7012
|
+
error?: string;
|
|
7013
|
+
/**
|
|
7014
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
7015
|
+
* @example Validation failed
|
|
7016
|
+
*/
|
|
7017
|
+
message: string | string[];
|
|
7018
|
+
};
|
|
7019
|
+
};
|
|
7020
|
+
};
|
|
6692
7021
|
/** @description Too Many Requests */
|
|
6693
7022
|
429: {
|
|
6694
7023
|
headers: {
|
|
@@ -7984,6 +8313,11 @@ interface paths$1 {
|
|
|
7984
8313
|
};
|
|
7985
8314
|
content: {
|
|
7986
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";
|
|
7987
8321
|
/** AccountUser */
|
|
7988
8322
|
user: {
|
|
7989
8323
|
/**
|
|
@@ -9083,7 +9417,7 @@ interface paths$1 {
|
|
|
9083
9417
|
"application/json": {
|
|
9084
9418
|
email: string;
|
|
9085
9419
|
/** @enum {string} */
|
|
9086
|
-
purpose: "signup" | "recovery" | "recovery_code";
|
|
9420
|
+
purpose: "signup" | "recovery" | "recovery_code" | "reenroll";
|
|
9087
9421
|
/** @description OAuth interaction to return to (`/interaction/:uid`) once the account is set up. */
|
|
9088
9422
|
interaction: string | null;
|
|
9089
9423
|
/** @description An account from before D16 with an authenticator app: prove a current code first. */
|
|
@@ -11528,60 +11862,20 @@ interface paths$1 {
|
|
|
11528
11862
|
patch?: never;
|
|
11529
11863
|
trace?: never;
|
|
11530
11864
|
};
|
|
11531
|
-
"/
|
|
11865
|
+
"/v1/auth/reauth/passkey/options": {
|
|
11532
11866
|
parameters: {
|
|
11533
11867
|
query?: never;
|
|
11534
11868
|
header?: never;
|
|
11535
11869
|
path?: never;
|
|
11536
11870
|
cookie?: never;
|
|
11537
11871
|
};
|
|
11538
|
-
|
|
11539
|
-
* Liveness probe
|
|
11540
|
-
* @description Returns 200/`{status:"ok"}` whenever the process is running. Used by Kubernetes to decide whether to restart the pod.
|
|
11541
|
-
*/
|
|
11542
|
-
get: {
|
|
11543
|
-
parameters: {
|
|
11544
|
-
query?: never;
|
|
11545
|
-
header?: never;
|
|
11546
|
-
path?: never;
|
|
11547
|
-
cookie?: never;
|
|
11548
|
-
};
|
|
11549
|
-
requestBody?: never;
|
|
11550
|
-
responses: {
|
|
11551
|
-
/** @description Success */
|
|
11552
|
-
200: {
|
|
11553
|
-
headers: {
|
|
11554
|
-
[name: string]: unknown;
|
|
11555
|
-
};
|
|
11556
|
-
content: {
|
|
11557
|
-
"application/json": {
|
|
11558
|
-
/** @enum {string} */
|
|
11559
|
-
status: "ok";
|
|
11560
|
-
};
|
|
11561
|
-
};
|
|
11562
|
-
};
|
|
11563
|
-
};
|
|
11564
|
-
};
|
|
11872
|
+
get?: never;
|
|
11565
11873
|
put?: never;
|
|
11566
|
-
post?: never;
|
|
11567
|
-
delete?: never;
|
|
11568
|
-
options?: never;
|
|
11569
|
-
head?: never;
|
|
11570
|
-
patch?: never;
|
|
11571
|
-
trace?: never;
|
|
11572
|
-
};
|
|
11573
|
-
"/health/ready": {
|
|
11574
|
-
parameters: {
|
|
11575
|
-
query?: never;
|
|
11576
|
-
header?: never;
|
|
11577
|
-
path?: never;
|
|
11578
|
-
cookie?: never;
|
|
11579
|
-
};
|
|
11580
11874
|
/**
|
|
11581
|
-
*
|
|
11582
|
-
* @description
|
|
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).
|
|
11583
11877
|
*/
|
|
11584
|
-
|
|
11878
|
+
post: {
|
|
11585
11879
|
parameters: {
|
|
11586
11880
|
query?: never;
|
|
11587
11881
|
header?: never;
|
|
@@ -11596,14 +11890,11 @@ interface paths$1 {
|
|
|
11596
11890
|
[name: string]: unknown;
|
|
11597
11891
|
};
|
|
11598
11892
|
content: {
|
|
11599
|
-
"application/json":
|
|
11600
|
-
/** @enum {string} */
|
|
11601
|
-
status: "ok";
|
|
11602
|
-
};
|
|
11893
|
+
"application/json": Record<string, never>;
|
|
11603
11894
|
};
|
|
11604
11895
|
};
|
|
11605
|
-
/** @description
|
|
11606
|
-
|
|
11896
|
+
/** @description Bad Request — validation failed */
|
|
11897
|
+
400: {
|
|
11607
11898
|
headers: {
|
|
11608
11899
|
[name: string]: unknown;
|
|
11609
11900
|
};
|
|
@@ -11627,79 +11918,28 @@ interface paths$1 {
|
|
|
11627
11918
|
};
|
|
11628
11919
|
};
|
|
11629
11920
|
};
|
|
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
|
-
"/v1/orgs/me/api-keys": {
|
|
11641
|
-
parameters: {
|
|
11642
|
-
query?: never;
|
|
11643
|
-
header?: never;
|
|
11644
|
-
path?: never;
|
|
11645
|
-
cookie?: never;
|
|
11646
|
-
};
|
|
11647
|
-
/** List your organization's API keys */
|
|
11648
|
-
get: {
|
|
11649
|
-
parameters: {
|
|
11650
|
-
query?: never;
|
|
11651
|
-
header?: never;
|
|
11652
|
-
path?: never;
|
|
11653
|
-
cookie?: never;
|
|
11654
|
-
};
|
|
11655
|
-
requestBody?: never;
|
|
11656
|
-
responses: {
|
|
11657
|
-
/** @description Success */
|
|
11658
|
-
200: {
|
|
11921
|
+
/** @description Unauthorized — authentication required or invalid */
|
|
11922
|
+
401: {
|
|
11659
11923
|
headers: {
|
|
11660
11924
|
[name: string]: unknown;
|
|
11661
11925
|
};
|
|
11662
11926
|
content: {
|
|
11663
11927
|
"application/json": {
|
|
11664
|
-
|
|
11665
|
-
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
createdAt: string;
|
|
11680
|
-
/** @description The creator's email; null once that account is deleted. */
|
|
11681
|
-
createdBy: string | null;
|
|
11682
|
-
/**
|
|
11683
|
-
* @description `activating` until its signing key is confirmed on the contract (seconds); then `active`.
|
|
11684
|
-
* @enum {string}
|
|
11685
|
-
*/
|
|
11686
|
-
status: "activating" | "active" | "revoked";
|
|
11687
|
-
/**
|
|
11688
|
-
* Format: date-time
|
|
11689
|
-
* @description ISO 8601 date-time string
|
|
11690
|
-
* @example 2026-05-20T10:30:00.000Z
|
|
11691
|
-
*/
|
|
11692
|
-
revokedAt: string | null;
|
|
11693
|
-
/** @enum {string|null} */
|
|
11694
|
-
revokeReason: "admin" | "add_failed" | null;
|
|
11695
|
-
/**
|
|
11696
|
-
* @description The key's signing public key on the contract.
|
|
11697
|
-
* @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
|
|
11698
|
-
*/
|
|
11699
|
-
publicKey: string | null;
|
|
11700
|
-
}[];
|
|
11701
|
-
/** @description Whether the caller may create and revoke keys (an active org admin). */
|
|
11702
|
-
canManage: boolean;
|
|
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[];
|
|
11703
11943
|
};
|
|
11704
11944
|
};
|
|
11705
11945
|
};
|
|
@@ -11730,10 +11970,24 @@ interface paths$1 {
|
|
|
11730
11970
|
};
|
|
11731
11971
|
};
|
|
11732
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;
|
|
11733
11987
|
put?: never;
|
|
11734
11988
|
/**
|
|
11735
|
-
*
|
|
11736
|
-
* @description
|
|
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.
|
|
11737
11991
|
*/
|
|
11738
11992
|
post: {
|
|
11739
11993
|
parameters: {
|
|
@@ -11745,38 +11999,21 @@ interface paths$1 {
|
|
|
11745
11999
|
requestBody?: {
|
|
11746
12000
|
content: {
|
|
11747
12001
|
"application/json": {
|
|
11748
|
-
/** @description
|
|
11749
|
-
|
|
11750
|
-
/** @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. */
|
|
11751
|
-
externalUserRef?: string;
|
|
12002
|
+
/** @description AuthenticationResponseJSON from navigator.credentials.get(). */
|
|
12003
|
+
credential: Record<string, never>;
|
|
11752
12004
|
};
|
|
11753
12005
|
};
|
|
11754
12006
|
};
|
|
11755
12007
|
responses: {
|
|
11756
|
-
/** @description
|
|
11757
|
-
|
|
12008
|
+
/** @description Success */
|
|
12009
|
+
200: {
|
|
11758
12010
|
headers: {
|
|
11759
12011
|
[name: string]: unknown;
|
|
11760
12012
|
};
|
|
11761
12013
|
content: {
|
|
11762
12014
|
"application/json": {
|
|
11763
|
-
/**
|
|
11764
|
-
|
|
11765
|
-
* @example 550e8400-e29b-41d4-a716-446655440000
|
|
11766
|
-
*/
|
|
11767
|
-
id: string;
|
|
11768
|
-
/**
|
|
11769
|
-
* @description The API key, `wcak_` and 64 hex. Shown only here; store it now.
|
|
11770
|
-
* @example wcak_0123456789abcdef…
|
|
11771
|
-
*/
|
|
11772
|
-
secret: string;
|
|
11773
|
-
label: string;
|
|
11774
|
-
externalUserRef: string | null;
|
|
11775
|
-
/**
|
|
11776
|
-
* @description `activating` until its signing key is confirmed on the contract (seconds); then `active`.
|
|
11777
|
-
* @enum {string}
|
|
11778
|
-
*/
|
|
11779
|
-
status: "activating" | "active" | "revoked";
|
|
12015
|
+
/** @enum {string} */
|
|
12016
|
+
status: "reauthenticated";
|
|
11780
12017
|
};
|
|
11781
12018
|
};
|
|
11782
12019
|
};
|
|
@@ -11805,8 +12042,8 @@ interface paths$1 {
|
|
|
11805
12042
|
};
|
|
11806
12043
|
};
|
|
11807
12044
|
};
|
|
11808
|
-
/** @description
|
|
11809
|
-
|
|
12045
|
+
/** @description Unauthorized — authentication required or invalid */
|
|
12046
|
+
401: {
|
|
11810
12047
|
headers: {
|
|
11811
12048
|
[name: string]: unknown;
|
|
11812
12049
|
};
|
|
@@ -11830,8 +12067,8 @@ interface paths$1 {
|
|
|
11830
12067
|
};
|
|
11831
12068
|
};
|
|
11832
12069
|
};
|
|
11833
|
-
/** @description
|
|
11834
|
-
|
|
12070
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
12071
|
+
403: {
|
|
11835
12072
|
headers: {
|
|
11836
12073
|
[name: string]: unknown;
|
|
11837
12074
|
};
|
|
@@ -11855,9 +12092,497 @@ interface paths$1 {
|
|
|
11855
12092
|
};
|
|
11856
12093
|
};
|
|
11857
12094
|
};
|
|
11858
|
-
|
|
11859
|
-
|
|
11860
|
-
|
|
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: {
|
|
11861
12586
|
[name: string]: unknown;
|
|
11862
12587
|
};
|
|
11863
12588
|
content: {
|
|
@@ -12149,19 +12874,275 @@ interface paths$1 {
|
|
|
12149
12874
|
* @description `activating` while the key is being added to the contract (seconds); `none` when there is none (or its add failed).
|
|
12150
12875
|
* @enum {string}
|
|
12151
12876
|
*/
|
|
12152
|
-
status: "none" | "activating" | "active";
|
|
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;
|
|
12890
|
+
};
|
|
12891
|
+
};
|
|
12892
|
+
};
|
|
12893
|
+
/** @description Conflict */
|
|
12894
|
+
409: {
|
|
12895
|
+
headers: {
|
|
12896
|
+
[name: string]: unknown;
|
|
12897
|
+
};
|
|
12898
|
+
content: {
|
|
12899
|
+
"application/json": {
|
|
12900
|
+
/**
|
|
12901
|
+
* @description HTTP status code
|
|
12902
|
+
* @example 400
|
|
12903
|
+
*/
|
|
12904
|
+
statusCode?: number;
|
|
12905
|
+
/**
|
|
12906
|
+
* @description Short error label
|
|
12907
|
+
* @example Bad Request
|
|
12908
|
+
*/
|
|
12909
|
+
error?: string;
|
|
12910
|
+
/**
|
|
12911
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
12912
|
+
* @example Validation failed
|
|
12913
|
+
*/
|
|
12914
|
+
message: string | string[];
|
|
12915
|
+
};
|
|
12916
|
+
};
|
|
12917
|
+
};
|
|
12918
|
+
};
|
|
12919
|
+
};
|
|
12920
|
+
put?: never;
|
|
12921
|
+
/**
|
|
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.
|
|
12924
|
+
*/
|
|
12925
|
+
post: {
|
|
12926
|
+
parameters: {
|
|
12927
|
+
query?: never;
|
|
12928
|
+
header?: never;
|
|
12929
|
+
path?: never;
|
|
12930
|
+
cookie?: never;
|
|
12931
|
+
};
|
|
12932
|
+
requestBody?: never;
|
|
12933
|
+
responses: {
|
|
12934
|
+
/** @description Created */
|
|
12935
|
+
201: {
|
|
12936
|
+
headers: {
|
|
12937
|
+
[name: string]: unknown;
|
|
12938
|
+
};
|
|
12939
|
+
content: {
|
|
12940
|
+
"application/json": {
|
|
12941
|
+
/**
|
|
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}
|
|
12944
|
+
*/
|
|
12945
|
+
status: "none" | "activating" | "active";
|
|
12946
|
+
/**
|
|
12947
|
+
* @description The delegated key id, for POST /v1/sign.
|
|
12948
|
+
* @example 550e8400-e29b-41d4-a716-446655440000
|
|
12949
|
+
*/
|
|
12950
|
+
id: string | null;
|
|
12951
|
+
/**
|
|
12952
|
+
* @description Ed25519 public key — 32 bytes hex-encoded (64 chars, no 0x prefix)
|
|
12953
|
+
* @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
|
|
12954
|
+
*/
|
|
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;
|
|
12958
|
+
};
|
|
12959
|
+
};
|
|
12960
|
+
};
|
|
12961
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
12962
|
+
403: {
|
|
12963
|
+
headers: {
|
|
12964
|
+
[name: string]: unknown;
|
|
12965
|
+
};
|
|
12966
|
+
content: {
|
|
12967
|
+
"application/json": {
|
|
12968
|
+
/**
|
|
12969
|
+
* @description HTTP status code
|
|
12970
|
+
* @example 400
|
|
12971
|
+
*/
|
|
12972
|
+
statusCode?: number;
|
|
12973
|
+
/**
|
|
12974
|
+
* @description Short error label
|
|
12975
|
+
* @example Bad Request
|
|
12976
|
+
*/
|
|
12977
|
+
error?: string;
|
|
12978
|
+
/**
|
|
12979
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
12980
|
+
* @example Validation failed
|
|
12981
|
+
*/
|
|
12982
|
+
message: string | string[];
|
|
12983
|
+
};
|
|
12984
|
+
};
|
|
12985
|
+
};
|
|
12986
|
+
/** @description Conflict */
|
|
12987
|
+
409: {
|
|
12988
|
+
headers: {
|
|
12989
|
+
[name: string]: unknown;
|
|
12990
|
+
};
|
|
12991
|
+
content: {
|
|
12992
|
+
"application/json": {
|
|
12993
|
+
/**
|
|
12994
|
+
* @description HTTP status code
|
|
12995
|
+
* @example 400
|
|
12996
|
+
*/
|
|
12997
|
+
statusCode?: number;
|
|
12998
|
+
/**
|
|
12999
|
+
* @description Short error label
|
|
13000
|
+
* @example Bad Request
|
|
13001
|
+
*/
|
|
13002
|
+
error?: string;
|
|
13003
|
+
/**
|
|
13004
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
13005
|
+
* @example Validation failed
|
|
13006
|
+
*/
|
|
13007
|
+
message: string | string[];
|
|
13008
|
+
};
|
|
13009
|
+
};
|
|
13010
|
+
};
|
|
13011
|
+
/** @description Too Many Requests */
|
|
13012
|
+
429: {
|
|
13013
|
+
headers: {
|
|
13014
|
+
[name: string]: unknown;
|
|
13015
|
+
};
|
|
13016
|
+
content: {
|
|
13017
|
+
"application/json": {
|
|
13018
|
+
/**
|
|
13019
|
+
* @description HTTP status code
|
|
13020
|
+
* @example 400
|
|
13021
|
+
*/
|
|
13022
|
+
statusCode?: number;
|
|
13023
|
+
/**
|
|
13024
|
+
* @description Short error label
|
|
13025
|
+
* @example Bad Request
|
|
13026
|
+
*/
|
|
13027
|
+
error?: string;
|
|
13028
|
+
/**
|
|
13029
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
13030
|
+
* @example Validation failed
|
|
13031
|
+
*/
|
|
13032
|
+
message: string | string[];
|
|
13033
|
+
};
|
|
13034
|
+
};
|
|
13035
|
+
};
|
|
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: {
|
|
13060
|
+
headers: {
|
|
13061
|
+
[name: string]: unknown;
|
|
13062
|
+
};
|
|
13063
|
+
content: {
|
|
13064
|
+
"application/json": {
|
|
13065
|
+
/**
|
|
13066
|
+
* @description HTTP status code
|
|
13067
|
+
* @example 400
|
|
13068
|
+
*/
|
|
13069
|
+
statusCode?: number;
|
|
13070
|
+
/**
|
|
13071
|
+
* @description Short error label
|
|
13072
|
+
* @example Bad Request
|
|
13073
|
+
*/
|
|
13074
|
+
error?: string;
|
|
13075
|
+
/**
|
|
13076
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
13077
|
+
* @example Validation failed
|
|
13078
|
+
*/
|
|
13079
|
+
message: string | string[];
|
|
13080
|
+
};
|
|
13081
|
+
};
|
|
13082
|
+
};
|
|
13083
|
+
};
|
|
13084
|
+
};
|
|
13085
|
+
options?: never;
|
|
13086
|
+
head?: never;
|
|
13087
|
+
patch?: never;
|
|
13088
|
+
trace?: never;
|
|
13089
|
+
};
|
|
13090
|
+
"/v1/orgs/me/contract/pause": {
|
|
13091
|
+
parameters: {
|
|
13092
|
+
query?: never;
|
|
13093
|
+
header?: never;
|
|
13094
|
+
path?: never;
|
|
13095
|
+
cookie?: never;
|
|
13096
|
+
};
|
|
13097
|
+
get?: never;
|
|
13098
|
+
put?: never;
|
|
13099
|
+
/**
|
|
13100
|
+
* Pause witnessing
|
|
13101
|
+
* @description Org admins, Witnium-managed contracts. Immediate and protective: no step-up. 409 owner_op_settling while another change settles.
|
|
13102
|
+
*/
|
|
13103
|
+
post: {
|
|
13104
|
+
parameters: {
|
|
13105
|
+
query?: never;
|
|
13106
|
+
header?: never;
|
|
13107
|
+
path?: never;
|
|
13108
|
+
cookie?: never;
|
|
13109
|
+
};
|
|
13110
|
+
requestBody?: never;
|
|
13111
|
+
responses: {
|
|
13112
|
+
/** @description Success */
|
|
13113
|
+
200: {
|
|
13114
|
+
headers: {
|
|
13115
|
+
[name: string]: unknown;
|
|
13116
|
+
};
|
|
13117
|
+
content: {
|
|
13118
|
+
"application/json": {
|
|
13119
|
+
/** @enum {string} */
|
|
13120
|
+
status: "signed" | "submitted" | "confirmed" | "failed";
|
|
13121
|
+
};
|
|
13122
|
+
};
|
|
13123
|
+
};
|
|
13124
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
13125
|
+
403: {
|
|
13126
|
+
headers: {
|
|
13127
|
+
[name: string]: unknown;
|
|
13128
|
+
};
|
|
13129
|
+
content: {
|
|
13130
|
+
"application/json": {
|
|
13131
|
+
/**
|
|
13132
|
+
* @description HTTP status code
|
|
13133
|
+
* @example 400
|
|
13134
|
+
*/
|
|
13135
|
+
statusCode?: number;
|
|
12153
13136
|
/**
|
|
12154
|
-
* @description
|
|
12155
|
-
* @example
|
|
13137
|
+
* @description Short error label
|
|
13138
|
+
* @example Bad Request
|
|
12156
13139
|
*/
|
|
12157
|
-
|
|
13140
|
+
error?: string;
|
|
12158
13141
|
/**
|
|
12159
|
-
* @description
|
|
12160
|
-
* @example
|
|
13142
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
13143
|
+
* @example Validation failed
|
|
12161
13144
|
*/
|
|
12162
|
-
|
|
12163
|
-
/** @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. */
|
|
12164
|
-
revocable: boolean;
|
|
13145
|
+
message: string | string[];
|
|
12165
13146
|
};
|
|
12166
13147
|
};
|
|
12167
13148
|
};
|
|
@@ -12192,10 +13173,24 @@ interface paths$1 {
|
|
|
12192
13173
|
};
|
|
12193
13174
|
};
|
|
12194
13175
|
};
|
|
13176
|
+
delete?: never;
|
|
13177
|
+
options?: never;
|
|
13178
|
+
head?: never;
|
|
13179
|
+
patch?: never;
|
|
13180
|
+
trace?: never;
|
|
13181
|
+
};
|
|
13182
|
+
"/v1/orgs/me/contract/resume": {
|
|
13183
|
+
parameters: {
|
|
13184
|
+
query?: never;
|
|
13185
|
+
header?: never;
|
|
13186
|
+
path?: never;
|
|
13187
|
+
cookie?: never;
|
|
13188
|
+
};
|
|
13189
|
+
get?: never;
|
|
12195
13190
|
put?: never;
|
|
12196
13191
|
/**
|
|
12197
|
-
*
|
|
12198
|
-
* @description
|
|
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.
|
|
12199
13194
|
*/
|
|
12200
13195
|
post: {
|
|
12201
13196
|
parameters: {
|
|
@@ -12206,30 +13201,15 @@ interface paths$1 {
|
|
|
12206
13201
|
};
|
|
12207
13202
|
requestBody?: never;
|
|
12208
13203
|
responses: {
|
|
12209
|
-
/** @description
|
|
12210
|
-
|
|
13204
|
+
/** @description Success */
|
|
13205
|
+
200: {
|
|
12211
13206
|
headers: {
|
|
12212
13207
|
[name: string]: unknown;
|
|
12213
13208
|
};
|
|
12214
13209
|
content: {
|
|
12215
13210
|
"application/json": {
|
|
12216
|
-
/**
|
|
12217
|
-
|
|
12218
|
-
* @enum {string}
|
|
12219
|
-
*/
|
|
12220
|
-
status: "none" | "activating" | "active";
|
|
12221
|
-
/**
|
|
12222
|
-
* @description The delegated key id, for POST /v1/sign.
|
|
12223
|
-
* @example 550e8400-e29b-41d4-a716-446655440000
|
|
12224
|
-
*/
|
|
12225
|
-
id: string | null;
|
|
12226
|
-
/**
|
|
12227
|
-
* @description Ed25519 public key — 32 bytes hex-encoded (64 chars, no 0x prefix)
|
|
12228
|
-
* @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
|
|
12229
|
-
*/
|
|
12230
|
-
publicKey: string | null;
|
|
12231
|
-
/** @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. */
|
|
12232
|
-
revocable: boolean;
|
|
13211
|
+
/** @enum {string} */
|
|
13212
|
+
status: "signed" | "submitted" | "confirmed" | "failed";
|
|
12233
13213
|
};
|
|
12234
13214
|
};
|
|
12235
13215
|
};
|
|
@@ -12310,28 +13290,70 @@ interface paths$1 {
|
|
|
12310
13290
|
};
|
|
12311
13291
|
};
|
|
12312
13292
|
};
|
|
13293
|
+
delete?: never;
|
|
13294
|
+
options?: never;
|
|
13295
|
+
head?: never;
|
|
13296
|
+
patch?: never;
|
|
13297
|
+
trace?: never;
|
|
13298
|
+
};
|
|
13299
|
+
"/v1/orgs/me/owner-operations": {
|
|
13300
|
+
parameters: {
|
|
13301
|
+
query?: never;
|
|
13302
|
+
header?: never;
|
|
13303
|
+
path?: never;
|
|
13304
|
+
cookie?: never;
|
|
13305
|
+
};
|
|
12313
13306
|
/**
|
|
12314
|
-
*
|
|
12315
|
-
* @description
|
|
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.
|
|
12316
13309
|
*/
|
|
12317
|
-
|
|
13310
|
+
get: {
|
|
12318
13311
|
parameters: {
|
|
12319
|
-
query?:
|
|
13312
|
+
query?: {
|
|
13313
|
+
limit?: number;
|
|
13314
|
+
};
|
|
12320
13315
|
header?: never;
|
|
12321
13316
|
path?: never;
|
|
12322
13317
|
cookie?: never;
|
|
12323
13318
|
};
|
|
12324
13319
|
requestBody?: never;
|
|
12325
13320
|
responses: {
|
|
12326
|
-
/** @description
|
|
12327
|
-
|
|
13321
|
+
/** @description Success */
|
|
13322
|
+
200: {
|
|
12328
13323
|
headers: {
|
|
12329
13324
|
[name: string]: unknown;
|
|
12330
13325
|
};
|
|
12331
|
-
content
|
|
13326
|
+
content: {
|
|
13327
|
+
"application/json": {
|
|
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;
|
|
13352
|
+
};
|
|
13353
|
+
};
|
|
12332
13354
|
};
|
|
12333
|
-
/** @description
|
|
12334
|
-
|
|
13355
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
13356
|
+
403: {
|
|
12335
13357
|
headers: {
|
|
12336
13358
|
[name: string]: unknown;
|
|
12337
13359
|
};
|
|
@@ -12357,12 +13379,15 @@ interface paths$1 {
|
|
|
12357
13379
|
};
|
|
12358
13380
|
};
|
|
12359
13381
|
};
|
|
13382
|
+
put?: never;
|
|
13383
|
+
post?: never;
|
|
13384
|
+
delete?: never;
|
|
12360
13385
|
options?: never;
|
|
12361
13386
|
head?: never;
|
|
12362
13387
|
patch?: never;
|
|
12363
13388
|
trace?: never;
|
|
12364
13389
|
};
|
|
12365
|
-
"/v1/orgs/me/contract/
|
|
13390
|
+
"/v1/orgs/me/contract/keys": {
|
|
12366
13391
|
parameters: {
|
|
12367
13392
|
query?: never;
|
|
12368
13393
|
header?: never;
|
|
@@ -12372,8 +13397,8 @@ interface paths$1 {
|
|
|
12372
13397
|
get?: never;
|
|
12373
13398
|
put?: never;
|
|
12374
13399
|
/**
|
|
12375
|
-
*
|
|
12376
|
-
* @description Org admins, Witnium
|
|
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.
|
|
12377
13402
|
*/
|
|
12378
13403
|
post: {
|
|
12379
13404
|
parameters: {
|
|
@@ -12382,7 +13407,19 @@ interface paths$1 {
|
|
|
12382
13407
|
path?: never;
|
|
12383
13408
|
cookie?: never;
|
|
12384
13409
|
};
|
|
12385
|
-
requestBody?:
|
|
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
|
+
};
|
|
12386
13423
|
responses: {
|
|
12387
13424
|
/** @description Success */
|
|
12388
13425
|
200: {
|
|
@@ -12396,6 +13433,56 @@ interface paths$1 {
|
|
|
12396
13433
|
};
|
|
12397
13434
|
};
|
|
12398
13435
|
};
|
|
13436
|
+
/** @description Bad Request — validation failed */
|
|
13437
|
+
400: {
|
|
13438
|
+
headers: {
|
|
13439
|
+
[name: string]: unknown;
|
|
13440
|
+
};
|
|
13441
|
+
content: {
|
|
13442
|
+
"application/json": {
|
|
13443
|
+
/**
|
|
13444
|
+
* @description HTTP status code
|
|
13445
|
+
* @example 400
|
|
13446
|
+
*/
|
|
13447
|
+
statusCode?: number;
|
|
13448
|
+
/**
|
|
13449
|
+
* @description Short error label
|
|
13450
|
+
* @example Bad Request
|
|
13451
|
+
*/
|
|
13452
|
+
error?: string;
|
|
13453
|
+
/**
|
|
13454
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
13455
|
+
* @example Validation failed
|
|
13456
|
+
*/
|
|
13457
|
+
message: string | string[];
|
|
13458
|
+
};
|
|
13459
|
+
};
|
|
13460
|
+
};
|
|
13461
|
+
/** @description Unauthorized — authentication required or invalid */
|
|
13462
|
+
401: {
|
|
13463
|
+
headers: {
|
|
13464
|
+
[name: string]: unknown;
|
|
13465
|
+
};
|
|
13466
|
+
content: {
|
|
13467
|
+
"application/json": {
|
|
13468
|
+
/**
|
|
13469
|
+
* @description HTTP status code
|
|
13470
|
+
* @example 400
|
|
13471
|
+
*/
|
|
13472
|
+
statusCode?: number;
|
|
13473
|
+
/**
|
|
13474
|
+
* @description Short error label
|
|
13475
|
+
* @example Bad Request
|
|
13476
|
+
*/
|
|
13477
|
+
error?: string;
|
|
13478
|
+
/**
|
|
13479
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
13480
|
+
* @example Validation failed
|
|
13481
|
+
*/
|
|
13482
|
+
message: string | string[];
|
|
13483
|
+
};
|
|
13484
|
+
};
|
|
13485
|
+
};
|
|
12399
13486
|
/** @description Forbidden — insufficient permissions or scope */
|
|
12400
13487
|
403: {
|
|
12401
13488
|
headers: {
|
|
@@ -12446,6 +13533,31 @@ interface paths$1 {
|
|
|
12446
13533
|
};
|
|
12447
13534
|
};
|
|
12448
13535
|
};
|
|
13536
|
+
/** @description Too Many Requests */
|
|
13537
|
+
429: {
|
|
13538
|
+
headers: {
|
|
13539
|
+
[name: string]: unknown;
|
|
13540
|
+
};
|
|
13541
|
+
content: {
|
|
13542
|
+
"application/json": {
|
|
13543
|
+
/**
|
|
13544
|
+
* @description HTTP status code
|
|
13545
|
+
* @example 400
|
|
13546
|
+
*/
|
|
13547
|
+
statusCode?: number;
|
|
13548
|
+
/**
|
|
13549
|
+
* @description Short error label
|
|
13550
|
+
* @example Bad Request
|
|
13551
|
+
*/
|
|
13552
|
+
error?: string;
|
|
13553
|
+
/**
|
|
13554
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
13555
|
+
* @example Validation failed
|
|
13556
|
+
*/
|
|
13557
|
+
message: string | string[];
|
|
13558
|
+
};
|
|
13559
|
+
};
|
|
13560
|
+
};
|
|
12449
13561
|
};
|
|
12450
13562
|
};
|
|
12451
13563
|
delete?: never;
|
|
@@ -12454,7 +13566,7 @@ interface paths$1 {
|
|
|
12454
13566
|
patch?: never;
|
|
12455
13567
|
trace?: never;
|
|
12456
13568
|
};
|
|
12457
|
-
"/v1/orgs/me/contract/
|
|
13569
|
+
"/v1/orgs/me/contract/keys/{publicKey}": {
|
|
12458
13570
|
parameters: {
|
|
12459
13571
|
query?: never;
|
|
12460
13572
|
header?: never;
|
|
@@ -12463,15 +13575,18 @@ interface paths$1 {
|
|
|
12463
13575
|
};
|
|
12464
13576
|
get?: never;
|
|
12465
13577
|
put?: never;
|
|
13578
|
+
post?: never;
|
|
12466
13579
|
/**
|
|
12467
|
-
*
|
|
12468
|
-
* @description Org admins
|
|
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`).
|
|
12469
13582
|
*/
|
|
12470
|
-
|
|
13583
|
+
delete: {
|
|
12471
13584
|
parameters: {
|
|
12472
13585
|
query?: never;
|
|
12473
13586
|
header?: never;
|
|
12474
|
-
path
|
|
13587
|
+
path: {
|
|
13588
|
+
publicKey: string;
|
|
13589
|
+
};
|
|
12475
13590
|
cookie?: never;
|
|
12476
13591
|
};
|
|
12477
13592
|
requestBody?: never;
|
|
@@ -12484,7 +13599,32 @@ interface paths$1 {
|
|
|
12484
13599
|
content: {
|
|
12485
13600
|
"application/json": {
|
|
12486
13601
|
/** @enum {string} */
|
|
12487
|
-
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[];
|
|
12488
13628
|
};
|
|
12489
13629
|
};
|
|
12490
13630
|
};
|
|
@@ -12513,8 +13653,8 @@ interface paths$1 {
|
|
|
12513
13653
|
};
|
|
12514
13654
|
};
|
|
12515
13655
|
};
|
|
12516
|
-
/** @description
|
|
12517
|
-
|
|
13656
|
+
/** @description Not Found */
|
|
13657
|
+
404: {
|
|
12518
13658
|
headers: {
|
|
12519
13659
|
[name: string]: unknown;
|
|
12520
13660
|
};
|
|
@@ -12538,8 +13678,8 @@ interface paths$1 {
|
|
|
12538
13678
|
};
|
|
12539
13679
|
};
|
|
12540
13680
|
};
|
|
12541
|
-
/** @description
|
|
12542
|
-
|
|
13681
|
+
/** @description Conflict */
|
|
13682
|
+
409: {
|
|
12543
13683
|
headers: {
|
|
12544
13684
|
[name: string]: unknown;
|
|
12545
13685
|
};
|
|
@@ -12565,13 +13705,12 @@ interface paths$1 {
|
|
|
12565
13705
|
};
|
|
12566
13706
|
};
|
|
12567
13707
|
};
|
|
12568
|
-
delete?: never;
|
|
12569
13708
|
options?: never;
|
|
12570
13709
|
head?: never;
|
|
12571
13710
|
patch?: never;
|
|
12572
13711
|
trace?: never;
|
|
12573
13712
|
};
|
|
12574
|
-
"/
|
|
13713
|
+
"/interaction/{uid}/details": {
|
|
12575
13714
|
parameters: {
|
|
12576
13715
|
query?: never;
|
|
12577
13716
|
header?: never;
|
|
@@ -12579,16 +13718,16 @@ interface paths$1 {
|
|
|
12579
13718
|
cookie?: never;
|
|
12580
13719
|
};
|
|
12581
13720
|
/**
|
|
12582
|
-
*
|
|
12583
|
-
* @description
|
|
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.
|
|
12584
13723
|
*/
|
|
12585
13724
|
get: {
|
|
12586
13725
|
parameters: {
|
|
12587
|
-
query?:
|
|
12588
|
-
limit?: number;
|
|
12589
|
-
};
|
|
13726
|
+
query?: never;
|
|
12590
13727
|
header?: never;
|
|
12591
|
-
path
|
|
13728
|
+
path: {
|
|
13729
|
+
uid: string;
|
|
13730
|
+
};
|
|
12592
13731
|
cookie?: never;
|
|
12593
13732
|
};
|
|
12594
13733
|
requestBody?: never;
|
|
@@ -12600,33 +13739,114 @@ interface paths$1 {
|
|
|
12600
13739
|
};
|
|
12601
13740
|
content: {
|
|
12602
13741
|
"application/json": {
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
*/
|
|
13742
|
+
uid: string;
|
|
13743
|
+
/** @enum {string} */
|
|
13744
|
+
prompt: "login" | "consent";
|
|
13745
|
+
client: {
|
|
12608
13746
|
id: string;
|
|
12609
|
-
|
|
12610
|
-
op: "add-signing-key" | "revoke-signing-key" | "pause" | "unpause";
|
|
12611
|
-
/** @enum {string} */
|
|
12612
|
-
status: "signed" | "submitted" | "confirmed" | "failed";
|
|
12613
|
-
/** @enum {string} */
|
|
12614
|
-
source: "connection" | "api-key" | "member-key" | "admin" | "operator";
|
|
12615
|
-
/** @description The API key's label or the member's email, when known. */
|
|
12616
|
-
label: string | null;
|
|
13747
|
+
name: string;
|
|
12617
13748
|
/**
|
|
12618
|
-
*
|
|
12619
|
-
* @description
|
|
12620
|
-
* @example 2026-05-20T10:30:00.000Z
|
|
13749
|
+
* ProductSummary
|
|
13750
|
+
* @description The product the app belongs to, for branding; null shows neutral Witnium.
|
|
12621
13751
|
*/
|
|
12622
|
-
|
|
12623
|
-
|
|
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;
|
|
12624
13775
|
}[];
|
|
13776
|
+
/** @description Consent prompt only: the requested resource indicator(s) (RFC 8707), space-separated when several. */
|
|
13777
|
+
resource?: string;
|
|
13778
|
+
/**
|
|
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}
|
|
13781
|
+
*/
|
|
13782
|
+
state: "ready" | "provisioning" | "no_contract" | "refused";
|
|
13783
|
+
/**
|
|
13784
|
+
* @description Present when `state` is `refused`.
|
|
13785
|
+
* @enum {string}
|
|
13786
|
+
*/
|
|
13787
|
+
refusal?: "self_custody" | "suspended" | "not_home" | "connection_ended" | "key_add_failed" | "contract_busy" | "key_rate_limited";
|
|
13788
|
+
/**
|
|
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}
|
|
13791
|
+
*/
|
|
13792
|
+
reauth?: true;
|
|
13793
|
+
/** @description With `reauth`: the account of the current session. */
|
|
13794
|
+
email?: string;
|
|
12625
13795
|
};
|
|
12626
13796
|
};
|
|
12627
13797
|
};
|
|
12628
|
-
/** @description
|
|
12629
|
-
|
|
13798
|
+
/** @description Bad Request — validation failed */
|
|
13799
|
+
400: {
|
|
13800
|
+
headers: {
|
|
13801
|
+
[name: string]: unknown;
|
|
13802
|
+
};
|
|
13803
|
+
content: {
|
|
13804
|
+
"application/json": {
|
|
13805
|
+
/**
|
|
13806
|
+
* @description HTTP status code
|
|
13807
|
+
* @example 400
|
|
13808
|
+
*/
|
|
13809
|
+
statusCode?: number;
|
|
13810
|
+
/**
|
|
13811
|
+
* @description Short error label
|
|
13812
|
+
* @example Bad Request
|
|
13813
|
+
*/
|
|
13814
|
+
error?: string;
|
|
13815
|
+
/**
|
|
13816
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
13817
|
+
* @example Validation failed
|
|
13818
|
+
*/
|
|
13819
|
+
message: string | string[];
|
|
13820
|
+
};
|
|
13821
|
+
};
|
|
13822
|
+
};
|
|
13823
|
+
/** @description Unauthorized — authentication required or invalid */
|
|
13824
|
+
401: {
|
|
13825
|
+
headers: {
|
|
13826
|
+
[name: string]: unknown;
|
|
13827
|
+
};
|
|
13828
|
+
content: {
|
|
13829
|
+
"application/json": {
|
|
13830
|
+
/**
|
|
13831
|
+
* @description HTTP status code
|
|
13832
|
+
* @example 400
|
|
13833
|
+
*/
|
|
13834
|
+
statusCode?: number;
|
|
13835
|
+
/**
|
|
13836
|
+
* @description Short error label
|
|
13837
|
+
* @example Bad Request
|
|
13838
|
+
*/
|
|
13839
|
+
error?: string;
|
|
13840
|
+
/**
|
|
13841
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
13842
|
+
* @example Validation failed
|
|
13843
|
+
*/
|
|
13844
|
+
message: string | string[];
|
|
13845
|
+
};
|
|
13846
|
+
};
|
|
13847
|
+
};
|
|
13848
|
+
/** @description Gone */
|
|
13849
|
+
410: {
|
|
12630
13850
|
headers: {
|
|
12631
13851
|
[name: string]: unknown;
|
|
12632
13852
|
};
|
|
@@ -12660,7 +13880,7 @@ interface paths$1 {
|
|
|
12660
13880
|
patch?: never;
|
|
12661
13881
|
trace?: never;
|
|
12662
13882
|
};
|
|
12663
|
-
"/
|
|
13883
|
+
"/interaction/{uid}/confirm": {
|
|
12664
13884
|
parameters: {
|
|
12665
13885
|
query?: never;
|
|
12666
13886
|
header?: never;
|
|
@@ -12670,29 +13890,19 @@ interface paths$1 {
|
|
|
12670
13890
|
get?: never;
|
|
12671
13891
|
put?: never;
|
|
12672
13892
|
/**
|
|
12673
|
-
*
|
|
12674
|
-
* @description
|
|
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.
|
|
12675
13895
|
*/
|
|
12676
13896
|
post: {
|
|
12677
13897
|
parameters: {
|
|
12678
13898
|
query?: never;
|
|
12679
13899
|
header?: never;
|
|
12680
|
-
path
|
|
12681
|
-
|
|
12682
|
-
};
|
|
12683
|
-
requestBody?: {
|
|
12684
|
-
content: {
|
|
12685
|
-
"application/json": {
|
|
12686
|
-
/**
|
|
12687
|
-
* @description A key you hold (your SDK, your own systems). Witnium never sees its private key.
|
|
12688
|
-
* @example 4cdde7a3e3a1d8a48d2b9eaf2bcbe2db1d57d3e1a8d6c20e0a86c0f9c4b6cf2e
|
|
12689
|
-
*/
|
|
12690
|
-
publicKey: string;
|
|
12691
|
-
/** @description A name for the key, e.g. "ingest server". */
|
|
12692
|
-
label: string;
|
|
12693
|
-
};
|
|
13900
|
+
path: {
|
|
13901
|
+
uid: string;
|
|
12694
13902
|
};
|
|
13903
|
+
cookie?: never;
|
|
12695
13904
|
};
|
|
13905
|
+
requestBody?: never;
|
|
12696
13906
|
responses: {
|
|
12697
13907
|
/** @description Success */
|
|
12698
13908
|
200: {
|
|
@@ -12701,38 +13911,28 @@ interface paths$1 {
|
|
|
12701
13911
|
};
|
|
12702
13912
|
content: {
|
|
12703
13913
|
"application/json": {
|
|
12704
|
-
/**
|
|
12705
|
-
|
|
13914
|
+
/**
|
|
13915
|
+
* Format: uri
|
|
13916
|
+
* @description Navigate the browser here (the provider's resume).
|
|
13917
|
+
*/
|
|
13918
|
+
redirectTo: string;
|
|
12706
13919
|
};
|
|
12707
13920
|
};
|
|
12708
13921
|
};
|
|
12709
|
-
/** @description
|
|
12710
|
-
|
|
13922
|
+
/** @description Accepted */
|
|
13923
|
+
202: {
|
|
12711
13924
|
headers: {
|
|
12712
13925
|
[name: string]: unknown;
|
|
12713
13926
|
};
|
|
12714
13927
|
content: {
|
|
12715
13928
|
"application/json": {
|
|
12716
|
-
/**
|
|
12717
|
-
|
|
12718
|
-
* @example 400
|
|
12719
|
-
*/
|
|
12720
|
-
statusCode?: number;
|
|
12721
|
-
/**
|
|
12722
|
-
* @description Short error label
|
|
12723
|
-
* @example Bad Request
|
|
12724
|
-
*/
|
|
12725
|
-
error?: string;
|
|
12726
|
-
/**
|
|
12727
|
-
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
12728
|
-
* @example Validation failed
|
|
12729
|
-
*/
|
|
12730
|
-
message: string | string[];
|
|
13929
|
+
/** @enum {string} */
|
|
13930
|
+
state: "provisioning";
|
|
12731
13931
|
};
|
|
12732
13932
|
};
|
|
12733
13933
|
};
|
|
12734
|
-
/** @description
|
|
12735
|
-
|
|
13934
|
+
/** @description Bad Request — validation failed */
|
|
13935
|
+
400: {
|
|
12736
13936
|
headers: {
|
|
12737
13937
|
[name: string]: unknown;
|
|
12738
13938
|
};
|
|
@@ -12788,26 +13988,23 @@ interface paths$1 {
|
|
|
12788
13988
|
};
|
|
12789
13989
|
content: {
|
|
12790
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";
|
|
12791
13998
|
/**
|
|
12792
|
-
* @description
|
|
12793
|
-
* @
|
|
12794
|
-
*/
|
|
12795
|
-
statusCode?: number;
|
|
12796
|
-
/**
|
|
12797
|
-
* @description Short error label
|
|
12798
|
-
* @example Bad Request
|
|
12799
|
-
*/
|
|
12800
|
-
error?: string;
|
|
12801
|
-
/**
|
|
12802
|
-
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
12803
|
-
* @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}
|
|
12804
14001
|
*/
|
|
12805
|
-
|
|
14002
|
+
refusal?: "self_custody" | "suspended" | "not_home" | "connection_ended" | "key_add_failed" | "contract_busy" | "key_rate_limited";
|
|
12806
14003
|
};
|
|
12807
14004
|
};
|
|
12808
14005
|
};
|
|
12809
|
-
/** @description
|
|
12810
|
-
|
|
14006
|
+
/** @description Gone */
|
|
14007
|
+
410: {
|
|
12811
14008
|
headers: {
|
|
12812
14009
|
[name: string]: unknown;
|
|
12813
14010
|
};
|
|
@@ -12839,7 +14036,7 @@ interface paths$1 {
|
|
|
12839
14036
|
patch?: never;
|
|
12840
14037
|
trace?: never;
|
|
12841
14038
|
};
|
|
12842
|
-
"/
|
|
14039
|
+
"/interaction/{uid}/abort": {
|
|
12843
14040
|
parameters: {
|
|
12844
14041
|
query?: never;
|
|
12845
14042
|
header?: never;
|
|
@@ -12848,17 +14045,16 @@ interface paths$1 {
|
|
|
12848
14045
|
};
|
|
12849
14046
|
get?: never;
|
|
12850
14047
|
put?: never;
|
|
12851
|
-
post?: never;
|
|
12852
14048
|
/**
|
|
12853
|
-
*
|
|
12854
|
-
* @description
|
|
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.
|
|
12855
14051
|
*/
|
|
12856
|
-
|
|
14052
|
+
post: {
|
|
12857
14053
|
parameters: {
|
|
12858
14054
|
query?: never;
|
|
12859
14055
|
header?: never;
|
|
12860
14056
|
path: {
|
|
12861
|
-
|
|
14057
|
+
uid: string;
|
|
12862
14058
|
};
|
|
12863
14059
|
cookie?: never;
|
|
12864
14060
|
};
|
|
@@ -12871,38 +14067,16 @@ interface paths$1 {
|
|
|
12871
14067
|
};
|
|
12872
14068
|
content: {
|
|
12873
14069
|
"application/json": {
|
|
12874
|
-
/** @enum {string} */
|
|
12875
|
-
status: "signed" | "submitted" | "confirmed" | "failed" | "ended";
|
|
12876
|
-
};
|
|
12877
|
-
};
|
|
12878
|
-
};
|
|
12879
|
-
/** @description Unauthorized — authentication required or invalid */
|
|
12880
|
-
401: {
|
|
12881
|
-
headers: {
|
|
12882
|
-
[name: string]: unknown;
|
|
12883
|
-
};
|
|
12884
|
-
content: {
|
|
12885
|
-
"application/json": {
|
|
12886
|
-
/**
|
|
12887
|
-
* @description HTTP status code
|
|
12888
|
-
* @example 400
|
|
12889
|
-
*/
|
|
12890
|
-
statusCode?: number;
|
|
12891
|
-
/**
|
|
12892
|
-
* @description Short error label
|
|
12893
|
-
* @example Bad Request
|
|
12894
|
-
*/
|
|
12895
|
-
error?: string;
|
|
12896
14070
|
/**
|
|
12897
|
-
*
|
|
12898
|
-
* @
|
|
14071
|
+
* Format: uri
|
|
14072
|
+
* @description Navigate the browser here (the provider's resume).
|
|
12899
14073
|
*/
|
|
12900
|
-
|
|
14074
|
+
redirectTo: string;
|
|
12901
14075
|
};
|
|
12902
14076
|
};
|
|
12903
14077
|
};
|
|
12904
|
-
/** @description
|
|
12905
|
-
|
|
14078
|
+
/** @description Bad Request — validation failed */
|
|
14079
|
+
400: {
|
|
12906
14080
|
headers: {
|
|
12907
14081
|
[name: string]: unknown;
|
|
12908
14082
|
};
|
|
@@ -12926,8 +14100,8 @@ interface paths$1 {
|
|
|
12926
14100
|
};
|
|
12927
14101
|
};
|
|
12928
14102
|
};
|
|
12929
|
-
/** @description
|
|
12930
|
-
|
|
14103
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
14104
|
+
403: {
|
|
12931
14105
|
headers: {
|
|
12932
14106
|
[name: string]: unknown;
|
|
12933
14107
|
};
|
|
@@ -12951,8 +14125,8 @@ interface paths$1 {
|
|
|
12951
14125
|
};
|
|
12952
14126
|
};
|
|
12953
14127
|
};
|
|
12954
|
-
/** @description
|
|
12955
|
-
|
|
14128
|
+
/** @description Gone */
|
|
14129
|
+
410: {
|
|
12956
14130
|
headers: {
|
|
12957
14131
|
[name: string]: unknown;
|
|
12958
14132
|
};
|
|
@@ -12978,6 +14152,7 @@ interface paths$1 {
|
|
|
12978
14152
|
};
|
|
12979
14153
|
};
|
|
12980
14154
|
};
|
|
14155
|
+
delete?: never;
|
|
12981
14156
|
options?: never;
|
|
12982
14157
|
head?: never;
|
|
12983
14158
|
patch?: never;
|
|
@@ -15783,7 +16958,40 @@ type RevokeWitnessRequest = Req<'/v1/contracts/{contractAddress}/witnesses/{witn
|
|
|
15783
16958
|
type RevokeWitnessResponse = Res<'/v1/contracts/{contractAddress}/witnesses/{witnessId}/revoke', 'post'>;
|
|
15784
16959
|
type GetWitnessResponse = Res<'/v1/contracts/{contractAddress}/witnesses/{witnessId}', 'get'>;
|
|
15785
16960
|
type ProposeWitnessV5Request = Req<'/v5/contracts/{contractAddress}/witnesses/propose', 'post'>;
|
|
15786
|
-
|
|
16961
|
+
/** accounts' answer to a v5 propose: 201 (an intent) or 200 (the scope already holds the witness). */
|
|
16962
|
+
type ProposeWitnessV5Answer = Res<'/v5/contracts/{contractAddress}/witnesses/propose', 'post'>;
|
|
16963
|
+
type ProposeWitnessV5Intent = Extract<ProposeWitnessV5Answer, {
|
|
16964
|
+
payloadToSign: string;
|
|
16965
|
+
}>;
|
|
16966
|
+
/**
|
|
16967
|
+
* A scoped propose that created the witness: an intent to sign and
|
|
16968
|
+
* finalize. `scope` is the one the propose ran in (the caller's, or the
|
|
16969
|
+
* one the SDK generated).
|
|
16970
|
+
*/
|
|
16971
|
+
type ProposeWitnessV5Created = Omit<ProposeWitnessV5Intent, 'outcome'> & {
|
|
16972
|
+
outcome: 'created';
|
|
16973
|
+
scope: string;
|
|
16974
|
+
};
|
|
16975
|
+
/**
|
|
16976
|
+
* The scope already held the witness for this dataId: nothing was created
|
|
16977
|
+
* or charged, and there is nothing to sign. `witnessId` and
|
|
16978
|
+
* `chainTimestamp` say which witness and when it was made.
|
|
16979
|
+
*/
|
|
16980
|
+
type ProposeWitnessV5Existing = Extract<ProposeWitnessV5Answer, {
|
|
16981
|
+
outcome: 'existing';
|
|
16982
|
+
}> & {
|
|
16983
|
+
scope: string;
|
|
16984
|
+
};
|
|
16985
|
+
/** What {@link WitniumchainClient.proposeWitnessV5} resolves to; branch on `outcome`. */
|
|
16986
|
+
type ProposeWitnessV5Result = ProposeWitnessV5Created | ProposeWitnessV5Existing;
|
|
16987
|
+
/** @deprecated The body of a propose on the deprecated `Idempotency-Key` path (no `scope`). */
|
|
16988
|
+
type ProposeWitnessV5LegacyRequest = Omit<ProposeWitnessV5Request, 'scope'>;
|
|
16989
|
+
/** @deprecated The answer on the deprecated `Idempotency-Key` path: an intent, no `outcome`, no `scope`. */
|
|
16990
|
+
type ProposeWitnessV5LegacyResponse = Omit<ProposeWitnessV5Intent, 'outcome'>;
|
|
16991
|
+
/** The `code` of a 409 to a scoped propose, from the spec's 409 body. */
|
|
16992
|
+
type WitnessScopeConflictCode = Extract<JsonBody<paths$1['/v5/contracts/{contractAddress}/witnesses/propose']['post']['responses'][409]>, {
|
|
16993
|
+
code: string;
|
|
16994
|
+
}>['code'];
|
|
15787
16995
|
type SubmitSignatureV5Request = Req<'/v5/contracts/{contractAddress}/witnesses/{intentId}/sign', 'post'>;
|
|
15788
16996
|
type SubmitSignatureV5Response = Res<'/v5/contracts/{contractAddress}/witnesses/{intentId}/sign', 'post'>;
|
|
15789
16997
|
type FinalizeWitnessV5Response = Res<'/v5/contracts/{contractAddress}/witnesses/{intentId}/finalize', 'post'>;
|
|
@@ -16022,6 +17230,28 @@ interface BeginOAuthLoginArgs {
|
|
|
16022
17230
|
* SSO (returns `login_required` if not possible). Default: unset.
|
|
16023
17231
|
*/
|
|
16024
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;
|
|
16025
17255
|
}
|
|
16026
17256
|
interface BeginOAuthLoginResult {
|
|
16027
17257
|
/** URL to redirect the user to. The caller does `window.location.assign(...)`. */
|
|
@@ -16040,7 +17270,13 @@ interface OAuthTokenSnapshot {
|
|
|
16040
17270
|
expiresAt: number;
|
|
16041
17271
|
}
|
|
16042
17272
|
type AuthMode = 'SessionCookie'
|
|
16043
|
-
/**
|
|
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
|
+
*/
|
|
16044
17280
|
| 'SessionOrBearer' | 'BearerJWT' | 'ApiKey' | 'SignedRequest' | 'Public';
|
|
16045
17281
|
interface RequestOpts {
|
|
16046
17282
|
body?: unknown;
|
|
@@ -16069,6 +17305,7 @@ declare class WitniumchainClient {
|
|
|
16069
17305
|
private readonly fetchImpl;
|
|
16070
17306
|
private accessToken;
|
|
16071
17307
|
private refreshToken;
|
|
17308
|
+
private idToken;
|
|
16072
17309
|
private hasRefreshCookie;
|
|
16073
17310
|
private readonly oauthClientId;
|
|
16074
17311
|
private readonly verifierStorage;
|
|
@@ -16231,7 +17468,33 @@ declare class WitniumchainClient {
|
|
|
16231
17468
|
finalizeWitness(contractAddress: string, witnessId: string): Promise<FinalizeWitnessResponse>;
|
|
16232
17469
|
revokeWitness(contractAddress: string, witnessId: string, body: RevokeWitnessRequest, idempotencyKey?: string): Promise<RevokeWitnessResponse>;
|
|
16233
17470
|
getWitness(contractAddress: string, witnessId: string): Promise<GetWitnessResponse>;
|
|
16234
|
-
|
|
17471
|
+
/**
|
|
17472
|
+
* Propose the witness of `body.dataId` in the witness scope `body.scope`
|
|
17473
|
+
* (64 hex, the SHA-256 of a key you choose; see {@link witnessScopeFor}).
|
|
17474
|
+
* Without a scope the SDK generates a random one, so the call is a new
|
|
17475
|
+
* witness; the scope comes back in the result and in every error, for a
|
|
17476
|
+
* retry that can never create or charge a second witness.
|
|
17477
|
+
*
|
|
17478
|
+
* - `outcome: "created"`: an intent; sign and finalize it as before.
|
|
17479
|
+
* One credit is reserved.
|
|
17480
|
+
* - `outcome: "existing"`: the scope already held the witness for this
|
|
17481
|
+
* dataId (`witnessId`, `blockNumber`, `chainTimestamp`). Nothing was
|
|
17482
|
+
* created or charged; there is nothing to sign.
|
|
17483
|
+
*
|
|
17484
|
+
* Errors are {@link WitnessProposeError} (with `scope`); a scope 409 is
|
|
17485
|
+
* {@link WitnessScopeConflictError} (with `code` and `witnessId`).
|
|
17486
|
+
*/
|
|
17487
|
+
proposeWitnessV5(contractAddress: string, body: ProposeWitnessV5Request): Promise<ProposeWitnessV5Result>;
|
|
17488
|
+
/**
|
|
17489
|
+
* @deprecated The `Idempotency-Key` path for proposes works for one more
|
|
17490
|
+
* release of accounts, then it is removed. Pass a `scope` in the body
|
|
17491
|
+
* instead (`await witnessScopeFor(key)`, or the key itself when it is
|
|
17492
|
+
* already 64 hex). The rule changes with it: a scope holds one witness
|
|
17493
|
+
* per dataId, shared by every caller on the contract, where a key was
|
|
17494
|
+
* one request per caller. The answer here has no `outcome` and no
|
|
17495
|
+
* `scope`; its errors are plain {@link WitniumchainApiError}s.
|
|
17496
|
+
*/
|
|
17497
|
+
proposeWitnessV5(contractAddress: string, body: ProposeWitnessV5LegacyRequest, idempotencyKey: string): Promise<ProposeWitnessV5LegacyResponse>;
|
|
16235
17498
|
/**
|
|
16236
17499
|
* What happened to an intent whose propose or finalize answer was lost
|
|
16237
17500
|
* (read-only, the caller's own contract): accounts' stored finalize
|
|
@@ -16415,6 +17678,20 @@ declare class WitniumchainClient {
|
|
|
16415
17678
|
* dropped — which it is, here.
|
|
16416
17679
|
*/
|
|
16417
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>;
|
|
16418
17695
|
private verifierStorageOrDefault;
|
|
16419
17696
|
private fetchDiscovery;
|
|
16420
17697
|
private postTokenEndpoint;
|
|
@@ -16807,8 +18084,21 @@ declare class WitniumchainApiKeyClient {
|
|
|
16807
18084
|
me(): Promise<ApiKeySelfResponse>;
|
|
16808
18085
|
/** Sign a payload with the key's own signing key (`delegatedKeyId` from {@link me}). */
|
|
16809
18086
|
sign(body: SignRequest, requestId?: string): Promise<SignResponse>;
|
|
16810
|
-
/**
|
|
16811
|
-
|
|
18087
|
+
/**
|
|
18088
|
+
* Propose a witness on the org's contract in the witness scope
|
|
18089
|
+
* `body.scope` (generated when absent; returned in the result and in
|
|
18090
|
+
* every error). `outcome: "created"` reserves one credit and is an
|
|
18091
|
+
* intent to sign and finalize; `outcome: "existing"` is the witness the
|
|
18092
|
+
* scope already held, not charged. See
|
|
18093
|
+
* {@link WitniumchainClient.proposeWitnessV5}.
|
|
18094
|
+
*/
|
|
18095
|
+
proposeWitnessV5(contractAddress: string, body: ProposeWitnessV5Request): Promise<ProposeWitnessV5Result>;
|
|
18096
|
+
/**
|
|
18097
|
+
* @deprecated The `Idempotency-Key` path for proposes works for one more
|
|
18098
|
+
* release of accounts. Pass a `scope` in the body instead; see
|
|
18099
|
+
* {@link WitniumchainClient.proposeWitnessV5}.
|
|
18100
|
+
*/
|
|
18101
|
+
proposeWitnessV5(contractAddress: string, body: ProposeWitnessV5LegacyRequest, idempotencyKey: string): Promise<ProposeWitnessV5LegacyResponse>;
|
|
16812
18102
|
/** Submit the signature for an intent this key proposed. */
|
|
16813
18103
|
signWitnessV5(contractAddress: string, intentId: string, body: SubmitSignatureV5Request): Promise<SubmitSignatureV5Response>;
|
|
16814
18104
|
/** Finalize an intent this key proposed; returns the witness id. */
|
|
@@ -16834,6 +18124,61 @@ declare class WitniumchainApiError extends Error {
|
|
|
16834
18124
|
body?: unknown;
|
|
16835
18125
|
});
|
|
16836
18126
|
}
|
|
18127
|
+
/**
|
|
18128
|
+
* Every error of a scoped witness propose (`proposeWitnessV5` without the
|
|
18129
|
+
* deprecated idempotency key): API errors, network errors and timeouts, a
|
|
18130
|
+
* response that broke off or is malformed. Carries the `scope` the propose
|
|
18131
|
+
* ran in, so the caller can retry in the same scope: a retry can never
|
|
18132
|
+
* create or charge a second witness for the same dataId. `status` is 0 when
|
|
18133
|
+
* there was no HTTP error status; the original error is `cause`.
|
|
18134
|
+
*/
|
|
18135
|
+
declare class WitnessProposeError extends WitniumchainApiError {
|
|
18136
|
+
/** The scope of the failed propose (64 lowercase hex). */
|
|
18137
|
+
readonly scope: string;
|
|
18138
|
+
constructor(cause: unknown, scope: string);
|
|
18139
|
+
}
|
|
18140
|
+
/**
|
|
18141
|
+
* A 409 to a scoped propose; branch on `code`:
|
|
18142
|
+
* - `scope_details_mismatch`: the scope holds (or is creating) the witness
|
|
18143
|
+
* for this dataId with another `userTimestamp`, `revealAfter` or
|
|
18144
|
+
* `drandRound`. `witnessId` is that witness once it is mined. Put the
|
|
18145
|
+
* detail into the scope, or use another scope.
|
|
18146
|
+
* - `scope_in_progress`: an attempt in the scope is in flight that this
|
|
18147
|
+
* request cannot join (another caller's, or your own with another body,
|
|
18148
|
+
* e.g. a re-encrypted `tlockCiphertext`: resend the identical body).
|
|
18149
|
+
* Retry later: once it is mined the answer is `existing`; once it failed
|
|
18150
|
+
* or expired the scope is free.
|
|
18151
|
+
* - `scope_registry_mismatch`: the scope's witness was proposed on the
|
|
18152
|
+
* other registry version.
|
|
18153
|
+
*/
|
|
18154
|
+
declare class WitnessScopeConflictError extends WitnessProposeError {
|
|
18155
|
+
readonly code: WitnessScopeConflictCode;
|
|
18156
|
+
/** The witness already in the scope (`scope_details_mismatch` once it is mined). */
|
|
18157
|
+
readonly witnessId: string | undefined;
|
|
18158
|
+
constructor(cause: WitniumchainApiError, scope: string, code: WitnessScopeConflictCode, witnessId: string | undefined);
|
|
18159
|
+
}
|
|
18160
|
+
|
|
18161
|
+
/**
|
|
18162
|
+
* Witness scopes. A scope holds at most one witness per content hash
|
|
18163
|
+
* (`dataId`), ever, shared by every caller on the contract. The scope is
|
|
18164
|
+
* the SHA-256 of a key the caller chooses, as 64 hex characters: hash a
|
|
18165
|
+
* date for "once per day", a project id for "once per project", a record id
|
|
18166
|
+
* for a pipeline, or use 32 random bytes for a new witness.
|
|
18167
|
+
*
|
|
18168
|
+
* - Same scope and dataId: the same witness (`outcome: "existing"`, not
|
|
18169
|
+
* charged), whoever proposed it.
|
|
18170
|
+
* - Same scope, another dataId: another witness in that scope.
|
|
18171
|
+
* - Duplicates on purpose: a new random scope.
|
|
18172
|
+
*/
|
|
18173
|
+
|
|
18174
|
+
/** A new scope: 32 random bytes as 64 lowercase hex. Every propose in it is a new witness. */
|
|
18175
|
+
declare function randomWitnessScope(): string;
|
|
18176
|
+
/**
|
|
18177
|
+
* The scope of a key you choose: SHA-256 of its UTF-8 bytes, 64 lowercase
|
|
18178
|
+
* hex. Witnium never sees the key itself. `witnessScopeFor('2026-11-06')`
|
|
18179
|
+
* holds one witness per dataId for that day.
|
|
18180
|
+
*/
|
|
18181
|
+
declare function witnessScopeFor(key: string): Promise<string>;
|
|
16837
18182
|
|
|
16838
18183
|
/**
|
|
16839
18184
|
* Canonical owner-operation messages.
|
|
@@ -16941,4 +18286,4 @@ declare const ownerKeyFile: {
|
|
|
16941
18286
|
sign: typeof signWithOwnerKeyFile;
|
|
16942
18287
|
};
|
|
16943
18288
|
|
|
16944
|
-
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 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, WitniumchainApiError, WitniumchainApiKeyClient, type WitniumchainApiKeyClientConfig, WitniumchainChainAdminClient, type WitniumchainChainAdminClientConfig, WitniumchainClient, type WitniumchainClientConfig, buildAddSigningKeyPayload, buildPausePayload, buildRevokeSigningKeyPayload, buildUnpausePayload, defaultVerifierStorage, generateOwnerKeyFile, ownerKeyFile, ownerKeyFileName, parseOwnerKeyFile, serializeOwnerKeyFile, signWithOwnerKeyFile };
|
|
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 };
|