@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
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { type RequestFn } from './request';
|
|
2
|
+
export type SamlNameIdFormat = 'emailAddress' | 'persistent' | 'transient' | 'unspecified';
|
|
3
|
+
/** A SAML service provider Atlas issues assertions to, with its depth settings. */
|
|
4
|
+
export interface SamlIdpServiceProvider {
|
|
5
|
+
object: 'saml_idp_service_provider';
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
entity_id: string;
|
|
9
|
+
acs_url: string;
|
|
10
|
+
acs_urls: string[];
|
|
11
|
+
name_id_format: SamlNameIdFormat;
|
|
12
|
+
name_id_field: 'email' | 'user_id';
|
|
13
|
+
attributes: Record<string, string>;
|
|
14
|
+
encrypt_assertions: boolean;
|
|
15
|
+
has_encryption_cert: boolean;
|
|
16
|
+
signing_cert_count: number;
|
|
17
|
+
require_signed_requests: boolean;
|
|
18
|
+
signature_algorithm: 'rsa-sha256' | 'rsa-sha384' | 'rsa-sha512';
|
|
19
|
+
digest_algorithm: 'sha256' | 'sha384' | 'sha512';
|
|
20
|
+
sign_response: boolean;
|
|
21
|
+
artifact_binding: boolean;
|
|
22
|
+
ecp: boolean;
|
|
23
|
+
attribute_query: boolean;
|
|
24
|
+
slo_url: string | null;
|
|
25
|
+
slo_binding: 'redirect' | 'post' | 'soap' | null;
|
|
26
|
+
authn_context_class_ref: string | null;
|
|
27
|
+
assertion_lifetime_seconds: number;
|
|
28
|
+
}
|
|
29
|
+
/** Any of these; `null` clears an optional setting. */
|
|
30
|
+
export interface UpdateSamlIdpServiceProviderBody {
|
|
31
|
+
name?: string;
|
|
32
|
+
acs_urls?: string[];
|
|
33
|
+
name_id_format?: SamlNameIdFormat;
|
|
34
|
+
name_id_field?: 'email' | 'user_id';
|
|
35
|
+
attributes?: Record<string, string>;
|
|
36
|
+
encrypt_assertions?: boolean;
|
|
37
|
+
encryption_cert?: string | null;
|
|
38
|
+
signing_certs?: string[];
|
|
39
|
+
require_signed_requests?: boolean;
|
|
40
|
+
signature_algorithm?: 'rsa-sha256' | 'rsa-sha384' | 'rsa-sha512';
|
|
41
|
+
digest_algorithm?: 'sha256' | 'sha384' | 'sha512';
|
|
42
|
+
sign_response?: boolean;
|
|
43
|
+
artifact_binding?: boolean;
|
|
44
|
+
ecp?: boolean;
|
|
45
|
+
attribute_query?: boolean;
|
|
46
|
+
slo_url?: string | null;
|
|
47
|
+
slo_binding?: 'redirect' | 'post' | 'soap';
|
|
48
|
+
authn_context_class_ref?: string | null;
|
|
49
|
+
assertion_lifetime_seconds?: number | null;
|
|
50
|
+
}
|
|
51
|
+
export interface SamlIdpSpMetadata {
|
|
52
|
+
object: 'saml_idp_sp_metadata';
|
|
53
|
+
saved: boolean;
|
|
54
|
+
entity_id: string;
|
|
55
|
+
acs_url: string;
|
|
56
|
+
acs_urls: string[];
|
|
57
|
+
name_id_format: SamlNameIdFormat;
|
|
58
|
+
signing_certs: string[];
|
|
59
|
+
encryption_cert: string | null;
|
|
60
|
+
slo_url: string | null;
|
|
61
|
+
slo_binding: string | null;
|
|
62
|
+
authn_requests_signed: boolean;
|
|
63
|
+
want_assertions_signed: boolean;
|
|
64
|
+
requested_attributes: string[];
|
|
65
|
+
service_provider?: SamlIdpServiceProvider | null;
|
|
66
|
+
}
|
|
67
|
+
/** Atlas as a SAML identity provider: service-provider settings and metadata import. */
|
|
68
|
+
export declare function samlIdpResource(request: RequestFn): {
|
|
69
|
+
/** `GET /v1/saml_idp/service_providers` */
|
|
70
|
+
list(): Promise<{
|
|
71
|
+
object: "list";
|
|
72
|
+
data: SamlIdpServiceProvider[];
|
|
73
|
+
}>;
|
|
74
|
+
/** `GET /v1/saml_idp/service_providers/:id` */
|
|
75
|
+
get(id: string): Promise<SamlIdpServiceProvider>;
|
|
76
|
+
/** `PATCH /v1/saml_idp/service_providers/:id` — NameID format, encryption, request signing, algorithms, logout. */
|
|
77
|
+
update(id: string, body: UpdateSamlIdpServiceProviderBody): Promise<SamlIdpServiceProvider>;
|
|
78
|
+
/** `POST /v1/saml_idp/service_providers/import_metadata` — preview, or save with `save_as`. */
|
|
79
|
+
importMetadata(body: {
|
|
80
|
+
metadata_xml?: string;
|
|
81
|
+
metadata_url?: string;
|
|
82
|
+
mdq_base_url?: string;
|
|
83
|
+
entity_id?: string;
|
|
84
|
+
federation_certificate?: string;
|
|
85
|
+
save_as?: string;
|
|
86
|
+
name?: string;
|
|
87
|
+
}): Promise<SamlIdpSpMetadata>;
|
|
88
|
+
};
|
|
89
|
+
export type CloudProvider = 'aws' | 'gcp' | 'azure';
|
|
90
|
+
/** A cloud access target: an AWS account and role, a Google Cloud workforce pool, or an Azure trust. */
|
|
91
|
+
export interface CloudAccessTarget {
|
|
92
|
+
object: 'cloud_access_target';
|
|
93
|
+
id: string;
|
|
94
|
+
provider: CloudProvider;
|
|
95
|
+
name: string;
|
|
96
|
+
config: Record<string, unknown>;
|
|
97
|
+
assignment: Record<string, unknown> | null;
|
|
98
|
+
launch_url: string | null;
|
|
99
|
+
created_at: number;
|
|
100
|
+
updated_at: number;
|
|
101
|
+
}
|
|
102
|
+
export interface CloudAccessSetup {
|
|
103
|
+
object: 'cloud_access_setup';
|
|
104
|
+
target_id: string;
|
|
105
|
+
provider: CloudProvider;
|
|
106
|
+
steps: string[];
|
|
107
|
+
snippets: Record<string, string>;
|
|
108
|
+
sources: string[];
|
|
109
|
+
}
|
|
110
|
+
/** Cloud access portal: account and role tiles for the launcher. */
|
|
111
|
+
export declare function cloudAccessResource(request: RequestFn): {
|
|
112
|
+
list(provider?: CloudProvider): Promise<{
|
|
113
|
+
object: "list";
|
|
114
|
+
data: CloudAccessTarget[];
|
|
115
|
+
}>;
|
|
116
|
+
get(id: string): Promise<CloudAccessTarget>;
|
|
117
|
+
create(body: {
|
|
118
|
+
provider: CloudProvider;
|
|
119
|
+
name: string;
|
|
120
|
+
config: Record<string, unknown>;
|
|
121
|
+
assignment?: Record<string, unknown>;
|
|
122
|
+
}): Promise<CloudAccessTarget>;
|
|
123
|
+
update(id: string, body: {
|
|
124
|
+
name?: string;
|
|
125
|
+
config?: Record<string, unknown>;
|
|
126
|
+
assignment?: Record<string, unknown>;
|
|
127
|
+
}): Promise<CloudAccessTarget>;
|
|
128
|
+
delete(id: string): Promise<{
|
|
129
|
+
object: "cloud_access_target";
|
|
130
|
+
id: string;
|
|
131
|
+
deleted: true;
|
|
132
|
+
}>;
|
|
133
|
+
/** The commands and policy to apply on the cloud side. */
|
|
134
|
+
setup(id: string): Promise<CloudAccessSetup>;
|
|
135
|
+
};
|
|
136
|
+
/** A WS-Federation relying-party connection (sign people in through AD FS or another WS-Federation provider). */
|
|
137
|
+
export interface WsFedConnection {
|
|
138
|
+
object: 'wsfed_connection';
|
|
139
|
+
id: string;
|
|
140
|
+
organization_id: string | null;
|
|
141
|
+
status: 'draft' | 'active' | 'disabled';
|
|
142
|
+
issuer: string | null;
|
|
143
|
+
passive_endpoint: string | null;
|
|
144
|
+
realm: string | null;
|
|
145
|
+
signing_certificate_count: number;
|
|
146
|
+
allowed_domains: string[];
|
|
147
|
+
attribute_mapping: Record<string, string>;
|
|
148
|
+
freshness_minutes: number | null;
|
|
149
|
+
auth_method: string | null;
|
|
150
|
+
/** Enter as the reply URL of the provider's relying-party trust. */
|
|
151
|
+
acs_url: string;
|
|
152
|
+
logout_start_url: string;
|
|
153
|
+
created_at: number;
|
|
154
|
+
updated_at: number;
|
|
155
|
+
}
|
|
156
|
+
export interface WsFedConnectionBody {
|
|
157
|
+
organization_id?: string | null;
|
|
158
|
+
status?: 'draft' | 'active' | 'disabled';
|
|
159
|
+
metadata_url?: string;
|
|
160
|
+
metadata_xml?: string;
|
|
161
|
+
issuer?: string;
|
|
162
|
+
passive_endpoint?: string;
|
|
163
|
+
signing_certificates?: string;
|
|
164
|
+
realm?: string;
|
|
165
|
+
allowed_domains?: string[];
|
|
166
|
+
attribute_mapping?: Record<string, string> | null;
|
|
167
|
+
freshness_minutes?: number | null;
|
|
168
|
+
auth_method?: string | null;
|
|
169
|
+
}
|
|
170
|
+
export declare function wsfedConnectionsResource(request: RequestFn): {
|
|
171
|
+
list(): Promise<{
|
|
172
|
+
object: "list";
|
|
173
|
+
data: WsFedConnection[];
|
|
174
|
+
}>;
|
|
175
|
+
get(id: string): Promise<WsFedConnection>;
|
|
176
|
+
create(body: WsFedConnectionBody): Promise<WsFedConnection>;
|
|
177
|
+
update(id: string, body: WsFedConnectionBody): Promise<WsFedConnection>;
|
|
178
|
+
delete(id: string): Promise<{
|
|
179
|
+
object: "wsfed_connection";
|
|
180
|
+
id: string;
|
|
181
|
+
deleted: true;
|
|
182
|
+
}>;
|
|
183
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.samlIdpResource = samlIdpResource;
|
|
4
|
+
exports.cloudAccessResource = cloudAccessResource;
|
|
5
|
+
exports.wsfedConnectionsResource = wsfedConnectionsResource;
|
|
6
|
+
const request_1 = require("./request");
|
|
7
|
+
/** Atlas as a SAML identity provider: service-provider settings and metadata import. */
|
|
8
|
+
function samlIdpResource(request) {
|
|
9
|
+
return {
|
|
10
|
+
/** `GET /v1/saml_idp/service_providers` */
|
|
11
|
+
list() {
|
|
12
|
+
return request({ method: 'GET', path: '/v1/saml_idp/service_providers' });
|
|
13
|
+
},
|
|
14
|
+
/** `GET /v1/saml_idp/service_providers/:id` */
|
|
15
|
+
get(id) {
|
|
16
|
+
return request({ method: 'GET', path: `/v1/saml_idp/service_providers/${(0, request_1.enc)(id)}` });
|
|
17
|
+
},
|
|
18
|
+
/** `PATCH /v1/saml_idp/service_providers/:id` — NameID format, encryption, request signing, algorithms, logout. */
|
|
19
|
+
update(id, body) {
|
|
20
|
+
return request({ method: 'PATCH', path: `/v1/saml_idp/service_providers/${(0, request_1.enc)(id)}`, body });
|
|
21
|
+
},
|
|
22
|
+
/** `POST /v1/saml_idp/service_providers/import_metadata` — preview, or save with `save_as`. */
|
|
23
|
+
importMetadata(body) {
|
|
24
|
+
return request({ method: 'POST', path: '/v1/saml_idp/service_providers/import_metadata', body });
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** Cloud access portal: account and role tiles for the launcher. */
|
|
29
|
+
function cloudAccessResource(request) {
|
|
30
|
+
return {
|
|
31
|
+
list(provider) {
|
|
32
|
+
return request({ method: 'GET', path: `/v1/cloud_access/targets${provider ? `?provider=${provider}` : ''}` });
|
|
33
|
+
},
|
|
34
|
+
get(id) {
|
|
35
|
+
return request({ method: 'GET', path: `/v1/cloud_access/targets/${(0, request_1.enc)(id)}` });
|
|
36
|
+
},
|
|
37
|
+
create(body) {
|
|
38
|
+
return request({ method: 'POST', path: '/v1/cloud_access/targets', body });
|
|
39
|
+
},
|
|
40
|
+
update(id, body) {
|
|
41
|
+
return request({ method: 'PATCH', path: `/v1/cloud_access/targets/${(0, request_1.enc)(id)}`, body });
|
|
42
|
+
},
|
|
43
|
+
delete(id) {
|
|
44
|
+
return request({ method: 'DELETE', path: `/v1/cloud_access/targets/${(0, request_1.enc)(id)}` });
|
|
45
|
+
},
|
|
46
|
+
/** The commands and policy to apply on the cloud side. */
|
|
47
|
+
setup(id) {
|
|
48
|
+
return request({ method: 'GET', path: `/v1/cloud_access/targets/${(0, request_1.enc)(id)}/setup` });
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function wsfedConnectionsResource(request) {
|
|
53
|
+
return {
|
|
54
|
+
list() {
|
|
55
|
+
return request({ method: 'GET', path: '/v1/wsfed_connections' });
|
|
56
|
+
},
|
|
57
|
+
get(id) {
|
|
58
|
+
return request({ method: 'GET', path: `/v1/wsfed_connections/${(0, request_1.enc)(id)}` });
|
|
59
|
+
},
|
|
60
|
+
create(body) {
|
|
61
|
+
return request({ method: 'POST', path: '/v1/wsfed_connections', body });
|
|
62
|
+
},
|
|
63
|
+
update(id, body) {
|
|
64
|
+
return request({ method: 'PATCH', path: `/v1/wsfed_connections/${(0, request_1.enc)(id)}`, body });
|
|
65
|
+
},
|
|
66
|
+
delete(id) {
|
|
67
|
+
return request({ method: 'DELETE', path: `/v1/wsfed_connections/${(0, request_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C9E,CAAC;QACD,MAAM,CAAC,IAAyB;YAC9B,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1E,CAAC;QACD,MAAM,CAAC,EAAU,EAAE,IAAyB;YAC1C,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,yBAAyB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QACtF,CAAC;QACD,MAAM,CAAC,EAAU;YACf,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,yBAAyB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACjF,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -10,6 +10,11 @@ export interface ScimProvisioningTarget {
|
|
|
10
10
|
object: 'scim_provisioning_target';
|
|
11
11
|
id: string;
|
|
12
12
|
name: string;
|
|
13
|
+
kind: ProvisioningKind;
|
|
14
|
+
/** The kind's non-secret settings. */
|
|
15
|
+
connector_config: Record<string, unknown>;
|
|
16
|
+
/** Whether write-only credentials are stored (non-SCIM kinds) — never the values. */
|
|
17
|
+
has_credentials: boolean;
|
|
13
18
|
base_url: string;
|
|
14
19
|
/** Whether a bearer is set — never the value. */
|
|
15
20
|
has_bearer_token: boolean;
|
|
@@ -24,18 +29,28 @@ export interface ScimProvisioningTarget {
|
|
|
24
29
|
created_at: number;
|
|
25
30
|
updated_at: number;
|
|
26
31
|
}
|
|
32
|
+
export type ProvisioningKind = 'scim' | 'google_workspace' | 'microsoft_graph' | 'rest' | 'ad_writeback' | 'sql';
|
|
27
33
|
export interface CreateScimProvisioningTargetBody {
|
|
28
34
|
name: string;
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
/** Default scim. GET /v1/provisioning_connectors lists what each kind needs. */
|
|
36
|
+
kind?: ProvisioningKind;
|
|
37
|
+
connector_config?: Record<string, unknown>;
|
|
38
|
+
/** Write-only secrets for a non-SCIM kind. */
|
|
39
|
+
credentials?: Record<string, unknown>;
|
|
40
|
+
/** scim and rest only. Must be an https:// URL so the bearer never travels in cleartext. */
|
|
41
|
+
base_url?: string;
|
|
42
|
+
/** Required for scim. Write-only; stored encrypted, never returned. */
|
|
43
|
+
bearer_token?: string;
|
|
44
|
+
preset?: string;
|
|
45
|
+
preset_params?: Record<string, string>;
|
|
33
46
|
attribute_mapping?: Record<string, unknown>;
|
|
34
47
|
deprovision_action?: 'deactivate' | 'delete';
|
|
35
48
|
enabled?: boolean;
|
|
36
49
|
}
|
|
37
50
|
export interface UpdateScimProvisioningTargetBody {
|
|
38
51
|
name?: string;
|
|
52
|
+
connector_config?: Record<string, unknown>;
|
|
53
|
+
credentials?: Record<string, unknown>;
|
|
39
54
|
base_url?: string;
|
|
40
55
|
/** Write-only; omit to leave the stored bearer unchanged. */
|
|
41
56
|
bearer_token?: string;
|
|
@@ -75,6 +90,40 @@ export interface ScimProvisioningGroupSyncResult {
|
|
|
75
90
|
member_count: number;
|
|
76
91
|
error: string | null;
|
|
77
92
|
}
|
|
93
|
+
export interface ProvisioningPreview {
|
|
94
|
+
object: 'provisioning_preview';
|
|
95
|
+
user_id: string;
|
|
96
|
+
attributes: Array<{
|
|
97
|
+
attribute: string;
|
|
98
|
+
source: string;
|
|
99
|
+
expression: boolean;
|
|
100
|
+
ok: boolean;
|
|
101
|
+
value: unknown;
|
|
102
|
+
error: string | null;
|
|
103
|
+
}>;
|
|
104
|
+
payload: Record<string, unknown>;
|
|
105
|
+
}
|
|
106
|
+
export interface ProvisioningLogEntry {
|
|
107
|
+
object: 'provisioning_log_entry';
|
|
108
|
+
id: string;
|
|
109
|
+
resource_type: 'user' | 'group';
|
|
110
|
+
resource_id: string;
|
|
111
|
+
operation: string;
|
|
112
|
+
ok: boolean;
|
|
113
|
+
status: number | null;
|
|
114
|
+
remote_id: string | null;
|
|
115
|
+
error: string | null;
|
|
116
|
+
created_at: number;
|
|
117
|
+
}
|
|
118
|
+
export interface ProvisioningFailure {
|
|
119
|
+
object: 'provisioning_failure';
|
|
120
|
+
resource_type: 'user' | 'group';
|
|
121
|
+
resource_id: string;
|
|
122
|
+
remote_id: string | null;
|
|
123
|
+
error: string | null;
|
|
124
|
+
attempts: number;
|
|
125
|
+
last_attempt_at: number;
|
|
126
|
+
}
|
|
78
127
|
export declare function scimProvisioningResource(request: RequestFn): {
|
|
79
128
|
list(): Promise<ListPage<ScimProvisioningTarget>>;
|
|
80
129
|
get(id: string): Promise<ScimProvisioningTarget>;
|
|
@@ -91,4 +140,51 @@ export declare function scimProvisioningResource(request: RequestFn): {
|
|
|
91
140
|
syncUser(id: string, userId: string): Promise<ScimProvisioningSyncResult>;
|
|
92
141
|
/** Force one org's (group) sync now; only already-provisioned members are sent. */
|
|
93
142
|
syncGroup(id: string, organizationId: string): Promise<ScimProvisioningGroupSyncResult>;
|
|
143
|
+
/** The connector kinds, what each needs, and the expression functions. */
|
|
144
|
+
connectors(): Promise<{
|
|
145
|
+
object: "list";
|
|
146
|
+
data: Array<{
|
|
147
|
+
kind: ProvisioningKind;
|
|
148
|
+
name: string;
|
|
149
|
+
needs_relay_agent: boolean;
|
|
150
|
+
credentials: string[];
|
|
151
|
+
config: string[];
|
|
152
|
+
hint: string;
|
|
153
|
+
}>;
|
|
154
|
+
expression_functions: string[];
|
|
155
|
+
}>;
|
|
156
|
+
/** Evaluate a mapping for one user without sending anything. */
|
|
157
|
+
preview(body: {
|
|
158
|
+
attribute_mapping?: Record<string, string>;
|
|
159
|
+
lookups?: Record<string, unknown>;
|
|
160
|
+
target_id?: string;
|
|
161
|
+
user_id?: string;
|
|
162
|
+
user?: Record<string, unknown>;
|
|
163
|
+
}): Promise<ProvisioningPreview>;
|
|
164
|
+
/** The target's provisioning log, newest first. */
|
|
165
|
+
logs(id: string, query?: {
|
|
166
|
+
limit?: number;
|
|
167
|
+
starting_after?: string;
|
|
168
|
+
failures?: boolean;
|
|
169
|
+
resource_id?: string;
|
|
170
|
+
}): Promise<ListPage<ProvisioningLogEntry> & {
|
|
171
|
+
next_cursor: string | null;
|
|
172
|
+
}>;
|
|
173
|
+
/** Users and organizations whose last push failed. */
|
|
174
|
+
failures(id: string): Promise<ListPage<ProvisioningFailure>>;
|
|
175
|
+
/** Retry failed users and groups now (all, or one with resource_type + resource_id). */
|
|
176
|
+
retryFailed(id: string, body?: {
|
|
177
|
+
resource_type?: "user" | "group";
|
|
178
|
+
resource_id?: string;
|
|
179
|
+
}): Promise<{
|
|
180
|
+
object: "provisioning_retry_result";
|
|
181
|
+
retried: number;
|
|
182
|
+
succeeded: number;
|
|
183
|
+
results: Array<{
|
|
184
|
+
resource_type: string;
|
|
185
|
+
resource_id: string;
|
|
186
|
+
ok: boolean;
|
|
187
|
+
error: string | null;
|
|
188
|
+
}>;
|
|
189
|
+
}>;
|
|
94
190
|
};
|
|
@@ -44,6 +44,36 @@ function scimProvisioningResource(request) {
|
|
|
44
44
|
body: { organization_id: organizationId },
|
|
45
45
|
});
|
|
46
46
|
},
|
|
47
|
+
/** The connector kinds, what each needs, and the expression functions. */
|
|
48
|
+
connectors() {
|
|
49
|
+
return request({ method: 'GET', path: '/v1/provisioning_connectors' });
|
|
50
|
+
},
|
|
51
|
+
/** Evaluate a mapping for one user without sending anything. */
|
|
52
|
+
preview(body) {
|
|
53
|
+
return request({ method: 'POST', path: '/v1/provisioning/preview', body });
|
|
54
|
+
},
|
|
55
|
+
/** The target's provisioning log, newest first. */
|
|
56
|
+
logs(id, query = {}) {
|
|
57
|
+
const q = new URLSearchParams();
|
|
58
|
+
if (query.limit)
|
|
59
|
+
q.set('limit', String(query.limit));
|
|
60
|
+
if (query.starting_after)
|
|
61
|
+
q.set('starting_after', query.starting_after);
|
|
62
|
+
if (query.failures)
|
|
63
|
+
q.set('failures', 'true');
|
|
64
|
+
if (query.resource_id)
|
|
65
|
+
q.set('resource_id', query.resource_id);
|
|
66
|
+
const qs = q.toString();
|
|
67
|
+
return request({ method: 'GET', path: `/v1/scim_provisioning_targets/${(0, request_1.enc)(id)}/logs${qs ? `?${qs}` : ''}` });
|
|
68
|
+
},
|
|
69
|
+
/** Users and organizations whose last push failed. */
|
|
70
|
+
failures(id) {
|
|
71
|
+
return request({ method: 'GET', path: `/v1/scim_provisioning_targets/${(0, request_1.enc)(id)}/failures` });
|
|
72
|
+
},
|
|
73
|
+
/** Retry failed users and groups now (all, or one with resource_type + resource_id). */
|
|
74
|
+
retryFailed(id, body = {}) {
|
|
75
|
+
return request({ method: 'POST', path: `/v1/scim_provisioning_targets/${(0, request_1.enc)(id)}/retry_failed`, body });
|
|
76
|
+
},
|
|
47
77
|
};
|
|
48
78
|
}
|
|
49
79
|
//# sourceMappingURL=scim-provisioning.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scim-provisioning.js","sourceRoot":"","sources":["../../src/client/scim-provisioning.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"scim-provisioning.js","sourceRoot":"","sources":["../../src/client/scim-provisioning.ts"],"names":[],"mappings":";;AAgIA,4DA6EC;AA7MD,uCAAgD;AAgIhD,SAAgB,wBAAwB,CAAC,OAAkB;IACzD,OAAO;QACL,IAAI;YACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,+BAA+B,EAAE,CAAC,CAAC;QAC3E,CAAC;QACD,GAAG,CAAC,EAAU;YACZ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,iCAAiC,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACtF,CAAC;QACD,MAAM,CACJ,IAAsC,EACtC,cAAuB;YAEvB,OAAO,OAAO,CAAC;gBACb,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,+BAA+B;gBACrC,IAAI;gBACJ,cAAc;aAC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E,CAAC,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1G,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -50,3 +50,37 @@ export declare function scimTokensResource(request: RequestFn): {
|
|
|
50
50
|
note: string;
|
|
51
51
|
}>;
|
|
52
52
|
};
|
|
53
|
+
/** A custom SCIM resource type an instance serves at /scim/v2/<endpoint>. */
|
|
54
|
+
export interface ScimResourceType {
|
|
55
|
+
object: 'scim_resource_type';
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
endpoint: string;
|
|
59
|
+
schema_uri: string;
|
|
60
|
+
description: string | null;
|
|
61
|
+
attributes: Array<{
|
|
62
|
+
name: string;
|
|
63
|
+
type: string;
|
|
64
|
+
multiValued?: boolean;
|
|
65
|
+
required?: boolean;
|
|
66
|
+
mutability?: string;
|
|
67
|
+
subAttributes?: unknown[];
|
|
68
|
+
}>;
|
|
69
|
+
created_at: number;
|
|
70
|
+
}
|
|
71
|
+
export declare function scimResourceTypesResource(request: RequestFn): {
|
|
72
|
+
list(): Promise<ListPage<ScimResourceType>>;
|
|
73
|
+
get(id: string): Promise<ScimResourceType>;
|
|
74
|
+
create(body: {
|
|
75
|
+
name: string;
|
|
76
|
+
endpoint: string;
|
|
77
|
+
schema_uri: string;
|
|
78
|
+
description?: string;
|
|
79
|
+
attributes?: ScimResourceType["attributes"];
|
|
80
|
+
}): Promise<ScimResourceType>;
|
|
81
|
+
delete(id: string): Promise<{
|
|
82
|
+
object: "scim_resource_type";
|
|
83
|
+
id: string;
|
|
84
|
+
deleted: true;
|
|
85
|
+
}>;
|
|
86
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.scimTokensResource = scimTokensResource;
|
|
4
|
+
exports.scimResourceTypesResource = scimResourceTypesResource;
|
|
4
5
|
const request_1 = require("./request");
|
|
5
6
|
function scimTokensResource(request) {
|
|
6
7
|
return {
|
|
@@ -19,4 +20,20 @@ function scimTokensResource(request) {
|
|
|
19
20
|
},
|
|
20
21
|
};
|
|
21
22
|
}
|
|
23
|
+
function scimResourceTypesResource(request) {
|
|
24
|
+
return {
|
|
25
|
+
list() {
|
|
26
|
+
return request({ method: 'GET', path: '/v1/scim_resource_types' });
|
|
27
|
+
},
|
|
28
|
+
get(id) {
|
|
29
|
+
return request({ method: 'GET', path: `/v1/scim_resource_types/${(0, request_1.enc)(id)}` });
|
|
30
|
+
},
|
|
31
|
+
create(body) {
|
|
32
|
+
return request({ method: 'POST', path: '/v1/scim_resource_types', body });
|
|
33
|
+
},
|
|
34
|
+
delete(id) {
|
|
35
|
+
return request({ method: 'DELETE', path: `/v1/scim_resource_types/${(0, request_1.enc)(id)}` });
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
22
39
|
//# sourceMappingURL=scim-tokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scim-tokens.js","sourceRoot":"","sources":["../../src/client/scim-tokens.ts"],"names":[],"mappings":";;AA8CA,gDAkBC;
|
|
1
|
+
{"version":3,"file":"scim-tokens.js","sourceRoot":"","sources":["../../src/client/scim-tokens.ts"],"names":[],"mappings":";;AA8CA,gDAkBC;AAcD,8DAeC;AA7FD,uCAAgD;AA8ChD,SAAgB,kBAAkB,CAAC,OAAkB;IACnD,OAAO;QACL,IAAI;YACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAC;QAC7D,CAAC;QACD,MAAM,CAAC,IAAyB,EAAE,cAAuB;YACvD,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC;QACpF,CAAC;QACD,sDAAsD;QACtD,MAAM,CAAC,EAAU,EAAE,IAAyB;YAC1C,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QAChF,CAAC;QACD,MAAM,CACJ,EAAU;YAEV,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,IAAA,aAAG,EAAC,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;QAChF,CAAC;KACF,CAAC;AACJ,CAAC;AAcD,SAAgB,yBAAyB,CAAC,OAAkB;IAC1D,OAAO;QACL,IAAI;YACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC,CAAC;QACrE,CAAC;QACD,GAAG,CAAC,EAAU;YACZ,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,2BAA2B,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAChF,CAAC;QACD,MAAM,CAAC,IAA+H;YACpI,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5E,CAAC;QACD,MAAM,CAAC,EAAU;YACf,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,2BAA2B,IAAA,aAAG,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACnF,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type RequestFn } from './request';
|
|
2
|
-
export type ServiceConnectorCategory = 'messaging' | 'crm' | 'analytics' | 'fraud' | 'idv' | 'http';
|
|
2
|
+
export type ServiceConnectorCategory = 'messaging' | 'crm' | 'analytics' | 'fraud' | 'idv' | 'http' | 'ticketing';
|
|
3
3
|
/** A configured service. Credentials are write-only: they live in the vault and are never returned. */
|
|
4
4
|
export interface ServiceConnector {
|
|
5
5
|
object: 'service_connector';
|
package/dist/client/ssf.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type SsfEventType = 'https://schemas.openid.net/secevent/caep/event-type/
|
|
|
4
4
|
export interface SsfStream {
|
|
5
5
|
object: 'ssf_stream';
|
|
6
6
|
id: string;
|
|
7
|
+
default_subjects?: 'ALL' | 'NONE';
|
|
7
8
|
description: string | null;
|
|
8
9
|
delivery: {
|
|
9
10
|
method: string;
|
|
@@ -32,6 +33,7 @@ export interface CreateSsfStreamBody {
|
|
|
32
33
|
audience?: string;
|
|
33
34
|
description?: string;
|
|
34
35
|
events_requested?: string[];
|
|
36
|
+
default_subjects?: 'ALL' | 'NONE';
|
|
35
37
|
}
|
|
36
38
|
export interface UpdateSsfStreamBody {
|
|
37
39
|
endpoint_url?: string;
|
|
@@ -76,6 +78,22 @@ export interface CreateSsfReceiverBody {
|
|
|
76
78
|
}
|
|
77
79
|
/** Shared Signals Framework (SSF 1.0) with CAEP and RISC: transmitter streams and inbound receivers. */
|
|
78
80
|
export declare function ssfResource(request: RequestFn): {
|
|
81
|
+
subjects: {
|
|
82
|
+
/** Add a subject to a stream (iss_sub, email, phone_number, opaque, account, did or uri identifier). */
|
|
83
|
+
add(streamId: string, subject: Record<string, string>): Promise<void>;
|
|
84
|
+
remove(streamId: string, subject: Record<string, string>): Promise<void>;
|
|
85
|
+
};
|
|
86
|
+
/** Raise a CAEP / RISC event for one of your users by hand (opt-in, opt-out-*, identifier-recycled, recovery-* ...). */
|
|
87
|
+
emit(body: {
|
|
88
|
+
user_id: string;
|
|
89
|
+
event: string;
|
|
90
|
+
subject?: Record<string, string>;
|
|
91
|
+
data?: Record<string, unknown>;
|
|
92
|
+
}): Promise<{
|
|
93
|
+
object: "ssf_event_emit";
|
|
94
|
+
event: string;
|
|
95
|
+
user_id: string;
|
|
96
|
+
}>;
|
|
79
97
|
streams: {
|
|
80
98
|
list(): Promise<{
|
|
81
99
|
object: "list";
|
|
@@ -91,6 +109,17 @@ export declare function ssfResource(request: RequestFn): {
|
|
|
91
109
|
stream_id: string;
|
|
92
110
|
state: string;
|
|
93
111
|
}>;
|
|
112
|
+
/** SSF 1.0 subject management: `default_subjects` ALL streams carry everyone but removed subjects, NONE streams only added ones. */
|
|
113
|
+
subjects(id: string): Promise<{
|
|
114
|
+
object: "list";
|
|
115
|
+
default_subjects: "ALL" | "NONE";
|
|
116
|
+
data: Array<{
|
|
117
|
+
object: "ssf_stream_subject";
|
|
118
|
+
subject: Record<string, string>;
|
|
119
|
+
mode: "include" | "exclude";
|
|
120
|
+
created_at: number;
|
|
121
|
+
}>;
|
|
122
|
+
}>;
|
|
94
123
|
events(id: string, query?: {
|
|
95
124
|
limit?: number;
|
|
96
125
|
}): Promise<{
|
package/dist/client/ssf.js
CHANGED
|
@@ -6,6 +6,19 @@ function ssfResource(request) {
|
|
|
6
6
|
const stream = (id) => `/v1/ssf/streams/${encodeURIComponent(id)}`;
|
|
7
7
|
const receiver = (id) => `/v1/ssf/receivers/${encodeURIComponent(id)}`;
|
|
8
8
|
return {
|
|
9
|
+
subjects: {
|
|
10
|
+
/** Add a subject to a stream (iss_sub, email, phone_number, opaque, account, did or uri identifier). */
|
|
11
|
+
add(streamId, subject) {
|
|
12
|
+
return request({ method: 'POST', path: '/v1/ssf/subjects/add', body: { stream_id: streamId, subject } });
|
|
13
|
+
},
|
|
14
|
+
remove(streamId, subject) {
|
|
15
|
+
return request({ method: 'POST', path: '/v1/ssf/subjects/remove', body: { stream_id: streamId, subject } });
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
/** Raise a CAEP / RISC event for one of your users by hand (opt-in, opt-out-*, identifier-recycled, recovery-* ...). */
|
|
19
|
+
emit(body) {
|
|
20
|
+
return request({ method: 'POST', path: '/v1/ssf/events', body });
|
|
21
|
+
},
|
|
9
22
|
streams: {
|
|
10
23
|
list() {
|
|
11
24
|
return request({ method: 'GET', path: '/v1/ssf/streams' });
|
|
@@ -26,6 +39,10 @@ function ssfResource(request) {
|
|
|
26
39
|
verify(id, state) {
|
|
27
40
|
return request({ method: 'POST', path: `${stream(id)}/verify`, body: { state } });
|
|
28
41
|
},
|
|
42
|
+
/** SSF 1.0 subject management: `default_subjects` ALL streams carry everyone but removed subjects, NONE streams only added ones. */
|
|
43
|
+
subjects(id) {
|
|
44
|
+
return request({ method: 'GET', path: `${stream(id)}/subjects` });
|
|
45
|
+
},
|
|
29
46
|
events(id, query = {}) {
|
|
30
47
|
return request({ method: 'GET', path: `${stream(id)}/events`, query });
|
|
31
48
|
},
|
package/dist/client/ssf.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssf.js","sourceRoot":"","sources":["../../src/client/ssf.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ssf.js","sourceRoot":"","sources":["../../src/client/ssf.ts"],"names":[],"mappings":";;AA+FA,kCA4DC;AA7DD,wGAAwG;AACxG,SAAgB,WAAW,CAAC,OAAkB;IAC5C,MAAM,MAAM,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,mBAAmB,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC;IAC3E,MAAM,QAAQ,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,qBAAqB,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC;IAC/E,OAAO;QACL,QAAQ,EAAE;YACR,wGAAwG;YACxG,GAAG,CAAC,QAAgB,EAAE,OAA+B;gBACnD,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;YAC3G,CAAC;YACD,MAAM,CAAC,QAAgB,EAAE,OAA+B;gBACtD,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE,IAAI,EAAE,EAAE,SAAS,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O,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;YACpE,CAAC;YACD,MAAM,CAAC,EAAU,EAAE,QAA4B,EAAE;gBAC/C,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;YACzE,CAAC;SACF;QACD,SAAS,EAAE;YACT,IAAI;gBACF,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC,CAAC;YAC/D,CAAC;YACD,MAAM,CAAC,IAA2B;gBAChC,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,CAAC;YACtE,CAAC;YACD,MAAM,CAAC,EAAU,EAAE,IAA4E;gBAC7F,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;YAChE,CAAC;YACD,MAAM,CAAC,EAAU;gBACf,OAAO,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;YAC3D,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
package/dist/client/users.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CreateTemporaryAccessBody, type TemporaryAccessPass } from './risk-containment';
|
|
1
2
|
import { type RequestFn } from './request';
|
|
2
3
|
import type { ImportedMfa } from './mfa-factors';
|
|
3
4
|
import type { CursorPage, CursorParams, DeletedObject, ListPage, Metadata } from './types';
|
|
@@ -258,6 +259,14 @@ export declare function usersResource(request: RequestFn): {
|
|
|
258
259
|
total_count?: number;
|
|
259
260
|
}>;
|
|
260
261
|
get(id: string): Promise<User>;
|
|
262
|
+
/**
|
|
263
|
+
* Issue a temporary access pass: a time-limited code the user signs in with
|
|
264
|
+
* (`strategy: "temporary_access_pass"`), which counts as MFA for that sign-in and makes them register a
|
|
265
|
+
* passkey or second factor. The `code` is returned once.
|
|
266
|
+
*/
|
|
267
|
+
createTemporaryAccess(id: string, body?: CreateTemporaryAccessBody): Promise<TemporaryAccessPass & {
|
|
268
|
+
code: string;
|
|
269
|
+
}>;
|
|
261
270
|
create(body: CreateUserBody, idempotencyKey?: string): Promise<User>;
|
|
262
271
|
update(id: string, body: UpdateUserBody): Promise<User>;
|
|
263
272
|
/**
|