@vibexp/api-client 0.97.0 → 0.98.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.
@@ -6291,7 +6291,13 @@ export type AdminInstanceEmailSettings = {
6291
6291
  * only `has_credential` and, on an upsert's `after`, a `secret` marker
6292
6292
  * saying whether the credential was `changed` or `unchanged`; the `search`
6293
6293
  * and `ai_summary` snapshots are the settings' values, which hold no
6294
- * credential.
6294
+ * credential. For `auth_providers` each entry is one provider, reporting
6295
+ * only `has_client_secret` and, on an upsert's `after`, a `client_secret`
6296
+ * marker (`changed` or `unchanged`); `auth_allowlist`, `instance_admins`
6297
+ * and `auth_setup` snapshots hold no credential (the setup token and its
6298
+ * hash are never recorded). A snapshot of any of these four settings
6299
+ * carries `source: cli` when the change was made by the `vibexp admin auth`
6300
+ * commands rather than through this API.
6295
6301
  *
6296
6302
  */
6297
6303
  export type AdminInstanceSettingsAuditEntry = {
@@ -6302,7 +6308,7 @@ export type AdminInstanceSettingsAuditEntry = {
6302
6308
  /**
6303
6309
  * The instance setting the entry describes.
6304
6310
  */
6305
- setting: 'email_provider' | 'search' | 'ai_summary';
6311
+ setting: 'email_provider' | 'search' | 'ai_summary' | 'auth_providers' | 'auth_allowlist' | 'instance_admins' | 'auth_setup';
6306
6312
  /**
6307
6313
  * `upsert` (created or replaced by an admin), `delete` (removed by an
6308
6314
  * admin) or `import` (the boot-time import from config.yaml, which has no
@@ -6563,6 +6569,355 @@ export type AdminInstanceAiSummarySettingsUpdate = {
6563
6569
  */
6564
6570
  expected_version?: number | null;
6565
6571
  };
6572
+ /**
6573
+ * The kind of sign-in identity provider. At most one `google` and one
6574
+ * `github` provider can be stored; any number of `oidc` providers.
6575
+ *
6576
+ */
6577
+ export type AdminAuthProviderType = 'google' | 'github' | 'oidc';
6578
+ /**
6579
+ * The provider's build outcome on the replica that served the request:
6580
+ * `healthy` (built and offered for sign-in), `unhealthy` (enabled but it
6581
+ * failed to build, so it is excluded from sign-in), `disabled` (not enabled,
6582
+ * so never built) or `unknown` (enabled, but this replica could not resolve
6583
+ * it for this request).
6584
+ *
6585
+ */
6586
+ export type AdminAuthProviderHealthStatus = 'healthy' | 'unhealthy' | 'disabled' | 'unknown';
6587
+ /**
6588
+ * The provider's health as seen by the replica that served the request.
6589
+ * Health is held in memory per replica and is not persisted.
6590
+ *
6591
+ */
6592
+ export type AdminAuthProviderHealth = {
6593
+ status: AdminAuthProviderHealthStatus;
6594
+ /**
6595
+ * Why an `unhealthy` provider failed to build; null otherwise.
6596
+ */
6597
+ last_error: string | null;
6598
+ /**
6599
+ * When the provider was last built (or tried); null for `disabled` and `unknown`.
6600
+ */
6601
+ checked_at: string | null;
6602
+ };
6603
+ /**
6604
+ * One sign-in identity provider. The client secret is write-only: it is never
6605
+ * returned, and `has_client_secret` reports only whether one is stored.
6606
+ *
6607
+ */
6608
+ export type AdminAuthProvider = {
6609
+ /**
6610
+ * Provider id.
6611
+ */
6612
+ id: string;
6613
+ type: AdminAuthProviderType;
6614
+ /**
6615
+ * The provider's url-safe name, used in the sign-in URL. Immutable.
6616
+ */
6617
+ slug: string;
6618
+ /**
6619
+ * The name shown on the sign-in button.
6620
+ */
6621
+ display_name: string;
6622
+ /**
6623
+ * Whether the provider is offered for sign-in.
6624
+ */
6625
+ enabled: boolean;
6626
+ /**
6627
+ * Position on the sign-in page, ascending.
6628
+ */
6629
+ sort_order: number;
6630
+ /**
6631
+ * The OAuth client id.
6632
+ */
6633
+ client_id: string;
6634
+ /**
6635
+ * Whether a client secret is stored.
6636
+ */
6637
+ has_client_secret: boolean;
6638
+ /**
6639
+ * The OIDC issuer URL; null for `google` and `github`.
6640
+ */
6641
+ issuer_url: string | null;
6642
+ /**
6643
+ * The redirect URI to register in the identity provider's console. It is
6644
+ * derived from the instance's own URL, is the same for every provider and
6645
+ * cannot be changed here.
6646
+ *
6647
+ */
6648
+ redirect_uri: string;
6649
+ health: AdminAuthProviderHealth;
6650
+ created_at: string;
6651
+ updated_at: string;
6652
+ /**
6653
+ * Who last saved the provider. Null for the boot-time config import, a
6654
+ * save made on a setup session, or once that user has been deleted.
6655
+ *
6656
+ */
6657
+ updated_by_user_id: string | null;
6658
+ };
6659
+ /**
6660
+ * Every stored sign-in identity provider, in sign-in page order, with the
6661
+ * `version` of the instance authentication settings. Send that `version` back
6662
+ * as `expected_version` when changing a provider.
6663
+ *
6664
+ */
6665
+ export type AdminAuthProviderList = {
6666
+ providers: Array<AdminAuthProvider>;
6667
+ /**
6668
+ * The shared version of the authentication settings. Every provider and
6669
+ * allowlist change increments it.
6670
+ *
6671
+ */
6672
+ version: number;
6673
+ };
6674
+ /**
6675
+ * A provider as stored by a create or an update, with the settings `version`
6676
+ * after the change. `provider.health` is resolved after the change, so the
6677
+ * response waits for the provider to be built (for `oidc` and `google`, one
6678
+ * bounded discovery request) and reports whether sign-in can use it.
6679
+ *
6680
+ */
6681
+ export type AdminAuthProviderSaved = {
6682
+ provider: AdminAuthProvider;
6683
+ /**
6684
+ * The shared authentication settings version after the change.
6685
+ */
6686
+ version: number;
6687
+ };
6688
+ /**
6689
+ * A new sign-in identity provider. `type` and `slug` cannot be changed later.
6690
+ * `expected_version` is optional: when present, the create is rejected with
6691
+ * 409 unless it equals the current authentication settings `version`.
6692
+ *
6693
+ */
6694
+ export type AdminAuthProviderCreate = {
6695
+ type: AdminAuthProviderType;
6696
+ /**
6697
+ * 1-63 lower-case letters, digits or hyphens, not starting with a hyphen.
6698
+ */
6699
+ slug: string;
6700
+ display_name: string;
6701
+ /**
6702
+ * Whether the provider is offered for sign-in. Defaults to true.
6703
+ */
6704
+ enabled?: boolean;
6705
+ /**
6706
+ * Position on the sign-in page, ascending. Defaults to 0.
6707
+ */
6708
+ sort_order?: number;
6709
+ client_id: string;
6710
+ /**
6711
+ * The OAuth client secret. Stored encrypted and never returned.
6712
+ */
6713
+ client_secret: string;
6714
+ /**
6715
+ * Required for `oidc` and rejected for `google` and `github`. An absolute
6716
+ * `https://` URL (`http://` only for localhost) with no query or fragment.
6717
+ *
6718
+ */
6719
+ issuer_url?: string;
6720
+ /**
6721
+ * The `version` the caller last read; omit or null to apply to the current version.
6722
+ */
6723
+ expected_version?: number | null;
6724
+ };
6725
+ /**
6726
+ * A whole replacement of a provider's editable fields; `type` and `slug` are
6727
+ * immutable and are rejected as unknown fields. `display_name`, `enabled`,
6728
+ * `sort_order`, `client_id` and `expected_version` are required.
6729
+ *
6730
+ * `client_secret` is write-only. Omit it to keep the stored secret; an empty
6731
+ * string is rejected. It cannot be omitted when `issuer_url` changes: the
6732
+ * stored secret is only ever kept for the issuer it was saved with.
6733
+ *
6734
+ * A change that disables the last enabled provider, or the provider the
6735
+ * calling admin signed in with, is rejected with 409 `lockout_risk` unless
6736
+ * `confirm_lockout_risk` is true.
6737
+ *
6738
+ */
6739
+ export type AdminAuthProviderUpdate = {
6740
+ display_name: string;
6741
+ enabled: boolean;
6742
+ sort_order: number;
6743
+ client_id: string;
6744
+ /**
6745
+ * A new client secret. Omit to keep the stored one. Never returned.
6746
+ */
6747
+ client_secret?: string;
6748
+ /**
6749
+ * Required for `oidc`, rejected for `google` and `github`.
6750
+ */
6751
+ issuer_url?: string;
6752
+ /**
6753
+ * The authentication settings `version` the caller last read.
6754
+ */
6755
+ expected_version: number;
6756
+ /**
6757
+ * Set to true to apply a change that was rejected with `lockout_risk`.
6758
+ */
6759
+ confirm_lockout_risk?: boolean;
6760
+ };
6761
+ /**
6762
+ * What to test. Nothing is stored and nothing is audited.
6763
+ *
6764
+ * - `id` alone tests the STORED provider with its stored secret.
6765
+ * - Without `id`, the body is an unsaved candidate: `type`, `client_id` and
6766
+ * `client_secret` are required (and `issuer_url` for `oidc`).
6767
+ * - `id` with other fields tests the stored provider with those fields
6768
+ * replaced, as an edit form does before saving. `type` cannot differ from
6769
+ * the stored one. When `client_secret` is omitted the stored secret is
6770
+ * used: it is never sent to a candidate-chosen endpoint (OIDC discovery
6771
+ * sends no secret, and the GitHub credential check goes only to GitHub).
6772
+ *
6773
+ */
6774
+ export type AdminAuthProviderTestRequest = {
6775
+ /**
6776
+ * A stored provider's id.
6777
+ */
6778
+ id?: string;
6779
+ type?: AdminAuthProviderType;
6780
+ client_id?: string;
6781
+ /**
6782
+ * The candidate client secret. Never returned.
6783
+ */
6784
+ client_secret?: string;
6785
+ issuer_url?: string;
6786
+ };
6787
+ /**
6788
+ * The outcome of a provider test: OIDC discovery for `oidc` and `google`, a
6789
+ * credential check against GitHub for `github`.
6790
+ *
6791
+ */
6792
+ export type AdminAuthProviderTestResult = {
6793
+ /**
6794
+ * Whether the provider could be built with the tested configuration.
6795
+ */
6796
+ is_valid: boolean;
6797
+ /**
6798
+ * Why the test failed; null when it passed.
6799
+ */
6800
+ message: string | null;
6801
+ };
6802
+ /**
6803
+ * The instance's sign-in access allowlist. A user may sign in when their
6804
+ * email's domain is in `domains` or the address is in `emails`. With both
6805
+ * lists empty, or nothing stored, access is open: every user may sign in
6806
+ * (`active` is false). Root instance admins are always exempt.
6807
+ *
6808
+ */
6809
+ export type AdminAuthAllowlist = {
6810
+ domains: Array<string>;
6811
+ emails: Array<string>;
6812
+ /**
6813
+ * Whether the allowlist restricts sign-in (at least one domain or email).
6814
+ */
6815
+ active: boolean;
6816
+ /**
6817
+ * The stored allowlist's own version; null when nothing is stored.
6818
+ */
6819
+ version: number | null;
6820
+ /**
6821
+ * When the allowlist was last saved; null when nothing is stored.
6822
+ */
6823
+ updated_at: string | null;
6824
+ /**
6825
+ * Who last saved the allowlist. Null when nothing is stored, for the
6826
+ * boot-time config import, a save made on a setup session, or once that
6827
+ * user has been deleted.
6828
+ *
6829
+ */
6830
+ updated_by_user_id: string | null;
6831
+ };
6832
+ /**
6833
+ * A whole replacement of the access allowlist. Both lists are required (send
6834
+ * `[]` for none). Entries are trimmed, lower-cased and de-duplicated; a domain
6835
+ * is a DNS name of at least two labels with no leading `@`. Storing two empty
6836
+ * lists means open access.
6837
+ *
6838
+ * `expected_version` is optional: when present, the save is rejected with
6839
+ * 409 unless it equals the stored allowlist's `version` (and when nothing is
6840
+ * stored, any `expected_version` other than null is a conflict). Omit it for
6841
+ * last-write-wins.
6842
+ *
6843
+ */
6844
+ export type AdminAuthAllowlistUpdate = {
6845
+ domains: Array<string>;
6846
+ emails: Array<string>;
6847
+ /**
6848
+ * The `version` the caller last read; omit or null for last-write-wins.
6849
+ */
6850
+ expected_version?: number | null;
6851
+ };
6852
+ /**
6853
+ * A candidate allowlist to preview. Both lists are required (send `[]` for none).
6854
+ */
6855
+ export type AdminAuthAllowlistPreviewRequest = {
6856
+ domains: Array<string>;
6857
+ emails: Array<string>;
6858
+ };
6859
+ /**
6860
+ * What replacing the allowlist with a candidate would do: the active
6861
+ * (non-suspended) users who would stop matching it. Root instance admins are
6862
+ * exempt and never counted. An open-access candidate affects nobody.
6863
+ *
6864
+ */
6865
+ export type AdminAuthAllowlistImpact = {
6866
+ /**
6867
+ * How many active users match neither list of the candidate.
6868
+ */
6869
+ count: number;
6870
+ /**
6871
+ * Up to 20 of their emails, in alphabetical order.
6872
+ */
6873
+ sample: Array<string>;
6874
+ /**
6875
+ * Whether `count` exceeds the number of emails in `sample`.
6876
+ */
6877
+ sample_truncated: boolean;
6878
+ };
6879
+ /**
6880
+ * One instance admin granted in the database.
6881
+ */
6882
+ export type AdminInstanceAdmin = {
6883
+ user_id: string;
6884
+ email: string;
6885
+ /**
6886
+ * The admin's display name, when set.
6887
+ */
6888
+ name: string | null;
6889
+ /**
6890
+ * The root admin who granted it; null once that user has been deleted.
6891
+ */
6892
+ granted_by_user_id: string | null;
6893
+ granted_at: string;
6894
+ };
6895
+ /**
6896
+ * The instance's admins. `root_admins` are the emails named in config.yaml's
6897
+ * `auth.instance_admins`: read-only here, they cannot be granted or revoked.
6898
+ * `admins` are the users granted in the database, oldest first.
6899
+ *
6900
+ */
6901
+ export type AdminInstanceAdminList = {
6902
+ /**
6903
+ * The root admins' normalized emails, sorted.
6904
+ */
6905
+ root_admins: Array<string>;
6906
+ admins: Array<AdminInstanceAdmin>;
6907
+ };
6908
+ /**
6909
+ * The existing user to make an instance admin, named by exactly one of
6910
+ * `user_id` or `email`.
6911
+ *
6912
+ */
6913
+ export type AdminInstanceAdminGrant = {
6914
+ user_id?: string;
6915
+ email?: string;
6916
+ };
6917
+ /**
6918
+ * Which authentication setting's audit log to read.
6919
+ */
6920
+ export type AdminAuthSettingsAuditSetting = 'auth_providers' | 'auth_allowlist' | 'instance_admins' | 'auth_setup';
6566
6921
  export type ProjectResponse = Project & {
6567
6922
  /**
6568
6923
  * Whether the project's git URL matches a repository accessible via the team's GitHub App installation
@@ -15564,6 +15919,448 @@ export type ListAdminAiSummarySettingsAuditResponses = {
15564
15919
  200: AdminInstanceSettingsAuditPage;
15565
15920
  };
15566
15921
  export type ListAdminAiSummarySettingsAuditResponse = ListAdminAiSummarySettingsAuditResponses[keyof ListAdminAiSummarySettingsAuditResponses];
15922
+ export type ListAdminAuthProvidersData = {
15923
+ body?: never;
15924
+ path?: never;
15925
+ query?: never;
15926
+ url: '/api/v1/admin/settings/auth/providers';
15927
+ };
15928
+ export type ListAdminAuthProvidersErrors = {
15929
+ /**
15930
+ * Not found — the caller is neither an instance admin nor on a setup session
15931
+ */
15932
+ 404: ErrorResponse;
15933
+ /**
15934
+ * Internal server error
15935
+ */
15936
+ 500: ErrorResponse;
15937
+ };
15938
+ export type ListAdminAuthProvidersError = ListAdminAuthProvidersErrors[keyof ListAdminAuthProvidersErrors];
15939
+ export type ListAdminAuthProvidersResponses = {
15940
+ /**
15941
+ * The stored providers and the settings version
15942
+ */
15943
+ 200: AdminAuthProviderList;
15944
+ };
15945
+ export type ListAdminAuthProvidersResponse = ListAdminAuthProvidersResponses[keyof ListAdminAuthProvidersResponses];
15946
+ export type CreateAdminAuthProviderData = {
15947
+ body: AdminAuthProviderCreate;
15948
+ path?: never;
15949
+ query?: never;
15950
+ url: '/api/v1/admin/settings/auth/providers';
15951
+ };
15952
+ export type CreateAdminAuthProviderErrors = {
15953
+ /**
15954
+ * Bad request — a field is invalid (`INSTANCE_SETTINGS_VALIDATION_FAILED`, with
15955
+ * `validation_errors` naming it), or the body is malformed or carries an
15956
+ * unknown field
15957
+ *
15958
+ */
15959
+ 400: ErrorResponse;
15960
+ /**
15961
+ * Not found — the caller is neither an instance admin nor on a setup session
15962
+ */
15963
+ 404: ErrorResponse;
15964
+ /**
15965
+ * Conflict — `expected_version` does not match the current version
15966
+ * (`INSTANCE_SETTINGS_VERSION_CONFLICT`), or the slug is taken or a second
15967
+ * `google`/`github` provider was sent (`INSTANCE_AUTH_PROVIDER_CONFLICT`);
15968
+ * nothing was changed
15969
+ *
15970
+ */
15971
+ 409: ErrorResponse;
15972
+ /**
15973
+ * Internal server error
15974
+ */
15975
+ 500: ErrorResponse;
15976
+ };
15977
+ export type CreateAdminAuthProviderError = CreateAdminAuthProviderErrors[keyof CreateAdminAuthProviderErrors];
15978
+ export type CreateAdminAuthProviderResponses = {
15979
+ /**
15980
+ * The stored provider and the settings version after the change
15981
+ */
15982
+ 201: AdminAuthProviderSaved;
15983
+ };
15984
+ export type CreateAdminAuthProviderResponse = CreateAdminAuthProviderResponses[keyof CreateAdminAuthProviderResponses];
15985
+ export type TestAdminAuthProviderData = {
15986
+ body: AdminAuthProviderTestRequest;
15987
+ path?: never;
15988
+ query?: never;
15989
+ url: '/api/v1/admin/settings/auth/providers/test';
15990
+ };
15991
+ export type TestAdminAuthProviderErrors = {
15992
+ /**
15993
+ * Bad request — the candidate is invalid (`INSTANCE_SETTINGS_VALIDATION_FAILED`),
15994
+ * or the body is malformed or carries an unknown field
15995
+ *
15996
+ */
15997
+ 400: ErrorResponse;
15998
+ /**
15999
+ * Not found — no provider has that `id`, or the caller is neither an instance admin nor on a setup session
16000
+ */
16001
+ 404: ErrorResponse;
16002
+ /**
16003
+ * Internal server error
16004
+ */
16005
+ 500: ErrorResponse;
16006
+ };
16007
+ export type TestAdminAuthProviderError = TestAdminAuthProviderErrors[keyof TestAdminAuthProviderErrors];
16008
+ export type TestAdminAuthProviderResponses = {
16009
+ /**
16010
+ * The outcome of the test
16011
+ */
16012
+ 200: AdminAuthProviderTestResult;
16013
+ };
16014
+ export type TestAdminAuthProviderResponse = TestAdminAuthProviderResponses[keyof TestAdminAuthProviderResponses];
16015
+ export type DeleteAdminAuthProviderData = {
16016
+ body?: never;
16017
+ path: {
16018
+ /**
16019
+ * Provider id (UUID)
16020
+ */
16021
+ id: string;
16022
+ };
16023
+ query?: {
16024
+ /**
16025
+ * The authentication settings `version` the caller last read; omit to apply to the current version.
16026
+ */
16027
+ expected_version?: number;
16028
+ /**
16029
+ * Set to true to apply a delete that was rejected with `lockout_risk`.
16030
+ */
16031
+ confirm_lockout_risk?: boolean;
16032
+ };
16033
+ url: '/api/v1/admin/settings/auth/providers/{id}';
16034
+ };
16035
+ export type DeleteAdminAuthProviderErrors = {
16036
+ /**
16037
+ * Bad request — malformed provider id or query parameter
16038
+ */
16039
+ 400: ErrorResponse;
16040
+ /**
16041
+ * Not found — no provider has that id, or the caller is neither an instance admin nor on a setup session
16042
+ */
16043
+ 404: ErrorResponse;
16044
+ /**
16045
+ * Conflict — `expected_version` does not match the current version
16046
+ * (`INSTANCE_SETTINGS_VERSION_CONFLICT`), or the delete risks locking sign-in
16047
+ * out (`lockout_risk`); nothing was changed
16048
+ *
16049
+ */
16050
+ 409: ErrorResponse;
16051
+ /**
16052
+ * Internal server error
16053
+ */
16054
+ 500: ErrorResponse;
16055
+ };
16056
+ export type DeleteAdminAuthProviderError = DeleteAdminAuthProviderErrors[keyof DeleteAdminAuthProviderErrors];
16057
+ export type DeleteAdminAuthProviderResponses = {
16058
+ /**
16059
+ * The provider was deleted
16060
+ */
16061
+ 204: void;
16062
+ };
16063
+ export type DeleteAdminAuthProviderResponse = DeleteAdminAuthProviderResponses[keyof DeleteAdminAuthProviderResponses];
16064
+ export type UpdateAdminAuthProviderData = {
16065
+ body: AdminAuthProviderUpdate;
16066
+ path: {
16067
+ /**
16068
+ * Provider id (UUID)
16069
+ */
16070
+ id: string;
16071
+ };
16072
+ query?: never;
16073
+ url: '/api/v1/admin/settings/auth/providers/{id}';
16074
+ };
16075
+ export type UpdateAdminAuthProviderErrors = {
16076
+ /**
16077
+ * Bad request — a field is invalid (`INSTANCE_SETTINGS_VALIDATION_FAILED`, with
16078
+ * `validation_errors` naming it), the provider id is malformed, or the body is
16079
+ * malformed, omits or nulls a required field, or carries an unknown field
16080
+ *
16081
+ */
16082
+ 400: ErrorResponse;
16083
+ /**
16084
+ * Not found — no provider has that id, or the caller is neither an instance admin nor on a setup session
16085
+ */
16086
+ 404: ErrorResponse;
16087
+ /**
16088
+ * Conflict — `expected_version` does not match the current version
16089
+ * (`INSTANCE_SETTINGS_VERSION_CONFLICT`), or the change risks locking sign-in
16090
+ * out (`lockout_risk`); nothing was changed
16091
+ *
16092
+ */
16093
+ 409: ErrorResponse;
16094
+ /**
16095
+ * Internal server error
16096
+ */
16097
+ 500: ErrorResponse;
16098
+ };
16099
+ export type UpdateAdminAuthProviderError = UpdateAdminAuthProviderErrors[keyof UpdateAdminAuthProviderErrors];
16100
+ export type UpdateAdminAuthProviderResponses = {
16101
+ /**
16102
+ * The stored provider and the settings version after the change
16103
+ */
16104
+ 200: AdminAuthProviderSaved;
16105
+ };
16106
+ export type UpdateAdminAuthProviderResponse = UpdateAdminAuthProviderResponses[keyof UpdateAdminAuthProviderResponses];
16107
+ export type ResetAdminAuthAllowlistData = {
16108
+ body?: never;
16109
+ path?: never;
16110
+ query?: never;
16111
+ url: '/api/v1/admin/settings/auth/allowlist';
16112
+ };
16113
+ export type ResetAdminAuthAllowlistErrors = {
16114
+ /**
16115
+ * Not found — the caller is neither an instance admin nor on a setup session
16116
+ */
16117
+ 404: ErrorResponse;
16118
+ /**
16119
+ * Internal server error
16120
+ */
16121
+ 500: ErrorResponse;
16122
+ };
16123
+ export type ResetAdminAuthAllowlistError = ResetAdminAuthAllowlistErrors[keyof ResetAdminAuthAllowlistErrors];
16124
+ export type ResetAdminAuthAllowlistResponses = {
16125
+ /**
16126
+ * Access is now open
16127
+ */
16128
+ 204: void;
16129
+ };
16130
+ export type ResetAdminAuthAllowlistResponse = ResetAdminAuthAllowlistResponses[keyof ResetAdminAuthAllowlistResponses];
16131
+ export type GetAdminAuthAllowlistData = {
16132
+ body?: never;
16133
+ path?: never;
16134
+ query?: never;
16135
+ url: '/api/v1/admin/settings/auth/allowlist';
16136
+ };
16137
+ export type GetAdminAuthAllowlistErrors = {
16138
+ /**
16139
+ * Not found — the caller is neither an instance admin nor on a setup session
16140
+ */
16141
+ 404: ErrorResponse;
16142
+ /**
16143
+ * Internal server error
16144
+ */
16145
+ 500: ErrorResponse;
16146
+ };
16147
+ export type GetAdminAuthAllowlistError = GetAdminAuthAllowlistErrors[keyof GetAdminAuthAllowlistErrors];
16148
+ export type GetAdminAuthAllowlistResponses = {
16149
+ /**
16150
+ * The access allowlist
16151
+ */
16152
+ 200: AdminAuthAllowlist;
16153
+ };
16154
+ export type GetAdminAuthAllowlistResponse = GetAdminAuthAllowlistResponses[keyof GetAdminAuthAllowlistResponses];
16155
+ export type UpdateAdminAuthAllowlistData = {
16156
+ body: AdminAuthAllowlistUpdate;
16157
+ path?: never;
16158
+ query?: never;
16159
+ url: '/api/v1/admin/settings/auth/allowlist';
16160
+ };
16161
+ export type UpdateAdminAuthAllowlistErrors = {
16162
+ /**
16163
+ * Bad request — an entry is invalid (`INSTANCE_SETTINGS_VALIDATION_FAILED`, with
16164
+ * `validation_errors` naming the list), or the body is malformed, omits or
16165
+ * nulls a list, or carries an unknown field
16166
+ *
16167
+ */
16168
+ 400: ErrorResponse;
16169
+ /**
16170
+ * Not found — the caller is neither an instance admin nor on a setup session
16171
+ */
16172
+ 404: ErrorResponse;
16173
+ /**
16174
+ * Conflict — `expected_version` does not match the stored version (`INSTANCE_SETTINGS_VERSION_CONFLICT`); nothing was changed
16175
+ */
16176
+ 409: ErrorResponse;
16177
+ /**
16178
+ * Internal server error
16179
+ */
16180
+ 500: ErrorResponse;
16181
+ };
16182
+ export type UpdateAdminAuthAllowlistError = UpdateAdminAuthAllowlistErrors[keyof UpdateAdminAuthAllowlistErrors];
16183
+ export type UpdateAdminAuthAllowlistResponses = {
16184
+ /**
16185
+ * The stored allowlist
16186
+ */
16187
+ 200: AdminAuthAllowlist;
16188
+ };
16189
+ export type UpdateAdminAuthAllowlistResponse = UpdateAdminAuthAllowlistResponses[keyof UpdateAdminAuthAllowlistResponses];
16190
+ export type PreviewAdminAuthAllowlistData = {
16191
+ body: AdminAuthAllowlistPreviewRequest;
16192
+ path?: never;
16193
+ query?: never;
16194
+ url: '/api/v1/admin/settings/auth/allowlist/preview';
16195
+ };
16196
+ export type PreviewAdminAuthAllowlistErrors = {
16197
+ /**
16198
+ * Bad request — an entry is invalid (`INSTANCE_SETTINGS_VALIDATION_FAILED`), or
16199
+ * the body is malformed, omits or nulls a list, or carries an unknown field
16200
+ *
16201
+ */
16202
+ 400: ErrorResponse;
16203
+ /**
16204
+ * Not found — the caller is neither an instance admin nor on a setup session
16205
+ */
16206
+ 404: ErrorResponse;
16207
+ /**
16208
+ * Internal server error
16209
+ */
16210
+ 500: ErrorResponse;
16211
+ };
16212
+ export type PreviewAdminAuthAllowlistError = PreviewAdminAuthAllowlistErrors[keyof PreviewAdminAuthAllowlistErrors];
16213
+ export type PreviewAdminAuthAllowlistResponses = {
16214
+ /**
16215
+ * The impact of the candidate
16216
+ */
16217
+ 200: AdminAuthAllowlistImpact;
16218
+ };
16219
+ export type PreviewAdminAuthAllowlistResponse = PreviewAdminAuthAllowlistResponses[keyof PreviewAdminAuthAllowlistResponses];
16220
+ export type ListAdminInstanceAdminsData = {
16221
+ body?: never;
16222
+ path?: never;
16223
+ query?: never;
16224
+ url: '/api/v1/admin/settings/auth/admins';
16225
+ };
16226
+ export type ListAdminInstanceAdminsErrors = {
16227
+ /**
16228
+ * Not found — the caller is not an instance admin
16229
+ */
16230
+ 404: ErrorResponse;
16231
+ /**
16232
+ * Internal server error
16233
+ */
16234
+ 500: ErrorResponse;
16235
+ };
16236
+ export type ListAdminInstanceAdminsError = ListAdminInstanceAdminsErrors[keyof ListAdminInstanceAdminsErrors];
16237
+ export type ListAdminInstanceAdminsResponses = {
16238
+ /**
16239
+ * The instance admins
16240
+ */
16241
+ 200: AdminInstanceAdminList;
16242
+ };
16243
+ export type ListAdminInstanceAdminsResponse = ListAdminInstanceAdminsResponses[keyof ListAdminInstanceAdminsResponses];
16244
+ export type GrantAdminInstanceAdminData = {
16245
+ body: AdminInstanceAdminGrant;
16246
+ path?: never;
16247
+ query?: never;
16248
+ url: '/api/v1/admin/settings/auth/admins';
16249
+ };
16250
+ export type GrantAdminInstanceAdminErrors = {
16251
+ /**
16252
+ * Bad request — the body names neither or both of `user_id` and `email`, the
16253
+ * user is suspended, or the body is malformed or carries an unknown field
16254
+ *
16255
+ */
16256
+ 400: ErrorResponse;
16257
+ /**
16258
+ * Forbidden — the caller is an instance admin but not a root admin
16259
+ */
16260
+ 403: ErrorResponse;
16261
+ /**
16262
+ * Not found — no such user, or the caller is not an instance admin
16263
+ */
16264
+ 404: ErrorResponse;
16265
+ /**
16266
+ * Conflict — the user is a root admin, whose access comes from config.yaml
16267
+ */
16268
+ 409: ErrorResponse;
16269
+ /**
16270
+ * Internal server error
16271
+ */
16272
+ 500: ErrorResponse;
16273
+ };
16274
+ export type GrantAdminInstanceAdminError = GrantAdminInstanceAdminErrors[keyof GrantAdminInstanceAdminErrors];
16275
+ export type GrantAdminInstanceAdminResponses = {
16276
+ /**
16277
+ * The grant
16278
+ */
16279
+ 200: AdminInstanceAdmin;
16280
+ };
16281
+ export type GrantAdminInstanceAdminResponse = GrantAdminInstanceAdminResponses[keyof GrantAdminInstanceAdminResponses];
16282
+ export type RevokeAdminInstanceAdminData = {
16283
+ body?: never;
16284
+ path: {
16285
+ /**
16286
+ * The granted admin's user id (UUID)
16287
+ */
16288
+ user_id: string;
16289
+ };
16290
+ query?: never;
16291
+ url: '/api/v1/admin/settings/auth/admins/{user_id}';
16292
+ };
16293
+ export type RevokeAdminInstanceAdminErrors = {
16294
+ /**
16295
+ * Bad request — malformed user id
16296
+ */
16297
+ 400: ErrorResponse;
16298
+ /**
16299
+ * Forbidden — the caller is an instance admin but not a root admin
16300
+ */
16301
+ 403: ErrorResponse;
16302
+ /**
16303
+ * Not found — the user holds no grant, or the caller is not an instance admin
16304
+ */
16305
+ 404: ErrorResponse;
16306
+ /**
16307
+ * Conflict — the user is a root admin, whose access comes from config.yaml
16308
+ */
16309
+ 409: ErrorResponse;
16310
+ /**
16311
+ * Internal server error
16312
+ */
16313
+ 500: ErrorResponse;
16314
+ };
16315
+ export type RevokeAdminInstanceAdminError = RevokeAdminInstanceAdminErrors[keyof RevokeAdminInstanceAdminErrors];
16316
+ export type RevokeAdminInstanceAdminResponses = {
16317
+ /**
16318
+ * The grant was revoked
16319
+ */
16320
+ 204: void;
16321
+ };
16322
+ export type RevokeAdminInstanceAdminResponse = RevokeAdminInstanceAdminResponses[keyof RevokeAdminInstanceAdminResponses];
16323
+ export type ListAdminAuthSettingsAuditData = {
16324
+ body?: never;
16325
+ path?: never;
16326
+ query: {
16327
+ /**
16328
+ * Which authentication setting's audit log to read.
16329
+ */
16330
+ setting: AdminAuthSettingsAuditSetting;
16331
+ /**
16332
+ * Opaque cursor from a previous page's `next_cursor`.
16333
+ */
16334
+ cursor?: string;
16335
+ /**
16336
+ * Page size.
16337
+ */
16338
+ limit?: number;
16339
+ };
16340
+ url: '/api/v1/admin/settings/auth/audit';
16341
+ };
16342
+ export type ListAdminAuthSettingsAuditErrors = {
16343
+ /**
16344
+ * Bad request — missing or unknown `setting`, malformed cursor, or `limit` out of range
16345
+ */
16346
+ 400: ErrorResponse;
16347
+ /**
16348
+ * Not found — the caller is not an instance admin
16349
+ */
16350
+ 404: ErrorResponse;
16351
+ /**
16352
+ * Internal server error
16353
+ */
16354
+ 500: ErrorResponse;
16355
+ };
16356
+ export type ListAdminAuthSettingsAuditError = ListAdminAuthSettingsAuditErrors[keyof ListAdminAuthSettingsAuditErrors];
16357
+ export type ListAdminAuthSettingsAuditResponses = {
16358
+ /**
16359
+ * One page of audit entries, newest first
16360
+ */
16361
+ 200: AdminInstanceSettingsAuditPage;
16362
+ };
16363
+ export type ListAdminAuthSettingsAuditResponse = ListAdminAuthSettingsAuditResponses[keyof ListAdminAuthSettingsAuditResponses];
15567
16364
  export type ListCommentsData = {
15568
16365
  body?: never;
15569
16366
  path: {