axiam-sdk 1.0.0-alpha11 → 1.0.0-alpha2

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 (40) hide show
  1. package/README.md +3 -33
  2. package/dist/{authzCore-B7GSd3-t.d.cts → authzCore-CV-Td-V1.d.cts} +1 -18
  3. package/dist/{authzCore-CcTdIf78.d.ts → authzCore-xwmCivHH.d.ts} +1 -18
  4. package/dist/{client-Co_baHgU.d.ts → client-BPg9kfKV.d.ts} +0 -73
  5. package/dist/{client-CzhzwRGg.d.cts → client-CAeQw1a-.d.cts} +0 -73
  6. package/dist/grpc/index.d.cts +2 -6
  7. package/dist/grpc/index.d.ts +2 -6
  8. package/dist/grpc/index.js +14 -183
  9. package/dist/grpc/index.js.map +1 -1
  10. package/dist/grpc/index.mjs +14 -183
  11. package/dist/grpc/index.mjs.map +1 -1
  12. package/dist/index.d.cts +1 -1
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +10 -133
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.mjs +10 -133
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/{jwks-B8dPy2c6.d.cts → jwks-CX-nhD6A.d.cts} +0 -7
  19. package/dist/{jwks-B8dPy2c6.d.ts → jwks-CX-nhD6A.d.ts} +0 -7
  20. package/dist/middleware/index.d.cts +7 -17
  21. package/dist/middleware/index.d.ts +7 -17
  22. package/dist/middleware/index.js.map +1 -1
  23. package/dist/middleware/index.mjs.map +1 -1
  24. package/dist/nestjs/index.d.cts +2 -2
  25. package/dist/nestjs/index.d.ts +2 -2
  26. package/dist/nestjs/index.js.map +1 -1
  27. package/dist/nestjs/index.mjs.map +1 -1
  28. package/dist/node/index.d.cts +3 -22
  29. package/dist/node/index.d.ts +3 -22
  30. package/dist/node/index.js +11 -166
  31. package/dist/node/index.js.map +1 -1
  32. package/dist/node/index.mjs +11 -166
  33. package/dist/node/index.mjs.map +1 -1
  34. package/dist/rest/index.d.cts +1 -1
  35. package/dist/rest/index.d.ts +1 -1
  36. package/dist/rest/index.js +10 -133
  37. package/dist/rest/index.js.map +1 -1
  38. package/dist/rest/index.mjs +10 -133
  39. package/dist/rest/index.mjs.map +1 -1
  40. package/package.json +1 -1
package/README.md CHANGED
@@ -17,7 +17,7 @@ Official TypeScript/JavaScript client SDK for [AXIAM](https://github.com/ilpanic
17
17
 
18
18
  ## Contract conformance
19
19
 
20
- This SDK conforms to CONTRACT.md §1–§11 (including §6.1 mTLS client certificates).
20
+ This SDK conforms to CONTRACT.md §1–§11.
21
21
 
22
22
  See [`CONTRACT.md`](./CONTRACT.md) for the full cross-language behavioral contract.
23
23
 
@@ -63,34 +63,6 @@ const client = new AxiamClient({
63
63
  });
64
64
  ```
65
65
 
66
- ### mTLS / client certificates (Node only)
67
-
68
- For IoT devices and service accounts authenticated by **mutual TLS** (CONTRACT.md §6.1),
69
- pass a PEM client-certificate chain and its PEM private key. The identity is presented on
70
- **both** the REST and gRPC transports of the same client. Presenting a client certificate
71
- **never** relaxes server verification — strict TLS stays on.
72
-
73
- ```typescript
74
- import { readFileSync } from 'node:fs';
75
- import { AxiamClient } from 'axiam-sdk';
76
-
77
- const client = new AxiamClient({
78
- baseUrl: 'https://iam.example.com',
79
- tenantSlug: 'acme',
80
- clientCert: readFileSync('device.crt', 'utf8'), // PEM certificate chain
81
- clientKey: readFileSync('device.key', 'utf8'), // PEM private key (PKCS#8 or PKCS#1)
82
- // customCa: readFileSync('ca.crt', 'utf8'), // optional server-trust CA (§6)
83
- });
84
- ```
85
-
86
- - `clientCert` and `clientKey` are **all-or-nothing** — providing exactly one throws at
87
- construction, and each is validated to be PEM-shaped (as `customCa` is).
88
- - The private key is secret material: it is passed straight to the Node TLS stack and is
89
- never retained on a public property, logged, or serialized (CONTRACT.md §7).
90
- - **Node only.** Browsers cannot present a client certificate from JavaScript, so the
91
- browser build validates the PEM shape then ignores `clientCert`/`clientKey` — exactly as
92
- it already ignores `customCa`.
93
-
94
66
  ## Usage per persona
95
67
 
96
68
  ### Browser — login + authz (`axiam-sdk` / `axiam-sdk/rest`)
@@ -339,10 +311,8 @@ try {
339
311
  - Token-carrying values are wrapped in `Sensitive<T>` — `toString()`/`toJSON()`/
340
312
  `util.inspect` all redact to `[SENSITIVE]`; the raw value is only reachable via an
341
313
  explicit accessor (CONTRACT.md §7).
342
- - Strict TLS verification is always on; the only server-trust escape hatch is the
343
- constructor's `customCa` option for self-signed development environments (CONTRACT.md §6).
344
- - Optional mutual TLS (mTLS): a PEM `clientCert`/`clientKey` client identity (Node only) is
345
- presented on both REST and gRPC without ever relaxing server verification (CONTRACT.md §6.1).
314
+ - Strict TLS verification is always on; the only escape hatch is the constructor's
315
+ `customCa` option for self-signed development environments (CONTRACT.md §6).
346
316
  - AMQP messages are HMAC-SHA256 verified before your handler ever sees them; verification
347
317
  failures are nacked without requeue (CONTRACT.md §8).
348
318
 
@@ -1,5 +1,5 @@
1
1
  import { A as AccessCheck, a as AccessDecision } from './types-BVkMoqLU.cjs';
2
- import { V as Verifier } from './jwks-B8dPy2c6.cjs';
2
+ import { V as Verifier } from './jwks-CX-nhD6A.cjs';
3
3
 
4
4
  /**
5
5
  * Minimal session shape the middleware needs: a JWKS verifier (D-11) and the
@@ -9,18 +9,13 @@ import { V as Verifier } from './jwks-B8dPy2c6.cjs';
9
9
  * DIFFERENT tenant in the same org.
10
10
  */
11
11
  interface VerifiableSession {
12
- /** Local JWKS verifier (D-11) — validates the token's EdDSA signature against the org-wide cached JWKS, offline on a cache hit. */
13
12
  jwksVerifier: Verifier;
14
- /** The tenant this resource server is configured for (CR-03); a validly-signed token minted for a different tenant in the same org is rejected. */
15
13
  tenantHeaderValue: string;
16
14
  }
17
15
  /** Authenticated identity injected as req.axiamUser / request.axiamUser (§10). */
18
16
  interface AxiamIdentity {
19
- /** The authenticated end user's id (the token's `sub` claim). */
20
17
  userId: string;
21
- /** The tenant the verified token was minted for (the token's `tenant_id` claim). */
22
18
  tenantId: string;
23
- /** Roles derived from the token's space-separated `scope` claim (§10). */
24
19
  roles: string[];
25
20
  }
26
21
  /**
@@ -42,7 +37,6 @@ declare function authenticateRequest(session: VerifiableSession, token: string):
42
37
  * itself, so this module pulls in no axios/grpc dependency.
43
38
  */
44
39
  interface AuthzChecker {
45
- /** Issue a single access check for the authenticated end user (`subjectId`, §11.2.2). Satisfied structurally by `AxiamClient.checkAccess`. */
46
40
  checkAccess(check: AccessCheck): Promise<AccessDecision>;
47
41
  }
48
42
  /**
@@ -54,14 +48,11 @@ interface AuthzChecker {
54
48
  * not per-request, when it is absent.
55
49
  */
56
50
  interface AuthzVerifiableSession extends VerifiableSession {
57
- /** Authz transport required by `requireAccess`/`requireAccessHook` (validated by {@link assertAuthzClient}); unused by `requireAuth`/`requireRole`. */
58
51
  authzClient?: AuthzChecker;
59
52
  }
60
53
  /** Marker produced by {@link fromParam} — resolve the resource id from a named path/route parameter. */
61
54
  interface ResourceParamRef {
62
- /** Discriminant marking the path/route-parameter resolution strategy (§11.2.3.b). */
63
55
  readonly kind: 'param';
64
- /** The path/route parameter name the resource id is read from. */
65
56
  readonly name: string;
66
57
  }
67
58
  /**
@@ -101,7 +92,6 @@ interface RequireAccessOptions {
101
92
  }
102
93
  /** Minimal logger seam for the §11.2.8 debug-only denial/error log (mirrors `amqp/consumer.ts`'s `ConsumeLogger`). */
103
94
  interface AuthzLogger {
104
- /** Emit a debug-only denial/error record (§11.2.8) — receives `action`/`resourceId` context, never the token. */
105
95
  debug(event: string, message: string, context?: Record<string, unknown>): void;
106
96
  }
107
97
  /**
@@ -113,24 +103,17 @@ interface AuthzLogger {
113
103
  declare function assertAuthzClient(session: AuthzVerifiableSession): AuthzChecker;
114
104
  /** Standardized JSON error body shape (§10/§11 — `{ error, message }`). */
115
105
  interface ErrorBody {
116
- /** Stable machine-readable error code (e.g. `authentication_failed`, `authorization_denied`). */
117
106
  error: string;
118
- /** Human-readable explanation; never contains token material. */
119
107
  message: string;
120
108
  }
121
109
  /** The outcome of an `evaluateAccess` call — one arm per §11.2.5's error-mapping table (the 401/400 arms are handled by callers before this is ever invoked). */
122
110
  type CheckOutcome = {
123
- /** The check passed — the caller proceeds to the handler. */
124
111
  kind: 'allowed';
125
112
  } | {
126
- /** The check was evaluated and denied (`allowed: false` or a server 403) → HTTP 403. */
127
113
  kind: 'denied';
128
- /** Denial message surfaced in the 403 body. */
129
114
  message: string;
130
115
  } | {
131
- /** The authz transport failed — fail-closed → HTTP 503, never an allow. */
132
116
  kind: 'unavailable';
133
- /** Failure message surfaced in the 503 body. */
134
117
  message: string;
135
118
  };
136
119
  /**
@@ -1,5 +1,5 @@
1
1
  import { A as AccessCheck, a as AccessDecision } from './types-BVkMoqLU.js';
2
- import { V as Verifier } from './jwks-B8dPy2c6.js';
2
+ import { V as Verifier } from './jwks-CX-nhD6A.js';
3
3
 
4
4
  /**
5
5
  * Minimal session shape the middleware needs: a JWKS verifier (D-11) and the
@@ -9,18 +9,13 @@ import { V as Verifier } from './jwks-B8dPy2c6.js';
9
9
  * DIFFERENT tenant in the same org.
10
10
  */
11
11
  interface VerifiableSession {
12
- /** Local JWKS verifier (D-11) — validates the token's EdDSA signature against the org-wide cached JWKS, offline on a cache hit. */
13
12
  jwksVerifier: Verifier;
14
- /** The tenant this resource server is configured for (CR-03); a validly-signed token minted for a different tenant in the same org is rejected. */
15
13
  tenantHeaderValue: string;
16
14
  }
17
15
  /** Authenticated identity injected as req.axiamUser / request.axiamUser (§10). */
18
16
  interface AxiamIdentity {
19
- /** The authenticated end user's id (the token's `sub` claim). */
20
17
  userId: string;
21
- /** The tenant the verified token was minted for (the token's `tenant_id` claim). */
22
18
  tenantId: string;
23
- /** Roles derived from the token's space-separated `scope` claim (§10). */
24
19
  roles: string[];
25
20
  }
26
21
  /**
@@ -42,7 +37,6 @@ declare function authenticateRequest(session: VerifiableSession, token: string):
42
37
  * itself, so this module pulls in no axios/grpc dependency.
43
38
  */
44
39
  interface AuthzChecker {
45
- /** Issue a single access check for the authenticated end user (`subjectId`, §11.2.2). Satisfied structurally by `AxiamClient.checkAccess`. */
46
40
  checkAccess(check: AccessCheck): Promise<AccessDecision>;
47
41
  }
48
42
  /**
@@ -54,14 +48,11 @@ interface AuthzChecker {
54
48
  * not per-request, when it is absent.
55
49
  */
56
50
  interface AuthzVerifiableSession extends VerifiableSession {
57
- /** Authz transport required by `requireAccess`/`requireAccessHook` (validated by {@link assertAuthzClient}); unused by `requireAuth`/`requireRole`. */
58
51
  authzClient?: AuthzChecker;
59
52
  }
60
53
  /** Marker produced by {@link fromParam} — resolve the resource id from a named path/route parameter. */
61
54
  interface ResourceParamRef {
62
- /** Discriminant marking the path/route-parameter resolution strategy (§11.2.3.b). */
63
55
  readonly kind: 'param';
64
- /** The path/route parameter name the resource id is read from. */
65
56
  readonly name: string;
66
57
  }
67
58
  /**
@@ -101,7 +92,6 @@ interface RequireAccessOptions {
101
92
  }
102
93
  /** Minimal logger seam for the §11.2.8 debug-only denial/error log (mirrors `amqp/consumer.ts`'s `ConsumeLogger`). */
103
94
  interface AuthzLogger {
104
- /** Emit a debug-only denial/error record (§11.2.8) — receives `action`/`resourceId` context, never the token. */
105
95
  debug(event: string, message: string, context?: Record<string, unknown>): void;
106
96
  }
107
97
  /**
@@ -113,24 +103,17 @@ interface AuthzLogger {
113
103
  declare function assertAuthzClient(session: AuthzVerifiableSession): AuthzChecker;
114
104
  /** Standardized JSON error body shape (§10/§11 — `{ error, message }`). */
115
105
  interface ErrorBody {
116
- /** Stable machine-readable error code (e.g. `authentication_failed`, `authorization_denied`). */
117
106
  error: string;
118
- /** Human-readable explanation; never contains token material. */
119
107
  message: string;
120
108
  }
121
109
  /** The outcome of an `evaluateAccess` call — one arm per §11.2.5's error-mapping table (the 401/400 arms are handled by callers before this is ever invoked). */
122
110
  type CheckOutcome = {
123
- /** The check passed — the caller proceeds to the handler. */
124
111
  kind: 'allowed';
125
112
  } | {
126
- /** The check was evaluated and denied (`allowed: false` or a server 403) → HTTP 403. */
127
113
  kind: 'denied';
128
- /** Denial message surfaced in the 403 body. */
129
114
  message: string;
130
115
  } | {
131
- /** The authz transport failed — fail-closed → HTTP 503, never an allow. */
132
116
  kind: 'unavailable';
133
- /** Failure message surfaced in the 503 body. */
134
117
  message: string;
135
118
  };
136
119
  /**
@@ -21,42 +21,8 @@ interface AxiamClientOptions {
21
21
  tenantSlug?: string;
22
22
  /** Tenant UUID. At least one of tenantSlug/tenantId is required at runtime. */
23
23
  tenantId?: string;
24
- /**
25
- * Human-readable organization identifier (CONTRACT.md §5). Optional at
26
- * construction, but the server REQUIRES an org context on login — a tenant
27
- * slug is only unique *within* an organization — so a client that omits both
28
- * `orgSlug` and `orgId` will fail login with a 400/401. Forwarded as
29
- * `org_slug` in the login body. Mutually exclusive with {@link orgId}
30
- * (if both are given, `orgId` wins, mirroring how `tenantSlug`/`tenantId`
31
- * resolve).
32
- */
33
- orgSlug?: string;
34
- /**
35
- * Organization UUID (CONTRACT.md §5). Optional at construction (see
36
- * {@link orgSlug}). When supplied it is forwarded as `org_id` on login and
37
- * used to build the `refresh` body; otherwise the resolved organization UUID
38
- * is decoded from the authenticated session's access-token `org_id` claim
39
- * after the first successful login. Mutually exclusive with {@link orgSlug}.
40
- */
41
- orgId?: string;
42
24
  /** PEM-encoded custom CA certificate, for self-signed/dev environments (§6). */
43
25
  customCa?: string;
44
- /**
45
- * PEM-encoded client-certificate chain for mutual TLS (§6.1). Presented to
46
- * the server to authenticate an IoT device / service account. MUST be
47
- * provided together with {@link AxiamClientOptions.clientKey}. Node only —
48
- * ignored in the browser (browsers cannot present a client certificate from
49
- * JS). Presenting a client certificate NEVER relaxes server verification.
50
- */
51
- clientCert?: string;
52
- /**
53
- * PEM-encoded private key (PKCS#8 or PKCS#1) matching {@link
54
- * AxiamClientOptions.clientCert} (§6.1). Secret material: it is passed
55
- * straight to the Node TLS stack and is never retained on a public property,
56
- * logged, or serialized (§7). MUST be provided together with `clientCert`.
57
- * Node only — ignored in the browser.
58
- */
59
- clientKey?: string;
60
26
  /** Connection timeout in milliseconds. Defaults to DEFAULT_CONNECT_TIMEOUT_MS. */
61
27
  connectTimeoutMs?: number;
62
28
  /** Request timeout in milliseconds. Defaults to DEFAULT_REQUEST_TIMEOUT_MS. */
@@ -75,28 +41,6 @@ declare class SharedSession {
75
41
  readonly baseUrl: string;
76
42
  /** The resolved tenant identifier (`tenantSlug` or `tenantId`) injected as the `X-Tenant-ID` header on every same-origin request (§5.2). */
77
43
  readonly tenantHeaderValue: string;
78
- /** Configured tenant UUID (`AxiamClientOptions.tenantId`), if the client was built with the UUID form. */
79
- readonly tenantId: string | undefined;
80
- /** Configured tenant slug (`AxiamClientOptions.tenantSlug`), if the client was built with the slug form. */
81
- readonly tenantSlug: string | undefined;
82
- /** Configured organization UUID (`AxiamClientOptions.orgId`), if supplied (§5). */
83
- readonly orgId: string | undefined;
84
- /** Configured organization slug (`AxiamClientOptions.orgSlug`), if supplied (§5). */
85
- readonly orgSlug: string | undefined;
86
- /**
87
- * Resolved tenant UUID used to build the `refresh` body (`RefreshRequest`
88
- * requires the UUID form, not a slug). Seeded from `orgId`/`tenantId` config
89
- * when the UUID was supplied, then updated from the access-token `tenant_id`
90
- * claim after each successful login/refresh (Node persona only — the browser
91
- * cannot read the httpOnly access-token cookie).
92
- */
93
- resolvedTenantId: string | undefined;
94
- /**
95
- * Resolved organization UUID used to build the `refresh` body. Seeded from
96
- * `orgId` config, then updated from the access-token `org_id` claim after a
97
- * successful login (Node persona). Mirrors the Rust SDK's `resolved_org_id`.
98
- */
99
- resolvedOrgId: string | undefined;
100
44
  /** Mutable CSRF token store — populated by the request/response interceptors (D-05). */
101
45
  csrfToken: string | undefined;
102
46
  /** Set true once a successful login/verifyMfa has completed. */
@@ -113,23 +57,6 @@ declare class SharedSession {
113
57
  */
114
58
  readonly refreshGuard: RefreshGuard;
115
59
  constructor(options: AxiamClientOptions, axiosInstance: AxiosInstance, tenantHeaderValue: string);
116
- /**
117
- * Build the `POST /api/v1/auth/refresh` request body (§1). The server's
118
- * `RefreshRequest` requires both `tenant_id` and `org_id` as UUIDs, so this
119
- * emits the resolved UUIDs — from the access-token claims after login, or
120
- * from UUID-form construction options as a fallback. Fields that could not
121
- * be resolved are omitted (the server then answers with a clear 400), rather
122
- * than sending a slug where a UUID is required.
123
- */
124
- buildRefreshBody(): Record<string, string>;
125
- /**
126
- * Build the `POST /api/v1/auth/login` request body (§1/§5). Carries the
127
- * configured tenant and organization identifiers (UUID or slug form) in
128
- * addition to the credentials — the server resolves the workspace from the
129
- * body, not the `X-Tenant-ID` header, and rejects a login that omits org
130
- * context. Undefined identifiers are omitted.
131
- */
132
- buildLoginBody(email: string, password: string): Record<string, string>;
133
60
  /**
134
61
  * Optional session-level hook invoked by rest/auth.ts after a successful
135
62
  * login()/verifyMfa() (CR-01, D-05). The base SharedSession (browser
@@ -21,42 +21,8 @@ interface AxiamClientOptions {
21
21
  tenantSlug?: string;
22
22
  /** Tenant UUID. At least one of tenantSlug/tenantId is required at runtime. */
23
23
  tenantId?: string;
24
- /**
25
- * Human-readable organization identifier (CONTRACT.md §5). Optional at
26
- * construction, but the server REQUIRES an org context on login — a tenant
27
- * slug is only unique *within* an organization — so a client that omits both
28
- * `orgSlug` and `orgId` will fail login with a 400/401. Forwarded as
29
- * `org_slug` in the login body. Mutually exclusive with {@link orgId}
30
- * (if both are given, `orgId` wins, mirroring how `tenantSlug`/`tenantId`
31
- * resolve).
32
- */
33
- orgSlug?: string;
34
- /**
35
- * Organization UUID (CONTRACT.md §5). Optional at construction (see
36
- * {@link orgSlug}). When supplied it is forwarded as `org_id` on login and
37
- * used to build the `refresh` body; otherwise the resolved organization UUID
38
- * is decoded from the authenticated session's access-token `org_id` claim
39
- * after the first successful login. Mutually exclusive with {@link orgSlug}.
40
- */
41
- orgId?: string;
42
24
  /** PEM-encoded custom CA certificate, for self-signed/dev environments (§6). */
43
25
  customCa?: string;
44
- /**
45
- * PEM-encoded client-certificate chain for mutual TLS (§6.1). Presented to
46
- * the server to authenticate an IoT device / service account. MUST be
47
- * provided together with {@link AxiamClientOptions.clientKey}. Node only —
48
- * ignored in the browser (browsers cannot present a client certificate from
49
- * JS). Presenting a client certificate NEVER relaxes server verification.
50
- */
51
- clientCert?: string;
52
- /**
53
- * PEM-encoded private key (PKCS#8 or PKCS#1) matching {@link
54
- * AxiamClientOptions.clientCert} (§6.1). Secret material: it is passed
55
- * straight to the Node TLS stack and is never retained on a public property,
56
- * logged, or serialized (§7). MUST be provided together with `clientCert`.
57
- * Node only — ignored in the browser.
58
- */
59
- clientKey?: string;
60
26
  /** Connection timeout in milliseconds. Defaults to DEFAULT_CONNECT_TIMEOUT_MS. */
61
27
  connectTimeoutMs?: number;
62
28
  /** Request timeout in milliseconds. Defaults to DEFAULT_REQUEST_TIMEOUT_MS. */
@@ -75,28 +41,6 @@ declare class SharedSession {
75
41
  readonly baseUrl: string;
76
42
  /** The resolved tenant identifier (`tenantSlug` or `tenantId`) injected as the `X-Tenant-ID` header on every same-origin request (§5.2). */
77
43
  readonly tenantHeaderValue: string;
78
- /** Configured tenant UUID (`AxiamClientOptions.tenantId`), if the client was built with the UUID form. */
79
- readonly tenantId: string | undefined;
80
- /** Configured tenant slug (`AxiamClientOptions.tenantSlug`), if the client was built with the slug form. */
81
- readonly tenantSlug: string | undefined;
82
- /** Configured organization UUID (`AxiamClientOptions.orgId`), if supplied (§5). */
83
- readonly orgId: string | undefined;
84
- /** Configured organization slug (`AxiamClientOptions.orgSlug`), if supplied (§5). */
85
- readonly orgSlug: string | undefined;
86
- /**
87
- * Resolved tenant UUID used to build the `refresh` body (`RefreshRequest`
88
- * requires the UUID form, not a slug). Seeded from `orgId`/`tenantId` config
89
- * when the UUID was supplied, then updated from the access-token `tenant_id`
90
- * claim after each successful login/refresh (Node persona only — the browser
91
- * cannot read the httpOnly access-token cookie).
92
- */
93
- resolvedTenantId: string | undefined;
94
- /**
95
- * Resolved organization UUID used to build the `refresh` body. Seeded from
96
- * `orgId` config, then updated from the access-token `org_id` claim after a
97
- * successful login (Node persona). Mirrors the Rust SDK's `resolved_org_id`.
98
- */
99
- resolvedOrgId: string | undefined;
100
44
  /** Mutable CSRF token store — populated by the request/response interceptors (D-05). */
101
45
  csrfToken: string | undefined;
102
46
  /** Set true once a successful login/verifyMfa has completed. */
@@ -113,23 +57,6 @@ declare class SharedSession {
113
57
  */
114
58
  readonly refreshGuard: RefreshGuard;
115
59
  constructor(options: AxiamClientOptions, axiosInstance: AxiosInstance, tenantHeaderValue: string);
116
- /**
117
- * Build the `POST /api/v1/auth/refresh` request body (§1). The server's
118
- * `RefreshRequest` requires both `tenant_id` and `org_id` as UUIDs, so this
119
- * emits the resolved UUIDs — from the access-token claims after login, or
120
- * from UUID-form construction options as a fallback. Fields that could not
121
- * be resolved are omitted (the server then answers with a clear 400), rather
122
- * than sending a slug where a UUID is required.
123
- */
124
- buildRefreshBody(): Record<string, string>;
125
- /**
126
- * Build the `POST /api/v1/auth/login` request body (§1/§5). Carries the
127
- * configured tenant and organization identifiers (UUID or slug form) in
128
- * addition to the credentials — the server resolves the workspace from the
129
- * body, not the `X-Tenant-ID` header, and rejects a login that omits org
130
- * context. Undefined identifiers are omitted.
131
- */
132
- buildLoginBody(email: string, password: string): Record<string, string>;
133
60
  /**
134
61
  * Optional session-level hook invoked by rest/auth.ts after a successful
135
62
  * login()/verifyMfa() (CR-01, D-05). The base SharedSession (browser
@@ -3,9 +3,9 @@ import { Interceptor } from '@grpc/grpc-js';
3
3
  import { NodeSession } from '../node/index.cjs';
4
4
  export { ACCESS_COOKIE, CSRF_COOKIE, REFRESH_COOKIE, TokenManager, createJar, createNodeClient, createNodeSession, extractCookieValue, wrapAxios } from '../node/index.cjs';
5
5
  import { a as AccessDecision } from '../types-BVkMoqLU.cjs';
6
- export { A as AxiamClaims, J as JWKS_PATH, V as Verifier, c as createVerifier } from '../jwks-B8dPy2c6.cjs';
6
+ export { A as AxiamClaims, J as JWKS_PATH, V as Verifier, c as createVerifier } from '../jwks-CX-nhD6A.cjs';
7
7
  import 'tough-cookie';
8
- import '../client-CzhzwRGg.cjs';
8
+ import '../client-CAeQw1a-.cjs';
9
9
  import 'axios';
10
10
  import '../sensitive-CWBH_tHr.cjs';
11
11
 
@@ -95,10 +95,6 @@ declare class AuthzGrpcClient {
95
95
  baseUrl: string;
96
96
  customCa?: string;
97
97
  allowInsecure?: boolean;
98
- /** PEM client-certificate chain for mutual TLS (§6.1); pair with `clientKey`. */
99
- clientCert?: string;
100
- /** PEM private key for mutual TLS (§6.1); pair with `clientCert`. Secret (§7). */
101
- clientKey?: string;
102
98
  }, clientFactory?: AuthorizationServiceClientFactory);
103
99
  /** `CheckAccess` over gRPC (SC#2 Node half). UNAUTHENTICATED triggers exactly one shared-guard refresh + one retry (§9.3). */
104
100
  checkAccess(request: CheckAccessRequest): Promise<AccessDecision>;
@@ -3,9 +3,9 @@ import { Interceptor } from '@grpc/grpc-js';
3
3
  import { NodeSession } from '../node/index.js';
4
4
  export { ACCESS_COOKIE, CSRF_COOKIE, REFRESH_COOKIE, TokenManager, createJar, createNodeClient, createNodeSession, extractCookieValue, wrapAxios } from '../node/index.js';
5
5
  import { a as AccessDecision } from '../types-BVkMoqLU.js';
6
- export { A as AxiamClaims, J as JWKS_PATH, V as Verifier, c as createVerifier } from '../jwks-B8dPy2c6.js';
6
+ export { A as AxiamClaims, J as JWKS_PATH, V as Verifier, c as createVerifier } from '../jwks-CX-nhD6A.js';
7
7
  import 'tough-cookie';
8
- import '../client-Co_baHgU.js';
8
+ import '../client-BPg9kfKV.js';
9
9
  import 'axios';
10
10
  import '../sensitive-CWBH_tHr.js';
11
11
 
@@ -95,10 +95,6 @@ declare class AuthzGrpcClient {
95
95
  baseUrl: string;
96
96
  customCa?: string;
97
97
  allowInsecure?: boolean;
98
- /** PEM client-certificate chain for mutual TLS (§6.1); pair with `clientKey`. */
99
- clientCert?: string;
100
- /** PEM private key for mutual TLS (§6.1); pair with `clientCert`. Secret (§7). */
101
- clientKey?: string;
102
98
  }, clientFactory?: AuthorizationServiceClientFactory);
103
99
  /** `CheckAccess` over gRPC (SC#2 Node half). UNAUTHENTICATED triggers exactly one shared-guard refresh + one retry (§9.3). */
104
100
  checkAccess(request: CheckAccessRequest): Promise<AccessDecision>;