@witnium/witniumchain 0.29.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -3491,7 +3491,80 @@ interface paths$1 {
3491
3491
  patch?: never;
3492
3492
  trace?: never;
3493
3493
  };
3494
- "/v1/billing/checkout": {
3494
+ "/v1/billing/webhook": {
3495
+ parameters: {
3496
+ query?: never;
3497
+ header?: never;
3498
+ path?: never;
3499
+ cookie?: never;
3500
+ };
3501
+ get?: never;
3502
+ put?: never;
3503
+ /**
3504
+ * Stripe webhook receiver
3505
+ * @description Source of truth for credit grants. Verifies the `stripe-signature` header against `STRIPE_WEBHOOK_SECRET` over the raw request body, then dispatches on event type:
3506
+ * - `checkout.session.completed` (payment mode only) → grant pack `credits`.
3507
+ * - `invoice.paid` → grant subscription monthly `credits`.
3508
+ * - `customer.subscription.created`/`.updated` → set org `plan`, `current_period_end`, `subscription_status`.
3509
+ * - `customer.subscription.deleted` → revert to free plan + resume free-tier.
3510
+ * - `invoice.payment_failed` → mark `past_due` (grace).
3511
+ * Idempotent via the `stripe_events` table keyed on `event.id`. Body is the raw Stripe event (consumed pre-JSON-parse), not the documented schema.
3512
+ */
3513
+ post: {
3514
+ parameters: {
3515
+ query?: never;
3516
+ header?: never;
3517
+ path?: never;
3518
+ cookie?: never;
3519
+ };
3520
+ requestBody?: never;
3521
+ responses: {
3522
+ /** @description Created */
3523
+ 201: {
3524
+ headers: {
3525
+ [name: string]: unknown;
3526
+ };
3527
+ content: {
3528
+ "application/json": {
3529
+ /** @enum {boolean} */
3530
+ received: true;
3531
+ };
3532
+ };
3533
+ };
3534
+ /** @description Bad Request — validation failed */
3535
+ 400: {
3536
+ headers: {
3537
+ [name: string]: unknown;
3538
+ };
3539
+ content: {
3540
+ "application/json": {
3541
+ /**
3542
+ * @description HTTP status code
3543
+ * @example 400
3544
+ */
3545
+ statusCode?: number;
3546
+ /**
3547
+ * @description Short error label
3548
+ * @example Bad Request
3549
+ */
3550
+ error?: string;
3551
+ /**
3552
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
3553
+ * @example Validation failed
3554
+ */
3555
+ message: string | string[];
3556
+ };
3557
+ };
3558
+ };
3559
+ };
3560
+ };
3561
+ delete?: never;
3562
+ options?: never;
3563
+ head?: never;
3564
+ patch?: never;
3565
+ trace?: never;
3566
+ };
3567
+ "/v1/orgs": {
3495
3568
  parameters: {
3496
3569
  query?: never;
3497
3570
  header?: never;
@@ -3501,8 +3574,8 @@ interface paths$1 {
3501
3574
  get?: never;
3502
3575
  put?: never;
3503
3576
  /**
3504
- * Create a Stripe Checkout session
3505
- * @description Self-serve flow for the caller's organization, org admins only (403 for a plain or suspended member). Creates the Stripe Customer lazily on first call. Unlimited (flat-fee) orgs are rejected — they bill outside of Checkout.
3577
+ * Create an organization
3578
+ * @description Creates the organization and its unverified admin, and emails the admin a link to set up the account. Deploys nothing: the admin chooses the custody after securing the account (POST /v1/account/contract). If the email cannot be sent, nothing is created and the route returns 502; retry the request.
3506
3579
  */
3507
3580
  post: {
3508
3581
  parameters: {
@@ -3514,26 +3587,16 @@ interface paths$1 {
3514
3587
  requestBody?: {
3515
3588
  content: {
3516
3589
  "application/json": {
3590
+ /** @description Display name of the organization. */
3591
+ orgName: string;
3517
3592
  /**
3518
- * @description Stripe Price ID. Drives the line item on the Checkout session — the Price's Product must carry `credits` (and, for subscriptions, `plan_slug`) metadata for credits/plan to apply via the webhook.
3519
- * @example price_1ABC...
3520
- */
3521
- priceId: string;
3522
- /**
3523
- * @description Stripe Checkout mode. `payment` for prepaid bulk credit packs, `subscription` for monthly subscription tiers.
3524
- * @enum {string}
3525
- */
3526
- mode: "payment" | "subscription";
3527
- /**
3528
- * Format: uri
3529
- * @description Override the post-checkout success redirect.
3530
- */
3531
- successUrl?: string;
3532
- /**
3533
- * Format: uri
3534
- * @description Override the checkout-cancelled redirect.
3593
+ * Format: email
3594
+ * @description Email of the founding org admin. Receives a link to set up the account (passkey or password + authenticator), then chooses who holds the contract keys.
3595
+ * @example user@example.com
3535
3596
  */
3536
- cancelUrl?: string;
3597
+ adminEmail: string;
3598
+ /** @description Captcha proof. Not yet wired (no captcha provider configured); reserved for when one is added. */
3599
+ captchaToken?: string;
3537
3600
  };
3538
3601
  };
3539
3602
  };
@@ -3546,10 +3609,15 @@ interface paths$1 {
3546
3609
  content: {
3547
3610
  "application/json": {
3548
3611
  /**
3549
- * Format: uri
3550
- * @description Hosted Stripe Checkout URL. Redirect the user here.
3612
+ * @description UUID v4
3613
+ * @example 550e8400-e29b-41d4-a716-446655440000
3551
3614
  */
3552
- url: string;
3615
+ orgId: string;
3616
+ /**
3617
+ * @description UUID v4
3618
+ * @example 550e8400-e29b-41d4-a716-446655440000
3619
+ */
3620
+ userId: string;
3553
3621
  };
3554
3622
  };
3555
3623
  };
@@ -3578,8 +3646,8 @@ interface paths$1 {
3578
3646
  };
3579
3647
  };
3580
3648
  };
3581
- /** @description Unauthorized — authentication required or invalid */
3582
- 401: {
3649
+ /** @description Conflict */
3650
+ 409: {
3583
3651
  headers: {
3584
3652
  [name: string]: unknown;
3585
3653
  };
@@ -3603,8 +3671,8 @@ interface paths$1 {
3603
3671
  };
3604
3672
  };
3605
3673
  };
3606
- /** @description Forbidden — insufficient permissions or scope */
3607
- 403: {
3674
+ /** @description Too Many Requests */
3675
+ 429: {
3608
3676
  headers: {
3609
3677
  [name: string]: unknown;
3610
3678
  };
@@ -3628,8 +3696,8 @@ interface paths$1 {
3628
3696
  };
3629
3697
  };
3630
3698
  };
3631
- /** @description Not Found */
3632
- 404: {
3699
+ /** @description Bad Gateway */
3700
+ 502: {
3633
3701
  headers: {
3634
3702
  [name: string]: unknown;
3635
3703
  };
@@ -3661,7 +3729,7 @@ interface paths$1 {
3661
3729
  patch?: never;
3662
3730
  trace?: never;
3663
3731
  };
3664
- "/v1/billing/portal": {
3732
+ "/v1/orgs/me/members": {
3665
3733
  parameters: {
3666
3734
  query?: never;
3667
3735
  header?: never;
@@ -3669,8 +3737,8 @@ interface paths$1 {
3669
3737
  cookie?: never;
3670
3738
  };
3671
3739
  /**
3672
- * Create a Stripe Customer Portal session
3673
- * @description Returns a Stripe-hosted Customer Portal URL for the caller's organization (payment-method management, invoice history, subscription cancel), org admins only (403 for a plain or suspended member). Stripe Customer is created lazily if it doesn't exist yet.
3740
+ * List the caller's org members (session-cookie, org-admin only)
3741
+ * @description Returns every active member of the authenticated org-admin's org with role, suspended state, owner flag, and delegated-key public keys.
3674
3742
  */
3675
3743
  get: {
3676
3744
  parameters: {
@@ -3688,36 +3756,41 @@ interface paths$1 {
3688
3756
  };
3689
3757
  content: {
3690
3758
  "application/json": {
3691
- /**
3692
- * Format: uri
3693
- * @description Stripe Customer Portal URL. Redirect the user here.
3694
- */
3695
- url: string;
3696
- };
3697
- };
3698
- };
3699
- /** @description Unauthorized — authentication required or invalid */
3700
- 401: {
3701
- headers: {
3702
- [name: string]: unknown;
3703
- };
3704
- content: {
3705
- "application/json": {
3706
- /**
3707
- * @description HTTP status code
3708
- * @example 400
3709
- */
3710
- statusCode?: number;
3711
- /**
3712
- * @description Short error label
3713
- * @example Bad Request
3714
- */
3715
- error?: string;
3716
- /**
3717
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
3718
- * @example Validation failed
3719
- */
3720
- message: string | string[];
3759
+ members: {
3760
+ /**
3761
+ * @description UUID v4
3762
+ * @example 550e8400-e29b-41d4-a716-446655440000
3763
+ */
3764
+ userId: string;
3765
+ /**
3766
+ * Format: email
3767
+ * @description RFC 5321 email address
3768
+ * @example user@example.com
3769
+ */
3770
+ email: string;
3771
+ /** @enum {string} */
3772
+ role: "org-admin" | "member";
3773
+ /**
3774
+ * Format: date-time
3775
+ * @description ISO 8601 date-time string
3776
+ * @example 2026-05-20T10:30:00.000Z
3777
+ */
3778
+ emailVerifiedAt: string | null;
3779
+ /**
3780
+ * Format: date-time
3781
+ * @description ISO 8601 date-time string
3782
+ * @example 2026-05-20T10:30:00.000Z
3783
+ */
3784
+ suspendedAt: string | null;
3785
+ isOwner: boolean;
3786
+ delegatedKeyPublicKeys: string[];
3787
+ /**
3788
+ * Format: date-time
3789
+ * @description ISO 8601 date-time string
3790
+ * @example 2026-05-20T10:30:00.000Z
3791
+ */
3792
+ membershipCreatedAt: string;
3793
+ }[];
3721
3794
  };
3722
3795
  };
3723
3796
  };
@@ -3746,31 +3819,6 @@ interface paths$1 {
3746
3819
  };
3747
3820
  };
3748
3821
  };
3749
- /** @description Not Found */
3750
- 404: {
3751
- headers: {
3752
- [name: string]: unknown;
3753
- };
3754
- content: {
3755
- "application/json": {
3756
- /**
3757
- * @description HTTP status code
3758
- * @example 400
3759
- */
3760
- statusCode?: number;
3761
- /**
3762
- * @description Short error label
3763
- * @example Bad Request
3764
- */
3765
- error?: string;
3766
- /**
3767
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
3768
- * @example Validation failed
3769
- */
3770
- message: string | string[];
3771
- };
3772
- };
3773
- };
3774
3822
  };
3775
3823
  };
3776
3824
  put?: never;
@@ -3781,7 +3829,7 @@ interface paths$1 {
3781
3829
  patch?: never;
3782
3830
  trace?: never;
3783
3831
  };
3784
- "/v1/billing/webhook": {
3832
+ "/v1/orgs/me/members/invite": {
3785
3833
  parameters: {
3786
3834
  query?: never;
3787
3835
  header?: never;
@@ -3791,14 +3839,8 @@ interface paths$1 {
3791
3839
  get?: never;
3792
3840
  put?: never;
3793
3841
  /**
3794
- * Stripe webhook receiver
3795
- * @description Source of truth for credit grants. Verifies the `stripe-signature` header against `STRIPE_WEBHOOK_SECRET` over the raw request body, then dispatches on event type:
3796
- * - `checkout.session.completed` (payment mode only) → grant pack `credits`.
3797
- * - `invoice.paid` → grant subscription monthly `credits`.
3798
- * - `customer.subscription.created`/`.updated` → set org `plan`, `current_period_end`, `subscription_status`.
3799
- * - `customer.subscription.deleted` → revert to free plan + resume free-tier.
3800
- * - `invoice.payment_failed` → mark `past_due` (grace).
3801
- * Idempotent via the `stripe_events` table keyed on `event.id`. Body is the raw Stripe event (consumed pre-JSON-parse), not the documented schema.
3842
+ * Invite a member to the caller's org
3843
+ * @description Requires recent step-up authentication. Adds the membership and, unless the invitee already verified their email, mails them an invitation with the verify link. Idempotent: re-inviting re-sends the mail. 502 means the membership was recorded but the email could not be sent; retry.
3802
3844
  */
3803
3845
  post: {
3804
3846
  parameters: {
@@ -3807,7 +3849,23 @@ interface paths$1 {
3807
3849
  path?: never;
3808
3850
  cookie?: never;
3809
3851
  };
3810
- requestBody?: never;
3852
+ requestBody?: {
3853
+ content: {
3854
+ "application/json": {
3855
+ /**
3856
+ * Format: email
3857
+ * @description RFC 5321 email address
3858
+ * @example user@example.com
3859
+ */
3860
+ email: string;
3861
+ /**
3862
+ * @default member
3863
+ * @enum {string}
3864
+ */
3865
+ role?: "org-admin" | "member";
3866
+ };
3867
+ };
3868
+ };
3811
3869
  responses: {
3812
3870
  /** @description Created */
3813
3871
  201: {
@@ -3816,8 +3874,20 @@ interface paths$1 {
3816
3874
  };
3817
3875
  content: {
3818
3876
  "application/json": {
3819
- /** @enum {boolean} */
3820
- received: true;
3877
+ /**
3878
+ * @description UUID v4
3879
+ * @example 550e8400-e29b-41d4-a716-446655440000
3880
+ */
3881
+ userId: string;
3882
+ /**
3883
+ * @description UUID v4
3884
+ * @example 550e8400-e29b-41d4-a716-446655440000
3885
+ */
3886
+ membershipId: string;
3887
+ userPreexisted: boolean;
3888
+ membershipPreexisted: boolean;
3889
+ /** @description True when an invitation email (with the verify link) was sent, i.e. the invitee had not yet verified their email. The token is never returned. */
3890
+ inviteEmailSent: boolean;
3821
3891
  };
3822
3892
  };
3823
3893
  };
@@ -3846,98 +3916,8 @@ interface paths$1 {
3846
3916
  };
3847
3917
  };
3848
3918
  };
3849
- };
3850
- };
3851
- delete?: never;
3852
- options?: never;
3853
- head?: never;
3854
- patch?: never;
3855
- trace?: never;
3856
- };
3857
- "/v1/orgs": {
3858
- parameters: {
3859
- query?: never;
3860
- header?: never;
3861
- path?: never;
3862
- cookie?: never;
3863
- };
3864
- get?: never;
3865
- put?: never;
3866
- /**
3867
- * Create an organization
3868
- * @description Creates the organization and its unverified admin, and emails the admin a link to set up the account. Deploys nothing: the admin chooses the custody after securing the account (POST /v1/account/contract). If the email cannot be sent, nothing is created and the route returns 502; retry the request.
3869
- */
3870
- post: {
3871
- parameters: {
3872
- query?: never;
3873
- header?: never;
3874
- path?: never;
3875
- cookie?: never;
3876
- };
3877
- requestBody?: {
3878
- content: {
3879
- "application/json": {
3880
- /** @description Display name of the organization. */
3881
- orgName: string;
3882
- /**
3883
- * Format: email
3884
- * @description Email of the founding org admin. Receives a link to set up the account (passkey or password + authenticator), then chooses who holds the contract keys.
3885
- * @example user@example.com
3886
- */
3887
- adminEmail: string;
3888
- /** @description Captcha proof. Not yet wired (no captcha provider configured); reserved for when one is added. */
3889
- captchaToken?: string;
3890
- };
3891
- };
3892
- };
3893
- responses: {
3894
- /** @description Created */
3895
- 201: {
3896
- headers: {
3897
- [name: string]: unknown;
3898
- };
3899
- content: {
3900
- "application/json": {
3901
- /**
3902
- * @description UUID v4
3903
- * @example 550e8400-e29b-41d4-a716-446655440000
3904
- */
3905
- orgId: string;
3906
- /**
3907
- * @description UUID v4
3908
- * @example 550e8400-e29b-41d4-a716-446655440000
3909
- */
3910
- userId: string;
3911
- };
3912
- };
3913
- };
3914
- /** @description Bad Request — validation failed */
3915
- 400: {
3916
- headers: {
3917
- [name: string]: unknown;
3918
- };
3919
- content: {
3920
- "application/json": {
3921
- /**
3922
- * @description HTTP status code
3923
- * @example 400
3924
- */
3925
- statusCode?: number;
3926
- /**
3927
- * @description Short error label
3928
- * @example Bad Request
3929
- */
3930
- error?: string;
3931
- /**
3932
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
3933
- * @example Validation failed
3934
- */
3935
- message: string | string[];
3936
- };
3937
- };
3938
- };
3939
- /** @description Conflict */
3940
- 409: {
3919
+ /** @description Forbidden — insufficient permissions or scope */
3920
+ 403: {
3941
3921
  headers: {
3942
3922
  [name: string]: unknown;
3943
3923
  };
@@ -4019,18 +3999,20 @@ interface paths$1 {
4019
3999
  patch?: never;
4020
4000
  trace?: never;
4021
4001
  };
4022
- "/v1/orgs/me/members": {
4002
+ "/v1/orgs/me/members/{userId}/suspend": {
4023
4003
  parameters: {
4024
4004
  query?: never;
4025
4005
  header?: never;
4026
4006
  path?: never;
4027
4007
  cookie?: never;
4028
4008
  };
4009
+ get?: never;
4010
+ put?: never;
4029
4011
  /**
4030
- * List the caller's org members (session-cookie, org-admin only)
4031
- * @description Returns every active member of the authenticated org-admin's org with role, suspended state, owner flag, and delegated-key public keys.
4012
+ * Suspend a member (reversible). The owner cannot be suspended.
4013
+ * @description Requires recent step-up. Restricts the member to read-only access; does not sign them out or block reads.
4032
4014
  */
4033
- get: {
4015
+ post: {
4034
4016
  parameters: {
4035
4017
  query?: never;
4036
4018
  header?: never;
@@ -4039,48 +4021,24 @@ interface paths$1 {
4039
4021
  };
4040
4022
  requestBody?: never;
4041
4023
  responses: {
4042
- /** @description Success */
4043
- 200: {
4024
+ /** @description Created */
4025
+ 201: {
4044
4026
  headers: {
4045
4027
  [name: string]: unknown;
4046
4028
  };
4047
4029
  content: {
4048
4030
  "application/json": {
4049
- members: {
4050
- /**
4051
- * @description UUID v4
4052
- * @example 550e8400-e29b-41d4-a716-446655440000
4053
- */
4054
- userId: string;
4055
- /**
4056
- * Format: email
4057
- * @description RFC 5321 email address
4058
- * @example user@example.com
4059
- */
4060
- email: string;
4061
- /** @enum {string} */
4062
- role: "org-admin" | "member";
4063
- /**
4064
- * Format: date-time
4065
- * @description ISO 8601 date-time string
4066
- * @example 2026-05-20T10:30:00.000Z
4067
- */
4068
- emailVerifiedAt: string | null;
4069
- /**
4070
- * Format: date-time
4071
- * @description ISO 8601 date-time string
4072
- * @example 2026-05-20T10:30:00.000Z
4073
- */
4074
- suspendedAt: string | null;
4075
- isOwner: boolean;
4076
- delegatedKeyPublicKeys: string[];
4077
- /**
4078
- * Format: date-time
4079
- * @description ISO 8601 date-time string
4080
- * @example 2026-05-20T10:30:00.000Z
4081
- */
4082
- membershipCreatedAt: string;
4083
- }[];
4031
+ /**
4032
+ * @description UUID v4
4033
+ * @example 550e8400-e29b-41d4-a716-446655440000
4034
+ */
4035
+ membershipId: string;
4036
+ /**
4037
+ * Format: date-time
4038
+ * @description ISO 8601 date-time string
4039
+ * @example 2026-05-20T10:30:00.000Z
4040
+ */
4041
+ suspendedAt: string;
4084
4042
  };
4085
4043
  };
4086
4044
  };
@@ -4109,17 +4067,65 @@ interface paths$1 {
4109
4067
  };
4110
4068
  };
4111
4069
  };
4070
+ /** @description Not Found */
4071
+ 404: {
4072
+ headers: {
4073
+ [name: string]: unknown;
4074
+ };
4075
+ content: {
4076
+ "application/json": {
4077
+ /**
4078
+ * @description HTTP status code
4079
+ * @example 400
4080
+ */
4081
+ statusCode?: number;
4082
+ /**
4083
+ * @description Short error label
4084
+ * @example Bad Request
4085
+ */
4086
+ error?: string;
4087
+ /**
4088
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
4089
+ * @example Validation failed
4090
+ */
4091
+ message: string | string[];
4092
+ };
4093
+ };
4094
+ };
4095
+ /** @description Conflict */
4096
+ 409: {
4097
+ headers: {
4098
+ [name: string]: unknown;
4099
+ };
4100
+ content: {
4101
+ "application/json": {
4102
+ /**
4103
+ * @description HTTP status code
4104
+ * @example 400
4105
+ */
4106
+ statusCode?: number;
4107
+ /**
4108
+ * @description Short error label
4109
+ * @example Bad Request
4110
+ */
4111
+ error?: string;
4112
+ /**
4113
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
4114
+ * @example Validation failed
4115
+ */
4116
+ message: string | string[];
4117
+ };
4118
+ };
4119
+ };
4112
4120
  };
4113
4121
  };
4114
- put?: never;
4115
- post?: never;
4116
4122
  delete?: never;
4117
4123
  options?: never;
4118
4124
  head?: never;
4119
4125
  patch?: never;
4120
4126
  trace?: never;
4121
4127
  };
4122
- "/v1/orgs/me/members/invite": {
4128
+ "/v1/orgs/me/members/{userId}/unsuspend": {
4123
4129
  parameters: {
4124
4130
  query?: never;
4125
4131
  header?: never;
@@ -4129,8 +4135,8 @@ interface paths$1 {
4129
4135
  get?: never;
4130
4136
  put?: never;
4131
4137
  /**
4132
- * Invite a member to the caller's org
4133
- * @description Requires recent step-up authentication. Adds the membership and, unless the invitee already verified their email, mails them an invitation with the verify link. Idempotent: re-inviting re-sends the mail. 502 means the membership was recorded but the email could not be sent; retry.
4138
+ * Lift a member suspension
4139
+ * @description Requires recent step-up authentication.
4134
4140
  */
4135
4141
  post: {
4136
4142
  parameters: {
@@ -4139,23 +4145,7 @@ interface paths$1 {
4139
4145
  path?: never;
4140
4146
  cookie?: never;
4141
4147
  };
4142
- requestBody?: {
4143
- content: {
4144
- "application/json": {
4145
- /**
4146
- * Format: email
4147
- * @description RFC 5321 email address
4148
- * @example user@example.com
4149
- */
4150
- email: string;
4151
- /**
4152
- * @default member
4153
- * @enum {string}
4154
- */
4155
- role?: "org-admin" | "member";
4156
- };
4157
- };
4158
- };
4148
+ requestBody?: never;
4159
4149
  responses: {
4160
4150
  /** @description Created */
4161
4151
  201: {
@@ -4164,25 +4154,16 @@ interface paths$1 {
4164
4154
  };
4165
4155
  content: {
4166
4156
  "application/json": {
4167
- /**
4168
- * @description UUID v4
4169
- * @example 550e8400-e29b-41d4-a716-446655440000
4170
- */
4171
- userId: string;
4172
4157
  /**
4173
4158
  * @description UUID v4
4174
4159
  * @example 550e8400-e29b-41d4-a716-446655440000
4175
4160
  */
4176
4161
  membershipId: string;
4177
- userPreexisted: boolean;
4178
- membershipPreexisted: boolean;
4179
- /** @description True when an invitation email (with the verify link) was sent, i.e. the invitee had not yet verified their email. The token is never returned. */
4180
- inviteEmailSent: boolean;
4181
4162
  };
4182
4163
  };
4183
4164
  };
4184
- /** @description Bad Request — validation failed */
4185
- 400: {
4165
+ /** @description Forbidden — insufficient permissions or scope */
4166
+ 403: {
4186
4167
  headers: {
4187
4168
  [name: string]: unknown;
4188
4169
  };
@@ -4206,8 +4187,8 @@ interface paths$1 {
4206
4187
  };
4207
4188
  };
4208
4189
  };
4209
- /** @description Forbidden — insufficient permissions or scope */
4210
- 403: {
4190
+ /** @description Not Found */
4191
+ 404: {
4211
4192
  headers: {
4212
4193
  [name: string]: unknown;
4213
4194
  };
@@ -4231,18 +4212,71 @@ interface paths$1 {
4231
4212
  };
4232
4213
  };
4233
4214
  };
4234
- /** @description Too Many Requests */
4235
- 429: {
4236
- headers: {
4237
- [name: string]: unknown;
4238
- };
4239
- content: {
4240
- "application/json": {
4241
- /**
4242
- * @description HTTP status code
4243
- * @example 400
4244
- */
4245
- statusCode?: number;
4215
+ };
4216
+ };
4217
+ delete?: never;
4218
+ options?: never;
4219
+ head?: never;
4220
+ patch?: never;
4221
+ trace?: never;
4222
+ };
4223
+ "/v1/orgs/me/members/{userId}/role": {
4224
+ parameters: {
4225
+ query?: never;
4226
+ header?: never;
4227
+ path?: never;
4228
+ cookie?: never;
4229
+ };
4230
+ get?: never;
4231
+ /**
4232
+ * Set a member's role (org-admin | member). Owner cannot be demoted.
4233
+ * @description Requires recent step-up authentication.
4234
+ */
4235
+ put: {
4236
+ parameters: {
4237
+ query?: never;
4238
+ header?: never;
4239
+ path?: never;
4240
+ cookie?: never;
4241
+ };
4242
+ requestBody?: {
4243
+ content: {
4244
+ "application/json": {
4245
+ /** @enum {string} */
4246
+ role: "org-admin" | "member";
4247
+ };
4248
+ };
4249
+ };
4250
+ responses: {
4251
+ /** @description Success */
4252
+ 200: {
4253
+ headers: {
4254
+ [name: string]: unknown;
4255
+ };
4256
+ content: {
4257
+ "application/json": {
4258
+ /**
4259
+ * @description UUID v4
4260
+ * @example 550e8400-e29b-41d4-a716-446655440000
4261
+ */
4262
+ membershipId: string;
4263
+ /** @enum {string} */
4264
+ role: "org-admin" | "member";
4265
+ };
4266
+ };
4267
+ };
4268
+ /** @description Forbidden — insufficient permissions or scope */
4269
+ 403: {
4270
+ headers: {
4271
+ [name: string]: unknown;
4272
+ };
4273
+ content: {
4274
+ "application/json": {
4275
+ /**
4276
+ * @description HTTP status code
4277
+ * @example 400
4278
+ */
4279
+ statusCode?: number;
4246
4280
  /**
4247
4281
  * @description Short error label
4248
4282
  * @example Bad Request
@@ -4256,8 +4290,33 @@ interface paths$1 {
4256
4290
  };
4257
4291
  };
4258
4292
  };
4259
- /** @description Bad Gateway */
4260
- 502: {
4293
+ /** @description Not Found */
4294
+ 404: {
4295
+ headers: {
4296
+ [name: string]: unknown;
4297
+ };
4298
+ content: {
4299
+ "application/json": {
4300
+ /**
4301
+ * @description HTTP status code
4302
+ * @example 400
4303
+ */
4304
+ statusCode?: number;
4305
+ /**
4306
+ * @description Short error label
4307
+ * @example Bad Request
4308
+ */
4309
+ error?: string;
4310
+ /**
4311
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
4312
+ * @example Validation failed
4313
+ */
4314
+ message: string | string[];
4315
+ };
4316
+ };
4317
+ };
4318
+ /** @description Conflict */
4319
+ 409: {
4261
4320
  headers: {
4262
4321
  [name: string]: unknown;
4263
4322
  };
@@ -4283,13 +4342,14 @@ interface paths$1 {
4283
4342
  };
4284
4343
  };
4285
4344
  };
4345
+ post?: never;
4286
4346
  delete?: never;
4287
4347
  options?: never;
4288
4348
  head?: never;
4289
4349
  patch?: never;
4290
4350
  trace?: never;
4291
4351
  };
4292
- "/v1/orgs/me/members/{userId}/suspend": {
4352
+ "/v1/orgs/me/members/{userId}": {
4293
4353
  parameters: {
4294
4354
  query?: never;
4295
4355
  header?: never;
@@ -4298,11 +4358,12 @@ interface paths$1 {
4298
4358
  };
4299
4359
  get?: never;
4300
4360
  put?: never;
4361
+ post?: never;
4301
4362
  /**
4302
- * Suspend a member (reversible). The owner cannot be suspended.
4303
- * @description Requires recent step-up. Restricts the member to read-only access; does not sign them out or block reads.
4363
+ * Remove a member (terminal). Revokes their delegated keys. Owner cannot be removed.
4364
+ * @description Requires recent step-up authentication.
4304
4365
  */
4305
- post: {
4366
+ delete: {
4306
4367
  parameters: {
4307
4368
  query?: never;
4308
4369
  header?: never;
@@ -4311,8 +4372,8 @@ interface paths$1 {
4311
4372
  };
4312
4373
  requestBody?: never;
4313
4374
  responses: {
4314
- /** @description Created */
4315
- 201: {
4375
+ /** @description Success */
4376
+ 200: {
4316
4377
  headers: {
4317
4378
  [name: string]: unknown;
4318
4379
  };
@@ -4328,7 +4389,10 @@ interface paths$1 {
4328
4389
  * @description ISO 8601 date-time string
4329
4390
  * @example 2026-05-20T10:30:00.000Z
4330
4391
  */
4331
- suspendedAt: string;
4392
+ revokedAt: string;
4393
+ delegatedKeysRevoked: number;
4394
+ /** @description Keys the member holds on the org's self-custody contract. They stay authorized on chain until revoked with the owner key. */
4395
+ customerKeysToRevoke: string[];
4332
4396
  };
4333
4397
  };
4334
4398
  };
@@ -4409,13 +4473,12 @@ interface paths$1 {
4409
4473
  };
4410
4474
  };
4411
4475
  };
4412
- delete?: never;
4413
4476
  options?: never;
4414
4477
  head?: never;
4415
4478
  patch?: never;
4416
4479
  trace?: never;
4417
4480
  };
4418
- "/v1/orgs/me/members/{userId}/unsuspend": {
4481
+ "/v1/orgs/me/members/{userId}/resend-invite": {
4419
4482
  parameters: {
4420
4483
  query?: never;
4421
4484
  header?: never;
@@ -4425,8 +4488,8 @@ interface paths$1 {
4425
4488
  get?: never;
4426
4489
  put?: never;
4427
4490
  /**
4428
- * Lift a member suspension
4429
- * @description Requires recent step-up authentication.
4491
+ * Re-send the invitation email to a pending member
4492
+ * @description Requires recent step-up authentication. Mints a fresh verify token, invalidates earlier ones and mails it. The token is never returned. 502 means the email could not be sent and nothing changed (the previous link stays valid).
4430
4493
  */
4431
4494
  post: {
4432
4495
  parameters: {
@@ -4445,10 +4508,11 @@ interface paths$1 {
4445
4508
  content: {
4446
4509
  "application/json": {
4447
4510
  /**
4448
- * @description UUID v4
4449
- * @example 550e8400-e29b-41d4-a716-446655440000
4511
+ * Format: email
4512
+ * @description RFC 5321 email address
4513
+ * @example user@example.com
4450
4514
  */
4451
- membershipId: string;
4515
+ email: string;
4452
4516
  };
4453
4517
  };
4454
4518
  };
@@ -4502,61 +4566,8 @@ interface paths$1 {
4502
4566
  };
4503
4567
  };
4504
4568
  };
4505
- };
4506
- };
4507
- delete?: never;
4508
- options?: never;
4509
- head?: never;
4510
- patch?: never;
4511
- trace?: never;
4512
- };
4513
- "/v1/orgs/me/members/{userId}/role": {
4514
- parameters: {
4515
- query?: never;
4516
- header?: never;
4517
- path?: never;
4518
- cookie?: never;
4519
- };
4520
- get?: never;
4521
- /**
4522
- * Set a member's role (org-admin | member). Owner cannot be demoted.
4523
- * @description Requires recent step-up authentication.
4524
- */
4525
- put: {
4526
- parameters: {
4527
- query?: never;
4528
- header?: never;
4529
- path?: never;
4530
- cookie?: never;
4531
- };
4532
- requestBody?: {
4533
- content: {
4534
- "application/json": {
4535
- /** @enum {string} */
4536
- role: "org-admin" | "member";
4537
- };
4538
- };
4539
- };
4540
- responses: {
4541
- /** @description Success */
4542
- 200: {
4543
- headers: {
4544
- [name: string]: unknown;
4545
- };
4546
- content: {
4547
- "application/json": {
4548
- /**
4549
- * @description UUID v4
4550
- * @example 550e8400-e29b-41d4-a716-446655440000
4551
- */
4552
- membershipId: string;
4553
- /** @enum {string} */
4554
- role: "org-admin" | "member";
4555
- };
4556
- };
4557
- };
4558
- /** @description Forbidden — insufficient permissions or scope */
4559
- 403: {
4569
+ /** @description Conflict */
4570
+ 409: {
4560
4571
  headers: {
4561
4572
  [name: string]: unknown;
4562
4573
  };
@@ -4580,8 +4591,8 @@ interface paths$1 {
4580
4591
  };
4581
4592
  };
4582
4593
  };
4583
- /** @description Not Found */
4584
- 404: {
4594
+ /** @description Too Many Requests */
4595
+ 429: {
4585
4596
  headers: {
4586
4597
  [name: string]: unknown;
4587
4598
  };
@@ -4605,8 +4616,8 @@ interface paths$1 {
4605
4616
  };
4606
4617
  };
4607
4618
  };
4608
- /** @description Conflict */
4609
- 409: {
4619
+ /** @description Bad Gateway */
4620
+ 502: {
4610
4621
  headers: {
4611
4622
  [name: string]: unknown;
4612
4623
  };
@@ -4632,14 +4643,13 @@ interface paths$1 {
4632
4643
  };
4633
4644
  };
4634
4645
  };
4635
- post?: never;
4636
4646
  delete?: never;
4637
4647
  options?: never;
4638
4648
  head?: never;
4639
4649
  patch?: never;
4640
4650
  trace?: never;
4641
4651
  };
4642
- "/v1/orgs/me/members/{userId}": {
4652
+ "/v1/orgs/me": {
4643
4653
  parameters: {
4644
4654
  query?: never;
4645
4655
  header?: never;
@@ -4649,18 +4659,28 @@ interface paths$1 {
4649
4659
  get?: never;
4650
4660
  put?: never;
4651
4661
  post?: never;
4662
+ delete?: never;
4663
+ options?: never;
4664
+ head?: never;
4652
4665
  /**
4653
- * Remove a member (terminal). Revokes their delegated keys. Owner cannot be removed.
4654
- * @description Requires recent step-up authentication.
4666
+ * Rename the caller's org (session-cookie, org-admin only)
4667
+ * @description Changes the display name the dashboard and invitations show. The billing name on invoices is separate: it lives on the Stripe customer and is edited in the billing portal. The current name again is a no-op.
4655
4668
  */
4656
- delete: {
4669
+ patch: {
4657
4670
  parameters: {
4658
4671
  query?: never;
4659
4672
  header?: never;
4660
4673
  path?: never;
4661
4674
  cookie?: never;
4662
4675
  };
4663
- requestBody?: never;
4676
+ requestBody?: {
4677
+ content: {
4678
+ "application/json": {
4679
+ /** @description New display name of the organization. Leading and trailing spaces are dropped. */
4680
+ name: string;
4681
+ };
4682
+ };
4683
+ };
4664
4684
  responses: {
4665
4685
  /** @description Success */
4666
4686
  200: {
@@ -4673,21 +4693,13 @@ interface paths$1 {
4673
4693
  * @description UUID v4
4674
4694
  * @example 550e8400-e29b-41d4-a716-446655440000
4675
4695
  */
4676
- membershipId: string;
4677
- /**
4678
- * Format: date-time
4679
- * @description ISO 8601 date-time string
4680
- * @example 2026-05-20T10:30:00.000Z
4681
- */
4682
- revokedAt: string;
4683
- delegatedKeysRevoked: number;
4684
- /** @description Keys the member holds on the org's self-custody contract. They stay authorized on chain until revoked with the owner key. */
4685
- customerKeysToRevoke: string[];
4696
+ id: string;
4697
+ name: string;
4686
4698
  };
4687
4699
  };
4688
4700
  };
4689
- /** @description Forbidden — insufficient permissions or scope */
4690
- 403: {
4701
+ /** @description Bad Request — validation failed */
4702
+ 400: {
4691
4703
  headers: {
4692
4704
  [name: string]: unknown;
4693
4705
  };
@@ -4711,33 +4723,8 @@ interface paths$1 {
4711
4723
  };
4712
4724
  };
4713
4725
  };
4714
- /** @description Not Found */
4715
- 404: {
4716
- headers: {
4717
- [name: string]: unknown;
4718
- };
4719
- content: {
4720
- "application/json": {
4721
- /**
4722
- * @description HTTP status code
4723
- * @example 400
4724
- */
4725
- statusCode?: number;
4726
- /**
4727
- * @description Short error label
4728
- * @example Bad Request
4729
- */
4730
- error?: string;
4731
- /**
4732
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
4733
- * @example Validation failed
4734
- */
4735
- message: string | string[];
4736
- };
4737
- };
4738
- };
4739
- /** @description Conflict */
4740
- 409: {
4726
+ /** @description Forbidden — insufficient permissions or scope */
4727
+ 403: {
4741
4728
  headers: {
4742
4729
  [name: string]: unknown;
4743
4730
  };
@@ -4763,25 +4750,20 @@ interface paths$1 {
4763
4750
  };
4764
4751
  };
4765
4752
  };
4766
- options?: never;
4767
- head?: never;
4768
- patch?: never;
4769
4753
  trace?: never;
4770
4754
  };
4771
- "/v1/orgs/me/members/{userId}/resend-invite": {
4755
+ "/v1/orgs/me/activity": {
4772
4756
  parameters: {
4773
4757
  query?: never;
4774
4758
  header?: never;
4775
4759
  path?: never;
4776
4760
  cookie?: never;
4777
4761
  };
4778
- get?: never;
4779
- put?: never;
4780
4762
  /**
4781
- * Re-send the invitation email to a pending member
4782
- * @description Requires recent step-up authentication. Mints a fresh verify token, invalidates earlier ones and mails it. The token is never returned. 502 means the email could not be sent and nothing changed (the previous link stays valid).
4763
+ * Read the latest 100 recorded organization changes (org-admin only)
4764
+ * @description Scoped to the caller’s home organization. Omits internal audit metadata. Not a complete sign-in history.
4783
4765
  */
4784
- post: {
4766
+ get: {
4785
4767
  parameters: {
4786
4768
  query?: never;
4787
4769
  header?: never;
@@ -4790,24 +4772,42 @@ interface paths$1 {
4790
4772
  };
4791
4773
  requestBody?: never;
4792
4774
  responses: {
4793
- /** @description Created */
4794
- 201: {
4775
+ /** @description Success */
4776
+ 200: {
4795
4777
  headers: {
4796
4778
  [name: string]: unknown;
4797
4779
  };
4798
4780
  content: {
4799
4781
  "application/json": {
4800
- /**
4801
- * Format: email
4802
- * @description RFC 5321 email address
4803
- * @example user@example.com
4804
- */
4805
- email: string;
4782
+ events: {
4783
+ /**
4784
+ * @description UUID v4
4785
+ * @example 550e8400-e29b-41d4-a716-446655440000
4786
+ */
4787
+ id: string;
4788
+ action: string;
4789
+ /**
4790
+ * @description UUID v4
4791
+ * @example 550e8400-e29b-41d4-a716-446655440000
4792
+ */
4793
+ actorUserId: string | null;
4794
+ /**
4795
+ * @description UUID v4
4796
+ * @example 550e8400-e29b-41d4-a716-446655440000
4797
+ */
4798
+ targetUserId: string | null;
4799
+ /**
4800
+ * Format: date-time
4801
+ * @description ISO 8601 date-time string
4802
+ * @example 2026-05-20T10:30:00.000Z
4803
+ */
4804
+ occurredAt: string;
4805
+ }[];
4806
4806
  };
4807
4807
  };
4808
4808
  };
4809
- /** @description Forbidden — insufficient permissions or scope */
4810
- 403: {
4809
+ /** @description Unauthorized — authentication required or invalid */
4810
+ 401: {
4811
4811
  headers: {
4812
4812
  [name: string]: unknown;
4813
4813
  };
@@ -4831,8 +4831,8 @@ interface paths$1 {
4831
4831
  };
4832
4832
  };
4833
4833
  };
4834
- /** @description Not Found */
4835
- 404: {
4834
+ /** @description Forbidden — insufficient permissions or scope */
4835
+ 403: {
4836
4836
  headers: {
4837
4837
  [name: string]: unknown;
4838
4838
  };
@@ -4856,33 +4856,65 @@ interface paths$1 {
4856
4856
  };
4857
4857
  };
4858
4858
  };
4859
- /** @description Conflict */
4860
- 409: {
4859
+ };
4860
+ };
4861
+ put?: never;
4862
+ post?: never;
4863
+ delete?: never;
4864
+ options?: never;
4865
+ head?: never;
4866
+ patch?: never;
4867
+ trace?: never;
4868
+ };
4869
+ "/v1/orgs/me/member-access": {
4870
+ parameters: {
4871
+ query?: never;
4872
+ header?: never;
4873
+ path?: never;
4874
+ cookie?: never;
4875
+ };
4876
+ /** List member access blocks (org-admin only) */
4877
+ get: {
4878
+ parameters: {
4879
+ query?: never;
4880
+ header?: never;
4881
+ path?: never;
4882
+ cookie?: never;
4883
+ };
4884
+ requestBody?: never;
4885
+ responses: {
4886
+ /** @description Success */
4887
+ 200: {
4861
4888
  headers: {
4862
4889
  [name: string]: unknown;
4863
4890
  };
4864
4891
  content: {
4865
4892
  "application/json": {
4866
- /**
4867
- * @description HTTP status code
4868
- * @example 400
4869
- */
4870
- statusCode?: number;
4871
- /**
4872
- * @description Short error label
4873
- * @example Bad Request
4874
- */
4875
- error?: string;
4876
- /**
4877
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
4878
- * @example Validation failed
4879
- */
4880
- message: string | string[];
4893
+ members: {
4894
+ /**
4895
+ * @description UUID v4
4896
+ * @example 550e8400-e29b-41d4-a716-446655440000
4897
+ */
4898
+ userId: string;
4899
+ /**
4900
+ * Format: date-time
4901
+ * @description ISO 8601 date-time string
4902
+ * @example 2026-05-20T10:30:00.000Z
4903
+ */
4904
+ blockedAt: string | null;
4905
+ /**
4906
+ * Format: date-time
4907
+ * @description ISO 8601 date-time string
4908
+ * @example 2026-05-20T10:30:00.000Z
4909
+ */
4910
+ directoryBlockedAt: string | null;
4911
+ companyManaged: boolean;
4912
+ }[];
4881
4913
  };
4882
4914
  };
4883
4915
  };
4884
- /** @description Too Many Requests */
4885
- 429: {
4916
+ /** @description Unauthorized — authentication required or invalid */
4917
+ 401: {
4886
4918
  headers: {
4887
4919
  [name: string]: unknown;
4888
4920
  };
@@ -4906,8 +4938,8 @@ interface paths$1 {
4906
4938
  };
4907
4939
  };
4908
4940
  };
4909
- /** @description Bad Gateway */
4910
- 502: {
4941
+ /** @description Forbidden — insufficient permissions or scope */
4942
+ 403: {
4911
4943
  headers: {
4912
4944
  [name: string]: unknown;
4913
4945
  };
@@ -4933,13 +4965,15 @@ interface paths$1 {
4933
4965
  };
4934
4966
  };
4935
4967
  };
4968
+ put?: never;
4969
+ post?: never;
4936
4970
  delete?: never;
4937
4971
  options?: never;
4938
4972
  head?: never;
4939
4973
  patch?: never;
4940
4974
  trace?: never;
4941
4975
  };
4942
- "/v1/orgs/me": {
4976
+ "/v1/orgs/me/members/{userId}/block": {
4943
4977
  parameters: {
4944
4978
  query?: never;
4945
4979
  header?: never;
@@ -4948,32 +4982,21 @@ interface paths$1 {
4948
4982
  };
4949
4983
  get?: never;
4950
4984
  put?: never;
4951
- post?: never;
4952
- delete?: never;
4953
- options?: never;
4954
- head?: never;
4955
4985
  /**
4956
- * Rename the caller's org (session-cookie, org-admin only)
4957
- * @description Changes the display name the dashboard and invitations show. The billing name on invoices is separate: it lives on the Stripe customer and is edited in the billing portal. The current name again is a no-op.
4986
+ * Block member access and end sessions and grants
4987
+ * @description Requires fresh step-up and active home-organization admin membership, rechecked under locks. Owner, self, and active system admins are protected. Does not revoke customer-held keys outside Accounts or organization API keys.
4958
4988
  */
4959
- patch: {
4989
+ post: {
4960
4990
  parameters: {
4961
4991
  query?: never;
4962
4992
  header?: never;
4963
4993
  path?: never;
4964
4994
  cookie?: never;
4965
4995
  };
4966
- requestBody?: {
4967
- content: {
4968
- "application/json": {
4969
- /** @description New display name of the organization. Leading and trailing spaces are dropped. */
4970
- name: string;
4971
- };
4972
- };
4973
- };
4996
+ requestBody?: never;
4974
4997
  responses: {
4975
- /** @description Success */
4976
- 200: {
4998
+ /** @description Created */
4999
+ 201: {
4977
5000
  headers: {
4978
5001
  [name: string]: unknown;
4979
5002
  };
@@ -4983,13 +5006,18 @@ interface paths$1 {
4983
5006
  * @description UUID v4
4984
5007
  * @example 550e8400-e29b-41d4-a716-446655440000
4985
5008
  */
4986
- id: string;
4987
- name: string;
5009
+ userId: string;
5010
+ /**
5011
+ * Format: date-time
5012
+ * @description ISO 8601 date-time string
5013
+ * @example 2026-05-20T10:30:00.000Z
5014
+ */
5015
+ blockedAt: string | null;
4988
5016
  };
4989
5017
  };
4990
5018
  };
4991
- /** @description Bad Request — validation failed */
4992
- 400: {
5019
+ /** @description Unauthorized — authentication required or invalid */
5020
+ 401: {
4993
5021
  headers: {
4994
5022
  [name: string]: unknown;
4995
5023
  };
@@ -5038,66 +5066,8 @@ interface paths$1 {
5038
5066
  };
5039
5067
  };
5040
5068
  };
5041
- };
5042
- };
5043
- trace?: never;
5044
- };
5045
- "/v1/orgs/me/activity": {
5046
- parameters: {
5047
- query?: never;
5048
- header?: never;
5049
- path?: never;
5050
- cookie?: never;
5051
- };
5052
- /**
5053
- * Read the latest 100 recorded organization changes (org-admin only)
5054
- * @description Scoped to the caller’s home organization. Omits internal audit metadata. Not a complete sign-in history.
5055
- */
5056
- get: {
5057
- parameters: {
5058
- query?: never;
5059
- header?: never;
5060
- path?: never;
5061
- cookie?: never;
5062
- };
5063
- requestBody?: never;
5064
- responses: {
5065
- /** @description Success */
5066
- 200: {
5067
- headers: {
5068
- [name: string]: unknown;
5069
- };
5070
- content: {
5071
- "application/json": {
5072
- events: {
5073
- /**
5074
- * @description UUID v4
5075
- * @example 550e8400-e29b-41d4-a716-446655440000
5076
- */
5077
- id: string;
5078
- action: string;
5079
- /**
5080
- * @description UUID v4
5081
- * @example 550e8400-e29b-41d4-a716-446655440000
5082
- */
5083
- actorUserId: string | null;
5084
- /**
5085
- * @description UUID v4
5086
- * @example 550e8400-e29b-41d4-a716-446655440000
5087
- */
5088
- targetUserId: string | null;
5089
- /**
5090
- * Format: date-time
5091
- * @description ISO 8601 date-time string
5092
- * @example 2026-05-20T10:30:00.000Z
5093
- */
5094
- occurredAt: string;
5095
- }[];
5096
- };
5097
- };
5098
- };
5099
- /** @description Unauthorized — authentication required or invalid */
5100
- 401: {
5069
+ /** @description Not Found */
5070
+ 404: {
5101
5071
  headers: {
5102
5072
  [name: string]: unknown;
5103
5073
  };
@@ -5121,8 +5091,8 @@ interface paths$1 {
5121
5091
  };
5122
5092
  };
5123
5093
  };
5124
- /** @description Forbidden — insufficient permissions or scope */
5125
- 403: {
5094
+ /** @description Conflict */
5095
+ 409: {
5126
5096
  headers: {
5127
5097
  [name: string]: unknown;
5128
5098
  };
@@ -5148,23 +5118,26 @@ interface paths$1 {
5148
5118
  };
5149
5119
  };
5150
5120
  };
5151
- put?: never;
5152
- post?: never;
5153
5121
  delete?: never;
5154
5122
  options?: never;
5155
5123
  head?: never;
5156
5124
  patch?: never;
5157
5125
  trace?: never;
5158
5126
  };
5159
- "/v1/orgs/me/member-access": {
5127
+ "/v1/orgs/me/members/{userId}/unblock": {
5160
5128
  parameters: {
5161
5129
  query?: never;
5162
5130
  header?: never;
5163
5131
  path?: never;
5164
5132
  cookie?: never;
5165
5133
  };
5166
- /** List member access blocks (org-admin only) */
5167
- get: {
5134
+ get?: never;
5135
+ put?: never;
5136
+ /**
5137
+ * Restore member access; old sessions and grants stay revoked
5138
+ * @description Requires fresh step-up and active home-organization admin membership, rechecked under locks. Owner, self, and active system admins are protected. Does not revoke customer-held keys outside Accounts or organization API keys.
5139
+ */
5140
+ post: {
5168
5141
  parameters: {
5169
5142
  query?: never;
5170
5143
  header?: never;
@@ -5173,120 +5146,8 @@ interface paths$1 {
5173
5146
  };
5174
5147
  requestBody?: never;
5175
5148
  responses: {
5176
- /** @description Success */
5177
- 200: {
5178
- headers: {
5179
- [name: string]: unknown;
5180
- };
5181
- content: {
5182
- "application/json": {
5183
- members: {
5184
- /**
5185
- * @description UUID v4
5186
- * @example 550e8400-e29b-41d4-a716-446655440000
5187
- */
5188
- userId: string;
5189
- /**
5190
- * Format: date-time
5191
- * @description ISO 8601 date-time string
5192
- * @example 2026-05-20T10:30:00.000Z
5193
- */
5194
- blockedAt: string | null;
5195
- /**
5196
- * Format: date-time
5197
- * @description ISO 8601 date-time string
5198
- * @example 2026-05-20T10:30:00.000Z
5199
- */
5200
- directoryBlockedAt: string | null;
5201
- companyManaged: boolean;
5202
- }[];
5203
- };
5204
- };
5205
- };
5206
- /** @description Unauthorized — authentication required or invalid */
5207
- 401: {
5208
- headers: {
5209
- [name: string]: unknown;
5210
- };
5211
- content: {
5212
- "application/json": {
5213
- /**
5214
- * @description HTTP status code
5215
- * @example 400
5216
- */
5217
- statusCode?: number;
5218
- /**
5219
- * @description Short error label
5220
- * @example Bad Request
5221
- */
5222
- error?: string;
5223
- /**
5224
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
5225
- * @example Validation failed
5226
- */
5227
- message: string | string[];
5228
- };
5229
- };
5230
- };
5231
- /** @description Forbidden — insufficient permissions or scope */
5232
- 403: {
5233
- headers: {
5234
- [name: string]: unknown;
5235
- };
5236
- content: {
5237
- "application/json": {
5238
- /**
5239
- * @description HTTP status code
5240
- * @example 400
5241
- */
5242
- statusCode?: number;
5243
- /**
5244
- * @description Short error label
5245
- * @example Bad Request
5246
- */
5247
- error?: string;
5248
- /**
5249
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
5250
- * @example Validation failed
5251
- */
5252
- message: string | string[];
5253
- };
5254
- };
5255
- };
5256
- };
5257
- };
5258
- put?: never;
5259
- post?: never;
5260
- delete?: never;
5261
- options?: never;
5262
- head?: never;
5263
- patch?: never;
5264
- trace?: never;
5265
- };
5266
- "/v1/orgs/me/members/{userId}/block": {
5267
- parameters: {
5268
- query?: never;
5269
- header?: never;
5270
- path?: never;
5271
- cookie?: never;
5272
- };
5273
- get?: never;
5274
- put?: never;
5275
- /**
5276
- * Block member access and end sessions and grants
5277
- * @description Requires fresh step-up and active home-organization admin membership, rechecked under locks. Owner, self, and active system admins are protected. Does not revoke customer-held keys outside Accounts or organization API keys.
5278
- */
5279
- post: {
5280
- parameters: {
5281
- query?: never;
5282
- header?: never;
5283
- path?: never;
5284
- cookie?: never;
5285
- };
5286
- requestBody?: never;
5287
- responses: {
5288
- /** @description Created */
5289
- 201: {
5149
+ /** @description Created */
5150
+ 201: {
5290
5151
  headers: {
5291
5152
  [name: string]: unknown;
5292
5153
  };
@@ -5414,7 +5275,7 @@ interface paths$1 {
5414
5275
  patch?: never;
5415
5276
  trace?: never;
5416
5277
  };
5417
- "/v1/orgs/me/members/{userId}/unblock": {
5278
+ "/v1/admin/organizations": {
5418
5279
  parameters: {
5419
5280
  query?: never;
5420
5281
  header?: never;
@@ -5424,8 +5285,8 @@ interface paths$1 {
5424
5285
  get?: never;
5425
5286
  put?: never;
5426
5287
  /**
5427
- * Restore member access; old sessions and grants stay revoked
5428
- * @description Requires fresh step-up and active home-organization admin membership, rechecked under locks. Owner, self, and active system admins are protected. Does not revoke customer-held keys outside Accounts or organization API keys.
5288
+ * Create an organisation
5289
+ * @description Sysadmin-only. Creates an org. Apply `signupGrantAmount > 0` to seed credits up front.
5429
5290
  */
5430
5291
  post: {
5431
5292
  parameters: {
@@ -5434,7 +5295,29 @@ interface paths$1 {
5434
5295
  path?: never;
5435
5296
  cookie?: never;
5436
5297
  };
5437
- requestBody?: never;
5298
+ requestBody?: {
5299
+ content: {
5300
+ "application/json": {
5301
+ /** @description Display name of the organisation. */
5302
+ name: string;
5303
+ /**
5304
+ * Format: email
5305
+ * @description Organisation contact email. Used as the Stripe Customer email and as a gate before users can be created under the org.
5306
+ * @example user@example.com
5307
+ */
5308
+ email: string;
5309
+ /**
5310
+ * @description Defaults to `metered` if omitted.
5311
+ * @enum {string}
5312
+ */
5313
+ accountType?: "metered" | "unlimited";
5314
+ /** @description Initial credit grant. Applied to the credit ledger immediately so the first user can write witnesses without paying. Defaults to 0. */
5315
+ signupGrantAmount?: number;
5316
+ /** @description Skip the manual verify step by marking the org's email as verified at creation time. Defaults to false. */
5317
+ emailVerified?: boolean;
5318
+ };
5319
+ };
5320
+ };
5438
5321
  responses: {
5439
5322
  /** @description Created */
5440
5323
  201: {
@@ -5444,46 +5327,50 @@ interface paths$1 {
5444
5327
  content: {
5445
5328
  "application/json": {
5446
5329
  /**
5447
- * @description UUID v4
5448
- * @example 550e8400-e29b-41d4-a716-446655440000
5449
- */
5450
- userId: string;
5451
- /**
5452
- * Format: date-time
5453
- * @description ISO 8601 date-time string
5454
- * @example 2026-05-20T10:30:00.000Z
5455
- */
5456
- blockedAt: string | null;
5457
- };
5458
- };
5459
- };
5460
- /** @description Unauthorized — authentication required or invalid */
5461
- 401: {
5462
- headers: {
5463
- [name: string]: unknown;
5464
- };
5465
- content: {
5466
- "application/json": {
5467
- /**
5468
- * @description HTTP status code
5469
- * @example 400
5470
- */
5471
- statusCode?: number;
5472
- /**
5473
- * @description Short error label
5474
- * @example Bad Request
5475
- */
5476
- error?: string;
5477
- /**
5478
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
5479
- * @example Validation failed
5330
+ * PublicOrg
5331
+ * @description Publicly safe organization shape.
5480
5332
  */
5481
- message: string | string[];
5333
+ organization: {
5334
+ /**
5335
+ * @description UUID v4
5336
+ * @example 550e8400-e29b-41d4-a716-446655440000
5337
+ */
5338
+ id: string;
5339
+ name: string;
5340
+ /**
5341
+ * Format: email
5342
+ * @description RFC 5321 email address
5343
+ * @example user@example.com
5344
+ */
5345
+ email: string;
5346
+ /**
5347
+ * Format: date-time
5348
+ * @description ISO 8601 date-time string
5349
+ * @example 2026-05-20T10:30:00.000Z
5350
+ */
5351
+ emailVerifiedAt: string | null;
5352
+ /**
5353
+ * @description `metered` orgs pay per witness (credit ledger drives gating). `unlimited` orgs are flat-fee billed outside Stripe Checkout.
5354
+ * @enum {string}
5355
+ */
5356
+ accountType: "metered" | "unlimited";
5357
+ /** @description Cached credit balance. `null` when accountType is `unlimited` (balance is not tracked for flat-fee orgs). */
5358
+ balance: number | null;
5359
+ signupGrantAmount: number;
5360
+ /** @description True for personal orgs auto-created during self-serve signup. */
5361
+ isPersonal: boolean;
5362
+ /**
5363
+ * Format: date-time
5364
+ * @description ISO 8601 date-time string
5365
+ * @example 2026-05-20T10:30:00.000Z
5366
+ */
5367
+ createdAt: string;
5368
+ };
5482
5369
  };
5483
5370
  };
5484
5371
  };
5485
- /** @description Forbidden — insufficient permissions or scope */
5486
- 403: {
5372
+ /** @description Bad Request — validation failed */
5373
+ 400: {
5487
5374
  headers: {
5488
5375
  [name: string]: unknown;
5489
5376
  };
@@ -5507,8 +5394,8 @@ interface paths$1 {
5507
5394
  };
5508
5395
  };
5509
5396
  };
5510
- /** @description Not Found */
5511
- 404: {
5397
+ /** @description Unauthorized — authentication required or invalid */
5398
+ 401: {
5512
5399
  headers: {
5513
5400
  [name: string]: unknown;
5514
5401
  };
@@ -5565,7 +5452,7 @@ interface paths$1 {
5565
5452
  patch?: never;
5566
5453
  trace?: never;
5567
5454
  };
5568
- "/v1/admin/organizations": {
5455
+ "/v1/admin/organizations/{id}/account-type": {
5569
5456
  parameters: {
5570
5457
  query?: never;
5571
5458
  header?: never;
@@ -5574,214 +5461,37 @@ interface paths$1 {
5574
5461
  };
5575
5462
  get?: never;
5576
5463
  put?: never;
5464
+ post?: never;
5465
+ delete?: never;
5466
+ options?: never;
5467
+ head?: never;
5577
5468
  /**
5578
- * Create an organisation
5579
- * @description Sysadmin-only. Creates an org. Apply `signupGrantAmount > 0` to seed credits up front.
5469
+ * Set an organisation's account type
5470
+ * @description Flip an org between `metered` (Stripe checkout, credit ledger) and `unlimited` (flat-fee, ledger ignored).
5580
5471
  */
5581
- post: {
5472
+ patch: {
5582
5473
  parameters: {
5583
5474
  query?: never;
5584
5475
  header?: never;
5585
- path?: never;
5476
+ path: {
5477
+ id: string;
5478
+ };
5586
5479
  cookie?: never;
5587
5480
  };
5588
5481
  requestBody?: {
5589
5482
  content: {
5590
5483
  "application/json": {
5591
- /** @description Display name of the organisation. */
5592
- name: string;
5593
- /**
5594
- * Format: email
5595
- * @description Organisation contact email. Used as the Stripe Customer email and as a gate before users can be created under the org.
5596
- * @example user@example.com
5597
- */
5598
- email: string;
5599
5484
  /**
5600
- * @description Defaults to `metered` if omitted.
5485
+ * @description `metered` orgs pay per witness (credit ledger drives gating). `unlimited` orgs are flat-fee billed outside Stripe Checkout.
5601
5486
  * @enum {string}
5602
5487
  */
5603
- accountType?: "metered" | "unlimited";
5604
- /** @description Initial credit grant. Applied to the credit ledger immediately so the first user can write witnesses without paying. Defaults to 0. */
5605
- signupGrantAmount?: number;
5606
- /** @description Skip the manual verify step by marking the org's email as verified at creation time. Defaults to false. */
5607
- emailVerified?: boolean;
5488
+ accountType: "metered" | "unlimited";
5608
5489
  };
5609
5490
  };
5610
5491
  };
5611
5492
  responses: {
5612
- /** @description Created */
5613
- 201: {
5614
- headers: {
5615
- [name: string]: unknown;
5616
- };
5617
- content: {
5618
- "application/json": {
5619
- /**
5620
- * PublicOrg
5621
- * @description Publicly safe organization shape.
5622
- */
5623
- organization: {
5624
- /**
5625
- * @description UUID v4
5626
- * @example 550e8400-e29b-41d4-a716-446655440000
5627
- */
5628
- id: string;
5629
- name: string;
5630
- /**
5631
- * Format: email
5632
- * @description RFC 5321 email address
5633
- * @example user@example.com
5634
- */
5635
- email: string;
5636
- /**
5637
- * Format: date-time
5638
- * @description ISO 8601 date-time string
5639
- * @example 2026-05-20T10:30:00.000Z
5640
- */
5641
- emailVerifiedAt: string | null;
5642
- /**
5643
- * @description `metered` orgs pay per witness (credit ledger drives gating). `unlimited` orgs are flat-fee billed outside Stripe Checkout.
5644
- * @enum {string}
5645
- */
5646
- accountType: "metered" | "unlimited";
5647
- /** @description Cached credit balance. `null` when accountType is `unlimited` (balance is not tracked for flat-fee orgs). */
5648
- balance: number | null;
5649
- signupGrantAmount: number;
5650
- /** @description True for personal orgs auto-created during self-serve signup. */
5651
- isPersonal: boolean;
5652
- /**
5653
- * Format: date-time
5654
- * @description ISO 8601 date-time string
5655
- * @example 2026-05-20T10:30:00.000Z
5656
- */
5657
- createdAt: string;
5658
- };
5659
- };
5660
- };
5661
- };
5662
- /** @description Bad Request — validation failed */
5663
- 400: {
5664
- headers: {
5665
- [name: string]: unknown;
5666
- };
5667
- content: {
5668
- "application/json": {
5669
- /**
5670
- * @description HTTP status code
5671
- * @example 400
5672
- */
5673
- statusCode?: number;
5674
- /**
5675
- * @description Short error label
5676
- * @example Bad Request
5677
- */
5678
- error?: string;
5679
- /**
5680
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
5681
- * @example Validation failed
5682
- */
5683
- message: string | string[];
5684
- };
5685
- };
5686
- };
5687
- /** @description Unauthorized — authentication required or invalid */
5688
- 401: {
5689
- headers: {
5690
- [name: string]: unknown;
5691
- };
5692
- content: {
5693
- "application/json": {
5694
- /**
5695
- * @description HTTP status code
5696
- * @example 400
5697
- */
5698
- statusCode?: number;
5699
- /**
5700
- * @description Short error label
5701
- * @example Bad Request
5702
- */
5703
- error?: string;
5704
- /**
5705
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
5706
- * @example Validation failed
5707
- */
5708
- message: string | string[];
5709
- };
5710
- };
5711
- };
5712
- /** @description Conflict */
5713
- 409: {
5714
- headers: {
5715
- [name: string]: unknown;
5716
- };
5717
- content: {
5718
- "application/json": {
5719
- /**
5720
- * @description HTTP status code
5721
- * @example 400
5722
- */
5723
- statusCode?: number;
5724
- /**
5725
- * @description Short error label
5726
- * @example Bad Request
5727
- */
5728
- error?: string;
5729
- /**
5730
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
5731
- * @example Validation failed
5732
- */
5733
- message: string | string[];
5734
- };
5735
- };
5736
- };
5737
- };
5738
- };
5739
- delete?: never;
5740
- options?: never;
5741
- head?: never;
5742
- patch?: never;
5743
- trace?: never;
5744
- };
5745
- "/v1/admin/organizations/{id}/account-type": {
5746
- parameters: {
5747
- query?: never;
5748
- header?: never;
5749
- path?: never;
5750
- cookie?: never;
5751
- };
5752
- get?: never;
5753
- put?: never;
5754
- post?: never;
5755
- delete?: never;
5756
- options?: never;
5757
- head?: never;
5758
- /**
5759
- * Set an organisation's account type
5760
- * @description Flip an org between `metered` (Stripe checkout, credit ledger) and `unlimited` (flat-fee, ledger ignored).
5761
- */
5762
- patch: {
5763
- parameters: {
5764
- query?: never;
5765
- header?: never;
5766
- path: {
5767
- id: string;
5768
- };
5769
- cookie?: never;
5770
- };
5771
- requestBody?: {
5772
- content: {
5773
- "application/json": {
5774
- /**
5775
- * @description `metered` orgs pay per witness (credit ledger drives gating). `unlimited` orgs are flat-fee billed outside Stripe Checkout.
5776
- * @enum {string}
5777
- */
5778
- accountType: "metered" | "unlimited";
5779
- };
5780
- };
5781
- };
5782
- responses: {
5783
- /** @description Success */
5784
- 200: {
5493
+ /** @description Success */
5494
+ 200: {
5785
5495
  headers: {
5786
5496
  [name: string]: unknown;
5787
5497
  };
@@ -17414,7 +17124,1055 @@ interface paths$1 {
17414
17124
  patch?: never;
17415
17125
  trace?: never;
17416
17126
  };
17417
- "/interaction/{uid}/abort": {
17127
+ "/interaction/{uid}/abort": {
17128
+ parameters: {
17129
+ query?: never;
17130
+ header?: never;
17131
+ path?: never;
17132
+ cookie?: never;
17133
+ };
17134
+ get?: never;
17135
+ put?: never;
17136
+ /**
17137
+ * Deny
17138
+ * @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.
17139
+ */
17140
+ post: {
17141
+ parameters: {
17142
+ query?: never;
17143
+ header?: never;
17144
+ path: {
17145
+ uid: string;
17146
+ };
17147
+ cookie?: never;
17148
+ };
17149
+ requestBody?: never;
17150
+ responses: {
17151
+ /** @description Success */
17152
+ 200: {
17153
+ headers: {
17154
+ [name: string]: unknown;
17155
+ };
17156
+ content: {
17157
+ "application/json": {
17158
+ /**
17159
+ * Format: uri
17160
+ * @description Navigate the browser here (the provider's resume).
17161
+ */
17162
+ redirectTo: string;
17163
+ };
17164
+ };
17165
+ };
17166
+ /** @description Bad Request — validation failed */
17167
+ 400: {
17168
+ headers: {
17169
+ [name: string]: unknown;
17170
+ };
17171
+ content: {
17172
+ "application/json": {
17173
+ /**
17174
+ * @description HTTP status code
17175
+ * @example 400
17176
+ */
17177
+ statusCode?: number;
17178
+ /**
17179
+ * @description Short error label
17180
+ * @example Bad Request
17181
+ */
17182
+ error?: string;
17183
+ /**
17184
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17185
+ * @example Validation failed
17186
+ */
17187
+ message: string | string[];
17188
+ };
17189
+ };
17190
+ };
17191
+ /** @description Forbidden — insufficient permissions or scope */
17192
+ 403: {
17193
+ headers: {
17194
+ [name: string]: unknown;
17195
+ };
17196
+ content: {
17197
+ "application/json": {
17198
+ /**
17199
+ * @description HTTP status code
17200
+ * @example 400
17201
+ */
17202
+ statusCode?: number;
17203
+ /**
17204
+ * @description Short error label
17205
+ * @example Bad Request
17206
+ */
17207
+ error?: string;
17208
+ /**
17209
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17210
+ * @example Validation failed
17211
+ */
17212
+ message: string | string[];
17213
+ };
17214
+ };
17215
+ };
17216
+ /** @description Gone */
17217
+ 410: {
17218
+ headers: {
17219
+ [name: string]: unknown;
17220
+ };
17221
+ content: {
17222
+ "application/json": {
17223
+ /**
17224
+ * @description HTTP status code
17225
+ * @example 400
17226
+ */
17227
+ statusCode?: number;
17228
+ /**
17229
+ * @description Short error label
17230
+ * @example Bad Request
17231
+ */
17232
+ error?: string;
17233
+ /**
17234
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17235
+ * @example Validation failed
17236
+ */
17237
+ message: string | string[];
17238
+ };
17239
+ };
17240
+ };
17241
+ };
17242
+ };
17243
+ delete?: never;
17244
+ options?: never;
17245
+ head?: never;
17246
+ patch?: never;
17247
+ trace?: never;
17248
+ };
17249
+ "/interaction/{uid}/switch-account": {
17250
+ parameters: {
17251
+ query?: never;
17252
+ header?: never;
17253
+ path?: never;
17254
+ cookie?: never;
17255
+ };
17256
+ get?: never;
17257
+ put?: never;
17258
+ /**
17259
+ * Switch account
17260
+ * @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.
17261
+ */
17262
+ post: {
17263
+ parameters: {
17264
+ query?: never;
17265
+ header?: never;
17266
+ path: {
17267
+ uid: string;
17268
+ };
17269
+ cookie?: never;
17270
+ };
17271
+ requestBody?: never;
17272
+ responses: {
17273
+ /** @description Success */
17274
+ 200: {
17275
+ headers: {
17276
+ [name: string]: unknown;
17277
+ };
17278
+ content: {
17279
+ "application/json": {
17280
+ /**
17281
+ * Format: uri
17282
+ * @description Navigate the browser here (the provider's resume).
17283
+ */
17284
+ redirectTo: string;
17285
+ };
17286
+ };
17287
+ };
17288
+ /** @description Bad Request — validation failed */
17289
+ 400: {
17290
+ headers: {
17291
+ [name: string]: unknown;
17292
+ };
17293
+ content: {
17294
+ "application/json": {
17295
+ /**
17296
+ * @description HTTP status code
17297
+ * @example 400
17298
+ */
17299
+ statusCode?: number;
17300
+ /**
17301
+ * @description Short error label
17302
+ * @example Bad Request
17303
+ */
17304
+ error?: string;
17305
+ /**
17306
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17307
+ * @example Validation failed
17308
+ */
17309
+ message: string | string[];
17310
+ };
17311
+ };
17312
+ };
17313
+ /** @description Forbidden — insufficient permissions or scope */
17314
+ 403: {
17315
+ headers: {
17316
+ [name: string]: unknown;
17317
+ };
17318
+ content: {
17319
+ "application/json": {
17320
+ /**
17321
+ * @description HTTP status code
17322
+ * @example 400
17323
+ */
17324
+ statusCode?: number;
17325
+ /**
17326
+ * @description Short error label
17327
+ * @example Bad Request
17328
+ */
17329
+ error?: string;
17330
+ /**
17331
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17332
+ * @example Validation failed
17333
+ */
17334
+ message: string | string[];
17335
+ };
17336
+ };
17337
+ };
17338
+ /** @description Conflict */
17339
+ 409: {
17340
+ headers: {
17341
+ [name: string]: unknown;
17342
+ };
17343
+ content: {
17344
+ "application/json": {
17345
+ /** @enum {number} */
17346
+ statusCode: 409;
17347
+ /** @enum {string} */
17348
+ error: "already_confirmed" | "interaction_busy";
17349
+ message: string;
17350
+ /**
17351
+ * Format: uri
17352
+ * @description With `already_confirmed` once the consent finished: the resume; navigate there to continue the ordinary way.
17353
+ */
17354
+ redirectTo?: string;
17355
+ /**
17356
+ * @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.
17357
+ * @enum {string}
17358
+ */
17359
+ state?: "ready" | "provisioning" | "no_contract" | "refused";
17360
+ /**
17361
+ * @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.
17362
+ * @enum {string}
17363
+ */
17364
+ refusal?: "self_custody" | "suspended" | "not_home" | "connection_ended" | "key_add_failed" | "contract_busy" | "key_rate_limited";
17365
+ };
17366
+ };
17367
+ };
17368
+ /** @description Gone */
17369
+ 410: {
17370
+ headers: {
17371
+ [name: string]: unknown;
17372
+ };
17373
+ content: {
17374
+ "application/json": {
17375
+ /**
17376
+ * @description HTTP status code
17377
+ * @example 400
17378
+ */
17379
+ statusCode?: number;
17380
+ /**
17381
+ * @description Short error label
17382
+ * @example Bad Request
17383
+ */
17384
+ error?: string;
17385
+ /**
17386
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17387
+ * @example Validation failed
17388
+ */
17389
+ message: string | string[];
17390
+ };
17391
+ };
17392
+ };
17393
+ };
17394
+ };
17395
+ delete?: never;
17396
+ options?: never;
17397
+ head?: never;
17398
+ patch?: never;
17399
+ trace?: never;
17400
+ };
17401
+ "/interaction/{uid}/start-trial": {
17402
+ parameters: {
17403
+ query?: never;
17404
+ header?: never;
17405
+ path?: never;
17406
+ cookie?: never;
17407
+ };
17408
+ get?: never;
17409
+ put?: never;
17410
+ /**
17411
+ * Start the organization's Witnium Vault trial
17412
+ * @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.
17413
+ */
17414
+ post: {
17415
+ parameters: {
17416
+ query?: never;
17417
+ header?: never;
17418
+ path: {
17419
+ uid: string;
17420
+ };
17421
+ cookie?: never;
17422
+ };
17423
+ requestBody?: never;
17424
+ responses: {
17425
+ /** @description Success */
17426
+ 200: {
17427
+ headers: {
17428
+ [name: string]: unknown;
17429
+ };
17430
+ content: {
17431
+ "application/json": {
17432
+ /**
17433
+ * Format: uri
17434
+ * @description Navigate the browser here (the provider's resume).
17435
+ */
17436
+ redirectTo: string;
17437
+ };
17438
+ };
17439
+ };
17440
+ /** @description Bad Request — validation failed */
17441
+ 400: {
17442
+ headers: {
17443
+ [name: string]: unknown;
17444
+ };
17445
+ content: {
17446
+ "application/json": {
17447
+ /**
17448
+ * @description HTTP status code
17449
+ * @example 400
17450
+ */
17451
+ statusCode?: number;
17452
+ /**
17453
+ * @description Short error label
17454
+ * @example Bad Request
17455
+ */
17456
+ error?: string;
17457
+ /**
17458
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17459
+ * @example Validation failed
17460
+ */
17461
+ message: string | string[];
17462
+ };
17463
+ };
17464
+ };
17465
+ /** @description Forbidden — insufficient permissions or scope */
17466
+ 403: {
17467
+ headers: {
17468
+ [name: string]: unknown;
17469
+ };
17470
+ content: {
17471
+ "application/json": {
17472
+ /**
17473
+ * @description HTTP status code
17474
+ * @example 400
17475
+ */
17476
+ statusCode?: number;
17477
+ /**
17478
+ * @description Short error label
17479
+ * @example Bad Request
17480
+ */
17481
+ error?: string;
17482
+ /**
17483
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17484
+ * @example Validation failed
17485
+ */
17486
+ message: string | string[];
17487
+ };
17488
+ };
17489
+ };
17490
+ /** @description Gone */
17491
+ 410: {
17492
+ headers: {
17493
+ [name: string]: unknown;
17494
+ };
17495
+ content: {
17496
+ "application/json": {
17497
+ /**
17498
+ * @description HTTP status code
17499
+ * @example 400
17500
+ */
17501
+ statusCode?: number;
17502
+ /**
17503
+ * @description Short error label
17504
+ * @example Bad Request
17505
+ */
17506
+ error?: string;
17507
+ /**
17508
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17509
+ * @example Validation failed
17510
+ */
17511
+ message: string | string[];
17512
+ };
17513
+ };
17514
+ };
17515
+ };
17516
+ };
17517
+ delete?: never;
17518
+ options?: never;
17519
+ head?: never;
17520
+ patch?: never;
17521
+ trace?: never;
17522
+ };
17523
+ "/interaction/{uid}/access-request": {
17524
+ parameters: {
17525
+ query?: never;
17526
+ header?: never;
17527
+ path?: never;
17528
+ cookie?: never;
17529
+ };
17530
+ get?: never;
17531
+ put?: never;
17532
+ /**
17533
+ * Ask the organization's admins for the client's product (Witnium Vault)
17534
+ * @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.
17535
+ */
17536
+ post: {
17537
+ parameters: {
17538
+ query?: never;
17539
+ header?: never;
17540
+ path: {
17541
+ uid: string;
17542
+ };
17543
+ cookie?: never;
17544
+ };
17545
+ requestBody?: never;
17546
+ responses: {
17547
+ /** @description Success */
17548
+ 200: {
17549
+ headers: {
17550
+ [name: string]: unknown;
17551
+ };
17552
+ content: {
17553
+ "application/json": {
17554
+ /**
17555
+ * @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.
17556
+ * @enum {string}
17557
+ */
17558
+ state: "requested" | "already_requested" | "no_admin";
17559
+ organization: {
17560
+ name: string;
17561
+ };
17562
+ } | {
17563
+ /** @enum {string} */
17564
+ state: "continue";
17565
+ /**
17566
+ * Format: uri
17567
+ * @description Navigate here (the provider's resume): the sign-in goes on.
17568
+ */
17569
+ redirectTo: string;
17570
+ };
17571
+ };
17572
+ };
17573
+ /** @description Bad Request — validation failed */
17574
+ 400: {
17575
+ headers: {
17576
+ [name: string]: unknown;
17577
+ };
17578
+ content: {
17579
+ "application/json": {
17580
+ /**
17581
+ * @description HTTP status code
17582
+ * @example 400
17583
+ */
17584
+ statusCode?: number;
17585
+ /**
17586
+ * @description Short error label
17587
+ * @example Bad Request
17588
+ */
17589
+ error?: string;
17590
+ /**
17591
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17592
+ * @example Validation failed
17593
+ */
17594
+ message: string | string[];
17595
+ };
17596
+ };
17597
+ };
17598
+ /** @description Forbidden — insufficient permissions or scope */
17599
+ 403: {
17600
+ headers: {
17601
+ [name: string]: unknown;
17602
+ };
17603
+ content: {
17604
+ "application/json": {
17605
+ /**
17606
+ * @description HTTP status code
17607
+ * @example 400
17608
+ */
17609
+ statusCode?: number;
17610
+ /**
17611
+ * @description Short error label
17612
+ * @example Bad Request
17613
+ */
17614
+ error?: string;
17615
+ /**
17616
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17617
+ * @example Validation failed
17618
+ */
17619
+ message: string | string[];
17620
+ };
17621
+ };
17622
+ };
17623
+ /** @description Gone */
17624
+ 410: {
17625
+ headers: {
17626
+ [name: string]: unknown;
17627
+ };
17628
+ content: {
17629
+ "application/json": {
17630
+ /**
17631
+ * @description HTTP status code
17632
+ * @example 400
17633
+ */
17634
+ statusCode?: number;
17635
+ /**
17636
+ * @description Short error label
17637
+ * @example Bad Request
17638
+ */
17639
+ error?: string;
17640
+ /**
17641
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17642
+ * @example Validation failed
17643
+ */
17644
+ message: string | string[];
17645
+ };
17646
+ };
17647
+ };
17648
+ /** @description Too Many Requests */
17649
+ 429: {
17650
+ headers: {
17651
+ [name: string]: unknown;
17652
+ };
17653
+ content: {
17654
+ "application/json": {
17655
+ /**
17656
+ * @description HTTP status code
17657
+ * @example 400
17658
+ */
17659
+ statusCode?: number;
17660
+ /**
17661
+ * @description Short error label
17662
+ * @example Bad Request
17663
+ */
17664
+ error?: string;
17665
+ /**
17666
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17667
+ * @example Validation failed
17668
+ */
17669
+ message: string | string[];
17670
+ };
17671
+ };
17672
+ };
17673
+ /** @description Bad Gateway */
17674
+ 502: {
17675
+ headers: {
17676
+ [name: string]: unknown;
17677
+ };
17678
+ content: {
17679
+ "application/json": {
17680
+ /**
17681
+ * @description HTTP status code
17682
+ * @example 400
17683
+ */
17684
+ statusCode?: number;
17685
+ /**
17686
+ * @description Short error label
17687
+ * @example Bad Request
17688
+ */
17689
+ error?: string;
17690
+ /**
17691
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17692
+ * @example Validation failed
17693
+ */
17694
+ message: string | string[];
17695
+ };
17696
+ };
17697
+ };
17698
+ };
17699
+ };
17700
+ delete?: never;
17701
+ options?: never;
17702
+ head?: never;
17703
+ patch?: never;
17704
+ trace?: never;
17705
+ };
17706
+ "/interaction/{uid}/witnessing-authorization": {
17707
+ parameters: {
17708
+ query?: never;
17709
+ header?: never;
17710
+ path?: never;
17711
+ cookie?: never;
17712
+ };
17713
+ get?: never;
17714
+ put?: never;
17715
+ /**
17716
+ * Let Witnium Vault witness your files again ([Allow])
17717
+ * @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.
17718
+ */
17719
+ post: {
17720
+ parameters: {
17721
+ query?: never;
17722
+ header?: never;
17723
+ path: {
17724
+ uid: string;
17725
+ };
17726
+ cookie?: never;
17727
+ };
17728
+ requestBody?: never;
17729
+ responses: {
17730
+ /** @description Success */
17731
+ 200: {
17732
+ headers: {
17733
+ [name: string]: unknown;
17734
+ };
17735
+ content: {
17736
+ "application/json": {
17737
+ /**
17738
+ * Format: uri
17739
+ * @description Navigate the browser here (the provider's resume).
17740
+ */
17741
+ redirectTo: string;
17742
+ };
17743
+ };
17744
+ };
17745
+ /** @description Bad Request — validation failed */
17746
+ 400: {
17747
+ headers: {
17748
+ [name: string]: unknown;
17749
+ };
17750
+ content: {
17751
+ "application/json": {
17752
+ /**
17753
+ * @description HTTP status code
17754
+ * @example 400
17755
+ */
17756
+ statusCode?: number;
17757
+ /**
17758
+ * @description Short error label
17759
+ * @example Bad Request
17760
+ */
17761
+ error?: string;
17762
+ /**
17763
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17764
+ * @example Validation failed
17765
+ */
17766
+ message: string | string[];
17767
+ };
17768
+ };
17769
+ };
17770
+ /** @description Forbidden — insufficient permissions or scope */
17771
+ 403: {
17772
+ headers: {
17773
+ [name: string]: unknown;
17774
+ };
17775
+ content: {
17776
+ "application/json": {
17777
+ /**
17778
+ * @description HTTP status code
17779
+ * @example 400
17780
+ */
17781
+ statusCode?: number;
17782
+ /**
17783
+ * @description Short error label
17784
+ * @example Bad Request
17785
+ */
17786
+ error?: string;
17787
+ /**
17788
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17789
+ * @example Validation failed
17790
+ */
17791
+ message: string | string[];
17792
+ };
17793
+ };
17794
+ };
17795
+ /** @description Gone */
17796
+ 410: {
17797
+ headers: {
17798
+ [name: string]: unknown;
17799
+ };
17800
+ content: {
17801
+ "application/json": {
17802
+ /**
17803
+ * @description HTTP status code
17804
+ * @example 400
17805
+ */
17806
+ statusCode?: number;
17807
+ /**
17808
+ * @description Short error label
17809
+ * @example Bad Request
17810
+ */
17811
+ error?: string;
17812
+ /**
17813
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17814
+ * @example Validation failed
17815
+ */
17816
+ message: string | string[];
17817
+ };
17818
+ };
17819
+ };
17820
+ };
17821
+ };
17822
+ delete?: never;
17823
+ options?: never;
17824
+ head?: never;
17825
+ patch?: never;
17826
+ trace?: never;
17827
+ };
17828
+ "/interaction/{uid}/witnessing-authorization/decline": {
17829
+ parameters: {
17830
+ query?: never;
17831
+ header?: never;
17832
+ path?: never;
17833
+ cookie?: never;
17834
+ };
17835
+ get?: never;
17836
+ put?: never;
17837
+ /**
17838
+ * Keep witnessing off ([Not now]): continue the sign-in without it
17839
+ * @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.
17840
+ */
17841
+ post: {
17842
+ parameters: {
17843
+ query?: never;
17844
+ header?: never;
17845
+ path: {
17846
+ uid: string;
17847
+ };
17848
+ cookie?: never;
17849
+ };
17850
+ requestBody?: never;
17851
+ responses: {
17852
+ /** @description Success */
17853
+ 200: {
17854
+ headers: {
17855
+ [name: string]: unknown;
17856
+ };
17857
+ content: {
17858
+ "application/json": {
17859
+ /**
17860
+ * Format: uri
17861
+ * @description Navigate the browser here (the provider's resume).
17862
+ */
17863
+ redirectTo: string;
17864
+ };
17865
+ };
17866
+ };
17867
+ /** @description Bad Request — validation failed */
17868
+ 400: {
17869
+ headers: {
17870
+ [name: string]: unknown;
17871
+ };
17872
+ content: {
17873
+ "application/json": {
17874
+ /**
17875
+ * @description HTTP status code
17876
+ * @example 400
17877
+ */
17878
+ statusCode?: number;
17879
+ /**
17880
+ * @description Short error label
17881
+ * @example Bad Request
17882
+ */
17883
+ error?: string;
17884
+ /**
17885
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17886
+ * @example Validation failed
17887
+ */
17888
+ message: string | string[];
17889
+ };
17890
+ };
17891
+ };
17892
+ /** @description Forbidden — insufficient permissions or scope */
17893
+ 403: {
17894
+ headers: {
17895
+ [name: string]: unknown;
17896
+ };
17897
+ content: {
17898
+ "application/json": {
17899
+ /**
17900
+ * @description HTTP status code
17901
+ * @example 400
17902
+ */
17903
+ statusCode?: number;
17904
+ /**
17905
+ * @description Short error label
17906
+ * @example Bad Request
17907
+ */
17908
+ error?: string;
17909
+ /**
17910
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17911
+ * @example Validation failed
17912
+ */
17913
+ message: string | string[];
17914
+ };
17915
+ };
17916
+ };
17917
+ /** @description Gone */
17918
+ 410: {
17919
+ headers: {
17920
+ [name: string]: unknown;
17921
+ };
17922
+ content: {
17923
+ "application/json": {
17924
+ /**
17925
+ * @description HTTP status code
17926
+ * @example 400
17927
+ */
17928
+ statusCode?: number;
17929
+ /**
17930
+ * @description Short error label
17931
+ * @example Bad Request
17932
+ */
17933
+ error?: string;
17934
+ /**
17935
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17936
+ * @example Validation failed
17937
+ */
17938
+ message: string | string[];
17939
+ };
17940
+ };
17941
+ };
17942
+ };
17943
+ };
17944
+ delete?: never;
17945
+ options?: never;
17946
+ head?: never;
17947
+ patch?: never;
17948
+ trace?: never;
17949
+ };
17950
+ "/v1/account/billing": {
17951
+ parameters: {
17952
+ query?: never;
17953
+ header?: never;
17954
+ path?: never;
17955
+ cookie?: never;
17956
+ };
17957
+ /**
17958
+ * The organization's plans, per product
17959
+ * @description Any member. The account site's session cookie (`wac_session`); POSTs and PATCHes from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
17960
+ */
17961
+ get: {
17962
+ parameters: {
17963
+ query?: never;
17964
+ header?: never;
17965
+ path?: never;
17966
+ cookie?: never;
17967
+ };
17968
+ requestBody?: never;
17969
+ responses: {
17970
+ /** @description Success */
17971
+ 200: {
17972
+ headers: {
17973
+ [name: string]: unknown;
17974
+ };
17975
+ content: {
17976
+ "application/json": {
17977
+ organization: {
17978
+ /** Format: uuid */
17979
+ id: string;
17980
+ name: string;
17981
+ };
17982
+ /**
17983
+ * BillingCard
17984
+ * @description The organization's card on file (the default payment method of its Stripe customer, read from Stripe now); null when it has none.
17985
+ */
17986
+ card: {
17987
+ /** @description The Stripe payment method: which card, where two look alike. Subscribing names it in `confirmed.card`. */
17988
+ id: string;
17989
+ /** @description Stripe's card brand, e.g. `visa`, `mastercard`. */
17990
+ brand: string;
17991
+ last4: string;
17992
+ expMonth: number;
17993
+ expYear: number;
17994
+ } | null;
17995
+ /** BillingCurrency */
17996
+ currency: {
17997
+ /**
17998
+ * @description The org's billing currency for every product; null until an org admin chooses it.
17999
+ * @enum {string|null}
18000
+ */
18001
+ selected: "sek" | "eur" | "usd" | "gbp" | "nok" | null;
18002
+ /**
18003
+ * @description The currency Stripe holds the org to while a subscription (any product) has not ended or a balance remains; null otherwise. While set, only it can be chosen.
18004
+ * @enum {string|null}
18005
+ */
18006
+ lockedTo: "sek" | "eur" | "usd" | "gbp" | "nok" | null;
18007
+ };
18008
+ /** @description True for an active, unsuspended org admin: only they may call checkout, subscribe and portal (403 for anyone else). */
18009
+ canManageBilling: boolean;
18010
+ products: {
18011
+ product: {
18012
+ id: string;
18013
+ name: string;
18014
+ /**
18015
+ * Format: uri
18016
+ * @description The product's app, where the Billing page links back to (server configuration).
18017
+ */
18018
+ appUrl: string;
18019
+ };
18020
+ /** @description False while the product's billing is switched off: nothing can be bought or changed. */
18021
+ available: boolean;
18022
+ /**
18023
+ * BillingEntitlement
18024
+ * @description null: the org does not hold the product (it starts in the product).
18025
+ */
18026
+ entitlement: {
18027
+ /**
18028
+ * @description How the org holds the product: a trial, a Stripe subscription, or free (granted by Witnium); for WitniumChain also `free` (its free tier, no subscription) and `invoiced` (billed by Witnium outside Stripe: a flat-fee or Enterprise agreement).
18029
+ * @enum {string}
18030
+ */
18031
+ access: "trial" | "paid" | "complimentary" | "free" | "invoiced";
18032
+ /** @description One of `plans[].id`; null for `free` and `invoiced`. */
18033
+ plan: string | null;
18034
+ /**
18035
+ * Format: date-time
18036
+ * @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.
18037
+ */
18038
+ expiresAt: string | null;
18039
+ /** @description True while the entitlement is active and not past expiresAt. */
18040
+ current: boolean;
18041
+ } | null;
18042
+ /**
18043
+ * BillingSubscription
18044
+ * @description The Stripe subscription behind a paid entitlement, read from Stripe now; null when the entitlement isn't paid.
18045
+ */
18046
+ subscription: {
18047
+ /**
18048
+ * @description Stripe's subscription status. `past_due`: a payment failed and Stripe is retrying (the entitlement stays current).
18049
+ * @enum {string}
18050
+ */
18051
+ status: "trialing" | "active" | "past_due" | "unpaid" | "paused" | "canceled" | "incomplete" | "incomplete_expired";
18052
+ plan: string;
18053
+ /** @enum {string} */
18054
+ interval: "monthly" | "yearly";
18055
+ /**
18056
+ * Format: date-time
18057
+ * @description The next renewal (or, when canceling, the end).
18058
+ */
18059
+ currentPeriodEnd: string;
18060
+ /** @description True when the subscription is set to end at currentPeriodEnd. */
18061
+ cancelAtPeriodEnd: boolean;
18062
+ /**
18063
+ * Format: date-time
18064
+ * @description The first charge, while in the trial Checkout set from the product's trial.
18065
+ */
18066
+ trialEnd: string | null;
18067
+ } | null;
18068
+ /** @description Every plan and interval checkout accepts, also while billing is switched off; the entitlement's and the subscription's plan are among them. An interval a product doesn't sell (WitniumChain: yearly) has no prices. */
18069
+ plans: {
18070
+ id: string;
18071
+ /** @description Short name, e.g. "Plus". */
18072
+ name: string;
18073
+ /** @description What the plan includes. */
18074
+ description: string;
18075
+ /** @description Exactly one price per sold interval and billing currency. */
18076
+ prices: {
18077
+ /** @enum {string} */
18078
+ interval: "monthly" | "yearly";
18079
+ /** @enum {string} */
18080
+ currency: "sek" | "eur" | "usd" | "gbp" | "nok";
18081
+ /** @description In the currency's minor units (cents, öre), VAT excluded. 490 EUR = €4.90. */
18082
+ amount: number;
18083
+ }[];
18084
+ }[];
18085
+ /** @description Offered (to org admins) while the org holds the product without a running subscription; null otherwise. */
18086
+ checkout: {
18087
+ /**
18088
+ * Format: date-time
18089
+ * @description When the first payment is taken: the end of a current trial (at least 48 hours ahead). null = at checkout.
18090
+ */
18091
+ firstChargeAt: string | null;
18092
+ } | null;
18093
+ /** @description The Stripe customer portal is offered (to org admins): the org pays, or paid, for the product. */
18094
+ portal: boolean;
18095
+ /** @description The product's one-off purchases (WitniumChain: credit packs); empty for a product without any. */
18096
+ packs: {
18097
+ id: string;
18098
+ /** @description Short name, e.g. "Boost 10k". */
18099
+ name: string;
18100
+ description: string;
18101
+ /** @description Exactly one price per billing currency. */
18102
+ prices: {
18103
+ /** @enum {string} */
18104
+ currency: "sek" | "eur" | "usd" | "gbp" | "nok";
18105
+ /** @description In the currency's minor units, VAT excluded. */
18106
+ amount: number;
18107
+ }[];
18108
+ }[];
18109
+ /** @description Buying a pack is offered (to org admins): the org holds the product, current, and pays for what it uses (not `invoiced`). */
18110
+ packsOffered: boolean;
18111
+ }[];
18112
+ };
18113
+ };
18114
+ };
18115
+ /** @description Unauthorized — authentication required or invalid */
18116
+ 401: {
18117
+ headers: {
18118
+ [name: string]: unknown;
18119
+ };
18120
+ content: {
18121
+ "application/json": {
18122
+ /**
18123
+ * @description HTTP status code
18124
+ * @example 400
18125
+ */
18126
+ statusCode?: number;
18127
+ /**
18128
+ * @description Short error label
18129
+ * @example Bad Request
18130
+ */
18131
+ error?: string;
18132
+ /**
18133
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
18134
+ * @example Validation failed
18135
+ */
18136
+ message: string | string[];
18137
+ };
18138
+ };
18139
+ };
18140
+ /** @description Forbidden — insufficient permissions or scope */
18141
+ 403: {
18142
+ headers: {
18143
+ [name: string]: unknown;
18144
+ };
18145
+ content: {
18146
+ "application/json": {
18147
+ /**
18148
+ * @description HTTP status code
18149
+ * @example 400
18150
+ */
18151
+ statusCode?: number;
18152
+ /**
18153
+ * @description Short error label
18154
+ * @example Bad Request
18155
+ */
18156
+ error?: string;
18157
+ /**
18158
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
18159
+ * @example Validation failed
18160
+ */
18161
+ message: string | string[];
18162
+ };
18163
+ };
18164
+ };
18165
+ };
18166
+ };
18167
+ put?: never;
18168
+ post?: never;
18169
+ delete?: never;
18170
+ options?: never;
18171
+ head?: never;
18172
+ patch?: never;
18173
+ trace?: never;
18174
+ };
18175
+ "/v1/account/billing/currency": {
17418
18176
  parameters: {
17419
18177
  query?: never;
17420
18178
  header?: never;
@@ -17423,20 +18181,29 @@ interface paths$1 {
17423
18181
  };
17424
18182
  get?: never;
17425
18183
  put?: never;
18184
+ post?: never;
18185
+ delete?: never;
18186
+ options?: never;
18187
+ head?: never;
17426
18188
  /**
17427
- * Deny
17428
- * @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.
18189
+ * Choose the organization's billing currency
18190
+ * @description Org admins only. One currency for every product of the organization (a Stripe customer cannot hold subscriptions in two). It can change while no subscription runs (of any product) and no balance remains; otherwise 409 `currency_locked` for any other currency (cancel the subscriptions; once they have ended, choose). The account site's session cookie (`wac_session`); POSTs and PATCHes from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
17429
18191
  */
17430
- post: {
18192
+ patch: {
17431
18193
  parameters: {
17432
18194
  query?: never;
17433
18195
  header?: never;
17434
- path: {
17435
- uid: string;
17436
- };
18196
+ path?: never;
17437
18197
  cookie?: never;
17438
18198
  };
17439
- requestBody?: never;
18199
+ requestBody?: {
18200
+ content: {
18201
+ "application/json": {
18202
+ /** @enum {string} */
18203
+ currency: "sek" | "eur" | "usd" | "gbp" | "nok";
18204
+ };
18205
+ };
18206
+ };
17440
18207
  responses: {
17441
18208
  /** @description Success */
17442
18209
  200: {
@@ -17446,10 +18213,15 @@ interface paths$1 {
17446
18213
  content: {
17447
18214
  "application/json": {
17448
18215
  /**
17449
- * Format: uri
17450
- * @description Navigate the browser here (the provider's resume).
18216
+ * @description The org's billing currency for every product; null until an org admin chooses it.
18217
+ * @enum {string|null}
17451
18218
  */
17452
- redirectTo: string;
18219
+ selected: "sek" | "eur" | "usd" | "gbp" | "nok" | null;
18220
+ /**
18221
+ * @description The currency Stripe holds the org to while a subscription (any product) has not ended or a balance remains; null otherwise. While set, only it can be chosen.
18222
+ * @enum {string|null}
18223
+ */
18224
+ lockedTo: "sek" | "eur" | "usd" | "gbp" | "nok" | null;
17453
18225
  };
17454
18226
  };
17455
18227
  };
@@ -17478,6 +18250,31 @@ interface paths$1 {
17478
18250
  };
17479
18251
  };
17480
18252
  };
18253
+ /** @description Unauthorized — authentication required or invalid */
18254
+ 401: {
18255
+ headers: {
18256
+ [name: string]: unknown;
18257
+ };
18258
+ content: {
18259
+ "application/json": {
18260
+ /**
18261
+ * @description HTTP status code
18262
+ * @example 400
18263
+ */
18264
+ statusCode?: number;
18265
+ /**
18266
+ * @description Short error label
18267
+ * @example Bad Request
18268
+ */
18269
+ error?: string;
18270
+ /**
18271
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
18272
+ * @example Validation failed
18273
+ */
18274
+ message: string | string[];
18275
+ };
18276
+ };
18277
+ };
17481
18278
  /** @description Forbidden — insufficient permissions or scope */
17482
18279
  403: {
17483
18280
  headers: {
@@ -17503,8 +18300,8 @@ interface paths$1 {
17503
18300
  };
17504
18301
  };
17505
18302
  };
17506
- /** @description Gone */
17507
- 410: {
18303
+ /** @description Conflict */
18304
+ 409: {
17508
18305
  headers: {
17509
18306
  [name: string]: unknown;
17510
18307
  };
@@ -17530,13 +18327,9 @@ interface paths$1 {
17530
18327
  };
17531
18328
  };
17532
18329
  };
17533
- delete?: never;
17534
- options?: never;
17535
- head?: never;
17536
- patch?: never;
17537
18330
  trace?: never;
17538
18331
  };
17539
- "/interaction/{uid}/switch-account": {
18332
+ "/v1/account/billing/card": {
17540
18333
  parameters: {
17541
18334
  query?: never;
17542
18335
  header?: never;
@@ -17546,22 +18339,20 @@ interface paths$1 {
17546
18339
  get?: never;
17547
18340
  put?: never;
17548
18341
  /**
17549
- * Switch account
17550
- * @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.
18342
+ * Add or replace the organization's card
18343
+ * @description Org admins only. A Stripe Checkout page in setup mode: the person enters a card and the billing address and name (a business may add its VAT id), saved on the Stripe customer; nothing is charged, and the card becomes the default payment method of the organization's Stripe customer once Stripe confirms (webhook). Stripe sends the person back to the Billing page (`/billing?card=added&session=<session id>` or `?card=canceled`). Earlier card pages of the organization still open are expired. The new card also replaces any card a running subscription had of its own. The account site's session cookie (`wac_session`); POSTs and PATCHes from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
17551
18344
  */
17552
18345
  post: {
17553
18346
  parameters: {
17554
18347
  query?: never;
17555
18348
  header?: never;
17556
- path: {
17557
- uid: string;
17558
- };
18349
+ path?: never;
17559
18350
  cookie?: never;
17560
18351
  };
17561
18352
  requestBody?: never;
17562
18353
  responses: {
17563
- /** @description Success */
17564
- 200: {
18354
+ /** @description Created */
18355
+ 201: {
17565
18356
  headers: {
17566
18357
  [name: string]: unknown;
17567
18358
  };
@@ -17569,14 +18360,14 @@ interface paths$1 {
17569
18360
  "application/json": {
17570
18361
  /**
17571
18362
  * Format: uri
17572
- * @description Navigate the browser here (the provider's resume).
18363
+ * @description The Stripe-hosted page. Send the browser there.
17573
18364
  */
17574
- redirectTo: string;
18365
+ url: string;
17575
18366
  };
17576
18367
  };
17577
18368
  };
17578
- /** @description Bad Request — validation failed */
17579
- 400: {
18369
+ /** @description Unauthorized — authentication required or invalid */
18370
+ 401: {
17580
18371
  headers: {
17581
18372
  [name: string]: unknown;
17582
18373
  };
@@ -17625,61 +18416,6 @@ interface paths$1 {
17625
18416
  };
17626
18417
  };
17627
18418
  };
17628
- /** @description Conflict */
17629
- 409: {
17630
- headers: {
17631
- [name: string]: unknown;
17632
- };
17633
- content: {
17634
- "application/json": {
17635
- /** @enum {number} */
17636
- statusCode: 409;
17637
- /** @enum {string} */
17638
- error: "already_confirmed" | "interaction_busy";
17639
- message: string;
17640
- /**
17641
- * Format: uri
17642
- * @description With `already_confirmed` once the consent finished: the resume; navigate there to continue the ordinary way.
17643
- */
17644
- redirectTo?: string;
17645
- /**
17646
- * @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.
17647
- * @enum {string}
17648
- */
17649
- state?: "ready" | "provisioning" | "no_contract" | "refused";
17650
- /**
17651
- * @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.
17652
- * @enum {string}
17653
- */
17654
- refusal?: "self_custody" | "suspended" | "not_home" | "connection_ended" | "key_add_failed" | "contract_busy" | "key_rate_limited";
17655
- };
17656
- };
17657
- };
17658
- /** @description Gone */
17659
- 410: {
17660
- headers: {
17661
- [name: string]: unknown;
17662
- };
17663
- content: {
17664
- "application/json": {
17665
- /**
17666
- * @description HTTP status code
17667
- * @example 400
17668
- */
17669
- statusCode?: number;
17670
- /**
17671
- * @description Short error label
17672
- * @example Bad Request
17673
- */
17674
- error?: string;
17675
- /**
17676
- * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
17677
- * @example Validation failed
17678
- */
17679
- message: string | string[];
17680
- };
17681
- };
17682
- };
17683
18419
  };
17684
18420
  };
17685
18421
  delete?: never;
@@ -17688,25 +18424,23 @@ interface paths$1 {
17688
18424
  patch?: never;
17689
18425
  trace?: never;
17690
18426
  };
17691
- "/interaction/{uid}/start-trial": {
18427
+ "/v1/account/billing/card/setup/{sessionId}": {
17692
18428
  parameters: {
17693
18429
  query?: never;
17694
18430
  header?: never;
17695
18431
  path?: never;
17696
18432
  cookie?: never;
17697
18433
  };
17698
- get?: never;
17699
- put?: never;
17700
18434
  /**
17701
- * Start the organization's Witnium Vault trial
17702
- * @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.
18435
+ * Where a card setup stands
18436
+ * @description Any member. `saved` (with the card) once the session's card is the organization's card; `replaced` when a newer card has since become the organization's card; `failed` when the session expired or its card was refused; `pending` until Stripe's confirmation arrives. 404 for a session the organization did not start. The account site's session cookie (`wac_session`); POSTs and PATCHes from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
17703
18437
  */
17704
- post: {
18438
+ get: {
17705
18439
  parameters: {
17706
18440
  query?: never;
17707
18441
  header?: never;
17708
18442
  path: {
17709
- uid: string;
18443
+ sessionId: string;
17710
18444
  };
17711
18445
  cookie?: never;
17712
18446
  };
@@ -17719,11 +18453,21 @@ interface paths$1 {
17719
18453
  };
17720
18454
  content: {
17721
18455
  "application/json": {
17722
- /**
17723
- * Format: uri
17724
- * @description Navigate the browser here (the provider's resume).
17725
- */
17726
- redirectTo: string;
18456
+ /** @enum {string} */
18457
+ state: "saved";
18458
+ /** BillingCard */
18459
+ card: {
18460
+ /** @description The Stripe payment method: which card, where two look alike. Subscribing names it in `confirmed.card`. */
18461
+ id: string;
18462
+ /** @description Stripe's card brand, e.g. `visa`, `mastercard`. */
18463
+ brand: string;
18464
+ last4: string;
18465
+ expMonth: number;
18466
+ expYear: number;
18467
+ };
18468
+ } | {
18469
+ /** @enum {string} */
18470
+ state: "pending" | "failed" | "replaced";
17727
18471
  };
17728
18472
  };
17729
18473
  };
@@ -17752,6 +18496,31 @@ interface paths$1 {
17752
18496
  };
17753
18497
  };
17754
18498
  };
18499
+ /** @description Unauthorized — authentication required or invalid */
18500
+ 401: {
18501
+ headers: {
18502
+ [name: string]: unknown;
18503
+ };
18504
+ content: {
18505
+ "application/json": {
18506
+ /**
18507
+ * @description HTTP status code
18508
+ * @example 400
18509
+ */
18510
+ statusCode?: number;
18511
+ /**
18512
+ * @description Short error label
18513
+ * @example Bad Request
18514
+ */
18515
+ error?: string;
18516
+ /**
18517
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
18518
+ * @example Validation failed
18519
+ */
18520
+ message: string | string[];
18521
+ };
18522
+ };
18523
+ };
17755
18524
  /** @description Forbidden — insufficient permissions or scope */
17756
18525
  403: {
17757
18526
  headers: {
@@ -17777,8 +18546,8 @@ interface paths$1 {
17777
18546
  };
17778
18547
  };
17779
18548
  };
17780
- /** @description Gone */
17781
- 410: {
18549
+ /** @description Not Found */
18550
+ 404: {
17782
18551
  headers: {
17783
18552
  [name: string]: unknown;
17784
18553
  };
@@ -17804,13 +18573,15 @@ interface paths$1 {
17804
18573
  };
17805
18574
  };
17806
18575
  };
18576
+ put?: never;
18577
+ post?: never;
17807
18578
  delete?: never;
17808
18579
  options?: never;
17809
18580
  head?: never;
17810
18581
  patch?: never;
17811
18582
  trace?: never;
17812
18583
  };
17813
- "/interaction/{uid}/access-request": {
18584
+ "/v1/account/billing/{product}/checkout": {
17814
18585
  parameters: {
17815
18586
  query?: never;
17816
18587
  header?: never;
@@ -17820,43 +18591,41 @@ interface paths$1 {
17820
18591
  get?: never;
17821
18592
  put?: never;
17822
18593
  /**
17823
- * Ask the organization's admins for the client's product (Witnium Vault)
17824
- * @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.
18594
+ * Start a Stripe Checkout for a product's plan
18595
+ * @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 exclude VAT, which Stripe Tax adds (or reverse charge for a business abroad); 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; 409 `currency_required` until the organization's billing currency is chosen (`PATCH /v1/account/billing/currency`); charged in that currency. 404 for a product without billing. 503 while the product's billing is switched off. The account site's session cookie (`wac_session`); POSTs and PATCHes from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
17825
18596
  */
17826
18597
  post: {
17827
18598
  parameters: {
17828
18599
  query?: never;
17829
18600
  header?: never;
17830
18601
  path: {
17831
- uid: string;
18602
+ product: string;
17832
18603
  };
17833
18604
  cookie?: never;
17834
18605
  };
17835
- requestBody?: never;
18606
+ requestBody?: {
18607
+ content: {
18608
+ "application/json": {
18609
+ /** @description One of the product's plans (`plans[].id`). */
18610
+ plan: string;
18611
+ /** @enum {string} */
18612
+ interval: "monthly" | "yearly";
18613
+ };
18614
+ };
18615
+ };
17836
18616
  responses: {
17837
- /** @description Success */
17838
- 200: {
18617
+ /** @description Created */
18618
+ 201: {
17839
18619
  headers: {
17840
18620
  [name: string]: unknown;
17841
18621
  };
17842
18622
  content: {
17843
18623
  "application/json": {
17844
- /**
17845
- * @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.
17846
- * @enum {string}
17847
- */
17848
- state: "requested" | "already_requested" | "no_admin";
17849
- organization: {
17850
- name: string;
17851
- };
17852
- } | {
17853
- /** @enum {string} */
17854
- state: "continue";
17855
18624
  /**
17856
18625
  * Format: uri
17857
- * @description Navigate here (the provider's resume): the sign-in goes on.
18626
+ * @description The Stripe-hosted page. Send the browser there.
17858
18627
  */
17859
- redirectTo: string;
18628
+ url: string;
17860
18629
  };
17861
18630
  };
17862
18631
  };
@@ -17885,6 +18654,31 @@ interface paths$1 {
17885
18654
  };
17886
18655
  };
17887
18656
  };
18657
+ /** @description Unauthorized — authentication required or invalid */
18658
+ 401: {
18659
+ headers: {
18660
+ [name: string]: unknown;
18661
+ };
18662
+ content: {
18663
+ "application/json": {
18664
+ /**
18665
+ * @description HTTP status code
18666
+ * @example 400
18667
+ */
18668
+ statusCode?: number;
18669
+ /**
18670
+ * @description Short error label
18671
+ * @example Bad Request
18672
+ */
18673
+ error?: string;
18674
+ /**
18675
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
18676
+ * @example Validation failed
18677
+ */
18678
+ message: string | string[];
18679
+ };
18680
+ };
18681
+ };
17888
18682
  /** @description Forbidden — insufficient permissions or scope */
17889
18683
  403: {
17890
18684
  headers: {
@@ -17910,8 +18704,8 @@ interface paths$1 {
17910
18704
  };
17911
18705
  };
17912
18706
  };
17913
- /** @description Gone */
17914
- 410: {
18707
+ /** @description Not Found */
18708
+ 404: {
17915
18709
  headers: {
17916
18710
  [name: string]: unknown;
17917
18711
  };
@@ -17935,8 +18729,8 @@ interface paths$1 {
17935
18729
  };
17936
18730
  };
17937
18731
  };
17938
- /** @description Too Many Requests */
17939
- 429: {
18732
+ /** @description Conflict */
18733
+ 409: {
17940
18734
  headers: {
17941
18735
  [name: string]: unknown;
17942
18736
  };
@@ -17960,8 +18754,8 @@ interface paths$1 {
17960
18754
  };
17961
18755
  };
17962
18756
  };
17963
- /** @description Bad Gateway */
17964
- 502: {
18757
+ /** @description Service Unavailable */
18758
+ 503: {
17965
18759
  headers: {
17966
18760
  [name: string]: unknown;
17967
18761
  };
@@ -17993,7 +18787,7 @@ interface paths$1 {
17993
18787
  patch?: never;
17994
18788
  trace?: never;
17995
18789
  };
17996
- "/interaction/{uid}/witnessing-authorization": {
18790
+ "/v1/account/billing/{product}/packs/{pack}/buy": {
17997
18791
  parameters: {
17998
18792
  query?: never;
17999
18793
  header?: never;
@@ -18003,19 +18797,52 @@ interface paths$1 {
18003
18797
  get?: never;
18004
18798
  put?: never;
18005
18799
  /**
18006
- * Let Witnium Vault witness your files again ([Allow])
18007
- * @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.
18800
+ * Buy one of a product's packs on the organization's card
18801
+ * @description Org admins only. A one-off invoice in the organization's billing currency (VAT by Stripe Tax), paid at once on the card on file, with no Stripe page. `paid`: the credits follow as Stripe confirms (webhook). `declined`: the bank refused the payment, with Stripe's message for the payer. `authentication_required`: the bank wants the payer to confirm; use the pack checkout. Neither leaves anything to pay (the invoice is voided). 409 `no_card`, `billing_address_required`, `currency_required`, `terms_changed` (the price or the card the page showed), `no_entitlement`, `suspended`, `invoiced` (an organization Witnium bills directly needs no packs), `attempt_expired`. 404 for a product that sells no packs, 400 for a pack it doesn't sell. 503 while its billing is switched off. The account site's session cookie (`wac_session`); POSTs and PATCHes from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
18008
18802
  */
18009
18803
  post: {
18010
18804
  parameters: {
18011
18805
  query?: never;
18012
18806
  header?: never;
18013
18807
  path: {
18014
- uid: string;
18808
+ product: string;
18809
+ pack: string;
18015
18810
  };
18016
18811
  cookie?: never;
18017
18812
  };
18018
- requestBody?: never;
18813
+ requestBody?: {
18814
+ content: {
18815
+ "application/json": {
18816
+ /** @description The page's purchase: an id new for each, and when the page started it. Sent again after an unknown outcome (no answer, or a 5xx), it is never charged twice: the server finds what Stripe has for it. After any outcome or a 4xx refusal, a new purchase is a new attempt. 409 `attempt_expired` after 23 hours. */
18817
+ attempt: {
18818
+ /** Format: uuid */
18819
+ id: string;
18820
+ /** Format: date-time */
18821
+ startedAt: string;
18822
+ };
18823
+ /** @description True once the payer confirmed buying the pack again after `recently_bought`; false otherwise. */
18824
+ repeat: boolean;
18825
+ /** @description What the payer confirmed. 409 `terms_changed` when any of it is no longer so. */
18826
+ confirmed: {
18827
+ /**
18828
+ * @description The currency the page showed the price in (the org's billing currency).
18829
+ * @enum {string}
18830
+ */
18831
+ currency: "sek" | "eur" | "usd" | "gbp" | "nok";
18832
+ /** @description The price the page showed, in the currency's minor units, VAT excluded. */
18833
+ amount: number;
18834
+ /** @description The card the page showed (`card`). */
18835
+ card: {
18836
+ id: string;
18837
+ brand: string;
18838
+ last4: string;
18839
+ expMonth: number;
18840
+ expYear: number;
18841
+ };
18842
+ };
18843
+ };
18844
+ };
18845
+ };
18019
18846
  responses: {
18020
18847
  /** @description Success */
18021
18848
  200: {
@@ -18024,11 +18851,24 @@ interface paths$1 {
18024
18851
  };
18025
18852
  content: {
18026
18853
  "application/json": {
18027
- /**
18028
- * Format: uri
18029
- * @description Navigate the browser here (the provider's resume).
18030
- */
18031
- redirectTo: string;
18854
+ /** @enum {string} */
18855
+ state: "paid";
18856
+ } | {
18857
+ /** @enum {string} */
18858
+ state: "declined";
18859
+ /** @description Stripe's reason, written for the payer. */
18860
+ message: string;
18861
+ } | {
18862
+ /** @enum {string} */
18863
+ state: "authentication_required";
18864
+ } | {
18865
+ /** @enum {string} */
18866
+ state: "failed";
18867
+ } | {
18868
+ /** @enum {string} */
18869
+ state: "recently_bought";
18870
+ /** Format: date-time */
18871
+ paidAt: string;
18032
18872
  };
18033
18873
  };
18034
18874
  };
@@ -18057,8 +18897,8 @@ interface paths$1 {
18057
18897
  };
18058
18898
  };
18059
18899
  };
18060
- /** @description Forbidden — insufficient permissions or scope */
18061
- 403: {
18900
+ /** @description Unauthorized — authentication required or invalid */
18901
+ 401: {
18062
18902
  headers: {
18063
18903
  [name: string]: unknown;
18064
18904
  };
@@ -18082,8 +18922,8 @@ interface paths$1 {
18082
18922
  };
18083
18923
  };
18084
18924
  };
18085
- /** @description Gone */
18086
- 410: {
18925
+ /** @description Forbidden — insufficient permissions or scope */
18926
+ 403: {
18087
18927
  headers: {
18088
18928
  [name: string]: unknown;
18089
18929
  };
@@ -18107,55 +18947,8 @@ interface paths$1 {
18107
18947
  };
18108
18948
  };
18109
18949
  };
18110
- };
18111
- };
18112
- delete?: never;
18113
- options?: never;
18114
- head?: never;
18115
- patch?: never;
18116
- trace?: never;
18117
- };
18118
- "/interaction/{uid}/witnessing-authorization/decline": {
18119
- parameters: {
18120
- query?: never;
18121
- header?: never;
18122
- path?: never;
18123
- cookie?: never;
18124
- };
18125
- get?: never;
18126
- put?: never;
18127
- /**
18128
- * Keep witnessing off ([Not now]): continue the sign-in without it
18129
- * @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.
18130
- */
18131
- post: {
18132
- parameters: {
18133
- query?: never;
18134
- header?: never;
18135
- path: {
18136
- uid: string;
18137
- };
18138
- cookie?: never;
18139
- };
18140
- requestBody?: never;
18141
- responses: {
18142
- /** @description Success */
18143
- 200: {
18144
- headers: {
18145
- [name: string]: unknown;
18146
- };
18147
- content: {
18148
- "application/json": {
18149
- /**
18150
- * Format: uri
18151
- * @description Navigate the browser here (the provider's resume).
18152
- */
18153
- redirectTo: string;
18154
- };
18155
- };
18156
- };
18157
- /** @description Bad Request — validation failed */
18158
- 400: {
18950
+ /** @description Not Found */
18951
+ 404: {
18159
18952
  headers: {
18160
18953
  [name: string]: unknown;
18161
18954
  };
@@ -18179,8 +18972,8 @@ interface paths$1 {
18179
18972
  };
18180
18973
  };
18181
18974
  };
18182
- /** @description Forbidden — insufficient permissions or scope */
18183
- 403: {
18975
+ /** @description Conflict */
18976
+ 409: {
18184
18977
  headers: {
18185
18978
  [name: string]: unknown;
18186
18979
  };
@@ -18204,8 +18997,8 @@ interface paths$1 {
18204
18997
  };
18205
18998
  };
18206
18999
  };
18207
- /** @description Gone */
18208
- 410: {
19000
+ /** @description Service Unavailable */
19001
+ 503: {
18209
19002
  headers: {
18210
19003
  [name: string]: unknown;
18211
19004
  };
@@ -18237,130 +19030,98 @@ interface paths$1 {
18237
19030
  patch?: never;
18238
19031
  trace?: never;
18239
19032
  };
18240
- "/v1/account/billing": {
19033
+ "/v1/account/billing/{product}/packs/{pack}/checkout": {
18241
19034
  parameters: {
18242
19035
  query?: never;
18243
19036
  header?: never;
18244
19037
  path?: never;
18245
19038
  cookie?: never;
18246
19039
  };
19040
+ get?: never;
19041
+ put?: never;
18247
19042
  /**
18248
- * The organization's plans, per product
18249
- * @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.
19043
+ * A Stripe Checkout page for one of a product's packs
19044
+ * @description Org admins only. Paid at once in the organization's billing currency; Stripe sends the payer back to the Billing page with `checkout=purchased` (or `canceled`). The credits follow as Stripe confirms. 409 as for buying on the card, except `no_card` and `terms_changed`. The account site's session cookie (`wac_session`); POSTs and PATCHes from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
18250
19045
  */
18251
- get: {
19046
+ post: {
18252
19047
  parameters: {
18253
19048
  query?: never;
18254
19049
  header?: never;
18255
- path?: never;
19050
+ path: {
19051
+ product: string;
19052
+ pack: string;
19053
+ };
18256
19054
  cookie?: never;
18257
19055
  };
18258
19056
  requestBody?: never;
18259
19057
  responses: {
18260
- /** @description Success */
18261
- 200: {
19058
+ /** @description Created */
19059
+ 201: {
18262
19060
  headers: {
18263
19061
  [name: string]: unknown;
18264
19062
  };
18265
19063
  content: {
18266
19064
  "application/json": {
18267
- organization: {
18268
- /** Format: uuid */
18269
- id: string;
18270
- name: string;
18271
- };
18272
- /** @description True for an active, unsuspended org admin: only they may call checkout and portal (403 for anyone else). */
18273
- canManageBilling: boolean;
18274
- products: {
18275
- product: {
18276
- id: string;
18277
- name: string;
18278
- /**
18279
- * Format: uri
18280
- * @description The product's app, where the Billing page links back to (server configuration).
18281
- */
18282
- appUrl: string;
18283
- };
18284
- /** @description False while the product's billing is switched off: nothing can be bought or changed. */
18285
- available: boolean;
18286
- /**
18287
- * BillingEntitlement
18288
- * @description null: the org does not hold the product (it starts in the product).
18289
- */
18290
- entitlement: {
18291
- /**
18292
- * @description How the org holds the product: a trial, a Stripe subscription, or free (granted by Witnium).
18293
- * @enum {string}
18294
- */
18295
- access: "trial" | "paid" | "complimentary";
18296
- plan: string;
18297
- /**
18298
- * Format: date-time
18299
- * @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.
18300
- */
18301
- expiresAt: string | null;
18302
- /** @description True while the entitlement is active and not past expiresAt. */
18303
- current: boolean;
18304
- } | null;
18305
- /**
18306
- * BillingSubscription
18307
- * @description The Stripe subscription behind a paid entitlement, read from Stripe now; null when the entitlement isn't paid.
18308
- */
18309
- subscription: {
18310
- /**
18311
- * @description Stripe's subscription status. `past_due`: a payment failed and Stripe is retrying (the entitlement stays current).
18312
- * @enum {string}
18313
- */
18314
- status: "trialing" | "active" | "past_due" | "unpaid" | "paused" | "canceled" | "incomplete" | "incomplete_expired";
18315
- plan: string;
18316
- /** @enum {string} */
18317
- interval: "monthly" | "yearly";
18318
- /**
18319
- * Format: date-time
18320
- * @description The next renewal (or, when canceling, the end).
18321
- */
18322
- currentPeriodEnd: string;
18323
- /** @description True when the subscription is set to end at currentPeriodEnd. */
18324
- cancelAtPeriodEnd: boolean;
18325
- /**
18326
- * Format: date-time
18327
- * @description The first charge, while in the trial Checkout set from the product's trial.
18328
- */
18329
- trialEnd: string | null;
18330
- } | null;
18331
- /** @description Every plan and interval checkout accepts, also while billing is switched off; the entitlement's and the subscription's plan are among them. */
18332
- plans: {
18333
- id: string;
18334
- /** @description Short name, e.g. "Plus". */
18335
- name: string;
18336
- /** @description What the plan includes. */
18337
- description: string;
18338
- /** @description Exactly one price per interval: one monthly and one yearly. */
18339
- prices: {
18340
- /** @enum {string} */
18341
- interval: "monthly" | "yearly";
18342
- /** @description In minor units (öre), VAT included. 4900 = 49 kr. */
18343
- amount: number;
18344
- /** @enum {string} */
18345
- currency: "sek";
18346
- }[];
18347
- }[];
18348
- /** @description Offered (to org admins) while the org holds the product without a running subscription; null otherwise. */
18349
- checkout: {
18350
- /**
18351
- * Format: date-time
18352
- * @description When the first payment is taken: the end of a current trial (at least 48 hours ahead). null = at checkout.
18353
- */
18354
- firstChargeAt: string | null;
18355
- } | null;
18356
- /** @description The Stripe customer portal is offered (to org admins): the org pays, or paid, for the product. */
18357
- portal: boolean;
18358
- }[];
19065
+ /**
19066
+ * Format: uri
19067
+ * @description The Stripe-hosted page. Send the browser there.
19068
+ */
19069
+ url: string;
19070
+ };
19071
+ };
19072
+ };
19073
+ /** @description Bad Request — validation failed */
19074
+ 400: {
19075
+ headers: {
19076
+ [name: string]: unknown;
19077
+ };
19078
+ content: {
19079
+ "application/json": {
19080
+ /**
19081
+ * @description HTTP status code
19082
+ * @example 400
19083
+ */
19084
+ statusCode?: number;
19085
+ /**
19086
+ * @description Short error label
19087
+ * @example Bad Request
19088
+ */
19089
+ error?: string;
19090
+ /**
19091
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
19092
+ * @example Validation failed
19093
+ */
19094
+ message: string | string[];
19095
+ };
19096
+ };
19097
+ };
19098
+ /** @description Unauthorized — authentication required or invalid */
19099
+ 401: {
19100
+ headers: {
19101
+ [name: string]: unknown;
19102
+ };
19103
+ content: {
19104
+ "application/json": {
19105
+ /**
19106
+ * @description HTTP status code
19107
+ * @example 400
19108
+ */
19109
+ statusCode?: number;
19110
+ /**
19111
+ * @description Short error label
19112
+ * @example Bad Request
19113
+ */
19114
+ error?: string;
19115
+ /**
19116
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
19117
+ * @example Validation failed
19118
+ */
19119
+ message: string | string[];
18359
19120
  };
18360
19121
  };
18361
19122
  };
18362
- /** @description Unauthorized — authentication required or invalid */
18363
- 401: {
19123
+ /** @description Forbidden — insufficient permissions or scope */
19124
+ 403: {
18364
19125
  headers: {
18365
19126
  [name: string]: unknown;
18366
19127
  };
@@ -18384,8 +19145,58 @@ interface paths$1 {
18384
19145
  };
18385
19146
  };
18386
19147
  };
18387
- /** @description Forbidden — insufficient permissions or scope */
18388
- 403: {
19148
+ /** @description Not Found */
19149
+ 404: {
19150
+ headers: {
19151
+ [name: string]: unknown;
19152
+ };
19153
+ content: {
19154
+ "application/json": {
19155
+ /**
19156
+ * @description HTTP status code
19157
+ * @example 400
19158
+ */
19159
+ statusCode?: number;
19160
+ /**
19161
+ * @description Short error label
19162
+ * @example Bad Request
19163
+ */
19164
+ error?: string;
19165
+ /**
19166
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
19167
+ * @example Validation failed
19168
+ */
19169
+ message: string | string[];
19170
+ };
19171
+ };
19172
+ };
19173
+ /** @description Conflict */
19174
+ 409: {
19175
+ headers: {
19176
+ [name: string]: unknown;
19177
+ };
19178
+ content: {
19179
+ "application/json": {
19180
+ /**
19181
+ * @description HTTP status code
19182
+ * @example 400
19183
+ */
19184
+ statusCode?: number;
19185
+ /**
19186
+ * @description Short error label
19187
+ * @example Bad Request
19188
+ */
19189
+ error?: string;
19190
+ /**
19191
+ * @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
19192
+ * @example Validation failed
19193
+ */
19194
+ message: string | string[];
19195
+ };
19196
+ };
19197
+ };
19198
+ /** @description Service Unavailable */
19199
+ 503: {
18389
19200
  headers: {
18390
19201
  [name: string]: unknown;
18391
19202
  };
@@ -18411,15 +19222,13 @@ interface paths$1 {
18411
19222
  };
18412
19223
  };
18413
19224
  };
18414
- put?: never;
18415
- post?: never;
18416
19225
  delete?: never;
18417
19226
  options?: never;
18418
19227
  head?: never;
18419
19228
  patch?: never;
18420
19229
  trace?: never;
18421
19230
  };
18422
- "/v1/account/billing/{product}/checkout": {
19231
+ "/v1/account/billing/{product}/subscribe": {
18423
19232
  parameters: {
18424
19233
  query?: never;
18425
19234
  header?: never;
@@ -18429,8 +19238,8 @@ interface paths$1 {
18429
19238
  get?: never;
18430
19239
  put?: never;
18431
19240
  /**
18432
- * Start a Stripe Checkout for a product's plan
18433
- * @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.
19241
+ * Subscribe to a product's plan on the organization's card
19242
+ * @description Org admins only. The subscription starts at once on the organization's card on file (`card` in `GET /v1/account/billing`), with no Stripe page; the trial rule, VAT and refusals are those of checkout. Stripe takes the first payment now (or at the end of a current trial). `subscribed`: the plan follows as Stripe confirms (webhook); the Billing page shows it within seconds. `declined`: the bank refused the payment, with Stripe's message for the payer. `authentication_required`: the bank wants the payer to confirm the payment; use checkout. Neither leaves a subscription behind. 409 `no_card` without a card on file, 409 `billing_address_required` when the organization's billing address is missing (replace the card), 409 `currency_required` until the billing currency is chosen (charged in it), 409 `already_subscribed`, 409 `no_entitlement`, 409 `terms_changed` when the price, the card or the first payment date the page showed (`confirmed`) is no longer so (the first payment may move later, never earlier). 404 for a product without billing. 503 while its billing is switched off. The account site's session cookie (`wac_session`); POSTs and PATCHes from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
18434
19243
  */
18435
19244
  post: {
18436
19245
  parameters: {
@@ -18448,22 +19257,50 @@ interface paths$1 {
18448
19257
  plan: string;
18449
19258
  /** @enum {string} */
18450
19259
  interval: "monthly" | "yearly";
19260
+ /** @description What the payer confirmed. 409 `terms_changed` when any of it is no longer so. */
19261
+ confirmed: {
19262
+ /**
19263
+ * @description The currency the page showed the price in (the org's billing currency).
19264
+ * @enum {string}
19265
+ */
19266
+ currency: "sek" | "eur" | "usd" | "gbp" | "nok";
19267
+ /** @description The price the page showed, in the currency's minor units, VAT excluded. */
19268
+ amount: number;
19269
+ /**
19270
+ * Format: date-time
19271
+ * @description The page's `checkout.firstChargeAt`: null = now.
19272
+ */
19273
+ firstChargeAt: string | null;
19274
+ /** @description The card the page showed (`card`). */
19275
+ card: {
19276
+ id: string;
19277
+ brand: string;
19278
+ last4: string;
19279
+ expMonth: number;
19280
+ expYear: number;
19281
+ };
19282
+ };
18451
19283
  };
18452
19284
  };
18453
19285
  };
18454
19286
  responses: {
18455
- /** @description Created */
18456
- 201: {
19287
+ /** @description Success */
19288
+ 200: {
18457
19289
  headers: {
18458
19290
  [name: string]: unknown;
18459
19291
  };
18460
19292
  content: {
18461
19293
  "application/json": {
18462
- /**
18463
- * Format: uri
18464
- * @description The Stripe-hosted page. Send the browser there.
18465
- */
18466
- url: string;
19294
+ /** @enum {string} */
19295
+ state: "subscribed";
19296
+ } | {
19297
+ /** @enum {string} */
19298
+ state: "declined";
19299
+ /** @description Stripe's reason, written for the payer. */
19300
+ message: string;
19301
+ } | {
19302
+ /** @enum {string} */
19303
+ state: "authentication_required";
18467
19304
  };
18468
19305
  };
18469
19306
  };
@@ -18636,7 +19473,7 @@ interface paths$1 {
18636
19473
  put?: never;
18637
19474
  /**
18638
19475
  * Open the Stripe customer portal for a product
18639
- * @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.
19476
+ * @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 and PATCHes from the account site's origin (the cookie Origin rule). The caller's home organization; any active membership may read.
18640
19477
  */
18641
19478
  post: {
18642
19479
  parameters: {
@@ -19265,6 +20102,11 @@ interface paths {
19265
20102
  };
19266
20103
  content: {
19267
20104
  "application/json": {
20105
+ /**
20106
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
20107
+ * @enum {string}
20108
+ */
20109
+ environment: "live" | "sandbox";
19268
20110
  /**
19269
20111
  * @description Ethereum address (0x + 40 hex characters)
19270
20112
  * @example 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0
@@ -19395,6 +20237,11 @@ interface paths {
19395
20237
  };
19396
20238
  content: {
19397
20239
  "application/json": {
20240
+ /**
20241
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
20242
+ * @enum {string}
20243
+ */
20244
+ environment: "live" | "sandbox";
19398
20245
  /**
19399
20246
  * @description Ethereum address (0x + 40 hex characters)
19400
20247
  * @example 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0
@@ -19567,6 +20414,11 @@ interface paths {
19567
20414
  };
19568
20415
  content: {
19569
20416
  "application/json": {
20417
+ /**
20418
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
20419
+ * @enum {string}
20420
+ */
20421
+ environment: "live" | "sandbox";
19570
20422
  /**
19571
20423
  * @description Ethereum address (0x + 40 hex characters)
19572
20424
  * @example 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0
@@ -19680,6 +20532,11 @@ interface paths {
19680
20532
  };
19681
20533
  content: {
19682
20534
  "application/json": {
20535
+ /**
20536
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
20537
+ * @enum {string}
20538
+ */
20539
+ environment: "live" | "sandbox";
19683
20540
  /**
19684
20541
  * IntentId
19685
20542
  * Format: uuid
@@ -19847,6 +20704,11 @@ interface paths {
19847
20704
  };
19848
20705
  content: {
19849
20706
  "application/json": {
20707
+ /**
20708
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
20709
+ * @enum {string}
20710
+ */
20711
+ environment: "live" | "sandbox";
19850
20712
  signaturesCollected: number;
19851
20713
  signaturesRequired: number;
19852
20714
  ready: boolean;
@@ -19946,6 +20808,17 @@ interface paths {
19946
20808
  details?: {
19947
20809
  [key: string]: string[];
19948
20810
  };
20811
+ } | {
20812
+ /** @enum {number} */
20813
+ statusCode: 410;
20814
+ /** @enum {string} */
20815
+ code: "witness_expired";
20816
+ message: string;
20817
+ /**
20818
+ * Format: date-time
20819
+ * @description When the witness's retention ended (ISO 8601): its on-chain creation time plus the retention period.
20820
+ */
20821
+ retainedUntil: string;
19949
20822
  };
19950
20823
  };
19951
20824
  };
@@ -20015,6 +20888,16 @@ interface paths {
20015
20888
  };
20016
20889
  content: {
20017
20890
  "application/json": {
20891
+ /**
20892
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
20893
+ * @enum {string}
20894
+ */
20895
+ environment: "live" | "sandbox";
20896
+ /**
20897
+ * Format: date-time
20898
+ * @description When the sandbox deletes this witness's records (ISO 8601): its on-chain creation time plus the retention period. Reads after that answer 410 `witness_expired`. `null` in live, where witnesses are kept.
20899
+ */
20900
+ retainedUntil: string | null;
20018
20901
  /**
20019
20902
  * IntentId
20020
20903
  * Format: uuid
@@ -20085,6 +20968,17 @@ interface paths {
20085
20968
  details?: {
20086
20969
  [key: string]: string[];
20087
20970
  };
20971
+ } | {
20972
+ /** @enum {number} */
20973
+ statusCode: 410;
20974
+ /** @enum {string} */
20975
+ code: "witness_expired";
20976
+ message: string;
20977
+ /**
20978
+ * Format: date-time
20979
+ * @description When the witness's retention ended (ISO 8601): its on-chain creation time plus the retention period.
20980
+ */
20981
+ retainedUntil: string;
20088
20982
  };
20089
20983
  };
20090
20984
  };
@@ -20129,7 +21023,10 @@ interface paths {
20129
21023
  };
20130
21024
  get?: never;
20131
21025
  put?: never;
20132
- /** Revoke a v5 witness (tombstone) */
21026
+ /**
21027
+ * Revoke a v5 witness (tombstone)
21028
+ * @description In the sandbox the witness must still be inside its retention period: past it the route answers 410 `witness_expired` before anything is written, and the response carries the witness's `retainedUntil` (`null` in live).
21029
+ */
20133
21030
  post: {
20134
21031
  parameters: {
20135
21032
  query?: never;
@@ -20167,6 +21064,16 @@ interface paths {
20167
21064
  };
20168
21065
  content: {
20169
21066
  "application/json": {
21067
+ /**
21068
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
21069
+ * @enum {string}
21070
+ */
21071
+ environment: "live" | "sandbox";
21072
+ /**
21073
+ * Format: date-time
21074
+ * @description When the sandbox deletes this witness's records (ISO 8601): its on-chain creation time plus the retention period. Reads after that answer 410 `witness_expired`. `null` in live, where witnesses are kept.
21075
+ */
21076
+ retainedUntil: string | null;
20170
21077
  /**
20171
21078
  * @description Ethereum transaction hash (0x + 64 hex characters)
20172
21079
  * @example 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
@@ -20223,6 +21130,30 @@ interface paths {
20223
21130
  };
20224
21131
  };
20225
21132
  };
21133
+ /** @description Not Found */
21134
+ 404: {
21135
+ headers: {
21136
+ [name: string]: unknown;
21137
+ };
21138
+ content: {
21139
+ "application/json": {
21140
+ /**
21141
+ * @description Error message
21142
+ * @example Validation failed
21143
+ */
21144
+ error: string;
21145
+ /**
21146
+ * @description Machine-readable error code
21147
+ * @example VALIDATION_FAILED
21148
+ */
21149
+ code?: string;
21150
+ /** @description Field-level validation errors */
21151
+ details?: {
21152
+ [key: string]: string[];
21153
+ };
21154
+ };
21155
+ };
21156
+ };
20226
21157
  /** @description Conflict */
20227
21158
  409: {
20228
21159
  headers: {
@@ -20247,6 +21178,26 @@ interface paths {
20247
21178
  };
20248
21179
  };
20249
21180
  };
21181
+ /** @description Response */
21182
+ 410: {
21183
+ headers: {
21184
+ [name: string]: unknown;
21185
+ };
21186
+ content: {
21187
+ "application/json": {
21188
+ /** @enum {number} */
21189
+ statusCode: 410;
21190
+ /** @enum {string} */
21191
+ code: "witness_expired";
21192
+ message: string;
21193
+ /**
21194
+ * Format: date-time
21195
+ * @description When the witness's retention ended (ISO 8601): its on-chain creation time plus the retention period.
21196
+ */
21197
+ retainedUntil: string;
21198
+ };
21199
+ };
21200
+ };
20250
21201
  /** @description Internal Server Error */
20251
21202
  500: {
20252
21203
  headers: {
@@ -20328,6 +21279,11 @@ interface paths {
20328
21279
  };
20329
21280
  content: {
20330
21281
  "application/json": {
21282
+ /**
21283
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
21284
+ * @enum {string}
21285
+ */
21286
+ environment: "live" | "sandbox";
20331
21287
  /**
20332
21288
  * @description Ethereum transaction hash (0x + 64 hex characters)
20333
21289
  * @example 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
@@ -20488,6 +21444,11 @@ interface paths {
20488
21444
  };
20489
21445
  content: {
20490
21446
  "application/json": {
21447
+ /**
21448
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
21449
+ * @enum {string}
21450
+ */
21451
+ environment: "live" | "sandbox";
20491
21452
  /**
20492
21453
  * @description Ethereum transaction hash (0x + 64 hex characters)
20493
21454
  * @example 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
@@ -20643,6 +21604,11 @@ interface paths {
20643
21604
  };
20644
21605
  content: {
20645
21606
  "application/json": {
21607
+ /**
21608
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
21609
+ * @enum {string}
21610
+ */
21611
+ environment: "live" | "sandbox";
20646
21612
  /**
20647
21613
  * @description Ethereum transaction hash (0x + 64 hex characters)
20648
21614
  * @example 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
@@ -20798,6 +21764,11 @@ interface paths {
20798
21764
  };
20799
21765
  content: {
20800
21766
  "application/json": {
21767
+ /**
21768
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
21769
+ * @enum {string}
21770
+ */
21771
+ environment: "live" | "sandbox";
20801
21772
  /**
20802
21773
  * @description Ethereum transaction hash (0x + 64 hex characters)
20803
21774
  * @example 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
@@ -20950,7 +21921,17 @@ interface paths {
20950
21921
  };
20951
21922
  content: {
20952
21923
  "application/json": {
21924
+ /**
21925
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
21926
+ * @enum {string}
21927
+ */
21928
+ environment: "live" | "sandbox";
20953
21929
  witnesses: {
21930
+ /**
21931
+ * Format: date-time
21932
+ * @description When the sandbox deletes this witness's records (ISO 8601): its on-chain creation time plus the retention period. Reads after that answer 410 `witness_expired`. `null` in live, where witnesses are kept.
21933
+ */
21934
+ retainedUntil: string | null;
20954
21935
  /**
20955
21936
  * WitnessIdV5
20956
21937
  * @description 32-byte contract-derived witness identifier (hex, no 0x prefix)
@@ -21114,6 +22095,16 @@ interface paths {
21114
22095
  };
21115
22096
  content: {
21116
22097
  "application/json": {
22098
+ /**
22099
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
22100
+ * @enum {string}
22101
+ */
22102
+ environment: "live" | "sandbox";
22103
+ /**
22104
+ * Format: date-time
22105
+ * @description When the sandbox deletes this witness's records (ISO 8601): its on-chain creation time plus the retention period. Reads after that answer 410 `witness_expired`. `null` in live, where witnesses are kept.
22106
+ */
22107
+ retainedUntil: string | null;
21117
22108
  /**
21118
22109
  * WitnessIdV5
21119
22110
  * @description 32-byte contract-derived witness identifier (hex, no 0x prefix)
@@ -21183,6 +22174,26 @@ interface paths {
21183
22174
  };
21184
22175
  };
21185
22176
  };
22177
+ /** @description Response */
22178
+ 410: {
22179
+ headers: {
22180
+ [name: string]: unknown;
22181
+ };
22182
+ content: {
22183
+ "application/json": {
22184
+ /** @enum {number} */
22185
+ statusCode: 410;
22186
+ /** @enum {string} */
22187
+ code: "witness_expired";
22188
+ message: string;
22189
+ /**
22190
+ * Format: date-time
22191
+ * @description When the witness's retention ended (ISO 8601): its on-chain creation time plus the retention period.
22192
+ */
22193
+ retainedUntil: string;
22194
+ };
22195
+ };
22196
+ };
21186
22197
  /** @description Internal Server Error */
21187
22198
  500: {
21188
22199
  headers: {
@@ -21247,6 +22258,11 @@ interface paths {
21247
22258
  };
21248
22259
  content: {
21249
22260
  "application/json": {
22261
+ /**
22262
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
22263
+ * @enum {string}
22264
+ */
22265
+ environment: "live" | "sandbox";
21250
22266
  /**
21251
22267
  * @description Ethereum transaction hash (0x + 64 hex characters)
21252
22268
  * @example 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
@@ -21328,6 +22344,11 @@ interface paths {
21328
22344
  };
21329
22345
  content: {
21330
22346
  "application/json": {
22347
+ /**
22348
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
22349
+ * @enum {string}
22350
+ */
22351
+ environment: "live" | "sandbox";
21331
22352
  /**
21332
22353
  * @description Ethereum transaction hash (0x + 64 hex characters)
21333
22354
  * @example 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
@@ -21420,6 +22441,11 @@ interface paths {
21420
22441
  };
21421
22442
  content: {
21422
22443
  "application/json": {
22444
+ /**
22445
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
22446
+ * @enum {string}
22447
+ */
22448
+ environment: "live" | "sandbox";
21423
22449
  /**
21424
22450
  * @description Ethereum address (0x + 40 hex characters)
21425
22451
  * @example 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0
@@ -21547,7 +22573,17 @@ interface paths {
21547
22573
  };
21548
22574
  content: {
21549
22575
  "application/json": {
22576
+ /**
22577
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
22578
+ * @enum {string}
22579
+ */
22580
+ environment: "live" | "sandbox";
21550
22581
  witnesses: {
22582
+ /**
22583
+ * Format: date-time
22584
+ * @description When the sandbox deletes this witness's records (ISO 8601): its on-chain creation time plus the retention period. Reads after that answer 410 `witness_expired`. `null` in live, where witnesses are kept.
22585
+ */
22586
+ retainedUntil: string | null;
21551
22587
  /**
21552
22588
  * WitnessIdV5
21553
22589
  * @description 32-byte contract-derived witness identifier (hex, no 0x prefix)
@@ -21684,6 +22720,11 @@ interface paths {
21684
22720
  };
21685
22721
  content: {
21686
22722
  "application/json": {
22723
+ /**
22724
+ * @description The deployment that answered: `live` (evidence), or `sandbox` (test data, deleted after its retention period).
22725
+ * @enum {string}
22726
+ */
22727
+ environment: "live" | "sandbox";
21687
22728
  /**
21688
22729
  * @description Ethereum address (0x + 40 hex characters)
21689
22730
  * @example 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0
@@ -22080,9 +23121,6 @@ type ForgotPasswordRequest = Req<'/v1/auth/forgot-password', 'post'>;
22080
23121
  type ForgotPasswordResponse = Res<'/v1/auth/forgot-password', 'post'>;
22081
23122
  type ResetPasswordRequest = Req<'/v1/auth/reset-password', 'post'>;
22082
23123
  type ResetPasswordResponse = Res<'/v1/auth/reset-password', 'post'>;
22083
- type CheckoutRequest = Req<'/v1/billing/checkout', 'post'>;
22084
- type CheckoutResponse = Res<'/v1/billing/checkout', 'post'>;
22085
- type PortalResponse = Res<'/v1/billing/portal', 'get'>;
22086
23124
  type CreateApiKeyRequest = Req<'/v1/orgs/me/api-keys', 'post'>;
22087
23125
  type CreateApiKeyResponse = Res<'/v1/orgs/me/api-keys', 'post'>;
22088
23126
  type ListApiKeysResponse = Res<'/v1/orgs/me/api-keys', 'get'>;
@@ -22216,12 +23254,12 @@ type DashboardWitnessesResponse = ChainRes<'/v5/dashboard/witnesses', 'get'>;
22216
23254
  * writes via the metered v5 proxy) and chain-api read surfaces (contract
22217
23255
  * info / witness lookup / wallet balance / dashboards). Two convenience
22218
23256
  * clients layer on top — `WitniumchainClient` (end-user) and
22219
- * `WitniumchainOrgClient` (org admin) — with helpers for signup,
22220
- * subscriptions, and delegated-key provisioning. The sysadmin surface lives in
23257
+ * `WitniumchainOrgClient` (org admin) — with helpers for signup, the
23258
+ * credit ledger, and delegated-key provisioning. The sysadmin surface lives in
22221
23259
  * the separate PRIVATE `@witnium/chain-admin-sdk` package, not here.
22222
23260
  *
22223
- * Stripe surface is intentionally Checkout + Customer Portal ONLY. Witnium is
22224
- * not a marketplace, so there is no Stripe Connect onboarding.
23261
+ * No Stripe surface: plans and credit packs are bought on the Witnium Account
23262
+ * Billing page, not through the SDK.
22225
23263
  *
22226
23264
  * Auth model — five distinct credentials, each used by a known subset of
22227
23265
  * routes. Configure whichever you'll actually use; methods that need a
@@ -22229,7 +23267,7 @@ type DashboardWitnessesResponse = ChainRes<'/v5/dashboard/witnesses', 'get'>;
22229
23267
  *
22230
23268
  * - sessionCookie — `wac_session` value for browser-cookie routes.
22231
23269
  * - accessToken — OAuth Bearer JWT for end-user API.
22232
- * - apiKey — `wcak_…`, an org API key: sign and v5 witness writes
23270
+ * - apiKey — `wcak_live_…`/`wcak_sandbox_…`, an org API key: sign and v5 witness writes
22233
23271
  * for its org (prefer WitniumchainApiKeyClient).
22234
23272
  * - signedRequest — Ed25519 signer for SDK signed-request routes
22235
23273
  * (witnesses propose/sign/finalize/revoke). The SDK
@@ -22355,8 +23393,10 @@ interface WitniumchainClientConfig {
22355
23393
  */
22356
23394
  verifierStorage?: PkceVerifierStorage;
22357
23395
  /**
22358
- * An org API key (`wcak_…`, plan §14). When set, `sign` and the v5
22359
- * witness writes authenticate with it instead of an OAuth token. Prefer
23396
+ * An org API key (`wcak_live_…` or `wcak_sandbox_…`, or a pre-sandbox
23397
+ * `wcak_…` key; see {@link parseApiKey}). The constructor throws on any
23398
+ * other format. When set, `sign` and the v5 witness writes authenticate
23399
+ * with it instead of an OAuth token. Prefer
22360
23400
  * {@link WitniumchainApiKeyClient}, which exposes only those calls.
22361
23401
  */
22362
23402
  apiKey?: string;
@@ -22614,8 +23654,6 @@ declare class WitniumchainClient {
22614
23654
  logout(): Promise<LogoutResponse>;
22615
23655
  forgotPassword(body: ForgotPasswordRequest): Promise<ForgotPasswordResponse>;
22616
23656
  resetPassword(body: ResetPasswordRequest): Promise<ResetPasswordResponse>;
22617
- createCheckoutSession(body: CheckoutRequest): Promise<CheckoutResponse>;
22618
- createPortalSession(): Promise<PortalResponse>;
22619
23657
  /** The calling API key's own description: its contract and signing key (API key only). */
22620
23658
  getApiKeySelf(): Promise<ApiKeySelfResponse>;
22621
23659
  listDelegatedKeys(query?: {
@@ -22919,22 +23957,13 @@ declare class WitniumchainClient {
22919
23957
  private parseApiError;
22920
23958
  private toApiError;
22921
23959
  }
22922
- /** `client.subscriptions.*` — Stripe Checkout + portal + credit ledger. */
23960
+ /**
23961
+ * `client.subscriptions.*`: the credit ledger. Plans and credit packs are
23962
+ * bought on the Witnium Account Billing page, not through the SDK.
23963
+ */
22923
23964
  declare class Subscriptions {
22924
23965
  private readonly client;
22925
23966
  constructor(client: WitniumchainClient);
22926
- /**
22927
- * Start a Stripe Checkout session for the supplied price. Returns the
22928
- * hosted Checkout URL; redirect the user to it. Stripe's
22929
- * `checkout.session.completed` webhook grants credits on success.
22930
- */
22931
- subscribe(body: CheckoutRequest): Promise<CheckoutResponse>;
22932
- /**
22933
- * Open the Stripe Billing Portal for the calling user's org. Returns the
22934
- * hosted portal URL — redirect the user there for subscription /
22935
- * payment-method management.
22936
- */
22937
- manage(): Promise<PortalResponse>;
22938
23967
  /** Recent credit-ledger entries (most recent 200). */
22939
23968
  getLedger(): Promise<LedgerResponse>;
22940
23969
  }
@@ -23239,10 +24268,50 @@ declare class WitniumchainChainAdminClient {
23239
24268
  private req;
23240
24269
  }
23241
24270
 
24271
+ /**
24272
+ * Org API key formats (sandbox plan §3.4 and decision D2).
24273
+ *
24274
+ * - `wcak_live_` + 64 lowercase hex: a live key.
24275
+ * - `wcak_sandbox_` + 64 lowercase hex: a sandbox key.
24276
+ * - `wcak_` + 64 lowercase hex: a live key issued before the
24277
+ * sandbox existed. Accounts accepts these until its announced cutoff
24278
+ * and then refuses them; rotate to a `wcak_live_` key before then.
24279
+ *
24280
+ * The prefix tells the caller which environment a key belongs to.
24281
+ * Accounts decides from the stored key, not from the prefix, and
24282
+ * refuses a key whose prefix doesn't match its record.
24283
+ */
24284
+ type ApiKeyEnvironment = 'live' | 'sandbox';
24285
+ interface ParsedApiKey {
24286
+ environment: ApiKeyEnvironment;
24287
+ /** True for a pre-sandbox `wcak_` + 64 hex key (always `live`). */
24288
+ legacyFormat: boolean;
24289
+ }
24290
+ /**
24291
+ * Parse an org API key's format. Throws on anything else. The error
24292
+ * never contains the key.
24293
+ */
24294
+ declare function parseApiKey(apiKey: string): ParsedApiKey;
24295
+
24296
+ /**
24297
+ * WitniumchainApiKeyClient — what a server does with an org API key
24298
+ * (`wcak_live_…` or `wcak_sandbox_…`, plan §14): sign with the key's own signing key and write v5
24299
+ * witnesses for its org, metered against the org. Exposes exactly the
24300
+ * calls an API key may make, so anything else is a type error rather
24301
+ * than a 401.
24302
+ *
24303
+ * ```ts
24304
+ * const client = new WitniumchainApiKeyClient({ baseUrl: 'https://auth.witniumchain.com', apiKey });
24305
+ * const me = await client.me(); // contract + signing key
24306
+ * const proposed = await client.proposeWitnessV5(me.contractAddress, { dataId, requiredSigners: [me.publicKey] });
24307
+ * // 'created': sign proposed.payloadToSign, then finalize. 'existing': already witnessed, nothing to do.
24308
+ * ```
24309
+ */
24310
+
23242
24311
  interface WitniumchainApiKeyClientConfig {
23243
24312
  /** Accounts base URL, e.g. `https://auth.witniumchain.com`. */
23244
24313
  baseUrl: string;
23245
- /** The org API key, `wcak_` and 64 hex. */
24314
+ /** The org API key: `wcak_live_` or `wcak_sandbox_` and 64 hex (see {@link parseApiKey}). */
23246
24315
  apiKey: string;
23247
24316
  /** Per-request timeout in milliseconds. Default 30000. */
23248
24317
  timeout?: number;
@@ -23251,6 +24320,14 @@ interface WitniumchainApiKeyClientConfig {
23251
24320
  }
23252
24321
  declare class WitniumchainApiKeyClient {
23253
24322
  private readonly inner;
24323
+ /**
24324
+ * `live` or `sandbox`, from the key's prefix. Accounts
24325
+ * decides from its own record of the key; this is for the caller's checks
24326
+ * and logs.
24327
+ */
24328
+ readonly environment: ApiKeyEnvironment;
24329
+ /** True for a pre-sandbox `wcak_` + 64 hex key. Rotate it to a `wcak_live_` key before accounts' cutoff. */
24330
+ readonly legacyKeyFormat: boolean;
23254
24331
  constructor(config: WitniumchainApiKeyClientConfig);
23255
24332
  /** The key's organization, contract and signing key. 409 while it is still being added to the contract. */
23256
24333
  me(): Promise<ApiKeySelfResponse>;
@@ -23458,4 +24535,4 @@ declare const ownerKeyFile: {
23458
24535
  sign: typeof signWithOwnerKeyFile;
23459
24536
  };
23460
24537
 
23461
- 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 };
24538
+ 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 ApiKeyEnvironment, type ApiKeySelfResponse, type ApproveSigningKeyRequest, type BeginOAuthLoginArgs, type BeginOAuthLoginResult, type BeginOAuthLogoutArgs, type BeginOAuthLogoutResult, type paths as ChainPaths, 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 ParsedApiKey, type PauseRequest$1 as PauseRequest, type PauseResponse, type PkceVerifierStorage, 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, parseApiKey, parseOwnerKeyFile, randomWitnessScope, serializeOwnerKeyFile, signWithOwnerKeyFile, witnessScopeFor };