@atlasauth/backend 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/client/abac.d.ts +65 -0
- package/dist/client/abac.js +25 -0
- package/dist/client/abac.js.map +1 -1
- package/dist/client/access-policies.d.ts +84 -2
- package/dist/client/access-policies.js +8 -0
- package/dist/client/access-policies.js.map +1 -1
- package/dist/client/actions.d.ts +1 -1
- package/dist/client/actions.js.map +1 -1
- package/dist/client/agent-platform.d.ts +294 -0
- package/dist/client/agent-platform.js +132 -0
- package/dist/client/agent-platform.js.map +1 -0
- package/dist/client/app-catalog.d.ts +60 -1
- package/dist/client/app-catalog.js +32 -2
- package/dist/client/app-catalog.js.map +1 -1
- package/dist/client/authz-decisions.d.ts +46 -0
- package/dist/client/authz-decisions.js +13 -0
- package/dist/client/authz-decisions.js.map +1 -1
- package/dist/client/connections.d.ts +12 -0
- package/dist/client/connections.js +7 -0
- package/dist/client/connections.js.map +1 -1
- package/dist/client/desktop-mfa.d.ts +37 -0
- package/dist/client/desktop-mfa.js +14 -0
- package/dist/client/desktop-mfa.js.map +1 -1
- package/dist/client/devices.d.ts +130 -0
- package/dist/client/devices.js +54 -0
- package/dist/client/devices.js.map +1 -1
- package/dist/client/email-templates.d.ts +1 -1
- package/dist/client/email-templates.js.map +1 -1
- package/dist/client/fga.d.ts +176 -1
- package/dist/client/fga.js +41 -1
- package/dist/client/fga.js.map +1 -1
- package/dist/client/index.d.ts +3782 -2946
- package/dist/client/index.js +28 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/log-streams.d.ts +1 -1
- package/dist/client/mcp-gateways.d.ts +148 -2
- package/dist/client/mcp-gateways.js +52 -0
- package/dist/client/mcp-gateways.js.map +1 -1
- package/dist/client/messaging.d.ts +11 -2
- package/dist/client/messaging.js.map +1 -1
- package/dist/client/oauth-protocols.d.ts +116 -0
- package/dist/client/oauth-protocols.js +54 -0
- package/dist/client/oauth-protocols.js.map +1 -0
- package/dist/client/oauth-providers.d.ts +4 -4
- package/dist/client/org-ldap-connections.d.ts +3 -0
- package/dist/client/org-ldap-connections.js.map +1 -1
- package/dist/client/organizations.d.ts +14 -0
- package/dist/client/organizations.js.map +1 -1
- package/dist/client/risk-containment.d.ts +244 -0
- package/dist/client/risk-containment.js +120 -0
- package/dist/client/risk-containment.js.map +1 -0
- package/dist/client/saml-idp.d.ts +183 -0
- package/dist/client/saml-idp.js +71 -0
- package/dist/client/saml-idp.js.map +1 -0
- package/dist/client/scim-provisioning.d.ts +100 -4
- package/dist/client/scim-provisioning.js +30 -0
- package/dist/client/scim-provisioning.js.map +1 -1
- package/dist/client/scim-tokens.d.ts +34 -0
- package/dist/client/scim-tokens.js +17 -0
- package/dist/client/scim-tokens.js.map +1 -1
- package/dist/client/service-connectors.d.ts +1 -1
- package/dist/client/ssf.d.ts +29 -0
- package/dist/client/ssf.js +17 -0
- package/dist/client/ssf.js.map +1 -1
- package/dist/client/users.d.ts +9 -0
- package/dist/client/users.js +9 -0
- package/dist/client/users.js.map +1 -1
- package/dist/client/vault.d.ts +54 -0
- package/dist/client/vault.js +30 -0
- package/dist/client/vault.js.map +1 -1
- package/dist/client/vc.d.ts +54 -2
- package/dist/client/vc.js +15 -0
- package/dist/client/vc.js.map +1 -1
- package/dist/client/workflows.d.ts +182 -3
- package/dist/client/workflows.js +34 -0
- package/dist/client/workflows.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/oauth-resource.d.ts +30 -3
- package/dist/oauth-resource.js +43 -2
- package/dist/oauth-resource.js.map +1 -1
- package/dist/txn-token.d.ts +36 -0
- package/dist/txn-token.js +30 -0
- package/dist/txn-token.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlasauth/backend changelog
|
|
2
2
|
|
|
3
|
+
## 0.27.0 — 2026-10-28
|
|
4
|
+
|
|
5
|
+
- SAML IdP (service providers, artifacts, attribute queries), WS-Federation, outbound provisioning connectors, SCIM custom resources and cloud access targets
|
|
6
|
+
- OpenID provider: per-client signing/encryption, op key rotation, token-exchange profiles, refresh-token search and bulk revoke, federation resolve, verifiable-credential deferred issuance and presentation requests; `requireAcr`/`maxAge` step-up on access-token verification and `verifyTransactionToken`
|
|
7
|
+
- Conditional access depth: report-only and impact replay, device assurance policies and pull integrations, risky users, containment, temporary access passes, email risk, authenticator policies
|
|
8
|
+
- Workflows, chat integrations (Slack/Teams approvals), eligible access and activation, staged and recurring reviews, bundles, administrative units, organization application access and B2B connections
|
|
9
|
+
- MCP gateway v2 (upstreams, packs, pins, user auth), connection actions and triggers, agent lifecycle and reviews, telemetry export
|
|
10
|
+
- Authorization: tuple expiry, decision points, Cedar JSON and token authorization, FGA assertions/materializations/bulk import, customer-managed keys, coupons, credits, user merge, audit retention
|
|
11
|
+
- Device-bound SSO registrations; SMTP2GO email transport
|
|
12
|
+
|
|
3
13
|
## 0.26.0 — 2026-10-27
|
|
4
14
|
|
|
5
15
|
### Added
|
package/dist/client/abac.d.ts
CHANGED
|
@@ -64,6 +64,11 @@ export interface AbacDecision {
|
|
|
64
64
|
decision: 'allow' | 'deny';
|
|
65
65
|
reasons: string[];
|
|
66
66
|
errors: string[];
|
|
67
|
+
/** `@annotations` of the policies that decided it, when any carry them. */
|
|
68
|
+
annotations?: Array<{
|
|
69
|
+
policy: string;
|
|
70
|
+
annotations: Record<string, string>;
|
|
71
|
+
}>;
|
|
67
72
|
}
|
|
68
73
|
export interface AbacCoverageClause {
|
|
69
74
|
kind: 'when' | 'unless';
|
|
@@ -410,6 +415,51 @@ export declare function abacResource(request: RequestFn): {
|
|
|
410
415
|
source?: string;
|
|
411
416
|
tests?: AbacPolicyTestCase[];
|
|
412
417
|
}): Promise<AbacTestRun>;
|
|
418
|
+
/** Cedar JSON policy format: export policy text, import JSON (optionally creating the policy with `name`). */
|
|
419
|
+
cedar: {
|
|
420
|
+
export(source: string): Promise<{
|
|
421
|
+
object: "cedar_json_policies";
|
|
422
|
+
policies: Array<Record<string, unknown>>;
|
|
423
|
+
}>;
|
|
424
|
+
import(body: {
|
|
425
|
+
policies: Array<Record<string, unknown>>;
|
|
426
|
+
name?: string;
|
|
427
|
+
fga_store_id?: string | null;
|
|
428
|
+
}): Promise<{
|
|
429
|
+
object: "cedar_source";
|
|
430
|
+
source: string;
|
|
431
|
+
policies: number;
|
|
432
|
+
} | AbacPolicy>;
|
|
433
|
+
forPolicy(id: string): Promise<{
|
|
434
|
+
object: "cedar_json_policies";
|
|
435
|
+
policies: Array<Record<string, unknown>>;
|
|
436
|
+
}>;
|
|
437
|
+
};
|
|
438
|
+
/** How access-token claims become a policy principal and its parents (used by {@link authorizeToken}). */
|
|
439
|
+
tokenMapping: {
|
|
440
|
+
get(): Promise<AbacTokenMapping>;
|
|
441
|
+
put(body: Partial<Omit<AbacTokenMapping, "object">>): Promise<AbacTokenMapping>;
|
|
442
|
+
};
|
|
443
|
+
/** Decide for the principal an access token stands for (verified first; an invalid token is a 401). */
|
|
444
|
+
authorizeToken(body: {
|
|
445
|
+
access_token: string;
|
|
446
|
+
action: string;
|
|
447
|
+
resource: {
|
|
448
|
+
type: string;
|
|
449
|
+
id: string;
|
|
450
|
+
attributes?: Record<string, unknown>;
|
|
451
|
+
};
|
|
452
|
+
context?: Record<string, unknown>;
|
|
453
|
+
entities?: AbacEntity[];
|
|
454
|
+
policy_ids?: string[];
|
|
455
|
+
}): Promise<AbacDecision & {
|
|
456
|
+
principal: {
|
|
457
|
+
type: string;
|
|
458
|
+
id: string;
|
|
459
|
+
parents: string[];
|
|
460
|
+
};
|
|
461
|
+
issuer: "atlas" | "trusted";
|
|
462
|
+
}>;
|
|
413
463
|
/** May `principal` perform `action` on `resource`? */
|
|
414
464
|
evaluate(body: AbacEvaluateBody): Promise<AbacDecision>;
|
|
415
465
|
/**
|
|
@@ -519,3 +569,18 @@ export declare function abacResource(request: RequestFn): {
|
|
|
519
569
|
}>;
|
|
520
570
|
};
|
|
521
571
|
export { FilterCompileError, evalFilter, filterToDrizzle, filterToPrisma, filterToSql, type DrizzleOps, type DrizzleOptions, type Filter, type FilterRows, type PrismaOptions, type SqlColumn, type SqlDialect, type SqlFragment, type SqlOptions, } from '@atlasauth/authz';
|
|
572
|
+
export interface AbacTokenMapping {
|
|
573
|
+
object: 'abac_token_mapping';
|
|
574
|
+
principal_type: string;
|
|
575
|
+
id_claim: string;
|
|
576
|
+
parents: Array<{
|
|
577
|
+
claim: string;
|
|
578
|
+
type: string;
|
|
579
|
+
}>;
|
|
580
|
+
attribute_claims: string[];
|
|
581
|
+
trusted_issuers: Array<{
|
|
582
|
+
issuer: string;
|
|
583
|
+
jwks_uri: string;
|
|
584
|
+
audience?: string;
|
|
585
|
+
}>;
|
|
586
|
+
}
|
package/dist/client/abac.js
CHANGED
|
@@ -28,6 +28,31 @@ function abacResource(request) {
|
|
|
28
28
|
test(id, body = {}) {
|
|
29
29
|
return request({ method: 'POST', path: `/v1/abac_policies/${(0, request_1.enc)(id)}/test`, body });
|
|
30
30
|
},
|
|
31
|
+
/** Cedar JSON policy format: export policy text, import JSON (optionally creating the policy with `name`). */
|
|
32
|
+
cedar: {
|
|
33
|
+
export(source) {
|
|
34
|
+
return request({ method: 'POST', path: '/v1/abac/cedar/export', body: { source } });
|
|
35
|
+
},
|
|
36
|
+
import(body) {
|
|
37
|
+
return request({ method: 'POST', path: '/v1/abac/cedar/import', body });
|
|
38
|
+
},
|
|
39
|
+
forPolicy(id) {
|
|
40
|
+
return request({ method: 'GET', path: `/v1/abac_policies/${(0, request_1.enc)(id)}/cedar_json` });
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
/** How access-token claims become a policy principal and its parents (used by {@link authorizeToken}). */
|
|
44
|
+
tokenMapping: {
|
|
45
|
+
get() {
|
|
46
|
+
return request({ method: 'GET', path: '/v1/abac/token_mapping' });
|
|
47
|
+
},
|
|
48
|
+
put(body) {
|
|
49
|
+
return request({ method: 'PUT', path: '/v1/abac/token_mapping', body });
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
/** Decide for the principal an access token stands for (verified first; an invalid token is a 401). */
|
|
53
|
+
authorizeToken(body) {
|
|
54
|
+
return request({ method: 'POST', path: '/v1/abac/authorize_token', body });
|
|
55
|
+
},
|
|
31
56
|
/** May `principal` perform `action` on `resource`? */
|
|
32
57
|
evaluate(body) {
|
|
33
58
|
return request({ method: 'POST', path: '/v1/abac/evaluate', body });
|
package/dist/client/abac.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abac.js","sourceRoot":"","sources":["../../src/client/abac.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"abac.js","sourceRoot":"","sources":["../../src/client/abac.ts"],"names":[],"mappings":";;;AA6UA,oCA8JC;AA3eD,uCAAgD;AA4UhD,qFAAqF;AACrF,SAAgB,YAAY,CAAC,OAAkB;IAC7C,OAAO;QACL,IAAI;YACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAC/D,CAAC;QACD,GAAG,CAAC,EAAU;YACZ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,qBAAqB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1E,CAAC;QACD,MAAM,CAAC,IAA0B,EAAE,cAAuB;YACxD,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;QACtF,CAAC;QACD,MAAM,CAAC,EAAU,EAAE,IAA0B;YAC3C,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,qBAAqB,IAAA,aAAG,EAAC,EAAE,CAAC,EA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AAI,EAAE,CAAC,CAAC;QACrF,CAAC;QACD,8CAA8C;QAC9C,kBAAkB,CAChB,IAAqK;YAErK,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,mCAAmC,EAAE,IAAI,EAAE,CAAC,CAAC;QACtF,CAAC;KACF,CAAC;AACJ,CAAC;AAED,sGAAsG;AACtG,0CAe0B;AAdxB,2GAAA,kBAAkB,OAAA;AAClB,mGAAA,UAAU,OAAA;AACV,wGAAA,eAAe,OAAA;AACf,uGAAA,cAAc,OAAA;AACd,oGAAA,WAAW,OAAA"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { type RequestFn } from './request';
|
|
2
2
|
import type { ListPage } from './types';
|
|
3
3
|
export type AccessPolicyStage = 'sign_in' | 'authorize' | 'token';
|
|
4
|
-
export type AccessPolicyGrantType = 'allow' | 'block' | 'require_mfa' | 'require_acr' | 'require_policy_acceptance' | 'require_action';
|
|
4
|
+
export type AccessPolicyGrantType = 'allow' | 'block' | 'require_mfa' | 'require_acr' | 'require_policy_acceptance' | 'require_action' | 'require_auth_strength' | 'require_device_bound_session' | 'require_password_change' | 'sign_in_frequency' | 'persistent_session' | 'max_session_age';
|
|
5
|
+
export type AccessPolicyMode = 'enforce' | 'report_only';
|
|
6
|
+
export type AccessPolicyTarget = 'user' | 'machine' | 'agent';
|
|
7
|
+
export type AccessClientType = 'browser' | 'native' | 'legacy' | 'device_code' | 'ciba' | 'machine' | 'agent';
|
|
5
8
|
export interface AccessPolicyGrant {
|
|
6
9
|
type: AccessPolicyGrantType;
|
|
7
|
-
/** require_acr: the acr; require_policy_acceptance: the policy key; require_action: the action name. */
|
|
10
|
+
/** require_acr: the acr; require_policy_acceptance: the policy key; require_action: the action name; require_auth_strength: mfa | passwordless | phishing_resistant. */
|
|
8
11
|
value?: string;
|
|
12
|
+
/** sign_in_frequency / max_session_age: the limit in seconds (60 to 31536000). */
|
|
13
|
+
seconds?: number;
|
|
14
|
+
/** persistent_session: false forbids a remembered session. */
|
|
15
|
+
allow?: boolean;
|
|
9
16
|
}
|
|
10
17
|
/** Every present condition must match; an absent one matches anything. */
|
|
11
18
|
export interface AccessPolicyConditions {
|
|
@@ -28,6 +35,21 @@ export interface AccessPolicyConditions {
|
|
|
28
35
|
end: string;
|
|
29
36
|
timezone?: string;
|
|
30
37
|
};
|
|
38
|
+
devicePlatforms?: string[];
|
|
39
|
+
osVersion?: {
|
|
40
|
+
min?: string;
|
|
41
|
+
max?: string;
|
|
42
|
+
};
|
|
43
|
+
clientTypes?: AccessClientType[];
|
|
44
|
+
userAttributes?: Array<{
|
|
45
|
+
key: string;
|
|
46
|
+
op: 'eq' | 'neq' | 'in' | 'not_in' | 'contains' | 'exists';
|
|
47
|
+
value?: unknown;
|
|
48
|
+
}>;
|
|
49
|
+
userRiskLevels?: Array<'low' | 'medium' | 'high'>;
|
|
50
|
+
signInRiskLevels?: Array<'low' | 'medium' | 'high'>;
|
|
51
|
+
/** Machine identity or agent ids (targets machine / agent). */
|
|
52
|
+
principalIds?: string[];
|
|
31
53
|
}
|
|
32
54
|
/** A conditional-access policy, evaluated at sign-in, /authorize and token issuance. */
|
|
33
55
|
export interface AccessPolicy {
|
|
@@ -40,6 +62,9 @@ export interface AccessPolicy {
|
|
|
40
62
|
stages: AccessPolicyStage[];
|
|
41
63
|
conditions: AccessPolicyConditions;
|
|
42
64
|
grants: AccessPolicyGrant[];
|
|
65
|
+
/** `report_only` never denies; it records `access_policy.would_block`. */
|
|
66
|
+
mode: AccessPolicyMode;
|
|
67
|
+
targets: AccessPolicyTarget[];
|
|
43
68
|
created_at: number;
|
|
44
69
|
updated_at: number;
|
|
45
70
|
}
|
|
@@ -51,6 +76,8 @@ export interface CreateAccessPolicyBody {
|
|
|
51
76
|
stages?: AccessPolicyStage[];
|
|
52
77
|
conditions?: AccessPolicyConditions;
|
|
53
78
|
grants: AccessPolicyGrant[];
|
|
79
|
+
mode?: AccessPolicyMode;
|
|
80
|
+
targets?: AccessPolicyTarget[];
|
|
54
81
|
}
|
|
55
82
|
export type UpdateAccessPolicyBody = Partial<CreateAccessPolicyBody>;
|
|
56
83
|
export interface SimulateAccessBody {
|
|
@@ -70,6 +97,42 @@ export interface SimulateAccessBody {
|
|
|
70
97
|
acr?: string[];
|
|
71
98
|
/** Epoch ms; default now. */
|
|
72
99
|
now?: number;
|
|
100
|
+
target_type?: AccessPolicyTarget;
|
|
101
|
+
principal_id?: string;
|
|
102
|
+
device_platform?: string;
|
|
103
|
+
os_version?: string;
|
|
104
|
+
client_type?: AccessClientType;
|
|
105
|
+
user_attributes?: Record<string, unknown>;
|
|
106
|
+
user_risk_level?: 'low' | 'medium' | 'high';
|
|
107
|
+
last_auth_age_seconds?: number;
|
|
108
|
+
session_age_seconds?: number;
|
|
109
|
+
device_bound_session?: boolean;
|
|
110
|
+
}
|
|
111
|
+
export interface AccessPolicyImpact {
|
|
112
|
+
object: 'access_policy_impact';
|
|
113
|
+
days: number;
|
|
114
|
+
evaluated: number;
|
|
115
|
+
would_allow: number;
|
|
116
|
+
would_step_up: number;
|
|
117
|
+
would_block: number;
|
|
118
|
+
distinct_users: number;
|
|
119
|
+
affected_users: number;
|
|
120
|
+
samples: Array<{
|
|
121
|
+
user_id: string | null;
|
|
122
|
+
stage: string;
|
|
123
|
+
outcome: string;
|
|
124
|
+
unmet: string[];
|
|
125
|
+
at: number;
|
|
126
|
+
}>;
|
|
127
|
+
}
|
|
128
|
+
export interface AccessPolicyInsights {
|
|
129
|
+
object: 'access_policy_insights';
|
|
130
|
+
days: number;
|
|
131
|
+
evaluated: number;
|
|
132
|
+
would_block: number;
|
|
133
|
+
would_step_up: number;
|
|
134
|
+
by_policy: Record<string, number>;
|
|
135
|
+
by_day: Record<string, number>;
|
|
73
136
|
}
|
|
74
137
|
export interface AccessPolicySimulation {
|
|
75
138
|
object: 'access_policy_simulation';
|
|
@@ -81,8 +144,18 @@ export interface AccessPolicySimulation {
|
|
|
81
144
|
acr: string[];
|
|
82
145
|
policy_acceptance: string[];
|
|
83
146
|
actions: string[];
|
|
147
|
+
auth_strength: 'mfa' | 'passwordless' | 'phishing_resistant' | null;
|
|
148
|
+
sign_in_frequency_seconds: number | null;
|
|
149
|
+
max_session_age_seconds: number | null;
|
|
150
|
+
persistent_session: boolean;
|
|
151
|
+
device_bound_session: boolean;
|
|
84
152
|
};
|
|
85
153
|
unmet: string[];
|
|
154
|
+
report_only: {
|
|
155
|
+
decision: 'allow' | 'block' | 'step_up';
|
|
156
|
+
matched: string[];
|
|
157
|
+
blocked_by: string | null;
|
|
158
|
+
} | null;
|
|
86
159
|
}
|
|
87
160
|
/** CRUD over conditional-access policies, plus a what-if `simulate`. */
|
|
88
161
|
export declare function accessPoliciesResource(request: RequestFn): {
|
|
@@ -95,6 +168,15 @@ export declare function accessPoliciesResource(request: RequestFn): {
|
|
|
95
168
|
id: string;
|
|
96
169
|
deleted: true;
|
|
97
170
|
}>;
|
|
171
|
+
/** Replay a draft policy against recent sampled sign-ins: how many would be allowed, stepped up or blocked. */
|
|
172
|
+
impact(body: {
|
|
173
|
+
draft: CreateAccessPolicyBody | Record<string, unknown>;
|
|
174
|
+
days?: number;
|
|
175
|
+
}): Promise<AccessPolicyImpact>;
|
|
176
|
+
/** How often report-only policies would have intervened. */
|
|
177
|
+
insights(query?: {
|
|
178
|
+
days?: number;
|
|
179
|
+
}): Promise<AccessPolicyInsights>;
|
|
98
180
|
/** What would the policies decide for this request? */
|
|
99
181
|
simulate(body: SimulateAccessBody): Promise<AccessPolicySimulation>;
|
|
100
182
|
};
|
|
@@ -20,6 +20,14 @@ function accessPoliciesResource(request) {
|
|
|
20
20
|
delete(id) {
|
|
21
21
|
return request({ method: 'DELETE', path: `/v1/access_policies/${(0, request_1.enc)(id)}` });
|
|
22
22
|
},
|
|
23
|
+
/** Replay a draft policy against recent sampled sign-ins: how many would be allowed, stepped up or blocked. */
|
|
24
|
+
impact(body) {
|
|
25
|
+
return request({ method: 'POST', path: '/v1/access_policies/impact', body });
|
|
26
|
+
},
|
|
27
|
+
/** How often report-only policies would have intervened. */
|
|
28
|
+
insights(query = {}) {
|
|
29
|
+
return request({ method: 'GET', path: `/v1/access_policies/insights${query.days ? `?days=${query.days}` : ''}` });
|
|
30
|
+
},
|
|
23
31
|
/** What would the policies decide for this request? */
|
|
24
32
|
simulate(body) {
|
|
25
33
|
return request({ method: 'POST', path: '/v1/access_policies/simulate', body });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-policies.js","sourceRoot":"","sources":["../../src/client/access-policies.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"access-policies.js","sourceRoot":"","sources":["../../src/client/access-policies.ts"],"names":[],"mappings":";;AA8JA,wDA8BC;AA5LD,uCAAgD;AA6JhD,wEAAwE;AACxE,SAAgB,sBAAsB,CAAC,OAAkB;IACvD,OAAO;QACL,IAAI;YACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC,CAAC;QACjE,CAAC;QACD,GAAG,CAAC,EAAU;YACZ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,uBAAuB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5E,CAAC;QACD,MAAM,CAAC,IAA4B,EAAE,cAAuB;YAC1D,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;QACxF,CAAC;QACD,MAAM,CAAC,EAAU,EAAE,IAA4B;YAC7C,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,uBAAuB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QACpF,CAAC;QACD,MAAM,CAAC,EAAU;YACf,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,uBAAuB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC/E,CAAC;QACD,+GAA+G;QAC/G,MAAM,CAAC,IAAgF;YACrF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,4BAA4B,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/E,CAAC;QACD,4DAA4D;QAC5D,QAAQ,CAAC,QAA2B,EAAE;YACpC,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,+BAA+B,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACpH,CAAC;QACD,uDAAuD;QACvD,QAAQ,CAAC,IAAwB;YAC/B,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,8BAA8B,EAAE,IAAI,EAAE,CAAC,CAAC;QACjF,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/client/actions.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type RequestFn } from './request';
|
|
2
2
|
import type { ListPage } from './types';
|
|
3
3
|
/** The fixed point in the auth pipeline an action runs at. */
|
|
4
|
-
export type ActionTrigger = 'post_login' | 'pre_user_registration' | 'post_user_registration' | 'pre_organization_create' | 'pre_member_add' | 'pre_invitation_create' | 'pre_authentication' | 'pre_token' | 'post_token_exchange' | 'pre_user_update' | 'mfa_verification_attempt' | 'password_verification_attempt' | 'account_link_decision' | 'billing_plan_selected' | 'post_change_password' | 'post_password_reset' | 'post_user_update' | 'post_email_verified' | 'post_mfa_enroll' | 'post_mfa_remove' | 'post_logout' | 'org_membership_changed' | 'custom_challenge_create' | 'custom_challenge_verify' | 'workflow_step';
|
|
4
|
+
export type ActionTrigger = 'post_login' | 'pre_user_registration' | 'post_user_registration' | 'pre_organization_create' | 'pre_member_add' | 'pre_invitation_create' | 'pre_authentication' | 'pre_token' | 'post_token_exchange' | 'custom_token_exchange' | 'pre_user_update' | 'mfa_verification_attempt' | 'password_verification_attempt' | 'account_link_decision' | 'billing_plan_selected' | 'post_change_password' | 'post_password_reset' | 'post_user_update' | 'post_email_verified' | 'post_mfa_enroll' | 'post_mfa_remove' | 'post_logout' | 'org_membership_changed' | 'custom_challenge_create' | 'custom_challenge_verify' | 'workflow_step';
|
|
5
5
|
/**
|
|
6
6
|
* Tenant code run in the hardened isolate at a trigger. Secret VALUES are
|
|
7
7
|
* write-only and never returned — a read reports only `secret_names`. Timestamps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/client/actions.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/client/actions.ts"],"names":[],"mappings":";;AA+MA,0CAyCC;AAxPD,uCAAgD;AA+MhD,SAAgB,eAAe,CAAC,OAAkB;IAChD,OAAO;QACL,IAAI;YACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,CAAC,IAAsB,EAAE,cAAuB;YACpD,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;QAChF,CAAC;QACD,GAAG,CAAC,EAAU;YACZ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACpE,CAAC;QACD,MAAM,CAAC,EAAU,EAAE,IAAsB;YACvC,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5E,CAAC;QACD,MAAM,CAAC,EAAU;YACf,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACvE,CAAC;QACD,2EAA2E;QAC3E,IAAI,CAAC,EAAU,EAAE,QAAyB,EAAE;YAC1C,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,IAAA,aAAG,EAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QAC3F,CAAC;QACD,0EAA0E;QAC1E,KAAK,CACH,EAAU,EACV,QAAqJ,EAAE;YAEvJ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,IAAA,aAAG,EAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;QACjF,CAAC;QACD,oDAAoD;QACpD,WAAW,CAAC,OAAsB;YAChC,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,wBAAwB,IAAA,aAAG,EAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAClF,CAAC;QACD,+CAA+C;QAC/C,WAAW,CAAC,OAAsB,EAAE,SAAmB;YACrD,OAAO,OAAO,CAAC;gBACb,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,wBAAwB,IAAA,aAAG,EAAC,OAAO,CAAC,EAAE;gBAC5C,IAAI,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;aAChC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { type RequestFn } from './request';
|
|
2
|
+
import type { ListPage } from './types';
|
|
3
|
+
/** An action over a connection: a typed provider operation. */
|
|
4
|
+
export interface ConnectionAction {
|
|
5
|
+
object: 'connection_action';
|
|
6
|
+
provider: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
input_schema: Record<string, unknown>;
|
|
10
|
+
method: string;
|
|
11
|
+
mutating: boolean;
|
|
12
|
+
scopes: string[];
|
|
13
|
+
source: 'first_party' | 'custom';
|
|
14
|
+
}
|
|
15
|
+
export interface ConnectionActionResult {
|
|
16
|
+
object: 'connection_action_result';
|
|
17
|
+
action: string;
|
|
18
|
+
connection_id: string;
|
|
19
|
+
ok: boolean;
|
|
20
|
+
status: number | null;
|
|
21
|
+
data: unknown;
|
|
22
|
+
error: string | null;
|
|
23
|
+
truncated: boolean;
|
|
24
|
+
attempts: number;
|
|
25
|
+
dry_run?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
/** A custom action definition: data only (input schema, request template, response mapping). */
|
|
28
|
+
export interface ConnectionActionDefinition {
|
|
29
|
+
description: string;
|
|
30
|
+
input?: Record<string, unknown>;
|
|
31
|
+
request: {
|
|
32
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
33
|
+
base_url: string;
|
|
34
|
+
path: string;
|
|
35
|
+
query?: Record<string, string>;
|
|
36
|
+
body?: unknown;
|
|
37
|
+
headers?: Record<string, string>;
|
|
38
|
+
};
|
|
39
|
+
response?: {
|
|
40
|
+
path?: string;
|
|
41
|
+
ok_field?: string;
|
|
42
|
+
error_field?: string;
|
|
43
|
+
};
|
|
44
|
+
scopes?: string[];
|
|
45
|
+
paginate?: Record<string, unknown>;
|
|
46
|
+
mutating?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface ConnectionTrigger {
|
|
49
|
+
object: 'connection_trigger';
|
|
50
|
+
id: string;
|
|
51
|
+
connection_id: string;
|
|
52
|
+
event: string;
|
|
53
|
+
mode: 'webhook' | 'poll';
|
|
54
|
+
filter: Record<string, string>;
|
|
55
|
+
target_url: string | null;
|
|
56
|
+
status: 'active' | 'paused' | 'failed';
|
|
57
|
+
provider_registered: boolean;
|
|
58
|
+
ingress_url: string | null;
|
|
59
|
+
poll: Record<string, unknown> | null;
|
|
60
|
+
next_poll_at: number | null;
|
|
61
|
+
last_error: string | null;
|
|
62
|
+
last_fired_at: number | null;
|
|
63
|
+
fired_count: number;
|
|
64
|
+
/** Shown once on creation of a webhook trigger. */
|
|
65
|
+
forward_secret?: string;
|
|
66
|
+
created_at: number;
|
|
67
|
+
}
|
|
68
|
+
export interface CreateConnectionTriggerBody {
|
|
69
|
+
event: string;
|
|
70
|
+
mode?: 'webhook' | 'poll';
|
|
71
|
+
filter?: Record<string, string>;
|
|
72
|
+
target_url?: string;
|
|
73
|
+
scheme?: string;
|
|
74
|
+
signing_secret?: string;
|
|
75
|
+
options?: Record<string, string>;
|
|
76
|
+
poll?: {
|
|
77
|
+
action: string;
|
|
78
|
+
input?: Record<string, unknown>;
|
|
79
|
+
items_path?: string;
|
|
80
|
+
id_field: string;
|
|
81
|
+
interval_seconds?: number;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/** Typed actions over connections, provider event triggers, scoped relay tokens and usage records. */
|
|
85
|
+
export declare function connectionActionsResource(request: RequestFn): {
|
|
86
|
+
catalog: {
|
|
87
|
+
list(query?: {
|
|
88
|
+
provider?: string;
|
|
89
|
+
}): Promise<ListPage<ConnectionAction>>;
|
|
90
|
+
get(provider: string, name: string): Promise<ConnectionAction>;
|
|
91
|
+
/** Define or replace a custom action (data, never code). */
|
|
92
|
+
define(provider: string, name: string, body: ConnectionActionDefinition): Promise<ConnectionAction>;
|
|
93
|
+
delete(provider: string, name: string): Promise<void>;
|
|
94
|
+
};
|
|
95
|
+
/** The actions available on one connection. */
|
|
96
|
+
list(connectionId: string): Promise<ListPage<ConnectionAction>>;
|
|
97
|
+
run(connectionId: string, name: string, body?: {
|
|
98
|
+
input?: Record<string, unknown>;
|
|
99
|
+
dry_run?: boolean;
|
|
100
|
+
all_pages?: boolean;
|
|
101
|
+
redirect_url?: string;
|
|
102
|
+
connect_user_id?: string;
|
|
103
|
+
}): Promise<ConnectionActionResult>;
|
|
104
|
+
triggers: {
|
|
105
|
+
list(connectionId: string): Promise<ListPage<ConnectionTrigger>>;
|
|
106
|
+
create(connectionId: string, body: CreateConnectionTriggerBody): Promise<ConnectionTrigger>;
|
|
107
|
+
get(connectionId: string, triggerId: string): Promise<ConnectionTrigger>;
|
|
108
|
+
setStatus(connectionId: string, triggerId: string, status: "active" | "paused"): Promise<ConnectionTrigger>;
|
|
109
|
+
delete(connectionId: string, triggerId: string): Promise<{
|
|
110
|
+
object: "connection_trigger";
|
|
111
|
+
id: string;
|
|
112
|
+
deleted: true;
|
|
113
|
+
provider_unregistered: boolean | null;
|
|
114
|
+
}>;
|
|
115
|
+
};
|
|
116
|
+
/** A signed credential for one connection that only works through the relay, for listed methods and URL prefixes. */
|
|
117
|
+
mintScopedToken(connectionId: string, body: {
|
|
118
|
+
url_prefixes: string[];
|
|
119
|
+
methods?: string[];
|
|
120
|
+
ttl_seconds?: number;
|
|
121
|
+
}): Promise<{
|
|
122
|
+
object: "connection_scoped_token";
|
|
123
|
+
connection_id: string;
|
|
124
|
+
token: string;
|
|
125
|
+
expires_at: number;
|
|
126
|
+
methods: string[];
|
|
127
|
+
url_prefixes: string[];
|
|
128
|
+
}>;
|
|
129
|
+
/** Calls through connections, agent connection use and gateway calls, counted from the audit trail. */
|
|
130
|
+
usage(query?: {
|
|
131
|
+
from?: string | number;
|
|
132
|
+
to?: string | number;
|
|
133
|
+
group_by?: "action" | "day" | "agent" | "connection";
|
|
134
|
+
}): Promise<{
|
|
135
|
+
object: "list";
|
|
136
|
+
from: number;
|
|
137
|
+
to: number;
|
|
138
|
+
group_by: string;
|
|
139
|
+
data: Array<{
|
|
140
|
+
object: "connection_usage";
|
|
141
|
+
key: string | null;
|
|
142
|
+
calls: number;
|
|
143
|
+
}>;
|
|
144
|
+
}>;
|
|
145
|
+
};
|
|
146
|
+
export interface AgentLifecycle {
|
|
147
|
+
object: 'agent_lifecycle';
|
|
148
|
+
agent_id: string;
|
|
149
|
+
sponsor_user_id: string | null;
|
|
150
|
+
backup_sponsor_user_id: string | null;
|
|
151
|
+
expires_at: number | null;
|
|
152
|
+
renewed_at: number | null;
|
|
153
|
+
renewal_count: number;
|
|
154
|
+
}
|
|
155
|
+
export interface AgentAccessReview {
|
|
156
|
+
object: 'agent_access_review';
|
|
157
|
+
id: string;
|
|
158
|
+
name: string;
|
|
159
|
+
status: 'open' | 'closed';
|
|
160
|
+
due_at: number | null;
|
|
161
|
+
created_at: number;
|
|
162
|
+
closed_at: number | null;
|
|
163
|
+
item_count?: number;
|
|
164
|
+
}
|
|
165
|
+
export interface AgentAccessReviewItem {
|
|
166
|
+
object: 'agent_access_review_item';
|
|
167
|
+
id: string;
|
|
168
|
+
review_id: string;
|
|
169
|
+
agent_id: string;
|
|
170
|
+
kind: string;
|
|
171
|
+
resource: string;
|
|
172
|
+
reviewer_user_id: string | null;
|
|
173
|
+
decision: 'pending' | 'certified' | 'revoked';
|
|
174
|
+
decided_by: string | null;
|
|
175
|
+
decided_at: number | null;
|
|
176
|
+
comment: string | null;
|
|
177
|
+
revoked_applied: boolean;
|
|
178
|
+
}
|
|
179
|
+
/** Agent governance: sponsors, expiry and renewal, the activity log, and access reviews of agents' grants. */
|
|
180
|
+
export declare function agentGovernanceResource(request: RequestFn): {
|
|
181
|
+
lifecycle: {
|
|
182
|
+
get(agentId: string): Promise<AgentLifecycle>;
|
|
183
|
+
set(agentId: string, body: {
|
|
184
|
+
sponsor_user_id?: string | null;
|
|
185
|
+
backup_sponsor_user_id?: string | null;
|
|
186
|
+
expires_at?: number | string | null;
|
|
187
|
+
}): Promise<AgentLifecycle>;
|
|
188
|
+
renew(agentId: string, extendDays: number): Promise<AgentLifecycle>;
|
|
189
|
+
};
|
|
190
|
+
activity(agentId: string, query?: {
|
|
191
|
+
since?: string | number;
|
|
192
|
+
before?: string | number;
|
|
193
|
+
limit?: number;
|
|
194
|
+
}): Promise<ListPage<{
|
|
195
|
+
object: "agent_activity";
|
|
196
|
+
id: string;
|
|
197
|
+
action: string;
|
|
198
|
+
target_type: string | null;
|
|
199
|
+
target_id: string | null;
|
|
200
|
+
metadata: Record<string, unknown>;
|
|
201
|
+
at: number;
|
|
202
|
+
}>>;
|
|
203
|
+
reviews: {
|
|
204
|
+
list(): Promise<ListPage<AgentAccessReview>>;
|
|
205
|
+
start(body: {
|
|
206
|
+
name: string;
|
|
207
|
+
due_at?: number | string | null;
|
|
208
|
+
tier?: "trusted" | "untrusted";
|
|
209
|
+
kind?: "tool" | "connection";
|
|
210
|
+
}): Promise<AgentAccessReview>;
|
|
211
|
+
get(id: string, query?: {
|
|
212
|
+
decision?: "pending" | "certified" | "revoked";
|
|
213
|
+
reviewer_user_id?: string;
|
|
214
|
+
}): Promise<AgentAccessReview & {
|
|
215
|
+
items: AgentAccessReviewItem[];
|
|
216
|
+
}>;
|
|
217
|
+
decide(id: string, itemId: string, body: {
|
|
218
|
+
decision: "certified" | "revoked";
|
|
219
|
+
comment?: string;
|
|
220
|
+
decided_by?: string;
|
|
221
|
+
}): Promise<AgentAccessReviewItem>;
|
|
222
|
+
close(id: string): Promise<AgentAccessReview>;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
export interface McpRegistryEntry {
|
|
226
|
+
object: 'mcp_registry_entry';
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
url: string;
|
|
230
|
+
description: string | null;
|
|
231
|
+
status: 'pending' | 'approved' | 'rejected';
|
|
232
|
+
requested_by: string | null;
|
|
233
|
+
decided_by: string | null;
|
|
234
|
+
decided_at: number | null;
|
|
235
|
+
created_at: number;
|
|
236
|
+
}
|
|
237
|
+
/** The registry of approved upstream MCP servers, and write elevations for the admin MCP server. */
|
|
238
|
+
export declare function mcpRegistryResource(request: RequestFn): {
|
|
239
|
+
list(query?: {
|
|
240
|
+
status?: "pending" | "approved" | "rejected";
|
|
241
|
+
}): Promise<ListPage<McpRegistryEntry>>;
|
|
242
|
+
add(body: {
|
|
243
|
+
name: string;
|
|
244
|
+
url: string;
|
|
245
|
+
description?: string;
|
|
246
|
+
status?: "approved" | "pending";
|
|
247
|
+
}): Promise<McpRegistryEntry>;
|
|
248
|
+
decide(id: string, status: "approved" | "rejected"): Promise<McpRegistryEntry>;
|
|
249
|
+
remove(id: string): Promise<{
|
|
250
|
+
object: "mcp_registry_entry";
|
|
251
|
+
id: string;
|
|
252
|
+
deleted: true;
|
|
253
|
+
}>;
|
|
254
|
+
/** Grant another API key a short write elevation over the admin MCP server. */
|
|
255
|
+
elevate(body: {
|
|
256
|
+
api_key_id: string;
|
|
257
|
+
ttl_seconds?: number;
|
|
258
|
+
reason?: string;
|
|
259
|
+
}): Promise<{
|
|
260
|
+
object: "mcp_elevation";
|
|
261
|
+
api_key_id: string;
|
|
262
|
+
token: string;
|
|
263
|
+
expires_at: number;
|
|
264
|
+
header: string;
|
|
265
|
+
}>;
|
|
266
|
+
};
|
|
267
|
+
export interface TelemetryExport {
|
|
268
|
+
object: 'telemetry_export';
|
|
269
|
+
enabled: boolean;
|
|
270
|
+
endpoint: string | null;
|
|
271
|
+
/** Headers are write-only. */
|
|
272
|
+
has_headers: boolean;
|
|
273
|
+
service_name: string;
|
|
274
|
+
traces: boolean;
|
|
275
|
+
metrics: boolean;
|
|
276
|
+
}
|
|
277
|
+
/** OTLP/HTTP export of gateway and relay calls (spans and metrics) to your collector. */
|
|
278
|
+
export declare function telemetryExportResource(request: RequestFn): {
|
|
279
|
+
get(): Promise<TelemetryExport>;
|
|
280
|
+
update(body: {
|
|
281
|
+
enabled?: boolean;
|
|
282
|
+
endpoint?: string;
|
|
283
|
+
headers?: Record<string, string> | null;
|
|
284
|
+
service_name?: string;
|
|
285
|
+
traces?: boolean;
|
|
286
|
+
metrics?: boolean;
|
|
287
|
+
}): Promise<TelemetryExport>;
|
|
288
|
+
/** Send one test span now. */
|
|
289
|
+
test(): Promise<{
|
|
290
|
+
object: "telemetry_export_test";
|
|
291
|
+
ok: boolean;
|
|
292
|
+
error: string | null;
|
|
293
|
+
}>;
|
|
294
|
+
};
|