axiam-sdk 1.0.0-beta11 → 1.0.0-beta13

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.
Files changed (42) hide show
  1. package/README.md +72 -5
  2. package/dist/browser/index.d.cts +2 -2
  3. package/dist/browser/index.d.ts +2 -2
  4. package/dist/{client-D4kjfJom.d.ts → client-Bf4p7wD5.d.ts} +177 -3
  5. package/dist/{client-DCELYRNc.d.cts → client-CPZ5WCob.d.cts} +177 -3
  6. package/dist/{cookieJar-BFJ_6mup.d.ts → cookieJar--3J1ZLYS.d.ts} +2 -2
  7. package/dist/{cookieJar-BlNA_aEI.d.cts → cookieJar-rwTCSTkI.d.cts} +2 -2
  8. package/dist/grpc/index.d.cts +4 -4
  9. package/dist/grpc/index.d.ts +4 -4
  10. package/dist/grpc/index.js +51 -0
  11. package/dist/grpc/index.js.map +1 -1
  12. package/dist/grpc/index.mjs +51 -0
  13. package/dist/grpc/index.mjs.map +1 -1
  14. package/dist/index.d.cts +2 -2
  15. package/dist/index.d.ts +2 -2
  16. package/dist/index.js +51 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +51 -0
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/middleware/index.d.cts +3 -3
  21. package/dist/middleware/index.d.ts +3 -3
  22. package/dist/middleware/index.js +50 -7
  23. package/dist/middleware/index.js.map +1 -1
  24. package/dist/middleware/index.mjs +50 -7
  25. package/dist/middleware/index.mjs.map +1 -1
  26. package/dist/node/index.d.cts +4 -4
  27. package/dist/node/index.d.ts +4 -4
  28. package/dist/node/index.js +101 -7
  29. package/dist/node/index.js.map +1 -1
  30. package/dist/node/index.mjs +101 -7
  31. package/dist/node/index.mjs.map +1 -1
  32. package/dist/{oidcState-Ox2WiunH.d.cts → oidcState-C_9FRWTp.d.cts} +104 -2
  33. package/dist/{oidcState-CsDlOyeU.d.ts → oidcState-YzbbVX-C.d.ts} +104 -2
  34. package/dist/rest/index.d.cts +3 -3
  35. package/dist/rest/index.d.ts +3 -3
  36. package/dist/rest/index.js +51 -0
  37. package/dist/rest/index.js.map +1 -1
  38. package/dist/rest/index.mjs +51 -0
  39. package/dist/rest/index.mjs.map +1 -1
  40. package/dist/{session-BIRL5RKr.d.cts → session-B0Lkz0X9.d.cts} +11 -0
  41. package/dist/{session-DU6fggqX.d.ts → session-fJCGq5jw.d.ts} +11 -0
  42. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  import { S as Sensitive } from './sensitive-BC_s7Rrd.cjs';
2
- import { S as SharedSession, A as AxiamClientOptions } from './session-BIRL5RKr.cjs';
2
+ import { S as SharedSession, A as AxiamClientOptions } from './session-B0Lkz0X9.cjs';
3
3
  import { a as AccessDecision, L as LoginResult, A as AccessCheck } from './types-zXSpiQM-.cjs';
4
4
  import { a as TelemetryDispatcher, O as Outcome } from './telemetry-DrGqL4kb.cjs';
5
5
 
@@ -747,6 +747,31 @@ interface AuditLogEntry {
747
747
  * assumes.
748
748
  */
749
749
  type AuditOutcome = "Success" | "Failure" | "Denied" | (string & {});
750
+ /**
751
+ * Whether this client's authorization requests may carry OpenID Connect's
752
+ * authentication-request parameters, or whether they are ignored (X7.1).
753
+ *
754
+ * The bundle this governs is `prompt`, `max_age`, `acr_values`, `claims`,
755
+ * `id_token_hint`, `login_hint`, `display`, `ui_locales` and
756
+ * `claims_locales`. It is **one** field rather than nine booleans for the
757
+ * same reason [`ClientProfile`] is one field rather than a dozen: a client
758
+ * that honours `max_age` but ignores `prompt=none` is not "mostly
759
+ * conformant", it is a client a relying party cannot reason about.
760
+ *
761
+ * [`Ignore`](Self::Ignore) is the serde default and is exactly what AXIAM
762
+ * has always done — unknown authorization-request parameters are dropped by
763
+ * the query deserialiser and never reach a decision. Every row written
764
+ * before schema v54 therefore decodes to the behaviour it already had.
765
+ *
766
+ * An **open** enum. The final `(string & {})` arm accepts a value this SDK's
767
+ * copy of the spec does not list, so the next one the server adds reaches a
768
+ * caller as itself rather than failing the response it arrived in (CONTRACT
769
+ * §27.11 rule 1). The named arms still autocomplete and still narrow; what
770
+ * the extra arm removes is the illusion that a value outside them cannot
771
+ * occur, which is what an exhaustive `switch` over the named ones quietly
772
+ * assumes.
773
+ */
774
+ type AuthnRequestParamsMode = "ignore" | "honour" | (string & {});
750
775
  /** Request to bind a certificate to a service account. */
751
776
  interface BindCertificate {
752
777
  /** `certificate_id`. */
@@ -968,7 +993,7 @@ type CertificationLevel = "L1" | "L1Plus" | "L2" | "L2Plus" | "L3" | "L3Plus" |
968
993
  * occur, which is what an exhaustive `switch` over the named ones quietly
969
994
  * assumes.
970
995
  */
971
- type ClientAuthMethod = "client_secret_post" | "tls_client_auth" | "self_signed_tls_client_auth" | "private_key_jwt" | (string & {});
996
+ type ClientAuthMethod = "client_secret_post" | "client_secret_basic" | "tls_client_auth" | "self_signed_tls_client_auth" | "private_key_jwt" | (string & {});
972
997
  /**
973
998
  * Which security posture a client is registered under (X5.1).
974
999
  *
@@ -1021,6 +1046,27 @@ interface ComplianceReportEntry {
1021
1046
  /** `user_id`. */
1022
1047
  user_id: string;
1023
1048
  }
1049
+ /** One consent record, as the subject sees it. */
1050
+ interface ConsentView {
1051
+ /** `accepted_at`. */
1052
+ accepted_at: string;
1053
+ /**
1054
+ * What was consented to, e.g. `terms_of_service` or
1055
+ * `oidc_scope_release:<client_id>`.
1056
+ */
1057
+ consent_type: string;
1058
+ /** The document version or, for a scope release, the consented scopes. */
1059
+ version: string;
1060
+ /**
1061
+ * Whether this record can be withdrawn here.
1062
+ *
1063
+ * `false` for `terms_of_service`: withdrawing it is not a consent operation
1064
+ * but an erasure, and it has its own endpoint with its own grace period.
1065
+ * Reported rather than silently absent so the self-service page can show the
1066
+ * record and explain it.
1067
+ */
1068
+ withdrawable: boolean;
1069
+ }
1024
1070
  /** `CreateCaCertificateRequest` (generated from openapi.json). */
1025
1071
  interface CreateCaCertificateRequest {
1026
1072
  /**
@@ -1222,11 +1268,35 @@ interface CreateNotificationRuleRequest {
1222
1268
  }
1223
1269
  /** `CreateOAuth2ClientRequest` (generated from openapi.json). */
1224
1270
  interface CreateOAuth2ClientRequest {
1271
+ /**
1272
+ * X7.1 — whether this client's authorization requests may carry the OpenID
1273
+ * Connect authentication-request parameters (`prompt`, `max_age`,
1274
+ * `acr_values`, `claims`, `id_token_hint`, `login_hint`, `display`,
1275
+ * `ui_locales`, `claims_locales`).
1276
+ *
1277
+ * `"ignore"` (the default) is what every AXIAM client has always done: they
1278
+ * are dropped and reach no decision. `"honour"` opts in, and is **refused on
1279
+ * a `fapi2` client** at both this gate and the authorization endpoint — the
1280
+ * two are different answers to the same question about what a request from
1281
+ * this client means.
1282
+ */
1283
+ authn_request_params?: AuthnRequestParamsMode;
1225
1284
  /**
1226
1285
  * B5 — where OIDC back-channel logout tokens are delivered. Omit for a
1227
1286
  * client that does not participate.
1228
1287
  */
1229
1288
  backchannel_logout_uri?: string | null;
1289
+ /**
1290
+ * X7.3 — whether an unauthenticated authorization request from this client
1291
+ * may be answered with a redirect to the login page rather than the `401`
1292
+ * AXIAM answers today.
1293
+ *
1294
+ * Accepted and stored, but **nothing reads it yet**: the login hop it gates
1295
+ * is a later wave. Unlike `authn_request_params` it is permitted on a
1296
+ * `fapi2` client, because it relaxes nothing — it decides only how an
1297
+ * anonymous browser is answered.
1298
+ */
1299
+ browser_sso?: boolean;
1230
1300
  /**
1231
1301
  * RFC 9449 §5.2 — issue DPoP-bound (sender-constrained) access tokens to
1232
1302
  * this client. Independent of both the authentication method and
@@ -2029,6 +2099,16 @@ interface GrantPermissionRequest {
2029
2099
  /** `scope_ids`. */
2030
2100
  scope_ids?: string[];
2031
2101
  }
2102
+ /** Body for recording an OIDC scope-release consent. */
2103
+ interface GrantScopeConsent {
2104
+ /** The relying party the claims would be released to. */
2105
+ client_id: string;
2106
+ /**
2107
+ * The sensitive scopes being consented to. Order does not matter; the record
2108
+ * is written in the canonical order so that the same consent has one name.
2109
+ */
2110
+ scopes: string[];
2111
+ }
2032
2112
  /** A scope named by a grant, resolved to something a human can read. */
2033
2113
  interface GrantedScope {
2034
2114
  /** The scope's id, as it appears in the grant's `scope_ids`. */
@@ -2335,6 +2415,14 @@ interface OAuth2ClientCreatedResponseWire {
2335
2415
  declare function oAuth2ClientCreatedResponseFromWire(w: OAuth2ClientCreatedResponseWire): OAuth2ClientCreatedResponse;
2336
2416
  /** OAuth2 client response -- omits client_secret_hash. */
2337
2417
  interface OAuth2ClientResponse {
2418
+ /**
2419
+ * X7.1 — echoed so an operator can audit which clients act on the OIDC
2420
+ * authentication-request parameters, from this endpoint rather than from the
2421
+ * database.
2422
+ */
2423
+ authn_request_params: AuthnRequestParamsMode;
2424
+ /** X7.3 — echoed for the same reason. */
2425
+ browser_sso: boolean;
2338
2426
  /** `client_id`. */
2339
2427
  client_id: string;
2340
2428
  /** `created_at`. */
@@ -2433,6 +2521,59 @@ interface OidcCallbackResponse {
2433
2521
  /** `user_id`. */
2434
2522
  user_id: string;
2435
2523
  }
2524
+ /**
2525
+ * OpenID Connect surface controls (X7 G8, plan §4.6/§4.8).
2526
+ *
2527
+ * Two settings that are not password rules, and are here because this is the
2528
+ * org-baseline-plus-tenant-override surface every other per-tenant control
2529
+ * lives on. They are also the two settings in this model that are *not* of
2530
+ * the same kind as each other, so it is worth saying which is which:
2531
+ *
2532
+ * * [`Self::sensitive_scopes_enabled`] **is** ordered. Releasing personal
2533
+ * data is the less-restrictive direction, so it is validated disable-only —
2534
+ * the mirror image of `mfa_enforced` — and a tenant can turn its
2535
+ * organization's decision off but never on. * [`Self::default_locale`] is
2536
+ * **not** ordered, and no ordering is invented for it. A language is a
2537
+ * presentation preference; there is no sense in which Italian is stricter
2538
+ * than French. [`validate_tenant_override`] therefore does not check it and
2539
+ * [`clamp_overrides_to_org`] never clears it. The model's rule is "a tenant
2540
+ * may only be more restrictive", which binds every field that *has* a
2541
+ * restrictiveness; a field that has none cannot violate it.
2542
+ */
2543
+ interface OidcPolicy {
2544
+ /**
2545
+ * The BCP 47 tag the sign-in page falls back to when the relying party's
2546
+ * `ui_locales` selects nothing (W5's chain, plan §4.6).
2547
+ *
2548
+ * `None` means "no tenant preference", which lands on the deployment default
2549
+ * (`en`) — the behaviour every deployment had before this field existed. A
2550
+ * tag this build does not ship also lands there: the parse is exact rather
2551
+ * than a language lookup, so a stored `fr-CA` reads as "somebody wrote
2552
+ * something this binary does not ship" rather than as a guess at French.
2553
+ *
2554
+ * Stored as a string rather than as the `Locale` enum because that enum
2555
+ * lives in `axiam-oauth2`, four layers above this crate, and the crate
2556
+ * layering points inward.
2557
+ */
2558
+ default_locale?: string | null;
2559
+ /**
2560
+ * Whether `address` and `phone` may be registered on a client, requested at
2561
+ * the authorization endpoint, and released at UserInfo (X7 G8).
2562
+ *
2563
+ * **Off unless an organization turns it on.** The two scopes release a
2564
+ * postal address and a telephone number — categories of personal data AXIAM
2565
+ * has no other use for — so the deployment that has never thought about them
2566
+ * releases nothing, and the operator who has thought about them says so
2567
+ * once, at the organization level, where the lawful basis for holding the
2568
+ * data was decided.
2569
+ *
2570
+ * The switch is a *capability*, not a grant: with it on, a client still has
2571
+ * to register the scope, the request still has to ask for it, and the user
2572
+ * still has to have consented. It is the first of four gates, and it is the
2573
+ * only one an operator can close for everybody at once.
2574
+ */
2575
+ sensitive_scopes_enabled: boolean;
2576
+ }
2436
2577
  /**
2437
2578
  * The client-supplied half of an OPAQUE enrolment, as it appears inside
2438
2579
  * registration / change-password / reset-completion / bootstrap request
@@ -3018,6 +3159,8 @@ interface SecuritySettings {
3018
3159
  mfa: MfaPolicy;
3019
3160
  /** `notification`. */
3020
3161
  notification: NotificationPolicy;
3162
+ /** `oidc`. */
3163
+ oidc: OidcPolicy;
3021
3164
  /** `opaque`. */
3022
3165
  opaque: OpaquePolicy;
3023
3166
  /** `password`. */
@@ -3132,6 +3275,8 @@ interface SetOrgSettings {
3132
3275
  admin_notifications_enabled: boolean;
3133
3276
  /** `default_cert_validity_days`. */
3134
3277
  default_cert_validity_days: number;
3278
+ /** `default_locale`. */
3279
+ default_locale?: string | null;
3135
3280
  /** `deletion_grace_period_days`. */
3136
3281
  deletion_grace_period_days?: number;
3137
3282
  /** `email_verification_grace_period_hours`. */
@@ -3174,6 +3319,8 @@ interface SetOrgSettings {
3174
3319
  require_symbols: boolean;
3175
3320
  /** `require_uppercase`. */
3176
3321
  require_uppercase: boolean;
3322
+ /** `sensitive_scopes_enabled`. */
3323
+ sensitive_scopes_enabled?: boolean;
3177
3324
  /** `webauthn_user_verification`. */
3178
3325
  webauthn_user_verification?: string;
3179
3326
  }
@@ -3308,6 +3455,11 @@ interface TenantSettingsOverride {
3308
3455
  admin_notifications_enabled?: boolean | null;
3309
3456
  /** `default_cert_validity_days`. */
3310
3457
  default_cert_validity_days?: number | null;
3458
+ /**
3459
+ * The tenant's fallback UI language. Not ordered, therefore not validated
3460
+ * against the baseline and never clamped — see [`OidcPolicy`].
3461
+ */
3462
+ default_locale?: string | null;
3311
3463
  /** `deletion_grace_period_days`. */
3312
3464
  deletion_grace_period_days?: number | null;
3313
3465
  /** `email_verification_grace_period_hours`. */
@@ -3350,6 +3502,8 @@ interface TenantSettingsOverride {
3350
3502
  require_symbols?: boolean | null;
3351
3503
  /** `require_uppercase`. */
3352
3504
  require_uppercase?: boolean | null;
3505
+ /** `sensitive_scopes_enabled`. */
3506
+ sensitive_scopes_enabled?: boolean | null;
3353
3507
  /** `webauthn_user_verification`. */
3354
3508
  webauthn_user_verification?: string | null;
3355
3509
  }
@@ -3582,11 +3736,15 @@ interface UpdateNotificationRuleRequest {
3582
3736
  * than sent as `null` (§27.4 rule 5).
3583
3737
  */
3584
3738
  interface UpdateOAuth2ClientRequest {
3739
+ /** `authn_request_params`. */
3740
+ authn_request_params?: AuthnRequestParamsMode | null;
3585
3741
  /**
3586
3742
  * Pass an empty string to clear a previously registered URI — the one edit
3587
3743
  * an operator makes when an RP is decommissioned.
3588
3744
  */
3589
3745
  backchannel_logout_uri?: string | null;
3746
+ /** X7.3 — see [`CreateOAuth2ClientRequest::browser_sso`]. */
3747
+ browser_sso?: boolean | null;
3590
3748
  /** `dpop_bound_access_tokens`. */
3591
3749
  dpop_bound_access_tokens?: boolean | null;
3592
3750
  /** `dpop_require_nonce`. */
@@ -5889,6 +6047,22 @@ declare class PrivacyApi {
5889
6047
  requestDelete(body: unknown): Promise<void>;
5890
6048
  /** `GET /api/v1/auth/account/delete/cancel` */
5891
6049
  cancelDelete(token: string): Promise<void>;
6050
+ /** `GET /api/v1/account/consents` */
6051
+ listConsents(): Promise<ConsentView[]>;
6052
+ /**
6053
+ * `POST /api/v1/account/consents/oidc-scopes`
6054
+ *
6055
+ * Not retried on failure (§27.4 rule 8): every write on this surface is
6056
+ * issued exactly once, including the ones that look idempotent.
6057
+ */
6058
+ grantScopeConsent(body: GrantScopeConsent): Promise<void>;
6059
+ /**
6060
+ * `DELETE /api/v1/account/consents/oidc-scopes/{client_id}`
6061
+ *
6062
+ * Not retried on failure (§27.4 rule 8): every write on this surface is
6063
+ * issued exactly once, including the ones that look idempotent.
6064
+ */
6065
+ withdrawScopeConsent(clientId: string): Promise<void>;
5892
6066
  }
5893
6067
 
5894
6068
  /**
@@ -6215,4 +6389,4 @@ declare class AxiamClient {
6215
6389
  confirmPasswordReset(confirmation: PasswordResetConfirmation): Promise<void>;
6216
6390
  }
6217
6391
 
6218
- export { type CreateRoleRequest as $, AxiamClient as A, BASE_DELAY_MS as B, type CaCertificate as C, type CertificationLevel as D, type Change as E, type ClientAuthMethod as F, type GrantSpec as G, type ClientProfile as H, type ComplianceReportEntry as I, type CreateCaCertificateRequest as J, type CreateCertificateRequest as K, type CreateFederationConfigRequest as L, type ManagementManifest as M, type CreateFederationConfigRequestWire as N, type CreateGroupRequest as O, type PermissionSpec as P, type CreateIntermediateCaRequest as Q, type ResourceSpec as R, type ScopeSpec as S, type CreateNotificationRuleRequest as T, type UserSpec as U, type CreateOAuth2ClientRequest as V, type WebauthnWorkspace as W, type CreatePermissionRequest as X, type CreatePgpKeyRequest as Y, type CreateReactorRequest as Z, type CreateResourceRequest as _, type WebauthnLoginResult as a, type OidcAuthorizeResponse as a$, type CreateScimTokenRequest as a0, type CreateScimTokenResponse as a1, type CreateScimTokenResponseWire as a2, type CreateScopeRequest as a3, type CreateServiceAccountRequest as a4, type CreateTenantRequest as a5, type CreateUserRequest as a6, type CreateUserRequestWire as a7, type CreateWebhookRequest as a8, type CreateWebhookRequestWire as a9, type KeyAlgorithm as aA, type LockoutPolicy as aB, MAX_ATTEMPTS as aC, MAX_DELAY_MS as aD, MAX_TTL_MS as aE, type ManagementNamespaces as aF, type ManagementPlan as aG, ManifestApi as aH, type ManifestFailure as aI, type MdsRefreshOutcome as aJ, type MdsStatusResponse as aK, type MfaEnrollment as aL, type MfaMethodResponse as aM, type MfaMethodType as aN, type MfaPolicy as aO, type MigrateCustodyResponse as aP, type MtlsTrustAnchorResponse as aQ, type NamespaceScope as aR, type NotificationEventType as aS, type NotificationPolicy as aT, type NotificationRuleResponse as aU, NotificationRulesApi as aV, type OAuth2ClientCreatedResponse as aW, type OAuth2ClientCreatedResponseWire as aX, type OAuth2ClientResponse as aY, Oauth2ClientsApi as aZ, type OidcAuthorizeRequest as a_, DecisionMemo as aa, type EmailConfig as ab, EmailConfigApi as ac, type EmailConfigOverride as ad, type EmailTestResult as ae, type EmailVerificationPolicy as af, type EncryptRequest as ag, type EncryptedExport as ah, type FailurePolicy as ai, FederationApi as aj, type FederationConfigResponse as ak, type FederationLinkResponse as al, type FinishRequest as am, type GeneratedCaCertificate as an, type GeneratedCaCertificateWire as ao, type GeneratedCertificate as ap, type GeneratedCertificateWire as aq, type GeneratedPgpKey as ar, type GeneratedPgpKeyWire as as, type GrantPermissionRequest as at, type GrantedScope as au, type Group as av, GroupsApi as aw, type HealthResponse as ax, type ImportCaCertificateRequest as ay, type ImportCaCertificateRequestWire as az, type WebauthnCredential as b, type SmtpConfig as b$, type OidcCallbackRequest as b0, type OidcCallbackResponse as b1, type OpaqueEnrollment as b2, type OpaqueEnrollmentPayload as b3, type OpaquePolicy as b4, type Organization as b5, OrganizationsApi as b6, type Page as b7, type PageRequest as b8, type PasswordPolicy as b9, type RetryPolicy as bA, type Role as bB, type RoleAssignment as bC, type RoleGroupAssignment as bD, type RoleServiceAccountAssignment as bE, type RoleUserAssignment as bF, RolesApi as bG, type RotateSecretResponse as bH, type RotateSecretResponseWire as bI, type ScimTokenResponse as bJ, type ScimTokenStatus as bK, ScimTokensApi as bL, type Scope as bM, ScopesApi as bN, type SecuritySettings as bO, type ServiceAccountCreatedResponse as bP, type ServiceAccountCreatedResponseWire as bQ, type ServiceAccountResponse as bR, ServiceAccountsApi as bS, type SetMtlsTrustAnchor as bT, type SetOrgEmailConfig as bU, type SetOrgSettings as bV, SettingsApi as bW, type SettingsScope as bX, type SignAuditBatchRequest as bY, type SignIntermediateCsrRequest as bZ, type SignedAuditBatch as b_, type PasswordResetConfirmation as ba, type PasswordResetContext as bb, type PasswordResetRequest as bc, type Permission as bd, type PermissionEffect as be, PermissionsApi as bf, type PgpKey as bg, type PgpKeyAlgorithm as bh, type PgpKeyPurpose as bi, type PgpKeyStatus as bj, PgpKeysApi as bk, type PlannedAction as bl, PlatformApi as bm, type PolicyResponse as bn, PrivacyApi as bo, type PrivacyPolicy as bp, type ProviderConfig as bq, type ReactorEventDescriptor as br, type ReactorMode as bs, type ReactorResponse as bt, ReactorsApi as bu, type ReadyResponse as bv, type ResolvedPermissionGrant as bw, type Resource as bx, ResourcesApi as by, type RetryOptions as bz, type GroupSpec as c, memoKey as c$, type StepOutcome as c0, type Target as c1, TelemetryReporter as c2, type Tenant as c3, type TenantKind as c4, type TenantSettingsOverride as c5, type TenantStatus as c6, TenantsApi as c7, type TokenExchangeTrustRequest as c8, type TokenExchangeTrustResponse as c9, type WebauthnCredentialDescriptorJson as cA, type WebauthnPolicy as cB, WebauthnPolicyApi as cC, type WebauthnRegistrationChallenge as cD, type WebauthnRegistrationResponse as cE, type WebauthnRequestChallenge as cF, type WebauthnRequestOptionsJson as cG, type WebhookResponse as cH, WebhooksApi as cI, backoffMs as cJ, changedCount as cK, changes as cL, collectPages as cM, createFederationConfigRequestToWire as cN, createScimTokenResponseFromWire as cO, createUserRequestToWire as cP, createWebhookRequestToWire as cQ, delayMs as cR, failure as cS, generatedCaCertificateFromWire as cT, generatedCertificateFromWire as cU, generatedPgpKeyFromWire as cV, hasMore as cW, importCaCertificateRequestToWire as cX, isComplete as cY, isConverged as cZ, managementNamespaces as c_, type TokenPolicy as ca, type UnknownAaguidAction as cb, type UpdateFederationConfigRequest as cc, type UpdateFederationConfigRequestWire as cd, type UpdateGroup as ce, type UpdateNotificationRuleRequest as cf, type UpdateOAuth2ClientRequest as cg, type UpdateOrganizationRequest as ch, type UpdatePermissionRequest as ci, type UpdateReactorRequest as cj, type UpdateResourceRequest as ck, type UpdateRole as cl, type UpdateScopeRequest as cm, type UpdateServiceAccount as cn, type UpdateTenant as co, type UpdateUserRequest as cp, type UpdateWebhookRequest as cq, type UpdateWebhookRequestWire as cr, type UserResponse as cs, type UserStatus as ct, UsersApi as cu, type WebauthnAttestationPolicy as cv, type WebauthnAuthenticationChallenge as cw, type WebauthnAuthenticationResponse as cx, type WebauthnCreationChallenge as cy, type WebauthnCreationOptionsJson as cz, type RoleSpec as d, normalizeSearch as d0, oAuth2ClientCreatedResponseFromWire as d1, omitEmptyTenantScope as d2, opaqueEnrollment as d3, opaqueEnrollmentForSelf as d4, pageQuery as d5, rotateSecretResponseFromWire as d6, serviceAccountCreatedResponseFromWire as d7, topologicalOrder as d8, updateFederationConfigRequestToWire as d9, updateWebhookRequestToWire as da, validate as db, webauthnRequestJson as dc, withRetry as dd, type ActorType as e, type AddMemberRequest as f, type AddServiceAccountMemberRequest as g, type ApiProviderConfig as h, type AppliedStep as i, type ApplyReport as j, type AssignRoleToGroupRequest as k, type AssignRoleToServiceAccountRequest as l, type AssignRoleToUserRequest as m, type AttestationMode as n, AuditApi as o, type AuditListFilter as p, type AuditListSystemFilter as q, type AuditLogEntry as r, type AuditOutcome as s, type BindCertificate as t, CaCertificatesApi as u, type Certificate as v, type CertificatePolicy as w, type CertificateStatus as x, type CertificateType as y, CertificatesApi as z };
6392
+ export { type CreateReactorRequest as $, AxiamClient as A, BASE_DELAY_MS as B, type CaCertificate as C, CertificatesApi as D, type CertificationLevel as E, type Change as F, type GrantSpec as G, type ClientAuthMethod as H, type ClientProfile as I, type ComplianceReportEntry as J, type ConsentView as K, type CreateCaCertificateRequest as L, type ManagementManifest as M, type CreateCertificateRequest as N, type CreateFederationConfigRequest as O, type PermissionSpec as P, type CreateFederationConfigRequestWire as Q, type ResourceSpec as R, type ScopeSpec as S, type CreateGroupRequest as T, type UserSpec as U, type CreateIntermediateCaRequest as V, type WebauthnWorkspace as W, type CreateNotificationRuleRequest as X, type CreateOAuth2ClientRequest as Y, type CreatePermissionRequest as Z, type CreatePgpKeyRequest as _, type WebauthnLoginResult as a, type OAuth2ClientResponse as a$, type CreateResourceRequest as a0, type CreateRoleRequest as a1, type CreateScimTokenRequest as a2, type CreateScimTokenResponse as a3, type CreateScimTokenResponseWire as a4, type CreateScopeRequest as a5, type CreateServiceAccountRequest as a6, type CreateTenantRequest as a7, type CreateUserRequest as a8, type CreateUserRequestWire as a9, type HealthResponse as aA, type ImportCaCertificateRequest as aB, type ImportCaCertificateRequestWire as aC, type KeyAlgorithm as aD, type LockoutPolicy as aE, MAX_ATTEMPTS as aF, MAX_DELAY_MS as aG, MAX_TTL_MS as aH, type ManagementNamespaces as aI, type ManagementPlan as aJ, ManifestApi as aK, type ManifestFailure as aL, type MdsRefreshOutcome as aM, type MdsStatusResponse as aN, type MfaEnrollment as aO, type MfaMethodResponse as aP, type MfaMethodType as aQ, type MfaPolicy as aR, type MigrateCustodyResponse as aS, type MtlsTrustAnchorResponse as aT, type NamespaceScope as aU, type NotificationEventType as aV, type NotificationPolicy as aW, type NotificationRuleResponse as aX, NotificationRulesApi as aY, type OAuth2ClientCreatedResponse as aZ, type OAuth2ClientCreatedResponseWire as a_, type CreateWebhookRequest as aa, type CreateWebhookRequestWire as ab, DecisionMemo as ac, type EmailConfig as ad, EmailConfigApi as ae, type EmailConfigOverride as af, type EmailTestResult as ag, type EmailVerificationPolicy as ah, type EncryptRequest as ai, type EncryptedExport as aj, type FailurePolicy as ak, FederationApi as al, type FederationConfigResponse as am, type FederationLinkResponse as an, type FinishRequest as ao, type GeneratedCaCertificate as ap, type GeneratedCaCertificateWire as aq, type GeneratedCertificate as ar, type GeneratedCertificateWire as as, type GeneratedPgpKey as at, type GeneratedPgpKeyWire as au, type GrantPermissionRequest as av, type GrantScopeConsent as aw, type GrantedScope as ax, type Group as ay, GroupsApi as az, type WebauthnCredential as b, type SettingsScope as b$, Oauth2ClientsApi as b0, type OidcAuthorizeRequest as b1, type OidcAuthorizeResponse as b2, type OidcCallbackRequest as b3, type OidcCallbackResponse as b4, type OidcPolicy as b5, type OpaqueEnrollment as b6, type OpaqueEnrollmentPayload as b7, type OpaquePolicy as b8, type Organization as b9, type ResolvedPermissionGrant as bA, type Resource as bB, ResourcesApi as bC, type RetryOptions as bD, type RetryPolicy as bE, type Role as bF, type RoleAssignment as bG, type RoleGroupAssignment as bH, type RoleServiceAccountAssignment as bI, type RoleUserAssignment as bJ, RolesApi as bK, type RotateSecretResponse as bL, type RotateSecretResponseWire as bM, type ScimTokenResponse as bN, type ScimTokenStatus as bO, ScimTokensApi as bP, type Scope as bQ, ScopesApi as bR, type SecuritySettings as bS, type ServiceAccountCreatedResponse as bT, type ServiceAccountCreatedResponseWire as bU, type ServiceAccountResponse as bV, ServiceAccountsApi as bW, type SetMtlsTrustAnchor as bX, type SetOrgEmailConfig as bY, type SetOrgSettings as bZ, SettingsApi as b_, OrganizationsApi as ba, type Page as bb, type PageRequest as bc, type PasswordPolicy as bd, type PasswordResetConfirmation as be, type PasswordResetContext as bf, type PasswordResetRequest as bg, type Permission as bh, type PermissionEffect as bi, PermissionsApi as bj, type PgpKey as bk, type PgpKeyAlgorithm as bl, type PgpKeyPurpose as bm, type PgpKeyStatus as bn, PgpKeysApi as bo, type PlannedAction as bp, PlatformApi as bq, type PolicyResponse as br, PrivacyApi as bs, type PrivacyPolicy as bt, type ProviderConfig as bu, type ReactorEventDescriptor as bv, type ReactorMode as bw, type ReactorResponse as bx, ReactorsApi as by, type ReadyResponse as bz, type GroupSpec as c, importCaCertificateRequestToWire as c$, type SignAuditBatchRequest as c0, type SignIntermediateCsrRequest as c1, type SignedAuditBatch as c2, type SmtpConfig as c3, type StepOutcome as c4, type Target as c5, TelemetryReporter as c6, type Tenant as c7, type TenantKind as c8, type TenantSettingsOverride as c9, type WebauthnAuthenticationChallenge as cA, type WebauthnAuthenticationResponse as cB, type WebauthnCreationChallenge as cC, type WebauthnCreationOptionsJson as cD, type WebauthnCredentialDescriptorJson as cE, type WebauthnPolicy as cF, WebauthnPolicyApi as cG, type WebauthnRegistrationChallenge as cH, type WebauthnRegistrationResponse as cI, type WebauthnRequestChallenge as cJ, type WebauthnRequestOptionsJson as cK, type WebhookResponse as cL, WebhooksApi as cM, backoffMs as cN, changedCount as cO, changes as cP, collectPages as cQ, createFederationConfigRequestToWire as cR, createScimTokenResponseFromWire as cS, createUserRequestToWire as cT, createWebhookRequestToWire as cU, delayMs as cV, failure as cW, generatedCaCertificateFromWire as cX, generatedCertificateFromWire as cY, generatedPgpKeyFromWire as cZ, hasMore as c_, type TenantStatus as ca, TenantsApi as cb, type TokenExchangeTrustRequest as cc, type TokenExchangeTrustResponse as cd, type TokenPolicy as ce, type UnknownAaguidAction as cf, type UpdateFederationConfigRequest as cg, type UpdateFederationConfigRequestWire as ch, type UpdateGroup as ci, type UpdateNotificationRuleRequest as cj, type UpdateOAuth2ClientRequest as ck, type UpdateOrganizationRequest as cl, type UpdatePermissionRequest as cm, type UpdateReactorRequest as cn, type UpdateResourceRequest as co, type UpdateRole as cp, type UpdateScopeRequest as cq, type UpdateServiceAccount as cr, type UpdateTenant as cs, type UpdateUserRequest as ct, type UpdateWebhookRequest as cu, type UpdateWebhookRequestWire as cv, type UserResponse as cw, type UserStatus as cx, UsersApi as cy, type WebauthnAttestationPolicy as cz, type RoleSpec as d, isComplete as d0, isConverged as d1, managementNamespaces as d2, memoKey as d3, normalizeSearch as d4, oAuth2ClientCreatedResponseFromWire as d5, omitEmptyTenantScope as d6, opaqueEnrollment as d7, opaqueEnrollmentForSelf as d8, pageQuery as d9, rotateSecretResponseFromWire as da, serviceAccountCreatedResponseFromWire as db, topologicalOrder as dc, updateFederationConfigRequestToWire as dd, updateWebhookRequestToWire as de, validate as df, webauthnRequestJson as dg, withRetry as dh, type ActorType as e, type AddMemberRequest as f, type AddServiceAccountMemberRequest as g, type ApiProviderConfig as h, type AppliedStep as i, type ApplyReport as j, type AssignRoleToGroupRequest as k, type AssignRoleToServiceAccountRequest as l, type AssignRoleToUserRequest as m, type AttestationMode as n, AuditApi as o, type AuditListFilter as p, type AuditListSystemFilter as q, type AuditLogEntry as r, type AuditOutcome as s, type AuthnRequestParamsMode as t, type BindCertificate as u, CaCertificatesApi as v, type Certificate as w, type CertificatePolicy as x, type CertificateStatus as y, type CertificateType as z };
@@ -1,6 +1,6 @@
1
1
  import { CookieJar } from 'tough-cookie';
2
- import { S as SharedSession, A as AxiamClientOptions, N as NodeTlsOptions } from './session-DU6fggqX.js';
3
- import { A as AxiamClient } from './client-D4kjfJom.js';
2
+ import { S as SharedSession, A as AxiamClientOptions, N as NodeTlsOptions } from './session-fJCGq5jw.js';
3
+ import { A as AxiamClient } from './client-Bf4p7wD5.js';
4
4
  import { S as Sensitive } from './sensitive-BC_s7Rrd.js';
5
5
  import { V as Verifier } from './jwks-CSXHo3DS.js';
6
6
  import { AxiosInstance } from 'axios';
@@ -1,6 +1,6 @@
1
1
  import { CookieJar } from 'tough-cookie';
2
- import { S as SharedSession, A as AxiamClientOptions, N as NodeTlsOptions } from './session-BIRL5RKr.cjs';
3
- import { A as AxiamClient } from './client-DCELYRNc.cjs';
2
+ import { S as SharedSession, A as AxiamClientOptions, N as NodeTlsOptions } from './session-B0Lkz0X9.cjs';
3
+ import { A as AxiamClient } from './client-CPZ5WCob.cjs';
4
4
  import { S as Sensitive } from './sensitive-BC_s7Rrd.cjs';
5
5
  import { V as Verifier } from './jwks-CSXHo3DS.cjs';
6
6
  import { AxiosInstance } from 'axios';
@@ -1,14 +1,14 @@
1
1
  import * as grpc from '@grpc/grpc-js';
2
2
  import { Interceptor } from '@grpc/grpc-js';
3
- import { N as NodeSession } from '../cookieJar-BlNA_aEI.cjs';
4
- export { A as ACCESS_COOKIE, C as CSRF_COOKIE, R as REFRESH_COOKIE, T as TokenManager, c as createJar, a as createNodeClient, b as createNodeSession, e as extractCookieValue, w as wrapAxios } from '../cookieJar-BlNA_aEI.cjs';
3
+ import { N as NodeSession } from '../cookieJar-rwTCSTkI.cjs';
4
+ export { A as ACCESS_COOKIE, C as CSRF_COOKIE, R as REFRESH_COOKIE, T as TokenManager, c as createJar, a as createNodeClient, b as createNodeSession, e as extractCookieValue, w as wrapAxios } from '../cookieJar-rwTCSTkI.cjs';
5
5
  import { a as AccessDecision } from '../types-zXSpiQM-.cjs';
6
6
  export { A as AxiamClaims, J as JWKS_PATH, V as Verifier, c as createVerifier } from '../jwks-CSXHo3DS.cjs';
7
7
  import 'tough-cookie';
8
- import '../session-BIRL5RKr.cjs';
8
+ import '../session-B0Lkz0X9.cjs';
9
9
  import 'axios';
10
10
  import '../telemetry-DrGqL4kb.cjs';
11
- import '../client-DCELYRNc.cjs';
11
+ import '../client-CPZ5WCob.cjs';
12
12
  import '../sensitive-BC_s7Rrd.cjs';
13
13
 
14
14
  /**
@@ -1,14 +1,14 @@
1
1
  import * as grpc from '@grpc/grpc-js';
2
2
  import { Interceptor } from '@grpc/grpc-js';
3
- import { N as NodeSession } from '../cookieJar-BFJ_6mup.js';
4
- export { A as ACCESS_COOKIE, C as CSRF_COOKIE, R as REFRESH_COOKIE, T as TokenManager, c as createJar, a as createNodeClient, b as createNodeSession, e as extractCookieValue, w as wrapAxios } from '../cookieJar-BFJ_6mup.js';
3
+ import { N as NodeSession } from '../cookieJar--3J1ZLYS.js';
4
+ export { A as ACCESS_COOKIE, C as CSRF_COOKIE, R as REFRESH_COOKIE, T as TokenManager, c as createJar, a as createNodeClient, b as createNodeSession, e as extractCookieValue, w as wrapAxios } from '../cookieJar--3J1ZLYS.js';
5
5
  import { a as AccessDecision } from '../types-BOX-6Srv.js';
6
6
  export { A as AxiamClaims, J as JWKS_PATH, V as Verifier, c as createVerifier } from '../jwks-CSXHo3DS.js';
7
7
  import 'tough-cookie';
8
- import '../session-DU6fggqX.js';
8
+ import '../session-fJCGq5jw.js';
9
9
  import 'axios';
10
10
  import '../telemetry-DrGqL4kb.js';
11
- import '../client-D4kjfJom.js';
11
+ import '../client-Bf4p7wD5.js';
12
12
  import '../sensitive-BC_s7Rrd.js';
13
13
 
14
14
  /**
@@ -707,6 +707,17 @@ var SharedSession = class {
707
707
  expectedIssuer;
708
708
  /** Expected `aud` for locally-verified access tokens (§10.1 rule 6), if configured; `undefined` means no audience check. */
709
709
  expectedAudience;
710
+ /**
711
+ * True when this session was constructed with a §6.1 mTLS client identity
712
+ * (`clientCert` + `clientKey`), and therefore presents a client certificate
713
+ * on every request it makes.
714
+ *
715
+ * Read by the §12 OIDC helpers to decide whether CONTRACT.md §21.3 rule 2
716
+ * applies: an `mtls_endpoint_aliases` entry is preferred only on a call that
717
+ * is actually going over mutual TLS, and a session without an identity must
718
+ * keep using the top-level endpoints.
719
+ */
720
+ presentsClientCertificate;
710
721
  /**
711
722
  * Resolved tenant UUID used to build the `refresh` body (`RefreshRequest`
712
723
  * requires the UUID form, not a slug). Seeded from `orgId`/`tenantId` config
@@ -757,6 +768,7 @@ var SharedSession = class {
757
768
  this.orgSlug = options.orgSlug;
758
769
  this.expectedIssuer = options.expectedIssuer;
759
770
  this.expectedAudience = options.expectedAudience;
771
+ this.presentsClientCertificate = options.clientCert !== void 0 && options.clientKey !== void 0;
760
772
  this.resolvedTenantId = options.tenantId;
761
773
  this.resolvedOrgId = options.orgId;
762
774
  this.refreshGuard = createRefreshGuard();
@@ -5231,6 +5243,45 @@ var PrivacyApi = class {
5231
5243
  query: { "token": token }
5232
5244
  });
5233
5245
  }
5246
+ /** `GET /api/v1/account/consents` */
5247
+ async listConsents() {
5248
+ const wire = await sendManagement(this.#client, {
5249
+ operation: "privacy.list_consents",
5250
+ method: "GET",
5251
+ pathTemplate: "/api/v1/account/consents",
5252
+ path: "/api/v1/account/consents"
5253
+ });
5254
+ return wire;
5255
+ }
5256
+ /**
5257
+ * `POST /api/v1/account/consents/oidc-scopes`
5258
+ *
5259
+ * Not retried on failure (§27.4 rule 8): every write on this surface is
5260
+ * issued exactly once, including the ones that look idempotent.
5261
+ */
5262
+ async grantScopeConsent(body) {
5263
+ await sendManagement(this.#client, {
5264
+ operation: "privacy.grant_scope_consent",
5265
+ method: "POST",
5266
+ pathTemplate: "/api/v1/account/consents/oidc-scopes",
5267
+ path: "/api/v1/account/consents/oidc-scopes",
5268
+ body
5269
+ });
5270
+ }
5271
+ /**
5272
+ * `DELETE /api/v1/account/consents/oidc-scopes/{client_id}`
5273
+ *
5274
+ * Not retried on failure (§27.4 rule 8): every write on this surface is
5275
+ * issued exactly once, including the ones that look idempotent.
5276
+ */
5277
+ async withdrawScopeConsent(clientId) {
5278
+ await sendManagement(this.#client, {
5279
+ operation: "privacy.withdraw_scope_consent",
5280
+ method: "DELETE",
5281
+ pathTemplate: "/api/v1/account/consents/oidc-scopes/{client_id}",
5282
+ path: `/api/v1/account/consents/oidc-scopes/${encodeURIComponent(clientId)}`
5283
+ });
5284
+ }
5234
5285
  };
5235
5286
 
5236
5287
  // src/management/ops/platform.ts