@witnium/witniumchain 0.28.0 → 0.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1459 -16
- package/dist/index.d.ts +1459 -16
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -669,7 +669,7 @@ interface paths$1 {
|
|
|
669
669
|
put?: never;
|
|
670
670
|
/**
|
|
671
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)
|
|
672
|
+
* @description Opens the link a sysadmin had emailed (plan §9.9; any browser: the link proves the mailbox) 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. Opening does not use the link up: saving the method does, in the same transaction, so a link opened and not finished still works, in this browser or another; opening it again ends the enrollment opened before. One completed use, 72 hours; a newer link or any security change ends it (400, and its open enrollment ends). An account with an authenticator app proves a current code first.
|
|
673
673
|
*/
|
|
674
674
|
post: {
|
|
675
675
|
parameters: {
|
|
@@ -699,6 +699,8 @@ interface paths$1 {
|
|
|
699
699
|
* @enum {string}
|
|
700
700
|
*/
|
|
701
701
|
next: "secure-account";
|
|
702
|
+
/** @description The account the link is for, as `GET /v1/auth/enrollment` shows it too. The app compares it with a signed-in session to offer signing out first when that is another account. */
|
|
703
|
+
email: string;
|
|
702
704
|
};
|
|
703
705
|
};
|
|
704
706
|
};
|
|
@@ -9130,7 +9132,7 @@ interface paths$1 {
|
|
|
9130
9132
|
put?: never;
|
|
9131
9133
|
/**
|
|
9132
9134
|
* Check whether an accounts-minted access token is still active
|
|
9133
|
-
* @description For resource servers (MCP, chain API). Verifies the signature, then checks the security epoch, the grant or session the token came from, and the
|
|
9135
|
+
* @description For resource servers (MCP, chain API, Witnium Vault). Verifies the signature, then checks the security epoch, the grant or session the token came from, the membership and, for a Witnium Vault token, the org's Witnium Vault entitlement, uncached. Answers 200 `{active:false}` for any token that is not active. Callers MUST treat any non-200 answer or network failure as inactive. See docs/token-introspection.md.
|
|
9134
9136
|
*/
|
|
9135
9137
|
post: {
|
|
9136
9138
|
parameters: {
|
|
@@ -9183,6 +9185,28 @@ interface paths$1 {
|
|
|
9183
9185
|
sepoch: number;
|
|
9184
9186
|
grant_id: string | null;
|
|
9185
9187
|
session_id: string | null;
|
|
9188
|
+
/**
|
|
9189
|
+
* IntrospectEntitlement
|
|
9190
|
+
* @description For a Witnium Vault token (aud is https://api.witniumvault.com or …/admin): the org's live Witnium Vault entitlement, read now. A Witnium Vault token whose org no longer holds one is inactive. null for every other token.
|
|
9191
|
+
*/
|
|
9192
|
+
entitlement: {
|
|
9193
|
+
/** @enum {string} */
|
|
9194
|
+
product: "witnium-vault";
|
|
9195
|
+
/**
|
|
9196
|
+
* @description How the org holds Witnium Vault: a trial, a Stripe subscription, or free (granted by Witnium).
|
|
9197
|
+
* @enum {string}
|
|
9198
|
+
*/
|
|
9199
|
+
access: "trial" | "paid" | "complimentary";
|
|
9200
|
+
/** @enum {string} */
|
|
9201
|
+
plan: "personal" | "plus" | "team";
|
|
9202
|
+
/**
|
|
9203
|
+
* Format: date-time
|
|
9204
|
+
* @description When the entitlement stops (ISO 8601): the end of a trial or free period, or when a canceled or unpaid subscription ends or ended. null = no time limit.
|
|
9205
|
+
*/
|
|
9206
|
+
expiresAt: string | null;
|
|
9207
|
+
/** @description True while the entitlement is active and not past expiresAt. False: the org still signs in and reads, and the product decides what else an expired entitlement allows (Witnium Vault: no new uploads). */
|
|
9208
|
+
current: boolean;
|
|
9209
|
+
} | null;
|
|
9186
9210
|
} | {
|
|
9187
9211
|
/** @enum {boolean} */
|
|
9188
9212
|
active: false;
|
|
@@ -9415,6 +9439,11 @@ interface paths$1 {
|
|
|
9415
9439
|
};
|
|
9416
9440
|
content: {
|
|
9417
9441
|
"application/json": {
|
|
9442
|
+
/**
|
|
9443
|
+
* Format: uuid
|
|
9444
|
+
* @description This enrollment. Every enrollment submission names it in `X-Enrollment-Id`.
|
|
9445
|
+
*/
|
|
9446
|
+
id: string;
|
|
9418
9447
|
email: string;
|
|
9419
9448
|
/** @enum {string} */
|
|
9420
9449
|
purpose: "signup" | "recovery" | "recovery_code" | "reenroll";
|
|
@@ -9477,7 +9506,9 @@ interface paths$1 {
|
|
|
9477
9506
|
post: {
|
|
9478
9507
|
parameters: {
|
|
9479
9508
|
query?: never;
|
|
9480
|
-
header
|
|
9509
|
+
header: {
|
|
9510
|
+
"x-enrollment-id": string;
|
|
9511
|
+
};
|
|
9481
9512
|
path?: never;
|
|
9482
9513
|
cookie?: never;
|
|
9483
9514
|
};
|
|
@@ -9500,6 +9531,31 @@ interface paths$1 {
|
|
|
9500
9531
|
};
|
|
9501
9532
|
};
|
|
9502
9533
|
};
|
|
9534
|
+
/** @description Bad Request — validation failed */
|
|
9535
|
+
400: {
|
|
9536
|
+
headers: {
|
|
9537
|
+
[name: string]: unknown;
|
|
9538
|
+
};
|
|
9539
|
+
content: {
|
|
9540
|
+
"application/json": {
|
|
9541
|
+
/**
|
|
9542
|
+
* @description HTTP status code
|
|
9543
|
+
* @example 400
|
|
9544
|
+
*/
|
|
9545
|
+
statusCode?: number;
|
|
9546
|
+
/**
|
|
9547
|
+
* @description Short error label
|
|
9548
|
+
* @example Bad Request
|
|
9549
|
+
*/
|
|
9550
|
+
error?: string;
|
|
9551
|
+
/**
|
|
9552
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
9553
|
+
* @example Validation failed
|
|
9554
|
+
*/
|
|
9555
|
+
message: string | string[];
|
|
9556
|
+
};
|
|
9557
|
+
};
|
|
9558
|
+
};
|
|
9503
9559
|
/** @description Unauthorized — authentication required or invalid */
|
|
9504
9560
|
401: {
|
|
9505
9561
|
headers: {
|
|
@@ -9550,6 +9606,31 @@ interface paths$1 {
|
|
|
9550
9606
|
};
|
|
9551
9607
|
};
|
|
9552
9608
|
};
|
|
9609
|
+
/** @description Conflict */
|
|
9610
|
+
409: {
|
|
9611
|
+
headers: {
|
|
9612
|
+
[name: string]: unknown;
|
|
9613
|
+
};
|
|
9614
|
+
content: {
|
|
9615
|
+
"application/json": {
|
|
9616
|
+
/**
|
|
9617
|
+
* @description HTTP status code
|
|
9618
|
+
* @example 400
|
|
9619
|
+
*/
|
|
9620
|
+
statusCode?: number;
|
|
9621
|
+
/**
|
|
9622
|
+
* @description Short error label
|
|
9623
|
+
* @example Bad Request
|
|
9624
|
+
*/
|
|
9625
|
+
error?: string;
|
|
9626
|
+
/**
|
|
9627
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
9628
|
+
* @example Validation failed
|
|
9629
|
+
*/
|
|
9630
|
+
message: string | string[];
|
|
9631
|
+
};
|
|
9632
|
+
};
|
|
9633
|
+
};
|
|
9553
9634
|
};
|
|
9554
9635
|
};
|
|
9555
9636
|
delete?: never;
|
|
@@ -9574,7 +9655,9 @@ interface paths$1 {
|
|
|
9574
9655
|
post: {
|
|
9575
9656
|
parameters: {
|
|
9576
9657
|
query?: never;
|
|
9577
|
-
header
|
|
9658
|
+
header: {
|
|
9659
|
+
"x-enrollment-id": string;
|
|
9660
|
+
};
|
|
9578
9661
|
path?: never;
|
|
9579
9662
|
cookie?: never;
|
|
9580
9663
|
};
|
|
@@ -9591,6 +9674,31 @@ interface paths$1 {
|
|
|
9591
9674
|
};
|
|
9592
9675
|
};
|
|
9593
9676
|
};
|
|
9677
|
+
/** @description Bad Request — validation failed */
|
|
9678
|
+
400: {
|
|
9679
|
+
headers: {
|
|
9680
|
+
[name: string]: unknown;
|
|
9681
|
+
};
|
|
9682
|
+
content: {
|
|
9683
|
+
"application/json": {
|
|
9684
|
+
/**
|
|
9685
|
+
* @description HTTP status code
|
|
9686
|
+
* @example 400
|
|
9687
|
+
*/
|
|
9688
|
+
statusCode?: number;
|
|
9689
|
+
/**
|
|
9690
|
+
* @description Short error label
|
|
9691
|
+
* @example Bad Request
|
|
9692
|
+
*/
|
|
9693
|
+
error?: string;
|
|
9694
|
+
/**
|
|
9695
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
9696
|
+
* @example Validation failed
|
|
9697
|
+
*/
|
|
9698
|
+
message: string | string[];
|
|
9699
|
+
};
|
|
9700
|
+
};
|
|
9701
|
+
};
|
|
9594
9702
|
/** @description Unauthorized — authentication required or invalid */
|
|
9595
9703
|
401: {
|
|
9596
9704
|
headers: {
|
|
@@ -9641,6 +9749,31 @@ interface paths$1 {
|
|
|
9641
9749
|
};
|
|
9642
9750
|
};
|
|
9643
9751
|
};
|
|
9752
|
+
/** @description Conflict */
|
|
9753
|
+
409: {
|
|
9754
|
+
headers: {
|
|
9755
|
+
[name: string]: unknown;
|
|
9756
|
+
};
|
|
9757
|
+
content: {
|
|
9758
|
+
"application/json": {
|
|
9759
|
+
/**
|
|
9760
|
+
* @description HTTP status code
|
|
9761
|
+
* @example 400
|
|
9762
|
+
*/
|
|
9763
|
+
statusCode?: number;
|
|
9764
|
+
/**
|
|
9765
|
+
* @description Short error label
|
|
9766
|
+
* @example Bad Request
|
|
9767
|
+
*/
|
|
9768
|
+
error?: string;
|
|
9769
|
+
/**
|
|
9770
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
9771
|
+
* @example Validation failed
|
|
9772
|
+
*/
|
|
9773
|
+
message: string | string[];
|
|
9774
|
+
};
|
|
9775
|
+
};
|
|
9776
|
+
};
|
|
9644
9777
|
};
|
|
9645
9778
|
};
|
|
9646
9779
|
delete?: never;
|
|
@@ -9665,7 +9798,9 @@ interface paths$1 {
|
|
|
9665
9798
|
post: {
|
|
9666
9799
|
parameters: {
|
|
9667
9800
|
query?: never;
|
|
9668
|
-
header
|
|
9801
|
+
header: {
|
|
9802
|
+
"x-enrollment-id": string;
|
|
9803
|
+
};
|
|
9669
9804
|
path?: never;
|
|
9670
9805
|
cookie?: never;
|
|
9671
9806
|
};
|
|
@@ -9819,7 +9954,9 @@ interface paths$1 {
|
|
|
9819
9954
|
post: {
|
|
9820
9955
|
parameters: {
|
|
9821
9956
|
query?: never;
|
|
9822
|
-
header
|
|
9957
|
+
header: {
|
|
9958
|
+
"x-enrollment-id": string;
|
|
9959
|
+
};
|
|
9823
9960
|
path?: never;
|
|
9824
9961
|
cookie?: never;
|
|
9825
9962
|
};
|
|
@@ -9896,6 +10033,31 @@ interface paths$1 {
|
|
|
9896
10033
|
};
|
|
9897
10034
|
};
|
|
9898
10035
|
};
|
|
10036
|
+
/** @description Conflict */
|
|
10037
|
+
409: {
|
|
10038
|
+
headers: {
|
|
10039
|
+
[name: string]: unknown;
|
|
10040
|
+
};
|
|
10041
|
+
content: {
|
|
10042
|
+
"application/json": {
|
|
10043
|
+
/**
|
|
10044
|
+
* @description HTTP status code
|
|
10045
|
+
* @example 400
|
|
10046
|
+
*/
|
|
10047
|
+
statusCode?: number;
|
|
10048
|
+
/**
|
|
10049
|
+
* @description Short error label
|
|
10050
|
+
* @example Bad Request
|
|
10051
|
+
*/
|
|
10052
|
+
error?: string;
|
|
10053
|
+
/**
|
|
10054
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
10055
|
+
* @example Validation failed
|
|
10056
|
+
*/
|
|
10057
|
+
message: string | string[];
|
|
10058
|
+
};
|
|
10059
|
+
};
|
|
10060
|
+
};
|
|
9899
10061
|
/** @description Service Unavailable */
|
|
9900
10062
|
503: {
|
|
9901
10063
|
headers: {
|
|
@@ -9945,7 +10107,9 @@ interface paths$1 {
|
|
|
9945
10107
|
post: {
|
|
9946
10108
|
parameters: {
|
|
9947
10109
|
query?: never;
|
|
9948
|
-
header
|
|
10110
|
+
header: {
|
|
10111
|
+
"x-enrollment-id": string;
|
|
10112
|
+
};
|
|
9949
10113
|
path?: never;
|
|
9950
10114
|
cookie?: never;
|
|
9951
10115
|
};
|
|
@@ -13398,7 +13562,7 @@ interface paths$1 {
|
|
|
13398
13562
|
put?: never;
|
|
13399
13563
|
/**
|
|
13400
13564
|
* 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.
|
|
13565
|
+
* @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. With a bearer token, the step-up is an `auth_time` in the last 5 minutes (authorize with `max_age=0` first).
|
|
13402
13566
|
*/
|
|
13403
13567
|
post: {
|
|
13404
13568
|
parameters: {
|
|
@@ -13740,8 +13904,11 @@ interface paths$1 {
|
|
|
13740
13904
|
content: {
|
|
13741
13905
|
"application/json": {
|
|
13742
13906
|
uid: string;
|
|
13743
|
-
/**
|
|
13744
|
-
|
|
13907
|
+
/**
|
|
13908
|
+
* @description `product_access`: the person's organization doesn't have the client's product (`client.product`; today only Witnium Vault) yet. `access` says which page: `start_trial` (an org admin: confirm the trial with /start-trial) or `ask_admin` (a member: ask the admins with /access-request). Cancel / Back is /abort, which ends the sign-in with access_denied. Shown on the consent route.
|
|
13909
|
+
* @enum {string}
|
|
13910
|
+
*/
|
|
13911
|
+
prompt: "login" | "consent" | "product_access";
|
|
13745
13912
|
client: {
|
|
13746
13913
|
id: string;
|
|
13747
13914
|
name: string;
|
|
@@ -13750,7 +13917,7 @@ interface paths$1 {
|
|
|
13750
13917
|
* @description The product the app belongs to, for branding; null shows neutral Witnium.
|
|
13751
13918
|
*/
|
|
13752
13919
|
product: {
|
|
13753
|
-
/** @description Product slug, e.g. `chain` or `vault`. */
|
|
13920
|
+
/** @description Product slug, e.g. `chain` or `witnium-vault`. */
|
|
13754
13921
|
id: string;
|
|
13755
13922
|
name: string;
|
|
13756
13923
|
/** ProductBranding */
|
|
@@ -13768,6 +13935,8 @@ interface paths$1 {
|
|
|
13768
13935
|
} | null;
|
|
13769
13936
|
firstParty: boolean;
|
|
13770
13937
|
};
|
|
13938
|
+
/** @description Consent prompt only (always there): whether `/switch-account` is still possible. False once consent was given in this interaction (then switching answers 409 `already_confirmed`). */
|
|
13939
|
+
canSwitchAccount?: boolean;
|
|
13771
13940
|
/** @description Consent prompt only: the requested scopes the provider serves. */
|
|
13772
13941
|
scopes?: {
|
|
13773
13942
|
name: string;
|
|
@@ -13790,8 +13959,21 @@ interface paths$1 {
|
|
|
13790
13959
|
* @enum {boolean}
|
|
13791
13960
|
*/
|
|
13792
13961
|
reauth?: true;
|
|
13793
|
-
/** @description
|
|
13962
|
+
/** @description The signed-in account: with `reauth`, the account of the current session; in a consent prompt (always), the account consent is asked of. Show it with a way to switch account (`/switch-account`). */
|
|
13794
13963
|
email?: string;
|
|
13964
|
+
/** @description `product_access` only (always): the organization that doesn't have the product yet. */
|
|
13965
|
+
organization?: {
|
|
13966
|
+
name: string;
|
|
13967
|
+
};
|
|
13968
|
+
/**
|
|
13969
|
+
* @description `product_access` only (always): which page to show. `enable_witnessing`: the app asked to turn witnessing on its behalf back on (`witnium_witnessing=enable`); offer /witnessing-authorization (Allow) and /witnessing-authorization/decline (Not now: the sign-in goes on without it).
|
|
13970
|
+
* @enum {string}
|
|
13971
|
+
*/
|
|
13972
|
+
access?: "start_trial" | "ask_admin" | "enable_witnessing";
|
|
13973
|
+
/** @description `product_access` with `start_trial` only (always): the trial's length in days. */
|
|
13974
|
+
trialDays?: number;
|
|
13975
|
+
/** @description `product_access` with `ask_admin` only (always): the person already asked this organization's admins, and the organization hasn't got the product yet. */
|
|
13976
|
+
accessRequested?: boolean;
|
|
13795
13977
|
};
|
|
13796
13978
|
};
|
|
13797
13979
|
};
|
|
@@ -14047,7 +14229,7 @@ interface paths$1 {
|
|
|
14047
14229
|
put?: never;
|
|
14048
14230
|
/**
|
|
14049
14231
|
* 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.
|
|
14232
|
+
* @description Finishes the interaction with `access_denied` (and ends a signing key it was adding); from the `product_access` prompt, with the description that an admin can start Witnium Vault. Navigate to `redirectTo`. Allowed Origin only. Needs the provider's `_interaction` cookie (path `/interaction/<uid>`), which the browser holds from /auth.
|
|
14051
14233
|
*/
|
|
14052
14234
|
post: {
|
|
14053
14235
|
parameters: {
|
|
@@ -14158,6 +14340,1267 @@ interface paths$1 {
|
|
|
14158
14340
|
patch?: never;
|
|
14159
14341
|
trace?: never;
|
|
14160
14342
|
};
|
|
14343
|
+
"/interaction/{uid}/switch-account": {
|
|
14344
|
+
parameters: {
|
|
14345
|
+
query?: never;
|
|
14346
|
+
header?: never;
|
|
14347
|
+
path?: never;
|
|
14348
|
+
cookie?: never;
|
|
14349
|
+
};
|
|
14350
|
+
get?: never;
|
|
14351
|
+
put?: never;
|
|
14352
|
+
/**
|
|
14353
|
+
* Switch account
|
|
14354
|
+
* @description Before consent is given only. Signs this browser out of the Witnium Account (`wac_session` revoked and cleared, the provider session destroyed and `_session` cleared) without ending the authorization request: navigate to `redirectTo` (the provider's resume), which continues the same request with a login prompt, i.e. at the account app's `/signin?interaction=<uid>` with the new interaction id. The account that signs in next answers the request; nothing is granted to the signed-out one. Once consent was given in this interaction (`canSwitchAccount: false` in /details): 409 `already_confirmed` and nothing changes, with `redirectTo` (the resume) once that consent finished, or with its `state` while its signing key is being set up or failed (stay on the consent page). Serialized with /confirm, /abort and the resume. Any prompt. Allowed Origin only. Needs the provider's `_interaction` cookie (path `/interaction/<uid>`), which the browser holds from /auth.
|
|
14355
|
+
*/
|
|
14356
|
+
post: {
|
|
14357
|
+
parameters: {
|
|
14358
|
+
query?: never;
|
|
14359
|
+
header?: never;
|
|
14360
|
+
path: {
|
|
14361
|
+
uid: string;
|
|
14362
|
+
};
|
|
14363
|
+
cookie?: never;
|
|
14364
|
+
};
|
|
14365
|
+
requestBody?: never;
|
|
14366
|
+
responses: {
|
|
14367
|
+
/** @description Success */
|
|
14368
|
+
200: {
|
|
14369
|
+
headers: {
|
|
14370
|
+
[name: string]: unknown;
|
|
14371
|
+
};
|
|
14372
|
+
content: {
|
|
14373
|
+
"application/json": {
|
|
14374
|
+
/**
|
|
14375
|
+
* Format: uri
|
|
14376
|
+
* @description Navigate the browser here (the provider's resume).
|
|
14377
|
+
*/
|
|
14378
|
+
redirectTo: string;
|
|
14379
|
+
};
|
|
14380
|
+
};
|
|
14381
|
+
};
|
|
14382
|
+
/** @description Bad Request — validation failed */
|
|
14383
|
+
400: {
|
|
14384
|
+
headers: {
|
|
14385
|
+
[name: string]: unknown;
|
|
14386
|
+
};
|
|
14387
|
+
content: {
|
|
14388
|
+
"application/json": {
|
|
14389
|
+
/**
|
|
14390
|
+
* @description HTTP status code
|
|
14391
|
+
* @example 400
|
|
14392
|
+
*/
|
|
14393
|
+
statusCode?: number;
|
|
14394
|
+
/**
|
|
14395
|
+
* @description Short error label
|
|
14396
|
+
* @example Bad Request
|
|
14397
|
+
*/
|
|
14398
|
+
error?: string;
|
|
14399
|
+
/**
|
|
14400
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14401
|
+
* @example Validation failed
|
|
14402
|
+
*/
|
|
14403
|
+
message: string | string[];
|
|
14404
|
+
};
|
|
14405
|
+
};
|
|
14406
|
+
};
|
|
14407
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
14408
|
+
403: {
|
|
14409
|
+
headers: {
|
|
14410
|
+
[name: string]: unknown;
|
|
14411
|
+
};
|
|
14412
|
+
content: {
|
|
14413
|
+
"application/json": {
|
|
14414
|
+
/**
|
|
14415
|
+
* @description HTTP status code
|
|
14416
|
+
* @example 400
|
|
14417
|
+
*/
|
|
14418
|
+
statusCode?: number;
|
|
14419
|
+
/**
|
|
14420
|
+
* @description Short error label
|
|
14421
|
+
* @example Bad Request
|
|
14422
|
+
*/
|
|
14423
|
+
error?: string;
|
|
14424
|
+
/**
|
|
14425
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14426
|
+
* @example Validation failed
|
|
14427
|
+
*/
|
|
14428
|
+
message: string | string[];
|
|
14429
|
+
};
|
|
14430
|
+
};
|
|
14431
|
+
};
|
|
14432
|
+
/** @description Conflict */
|
|
14433
|
+
409: {
|
|
14434
|
+
headers: {
|
|
14435
|
+
[name: string]: unknown;
|
|
14436
|
+
};
|
|
14437
|
+
content: {
|
|
14438
|
+
"application/json": {
|
|
14439
|
+
/** @enum {number} */
|
|
14440
|
+
statusCode: 409;
|
|
14441
|
+
/** @enum {string} */
|
|
14442
|
+
error: "already_confirmed" | "interaction_busy";
|
|
14443
|
+
message: string;
|
|
14444
|
+
/**
|
|
14445
|
+
* Format: uri
|
|
14446
|
+
* @description With `already_confirmed` once the consent finished: the resume; navigate there to continue the ordinary way.
|
|
14447
|
+
*/
|
|
14448
|
+
redirectTo?: string;
|
|
14449
|
+
/**
|
|
14450
|
+
* @description With `already_confirmed` while the consent has not finished (its signing key is being set up, or that failed): where it stands, as /details reports it. Stay on the consent page.
|
|
14451
|
+
* @enum {string}
|
|
14452
|
+
*/
|
|
14453
|
+
state?: "ready" | "provisioning" | "no_contract" | "refused";
|
|
14454
|
+
/**
|
|
14455
|
+
* @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.
|
|
14456
|
+
* @enum {string}
|
|
14457
|
+
*/
|
|
14458
|
+
refusal?: "self_custody" | "suspended" | "not_home" | "connection_ended" | "key_add_failed" | "contract_busy" | "key_rate_limited";
|
|
14459
|
+
};
|
|
14460
|
+
};
|
|
14461
|
+
};
|
|
14462
|
+
/** @description Gone */
|
|
14463
|
+
410: {
|
|
14464
|
+
headers: {
|
|
14465
|
+
[name: string]: unknown;
|
|
14466
|
+
};
|
|
14467
|
+
content: {
|
|
14468
|
+
"application/json": {
|
|
14469
|
+
/**
|
|
14470
|
+
* @description HTTP status code
|
|
14471
|
+
* @example 400
|
|
14472
|
+
*/
|
|
14473
|
+
statusCode?: number;
|
|
14474
|
+
/**
|
|
14475
|
+
* @description Short error label
|
|
14476
|
+
* @example Bad Request
|
|
14477
|
+
*/
|
|
14478
|
+
error?: string;
|
|
14479
|
+
/**
|
|
14480
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14481
|
+
* @example Validation failed
|
|
14482
|
+
*/
|
|
14483
|
+
message: string | string[];
|
|
14484
|
+
};
|
|
14485
|
+
};
|
|
14486
|
+
};
|
|
14487
|
+
};
|
|
14488
|
+
};
|
|
14489
|
+
delete?: never;
|
|
14490
|
+
options?: never;
|
|
14491
|
+
head?: never;
|
|
14492
|
+
patch?: never;
|
|
14493
|
+
trace?: never;
|
|
14494
|
+
};
|
|
14495
|
+
"/interaction/{uid}/start-trial": {
|
|
14496
|
+
parameters: {
|
|
14497
|
+
query?: never;
|
|
14498
|
+
header?: never;
|
|
14499
|
+
path?: never;
|
|
14500
|
+
cookie?: never;
|
|
14501
|
+
};
|
|
14502
|
+
get?: never;
|
|
14503
|
+
put?: never;
|
|
14504
|
+
/**
|
|
14505
|
+
* Start the organization's Witnium Vault trial
|
|
14506
|
+
* @description `product_access` prompt with `access: start_trial` only (an org admin). The only way a self-service trial is created: it starts for the interaction's organization, for `trialDays` days, audited, and closes the members' open requests. Navigate to `redirectTo` (the provider's resume): the sign-in goes on. Allowed Origin only. Needs the provider's `_interaction` cookie (path `/interaction/<uid>`), which the browser holds from /auth.
|
|
14507
|
+
*/
|
|
14508
|
+
post: {
|
|
14509
|
+
parameters: {
|
|
14510
|
+
query?: never;
|
|
14511
|
+
header?: never;
|
|
14512
|
+
path: {
|
|
14513
|
+
uid: string;
|
|
14514
|
+
};
|
|
14515
|
+
cookie?: never;
|
|
14516
|
+
};
|
|
14517
|
+
requestBody?: never;
|
|
14518
|
+
responses: {
|
|
14519
|
+
/** @description Success */
|
|
14520
|
+
200: {
|
|
14521
|
+
headers: {
|
|
14522
|
+
[name: string]: unknown;
|
|
14523
|
+
};
|
|
14524
|
+
content: {
|
|
14525
|
+
"application/json": {
|
|
14526
|
+
/**
|
|
14527
|
+
* Format: uri
|
|
14528
|
+
* @description Navigate the browser here (the provider's resume).
|
|
14529
|
+
*/
|
|
14530
|
+
redirectTo: string;
|
|
14531
|
+
};
|
|
14532
|
+
};
|
|
14533
|
+
};
|
|
14534
|
+
/** @description Bad Request — validation failed */
|
|
14535
|
+
400: {
|
|
14536
|
+
headers: {
|
|
14537
|
+
[name: string]: unknown;
|
|
14538
|
+
};
|
|
14539
|
+
content: {
|
|
14540
|
+
"application/json": {
|
|
14541
|
+
/**
|
|
14542
|
+
* @description HTTP status code
|
|
14543
|
+
* @example 400
|
|
14544
|
+
*/
|
|
14545
|
+
statusCode?: number;
|
|
14546
|
+
/**
|
|
14547
|
+
* @description Short error label
|
|
14548
|
+
* @example Bad Request
|
|
14549
|
+
*/
|
|
14550
|
+
error?: string;
|
|
14551
|
+
/**
|
|
14552
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14553
|
+
* @example Validation failed
|
|
14554
|
+
*/
|
|
14555
|
+
message: string | string[];
|
|
14556
|
+
};
|
|
14557
|
+
};
|
|
14558
|
+
};
|
|
14559
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
14560
|
+
403: {
|
|
14561
|
+
headers: {
|
|
14562
|
+
[name: string]: unknown;
|
|
14563
|
+
};
|
|
14564
|
+
content: {
|
|
14565
|
+
"application/json": {
|
|
14566
|
+
/**
|
|
14567
|
+
* @description HTTP status code
|
|
14568
|
+
* @example 400
|
|
14569
|
+
*/
|
|
14570
|
+
statusCode?: number;
|
|
14571
|
+
/**
|
|
14572
|
+
* @description Short error label
|
|
14573
|
+
* @example Bad Request
|
|
14574
|
+
*/
|
|
14575
|
+
error?: string;
|
|
14576
|
+
/**
|
|
14577
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14578
|
+
* @example Validation failed
|
|
14579
|
+
*/
|
|
14580
|
+
message: string | string[];
|
|
14581
|
+
};
|
|
14582
|
+
};
|
|
14583
|
+
};
|
|
14584
|
+
/** @description Gone */
|
|
14585
|
+
410: {
|
|
14586
|
+
headers: {
|
|
14587
|
+
[name: string]: unknown;
|
|
14588
|
+
};
|
|
14589
|
+
content: {
|
|
14590
|
+
"application/json": {
|
|
14591
|
+
/**
|
|
14592
|
+
* @description HTTP status code
|
|
14593
|
+
* @example 400
|
|
14594
|
+
*/
|
|
14595
|
+
statusCode?: number;
|
|
14596
|
+
/**
|
|
14597
|
+
* @description Short error label
|
|
14598
|
+
* @example Bad Request
|
|
14599
|
+
*/
|
|
14600
|
+
error?: string;
|
|
14601
|
+
/**
|
|
14602
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14603
|
+
* @example Validation failed
|
|
14604
|
+
*/
|
|
14605
|
+
message: string | string[];
|
|
14606
|
+
};
|
|
14607
|
+
};
|
|
14608
|
+
};
|
|
14609
|
+
};
|
|
14610
|
+
};
|
|
14611
|
+
delete?: never;
|
|
14612
|
+
options?: never;
|
|
14613
|
+
head?: never;
|
|
14614
|
+
patch?: never;
|
|
14615
|
+
trace?: never;
|
|
14616
|
+
};
|
|
14617
|
+
"/interaction/{uid}/access-request": {
|
|
14618
|
+
parameters: {
|
|
14619
|
+
query?: never;
|
|
14620
|
+
header?: never;
|
|
14621
|
+
path?: never;
|
|
14622
|
+
cookie?: never;
|
|
14623
|
+
};
|
|
14624
|
+
get?: never;
|
|
14625
|
+
put?: never;
|
|
14626
|
+
/**
|
|
14627
|
+
* Ask the organization's admins for the client's product (Witnium Vault)
|
|
14628
|
+
* @description `product_access` prompt with `access: ask_admin` only. Records one open request per person, organization and product (audited), and emails the organization's active, accepted admins a link to Witnium Vault. When the organization's Witnium Vault starts, the request closes and the person is emailed. 429 after 5 asks an hour per person; 502 when the admins could not be emailed (nothing recorded; ask again). Allowed Origin only. Needs the provider's `_interaction` cookie (path `/interaction/<uid>`), which the browser holds from /auth.
|
|
14629
|
+
*/
|
|
14630
|
+
post: {
|
|
14631
|
+
parameters: {
|
|
14632
|
+
query?: never;
|
|
14633
|
+
header?: never;
|
|
14634
|
+
path: {
|
|
14635
|
+
uid: string;
|
|
14636
|
+
};
|
|
14637
|
+
cookie?: never;
|
|
14638
|
+
};
|
|
14639
|
+
requestBody?: never;
|
|
14640
|
+
responses: {
|
|
14641
|
+
/** @description Success */
|
|
14642
|
+
200: {
|
|
14643
|
+
headers: {
|
|
14644
|
+
[name: string]: unknown;
|
|
14645
|
+
};
|
|
14646
|
+
content: {
|
|
14647
|
+
"application/json": {
|
|
14648
|
+
/**
|
|
14649
|
+
* @description `requested`: the organization's admins were emailed. `already_requested`: this person's request is still open; nobody was emailed again. `no_admin`: the organization has no admin who could get the email; nothing was recorded.
|
|
14650
|
+
* @enum {string}
|
|
14651
|
+
*/
|
|
14652
|
+
state: "requested" | "already_requested" | "no_admin";
|
|
14653
|
+
organization: {
|
|
14654
|
+
name: string;
|
|
14655
|
+
};
|
|
14656
|
+
} | {
|
|
14657
|
+
/** @enum {string} */
|
|
14658
|
+
state: "continue";
|
|
14659
|
+
/**
|
|
14660
|
+
* Format: uri
|
|
14661
|
+
* @description Navigate here (the provider's resume): the sign-in goes on.
|
|
14662
|
+
*/
|
|
14663
|
+
redirectTo: string;
|
|
14664
|
+
};
|
|
14665
|
+
};
|
|
14666
|
+
};
|
|
14667
|
+
/** @description Bad Request — validation failed */
|
|
14668
|
+
400: {
|
|
14669
|
+
headers: {
|
|
14670
|
+
[name: string]: unknown;
|
|
14671
|
+
};
|
|
14672
|
+
content: {
|
|
14673
|
+
"application/json": {
|
|
14674
|
+
/**
|
|
14675
|
+
* @description HTTP status code
|
|
14676
|
+
* @example 400
|
|
14677
|
+
*/
|
|
14678
|
+
statusCode?: number;
|
|
14679
|
+
/**
|
|
14680
|
+
* @description Short error label
|
|
14681
|
+
* @example Bad Request
|
|
14682
|
+
*/
|
|
14683
|
+
error?: string;
|
|
14684
|
+
/**
|
|
14685
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14686
|
+
* @example Validation failed
|
|
14687
|
+
*/
|
|
14688
|
+
message: string | string[];
|
|
14689
|
+
};
|
|
14690
|
+
};
|
|
14691
|
+
};
|
|
14692
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
14693
|
+
403: {
|
|
14694
|
+
headers: {
|
|
14695
|
+
[name: string]: unknown;
|
|
14696
|
+
};
|
|
14697
|
+
content: {
|
|
14698
|
+
"application/json": {
|
|
14699
|
+
/**
|
|
14700
|
+
* @description HTTP status code
|
|
14701
|
+
* @example 400
|
|
14702
|
+
*/
|
|
14703
|
+
statusCode?: number;
|
|
14704
|
+
/**
|
|
14705
|
+
* @description Short error label
|
|
14706
|
+
* @example Bad Request
|
|
14707
|
+
*/
|
|
14708
|
+
error?: string;
|
|
14709
|
+
/**
|
|
14710
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14711
|
+
* @example Validation failed
|
|
14712
|
+
*/
|
|
14713
|
+
message: string | string[];
|
|
14714
|
+
};
|
|
14715
|
+
};
|
|
14716
|
+
};
|
|
14717
|
+
/** @description Gone */
|
|
14718
|
+
410: {
|
|
14719
|
+
headers: {
|
|
14720
|
+
[name: string]: unknown;
|
|
14721
|
+
};
|
|
14722
|
+
content: {
|
|
14723
|
+
"application/json": {
|
|
14724
|
+
/**
|
|
14725
|
+
* @description HTTP status code
|
|
14726
|
+
* @example 400
|
|
14727
|
+
*/
|
|
14728
|
+
statusCode?: number;
|
|
14729
|
+
/**
|
|
14730
|
+
* @description Short error label
|
|
14731
|
+
* @example Bad Request
|
|
14732
|
+
*/
|
|
14733
|
+
error?: string;
|
|
14734
|
+
/**
|
|
14735
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14736
|
+
* @example Validation failed
|
|
14737
|
+
*/
|
|
14738
|
+
message: string | string[];
|
|
14739
|
+
};
|
|
14740
|
+
};
|
|
14741
|
+
};
|
|
14742
|
+
/** @description Too Many Requests */
|
|
14743
|
+
429: {
|
|
14744
|
+
headers: {
|
|
14745
|
+
[name: string]: unknown;
|
|
14746
|
+
};
|
|
14747
|
+
content: {
|
|
14748
|
+
"application/json": {
|
|
14749
|
+
/**
|
|
14750
|
+
* @description HTTP status code
|
|
14751
|
+
* @example 400
|
|
14752
|
+
*/
|
|
14753
|
+
statusCode?: number;
|
|
14754
|
+
/**
|
|
14755
|
+
* @description Short error label
|
|
14756
|
+
* @example Bad Request
|
|
14757
|
+
*/
|
|
14758
|
+
error?: string;
|
|
14759
|
+
/**
|
|
14760
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14761
|
+
* @example Validation failed
|
|
14762
|
+
*/
|
|
14763
|
+
message: string | string[];
|
|
14764
|
+
};
|
|
14765
|
+
};
|
|
14766
|
+
};
|
|
14767
|
+
/** @description Bad Gateway */
|
|
14768
|
+
502: {
|
|
14769
|
+
headers: {
|
|
14770
|
+
[name: string]: unknown;
|
|
14771
|
+
};
|
|
14772
|
+
content: {
|
|
14773
|
+
"application/json": {
|
|
14774
|
+
/**
|
|
14775
|
+
* @description HTTP status code
|
|
14776
|
+
* @example 400
|
|
14777
|
+
*/
|
|
14778
|
+
statusCode?: number;
|
|
14779
|
+
/**
|
|
14780
|
+
* @description Short error label
|
|
14781
|
+
* @example Bad Request
|
|
14782
|
+
*/
|
|
14783
|
+
error?: string;
|
|
14784
|
+
/**
|
|
14785
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14786
|
+
* @example Validation failed
|
|
14787
|
+
*/
|
|
14788
|
+
message: string | string[];
|
|
14789
|
+
};
|
|
14790
|
+
};
|
|
14791
|
+
};
|
|
14792
|
+
};
|
|
14793
|
+
};
|
|
14794
|
+
delete?: never;
|
|
14795
|
+
options?: never;
|
|
14796
|
+
head?: never;
|
|
14797
|
+
patch?: never;
|
|
14798
|
+
trace?: never;
|
|
14799
|
+
};
|
|
14800
|
+
"/interaction/{uid}/witnessing-authorization": {
|
|
14801
|
+
parameters: {
|
|
14802
|
+
query?: never;
|
|
14803
|
+
header?: never;
|
|
14804
|
+
path?: never;
|
|
14805
|
+
cookie?: never;
|
|
14806
|
+
};
|
|
14807
|
+
get?: never;
|
|
14808
|
+
put?: never;
|
|
14809
|
+
/**
|
|
14810
|
+
* Let Witnium Vault witness your files again ([Allow])
|
|
14811
|
+
* @description `product_access` prompt with `access: enable_witnessing` only (the app sent `witnium_witnessing=enable`). Creates a new witnessing authorization for the interaction's person and organization (audited `witnessing_authorization.enable`); earlier ended ones stay as history. Navigate to `redirectTo`: the sign-in goes on. Allowed Origin only. Needs the provider's `_interaction` cookie (path `/interaction/<uid>`), which the browser holds from /auth.
|
|
14812
|
+
*/
|
|
14813
|
+
post: {
|
|
14814
|
+
parameters: {
|
|
14815
|
+
query?: never;
|
|
14816
|
+
header?: never;
|
|
14817
|
+
path: {
|
|
14818
|
+
uid: string;
|
|
14819
|
+
};
|
|
14820
|
+
cookie?: never;
|
|
14821
|
+
};
|
|
14822
|
+
requestBody?: never;
|
|
14823
|
+
responses: {
|
|
14824
|
+
/** @description Success */
|
|
14825
|
+
200: {
|
|
14826
|
+
headers: {
|
|
14827
|
+
[name: string]: unknown;
|
|
14828
|
+
};
|
|
14829
|
+
content: {
|
|
14830
|
+
"application/json": {
|
|
14831
|
+
/**
|
|
14832
|
+
* Format: uri
|
|
14833
|
+
* @description Navigate the browser here (the provider's resume).
|
|
14834
|
+
*/
|
|
14835
|
+
redirectTo: string;
|
|
14836
|
+
};
|
|
14837
|
+
};
|
|
14838
|
+
};
|
|
14839
|
+
/** @description Bad Request — validation failed */
|
|
14840
|
+
400: {
|
|
14841
|
+
headers: {
|
|
14842
|
+
[name: string]: unknown;
|
|
14843
|
+
};
|
|
14844
|
+
content: {
|
|
14845
|
+
"application/json": {
|
|
14846
|
+
/**
|
|
14847
|
+
* @description HTTP status code
|
|
14848
|
+
* @example 400
|
|
14849
|
+
*/
|
|
14850
|
+
statusCode?: number;
|
|
14851
|
+
/**
|
|
14852
|
+
* @description Short error label
|
|
14853
|
+
* @example Bad Request
|
|
14854
|
+
*/
|
|
14855
|
+
error?: string;
|
|
14856
|
+
/**
|
|
14857
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14858
|
+
* @example Validation failed
|
|
14859
|
+
*/
|
|
14860
|
+
message: string | string[];
|
|
14861
|
+
};
|
|
14862
|
+
};
|
|
14863
|
+
};
|
|
14864
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
14865
|
+
403: {
|
|
14866
|
+
headers: {
|
|
14867
|
+
[name: string]: unknown;
|
|
14868
|
+
};
|
|
14869
|
+
content: {
|
|
14870
|
+
"application/json": {
|
|
14871
|
+
/**
|
|
14872
|
+
* @description HTTP status code
|
|
14873
|
+
* @example 400
|
|
14874
|
+
*/
|
|
14875
|
+
statusCode?: number;
|
|
14876
|
+
/**
|
|
14877
|
+
* @description Short error label
|
|
14878
|
+
* @example Bad Request
|
|
14879
|
+
*/
|
|
14880
|
+
error?: string;
|
|
14881
|
+
/**
|
|
14882
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14883
|
+
* @example Validation failed
|
|
14884
|
+
*/
|
|
14885
|
+
message: string | string[];
|
|
14886
|
+
};
|
|
14887
|
+
};
|
|
14888
|
+
};
|
|
14889
|
+
/** @description Gone */
|
|
14890
|
+
410: {
|
|
14891
|
+
headers: {
|
|
14892
|
+
[name: string]: unknown;
|
|
14893
|
+
};
|
|
14894
|
+
content: {
|
|
14895
|
+
"application/json": {
|
|
14896
|
+
/**
|
|
14897
|
+
* @description HTTP status code
|
|
14898
|
+
* @example 400
|
|
14899
|
+
*/
|
|
14900
|
+
statusCode?: number;
|
|
14901
|
+
/**
|
|
14902
|
+
* @description Short error label
|
|
14903
|
+
* @example Bad Request
|
|
14904
|
+
*/
|
|
14905
|
+
error?: string;
|
|
14906
|
+
/**
|
|
14907
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14908
|
+
* @example Validation failed
|
|
14909
|
+
*/
|
|
14910
|
+
message: string | string[];
|
|
14911
|
+
};
|
|
14912
|
+
};
|
|
14913
|
+
};
|
|
14914
|
+
};
|
|
14915
|
+
};
|
|
14916
|
+
delete?: never;
|
|
14917
|
+
options?: never;
|
|
14918
|
+
head?: never;
|
|
14919
|
+
patch?: never;
|
|
14920
|
+
trace?: never;
|
|
14921
|
+
};
|
|
14922
|
+
"/interaction/{uid}/witnessing-authorization/decline": {
|
|
14923
|
+
parameters: {
|
|
14924
|
+
query?: never;
|
|
14925
|
+
header?: never;
|
|
14926
|
+
path?: never;
|
|
14927
|
+
cookie?: never;
|
|
14928
|
+
};
|
|
14929
|
+
get?: never;
|
|
14930
|
+
put?: never;
|
|
14931
|
+
/**
|
|
14932
|
+
* Keep witnessing off ([Not now]): continue the sign-in without it
|
|
14933
|
+
* @description `product_access` prompt with `access: enable_witnessing` only. Creates nothing; the sign-in goes on without witnessing (not `access_denied`: the person can still read). Navigate to `redirectTo`. Allowed Origin only. Needs the provider's `_interaction` cookie (path `/interaction/<uid>`), which the browser holds from /auth.
|
|
14934
|
+
*/
|
|
14935
|
+
post: {
|
|
14936
|
+
parameters: {
|
|
14937
|
+
query?: never;
|
|
14938
|
+
header?: never;
|
|
14939
|
+
path: {
|
|
14940
|
+
uid: string;
|
|
14941
|
+
};
|
|
14942
|
+
cookie?: never;
|
|
14943
|
+
};
|
|
14944
|
+
requestBody?: never;
|
|
14945
|
+
responses: {
|
|
14946
|
+
/** @description Success */
|
|
14947
|
+
200: {
|
|
14948
|
+
headers: {
|
|
14949
|
+
[name: string]: unknown;
|
|
14950
|
+
};
|
|
14951
|
+
content: {
|
|
14952
|
+
"application/json": {
|
|
14953
|
+
/**
|
|
14954
|
+
* Format: uri
|
|
14955
|
+
* @description Navigate the browser here (the provider's resume).
|
|
14956
|
+
*/
|
|
14957
|
+
redirectTo: string;
|
|
14958
|
+
};
|
|
14959
|
+
};
|
|
14960
|
+
};
|
|
14961
|
+
/** @description Bad Request — validation failed */
|
|
14962
|
+
400: {
|
|
14963
|
+
headers: {
|
|
14964
|
+
[name: string]: unknown;
|
|
14965
|
+
};
|
|
14966
|
+
content: {
|
|
14967
|
+
"application/json": {
|
|
14968
|
+
/**
|
|
14969
|
+
* @description HTTP status code
|
|
14970
|
+
* @example 400
|
|
14971
|
+
*/
|
|
14972
|
+
statusCode?: number;
|
|
14973
|
+
/**
|
|
14974
|
+
* @description Short error label
|
|
14975
|
+
* @example Bad Request
|
|
14976
|
+
*/
|
|
14977
|
+
error?: string;
|
|
14978
|
+
/**
|
|
14979
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
14980
|
+
* @example Validation failed
|
|
14981
|
+
*/
|
|
14982
|
+
message: string | string[];
|
|
14983
|
+
};
|
|
14984
|
+
};
|
|
14985
|
+
};
|
|
14986
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
14987
|
+
403: {
|
|
14988
|
+
headers: {
|
|
14989
|
+
[name: string]: unknown;
|
|
14990
|
+
};
|
|
14991
|
+
content: {
|
|
14992
|
+
"application/json": {
|
|
14993
|
+
/**
|
|
14994
|
+
* @description HTTP status code
|
|
14995
|
+
* @example 400
|
|
14996
|
+
*/
|
|
14997
|
+
statusCode?: number;
|
|
14998
|
+
/**
|
|
14999
|
+
* @description Short error label
|
|
15000
|
+
* @example Bad Request
|
|
15001
|
+
*/
|
|
15002
|
+
error?: string;
|
|
15003
|
+
/**
|
|
15004
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15005
|
+
* @example Validation failed
|
|
15006
|
+
*/
|
|
15007
|
+
message: string | string[];
|
|
15008
|
+
};
|
|
15009
|
+
};
|
|
15010
|
+
};
|
|
15011
|
+
/** @description Gone */
|
|
15012
|
+
410: {
|
|
15013
|
+
headers: {
|
|
15014
|
+
[name: string]: unknown;
|
|
15015
|
+
};
|
|
15016
|
+
content: {
|
|
15017
|
+
"application/json": {
|
|
15018
|
+
/**
|
|
15019
|
+
* @description HTTP status code
|
|
15020
|
+
* @example 400
|
|
15021
|
+
*/
|
|
15022
|
+
statusCode?: number;
|
|
15023
|
+
/**
|
|
15024
|
+
* @description Short error label
|
|
15025
|
+
* @example Bad Request
|
|
15026
|
+
*/
|
|
15027
|
+
error?: string;
|
|
15028
|
+
/**
|
|
15029
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15030
|
+
* @example Validation failed
|
|
15031
|
+
*/
|
|
15032
|
+
message: string | string[];
|
|
15033
|
+
};
|
|
15034
|
+
};
|
|
15035
|
+
};
|
|
15036
|
+
};
|
|
15037
|
+
};
|
|
15038
|
+
delete?: never;
|
|
15039
|
+
options?: never;
|
|
15040
|
+
head?: never;
|
|
15041
|
+
patch?: never;
|
|
15042
|
+
trace?: never;
|
|
15043
|
+
};
|
|
15044
|
+
"/v1/account/billing": {
|
|
15045
|
+
parameters: {
|
|
15046
|
+
query?: never;
|
|
15047
|
+
header?: never;
|
|
15048
|
+
path?: never;
|
|
15049
|
+
cookie?: never;
|
|
15050
|
+
};
|
|
15051
|
+
/**
|
|
15052
|
+
* The organization's plans, per product
|
|
15053
|
+
* @description Any member. The account site's session cookie (`wac_session`); POSTs from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
|
|
15054
|
+
*/
|
|
15055
|
+
get: {
|
|
15056
|
+
parameters: {
|
|
15057
|
+
query?: never;
|
|
15058
|
+
header?: never;
|
|
15059
|
+
path?: never;
|
|
15060
|
+
cookie?: never;
|
|
15061
|
+
};
|
|
15062
|
+
requestBody?: never;
|
|
15063
|
+
responses: {
|
|
15064
|
+
/** @description Success */
|
|
15065
|
+
200: {
|
|
15066
|
+
headers: {
|
|
15067
|
+
[name: string]: unknown;
|
|
15068
|
+
};
|
|
15069
|
+
content: {
|
|
15070
|
+
"application/json": {
|
|
15071
|
+
organization: {
|
|
15072
|
+
/** Format: uuid */
|
|
15073
|
+
id: string;
|
|
15074
|
+
name: string;
|
|
15075
|
+
};
|
|
15076
|
+
/** @description True for an active, unsuspended org admin: only they may call checkout and portal (403 for anyone else). */
|
|
15077
|
+
canManageBilling: boolean;
|
|
15078
|
+
products: {
|
|
15079
|
+
product: {
|
|
15080
|
+
id: string;
|
|
15081
|
+
name: string;
|
|
15082
|
+
/**
|
|
15083
|
+
* Format: uri
|
|
15084
|
+
* @description The product's app, where the Billing page links back to (server configuration).
|
|
15085
|
+
*/
|
|
15086
|
+
appUrl: string;
|
|
15087
|
+
};
|
|
15088
|
+
/** @description False while the product's billing is switched off: nothing can be bought or changed. */
|
|
15089
|
+
available: boolean;
|
|
15090
|
+
/**
|
|
15091
|
+
* BillingEntitlement
|
|
15092
|
+
* @description null: the org does not hold the product (it starts in the product).
|
|
15093
|
+
*/
|
|
15094
|
+
entitlement: {
|
|
15095
|
+
/**
|
|
15096
|
+
* @description How the org holds the product: a trial, a Stripe subscription, or free (granted by Witnium).
|
|
15097
|
+
* @enum {string}
|
|
15098
|
+
*/
|
|
15099
|
+
access: "trial" | "paid" | "complimentary";
|
|
15100
|
+
plan: string;
|
|
15101
|
+
/**
|
|
15102
|
+
* Format: date-time
|
|
15103
|
+
* @description When the entitlement stops (ISO 8601): the end of a trial or free period, or when a canceled or unpaid subscription ends or ended. null = no time limit.
|
|
15104
|
+
*/
|
|
15105
|
+
expiresAt: string | null;
|
|
15106
|
+
/** @description True while the entitlement is active and not past expiresAt. */
|
|
15107
|
+
current: boolean;
|
|
15108
|
+
} | null;
|
|
15109
|
+
/**
|
|
15110
|
+
* BillingSubscription
|
|
15111
|
+
* @description The Stripe subscription behind a paid entitlement, read from Stripe now; null when the entitlement isn't paid.
|
|
15112
|
+
*/
|
|
15113
|
+
subscription: {
|
|
15114
|
+
/**
|
|
15115
|
+
* @description Stripe's subscription status. `past_due`: a payment failed and Stripe is retrying (the entitlement stays current).
|
|
15116
|
+
* @enum {string}
|
|
15117
|
+
*/
|
|
15118
|
+
status: "trialing" | "active" | "past_due" | "unpaid" | "paused" | "canceled" | "incomplete" | "incomplete_expired";
|
|
15119
|
+
plan: string;
|
|
15120
|
+
/** @enum {string} */
|
|
15121
|
+
interval: "monthly" | "yearly";
|
|
15122
|
+
/**
|
|
15123
|
+
* Format: date-time
|
|
15124
|
+
* @description The next renewal (or, when canceling, the end).
|
|
15125
|
+
*/
|
|
15126
|
+
currentPeriodEnd: string;
|
|
15127
|
+
/** @description True when the subscription is set to end at currentPeriodEnd. */
|
|
15128
|
+
cancelAtPeriodEnd: boolean;
|
|
15129
|
+
/**
|
|
15130
|
+
* Format: date-time
|
|
15131
|
+
* @description The first charge, while in the trial Checkout set from the product's trial.
|
|
15132
|
+
*/
|
|
15133
|
+
trialEnd: string | null;
|
|
15134
|
+
} | null;
|
|
15135
|
+
/** @description Every plan and interval checkout accepts, also while billing is switched off; the entitlement's and the subscription's plan are among them. */
|
|
15136
|
+
plans: {
|
|
15137
|
+
id: string;
|
|
15138
|
+
/** @description Short name, e.g. "Plus". */
|
|
15139
|
+
name: string;
|
|
15140
|
+
/** @description What the plan includes. */
|
|
15141
|
+
description: string;
|
|
15142
|
+
/** @description Exactly one price per interval: one monthly and one yearly. */
|
|
15143
|
+
prices: {
|
|
15144
|
+
/** @enum {string} */
|
|
15145
|
+
interval: "monthly" | "yearly";
|
|
15146
|
+
/** @description In minor units (öre), VAT included. 4900 = 49 kr. */
|
|
15147
|
+
amount: number;
|
|
15148
|
+
/** @enum {string} */
|
|
15149
|
+
currency: "sek";
|
|
15150
|
+
}[];
|
|
15151
|
+
}[];
|
|
15152
|
+
/** @description Offered (to org admins) while the org holds the product without a running subscription; null otherwise. */
|
|
15153
|
+
checkout: {
|
|
15154
|
+
/**
|
|
15155
|
+
* Format: date-time
|
|
15156
|
+
* @description When the first payment is taken: the end of a current trial (at least 48 hours ahead). null = at checkout.
|
|
15157
|
+
*/
|
|
15158
|
+
firstChargeAt: string | null;
|
|
15159
|
+
} | null;
|
|
15160
|
+
/** @description The Stripe customer portal is offered (to org admins): the org pays, or paid, for the product. */
|
|
15161
|
+
portal: boolean;
|
|
15162
|
+
}[];
|
|
15163
|
+
};
|
|
15164
|
+
};
|
|
15165
|
+
};
|
|
15166
|
+
/** @description Unauthorized — authentication required or invalid */
|
|
15167
|
+
401: {
|
|
15168
|
+
headers: {
|
|
15169
|
+
[name: string]: unknown;
|
|
15170
|
+
};
|
|
15171
|
+
content: {
|
|
15172
|
+
"application/json": {
|
|
15173
|
+
/**
|
|
15174
|
+
* @description HTTP status code
|
|
15175
|
+
* @example 400
|
|
15176
|
+
*/
|
|
15177
|
+
statusCode?: number;
|
|
15178
|
+
/**
|
|
15179
|
+
* @description Short error label
|
|
15180
|
+
* @example Bad Request
|
|
15181
|
+
*/
|
|
15182
|
+
error?: string;
|
|
15183
|
+
/**
|
|
15184
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15185
|
+
* @example Validation failed
|
|
15186
|
+
*/
|
|
15187
|
+
message: string | string[];
|
|
15188
|
+
};
|
|
15189
|
+
};
|
|
15190
|
+
};
|
|
15191
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
15192
|
+
403: {
|
|
15193
|
+
headers: {
|
|
15194
|
+
[name: string]: unknown;
|
|
15195
|
+
};
|
|
15196
|
+
content: {
|
|
15197
|
+
"application/json": {
|
|
15198
|
+
/**
|
|
15199
|
+
* @description HTTP status code
|
|
15200
|
+
* @example 400
|
|
15201
|
+
*/
|
|
15202
|
+
statusCode?: number;
|
|
15203
|
+
/**
|
|
15204
|
+
* @description Short error label
|
|
15205
|
+
* @example Bad Request
|
|
15206
|
+
*/
|
|
15207
|
+
error?: string;
|
|
15208
|
+
/**
|
|
15209
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15210
|
+
* @example Validation failed
|
|
15211
|
+
*/
|
|
15212
|
+
message: string | string[];
|
|
15213
|
+
};
|
|
15214
|
+
};
|
|
15215
|
+
};
|
|
15216
|
+
};
|
|
15217
|
+
};
|
|
15218
|
+
put?: never;
|
|
15219
|
+
post?: never;
|
|
15220
|
+
delete?: never;
|
|
15221
|
+
options?: never;
|
|
15222
|
+
head?: never;
|
|
15223
|
+
patch?: never;
|
|
15224
|
+
trace?: never;
|
|
15225
|
+
};
|
|
15226
|
+
"/v1/account/billing/{product}/checkout": {
|
|
15227
|
+
parameters: {
|
|
15228
|
+
query?: never;
|
|
15229
|
+
header?: never;
|
|
15230
|
+
path?: never;
|
|
15231
|
+
cookie?: never;
|
|
15232
|
+
};
|
|
15233
|
+
get?: never;
|
|
15234
|
+
put?: never;
|
|
15235
|
+
/**
|
|
15236
|
+
* Start a Stripe Checkout for a product's plan
|
|
15237
|
+
* @description Org admins only. During a current trial (or a complimentary period with an end) the card is collected now and the first charge is when that period ends (at least 48 hours ahead, as Stripe requires); otherwise the first charge is at checkout. Prices include VAT (Stripe Tax); businesses may enter a VAT id. Stripe sends the person back to the Billing page (`/billing?product=<id>&checkout=success|canceled`). 409 `already_subscribed` while the org has a running subscription (change the plan or cancel through the portal); 409 `no_entitlement` when the org does not hold the product. 404 for a product without billing. 503 while the product's billing is switched off. The account site's session cookie (`wac_session`); POSTs from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
|
|
15238
|
+
*/
|
|
15239
|
+
post: {
|
|
15240
|
+
parameters: {
|
|
15241
|
+
query?: never;
|
|
15242
|
+
header?: never;
|
|
15243
|
+
path: {
|
|
15244
|
+
product: string;
|
|
15245
|
+
};
|
|
15246
|
+
cookie?: never;
|
|
15247
|
+
};
|
|
15248
|
+
requestBody?: {
|
|
15249
|
+
content: {
|
|
15250
|
+
"application/json": {
|
|
15251
|
+
/** @description One of the product's plans (`plans[].id`). */
|
|
15252
|
+
plan: string;
|
|
15253
|
+
/** @enum {string} */
|
|
15254
|
+
interval: "monthly" | "yearly";
|
|
15255
|
+
};
|
|
15256
|
+
};
|
|
15257
|
+
};
|
|
15258
|
+
responses: {
|
|
15259
|
+
/** @description Created */
|
|
15260
|
+
201: {
|
|
15261
|
+
headers: {
|
|
15262
|
+
[name: string]: unknown;
|
|
15263
|
+
};
|
|
15264
|
+
content: {
|
|
15265
|
+
"application/json": {
|
|
15266
|
+
/**
|
|
15267
|
+
* Format: uri
|
|
15268
|
+
* @description The Stripe-hosted page. Send the browser there.
|
|
15269
|
+
*/
|
|
15270
|
+
url: string;
|
|
15271
|
+
};
|
|
15272
|
+
};
|
|
15273
|
+
};
|
|
15274
|
+
/** @description Bad Request — validation failed */
|
|
15275
|
+
400: {
|
|
15276
|
+
headers: {
|
|
15277
|
+
[name: string]: unknown;
|
|
15278
|
+
};
|
|
15279
|
+
content: {
|
|
15280
|
+
"application/json": {
|
|
15281
|
+
/**
|
|
15282
|
+
* @description HTTP status code
|
|
15283
|
+
* @example 400
|
|
15284
|
+
*/
|
|
15285
|
+
statusCode?: number;
|
|
15286
|
+
/**
|
|
15287
|
+
* @description Short error label
|
|
15288
|
+
* @example Bad Request
|
|
15289
|
+
*/
|
|
15290
|
+
error?: string;
|
|
15291
|
+
/**
|
|
15292
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15293
|
+
* @example Validation failed
|
|
15294
|
+
*/
|
|
15295
|
+
message: string | string[];
|
|
15296
|
+
};
|
|
15297
|
+
};
|
|
15298
|
+
};
|
|
15299
|
+
/** @description Unauthorized — authentication required or invalid */
|
|
15300
|
+
401: {
|
|
15301
|
+
headers: {
|
|
15302
|
+
[name: string]: unknown;
|
|
15303
|
+
};
|
|
15304
|
+
content: {
|
|
15305
|
+
"application/json": {
|
|
15306
|
+
/**
|
|
15307
|
+
* @description HTTP status code
|
|
15308
|
+
* @example 400
|
|
15309
|
+
*/
|
|
15310
|
+
statusCode?: number;
|
|
15311
|
+
/**
|
|
15312
|
+
* @description Short error label
|
|
15313
|
+
* @example Bad Request
|
|
15314
|
+
*/
|
|
15315
|
+
error?: string;
|
|
15316
|
+
/**
|
|
15317
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15318
|
+
* @example Validation failed
|
|
15319
|
+
*/
|
|
15320
|
+
message: string | string[];
|
|
15321
|
+
};
|
|
15322
|
+
};
|
|
15323
|
+
};
|
|
15324
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
15325
|
+
403: {
|
|
15326
|
+
headers: {
|
|
15327
|
+
[name: string]: unknown;
|
|
15328
|
+
};
|
|
15329
|
+
content: {
|
|
15330
|
+
"application/json": {
|
|
15331
|
+
/**
|
|
15332
|
+
* @description HTTP status code
|
|
15333
|
+
* @example 400
|
|
15334
|
+
*/
|
|
15335
|
+
statusCode?: number;
|
|
15336
|
+
/**
|
|
15337
|
+
* @description Short error label
|
|
15338
|
+
* @example Bad Request
|
|
15339
|
+
*/
|
|
15340
|
+
error?: string;
|
|
15341
|
+
/**
|
|
15342
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15343
|
+
* @example Validation failed
|
|
15344
|
+
*/
|
|
15345
|
+
message: string | string[];
|
|
15346
|
+
};
|
|
15347
|
+
};
|
|
15348
|
+
};
|
|
15349
|
+
/** @description Not Found */
|
|
15350
|
+
404: {
|
|
15351
|
+
headers: {
|
|
15352
|
+
[name: string]: unknown;
|
|
15353
|
+
};
|
|
15354
|
+
content: {
|
|
15355
|
+
"application/json": {
|
|
15356
|
+
/**
|
|
15357
|
+
* @description HTTP status code
|
|
15358
|
+
* @example 400
|
|
15359
|
+
*/
|
|
15360
|
+
statusCode?: number;
|
|
15361
|
+
/**
|
|
15362
|
+
* @description Short error label
|
|
15363
|
+
* @example Bad Request
|
|
15364
|
+
*/
|
|
15365
|
+
error?: string;
|
|
15366
|
+
/**
|
|
15367
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15368
|
+
* @example Validation failed
|
|
15369
|
+
*/
|
|
15370
|
+
message: string | string[];
|
|
15371
|
+
};
|
|
15372
|
+
};
|
|
15373
|
+
};
|
|
15374
|
+
/** @description Conflict */
|
|
15375
|
+
409: {
|
|
15376
|
+
headers: {
|
|
15377
|
+
[name: string]: unknown;
|
|
15378
|
+
};
|
|
15379
|
+
content: {
|
|
15380
|
+
"application/json": {
|
|
15381
|
+
/**
|
|
15382
|
+
* @description HTTP status code
|
|
15383
|
+
* @example 400
|
|
15384
|
+
*/
|
|
15385
|
+
statusCode?: number;
|
|
15386
|
+
/**
|
|
15387
|
+
* @description Short error label
|
|
15388
|
+
* @example Bad Request
|
|
15389
|
+
*/
|
|
15390
|
+
error?: string;
|
|
15391
|
+
/**
|
|
15392
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15393
|
+
* @example Validation failed
|
|
15394
|
+
*/
|
|
15395
|
+
message: string | string[];
|
|
15396
|
+
};
|
|
15397
|
+
};
|
|
15398
|
+
};
|
|
15399
|
+
/** @description Service Unavailable */
|
|
15400
|
+
503: {
|
|
15401
|
+
headers: {
|
|
15402
|
+
[name: string]: unknown;
|
|
15403
|
+
};
|
|
15404
|
+
content: {
|
|
15405
|
+
"application/json": {
|
|
15406
|
+
/**
|
|
15407
|
+
* @description HTTP status code
|
|
15408
|
+
* @example 400
|
|
15409
|
+
*/
|
|
15410
|
+
statusCode?: number;
|
|
15411
|
+
/**
|
|
15412
|
+
* @description Short error label
|
|
15413
|
+
* @example Bad Request
|
|
15414
|
+
*/
|
|
15415
|
+
error?: string;
|
|
15416
|
+
/**
|
|
15417
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15418
|
+
* @example Validation failed
|
|
15419
|
+
*/
|
|
15420
|
+
message: string | string[];
|
|
15421
|
+
};
|
|
15422
|
+
};
|
|
15423
|
+
};
|
|
15424
|
+
};
|
|
15425
|
+
};
|
|
15426
|
+
delete?: never;
|
|
15427
|
+
options?: never;
|
|
15428
|
+
head?: never;
|
|
15429
|
+
patch?: never;
|
|
15430
|
+
trace?: never;
|
|
15431
|
+
};
|
|
15432
|
+
"/v1/account/billing/{product}/portal": {
|
|
15433
|
+
parameters: {
|
|
15434
|
+
query?: never;
|
|
15435
|
+
header?: never;
|
|
15436
|
+
path?: never;
|
|
15437
|
+
cookie?: never;
|
|
15438
|
+
};
|
|
15439
|
+
get?: never;
|
|
15440
|
+
put?: never;
|
|
15441
|
+
/**
|
|
15442
|
+
* Open the Stripe customer portal for a product
|
|
15443
|
+
* @description Org admins only. Change plan or interval, cancel (at the end of the period), update the payment method and billing details, download invoices. The portal's back link returns to the Billing page (`/billing?product=<id>`). Stripe's portal shows every subscription of the org's Stripe customer: a WitniumChain subscription appears there too, and can be canceled there. 409 `no_subscription` when the org has never paid for the product. 404 for a product without billing. 503 while its billing is switched off. The account site's session cookie (`wac_session`); POSTs from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
|
|
15444
|
+
*/
|
|
15445
|
+
post: {
|
|
15446
|
+
parameters: {
|
|
15447
|
+
query?: never;
|
|
15448
|
+
header?: never;
|
|
15449
|
+
path: {
|
|
15450
|
+
product: string;
|
|
15451
|
+
};
|
|
15452
|
+
cookie?: never;
|
|
15453
|
+
};
|
|
15454
|
+
requestBody?: never;
|
|
15455
|
+
responses: {
|
|
15456
|
+
/** @description Created */
|
|
15457
|
+
201: {
|
|
15458
|
+
headers: {
|
|
15459
|
+
[name: string]: unknown;
|
|
15460
|
+
};
|
|
15461
|
+
content: {
|
|
15462
|
+
"application/json": {
|
|
15463
|
+
/**
|
|
15464
|
+
* Format: uri
|
|
15465
|
+
* @description The Stripe-hosted page. Send the browser there.
|
|
15466
|
+
*/
|
|
15467
|
+
url: string;
|
|
15468
|
+
};
|
|
15469
|
+
};
|
|
15470
|
+
};
|
|
15471
|
+
/** @description Unauthorized — authentication required or invalid */
|
|
15472
|
+
401: {
|
|
15473
|
+
headers: {
|
|
15474
|
+
[name: string]: unknown;
|
|
15475
|
+
};
|
|
15476
|
+
content: {
|
|
15477
|
+
"application/json": {
|
|
15478
|
+
/**
|
|
15479
|
+
* @description HTTP status code
|
|
15480
|
+
* @example 400
|
|
15481
|
+
*/
|
|
15482
|
+
statusCode?: number;
|
|
15483
|
+
/**
|
|
15484
|
+
* @description Short error label
|
|
15485
|
+
* @example Bad Request
|
|
15486
|
+
*/
|
|
15487
|
+
error?: string;
|
|
15488
|
+
/**
|
|
15489
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15490
|
+
* @example Validation failed
|
|
15491
|
+
*/
|
|
15492
|
+
message: string | string[];
|
|
15493
|
+
};
|
|
15494
|
+
};
|
|
15495
|
+
};
|
|
15496
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
15497
|
+
403: {
|
|
15498
|
+
headers: {
|
|
15499
|
+
[name: string]: unknown;
|
|
15500
|
+
};
|
|
15501
|
+
content: {
|
|
15502
|
+
"application/json": {
|
|
15503
|
+
/**
|
|
15504
|
+
* @description HTTP status code
|
|
15505
|
+
* @example 400
|
|
15506
|
+
*/
|
|
15507
|
+
statusCode?: number;
|
|
15508
|
+
/**
|
|
15509
|
+
* @description Short error label
|
|
15510
|
+
* @example Bad Request
|
|
15511
|
+
*/
|
|
15512
|
+
error?: string;
|
|
15513
|
+
/**
|
|
15514
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15515
|
+
* @example Validation failed
|
|
15516
|
+
*/
|
|
15517
|
+
message: string | string[];
|
|
15518
|
+
};
|
|
15519
|
+
};
|
|
15520
|
+
};
|
|
15521
|
+
/** @description Not Found */
|
|
15522
|
+
404: {
|
|
15523
|
+
headers: {
|
|
15524
|
+
[name: string]: unknown;
|
|
15525
|
+
};
|
|
15526
|
+
content: {
|
|
15527
|
+
"application/json": {
|
|
15528
|
+
/**
|
|
15529
|
+
* @description HTTP status code
|
|
15530
|
+
* @example 400
|
|
15531
|
+
*/
|
|
15532
|
+
statusCode?: number;
|
|
15533
|
+
/**
|
|
15534
|
+
* @description Short error label
|
|
15535
|
+
* @example Bad Request
|
|
15536
|
+
*/
|
|
15537
|
+
error?: string;
|
|
15538
|
+
/**
|
|
15539
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15540
|
+
* @example Validation failed
|
|
15541
|
+
*/
|
|
15542
|
+
message: string | string[];
|
|
15543
|
+
};
|
|
15544
|
+
};
|
|
15545
|
+
};
|
|
15546
|
+
/** @description Conflict */
|
|
15547
|
+
409: {
|
|
15548
|
+
headers: {
|
|
15549
|
+
[name: string]: unknown;
|
|
15550
|
+
};
|
|
15551
|
+
content: {
|
|
15552
|
+
"application/json": {
|
|
15553
|
+
/**
|
|
15554
|
+
* @description HTTP status code
|
|
15555
|
+
* @example 400
|
|
15556
|
+
*/
|
|
15557
|
+
statusCode?: number;
|
|
15558
|
+
/**
|
|
15559
|
+
* @description Short error label
|
|
15560
|
+
* @example Bad Request
|
|
15561
|
+
*/
|
|
15562
|
+
error?: string;
|
|
15563
|
+
/**
|
|
15564
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15565
|
+
* @example Validation failed
|
|
15566
|
+
*/
|
|
15567
|
+
message: string | string[];
|
|
15568
|
+
};
|
|
15569
|
+
};
|
|
15570
|
+
};
|
|
15571
|
+
/** @description Service Unavailable */
|
|
15572
|
+
503: {
|
|
15573
|
+
headers: {
|
|
15574
|
+
[name: string]: unknown;
|
|
15575
|
+
};
|
|
15576
|
+
content: {
|
|
15577
|
+
"application/json": {
|
|
15578
|
+
/**
|
|
15579
|
+
* @description HTTP status code
|
|
15580
|
+
* @example 400
|
|
15581
|
+
*/
|
|
15582
|
+
statusCode?: number;
|
|
15583
|
+
/**
|
|
15584
|
+
* @description Short error label
|
|
15585
|
+
* @example Bad Request
|
|
15586
|
+
*/
|
|
15587
|
+
error?: string;
|
|
15588
|
+
/**
|
|
15589
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
15590
|
+
* @example Validation failed
|
|
15591
|
+
*/
|
|
15592
|
+
message: string | string[];
|
|
15593
|
+
};
|
|
15594
|
+
};
|
|
15595
|
+
};
|
|
15596
|
+
};
|
|
15597
|
+
};
|
|
15598
|
+
delete?: never;
|
|
15599
|
+
options?: never;
|
|
15600
|
+
head?: never;
|
|
15601
|
+
patch?: never;
|
|
15602
|
+
trace?: never;
|
|
15603
|
+
};
|
|
14161
15604
|
}
|
|
14162
15605
|
|
|
14163
15606
|
/**
|
|
@@ -17336,7 +18779,7 @@ declare class WitniumchainClient {
|
|
|
17336
18779
|
readonly apiKeys: OrgApiKeys;
|
|
17337
18780
|
/** The signed-in member's dashboard signing key on a managed contract. `client.dashboardKey.*`. */
|
|
17338
18781
|
readonly dashboardKey: DashboardKey;
|
|
17339
|
-
/** The home org's managed contract: pause, resume, activity. `client.orgContract.*`. */
|
|
18782
|
+
/** The home org's managed contract: pause, resume, activity, keys you hold. `client.orgContract.*`. */
|
|
17340
18783
|
readonly orgContract: OrgContract;
|
|
17341
18784
|
readonly keyRequests: SigningKeyRequests;
|
|
17342
18785
|
constructor(config: WitniumchainClientConfig);
|
|
@@ -17365,8 +18808,8 @@ declare class WitniumchainClient {
|
|
|
17365
18808
|
pauseOrgContract(): Promise<ContractOwnerOpResponse>;
|
|
17366
18809
|
/**
|
|
17367
18810
|
* Add a key you hold to the org's managed contract (plan §17.7): org
|
|
17368
|
-
* admins, after a step-up
|
|
17369
|
-
* the returned op confirms.
|
|
18811
|
+
* admins, after a step-up (a bearer token needs a fresh `auth_time`).
|
|
18812
|
+
* Witnium signs the add; the key counts once the returned op confirms.
|
|
17370
18813
|
*/
|
|
17371
18814
|
addOrgContractKey(body: AddContractKeyRequest): Promise<ContractOwnerOpResponse>;
|
|
17372
18815
|
/** Revoke a key added with {@link addOrgContractKey} (org admins). */
|