@atlasauth/backend 0.18.0 → 0.19.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 +32 -0
- package/dist/backchannel-handlers.d.ts +87 -0
- package/dist/backchannel-handlers.js +137 -0
- package/dist/backchannel-handlers.js.map +1 -0
- package/dist/client/activity.d.ts +13 -2
- package/dist/client/activity.js.map +1 -1
- package/dist/client/audit-logs.d.ts +7 -0
- package/dist/client/audit-logs.js.map +1 -1
- package/dist/client/compliance.d.ts +216 -0
- package/dist/client/compliance.js +77 -0
- package/dist/client/compliance.js.map +1 -0
- package/dist/client/credentials.d.ts +409 -0
- package/dist/client/credentials.js +158 -0
- package/dist/client/credentials.js.map +1 -0
- package/dist/client/data-subject-requests.d.ts +36 -1
- package/dist/client/data-subject-requests.js.map +1 -1
- package/dist/client/design.d.ts +48 -0
- package/dist/client/design.js +9 -0
- package/dist/client/design.js.map +1 -1
- package/dist/client/entitlement-overrides.d.ts +30 -0
- package/dist/client/entitlement-overrides.js +9 -0
- package/dist/client/entitlement-overrides.js.map +1 -1
- package/dist/client/env.d.ts +16 -0
- package/dist/client/env.js +38 -0
- package/dist/client/env.js.map +1 -0
- package/dist/client/error.d.ts +10 -0
- package/dist/client/error.js +4 -0
- package/dist/client/error.js.map +1 -1
- package/dist/client/index.d.ts +312 -7
- package/dist/client/index.js +39 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/instance.d.ts +401 -3
- package/dist/client/instance.js +77 -3
- package/dist/client/instance.js.map +1 -1
- package/dist/client/integrations.d.ts +107 -0
- package/dist/client/integrations.js +25 -0
- package/dist/client/integrations.js.map +1 -0
- package/dist/client/messaging.d.ts +18 -4
- package/dist/client/messaging.js +6 -2
- package/dist/client/messaging.js.map +1 -1
- package/dist/client/oauth-clients.d.ts +11 -3
- package/dist/client/oauth-clients.js +4 -2
- package/dist/client/oauth-clients.js.map +1 -1
- package/dist/client/operator.d.ts +100 -0
- package/dist/client/operator.js +132 -0
- package/dist/client/operator.js.map +1 -0
- package/dist/client/platform.d.ts +233 -9
- package/dist/client/platform.js +74 -6
- package/dist/client/platform.js.map +1 -1
- package/dist/client/privacy.d.ts +127 -0
- package/dist/client/privacy.js +44 -0
- package/dist/client/privacy.js.map +1 -0
- package/dist/client/referrals.d.ts +53 -6
- package/dist/client/referrals.js +9 -0
- package/dist/client/referrals.js.map +1 -1
- package/dist/client/request.d.ts +38 -1
- package/dist/client/request.js +6 -2
- package/dist/client/request.js.map +1 -1
- package/dist/client/sealed-box.d.ts +7 -0
- package/dist/client/sealed-box.js +62 -0
- package/dist/client/sealed-box.js.map +1 -0
- package/dist/client/sessions.d.ts +16 -5
- package/dist/client/sessions.js +7 -10
- package/dist/client/sessions.js.map +1 -1
- package/dist/client/status.d.ts +200 -0
- package/dist/client/status.js +54 -0
- package/dist/client/status.js.map +1 -0
- package/dist/client/webhooks.d.ts +244 -11
- package/dist/client/webhooks.js +52 -3
- package/dist/client/webhooks.js.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.js +19 -4
- package/dist/index.js.map +1 -1
- package/dist/oidc.d.ts +65 -1
- package/dist/oidc.js +46 -0
- package/dist/oidc.js.map +1 -1
- package/dist/referral-test-calls.d.ts +26 -13
- package/dist/referral-test-calls.js +40 -14
- package/dist/referral-test-calls.js.map +1 -1
- package/dist/testing.d.ts +41 -6
- package/dist/testing.js +34 -2
- package/dist/testing.js.map +1 -1
- package/dist/webhooks.d.ts +8 -0
- package/dist/webhooks.js +13 -4
- package/dist/webhooks.js.map +1 -1
- package/package.json +6 -3
|
@@ -67,6 +67,77 @@ export interface PreflightFinding {
|
|
|
67
67
|
fix: string;
|
|
68
68
|
/** Ids of what the finding is about (provider, client_id, domain, …). */
|
|
69
69
|
subject?: Record<string, string>;
|
|
70
|
+
/** `security_posture` on the findings about settings weaker than the defaults new instances get. */
|
|
71
|
+
group?: 'security_posture';
|
|
72
|
+
/** Only with `include_suppressed: true`: the finding does not apply to how the instance integrates. */
|
|
73
|
+
suppressed?: true;
|
|
74
|
+
suppressed_reason?: string;
|
|
75
|
+
}
|
|
76
|
+
/** A finding that does not apply to how the instance integrates, and why. */
|
|
77
|
+
export interface PreflightSuppressedFinding {
|
|
78
|
+
code: string;
|
|
79
|
+
severity: 'error' | 'warning' | 'info';
|
|
80
|
+
subject: Record<string, string> | null;
|
|
81
|
+
reason: string;
|
|
82
|
+
}
|
|
83
|
+
/** How one allowed https origin signs in, as preflight judged it. */
|
|
84
|
+
export interface PreflightOriginIntegration {
|
|
85
|
+
origin: string;
|
|
86
|
+
integration: 'redirect' | 'embedded';
|
|
87
|
+
source: 'declared' | 'embedded_traffic' | 'redirect_clients' | 'default';
|
|
88
|
+
/** False only for the default (nothing says how the origin signs in). */
|
|
89
|
+
confident: boolean;
|
|
90
|
+
reason: string;
|
|
91
|
+
}
|
|
92
|
+
export interface PreflightParams {
|
|
93
|
+
/** Only findings at least this severe (`ok` still covers every finding). */
|
|
94
|
+
min_severity?: 'error' | 'warning' | 'info';
|
|
95
|
+
/** Also list the suppressed findings in `findings`, marked `suppressed: true`. */
|
|
96
|
+
include_suppressed?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/** One unknown body field your writes sent, aggregated over the report window. */
|
|
99
|
+
export interface UnknownFieldReportRow {
|
|
100
|
+
method: string;
|
|
101
|
+
/** The route template, e.g. `/v1/users/{id}`. */
|
|
102
|
+
path: string;
|
|
103
|
+
/** The field path, nested as `parent.child`. */
|
|
104
|
+
field: string;
|
|
105
|
+
count: number;
|
|
106
|
+
/** Lenient requests: the field was ignored and named in Atlas-Unknown-Fields. */
|
|
107
|
+
ignored_count: number;
|
|
108
|
+
/** Strict requests: refused with 422 UNKNOWN_FIELD. */
|
|
109
|
+
rejected_count: number;
|
|
110
|
+
/** Epoch ms. */
|
|
111
|
+
last_seen_at: number;
|
|
112
|
+
/** The secret key that sent it (null without a key). */
|
|
113
|
+
api_key_id: string | null;
|
|
114
|
+
}
|
|
115
|
+
export interface UnknownFieldsReport {
|
|
116
|
+
object: 'unknown_fields_report';
|
|
117
|
+
days: number;
|
|
118
|
+
retention_days: number;
|
|
119
|
+
strict_request_bodies: boolean;
|
|
120
|
+
/** True when nothing in the window would be refused by strict request bodies. */
|
|
121
|
+
safe_to_enable_strict: boolean;
|
|
122
|
+
data: UnknownFieldReportRow[];
|
|
123
|
+
}
|
|
124
|
+
/** One operation in an OpenAPI diff. */
|
|
125
|
+
export interface OpenApiDiffItem {
|
|
126
|
+
method: string;
|
|
127
|
+
path: string;
|
|
128
|
+
operation_id: string | null;
|
|
129
|
+
summary: string | null;
|
|
130
|
+
/** YYYY-MM-DD of the change. */
|
|
131
|
+
at: string;
|
|
132
|
+
}
|
|
133
|
+
export interface OpenApiDiff {
|
|
134
|
+
object: 'openapi_diff';
|
|
135
|
+
since: string;
|
|
136
|
+
/** The API build the diff was computed on (`<date>+<sha>`). */
|
|
137
|
+
version: string;
|
|
138
|
+
added: OpenApiDiffItem[];
|
|
139
|
+
deprecated: OpenApiDiffItem[];
|
|
140
|
+
removed: OpenApiDiffItem[];
|
|
70
141
|
}
|
|
71
142
|
/** An advisory published for an Atlas browser SDK version. */
|
|
72
143
|
export interface SdkAdvisory {
|
|
@@ -92,14 +163,104 @@ export interface SdkVersionSeen {
|
|
|
92
163
|
/** The advisories that apply to this version. */
|
|
93
164
|
advisories: SdkAdvisory[];
|
|
94
165
|
}
|
|
166
|
+
/** One row of the integration-health report. */
|
|
167
|
+
export interface IntegrationHealthCheck {
|
|
168
|
+
/** A preflight code verbatim, or `<source>.<check>`. */
|
|
169
|
+
id: string;
|
|
170
|
+
/** false = failing; null = not known or not configured. */
|
|
171
|
+
ok: boolean | null;
|
|
172
|
+
detail: string;
|
|
173
|
+
fix: string | null;
|
|
174
|
+
docs: string | null;
|
|
175
|
+
/** For a check that calls your server: the hop that failed. */
|
|
176
|
+
hop?: 'dns' | 'tls' | 'http' | 'challenge' | 'auth';
|
|
177
|
+
status?: number;
|
|
178
|
+
elapsedMs?: number;
|
|
179
|
+
source: string;
|
|
180
|
+
severity?: 'error' | 'warning' | 'info';
|
|
181
|
+
subject?: Record<string, string>;
|
|
182
|
+
observedAt?: number | null;
|
|
183
|
+
}
|
|
184
|
+
export interface IntegrationHealthReport {
|
|
185
|
+
object: 'integration_health';
|
|
186
|
+
ok: boolean;
|
|
187
|
+
summary: {
|
|
188
|
+
failing: number;
|
|
189
|
+
passing: number;
|
|
190
|
+
unknown: number;
|
|
191
|
+
};
|
|
192
|
+
checks: IntegrationHealthCheck[];
|
|
193
|
+
/** ISO 8601. */
|
|
194
|
+
generatedAt: string;
|
|
195
|
+
/** The same instant, epoch ms. */
|
|
196
|
+
generated_at: number;
|
|
197
|
+
}
|
|
198
|
+
/** The embed manifest (embed-v1) for one instance: CSP sources per surface, storage, SRI and the merged policy. */
|
|
199
|
+
export interface EmbedManifest {
|
|
200
|
+
schema: string;
|
|
201
|
+
product: string;
|
|
202
|
+
updated: string;
|
|
203
|
+
openapi?: string;
|
|
204
|
+
llms?: string;
|
|
205
|
+
status?: string;
|
|
206
|
+
docs?: string;
|
|
207
|
+
checkers?: {
|
|
208
|
+
userAgent: string;
|
|
209
|
+
userAgents?: string[];
|
|
210
|
+
egress: string[];
|
|
211
|
+
};
|
|
212
|
+
surfaces: Record<string, {
|
|
213
|
+
tenant?: boolean;
|
|
214
|
+
servedBy?: 'customer' | 'atlas';
|
|
215
|
+
csp?: Record<string, string[]>;
|
|
216
|
+
requires?: Record<string, string[]>;
|
|
217
|
+
trustedTypes?: string[];
|
|
218
|
+
consentCategory?: string;
|
|
219
|
+
storage?: Array<{
|
|
220
|
+
name: string;
|
|
221
|
+
type: string;
|
|
222
|
+
category: string;
|
|
223
|
+
lifetime: string;
|
|
224
|
+
purpose: {
|
|
225
|
+
en: string;
|
|
226
|
+
} & Record<string, string>;
|
|
227
|
+
}>;
|
|
228
|
+
sri?: Record<string, string>;
|
|
229
|
+
notes?: string[];
|
|
230
|
+
}>;
|
|
231
|
+
changes: Array<{
|
|
232
|
+
effective: string;
|
|
233
|
+
surface: string;
|
|
234
|
+
add: Record<string, string[]>;
|
|
235
|
+
remove: Record<string, string[]>;
|
|
236
|
+
note?: string;
|
|
237
|
+
}>;
|
|
238
|
+
tenant?: {
|
|
239
|
+
instance: string;
|
|
240
|
+
environment: string;
|
|
241
|
+
frontendApiHosts: string[];
|
|
242
|
+
shape: 'redirect' | 'panel' | 'button' | null;
|
|
243
|
+
origin: string | null;
|
|
244
|
+
originAllowed: boolean | null;
|
|
245
|
+
/** The merged sources for your pages, as one Content-Security-Policy value. */
|
|
246
|
+
policy: string;
|
|
247
|
+
sources: Record<string, string[]>;
|
|
248
|
+
};
|
|
249
|
+
}
|
|
95
250
|
export interface PreflightReport {
|
|
96
251
|
object: 'preflight';
|
|
97
252
|
/** True when there are no error-severity findings. */
|
|
98
253
|
ok: boolean;
|
|
99
254
|
/** When the check ran (epoch ms). */
|
|
100
255
|
checked_at: number;
|
|
101
|
-
/** Ordered error, then warning, then info
|
|
256
|
+
/** Ordered error, then warning, then info; only those at or above `min_severity`. */
|
|
102
257
|
findings: PreflightFinding[];
|
|
258
|
+
/** The `min_severity` the findings were filtered by (`info` = everything). */
|
|
259
|
+
min_severity?: 'error' | 'warning' | 'info';
|
|
260
|
+
/** Findings that do not apply to how the instance integrates (not counted in `ok`). */
|
|
261
|
+
suppressed?: PreflightSuppressedFinding[];
|
|
262
|
+
/** How each allowed https origin signs in. */
|
|
263
|
+
integrations?: PreflightOriginIntegration[];
|
|
103
264
|
/** Atlas browser SDK versions seen in the last 7 days (newest first), with their advisories. */
|
|
104
265
|
sdk_versions_seen?: SdkVersionSeen[];
|
|
105
266
|
}
|
|
@@ -296,21 +457,258 @@ export interface SetForumulateIntegrationBody {
|
|
|
296
457
|
/** The token `aud`. Default `forumulate:<org_id>`. */
|
|
297
458
|
audience?: string | null;
|
|
298
459
|
}
|
|
460
|
+
/** Receiver health, in the webhook health vocabulary. */
|
|
461
|
+
export interface IntegrationReceiverHealth {
|
|
462
|
+
url: string;
|
|
463
|
+
endpoint_id: string | null;
|
|
464
|
+
state: 'healthy' | 'failing' | 'disabled' | 'unknown';
|
|
465
|
+
failing_since: number | null;
|
|
466
|
+
disabled_at: number | null;
|
|
467
|
+
last_success_at: number | null;
|
|
468
|
+
last_failure: {
|
|
469
|
+
at: number;
|
|
470
|
+
status: number | null;
|
|
471
|
+
error: string | null;
|
|
472
|
+
} | null;
|
|
473
|
+
consecutive_failures: number;
|
|
474
|
+
success_rate_24h: number | null;
|
|
475
|
+
events?: string[];
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* An identity integration: any service that verifies a user with a JWT — a
|
|
479
|
+
* preset (`chatly`, `forumulate`, `cookiemunch`, `referalli`) or a custom one.
|
|
480
|
+
* `enabled: false, connected: false` when it was never connected.
|
|
481
|
+
*/
|
|
482
|
+
export interface Integration {
|
|
483
|
+
object: string;
|
|
484
|
+
id: string;
|
|
485
|
+
/** The same value as `id`. */
|
|
486
|
+
product: string;
|
|
487
|
+
preset: 'chatly' | 'forumulate' | 'cookiemunch' | 'referalli' | null;
|
|
488
|
+
name?: string;
|
|
489
|
+
role?: 'support_chat' | 'docs_community' | 'consent' | 'referrals' | 'other';
|
|
490
|
+
enabled: boolean;
|
|
491
|
+
connected: boolean;
|
|
492
|
+
audience?: string;
|
|
493
|
+
audience_format?: string | null;
|
|
494
|
+
principal_claim?: 'audience_hint' | null;
|
|
495
|
+
ext_claim?: 'external_id' | null;
|
|
496
|
+
ttl_seconds?: number;
|
|
497
|
+
issuer?: string;
|
|
498
|
+
jwks_url?: string;
|
|
499
|
+
token_schema?: string;
|
|
500
|
+
events_url?: string | null;
|
|
501
|
+
events_url_default?: boolean;
|
|
502
|
+
events?: string[];
|
|
503
|
+
backchannel_logout_url?: string | null;
|
|
504
|
+
backchannel_logout_url_default?: boolean;
|
|
505
|
+
/** Where the receiver comes from: set here, the first-party OAuth client's backchannel_logout_uri, or the preset's path. */
|
|
506
|
+
backchannel_logout_source?: 'integration' | 'oauth_client' | 'preset' | null;
|
|
507
|
+
/** With source `oauth_client`: that client's client_id (also the `aud` of its logout tokens). */
|
|
508
|
+
backchannel_logout_client_id?: string | null;
|
|
509
|
+
/** The first-party OAuth client the service signs users in with, as set (null = not set). */
|
|
510
|
+
oauth_client_id?: string | null;
|
|
511
|
+
verify_error_report_url?: string | null;
|
|
512
|
+
cmp?: {
|
|
513
|
+
script_url: string;
|
|
514
|
+
script_id: string | null;
|
|
515
|
+
site_id: string | null;
|
|
516
|
+
blocking_mode: string | null;
|
|
517
|
+
extra_origins: string[];
|
|
518
|
+
settings_preset: 'cookiemunch' | 'cookiebot' | 'onetrust' | 'custom' | null;
|
|
519
|
+
} | null;
|
|
520
|
+
atlas_id_users?: boolean;
|
|
521
|
+
atlas_id_issuer?: {
|
|
522
|
+
issuer: string;
|
|
523
|
+
jwks_url: string;
|
|
524
|
+
} | null;
|
|
525
|
+
enabled_at?: number | null;
|
|
526
|
+
updated_at?: number | null;
|
|
527
|
+
/** Present on a `?dry_run=true` answer. */
|
|
528
|
+
dry_run?: boolean;
|
|
529
|
+
health?: {
|
|
530
|
+
last_minted_at: number | null;
|
|
531
|
+
mints_24h: number;
|
|
532
|
+
verify_errors_24h: number;
|
|
533
|
+
last_verify_error: {
|
|
534
|
+
error: string;
|
|
535
|
+
audience: string | null;
|
|
536
|
+
at: number;
|
|
537
|
+
reported_at: number;
|
|
538
|
+
} | null;
|
|
539
|
+
events: IntegrationReceiverHealth | null;
|
|
540
|
+
backchannel_logout: IntegrationReceiverHealth | null;
|
|
541
|
+
};
|
|
542
|
+
/** Preset fields (chatly: channel/template/identity_verification; forumulate: org_id/spaces/reader_auth_provider; cookiemunch: site_id; referalli: org_id). */
|
|
543
|
+
[presetField: string]: unknown;
|
|
544
|
+
}
|
|
545
|
+
export interface SetIntegrationBody {
|
|
546
|
+
enabled?: boolean;
|
|
547
|
+
/** `<preset>:<id>` for a preset; any value for a custom integration. */
|
|
548
|
+
audience?: string;
|
|
549
|
+
/** Custom integrations: the display name (required), role and audience format. */
|
|
550
|
+
name?: string;
|
|
551
|
+
role?: 'support_chat' | 'docs_community' | 'consent' | 'referrals' | 'other';
|
|
552
|
+
audience_format?: string | null;
|
|
553
|
+
principal_claim?: 'audience_hint' | null;
|
|
554
|
+
ext_claim?: 'external_id' | null;
|
|
555
|
+
/** 10-120. Default 120. */
|
|
556
|
+
ttl_seconds?: number;
|
|
557
|
+
/** Omitted = the preset default; null = none. */
|
|
558
|
+
events_url?: string | null;
|
|
559
|
+
/**
|
|
560
|
+
* Omitted = the backchannel_logout_uri of the service's first-party OAuth
|
|
561
|
+
* client when it has one, else the preset default; null = none.
|
|
562
|
+
*/
|
|
563
|
+
backchannel_logout_url?: string | null;
|
|
564
|
+
verify_error_report_url?: string | null;
|
|
565
|
+
/**
|
|
566
|
+
* The client_id of the first-party OAuth client the service signs users in
|
|
567
|
+
* with. Omitted = the first-party client tagged `metadata.product = <id>`;
|
|
568
|
+
* null = none.
|
|
569
|
+
*/
|
|
570
|
+
oauth_client_id?: string | null;
|
|
571
|
+
cmp?: {
|
|
572
|
+
script_url: string;
|
|
573
|
+
script_id?: string | null;
|
|
574
|
+
site_id?: string | null;
|
|
575
|
+
blocking_mode?: string | null;
|
|
576
|
+
extra_origins?: string[];
|
|
577
|
+
settings_preset?: 'cookiemunch' | 'cookiebot' | 'onetrust' | 'custom' | null;
|
|
578
|
+
} | null;
|
|
579
|
+
atlas_id_users?: boolean;
|
|
580
|
+
/** chatly: the channel (same as `audience: 'chatly:<channel>'`). */
|
|
581
|
+
channel?: string;
|
|
582
|
+
/** forumulate: the org and spaces. */
|
|
583
|
+
org_id?: string;
|
|
584
|
+
spaces?: Array<string | {
|
|
585
|
+
id: string;
|
|
586
|
+
redeem_url?: string | null;
|
|
587
|
+
}>;
|
|
588
|
+
}
|
|
589
|
+
export interface IntegrationDelivery {
|
|
590
|
+
object: 'integration_delivery';
|
|
591
|
+
kind: 'event' | 'backchannel_logout';
|
|
592
|
+
integration: string;
|
|
593
|
+
id: string;
|
|
594
|
+
url: string;
|
|
595
|
+
event_id?: string;
|
|
596
|
+
event_type?: string | null;
|
|
597
|
+
sid?: string | null;
|
|
598
|
+
trace_id: string | null;
|
|
599
|
+
status: 'pending' | 'success' | 'failed';
|
|
600
|
+
attempt_number: number;
|
|
601
|
+
http_status: number | null;
|
|
602
|
+
error: string | null;
|
|
603
|
+
created_at: number;
|
|
604
|
+
[field: string]: unknown;
|
|
605
|
+
}
|
|
606
|
+
/** An integration token (the claims follow /schemas/integration-token-v1.json). */
|
|
607
|
+
export interface IntegrationTokenResponse {
|
|
608
|
+
object: 'integration_token';
|
|
609
|
+
integration: string;
|
|
610
|
+
product: string;
|
|
611
|
+
jwt: string;
|
|
612
|
+
expires_in: number;
|
|
613
|
+
audience: string;
|
|
614
|
+
org_id?: string;
|
|
615
|
+
space_id?: string;
|
|
616
|
+
redeem_url?: string;
|
|
617
|
+
issuer?: string;
|
|
618
|
+
jwks_uri?: string;
|
|
619
|
+
}
|
|
299
620
|
export declare function instanceResource(request: RequestFn): {
|
|
300
621
|
get(): Promise<Instance>;
|
|
301
622
|
update(body: UpdateInstanceBody): Promise<InstanceUpdateResult>;
|
|
302
623
|
/** Check your setup in one call: configuration the server can see is broken or risky. */
|
|
303
|
-
preflight(): Promise<PreflightReport>;
|
|
624
|
+
preflight(params?: PreflightParams): Promise<PreflightReport>;
|
|
625
|
+
/**
|
|
626
|
+
* The unknown body fields your writes sent over the last `days` (1-90,
|
|
627
|
+
* default 30): fix every row with an `ignored_count`, then turn
|
|
628
|
+
* `auth_config.strictRequestBodies` on.
|
|
629
|
+
*/
|
|
630
|
+
unknownFieldsReport(params?: {
|
|
631
|
+
days?: number;
|
|
632
|
+
}): Promise<UnknownFieldsReport>;
|
|
633
|
+
/** What changed in the API since a date (YYYY-MM-DD): operations added, deprecated and removed. */
|
|
634
|
+
openapiDiff(params: {
|
|
635
|
+
since: string;
|
|
636
|
+
surface?: string;
|
|
637
|
+
}): Promise<OpenApiDiff>;
|
|
304
638
|
/**
|
|
305
639
|
* Move every URL that points at one origin to another (a domain move), across
|
|
306
640
|
* the instance, its OAuth clients, webhooks, redirect URLs and Sign in with
|
|
307
641
|
* Atlas apps. `dry_run: true` writes nothing.
|
|
308
642
|
*/
|
|
309
643
|
moveOrigin(body: OriginMoveRequest): Promise<OriginMove>;
|
|
644
|
+
/**
|
|
645
|
+
* One report of everything that connects the instance to the outside world
|
|
646
|
+
* (setup checks, webhooks with the failing hop, back-channel logout,
|
|
647
|
+
* referrals, email, consent manager, SDK versions). `only` limits the
|
|
648
|
+
* sources; `probe: false` skips live reachability probes.
|
|
649
|
+
*/
|
|
650
|
+
integrationHealth(params?: {
|
|
651
|
+
only?: string[];
|
|
652
|
+
probe?: boolean;
|
|
653
|
+
}): Promise<IntegrationHealthReport>;
|
|
654
|
+
/** The integration-health check sources this deployment reports. */
|
|
655
|
+
integrationHealthProviders(): Promise<{
|
|
656
|
+
object: "list";
|
|
657
|
+
data: {
|
|
658
|
+
object: "integration_health_provider";
|
|
659
|
+
source: string;
|
|
660
|
+
description: string;
|
|
661
|
+
}[];
|
|
662
|
+
has_more: false;
|
|
663
|
+
}>;
|
|
664
|
+
/**
|
|
665
|
+
* The embed manifest for an instance (public; no key needed): CSP sources per
|
|
666
|
+
* surface with its hosts filled in, and the merged policy in `tenant.policy`.
|
|
667
|
+
*/
|
|
668
|
+
embed(params: {
|
|
669
|
+
instance: string;
|
|
670
|
+
origin?: string;
|
|
671
|
+
shape?: "redirect" | "panel" | "button";
|
|
672
|
+
}): Promise<EmbedManifest>;
|
|
310
673
|
/** The instance's links to other platforms and their health. Read-only. */
|
|
311
674
|
connections(): Promise<InstanceConnections>;
|
|
312
|
-
/**
|
|
675
|
+
/**
|
|
676
|
+
* Identity integrations: presets and custom integrations (generic), plus the
|
|
677
|
+
* earlier per-product helpers (`chatly`, `forumulate`) on the same records.
|
|
678
|
+
*/
|
|
313
679
|
integrations: {
|
|
680
|
+
/** Every integration (the presets, connected or not, and every custom one) with its health. */
|
|
681
|
+
list(): Promise<{
|
|
682
|
+
object: "list";
|
|
683
|
+
data: Integration[];
|
|
684
|
+
has_more: boolean;
|
|
685
|
+
}>;
|
|
686
|
+
get(id: string): Promise<Integration>;
|
|
687
|
+
/** Connect or replace an integration. `{ dryRun: true }` validates and saves nothing. */
|
|
688
|
+
set(id: string, body: SetIntegrationBody, opts?: {
|
|
689
|
+
dryRun?: boolean;
|
|
690
|
+
}): Promise<Integration>;
|
|
691
|
+
remove(id: string): Promise<Integration>;
|
|
692
|
+
/** Event and back-channel logout deliveries, newest first; `trace` finds one operation. */
|
|
693
|
+
deliveries(id: string, query?: {
|
|
694
|
+
limit?: number;
|
|
695
|
+
trace?: string;
|
|
696
|
+
kind?: "event" | "backchannel_logout";
|
|
697
|
+
}): Promise<{
|
|
698
|
+
object: "list";
|
|
699
|
+
data: IntegrationDelivery[];
|
|
700
|
+
has_more: boolean;
|
|
701
|
+
}>;
|
|
702
|
+
/** Reveal the event receiver's signing secret (audited). */
|
|
703
|
+
revealEventsSecret(id: string): Promise<{
|
|
704
|
+
object: "integration_events_secret";
|
|
705
|
+
integration: string;
|
|
706
|
+
endpoint_id: string;
|
|
707
|
+
url: string;
|
|
708
|
+
secret: string;
|
|
709
|
+
}>;
|
|
710
|
+
/** An integration token for a Sign in with Atlas user (their Atlas ID access token). */
|
|
711
|
+
atlasIdToken(id: string, accessToken: string): Promise<IntegrationTokenResponse>;
|
|
314
712
|
chatly: {
|
|
315
713
|
get(): Promise<ChatlyIntegration>;
|
|
316
714
|
set(body: SetChatlyIntegrationBody): Promise<ChatlyIntegration>;
|
package/dist/client/instance.js
CHANGED
|
@@ -10,8 +10,20 @@ function instanceResource(request) {
|
|
|
10
10
|
return request({ method: 'PATCH', path: '/v1/instance', body });
|
|
11
11
|
},
|
|
12
12
|
/** Check your setup in one call: configuration the server can see is broken or risky. */
|
|
13
|
-
preflight() {
|
|
14
|
-
return request({ method: 'GET', path: '/v1/instance/preflight' });
|
|
13
|
+
preflight(params = {}) {
|
|
14
|
+
return request({ method: 'GET', path: '/v1/instance/preflight', query: { ...params } });
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* The unknown body fields your writes sent over the last `days` (1-90,
|
|
18
|
+
* default 30): fix every row with an `ignored_count`, then turn
|
|
19
|
+
* `auth_config.strictRequestBodies` on.
|
|
20
|
+
*/
|
|
21
|
+
unknownFieldsReport(params = {}) {
|
|
22
|
+
return request({ method: 'GET', path: '/v1/instance/unknown_fields_report', query: { ...params } });
|
|
23
|
+
},
|
|
24
|
+
/** What changed in the API since a date (YYYY-MM-DD): operations added, deprecated and removed. */
|
|
25
|
+
openapiDiff(params) {
|
|
26
|
+
return request({ method: 'GET', path: '/v1/openapi/diff', query: { ...params } });
|
|
15
27
|
},
|
|
16
28
|
/**
|
|
17
29
|
* Move every URL that points at one origin to another (a domain move), across
|
|
@@ -21,12 +33,74 @@ function instanceResource(request) {
|
|
|
21
33
|
moveOrigin(body) {
|
|
22
34
|
return request({ method: 'POST', path: '/v1/instance/move_origin', body });
|
|
23
35
|
},
|
|
36
|
+
/**
|
|
37
|
+
* One report of everything that connects the instance to the outside world
|
|
38
|
+
* (setup checks, webhooks with the failing hop, back-channel logout,
|
|
39
|
+
* referrals, email, consent manager, SDK versions). `only` limits the
|
|
40
|
+
* sources; `probe: false` skips live reachability probes.
|
|
41
|
+
*/
|
|
42
|
+
integrationHealth(params = {}) {
|
|
43
|
+
return request({
|
|
44
|
+
method: 'GET',
|
|
45
|
+
path: '/v1/integration-health',
|
|
46
|
+
query: { only: params.only?.join(','), probe: params.probe === undefined ? undefined : String(params.probe) },
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
/** The integration-health check sources this deployment reports. */
|
|
50
|
+
integrationHealthProviders() {
|
|
51
|
+
return request({ method: 'GET', path: '/v1/integration-health/providers' });
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* The embed manifest for an instance (public; no key needed): CSP sources per
|
|
55
|
+
* surface with its hosts filled in, and the merged policy in `tenant.policy`.
|
|
56
|
+
*/
|
|
57
|
+
embed(params) {
|
|
58
|
+
return request({ method: 'GET', path: '/v1/embed', query: { ...params } });
|
|
59
|
+
},
|
|
24
60
|
/** The instance's links to other platforms and their health. Read-only. */
|
|
25
61
|
connections() {
|
|
26
62
|
return request({ method: 'GET', path: '/v1/instance/connections' });
|
|
27
63
|
},
|
|
28
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Identity integrations: presets and custom integrations (generic), plus the
|
|
66
|
+
* earlier per-product helpers (`chatly`, `forumulate`) on the same records.
|
|
67
|
+
*/
|
|
29
68
|
integrations: {
|
|
69
|
+
/** Every integration (the presets, connected or not, and every custom one) with its health. */
|
|
70
|
+
list() {
|
|
71
|
+
return request({ method: 'GET', path: '/v1/instance/integrations' });
|
|
72
|
+
},
|
|
73
|
+
get(id) {
|
|
74
|
+
return request({ method: 'GET', path: `/v1/instance/integrations/${encodeURIComponent(id)}` });
|
|
75
|
+
},
|
|
76
|
+
/** Connect or replace an integration. `{ dryRun: true }` validates and saves nothing. */
|
|
77
|
+
set(id, body, opts = {}) {
|
|
78
|
+
return request({
|
|
79
|
+
method: 'PUT',
|
|
80
|
+
path: `/v1/instance/integrations/${encodeURIComponent(id)}`,
|
|
81
|
+
body,
|
|
82
|
+
...(opts.dryRun ? { query: { dry_run: 'true' } } : {}),
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
remove(id) {
|
|
86
|
+
return request({ method: 'DELETE', path: `/v1/instance/integrations/${encodeURIComponent(id)}` });
|
|
87
|
+
},
|
|
88
|
+
/** Event and back-channel logout deliveries, newest first; `trace` finds one operation. */
|
|
89
|
+
deliveries(id, query = {}) {
|
|
90
|
+
return request({ method: 'GET', path: `/v1/instance/integrations/${encodeURIComponent(id)}/deliveries`, query });
|
|
91
|
+
},
|
|
92
|
+
/** Reveal the event receiver's signing secret (audited). */
|
|
93
|
+
revealEventsSecret(id) {
|
|
94
|
+
return request({ method: 'POST', path: `/v1/instance/integrations/${encodeURIComponent(id)}/events_secret` });
|
|
95
|
+
},
|
|
96
|
+
/** An integration token for a Sign in with Atlas user (their Atlas ID access token). */
|
|
97
|
+
atlasIdToken(id, accessToken) {
|
|
98
|
+
return request({
|
|
99
|
+
method: 'POST',
|
|
100
|
+
path: `/v1/instance/integrations/${encodeURIComponent(id)}/atlas_id_tokens`,
|
|
101
|
+
body: { access_token: accessToken },
|
|
102
|
+
});
|
|
103
|
+
},
|
|
30
104
|
chatly: {
|
|
31
105
|
get() {
|
|
32
106
|
return request({ method: 'GET', path: '/v1/instance/integrations/chatly' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance.js","sourceRoot":"","sources":["../../src/client/instance.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"instance.js","sourceRoot":"","sources":["../../src/client/instance.ts"],"names":[],"mappings":";;AAsmBA,4CA8IC;AA9ID,SAAgB,gBAAgB,CAAC,OAAkB;IACjD,OAAO;QACL,GAAG;YACD,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,MAAM,CAAC,IAAwB;YAC7B,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;QAClE,CAAC;QACD,yFAAyF;QACzF,SAAS,CAAC,SAA0B,EAAE;YACpC,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC;QAC1F,CAAC;QACD;;;;WAIG;QACH,mBAAmB,CAAC,SAA4B,EAAE;YAChD,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,oCAAoC,EAAE,K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AClC,GAAG,CAAC,IAA0B;gBAC5B,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,6BAA6B,EAAE,IAAI,EAAE,CAAC,CAAC;YAC/E,CAAC;YACD,+EAA+E;YAC/E,MAAM;gBACJ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC,CAAC;YAC5E,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { type RequestFn } from './request';
|
|
2
|
+
/**
|
|
3
|
+
* The integration-facing routes, called with the instance secret key (an
|
|
4
|
+
* integrated service calls the same routes with the partner link the instance
|
|
5
|
+
* owner granted it): report a token a service refused, read the agent-sidebar
|
|
6
|
+
* card for a user and run its actions, and read an instance's public metadata.
|
|
7
|
+
*/
|
|
8
|
+
export type IntegrationVerifyErrorCode = 'aud_mismatch' | 'expired' | 'bad_signature' | 'unknown_kid' | 'session_revoked' | 'invalid_claims' | 'other';
|
|
9
|
+
export interface ReportVerifyErrorBody {
|
|
10
|
+
/** The integration id the token was minted for (a preset or a custom id). */
|
|
11
|
+
integration: string;
|
|
12
|
+
error: IntegrationVerifyErrorCode;
|
|
13
|
+
audience?: string;
|
|
14
|
+
/** Epoch ms (or seconds) or an ISO time. Default now. */
|
|
15
|
+
at?: number | string;
|
|
16
|
+
kid?: string;
|
|
17
|
+
sid?: string;
|
|
18
|
+
detail?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IntegrationVerifyError {
|
|
21
|
+
object: 'integration_verify_error';
|
|
22
|
+
id: string;
|
|
23
|
+
integration: string;
|
|
24
|
+
audience: string | null;
|
|
25
|
+
error: IntegrationVerifyErrorCode;
|
|
26
|
+
at: number;
|
|
27
|
+
trace_id: string | null;
|
|
28
|
+
created_at: number;
|
|
29
|
+
}
|
|
30
|
+
export interface IntegrationCard {
|
|
31
|
+
object: 'integration_card';
|
|
32
|
+
integration: string;
|
|
33
|
+
user: {
|
|
34
|
+
id: string;
|
|
35
|
+
email: string | null;
|
|
36
|
+
email_verified: boolean;
|
|
37
|
+
name: string | null;
|
|
38
|
+
external_id: string | null;
|
|
39
|
+
banned: boolean;
|
|
40
|
+
mfa_enabled: boolean;
|
|
41
|
+
last_sign_in_at: number | null;
|
|
42
|
+
created_at: number;
|
|
43
|
+
organizations: Array<{
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
role: string;
|
|
47
|
+
}>;
|
|
48
|
+
};
|
|
49
|
+
sessions_active: number;
|
|
50
|
+
actions: Array<{
|
|
51
|
+
id: 'revoke_sessions';
|
|
52
|
+
label: string;
|
|
53
|
+
confirm: boolean;
|
|
54
|
+
available: boolean;
|
|
55
|
+
requires_scope: string;
|
|
56
|
+
}>;
|
|
57
|
+
}
|
|
58
|
+
export interface InstanceMetadata {
|
|
59
|
+
object: 'instance_metadata';
|
|
60
|
+
id: string;
|
|
61
|
+
issuer: string;
|
|
62
|
+
jwks_uri: string;
|
|
63
|
+
token_schema: string;
|
|
64
|
+
integrations: Record<string, {
|
|
65
|
+
audience: string;
|
|
66
|
+
preset: string | null;
|
|
67
|
+
ttl_seconds: number;
|
|
68
|
+
additional_issuers?: string[];
|
|
69
|
+
}>;
|
|
70
|
+
trusted_issuers: Array<{
|
|
71
|
+
issuer: string;
|
|
72
|
+
jwks_uri: string;
|
|
73
|
+
kind: 'instance' | 'atlas_id';
|
|
74
|
+
}>;
|
|
75
|
+
previous_issuers: Array<{
|
|
76
|
+
issuer: string;
|
|
77
|
+
jwks_uri: string;
|
|
78
|
+
replaced_at: number;
|
|
79
|
+
}>;
|
|
80
|
+
}
|
|
81
|
+
export declare function integrationsResource(request: RequestFn): {
|
|
82
|
+
/** `POST /v1/integrations/verify_errors` — record a token an integrated service refused. */
|
|
83
|
+
reportVerifyError(body: ReportVerifyErrorBody): Promise<IntegrationVerifyError>;
|
|
84
|
+
/** `GET /v1/integrations/:integration/card` — the agent-sidebar card for a user (by token sub). */
|
|
85
|
+
card(integration: string, query: {
|
|
86
|
+
sub: string;
|
|
87
|
+
iss?: string;
|
|
88
|
+
}): Promise<IntegrationCard>;
|
|
89
|
+
/** `POST /v1/integrations/:integration/card/actions/revoke_sessions` — sign the user out everywhere (audited with the agent). */
|
|
90
|
+
revokeSessions(integration: string, body: {
|
|
91
|
+
sub: string;
|
|
92
|
+
iss?: string;
|
|
93
|
+
agent?: {
|
|
94
|
+
id?: string;
|
|
95
|
+
name?: string;
|
|
96
|
+
email?: string;
|
|
97
|
+
};
|
|
98
|
+
}): Promise<{
|
|
99
|
+
object: "integration_card_action";
|
|
100
|
+
integration: string;
|
|
101
|
+
action: "revoke_sessions";
|
|
102
|
+
ok: boolean;
|
|
103
|
+
sessions_revoked: number;
|
|
104
|
+
}>;
|
|
105
|
+
/** `GET /v1/public/instances/:id` — the public metadata of an instance (no key needed). */
|
|
106
|
+
instanceMetadata(instanceId: string): Promise<InstanceMetadata>;
|
|
107
|
+
};
|